summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/double-conversion/bignum.cc2
-rw-r--r--src/3rdparty/double-conversion/bignum.h1
-rw-r--r--src/3rdparty/double-conversion/cached-powers.cc5
-rw-r--r--src/3rdparty/double-conversion/diy-fp.h22
-rw-r--r--src/3rdparty/double-conversion/double-conversion.cc21
-rw-r--r--src/3rdparty/double-conversion/fixed-dtoa.cc5
-rw-r--r--src/3rdparty/double-conversion/ieee.h2
-rw-r--r--src/3rdparty/double-conversion/include/double-conversion/utils.h38
-rw-r--r--src/3rdparty/double-conversion/qt_attribution.json4
-rw-r--r--src/3rdparty/double-conversion/strtod.cc2
-rw-r--r--src/3rdparty/gradle/gradle/wrapper/gradle-wrapper.jarbin54213 -> 54329 bytes
-rw-r--r--src/3rdparty/gradle/gradle/wrapper/gradle-wrapper.properties3
-rwxr-xr-xsrc/3rdparty/gradle/gradlew8
-rw-r--r--src/3rdparty/gradle/gradlew.bat2
-rw-r--r--src/3rdparty/libjpeg.pri6
-rw-r--r--src/3rdparty/tinycbor/.gitignore81
-rw-r--r--src/3rdparty/tinycbor/LICENSE21
-rw-r--r--src/3rdparty/tinycbor/README13
-rw-r--r--src/3rdparty/tinycbor/VERSION1
-rw-r--r--src/3rdparty/tinycbor/qt_attribution.json14
-rw-r--r--src/3rdparty/tinycbor/src/cbor.h707
-rw-r--r--src/3rdparty/tinycbor/src/cborencoder.c676
-rw-r--r--src/3rdparty/tinycbor/src/cborerrorstrings.c188
-rw-r--r--src/3rdparty/tinycbor/src/cborinternal_p.h245
-rw-r--r--src/3rdparty/tinycbor/src/cborjson.h62
-rw-r--r--src/3rdparty/tinycbor/src/cborparser.c1522
-rw-r--r--src/3rdparty/tinycbor/src/compilersupport_p.h263
-rw-r--r--src/3rdparty/tinycbor/src/tinycbor-version.h3
-rw-r--r--src/3rdparty/tinycbor/tests/.gitignore15
-rw-r--r--src/3rdparty/tinycbor/tests/encoder/data.cpp310
-rw-r--r--src/3rdparty/tinycbor/tests/encoder/encoder.pro9
-rw-r--r--src/3rdparty/tinycbor/tests/encoder/tst_encoder.cpp496
-rw-r--r--src/3rdparty/tinycbor/tests/parser/data.cpp573
-rw-r--r--src/3rdparty/tinycbor/tests/parser/parser.pro10
-rw-r--r--src/3rdparty/tinycbor/tests/parser/tst_parser.cpp1667
-rw-r--r--src/3rdparty/xcb/README8
-rw-r--r--src/3rdparty/xcb/include/xcb/randr.h175
-rw-r--r--src/3rdparty/xcb/include/xcb/render.h229
-rw-r--r--src/3rdparty/xcb/include/xcb/shape.h43
-rw-r--r--src/3rdparty/xcb/include/xcb/shm.h24
-rw-r--r--src/3rdparty/xcb/include/xcb/sync.h567
-rw-r--r--src/3rdparty/xcb/include/xcb/xfixes.h150
-rw-r--r--src/3rdparty/xcb/include/xcb/xinerama.h157
-rw-r--r--src/3rdparty/xcb/include/xcb/xinput.h9306
-rw-r--r--src/3rdparty/xcb/libxcb/randr.c817
-rw-r--r--src/3rdparty/xcb/libxcb/render.c950
-rw-r--r--src/3rdparty/xcb/libxcb/shape.c85
-rw-r--r--src/3rdparty/xcb/libxcb/shm.c19
-rw-r--r--src/3rdparty/xcb/libxcb/support_libxcb_versions_where_xcb_sumof_not_available.patch273
-rw-r--r--src/3rdparty/xcb/libxcb/sync.c751
-rw-r--r--src/3rdparty/xcb/libxcb/xfixes.c321
-rw-r--r--src/3rdparty/xcb/libxcb/xinerama.c212
-rw-r--r--src/3rdparty/xcb/libxcb/xinput.c14156
-rw-r--r--src/3rdparty/xcb/libxcb/xkb.c39
-rw-r--r--src/3rdparty/xkbcommon.pri4
-rw-r--r--src/android/jar/jar.pro2
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/CursorHandle.java9
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/EditContextView.java120
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/EditMenu.java142
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/EditPopupMenu.java85
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java361
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/QtNative.java56
-rw-r--r--src/android/templates/AndroidManifest.xml2
-rw-r--r--src/android/templates/build.gradle10
-rw-r--r--src/angle/src/common/common.pri5
-rw-r--r--src/corelib/codecs/qtextcodec.cpp18
-rw-r--r--src/corelib/codecs/qutfcodec.cpp101
-rw-r--r--src/corelib/configure.json7
-rw-r--r--src/corelib/corelib.pro1
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp48
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp14
-rw-r--r--src/corelib/doc/snippets/qstring/main.cpp5
-rw-r--r--src/corelib/doc/src/objectmodel/signalsandslots.qdoc4
-rw-r--r--src/corelib/global/global.pri1
-rw-r--r--src/corelib/global/qcompilerdetection.h13
-rw-r--r--src/corelib/global/qendian.cpp (renamed from src/corelib/global/qendian.qdoc)319
-rw-r--r--src/corelib/global/qendian.h25
-rw-r--r--src/corelib/global/qglobal.cpp90
-rw-r--r--src/corelib/global/qglobal.h8
-rw-r--r--src/corelib/global/qlogging.cpp29
-rw-r--r--src/corelib/global/qnamespace.h55
-rw-r--r--src/corelib/global/qnamespace.qdoc41
-rw-r--r--src/corelib/global/qprocessordetection.h2
-rw-r--r--src/corelib/global/qtrace_p.h2
-rw-r--r--src/corelib/io/qdir.cpp4
-rw-r--r--src/corelib/io/qfilesystemengine_unix.cpp2
-rw-r--r--src/corelib/io/qfilesystemwatcher_fsevents.mm2
-rw-r--r--src/corelib/io/qfilesystemwatcher_win.cpp4
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp23
-rw-r--r--src/corelib/io/qprocess_win.cpp21
-rw-r--r--src/corelib/io/qresource.cpp10
-rw-r--r--src/corelib/io/qsettings.cpp6
-rw-r--r--src/corelib/io/qurlrecode.cpp124
-rw-r--r--src/corelib/itemmodels/qsortfilterproxymodel.cpp13
-rw-r--r--src/corelib/kernel/kernel.pri4
-rw-r--r--src/corelib/kernel/qcore_mac_objc.mm15
-rw-r--r--src/corelib/kernel/qcore_mac_p.h130
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp63
-rw-r--r--src/corelib/kernel/qcoreapplication.h8
-rw-r--r--src/corelib/kernel/qcoreevent.cpp8
-rw-r--r--src/corelib/kernel/qcoreglobaldata.cpp5
-rw-r--r--src/corelib/kernel/qdeadlinetimer.cpp1
-rw-r--r--src/corelib/kernel/qdeadlinetimer.h5
-rw-r--r--src/corelib/kernel/qeventdispatcher_cf.mm47
-rw-r--r--src/corelib/kernel/qeventdispatcher_winrt.cpp22
-rw-r--r--src/corelib/kernel/qeventdispatcher_winrt_p.h1
-rw-r--r--src/corelib/kernel/qeventloop.cpp6
-rw-r--r--src/corelib/kernel/qmetatype.cpp43
-rw-r--r--src/corelib/kernel/qmetatype.h17
-rw-r--r--src/corelib/kernel/qmetatype_p.h4
-rw-r--r--src/corelib/kernel/qobject.cpp17
-rw-r--r--src/corelib/kernel/qtestsupport_core.cpp126
-rw-r--r--src/corelib/kernel/qtestsupport_core.h92
-rw-r--r--src/corelib/kernel/qtimer.cpp42
-rw-r--r--src/corelib/kernel/qtimer.h13
-rw-r--r--src/corelib/kernel/qtranslator.cpp15
-rw-r--r--src/corelib/kernel/qvariant.cpp361
-rw-r--r--src/corelib/kernel/qvariant.h2
-rw-r--r--src/corelib/kernel/qwineventnotifier.cpp7
-rw-r--r--src/corelib/plugin/qfactoryloader.cpp36
-rw-r--r--src/corelib/plugin/qlibrary.cpp4
-rw-r--r--src/corelib/plugin/qlibrary_unix.cpp23
-rw-r--r--src/corelib/plugin/qplugin.h13
-rw-r--r--src/corelib/qtcore.tracepoints30
-rw-r--r--src/corelib/serialization/qcborarray.cpp1192
-rw-r--r--src/corelib/serialization/qcborarray.h295
-rw-r--r--src/corelib/serialization/qcborcommon.h147
-rw-r--r--src/corelib/serialization/qcbormap.cpp1651
-rw-r--r--src/corelib/serialization/qcbormap.h346
-rw-r--r--src/corelib/serialization/qcborstream.cpp2971
-rw-r--r--src/corelib/serialization/qcborstream.h267
-rw-r--r--src/corelib/serialization/qcborvalue.cpp2645
-rw-r--r--src/corelib/serialization/qcborvalue.h465
-rw-r--r--src/corelib/serialization/qcborvalue_p.h396
-rw-r--r--src/corelib/serialization/qdatastream.cpp1
-rw-r--r--src/corelib/serialization/qdatastream.h5
-rw-r--r--src/corelib/serialization/qjson_p.h32
-rw-r--r--src/corelib/serialization/qjsoncbor.cpp954
-rw-r--r--src/corelib/serialization/qjsonvalue.cpp30
-rw-r--r--src/corelib/serialization/qjsonvalue.h1
-rw-r--r--src/corelib/serialization/serialization.pri15
-rw-r--r--src/corelib/thread/qfuture.h1
-rw-r--r--src/corelib/thread/qfutureinterface.h2
-rw-r--r--src/corelib/thread/qmutex_p.h3
-rw-r--r--src/corelib/thread/qmutex_unix.cpp2
-rw-r--r--src/corelib/thread/qreadwritelock_p.h2
-rw-r--r--src/corelib/thread/qsemaphore.cpp6
-rw-r--r--src/corelib/thread/qthread.cpp48
-rw-r--r--src/corelib/thread/qthread.h7
-rw-r--r--src/corelib/thread/qthread_p.h17
-rw-r--r--src/corelib/thread/qthread_unix.cpp12
-rw-r--r--src/corelib/thread/qthread_win.cpp18
-rw-r--r--src/corelib/thread/qwaitcondition.h4
-rw-r--r--src/corelib/thread/qwaitcondition_unix.cpp53
-rw-r--r--src/corelib/thread/qwaitcondition_win.cpp11
-rw-r--r--src/corelib/tools/qarraydata.h2
-rw-r--r--src/corelib/tools/qbytearray.cpp295
-rw-r--r--src/corelib/tools/qbytearray.h17
-rw-r--r--src/corelib/tools/qcontiguouscache.h2
-rw-r--r--src/corelib/tools/qcryptographichash.cpp40
-rw-r--r--src/corelib/tools/qcryptographichash.h1
-rw-r--r--src/corelib/tools/qdatetime.cpp14
-rw-r--r--src/corelib/tools/qhash.h2
-rw-r--r--src/corelib/tools/qlinkedlist.h2
-rw-r--r--src/corelib/tools/qlist.h2
-rw-r--r--src/corelib/tools/qlocale.cpp73
-rw-r--r--src/corelib/tools/qlocale.qdoc2
-rw-r--r--src/corelib/tools/qlocale_data_p.h8961
-rw-r--r--src/corelib/tools/qlocale_p.h1
-rw-r--r--src/corelib/tools/qlocale_tools.cpp16
-rw-r--r--src/corelib/tools/qlocale_tools_p.h7
-rw-r--r--src/corelib/tools/qmap.h2
-rw-r--r--src/corelib/tools/qregexp.cpp56
-rw-r--r--src/corelib/tools/qregularexpression.cpp220
-rw-r--r--src/corelib/tools/qregularexpression.h5
-rw-r--r--src/corelib/tools/qregularexpression_p.h (renamed from src/gui/image/qimage_sse4.cpp)54
-rw-r--r--src/corelib/tools/qringbuffer.cpp8
-rw-r--r--src/corelib/tools/qset.h2
-rw-r--r--src/corelib/tools/qshareddata.h25
-rw-r--r--src/corelib/tools/qsimd.cpp254
-rw-r--r--src/corelib/tools/qsimd_p.h208
-rw-r--r--src/corelib/tools/qsimd_x86.cpp116
-rw-r--r--src/corelib/tools/qsimd_x86_p.h222
-rw-r--r--src/corelib/tools/qstring.cpp498
-rw-r--r--src/corelib/tools/qstring.h4
-rw-r--r--src/corelib/tools/qstringview.cpp14
-rw-r--r--src/corelib/tools/qstringview.h3
-rw-r--r--src/corelib/tools/qt_attribution.json5
-rw-r--r--src/corelib/tools/qtimezone.cpp14
-rw-r--r--src/corelib/tools/qtimezoneprivate.cpp18
-rw-r--r--src/corelib/tools/qtimezoneprivate_p.h3
-rw-r--r--src/corelib/tools/qtimezoneprivate_tz.cpp5
-rw-r--r--src/corelib/tools/qtimezoneprivate_win.cpp1
-rw-r--r--src/corelib/tools/tools.pri18
-rw-r--r--src/dbus/qdbus_symbols.cpp6
-rw-r--r--src/dbus/qdbus_symbols_p.h57
-rw-r--r--src/dbus/qdbusmessage.cpp44
-rw-r--r--src/dbus/qdbusmessage.h3
-rw-r--r--src/dbus/qdbusmessage_p.h1
-rw-r--r--src/gui/accessible/qaccessible.cpp26
-rw-r--r--src/gui/accessible/qaccessiblecache.cpp14
-rw-r--r--src/gui/accessible/qaccessiblecache_p.h1
-rw-r--r--src/gui/configure.json133
-rw-r--r--src/gui/configure.pri2
-rw-r--r--src/gui/doc/qtgui.qdocconf3
-rw-r--r--src/gui/image/image.pri5
-rw-r--r--src/gui/image/qbitmap.cpp52
-rw-r--r--src/gui/image/qbitmap.h1
-rw-r--r--src/gui/image/qimage.cpp88
-rw-r--r--src/gui/image/qimage.h2
-rw-r--r--src/gui/image/qimage_conversions.cpp199
-rw-r--r--src/gui/image/qimage_sse2.cpp125
-rw-r--r--src/gui/image/qimagereader.cpp117
-rw-r--r--src/gui/image/qimagereader.h1
-rw-r--r--src/gui/image/qimagereaderwriterhelpers.cpp180
-rw-r--r--src/gui/image/qimagereaderwriterhelpers_p.h139
-rw-r--r--src/gui/image/qimagewriter.cpp121
-rw-r--r--src/gui/image/qimagewriter.h1
-rw-r--r--src/gui/image/qpixmap.cpp10
-rw-r--r--src/gui/image/qpixmap_blitter.cpp8
-rw-r--r--src/gui/image/qpixmap_raster.cpp11
-rw-r--r--src/gui/image/qpixmap_win.cpp422
-rw-r--r--src/gui/image/qpixmapcache.cpp25
-rw-r--r--src/gui/image/qxbmhandler.cpp2
-rw-r--r--src/gui/image/qxpmhandler.cpp4
-rw-r--r--src/gui/kernel/kernel.pri7
-rw-r--r--src/gui/kernel/qevent.cpp41
-rw-r--r--src/gui/kernel/qevent.h8
-rw-r--r--src/gui/kernel/qguiapplication.cpp101
-rw-r--r--src/gui/kernel/qguiapplication_p.h11
-rw-r--r--src/gui/kernel/qhighdpiscaling.cpp3
-rw-r--r--src/gui/kernel/qpalette.cpp43
-rw-r--r--src/gui/kernel/qpalette.h4
-rw-r--r--src/gui/kernel/qplatformdialoghelper.h1
-rw-r--r--src/gui/kernel/qplatformintegration.cpp4
-rw-r--r--src/gui/kernel/qplatformmenu.h1
-rw-r--r--src/gui/kernel/qplatformwindow.cpp82
-rw-r--r--src/gui/kernel/qplatformwindow.h5
-rw-r--r--src/gui/kernel/qplatformwindow_p.h2
-rw-r--r--src/gui/kernel/qshortcutmap.cpp13
-rw-r--r--src/gui/kernel/qsimpledrag.cpp132
-rw-r--r--src/gui/kernel/qsimpledrag_p.h32
-rw-r--r--src/gui/kernel/qsurface.cpp4
-rw-r--r--src/gui/kernel/qsurface.h3
-rw-r--r--src/gui/kernel/qtestsupport_gui.cpp83
-rw-r--r--src/gui/kernel/qtestsupport_gui.h56
-rw-r--r--src/gui/kernel/qwindow.cpp37
-rw-r--r--src/gui/kernel/qwindow_p.h4
-rw-r--r--src/gui/kernel/qwindowsysteminterface.cpp42
-rw-r--r--src/gui/kernel/qwindowsysteminterface.h18
-rw-r--r--src/gui/math3d/qvector2d.cpp67
-rw-r--r--src/gui/math3d/qvector2d.h74
-rw-r--r--src/gui/math3d/qvector3d.cpp97
-rw-r--r--src/gui/math3d/qvector3d.h94
-rw-r--r--src/gui/math3d/qvector4d.cpp124
-rw-r--r--src/gui/math3d/qvector4d.h112
-rw-r--r--src/gui/opengl/qopengl.h2
-rw-r--r--src/gui/opengl/qopenglengineshadermanager.cpp56
-rw-r--r--src/gui/opengl/qopenglengineshadermanager_p.h4
-rw-r--r--src/gui/opengl/qopenglengineshadersource_p.h159
-rw-r--r--src/gui/opengl/qopenglfunctions.cpp23
-rw-r--r--src/gui/opengl/qopenglfunctions.h3
-rw-r--r--src/gui/opengl/qopenglpaintengine.cpp69
-rw-r--r--src/gui/opengl/qopenglshaderprogram.cpp11
-rw-r--r--src/gui/painting/WEBGRADIENTS_LICENSE.txt21
-rw-r--r--src/gui/painting/painting.pri9
-rw-r--r--src/gui/painting/qblendfunctions.cpp16
-rw-r--r--src/gui/painting/qbrush.cpp88
-rw-r--r--src/gui/painting/qbrush.h176
-rw-r--r--src/gui/painting/qcolor.cpp5
-rw-r--r--src/gui/painting/qcompositionfunctions.cpp1094
-rw-r--r--src/gui/painting/qdrawhelper.cpp2469
-rw-r--r--src/gui/painting/qdrawhelper_avx2.cpp69
-rw-r--r--src/gui/painting/qdrawhelper_neon.cpp12
-rw-r--r--src/gui/painting/qdrawhelper_p.h48
-rw-r--r--src/gui/painting/qdrawhelper_sse4.cpp252
-rw-r--r--src/gui/painting/qdrawhelper_ssse3.cpp59
-rw-r--r--src/gui/painting/qdrawingprimitive_sse2_p.h69
-rw-r--r--src/gui/painting/qemulationpaintengine.cpp27
-rw-r--r--src/gui/painting/qpagedpaintdevice.cpp65
-rw-r--r--src/gui/painting/qpagedpaintdevice.h6
-rw-r--r--src/gui/painting/qpagedpaintdevice_p.h40
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp5
-rw-r--r--src/gui/painting/qpaintengineex.cpp2
-rw-r--r--src/gui/painting/qpainter.cpp66
-rw-r--r--src/gui/painting/qpainter.h18
-rw-r--r--src/gui/painting/qpdf.cpp3
-rw-r--r--src/gui/painting/qpdfwriter.cpp27
-rw-r--r--src/gui/painting/qrgba64.h4
-rw-r--r--src/gui/painting/qrgba64_p.h26
-rw-r--r--src/gui/painting/qt_attribution.json14
-rw-r--r--src/gui/painting/webgradients.binaryjsonbin0 -> 50792 bytes
-rw-r--r--src/gui/painting/webgradients.css909
-rw-r--r--src/gui/qtgui.tracepoints18
-rw-r--r--src/gui/text/qcssparser.cpp7
-rw-r--r--src/gui/text/qfontdatabase.cpp9
-rw-r--r--src/gui/text/qstatictext.cpp9
-rw-r--r--src/gui/text/qtextdocument.cpp43
-rw-r--r--src/gui/text/qtextdocument.h4
-rw-r--r--src/gui/text/qtextdocumentfragment.cpp36
-rw-r--r--src/gui/text/qtextdocumentfragment_p.h1
-rw-r--r--src/gui/text/qtextdocumentlayout.cpp42
-rw-r--r--src/gui/text/qtextengine.cpp89
-rw-r--r--src/gui/text/qtextengine_p.h8
-rw-r--r--src/gui/text/qtextformat.cpp57
-rw-r--r--src/gui/text/qtextformat.h14
-rw-r--r--src/gui/text/qtexthtmlparser.cpp7
-rw-r--r--src/gui/text/qtextlayout.cpp28
-rw-r--r--src/gui/text/qtextodfwriter.cpp261
-rw-r--r--src/gui/text/qtextodfwriter_p.h18
-rw-r--r--src/gui/text/qtextoption.cpp3
-rw-r--r--src/gui/util/qdesktopservices.cpp22
-rw-r--r--src/gui/util/qvalidator.cpp36
-rw-r--r--src/network/access/http2/http2protocol.cpp3
-rw-r--r--src/network/access/qhsts.cpp5
-rw-r--r--src/network/access/qhttp2protocolhandler.cpp15
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp2
-rw-r--r--src/network/access/qhttpnetworkheader.cpp6
-rw-r--r--src/network/access/qhttpnetworkreply.cpp5
-rw-r--r--src/network/access/qnetworkaccessftpbackend.cpp61
-rw-r--r--src/network/access/qnetworkaccessftpbackend_p.h5
-rw-r--r--src/network/access/qnetworkdiskcache.cpp6
-rw-r--r--src/network/access/qnetworkreplyhttpimpl.cpp4
-rw-r--r--src/network/access/qnetworkrequest.cpp134
-rw-r--r--src/network/access/qnetworkrequest.h6
-rw-r--r--src/network/configure.json22
-rw-r--r--src/network/configure.pri2
-rw-r--r--src/network/kernel/qauthenticator.cpp8
-rw-r--r--src/network/socket/qabstractsocket.cpp5
-rw-r--r--src/network/socket/qhttpsocketengine.cpp5
-rw-r--r--src/network/ssl/qasn1element_p.h54
-rw-r--r--src/network/ssl/qdtls.cpp568
-rw-r--r--src/network/ssl/qdtls.h187
-rw-r--r--src/network/ssl/qdtls_openssl.cpp1447
-rw-r--r--src/network/ssl/qdtls_openssl_p.h213
-rw-r--r--src/network/ssl/qdtls_p.h153
-rw-r--r--src/network/ssl/qpassworddigestor.cpp187
-rw-r--r--src/network/ssl/qpassworddigestor.h60
-rw-r--r--src/network/ssl/qssl.cpp4
-rw-r--r--src/network/ssl/qssl.h7
-rw-r--r--src/network/ssl/qsslcertificate.cpp12
-rw-r--r--src/network/ssl/qsslcertificate.h8
-rw-r--r--src/network/ssl/qsslcertificate_p.h4
-rw-r--r--src/network/ssl/qsslcertificate_qt.cpp4
-rw-r--r--src/network/ssl/qsslcertificateextension.h5
-rw-r--r--src/network/ssl/qsslconfiguration.cpp62
-rw-r--r--src/network/ssl/qsslconfiguration.h15
-rw-r--r--src/network/ssl/qsslconfiguration_p.h9
-rw-r--r--src/network/ssl/qsslcontext_openssl11.cpp81
-rw-r--r--src/network/ssl/qsslcontext_opensslpre11.cpp56
-rw-r--r--src/network/ssl/qsslkey_openssl.cpp4
-rw-r--r--src/network/ssl/qsslkey_p.cpp97
-rw-r--r--src/network/ssl/qsslkey_p.h11
-rw-r--r--src/network/ssl/qsslkey_qt.cpp410
-rw-r--r--src/network/ssl/qsslpresharedkeyauthenticator.h1
-rw-r--r--src/network/ssl/qsslsocket.cpp89
-rw-r--r--src/network/ssl/qsslsocket_mac.cpp65
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp239
-rw-r--r--src/network/ssl/qsslsocket_openssl11_symbols_p.h39
-rw-r--r--src/network/ssl/qsslsocket_openssl_p.h19
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols.cpp94
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols_p.h38
-rw-r--r--src/network/ssl/qsslsocket_opensslpre11_symbols_p.h15
-rw-r--r--src/network/ssl/qwindowscarootfetcher.cpp168
-rw-r--r--src/network/ssl/qwindowscarootfetcher_p.h79
-rw-r--r--src/network/ssl/ssl.pri66
-rw-r--r--src/opengl/qgl.cpp12
-rw-r--r--src/platformheaders/xcbfunctions/qxcbwindowfunctions.h21
-rw-r--r--src/platformheaders/xcbfunctions/qxcbwindowfunctions.qdoc75
-rw-r--r--src/platformheaders/xcbfunctions/xcbfunctions.pri1
-rw-r--r--src/platformsupport/clipboard/qmacmime.mm12
-rw-r--r--src/platformsupport/eventdispatchers/qwindowsguieventdispatcher.cpp24
-rw-r--r--src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm46
-rw-r--r--src/platformsupport/kmsconvenience/qkmsdevice.cpp159
-rw-r--r--src/platformsupport/kmsconvenience/qkmsdevice_p.h35
-rw-r--r--src/platformsupport/services/genericunix/qgenericunixservices.cpp41
-rw-r--r--src/platformsupport/vkconvenience/qbasicvulkanplatforminstance.cpp26
-rw-r--r--src/platformsupport/vkconvenience/qbasicvulkanplatforminstance_p.h6
-rw-r--r--src/plugins/bearer/corewlan/qcorewlanengine.mm38
-rw-r--r--src/plugins/imageformats/jpeg/qjpeghandler.cpp6
-rw-r--r--src/plugins/platforms/android/androidjniinput.cpp30
-rw-r--r--src/plugins/platforms/android/androidjniinput.h4
-rw-r--r--src/plugins/platforms/android/qandroidinputcontext.cpp368
-rw-r--r--src/plugins/platforms/android/qandroidinputcontext.h41
-rw-r--r--src/plugins/platforms/android/qandroidplatformmenubar.h2
-rw-r--r--src/plugins/platforms/cocoa/cocoa.pro16
-rw-r--r--src/plugins/platforms/cocoa/main.mm2
-rw-r--r--src/plugins/platforms/cocoa/messages.cpp18
-rw-r--r--src/plugins/platforms/cocoa/messages.h10
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibility.h5
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibility.mm8
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h9
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm86
-rw-r--r--src/plugins/platforms/cocoa/qcocoaapplication.h3
-rw-r--r--src/plugins/platforms/cocoa/qcocoaapplication.mm2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaapplicationdelegate.h26
-rw-r--r--src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm83
-rw-r--r--src/plugins/platforms/cocoa/qcocoabackingstore.mm6
-rw-r--r--src/plugins/platforms/cocoa/qcocoaclipboard.mm6
-rw-r--r--src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm31
-rw-r--r--src/plugins/platforms/cocoa/qcocoacursor.mm20
-rw-r--r--src/plugins/platforms/cocoa/qcocoadrag.mm12
-rw-r--r--src/plugins/platforms/cocoa/qcocoaeventdispatcher.h4
-rw-r--r--src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm71
-rw-r--r--src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm62
-rw-r--r--src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm62
-rw-r--r--src/plugins/platforms/cocoa/qcocoaglcontext.mm2
-rw-r--r--src/plugins/platforms/cocoa/qcocoahelpers.h37
-rw-r--r--src/plugins/platforms/cocoa/qcocoahelpers.mm119
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.h11
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.mm47
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintrospection.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoakeymapper.mm8
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenu.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenu.mm78
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenubar.h7
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenubar.mm130
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenuitem.h3
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenuitem.mm194
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenuloader.h36
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenuloader.mm164
-rw-r--r--src/plugins/platforms/cocoa/qcocoanativeinterface.mm38
-rw-r--r--src/plugins/platforms/cocoa/qcocoansmenu.h22
-rw-r--r--src/plugins/platforms/cocoa/qcocoansmenu.mm148
-rw-r--r--src/plugins/platforms/cocoa/qcocoaprintdevice.mm22
-rw-r--r--src/plugins/platforms/cocoa/qcocoascreen.h12
-rw-r--r--src/plugins/platforms/cocoa/qcocoascreen.mm222
-rw-r--r--src/plugins/platforms/cocoa/qcocoasystemsettings.mm66
-rw-r--r--src/plugins/platforms/cocoa/qcocoasystemtrayicon.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm90
-rw-r--r--src/plugins/platforms/cocoa/qcocoatheme.mm34
-rw-r--r--src/plugins/platforms/cocoa/qcocoavulkaninstance.h71
-rw-r--r--src/plugins/platforms/cocoa/qcocoavulkaninstance.mm95
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.h18
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm750
-rw-r--r--src/plugins/platforms/cocoa/qmacclipboard.h4
-rw-r--r--src/plugins/platforms/cocoa/qmacclipboard.mm14
-rw-r--r--src/plugins/platforms/cocoa/qmultitouch_mac.mm2
-rw-r--r--src/plugins/platforms/cocoa/qnsview.h100
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm1937
-rw-r--r--src/plugins/platforms/cocoa/qnsview_accessibility.mm (renamed from src/plugins/platforms/cocoa/qnsviewaccessibility.mm)43
-rw-r--r--src/plugins/platforms/cocoa/qnsview_complextext.mm315
-rw-r--r--src/plugins/platforms/cocoa/qnsview_dragging.mm300
-rw-r--r--src/plugins/platforms/cocoa/qnsview_drawing.mm195
-rw-r--r--src/plugins/platforms/cocoa/qnsview_gestures.mm169
-rw-r--r--src/plugins/platforms/cocoa/qnsview_keys.mm262
-rw-r--r--src/plugins/platforms/cocoa/qnsview_menus.mm133
-rw-r--r--src/plugins/platforms/cocoa/qnsview_mouse.mm607
-rw-r--r--src/plugins/platforms/cocoa/qnsview_tablet.mm223
-rw-r--r--src/plugins/platforms/cocoa/qnsview_touch.mm100
-rw-r--r--src/plugins/platforms/cocoa/qnswindow.h1
-rw-r--r--src/plugins/platforms/cocoa/qnswindow.mm15
-rw-r--r--src/plugins/platforms/cocoa/qnswindowdelegate.h14
-rw-r--r--src/plugins/platforms/cocoa/qnswindowdelegate.mm11
-rw-r--r--src/plugins/platforms/cocoa/qpaintengine_mac.mm56
-rw-r--r--src/plugins/platforms/cocoa/qpaintengine_mac_p.h8
-rw-r--r--src/plugins/platforms/cocoa/qprintengine_mac.mm10
-rw-r--r--src/plugins/platforms/cocoa/qprintengine_mac_p.h2
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dbackingstore.cpp6
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.cpp4
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.h4
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dcontext.h2
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.h2
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dhelpers.h10
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dintegration.cpp4
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dintegration.h2
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dnativeinterface.cpp2
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dpaintdevice.h4
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.cpp6
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.h2
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dplatformpixmap.cpp8
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dplatformpixmap.h2
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dplatformplugin.cpp2
-rw-r--r--src/plugins/platforms/eglfs/api/qeglfsintegration.cpp3
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp115
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp2
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp6
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.cpp5
-rw-r--r--src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosimagepickercontroller.h6
-rw-r--r--src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosimagepickercontroller.mm14
-rw-r--r--src/plugins/platforms/ios/qiosclipboard.mm24
-rw-r--r--src/plugins/platforms/ios/qioseventdispatcher.mm34
-rw-r--r--src/plugins/platforms/ios/qiosinputcontext.mm15
-rw-r--r--src/plugins/platforms/ios/qiosintegration.mm2
-rw-r--r--src/plugins/platforms/ios/qiosmenu.mm32
-rw-r--r--src/plugins/platforms/ios/qiosoptionalplugininterface.h4
-rw-r--r--src/plugins/platforms/ios/qiosscreen.mm28
-rw-r--r--src/plugins/platforms/ios/qiostextinputoverlay.mm85
-rw-r--r--src/plugins/platforms/ios/qiostextresponder.h10
-rw-r--r--src/plugins/platforms/ios/qiostextresponder.mm42
-rw-r--r--src/plugins/platforms/ios/qiosviewcontroller.h2
-rw-r--r--src/plugins/platforms/ios/qiosviewcontroller.mm36
-rw-r--r--src/plugins/platforms/ios/qioswindow.mm6
-rw-r--r--src/plugins/platforms/ios/quiaccessibilityelement.h7
-rw-r--r--src/plugins/platforms/ios/quiaccessibilityelement.mm13
-rw-r--r--src/plugins/platforms/ios/quiview.h15
-rw-r--r--src/plugins/platforms/ios/quiview.mm72
-rw-r--r--src/plugins/platforms/ios/quiview_accessibility.mm7
-rw-r--r--src/plugins/platforms/qnx/qqnxglcontext.cpp2
-rw-r--r--src/plugins/platforms/qnx/qqnxglobal.cpp6
-rw-r--r--src/plugins/platforms/qnx/qqnxintegration.cpp70
-rw-r--r--src/plugins/platforms/qnx/qqnxintegration.h22
-rw-r--r--src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp45
-rw-r--r--src/plugins/platforms/qnx/qqnxscreeneventhandler.h2
-rw-r--r--src/plugins/platforms/qnx/qqnxscreeneventthread.cpp156
-rw-r--r--src/plugins/platforms/qnx/qqnxscreeneventthread.h26
-rw-r--r--src/plugins/platforms/qnx/qqnxwindow.cpp23
-rw-r--r--src/plugins/platforms/vnc/qvnc.cpp6
-rw-r--r--src/plugins/platforms/windows/main.cpp2
-rw-r--r--src/plugins/platforms/windows/qtwindowsglobal.h25
-rw-r--r--src/plugins/platforms/windows/qwin10helpers.cpp4
-rw-r--r--src/plugins/platforms/windows/qwin10helpers.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsbackingstore.cpp6
-rw-r--r--src/plugins/platforms/windows/qwindowsbackingstore.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsclipboard.cpp20
-rw-r--r--src/plugins/platforms/windows/qwindowscombase.h2
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.cpp155
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.h29
-rw-r--r--src/plugins/platforms/windows/qwindowscursor.cpp14
-rw-r--r--src/plugins/platforms/windows/qwindowscursor.h4
-rw-r--r--src/plugins/platforms/windows/qwindowsdialoghelpers.cpp43
-rw-r--r--src/plugins/platforms/windows/qwindowsdialoghelpers.h4
-rw-r--r--src/plugins/platforms/windows/qwindowsdrag.cpp67
-rw-r--r--src/plugins/platforms/windows/qwindowsdrag.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsdropdataobject.cpp4
-rw-r--r--src/plugins/platforms/windows/qwindowseglcontext.cpp4
-rw-r--r--src/plugins/platforms/windows/qwindowsgdiintegration.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsgdinativeinterface.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.cpp8
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsinputcontext.cpp19
-rw-r--r--src/plugins/platforms/windows/qwindowsinputcontext.h4
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.cpp25
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.h7
-rw-r--r--src/plugins/platforms/windows/qwindowsinternalmimedata.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsinternalmimedata.h2
-rw-r--r--src/plugins/platforms/windows/qwindowskeymapper.cpp81
-rw-r--r--src/plugins/platforms/windows/qwindowskeymapper.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsmenu.h4
-rw-r--r--src/plugins/platforms/windows/qwindowsmime.cpp23
-rw-r--r--src/plugins/platforms/windows/qwindowsmime.h6
-rw-r--r--src/plugins/platforms/windows/qwindowsmousehandler.cpp166
-rw-r--r--src/plugins/platforms/windows/qwindowsmousehandler.h4
-rw-r--r--src/plugins/platforms/windows/qwindowsnativeinterface.cpp11
-rw-r--r--src/plugins/platforms/windows/qwindowsole.cpp16
-rw-r--r--src/plugins/platforms/windows/qwindowsole.h6
-rw-r--r--src/plugins/platforms/windows/qwindowsopenglcontext.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsopengltester.cpp18
-rw-r--r--src/plugins/platforms/windows/qwindowsopengltester.h4
-rw-r--r--src/plugins/platforms/windows/qwindowspointerhandler.cpp573
-rw-r--r--src/plugins/platforms/windows/qwindowspointerhandler.h82
-rw-r--r--src/plugins/platforms/windows/qwindowsscreen.cpp24
-rw-r--r--src/plugins/platforms/windows/qwindowsscreen.h8
-rw-r--r--src/plugins/platforms/windows/qwindowsservices.cpp6
-rw-r--r--src/plugins/platforms/windows/qwindowstabletsupport.cpp33
-rw-r--r--src/plugins/platforms/windows/qwindowstabletsupport.h35
-rw-r--r--src/plugins/platforms/windows/qwindowstheme.cpp28
-rw-r--r--src/plugins/platforms/windows/qwindowstheme.h4
-rw-r--r--src/plugins/platforms/windows/qwindowsthreadpoolrunner.h8
-rw-r--r--src/plugins/platforms/windows/qwindowsvulkaninstance.cpp29
-rw-r--r--src/plugins/platforms/windows/qwindowsvulkaninstance.h5
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp89
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.h14
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiaaccessibility.cpp17
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiaaccessibility.h8
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiabaseprovider.cpp12
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiabaseprovider.h12
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiagriditemprovider.cpp15
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiagriditemprovider.h16
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiagridprovider.cpp13
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiagridprovider.h12
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiainvokeprovider.cpp13
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiainvokeprovider.h8
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp17
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.h40
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiaprovidercache.cpp26
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiaprovidercache.h15
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiarangevalueprovider.cpp13
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiarangevalueprovider.h20
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionitemprovider.cpp13
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionitemprovider.h16
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionprovider.cpp15
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionprovider.h12
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiatableitemprovider.cpp13
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiatableitemprovider.h10
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiatableprovider.cpp13
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiatableprovider.h12
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiatextprovider.cpp13
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiatextprovider.h24
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiatextrangeprovider.cpp31
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiatextrangeprovider.h43
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiatoggleprovider.cpp13
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiatoggleprovider.h10
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiautils.cpp8
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiautils.h16
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiavalueprovider.cpp13
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiavalueprovider.h12
-rw-r--r--src/plugins/platforms/windows/windows.pri4
-rw-r--r--src/plugins/platforms/winrt/qwinrtcanvas.cpp146
-rw-r--r--src/plugins/platforms/winrt/qwinrtcanvas.h75
-rw-r--r--src/plugins/platforms/winrt/qwinrtintegration.cpp17
-rw-r--r--src/plugins/platforms/winrt/qwinrtintegration.h3
-rw-r--r--src/plugins/platforms/winrt/qwinrtscreen.cpp25
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiaaccessibility.cpp106
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiaaccessibility.h (renamed from src/platformheaders/xcbfunctions/qxcbintegrationfunctions.h)28
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiabaseprovider.cpp (renamed from src/gui/image/qimage_avx2.cpp)49
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiabaseprovider.h72
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiacontrolmetadata.cpp182
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiacontrolmetadata.h117
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiaemptypropertyvalue.h108
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiagriditemprovider.cpp160
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiagriditemprovider.h78
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiagridprovider.cpp135
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiagridprovider.h76
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiainvokeprovider.cpp88
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiainvokeprovider.h74
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiamainprovider.cpp779
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiamainprovider.h124
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiametadatacache.cpp112
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiametadatacache.h76
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiapeervector.cpp149
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiapeervector.h80
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiaprovidercache.cpp99
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiaprovidercache.h77
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiarangevalueprovider.cpp167
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiarangevalueprovider.h80
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiaselectionitemprovider.cpp214
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiaselectionitemprovider.h78
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiaselectionprovider.cpp158
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiaselectionprovider.h76
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiatableitemprovider.cpp141
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiatableitemprovider.h75
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiatableprovider.cpp167
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiatableprovider.h76
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiatextprovider.cpp232
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiatextprovider.h83
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiatextrangeprovider.cpp497
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiatextrangeprovider.h95
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiatoggleprovider.cpp104
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiatoggleprovider.h75
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiautils.cpp182
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiautils.h83
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiavalueprovider.cpp136
-rw-r--r--src/plugins/platforms/winrt/uiautomation/qwinrtuiavalueprovider.h77
-rw-r--r--src/plugins/platforms/winrt/uiautomation/uiautomation.pri45
-rw-r--r--src/plugins/platforms/winrt/winrt.pro4
-rw-r--r--src/plugins/platforms/xcb/README27
-rw-r--r--src/plugins/platforms/xcb/qxcbbackingstore.cpp205
-rw-r--r--src/plugins/platforms/xcb/qxcbbackingstore.h31
-rw-r--r--src/plugins/platforms/xcb/qxcbclipboard.cpp29
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp131
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h63
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_xi2.cpp596
-rw-r--r--src/plugins/platforms/xcb/qxcbcursor.cpp6
-rw-r--r--src/plugins/platforms/xcb/qxcbdrag.cpp320
-rw-r--r--src/plugins/platforms/xcb/qxcbdrag.h15
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp25
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.cpp24
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.cpp57
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.h7
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.cpp6
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.h3
-rw-r--r--src/plugins/platforms/xcb/qxcbsystemtraytracker.cpp41
-rw-r--r--src/plugins/platforms/xcb/qxcbsystemtraytracker.h4
-rw-r--r--src/plugins/platforms/xcb/qxcbvulkaninstance.cpp29
-rw-r--r--src/plugins/platforms/xcb/qxcbvulkaninstance.h3
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp259
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.h19
-rw-r--r--src/plugins/platforms/xcb/xcb-static/xcb-static.pro5
-rw-r--r--src/plugins/platforms/xcb/xcb_qpa_lib.pro8
-rw-r--r--src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp64
-rw-r--r--src/plugins/platformthemes/flatpak/qflatpakfiledialog_p.h2
-rw-r--r--src/plugins/platformthemes/flatpak/qflatpaktheme.cpp6
-rw-r--r--src/plugins/printsupport/cups/qcupsprintengine.cpp13
-rw-r--r--src/plugins/printsupport/cups/qcupsprintengine_p.h1
-rw-r--r--src/plugins/printsupport/cups/qcupsprintersupport.cpp72
-rw-r--r--src/plugins/printsupport/cups/qppdprintdevice.cpp80
-rw-r--r--src/plugins/printsupport/cups/qppdprintdevice.h2
-rw-r--r--src/plugins/sqldrivers/configure.json2
-rw-r--r--src/plugins/sqldrivers/configure.pri14
-rw-r--r--src/plugins/sqldrivers/mysql/qsql_mysql.cpp4
-rw-r--r--src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp33
-rw-r--r--src/plugins/styles/mac/qmacstyle_mac.mm16
-rw-r--r--src/plugins/styles/windowsvista/qwindowsvistastyle.cpp28
-rw-r--r--src/plugins/styles/windowsvista/qwindowsxpstyle.cpp16
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog_mac.mm11
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog_unix.cpp69
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog_unix_p.h11
-rw-r--r--src/printsupport/dialogs/qpagesetupwidget.ui3
-rw-r--r--src/printsupport/dialogs/qprintdialog_mac.mm19
-rw-r--r--src/printsupport/dialogs/qprintdialog_unix.cpp909
-rw-r--r--src/printsupport/dialogs/qprintpropertieswidget.ui106
-rw-r--r--src/printsupport/kernel/qcups.cpp20
-rw-r--r--src/printsupport/kernel/qcups_p.h5
-rw-r--r--src/printsupport/kernel/qplatformprintdevice.cpp21
-rw-r--r--src/printsupport/kernel/qplatformprintdevice.h3
-rw-r--r--src/printsupport/kernel/qprintengine_pdf.cpp10
-rw-r--r--src/printsupport/kernel/qprintengine_pdf_p.h1
-rw-r--r--src/printsupport/kernel/qprinter.cpp43
-rw-r--r--src/printsupport/kernel/qprinter_p.h4
-rw-r--r--src/sql/configure.json22
-rw-r--r--src/sql/kernel/qtsqlglobal.h1
-rw-r--r--src/sql/kernel/qtsqlglobal_p.h1
-rw-r--r--src/sql/models/qsqlquerymodel.h3
-rw-r--r--src/sql/models/qsqlquerymodel_p.h2
-rw-r--r--src/sql/models/qsqlrelationaldelegate.h25
-rw-r--r--src/sql/models/qsqlrelationaltablemodel.h2
-rw-r--r--src/sql/models/qsqltablemodel.h2
-rw-r--r--src/sql/models/qsqltablemodel_p.h2
-rw-r--r--src/sql/sql.pro2
-rw-r--r--src/testlib/doc/snippets/code/doc_src_qtestlib.cpp30
-rw-r--r--src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp20
-rw-r--r--src/testlib/doc/src/qttestlib-manual.qdoc12
-rw-r--r--src/testlib/qabstracttestlogger.cpp23
-rw-r--r--src/testlib/qabstracttestlogger_p.h8
-rw-r--r--src/testlib/qappletestlogger.cpp157
-rw-r--r--src/testlib/qappletestlogger_p.h95
-rw-r--r--src/testlib/qplaintestlogger.cpp18
-rw-r--r--src/testlib/qsignalspy.h8
-rw-r--r--src/testlib/qtaptestlogger.cpp254
-rw-r--r--src/testlib/qtaptestlogger_p.h85
-rw-r--r--src/testlib/qtest.h21
-rw-r--r--src/testlib/qtestcase.cpp46
-rw-r--r--src/testlib/qtestcase.h21
-rw-r--r--src/testlib/qtestcase.qdoc99
-rw-r--r--src/testlib/qtesteventloop.h5
-rw-r--r--src/testlib/qtestlog.cpp33
-rw-r--r--src/testlib/qtestlog_p.h6
-rw-r--r--src/testlib/qtestresult.cpp2
-rw-r--r--src/testlib/qtestsystem.h105
-rw-r--r--src/testlib/qxctestlogger.mm10
-rw-r--r--src/testlib/qxctestlogger_p.h2
-rw-r--r--src/testlib/testlib.pro9
-rw-r--r--src/tools/androiddeployqt/main.cpp3
-rw-r--r--src/tools/bootstrap/bootstrap.pro4
-rw-r--r--src/tools/rcc/rcc.cpp18
-rw-r--r--src/tools/rcc/rcc.h4
-rw-r--r--src/tools/tracegen/lttng.cpp4
-rw-r--r--src/tools/tracegen/provider.cpp39
-rw-r--r--src/tools/tracegen/provider.h2
-rw-r--r--src/widgets/accessible/complexwidgets.cpp11
-rw-r--r--src/widgets/accessible/itemviews.cpp10
-rw-r--r--src/widgets/accessible/qaccessiblemenu.cpp7
-rw-r--r--src/widgets/accessible/qaccessiblewidgets.cpp4
-rw-r--r--src/widgets/dialogs/qcolordialog.cpp2
-rw-r--r--src/widgets/dialogs/qcolordialog.h5
-rw-r--r--src/widgets/dialogs/qdialog.cpp20
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp12
-rw-r--r--src/widgets/dialogs/qfiledialog.h2
-rw-r--r--src/widgets/dialogs/qfiledialog_p.h14
-rw-r--r--src/widgets/dialogs/qfilesystemmodel_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsscene.cpp33
-rw-r--r--src/widgets/graphicsview/qgraphicssceneevent.cpp98
-rw-r--r--src/widgets/graphicsview/qgraphicssceneevent.h4
-rw-r--r--src/widgets/graphicsview/qgraphicsview.cpp16
-rw-r--r--src/widgets/itemviews/qheaderview.cpp5
-rw-r--r--src/widgets/itemviews/qitemdelegate.cpp68
-rw-r--r--src/widgets/itemviews/qlistview.cpp66
-rw-r--r--src/widgets/itemviews/qlistview.h4
-rw-r--r--src/widgets/itemviews/qlistview_p.h2
-rw-r--r--src/widgets/itemviews/qlistwidget.cpp9
-rw-r--r--src/widgets/itemviews/qtableview.cpp47
-rw-r--r--src/widgets/itemviews/qtablewidget.cpp36
-rw-r--r--src/widgets/itemviews/qtablewidget.h1
-rw-r--r--src/widgets/itemviews/qtablewidget_p.h5
-rw-r--r--src/widgets/itemviews/qtreeview.cpp48
-rw-r--r--src/widgets/itemviews/qtreeview_p.h2
-rw-r--r--src/widgets/itemviews/qtreewidget.cpp57
-rw-r--r--src/widgets/itemviews/qtreewidget.h11
-rw-r--r--src/widgets/itemviews/qtreewidget_p.h7
-rw-r--r--src/widgets/kernel/kernel.pri6
-rw-r--r--src/widgets/kernel/qapplication.cpp84
-rw-r--r--src/widgets/kernel/qapplication_p.h2
-rw-r--r--src/widgets/kernel/qgesture.cpp4
-rw-r--r--src/widgets/kernel/qlayout.cpp20
-rw-r--r--src/widgets/kernel/qlayout.h1
-rw-r--r--src/widgets/kernel/qmacgesturerecognizer_p.h18
-rw-r--r--src/widgets/kernel/qshortcut.cpp12
-rw-r--r--src/widgets/kernel/qtestsupport_widgets.cpp119
-rw-r--r--src/widgets/kernel/qtestsupport_widgets.h60
-rw-r--r--src/widgets/kernel/qtooltip.cpp40
-rw-r--r--src/widgets/kernel/qwhatsthis.cpp10
-rw-r--r--src/widgets/kernel/qwhatsthis.h4
-rw-r--r--src/widgets/kernel/qwidget.cpp122
-rw-r--r--src/widgets/kernel/qwidget.h1
-rw-r--r--src/widgets/kernel/qwidget_p.h4
-rw-r--r--src/widgets/kernel/qwidgetbackingstore.cpp85
-rw-r--r--src/widgets/kernel/qwidgetwindow.cpp112
-rw-r--r--src/widgets/kernel/qwidgetwindow_p.h3
-rw-r--r--src/widgets/qtwidgets.tracepoints4
-rw-r--r--src/widgets/styles/images/titlebar-contexthelp-16.pngbin0 -> 396 bytes
-rw-r--r--src/widgets/styles/images/titlebar-contexthelp-32.pngbin0 -> 661 bytes
-rw-r--r--src/widgets/styles/images/titlebar-contexthelp-48.pngbin0 -> 891 bytes
-rw-r--r--src/widgets/styles/images/titlebar-max-16.pngbin0 -> 158 bytes
-rw-r--r--src/widgets/styles/images/titlebar-max-32.pngbin0 -> 163 bytes
-rw-r--r--src/widgets/styles/images/titlebar-max-48.pngbin0 -> 167 bytes
-rw-r--r--src/widgets/styles/images/titlebar-min-16.pngbin0 -> 166 bytes
-rw-r--r--src/widgets/styles/images/titlebar-min-32.pngbin0 -> 171 bytes
-rw-r--r--src/widgets/styles/images/titlebar-min-48.pngbin0 -> 175 bytes
-rw-r--r--src/widgets/styles/images/titlebar-shade-16.pngbin0 -> 253 bytes
-rw-r--r--src/widgets/styles/images/titlebar-shade-32.pngbin0 -> 282 bytes
-rw-r--r--src/widgets/styles/images/titlebar-shade-48.pngbin0 -> 339 bytes
-rw-r--r--src/widgets/styles/images/titlebar-unshade-16.pngbin0 -> 244 bytes
-rw-r--r--src/widgets/styles/images/titlebar-unshade-32.pngbin0 -> 294 bytes
-rw-r--r--src/widgets/styles/images/titlebar-unshade-48.pngbin0 -> 336 bytes
-rw-r--r--src/widgets/styles/images/toolbar-ext-h-16.pngbin0 -> 349 bytes
-rw-r--r--src/widgets/styles/images/toolbar-ext-h-32.pngbin0 -> 568 bytes
-rw-r--r--src/widgets/styles/images/toolbar-ext-h-8.pngbin0 -> 220 bytes
-rw-r--r--src/widgets/styles/images/toolbar-ext-h-rtl-16.pngbin0 -> 128 bytes
-rw-r--r--src/widgets/styles/images/toolbar-ext-h-rtl-32.pngbin0 -> 148 bytes
-rw-r--r--src/widgets/styles/images/toolbar-ext-h-rtl-8.pngbin0 -> 114 bytes
-rw-r--r--src/widgets/styles/images/toolbar-ext-macstyle.png (renamed from src/widgets/styles/images/toolbar-ext.png)bin516 -> 516 bytes
-rw-r--r--src/widgets/styles/images/toolbar-ext-macstyle@2x.png (renamed from src/widgets/styles/images/toolbar-ext@2x.png)bin505 -> 505 bytes
-rw-r--r--src/widgets/styles/images/toolbar-ext-v-10.pngbin0 -> 387 bytes
-rw-r--r--src/widgets/styles/images/toolbar-ext-v-20.pngbin0 -> 625 bytes
-rw-r--r--src/widgets/styles/images/toolbar-ext-v-5.pngbin0 -> 223 bytes
-rw-r--r--src/widgets/styles/qcommonstyle.cpp140
-rw-r--r--src/widgets/styles/qstyle.cpp7
-rw-r--r--src/widgets/styles/qstyle.h1
-rw-r--r--src/widgets/styles/qstyle.qrc28
-rw-r--r--src/widgets/styles/qstyleoption.cpp8
-rw-r--r--src/widgets/styles/qstyleoption.h2
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp66
-rw-r--r--src/widgets/styles/qstylesheetstyle_p.h7
-rw-r--r--src/widgets/util/qcompleter.cpp4
-rw-r--r--src/widgets/util/qcompleter.h2
-rw-r--r--src/widgets/util/qscroller.cpp4
-rw-r--r--src/widgets/util/qsystemtrayicon.cpp2
-rw-r--r--src/widgets/util/qsystemtrayicon_x11.cpp70
-rw-r--r--src/widgets/util/qundostack.cpp55
-rw-r--r--src/widgets/util/qundostack.h5
-rw-r--r--src/widgets/widgets.pro3
-rw-r--r--src/widgets/widgets/qabstractspinbox.cpp61
-rw-r--r--src/widgets/widgets/qabstractspinbox.h7
-rw-r--r--src/widgets/widgets/qabstractspinbox_p.h4
-rw-r--r--src/widgets/widgets/qdockarealayout.cpp12
-rw-r--r--src/widgets/widgets/qlabel.cpp3
-rw-r--r--src/widgets/widgets/qlineedit.cpp22
-rw-r--r--src/widgets/widgets/qlineedit.h1
-rw-r--r--src/widgets/widgets/qlineedit_p.cpp11
-rw-r--r--src/widgets/widgets/qmainwindow.cpp4
-rw-r--r--src/widgets/widgets/qmainwindowlayout.cpp56
-rw-r--r--src/widgets/widgets/qmainwindowlayout_p.h12
-rw-r--r--src/widgets/widgets/qmdiarea.cpp4
-rw-r--r--src/widgets/widgets/qmenu.cpp2
-rw-r--r--src/widgets/widgets/qplaintextedit.cpp6
-rw-r--r--src/widgets/widgets/qspinbox.cpp116
-rw-r--r--src/widgets/widgets/qspinbox.h8
-rw-r--r--src/widgets/widgets/qsplashscreen.cpp6
-rw-r--r--src/widgets/widgets/qsplitter.cpp17
-rw-r--r--src/widgets/widgets/qtabbar.cpp2
-rw-r--r--src/widgets/widgets/qtabbar_p.h2
-rw-r--r--src/widgets/widgets/qtextbrowser.cpp7
-rw-r--r--src/widgets/widgets/qtextedit.cpp3
-rw-r--r--src/widgets/widgets/qtoolbarlayout_p.h2
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol.cpp10
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol_p.h1
-rw-r--r--src/winmain/qtmain_winrt.cpp73
861 files changed, 81856 insertions, 18273 deletions
diff --git a/src/3rdparty/double-conversion/bignum.cc b/src/3rdparty/double-conversion/bignum.cc
index 2743d67e8d..8892de8f2a 100644
--- a/src/3rdparty/double-conversion/bignum.cc
+++ b/src/3rdparty/double-conversion/bignum.cc
@@ -104,7 +104,7 @@ void Bignum::AssignDecimalString(Vector<const char> value) {
const int kMaxUint64DecimalDigits = 19;
Zero();
int length = value.length();
- int pos = 0;
+ unsigned int pos = 0;
// Let's just say that each digit needs 4 bits.
while (length >= kMaxUint64DecimalDigits) {
uint64_t digits = ReadUInt64(value, pos, kMaxUint64DecimalDigits);
diff --git a/src/3rdparty/double-conversion/bignum.h b/src/3rdparty/double-conversion/bignum.h
index 5ec3544f57..c385f2237b 100644
--- a/src/3rdparty/double-conversion/bignum.h
+++ b/src/3rdparty/double-conversion/bignum.h
@@ -49,7 +49,6 @@ class Bignum {
void AssignPowerUInt16(uint16_t base, int exponent);
- void AddUInt16(uint16_t operand);
void AddUInt64(uint64_t operand);
void AddBignum(const Bignum& other);
// Precondition: this >= other.
diff --git a/src/3rdparty/double-conversion/cached-powers.cc b/src/3rdparty/double-conversion/cached-powers.cc
index 9536f26927..2b43f06412 100644
--- a/src/3rdparty/double-conversion/cached-powers.cc
+++ b/src/3rdparty/double-conversion/cached-powers.cc
@@ -131,7 +131,6 @@ static const CachedPower kCachedPowers[] = {
{UINT64_2PART_C(0xaf87023b, 9bf0ee6b), 1066, 340},
};
-static const int kCachedPowersLength = ARRAY_SIZE(kCachedPowers);
static const int kCachedPowersOffset = 348; // -1 * the first decimal_exponent.
static const double kD_1_LOG2_10 = 0.30102999566398114; // 1 / lg(10)
// Difference between the decimal exponents in the table above.
@@ -144,14 +143,12 @@ void PowersOfTenCache::GetCachedPowerForBinaryExponentRange(
int max_exponent,
DiyFp* power,
int* decimal_exponent) {
- (void)max_exponent; // Silence unused parameter warning in release builds
- (void)kCachedPowersLength; // Silence unused parameter warning in release builds
int kQ = DiyFp::kSignificandSize;
double k = ceil((min_exponent + kQ - 1) * kD_1_LOG2_10);
int foo = kCachedPowersOffset;
int index =
(foo + static_cast<int>(k) - 1) / kDecimalExponentDistance + 1;
- ASSERT(0 <= index && index < kCachedPowersLength);
+ ASSERT(0 <= index && index < static_cast<int>(ARRAY_SIZE(kCachedPowers)));
CachedPower cached_power = kCachedPowers[index];
ASSERT(min_exponent <= cached_power.binary_exponent);
(void) max_exponent; // Mark variable as used.
diff --git a/src/3rdparty/double-conversion/diy-fp.h b/src/3rdparty/double-conversion/diy-fp.h
index 9dcf8fbdba..2edf34674e 100644
--- a/src/3rdparty/double-conversion/diy-fp.h
+++ b/src/3rdparty/double-conversion/diy-fp.h
@@ -42,7 +42,7 @@ class DiyFp {
static const int kSignificandSize = 64;
DiyFp() : f_(0), e_(0) {}
- DiyFp(uint64_t f, int e) : f_(f), e_(e) {}
+ DiyFp(uint64_t significand, int exponent) : f_(significand), e_(exponent) {}
// this = this - other.
// The exponents of both numbers must be the same and the significand of this
@@ -76,22 +76,22 @@ class DiyFp {
void Normalize() {
ASSERT(f_ != 0);
- uint64_t f = f_;
- int e = e_;
+ uint64_t significand = f_;
+ int exponent = e_;
// This method is mainly called for normalizing boundaries. In general
// boundaries need to be shifted by 10 bits. We thus optimize for this case.
const uint64_t k10MSBits = UINT64_2PART_C(0xFFC00000, 00000000);
- while ((f & k10MSBits) == 0) {
- f <<= 10;
- e -= 10;
+ while ((significand & k10MSBits) == 0) {
+ significand <<= 10;
+ exponent -= 10;
}
- while ((f & kUint64MSB) == 0) {
- f <<= 1;
- e--;
+ while ((significand & kUint64MSB) == 0) {
+ significand <<= 1;
+ exponent--;
}
- f_ = f;
- e_ = e;
+ f_ = significand;
+ e_ = exponent;
}
static DiyFp Normalize(const DiyFp& a) {
diff --git a/src/3rdparty/double-conversion/double-conversion.cc b/src/3rdparty/double-conversion/double-conversion.cc
index 909985be82..6f21a0124c 100644
--- a/src/3rdparty/double-conversion/double-conversion.cc
+++ b/src/3rdparty/double-conversion/double-conversion.cc
@@ -118,7 +118,7 @@ void DoubleToStringConverter::CreateDecimalRepresentation(
StringBuilder* result_builder) const {
// Create a representation that is padded with zeros if needed.
if (decimal_point <= 0) {
- // "0.00000decimal_rep".
+ // "0.00000decimal_rep" or "0.000decimal_rep00".
result_builder->AddCharacter('0');
if (digits_after_point > 0) {
result_builder->AddCharacter('.');
@@ -129,7 +129,7 @@ void DoubleToStringConverter::CreateDecimalRepresentation(
result_builder->AddPadding('0', remaining_digits);
}
} else if (decimal_point >= length) {
- // "decimal_rep0000.00000" or "decimal_rep.0000"
+ // "decimal_rep0000.00000" or "decimal_rep.0000".
result_builder->AddSubstring(decimal_digits, length);
result_builder->AddPadding('0', decimal_point - length);
if (digits_after_point > 0) {
@@ -137,7 +137,7 @@ void DoubleToStringConverter::CreateDecimalRepresentation(
result_builder->AddPadding('0', digits_after_point);
}
} else {
- // "decima.l_rep000"
+ // "decima.l_rep000".
ASSERT(digits_after_point > 0);
result_builder->AddSubstring(decimal_digits, decimal_point);
result_builder->AddCharacter('.');
@@ -494,10 +494,17 @@ static double SignedZero(bool sign) {
// because it constant-propagated the radix and concluded that the last
// condition was always true. By moving it into a separate function the
// compiler wouldn't warn anymore.
+#if _MSC_VER
+#pragma optimize("",off)
static bool IsDecimalDigitForRadix(int c, int radix) {
return '0' <= c && c <= '9' && (c - '0') < radix;
}
-
+#pragma optimize("",on)
+#else
+static bool inline IsDecimalDigitForRadix(int c, int radix) {
+ return '0' <= c && c <= '9' && (c - '0') < radix;
+}
+#endif
// Returns true if 'c' is a character digit that is valid for the given radix.
// The 'a_character' should be 'a' or 'A'.
//
@@ -852,9 +859,9 @@ double StringToDoubleConverter::StringToIeee(
return junk_string_value_;
}
}
- char sign = '+';
+ char exponen_sign = '+';
if (*current == '+' || *current == '-') {
- sign = static_cast<char>(*current);
+ exponen_sign = static_cast<char>(*current);
++current;
if (current == end) {
if (allow_trailing_junk) {
@@ -888,7 +895,7 @@ double StringToDoubleConverter::StringToIeee(
++current;
} while (current != end && *current >= '0' && *current <= '9');
- exponent += (sign == '-' ? -num : num);
+ exponent += (exponen_sign == '-' ? -num : num);
}
if (!(allow_trailing_spaces || allow_trailing_junk) && (current != end)) {
diff --git a/src/3rdparty/double-conversion/fixed-dtoa.cc b/src/3rdparty/double-conversion/fixed-dtoa.cc
index aef65fdc21..0f55a0b6eb 100644
--- a/src/3rdparty/double-conversion/fixed-dtoa.cc
+++ b/src/3rdparty/double-conversion/fixed-dtoa.cc
@@ -98,7 +98,7 @@ class UInt128 {
return high_bits_ == 0 && low_bits_ == 0;
}
- int BitAt(int position) {
+ int BitAt(int position) const {
if (position >= 64) {
return static_cast<int>(high_bits_ >> (position - 64)) & 1;
} else {
@@ -259,7 +259,8 @@ static void FillFractionals(uint64_t fractionals, int exponent,
fractionals -= static_cast<uint64_t>(digit) << point;
}
// If the first bit after the point is set we have to round up.
- if (((fractionals >> (point - 1)) & 1) == 1) {
+ ASSERT(fractionals == 0 || point - 1 >= 0);
+ if ((fractionals != 0) && ((fractionals >> (point - 1)) & 1) == 1) {
RoundUp(buffer, length, decimal_point);
}
} else { // We need 128 bits.
diff --git a/src/3rdparty/double-conversion/ieee.h b/src/3rdparty/double-conversion/ieee.h
index 661141d1a8..b14cf4f717 100644
--- a/src/3rdparty/double-conversion/ieee.h
+++ b/src/3rdparty/double-conversion/ieee.h
@@ -99,7 +99,7 @@ class Double {
}
double PreviousDouble() const {
- if (d64_ == (kInfinity | kSignMask)) return -Double::Infinity();
+ if (d64_ == (kInfinity | kSignMask)) return -Infinity();
if (Sign() < 0) {
return Double(d64_ + 1).value();
} else {
diff --git a/src/3rdparty/double-conversion/include/double-conversion/utils.h b/src/3rdparty/double-conversion/include/double-conversion/utils.h
index 20bfd36c84..ca7646d817 100644
--- a/src/3rdparty/double-conversion/include/double-conversion/utils.h
+++ b/src/3rdparty/double-conversion/include/double-conversion/utils.h
@@ -33,19 +33,29 @@
#include <assert.h>
#ifndef ASSERT
-# if defined(WINCE) || defined(_WIN32_WCE)
-# define ASSERT(condition)
-# else
-# define ASSERT(condition) \
+#define ASSERT(condition) \
assert(condition);
-# endif
#endif
#ifndef UNIMPLEMENTED
-# define UNIMPLEMENTED() (exit(-1))
+#define UNIMPLEMENTED() (abort())
+#endif
+#ifndef DOUBLE_CONVERSION_NO_RETURN
+#ifdef _MSC_VER
+#define DOUBLE_CONVERSION_NO_RETURN __declspec(noreturn)
+#else
+#define DOUBLE_CONVERSION_NO_RETURN __attribute__((noreturn))
+#endif
#endif
#ifndef UNREACHABLE
-# define UNREACHABLE() (exit(-1))
+#ifdef _MSC_VER
+void DOUBLE_CONVERSION_NO_RETURN abort_noreturn();
+inline void abort_noreturn() { abort(); }
+#define UNREACHABLE() (abort_noreturn())
+#else
+#define UNREACHABLE() (abort())
#endif
+#endif
+
// Double operations detection based on target architecture.
// Linux uses a 80bit wide floating point stack on x86. This induces double
@@ -62,11 +72,15 @@
defined(__hppa__) || defined(__ia64__) || \
defined(__mips__) || \
defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
+ defined(_POWER) || defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \
defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
defined(__SH4__) || defined(__alpha__) || \
defined(_MIPS_ARCH_MIPS32R2) || \
- defined(__AARCH64EL__)
+ defined(__AARCH64EL__) || defined(__aarch64__) || \
+ defined(__riscv)
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+#elif defined(__mc68000__)
+#undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS
#elif defined(_M_IX86) || defined(__i386__) || defined(__i386)
#if defined(_WIN32)
// Windows uses a 64bit wide floating point stack.
@@ -172,8 +186,8 @@ template <typename T>
class Vector {
public:
Vector() : start_(NULL), length_(0) {}
- Vector(T* data, int length) : start_(data), length_(length) {
- ASSERT(length == 0 || (length > 0 && data != NULL));
+ Vector(T* data, int len) : start_(data), length_(len) {
+ ASSERT(len == 0 || (len > 0 && data != NULL));
}
// Returns a vector using the same backing storage as this one,
@@ -215,8 +229,8 @@ class Vector {
// buffer bounds on all operations in debug mode.
class StringBuilder {
public:
- StringBuilder(char* buffer, int size)
- : buffer_(buffer, size), position_(0) { }
+ StringBuilder(char* buffer, int buffer_size)
+ : buffer_(buffer, buffer_size), position_(0) { }
~StringBuilder() { if (!is_finalized()) Finalize(); }
diff --git a/src/3rdparty/double-conversion/qt_attribution.json b/src/3rdparty/double-conversion/qt_attribution.json
index 92118ac779..d41a7ef332 100644
--- a/src/3rdparty/double-conversion/qt_attribution.json
+++ b/src/3rdparty/double-conversion/qt_attribution.json
@@ -5,8 +5,8 @@
"QtUsage": "Used in Qt Core. Configure with -system-doubleconversion or -no-doubleconversion to avoid.",
"Homepage": "https://github.com/google/double-conversion",
- "Version": "2.0.1",
- "DownloadLocation": "https://github.com/google/double-conversion/commit/2fb03de56faa32bbba5e02222528e7b760f71d77",
+ "Version": "3.0.0",
+ "DownloadLocation": "https://github.com/google/double-conversion/commit/ca220cbafa83ca706f028bfbb5adc7eb2f1f90e1",
"License": "BSD 3-clause \"New\" or \"Revised\" License",
"LicenseId": "BSD-3-Clause",
"LicenseFile": "LICENSE",
diff --git a/src/3rdparty/double-conversion/strtod.cc b/src/3rdparty/double-conversion/strtod.cc
index 34717562bd..17abcbb2a5 100644
--- a/src/3rdparty/double-conversion/strtod.cc
+++ b/src/3rdparty/double-conversion/strtod.cc
@@ -286,7 +286,7 @@ static bool DiyFpStrtod(Vector<const char> buffer,
const int kDenominator = 1 << kDenominatorLog;
// Move the remaining decimals into the exponent.
exponent += remaining_decimals;
- int error = (remaining_decimals == 0 ? 0 : kDenominator / 2);
+ uint64_t error = (remaining_decimals == 0 ? 0 : kDenominator / 2);
int old_e = input.e();
input.Normalize();
diff --git a/src/3rdparty/gradle/gradle/wrapper/gradle-wrapper.jar b/src/3rdparty/gradle/gradle/wrapper/gradle-wrapper.jar
index 2b338a935b..f6b961fd5a 100644
--- a/src/3rdparty/gradle/gradle/wrapper/gradle-wrapper.jar
+++ b/src/3rdparty/gradle/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/src/3rdparty/gradle/gradle/wrapper/gradle-wrapper.properties b/src/3rdparty/gradle/gradle/wrapper/gradle-wrapper.properties
index 4244097b7b..bf3de21830 100644
--- a/src/3rdparty/gradle/gradle/wrapper/gradle-wrapper.properties
+++ b/src/3rdparty/gradle/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,5 @@
-#Mon Feb 20 10:43:22 EST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-3.4-bin.zip
diff --git a/src/3rdparty/gradle/gradlew b/src/3rdparty/gradle/gradlew
index eeff5ccf0e..cccdd3d517 100755
--- a/src/3rdparty/gradle/gradlew
+++ b/src/3rdparty/gradle/gradlew
@@ -28,16 +28,16 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS="-Xmx1024m -Dfile.encoding=UTF-8"
+DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
-warn ( ) {
+warn () {
echo "$*"
}
-die ( ) {
+die () {
echo
echo "$*"
echo
@@ -155,7 +155,7 @@ if $cygwin ; then
fi
# Escape application args
-save ( ) {
+save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
diff --git a/src/3rdparty/gradle/gradlew.bat b/src/3rdparty/gradle/gradlew.bat
index 65b35a4602..f9553162f1 100644
--- a/src/3rdparty/gradle/gradlew.bat
+++ b/src/3rdparty/gradle/gradlew.bat
@@ -14,7 +14,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=-Xmx1024m -Dfile.encoding=UTF-8
+set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
diff --git a/src/3rdparty/libjpeg.pri b/src/3rdparty/libjpeg.pri
index a61f28dc5a..0d35bf8941 100644
--- a/src/3rdparty/libjpeg.pri
+++ b/src/3rdparty/libjpeg.pri
@@ -7,10 +7,8 @@ DEFINES += \
JPEG_LIB_VERSION=80 \
SIZEOF_SIZE_T=__SIZEOF_SIZE_T__
-#Disable warnings in 3rdparty code due to unused arguments
-contains(QMAKE_CC, gcc): {
- QMAKE_CFLAGS_WARN_ON += -Wno-unused-parameter -Wno-main
-}
+# Disable warnings in 3rdparty code due to unused arguments
+gcc: QMAKE_CFLAGS_WARN_ON += -Wno-unused-parameter -Wno-main
INCLUDEPATH += $$PWD/libjpeg/src
diff --git a/src/3rdparty/tinycbor/.gitignore b/src/3rdparty/tinycbor/.gitignore
new file mode 100644
index 0000000000..3272de3326
--- /dev/null
+++ b/src/3rdparty/tinycbor/.gitignore
@@ -0,0 +1,81 @@
+# Frequent generated files
+callgrind.out.*
+pcviewer.cfg
+*~
+*.a
+*.la
+*.core
+*.d
+*.dylib
+*.moc
+*.o
+*.obj
+*.orig
+*.swp
+*.rej
+*.so
+*.so.*
+*.pbxuser
+*.mode1
+*.mode1v3
+*_pch.h.cpp
+*_resource.rc
+.#*
+*.*#
+core
+.qmake.cache
+.qmake.stash
+.qmake.vars
+.device.vars
+tags
+.DS_Store
+*.debug
+Makefile*
+*.prl
+*.app
+*.pro.user*
+*.qmlproject.user*
+*.gcov
+*.gcda
+*.gcno
+*.flc
+.*.swp
+tinycbor.pc
+
+# Visual Studio generated files
+*.ib_pdb_index
+*.idb
+*.ilk
+*.pdb
+*.sln
+*.suo
+*.vcproj
+*vcproj.*.*.user
+*.ncb
+*.vcxproj
+*.vcxproj.filters
+*.vcxproj.user
+*.exe.embed.manifest
+*.exe_manifest.rc
+*.exe_manifest.res
+
+# MinGW generated files
+*.Debug
+*.Release
+
+# INTEGRITY generated files
+*.gpj
+*.int
+*.ael
+*.dla
+*.dnm
+*.dep
+*.map
+
+bin
+doc
+lib
+src/cjson
+src/doxygen.log
+!/Makefile
+.config
diff --git a/src/3rdparty/tinycbor/LICENSE b/src/3rdparty/tinycbor/LICENSE
new file mode 100644
index 0000000000..4aad977ceb
--- /dev/null
+++ b/src/3rdparty/tinycbor/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 Intel Corporation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/src/3rdparty/tinycbor/README b/src/3rdparty/tinycbor/README
new file mode 100644
index 0000000000..167efa06e2
--- /dev/null
+++ b/src/3rdparty/tinycbor/README
@@ -0,0 +1,13 @@
+Concise Binary Object Representation (CBOR) Library
+---------------------------------------------------
+
+To build TinyCBOR:
+
+ make
+
+If you want to change the compiler or pass extra compiler flags:
+
+ make CC=clang CFLAGS="-m32 -Oz" LDFLAGS="-m32"
+
+Documentation: https://intel.github.io/tinycbor/current/
+
diff --git a/src/3rdparty/tinycbor/VERSION b/src/3rdparty/tinycbor/VERSION
new file mode 100644
index 0000000000..a918a2aa18
--- /dev/null
+++ b/src/3rdparty/tinycbor/VERSION
@@ -0,0 +1 @@
+0.6.0
diff --git a/src/3rdparty/tinycbor/qt_attribution.json b/src/3rdparty/tinycbor/qt_attribution.json
new file mode 100644
index 0000000000..1d61534861
--- /dev/null
+++ b/src/3rdparty/tinycbor/qt_attribution.json
@@ -0,0 +1,14 @@
+{
+ "Id": "tinycbor",
+ "Name": "TinyCBOR",
+ "QDocModule": "qtcore",
+ "QtUsage": "Used for QCborStreamReader and QCborStreamWriter.",
+
+ "Description": "Concise Binary Object Representation (CBOR) Library",
+ "Homepage": "https://github.com/intel/tinycbor",
+ "License": "MIT License",
+ "LicenseId": "MIT",
+ "LicenseFile": "LICENSE",
+ "Version": "0.6+patches",
+ "Copyright": "Copyright (C) 2018 Intel Corporation"
+}
diff --git a/src/3rdparty/tinycbor/src/cbor.h b/src/3rdparty/tinycbor/src/cbor.h
new file mode 100644
index 0000000000..d7dee0f55b
--- /dev/null
+++ b/src/3rdparty/tinycbor/src/cbor.h
@@ -0,0 +1,707 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Intel Corporation
+**
+** Permission is hereby granted, free of charge, to any person obtaining a copy
+** of this software and associated documentation files (the "Software"), to deal
+** in the Software without restriction, including without limitation the rights
+** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+** copies of the Software, and to permit persons to whom the Software is
+** furnished to do so, subject to the following conditions:
+**
+** The above copyright notice and this permission notice shall be included in
+** all copies or substantial portions of the Software.
+**
+** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+** THE SOFTWARE.
+**
+****************************************************************************/
+
+#ifndef CBOR_H
+#define CBOR_H
+
+#ifndef assert
+#include <assert.h>
+#endif
+#include <limits.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "tinycbor-version.h"
+
+#define TINYCBOR_VERSION ((TINYCBOR_VERSION_MAJOR << 16) | (TINYCBOR_VERSION_MINOR << 8) | TINYCBOR_VERSION_PATCH)
+
+#ifdef __cplusplus
+extern "C" {
+#else
+#include <stdbool.h>
+#endif
+
+#ifndef SIZE_MAX
+/* Some systems fail to define SIZE_MAX in <stdint.h>, even though C99 requires it...
+ * Conversion from signed to unsigned is defined in 6.3.1.3 (Signed and unsigned integers) p2,
+ * which says: "the value is converted by repeatedly adding or subtracting one more than the
+ * maximum value that can be represented in the new type until the value is in the range of the
+ * new type."
+ * So -1 gets converted to size_t by adding SIZE_MAX + 1, which results in SIZE_MAX.
+ */
+# define SIZE_MAX ((size_t)-1)
+#endif
+
+#ifndef CBOR_API
+# define CBOR_API
+#endif
+#ifndef CBOR_PRIVATE_API
+# define CBOR_PRIVATE_API
+#endif
+#ifndef CBOR_INLINE_API
+# if defined(__cplusplus)
+# define CBOR_INLINE inline
+# define CBOR_INLINE_API inline
+# else
+# define CBOR_INLINE_API static CBOR_INLINE
+# if defined(_MSC_VER)
+# define CBOR_INLINE __inline
+# elif defined(__GNUC__)
+# define CBOR_INLINE __inline__
+# elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+# define CBOR_INLINE inline
+# else
+# define CBOR_INLINE
+# endif
+# endif
+#endif
+
+typedef enum CborType {
+ CborIntegerType = 0x00,
+ CborByteStringType = 0x40,
+ CborTextStringType = 0x60,
+ CborArrayType = 0x80,
+ CborMapType = 0xa0,
+ CborTagType = 0xc0,
+ CborSimpleType = 0xe0,
+ CborBooleanType = 0xf5,
+ CborNullType = 0xf6,
+ CborUndefinedType = 0xf7,
+ CborHalfFloatType = 0xf9,
+ CborFloatType = 0xfa,
+ CborDoubleType = 0xfb,
+
+ CborInvalidType = 0xff /* equivalent to the break byte, so it will never be used */
+} CborType;
+
+typedef uint64_t CborTag;
+typedef enum CborKnownTags {
+ CborDateTimeStringTag = 0,
+ CborUnixTime_tTag = 1,
+ CborPositiveBignumTag = 2,
+ CborNegativeBignumTag = 3,
+ CborDecimalTag = 4,
+ CborBigfloatTag = 5,
+ CborCOSE_Encrypt0Tag = 16,
+ CborCOSE_Mac0Tag = 17,
+ CborCOSE_Sign1Tag = 18,
+ CborExpectedBase64urlTag = 21,
+ CborExpectedBase64Tag = 22,
+ CborExpectedBase16Tag = 23,
+ CborEncodedCborTag = 24,
+ CborUrlTag = 32,
+ CborBase64urlTag = 33,
+ CborBase64Tag = 34,
+ CborRegularExpressionTag = 35,
+ CborMimeMessageTag = 36,
+ CborCOSE_EncryptTag = 96,
+ CborCOSE_MacTag = 97,
+ CborCOSE_SignTag = 98,
+ CborSignatureTag = 55799
+} CborKnownTags;
+
+/* #define the constants so we can check with #ifdef */
+#define CborDateTimeStringTag CborDateTimeStringTag
+#define CborUnixTime_tTag CborUnixTime_tTag
+#define CborPositiveBignumTag CborPositiveBignumTag
+#define CborNegativeBignumTag CborNegativeBignumTag
+#define CborDecimalTag CborDecimalTag
+#define CborBigfloatTag CborBigfloatTag
+#define CborCOSE_Encrypt0Tag CborCOSE_Encrypt0Tag
+#define CborCOSE_Mac0Tag CborCOSE_Mac0Tag
+#define CborCOSE_Sign1Tag CborCOSE_Sign1Tag
+#define CborExpectedBase64urlTag CborExpectedBase64urlTag
+#define CborExpectedBase64Tag CborExpectedBase64Tag
+#define CborExpectedBase16Tag CborExpectedBase16Tag
+#define CborEncodedCborTag CborEncodedCborTag
+#define CborUrlTag CborUrlTag
+#define CborBase64urlTag CborBase64urlTag
+#define CborBase64Tag CborBase64Tag
+#define CborRegularExpressionTag CborRegularExpressionTag
+#define CborMimeMessageTag CborMimeMessageTag
+#define CborCOSE_EncryptTag CborCOSE_EncryptTag
+#define CborCOSE_MacTag CborCOSE_MacTag
+#define CborCOSE_SignTag CborCOSE_SignTag
+#define CborSignatureTag CborSignatureTag
+
+/* Error API */
+
+typedef enum CborError {
+ CborNoError = 0,
+
+ /* errors in all modes */
+ CborUnknownError,
+ CborErrorUnknownLength, /* request for length in array, map, or string with indeterminate length */
+ CborErrorAdvancePastEOF,
+ CborErrorIO,
+
+ /* parser errors streaming errors */
+ CborErrorGarbageAtEnd = 256,
+ CborErrorUnexpectedEOF,
+ CborErrorUnexpectedBreak,
+ CborErrorUnknownType, /* can only happen in major type 7 */
+ CborErrorIllegalType, /* type not allowed here */
+ CborErrorIllegalNumber,
+ CborErrorIllegalSimpleType, /* types of value less than 32 encoded in two bytes */
+ CborErrorNoMoreStringChunks,
+
+ /* parser errors in strict mode parsing only */
+ CborErrorUnknownSimpleType = 512,
+ CborErrorUnknownTag,
+ CborErrorInappropriateTagForType,
+ CborErrorDuplicateObjectKeys,
+ CborErrorInvalidUtf8TextString,
+ CborErrorExcludedType,
+ CborErrorExcludedValue,
+ CborErrorImproperValue,
+ CborErrorOverlongEncoding,
+ CborErrorMapKeyNotString,
+ CborErrorMapNotSorted,
+ CborErrorMapKeysNotUnique,
+
+ /* encoder errors */
+ CborErrorTooManyItems = 768,
+ CborErrorTooFewItems,
+
+ /* internal implementation errors */
+ CborErrorDataTooLarge = 1024,
+ CborErrorNestingTooDeep,
+ CborErrorUnsupportedType,
+ CborErrorUnimplementedValidation,
+
+ /* errors in converting to JSON */
+ CborErrorJsonObjectKeyIsAggregate = 1280,
+ CborErrorJsonObjectKeyNotString,
+ CborErrorJsonNotImplemented,
+
+ CborErrorOutOfMemory = (int) (~0U / 2 + 1),
+ CborErrorInternalError = (int) (~0U / 2) /* INT_MAX on two's complement machines */
+} CborError;
+
+CBOR_API const char *cbor_error_string(CborError error);
+
+/* Encoder API */
+
+typedef enum CborEncoderAppendType
+{
+ CborEncoderAppendCborData = 0,
+ CborEncoderAppendStringData = 1
+} CborEncoderAppendType;
+
+typedef CborError (*CborEncoderWriteFunction)(void *, const void *, size_t, CborEncoderAppendType);
+
+enum CborEncoderFlags
+{
+ CborIteratorFlag_WriterFunction = 0x01,
+ CborIteratorFlag_ContainerIsMap_ = 0x20
+};
+
+struct CborEncoder
+{
+ union {
+ uint8_t *ptr;
+ ptrdiff_t bytes_needed;
+ CborEncoderWriteFunction writer;
+ } data;
+ uint8_t *end;
+ size_t remaining;
+ int flags;
+};
+typedef struct CborEncoder CborEncoder;
+
+static const size_t CborIndefiniteLength = SIZE_MAX;
+
+CBOR_API void cbor_encoder_init(CborEncoder *encoder, uint8_t *buffer, size_t size, int flags);
+CBOR_API void cbor_encoder_init_writer(CborEncoder *encoder, CborEncoderWriteFunction writer, void *);
+CBOR_API CborError cbor_encode_uint(CborEncoder *encoder, uint64_t value);
+CBOR_API CborError cbor_encode_int(CborEncoder *encoder, int64_t value);
+CBOR_API CborError cbor_encode_negative_int(CborEncoder *encoder, uint64_t absolute_value);
+CBOR_API CborError cbor_encode_simple_value(CborEncoder *encoder, uint8_t value);
+CBOR_API CborError cbor_encode_tag(CborEncoder *encoder, CborTag tag);
+CBOR_API CborError cbor_encode_text_string(CborEncoder *encoder, const char *string, size_t length);
+CBOR_INLINE_API CborError cbor_encode_text_stringz(CborEncoder *encoder, const char *string)
+{ return cbor_encode_text_string(encoder, string, strlen(string)); }
+CBOR_API CborError cbor_encode_byte_string(CborEncoder *encoder, const uint8_t *string, size_t length);
+CBOR_API CborError cbor_encode_floating_point(CborEncoder *encoder, CborType fpType, const void *value);
+
+CBOR_INLINE_API CborError cbor_encode_boolean(CborEncoder *encoder, bool value)
+{ return cbor_encode_simple_value(encoder, (int)value - 1 + (CborBooleanType & 0x1f)); }
+CBOR_INLINE_API CborError cbor_encode_null(CborEncoder *encoder)
+{ return cbor_encode_simple_value(encoder, CborNullType & 0x1f); }
+CBOR_INLINE_API CborError cbor_encode_undefined(CborEncoder *encoder)
+{ return cbor_encode_simple_value(encoder, CborUndefinedType & 0x1f); }
+
+CBOR_INLINE_API CborError cbor_encode_half_float(CborEncoder *encoder, const void *value)
+{ return cbor_encode_floating_point(encoder, CborHalfFloatType, value); }
+CBOR_INLINE_API CborError cbor_encode_float(CborEncoder *encoder, float value)
+{ return cbor_encode_floating_point(encoder, CborFloatType, &value); }
+CBOR_INLINE_API CborError cbor_encode_double(CborEncoder *encoder, double value)
+{ return cbor_encode_floating_point(encoder, CborDoubleType, &value); }
+
+CBOR_API CborError cbor_encoder_create_array(CborEncoder *encoder, CborEncoder *arrayEncoder, size_t length);
+CBOR_API CborError cbor_encoder_create_map(CborEncoder *encoder, CborEncoder *mapEncoder, size_t length);
+CBOR_API CborError cbor_encoder_close_container(CborEncoder *encoder, const CborEncoder *containerEncoder);
+CBOR_API CborError cbor_encoder_close_container_checked(CborEncoder *encoder, const CborEncoder *containerEncoder);
+
+CBOR_INLINE_API uint8_t *_cbor_encoder_get_buffer_pointer(const CborEncoder *encoder)
+{
+ return encoder->data.ptr;
+}
+
+CBOR_INLINE_API size_t cbor_encoder_get_buffer_size(const CborEncoder *encoder, const uint8_t *buffer)
+{
+ return (size_t)(encoder->data.ptr - buffer);
+}
+
+CBOR_INLINE_API size_t cbor_encoder_get_extra_bytes_needed(const CborEncoder *encoder)
+{
+ return encoder->end ? 0 : (size_t)encoder->data.bytes_needed;
+}
+
+/* Parser API */
+
+enum CborParserGlobalFlags
+{
+ CborParserFlag_ExternalSource = 0x01
+};
+
+enum CborParserIteratorFlags
+{
+ /* used for all types, but not during string chunk iteration
+ * (values are static-asserted, don't change) */
+ CborIteratorFlag_IntegerValueIs64Bit = 0x01,
+ CborIteratorFlag_IntegerValueTooLarge = 0x02,
+
+ /* used only for CborIntegerType */
+ CborIteratorFlag_NegativeInteger = 0x04,
+
+ /* used only during string iteration */
+ CborIteratorFlag_BeforeFirstStringChunk = 0x04,
+ CborIteratorFlag_IteratingStringChunks = 0x08,
+
+ /* used for arrays, maps and strings, including during chunk iteration */
+ CborIteratorFlag_UnknownLength = 0x10,
+
+ /* used for maps, but must be kept for all types
+ * (ContainerIsMap value must be CborMapType - CborArrayType) */
+ CborIteratorFlag_ContainerIsMap = 0x20,
+ CborIteratorFlag_NextIsMapKey = 0x40
+};
+
+struct CborValue;
+struct CborParserOperations
+{
+ bool (*can_read_bytes)(void *token, size_t len);
+ void *(*read_bytes)(void *token, void *dst, size_t offset, size_t len);
+ void (*advance_bytes)(void *token, size_t len);
+ CborError (*transfer_string)(void *token, const void **userptr, size_t offset, size_t len);
+};
+
+struct CborParser
+{
+ union {
+ const uint8_t *end;
+ const struct CborParserOperations *ops;
+ } source;
+ enum CborParserGlobalFlags flags;
+};
+typedef struct CborParser CborParser;
+
+struct CborValue
+{
+ const CborParser *parser;
+ union {
+ const uint8_t *ptr;
+ void *token;
+ } source;
+ uint32_t remaining;
+ uint16_t extra;
+ uint8_t type;
+ uint8_t flags;
+};
+typedef struct CborValue CborValue;
+
+CBOR_API CborError cbor_parser_init(const uint8_t *buffer, size_t size, int flags, CborParser *parser, CborValue *it);
+CBOR_API CborError cbor_parser_init_reader(const struct CborParserOperations *ops, CborParser *parser, CborValue *it, void *token);
+
+CBOR_API CborError cbor_value_validate_basic(const CborValue *it);
+
+CBOR_INLINE_API bool cbor_value_at_end(const CborValue *it)
+{ return it->remaining == 0; }
+CBOR_INLINE_API const uint8_t *cbor_value_get_next_byte(const CborValue *it)
+{ return it->source.ptr; }
+CBOR_API CborError cbor_value_reparse(CborValue *it);
+CBOR_API CborError cbor_value_advance_fixed(CborValue *it);
+CBOR_API CborError cbor_value_advance(CborValue *it);
+CBOR_INLINE_API bool cbor_value_is_container(const CborValue *it)
+{ return it->type == CborArrayType || it->type == CborMapType; }
+CBOR_API CborError cbor_value_enter_container(const CborValue *it, CborValue *recursed);
+CBOR_API CborError cbor_value_leave_container(CborValue *it, const CborValue *recursed);
+
+CBOR_PRIVATE_API uint64_t _cbor_value_decode_int64_internal(const CborValue *value);
+CBOR_INLINE_API uint64_t _cbor_value_extract_int64_helper(const CborValue *value)
+{
+ return value->flags & CborIteratorFlag_IntegerValueTooLarge ?
+ _cbor_value_decode_int64_internal(value) : value->extra;
+}
+
+CBOR_INLINE_API bool cbor_value_is_valid(const CborValue *value)
+{ return value && value->type != CborInvalidType; }
+CBOR_INLINE_API CborType cbor_value_get_type(const CborValue *value)
+{ return (CborType)value->type; }
+
+/* Null & undefined type */
+CBOR_INLINE_API bool cbor_value_is_null(const CborValue *value)
+{ return value->type == CborNullType; }
+CBOR_INLINE_API bool cbor_value_is_undefined(const CborValue *value)
+{ return value->type == CborUndefinedType; }
+
+/* Booleans */
+CBOR_INLINE_API bool cbor_value_is_boolean(const CborValue *value)
+{ return value->type == CborBooleanType; }
+CBOR_INLINE_API CborError cbor_value_get_boolean(const CborValue *value, bool *result)
+{
+ assert(cbor_value_is_boolean(value));
+ *result = !!value->extra;
+ return CborNoError;
+}
+
+/* Simple types */
+CBOR_INLINE_API bool cbor_value_is_simple_type(const CborValue *value)
+{ return value->type == CborSimpleType; }
+CBOR_INLINE_API CborError cbor_value_get_simple_type(const CborValue *value, uint8_t *result)
+{
+ assert(cbor_value_is_simple_type(value));
+ *result = (uint8_t)value->extra;
+ return CborNoError;
+}
+
+/* Integers */
+CBOR_INLINE_API bool cbor_value_is_integer(const CborValue *value)
+{ return value->type == CborIntegerType; }
+CBOR_INLINE_API bool cbor_value_is_unsigned_integer(const CborValue *value)
+{ return cbor_value_is_integer(value) && (value->flags & CborIteratorFlag_NegativeInteger) == 0; }
+CBOR_INLINE_API bool cbor_value_is_negative_integer(const CborValue *value)
+{ return cbor_value_is_integer(value) && (value->flags & CborIteratorFlag_NegativeInteger); }
+
+CBOR_INLINE_API CborError cbor_value_get_raw_integer(const CborValue *value, uint64_t *result)
+{
+ assert(cbor_value_is_integer(value));
+ *result = _cbor_value_extract_int64_helper(value);
+ return CborNoError;
+}
+
+CBOR_INLINE_API CborError cbor_value_get_uint64(const CborValue *value, uint64_t *result)
+{
+ assert(cbor_value_is_unsigned_integer(value));
+ *result = _cbor_value_extract_int64_helper(value);
+ return CborNoError;
+}
+
+CBOR_INLINE_API CborError cbor_value_get_int64(const CborValue *value, int64_t *result)
+{
+ assert(cbor_value_is_integer(value));
+ *result = (int64_t) _cbor_value_extract_int64_helper(value);
+ if (value->flags & CborIteratorFlag_NegativeInteger)
+ *result = -*result - 1;
+ return CborNoError;
+}
+
+CBOR_INLINE_API CborError cbor_value_get_int(const CborValue *value, int *result)
+{
+ assert(cbor_value_is_integer(value));
+ *result = (int) _cbor_value_extract_int64_helper(value);
+ if (value->flags & CborIteratorFlag_NegativeInteger)
+ *result = -*result - 1;
+ return CborNoError;
+}
+
+CBOR_API CborError cbor_value_get_int64_checked(const CborValue *value, int64_t *result);
+CBOR_API CborError cbor_value_get_int_checked(const CborValue *value, int *result);
+
+CBOR_INLINE_API bool cbor_value_is_length_known(const CborValue *value)
+{ return (value->flags & CborIteratorFlag_UnknownLength) == 0; }
+
+/* Tags */
+CBOR_INLINE_API bool cbor_value_is_tag(const CborValue *value)
+{ return value->type == CborTagType; }
+CBOR_INLINE_API CborError cbor_value_get_tag(const CborValue *value, CborTag *result)
+{
+ assert(cbor_value_is_tag(value));
+ *result = _cbor_value_extract_int64_helper(value);
+ return CborNoError;
+}
+CBOR_API CborError cbor_value_skip_tag(CborValue *it);
+
+/* Strings */
+CBOR_INLINE_API bool cbor_value_is_byte_string(const CborValue *value)
+{ return value->type == CborByteStringType; }
+CBOR_INLINE_API bool cbor_value_is_text_string(const CborValue *value)
+{ return value->type == CborTextStringType; }
+
+CBOR_INLINE_API CborError cbor_value_get_string_length(const CborValue *value, size_t *length)
+{
+ assert(cbor_value_is_byte_string(value) || cbor_value_is_text_string(value));
+ if (!cbor_value_is_length_known(value))
+ return CborErrorUnknownLength;
+ uint64_t v = _cbor_value_extract_int64_helper(value);
+ *length = (size_t)v;
+ if (*length != v)
+ return CborErrorDataTooLarge;
+ return CborNoError;
+}
+
+CBOR_PRIVATE_API CborError _cbor_value_copy_string(const CborValue *value, void *buffer,
+ size_t *buflen, CborValue *next);
+CBOR_PRIVATE_API CborError _cbor_value_dup_string(const CborValue *value, void **buffer,
+ size_t *buflen, CborValue *next);
+
+CBOR_API CborError cbor_value_calculate_string_length(const CborValue *value, size_t *length);
+
+CBOR_INLINE_API CborError cbor_value_copy_text_string(const CborValue *value, char *buffer,
+ size_t *buflen, CborValue *next)
+{
+ assert(cbor_value_is_text_string(value));
+ return _cbor_value_copy_string(value, buffer, buflen, next);
+}
+CBOR_INLINE_API CborError cbor_value_copy_byte_string(const CborValue *value, uint8_t *buffer,
+ size_t *buflen, CborValue *next)
+{
+ assert(cbor_value_is_byte_string(value));
+ return _cbor_value_copy_string(value, buffer, buflen, next);
+}
+
+CBOR_INLINE_API CborError cbor_value_dup_text_string(const CborValue *value, char **buffer,
+ size_t *buflen, CborValue *next)
+{
+ assert(cbor_value_is_text_string(value));
+ return _cbor_value_dup_string(value, (void **)buffer, buflen, next);
+}
+CBOR_INLINE_API CborError cbor_value_dup_byte_string(const CborValue *value, uint8_t **buffer,
+ size_t *buflen, CborValue *next)
+{
+ assert(cbor_value_is_byte_string(value));
+ return _cbor_value_dup_string(value, (void **)buffer, buflen, next);
+}
+
+CBOR_PRIVATE_API CborError _cbor_value_get_string_chunk_size(const CborValue *value, size_t *len);
+CBOR_INLINE_API CborError cbor_value_get_string_chunk_size(const CborValue *value, size_t *len)
+{
+ assert(value->flags & CborIteratorFlag_IteratingStringChunks);
+ return _cbor_value_get_string_chunk_size(value, len);
+}
+
+CBOR_INLINE_API bool cbor_value_string_iteration_at_end(const CborValue *value)
+{
+ size_t dummy;
+ return cbor_value_get_string_chunk_size(value, &dummy) == CborErrorNoMoreStringChunks;
+}
+
+CBOR_PRIVATE_API CborError _cbor_value_begin_string_iteration(CborValue *value);
+CBOR_INLINE_API CborError cbor_value_begin_string_iteration(CborValue *value)
+{
+ assert(cbor_value_is_text_string(value) || cbor_value_is_byte_string(value));
+ assert(!(value->flags & CborIteratorFlag_IteratingStringChunks));
+ return _cbor_value_begin_string_iteration(value);
+}
+
+CBOR_PRIVATE_API CborError _cbor_value_finish_string_iteration(CborValue *value);
+CBOR_INLINE_API CborError cbor_value_finish_string_iteration(CborValue *value)
+{
+ assert(cbor_value_string_iteration_at_end(value));
+ return _cbor_value_finish_string_iteration(value);
+}
+
+CBOR_PRIVATE_API CborError _cbor_value_get_string_chunk(const CborValue *value, const void **bufferptr,
+ size_t *len, CborValue *next);
+CBOR_INLINE_API CborError cbor_value_get_text_string_chunk(const CborValue *value, const char **bufferptr,
+ size_t *len, CborValue *next)
+{
+ assert(cbor_value_is_text_string(value));
+ return _cbor_value_get_string_chunk(value, (const void **)bufferptr, len, next);
+}
+CBOR_INLINE_API CborError cbor_value_get_byte_string_chunk(const CborValue *value, const uint8_t **bufferptr,
+ size_t *len, CborValue *next)
+{
+ assert(cbor_value_is_byte_string(value));
+ return _cbor_value_get_string_chunk(value, (const void **)bufferptr, len, next);
+}
+
+CBOR_API CborError cbor_value_text_string_equals(const CborValue *value, const char *string, bool *result);
+
+/* Maps and arrays */
+CBOR_INLINE_API bool cbor_value_is_array(const CborValue *value)
+{ return value->type == CborArrayType; }
+CBOR_INLINE_API bool cbor_value_is_map(const CborValue *value)
+{ return value->type == CborMapType; }
+
+CBOR_INLINE_API CborError cbor_value_get_array_length(const CborValue *value, size_t *length)
+{
+ assert(cbor_value_is_array(value));
+ if (!cbor_value_is_length_known(value))
+ return CborErrorUnknownLength;
+ uint64_t v = _cbor_value_extract_int64_helper(value);
+ *length = (size_t)v;
+ if (*length != v)
+ return CborErrorDataTooLarge;
+ return CborNoError;
+}
+
+CBOR_INLINE_API CborError cbor_value_get_map_length(const CborValue *value, size_t *length)
+{
+ assert(cbor_value_is_map(value));
+ if (!cbor_value_is_length_known(value))
+ return CborErrorUnknownLength;
+ uint64_t v = _cbor_value_extract_int64_helper(value);
+ *length = (size_t)v;
+ if (*length != v)
+ return CborErrorDataTooLarge;
+ return CborNoError;
+}
+
+CBOR_API CborError cbor_value_map_find_value(const CborValue *map, const char *string, CborValue *element);
+
+/* Floating point */
+CBOR_INLINE_API bool cbor_value_is_half_float(const CborValue *value)
+{ return value->type == CborHalfFloatType; }
+CBOR_INLINE_API CborError cbor_value_get_half_float(const CborValue *value, void *result)
+{
+ assert(cbor_value_is_half_float(value));
+ assert((value->flags & CborIteratorFlag_IntegerValueTooLarge) == 0);
+
+ /* size has been computed already */
+ memcpy(result, &value->extra, sizeof(value->extra));
+ return CborNoError;
+}
+
+CBOR_INLINE_API bool cbor_value_is_float(const CborValue *value)
+{ return value->type == CborFloatType; }
+CBOR_INLINE_API CborError cbor_value_get_float(const CborValue *value, float *result)
+{
+ assert(cbor_value_is_float(value));
+ assert(value->flags & CborIteratorFlag_IntegerValueTooLarge);
+ uint32_t data = (uint32_t)_cbor_value_decode_int64_internal(value);
+ memcpy(result, &data, sizeof(*result));
+ return CborNoError;
+}
+
+CBOR_INLINE_API bool cbor_value_is_double(const CborValue *value)
+{ return value->type == CborDoubleType; }
+CBOR_INLINE_API CborError cbor_value_get_double(const CborValue *value, double *result)
+{
+ assert(cbor_value_is_double(value));
+ assert(value->flags & CborIteratorFlag_IntegerValueTooLarge);
+ uint64_t data = _cbor_value_decode_int64_internal(value);
+ memcpy(result, &data, sizeof(*result));
+ return CborNoError;
+}
+
+/* Validation API */
+
+enum CborValidationFlags {
+ /* Bit mapping:
+ * bits 0-7 (8 bits): canonical format
+ * bits 8-11 (4 bits): canonical format & strict mode
+ * bits 12-20 (8 bits): strict mode
+ * bits 21-31 (10 bits): other
+ */
+
+ CborValidateShortestIntegrals = 0x0001,
+ CborValidateShortestFloatingPoint = 0x0002,
+ CborValidateShortestNumbers = CborValidateShortestIntegrals | CborValidateShortestFloatingPoint,
+ CborValidateNoIndeterminateLength = 0x0100,
+ CborValidateMapIsSorted = 0x0200 | CborValidateNoIndeterminateLength,
+
+ CborValidateCanonicalFormat = 0x0fff,
+
+ CborValidateMapKeysAreUnique = 0x1000 | CborValidateMapIsSorted,
+ CborValidateTagUse = 0x2000,
+ CborValidateUtf8 = 0x4000,
+
+ CborValidateStrictMode = 0xfff00,
+
+ CborValidateMapKeysAreString = 0x100000,
+ CborValidateNoUndefined = 0x200000,
+ CborValidateNoTags = 0x400000,
+ CborValidateFiniteFloatingPoint = 0x800000,
+ /* unused = 0x1000000, */
+ /* unused = 0x2000000, */
+
+ CborValidateNoUnknownSimpleTypesSA = 0x4000000,
+ CborValidateNoUnknownSimpleTypes = 0x8000000 | CborValidateNoUnknownSimpleTypesSA,
+ CborValidateNoUnknownTagsSA = 0x10000000,
+ CborValidateNoUnknownTagsSR = 0x20000000 | CborValidateNoUnknownTagsSA,
+ CborValidateNoUnknownTags = 0x40000000 | CborValidateNoUnknownTagsSR,
+
+ CborValidateCompleteData = (int)0x80000000,
+
+ CborValidateStrictest = (int)~0U,
+ CborValidateBasic = 0
+};
+
+CBOR_API CborError cbor_value_validate(const CborValue *it, int flags);
+
+/* Human-readable (dump) API */
+
+enum CborPrettyFlags {
+ CborPrettyNumericEncodingIndicators = 0x01,
+ CborPrettyTextualEncodingIndicators = 0,
+
+ CborPrettyIndicateIndeterminateLength = 0x02,
+ CborPrettyIndicateIndetermineLength = CborPrettyIndicateIndeterminateLength, /* deprecated */
+ CborPrettyIndicateOverlongNumbers = 0x04,
+
+ CborPrettyShowStringFragments = 0x100,
+ CborPrettyMergeStringFragments = 0,
+
+ CborPrettyDefaultFlags = CborPrettyIndicateIndeterminateLength
+};
+
+typedef CborError (*CborStreamFunction)(void *token, const char *fmt, ...)
+#ifdef __GNUC__
+ __attribute__((__format__(printf, 2, 3)))
+#endif
+;
+
+CBOR_API CborError cbor_value_to_pretty_stream(CborStreamFunction streamFunction, void *token, CborValue *value, int flags);
+
+/* The following API requires a hosted C implementation (uses FILE*) */
+#if !defined(__STDC_HOSTED__) || __STDC_HOSTED__-0 == 1
+CBOR_API CborError cbor_value_to_pretty_advance_flags(FILE *out, CborValue *value, int flags);
+CBOR_API CborError cbor_value_to_pretty_advance(FILE *out, CborValue *value);
+CBOR_INLINE_API CborError cbor_value_to_pretty(FILE *out, const CborValue *value)
+{
+ CborValue copy = *value;
+ return cbor_value_to_pretty_advance_flags(out, &copy, CborPrettyDefaultFlags);
+}
+#endif /* __STDC_HOSTED__ check */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CBOR_H */
+
diff --git a/src/3rdparty/tinycbor/src/cborencoder.c b/src/3rdparty/tinycbor/src/cborencoder.c
new file mode 100644
index 0000000000..423591ff65
--- /dev/null
+++ b/src/3rdparty/tinycbor/src/cborencoder.c
@@ -0,0 +1,676 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Intel Corporation
+**
+** Permission is hereby granted, free of charge, to any person obtaining a copy
+** of this software and associated documentation files (the "Software"), to deal
+** in the Software without restriction, including without limitation the rights
+** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+** copies of the Software, and to permit persons to whom the Software is
+** furnished to do so, subject to the following conditions:
+**
+** The above copyright notice and this permission notice shall be included in
+** all copies or substantial portions of the Software.
+**
+** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+** THE SOFTWARE.
+**
+****************************************************************************/
+
+#ifndef _BSD_SOURCE
+#define _BSD_SOURCE 1
+#endif
+#ifndef _DEFAULT_SOURCE
+#define _DEFAULT_SOURCE 1
+#endif
+#ifndef __STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS 1
+#endif
+
+#include "cbor.h"
+#include "cborinternal_p.h"
+#include "compilersupport_p.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+/**
+ * \defgroup CborEncoding Encoding to CBOR
+ * \brief Group of functions used to encode data to CBOR.
+ *
+ * CborEncoder is used to encode data into a CBOR stream. The outermost
+ * CborEncoder is initialized by calling cbor_encoder_init(), with the buffer
+ * where the CBOR stream will be stored. The outermost CborEncoder is usually
+ * used to encode exactly one item, most often an array or map. It is possible
+ * to encode more than one item, but care must then be taken on the decoder
+ * side to ensure the state is reset after each item was decoded.
+ *
+ * Nested CborEncoder objects are created using cbor_encoder_create_array() and
+ * cbor_encoder_create_map(), later closed with cbor_encoder_close_container()
+ * or cbor_encoder_close_container_checked(). The pairs of creation and closing
+ * must be exactly matched and their parameters are always the same.
+ *
+ * CborEncoder writes directly to the user-supplied buffer, without extra
+ * buffering. CborEncoder does not allocate memory and CborEncoder objects are
+ * usually created on the stack of the encoding functions.
+ *
+ * The example below initializes a CborEncoder object with a buffer and encodes
+ * a single integer.
+ *
+ * \code
+ * uint8_t buf[16];
+ * CborEncoder encoder;
+ * cbor_encoder_init(&encoder, &buf, sizeof(buf), 0);
+ * cbor_encode_int(&encoder, some_value);
+ * \endcode
+ *
+ * As explained before, usually the outermost CborEncoder object is used to add
+ * one array or map, which in turn contains multiple elements. The example
+ * below creates a CBOR map with one element: a key "foo" and a boolean value.
+ *
+ * \code
+ * uint8_t buf[16];
+ * CborEncoder encoder, mapEncoder;
+ * cbor_encoder_init(&encoder, &buf, sizeof(buf), 0);
+ * cbor_encoder_create_map(&encoder, &mapEncoder, 1);
+ * cbor_encode_text_stringz(&mapEncoder, "foo");
+ * cbor_encode_boolean(&mapEncoder, some_value);
+ * cbor_encoder_close_container(&encoder, &mapEncoder);
+ * \endcode
+ *
+ * <h3 class="groupheader">Error checking and buffer size</h3>
+ *
+ * All functions operating on CborEncoder return a condition of type CborError.
+ * If the encoding was successful, they return CborNoError. Some functions do
+ * extra checking on the input provided and may return some other error
+ * conditions (for example, cbor_encode_simple_value() checks that the type is
+ * of the correct type).
+ *
+ * In addition, all functions check whether the buffer has enough bytes to
+ * encode the item being appended. If that is not possible, they return
+ * CborErrorOutOfMemory.
+ *
+ * It is possible to continue with the encoding of data past the first function
+ * that returns CborErrorOutOfMemory. CborEncoder functions will not overrun
+ * the buffer, but will instead count how many more bytes are needed to
+ * complete the encoding. At the end, you can obtain that count by calling
+ * cbor_encoder_get_extra_bytes_needed().
+ *
+ * \section1 Finalizing the encoding
+ *
+ * Once all items have been appended and the containers have all been properly
+ * closed, the user-supplied buffer will contain the CBOR stream and may be
+ * immediately used. To obtain the size of the buffer, call
+ * cbor_encoder_get_buffer_size() with the original buffer pointer.
+ *
+ * The example below illustrates how one can encode an item with error checking
+ * and then pass on the buffer for network sending.
+ *
+ * \code
+ * uint8_t buf[16];
+ * CborError err;
+ * CborEncoder encoder, mapEncoder;
+ * cbor_encoder_init(&encoder, &buf, sizeof(buf), 0);
+ * err = cbor_encoder_create_map(&encoder, &mapEncoder, 1);
+ * if (!err)
+ * return err;
+ * err = cbor_encode_text_stringz(&mapEncoder, "foo");
+ * if (!err)
+ * return err;
+ * err = cbor_encode_boolean(&mapEncoder, some_value);
+ * if (!err)
+ * return err;
+ * err = cbor_encoder_close_container_checked(&encoder, &mapEncoder);
+ * if (!err)
+ * return err;
+ *
+ * size_t len = cbor_encoder_get_buffer_size(&encoder, buf);
+ * send_payload(buf, len);
+ * return CborNoError;
+ * \endcode
+ *
+ * Finally, the example below expands on the one above and also
+ * deals with dynamically growing the buffer if the initial allocation wasn't
+ * big enough. Note the two places where the error checking was replaced with
+ * an cbor_assertion, showing where the author assumes no error can occur.
+ *
+ * \code
+ * uint8_t *encode_string_array(const char **strings, int n, size_t *bufsize)
+ * {
+ * CborError err;
+ * CborEncoder encoder, arrayEncoder;
+ * size_t size = 256;
+ * uint8_t *buf = NULL;
+ *
+ * while (1) {
+ * int i;
+ * size_t more_bytes;
+ * uint8_t *nbuf = realloc(buf, size);
+ * if (nbuf == NULL)
+ * goto error;
+ * buf = nbuf;
+ *
+ * cbor_encoder_init(&encoder, &buf, size, 0);
+ * err = cbor_encoder_create_array(&encoder, &arrayEncoder, n);
+ * cbor_assert(err); // can't fail, the buffer is always big enough
+ *
+ * for (i = 0; i < n; ++i) {
+ * err = cbor_encode_text_stringz(&arrayEncoder, strings[i]);
+ * if (err && err != CborErrorOutOfMemory)
+ * goto error;
+ * }
+ *
+ * err = cbor_encoder_close_container_checked(&encoder, &arrayEncoder);
+ * cbor_assert(err); // shouldn't fail!
+ *
+ * more_bytes = cbor_encoder_get_extra_bytes_needed(encoder);
+ * if (more_size) {
+ * // buffer wasn't big enough, try again
+ * size += more_bytes;
+ * continue;
+ * }
+ *
+ * *bufsize = cbor_encoder_get_buffer_size(encoder, buf);
+ * return buf;
+ * }
+ * error:
+ * free(buf);
+ * return NULL;
+ * }
+ * \endcode
+ */
+
+/**
+ * \addtogroup CborEncoding
+ * @{
+ */
+
+/**
+ * \struct CborEncoder
+ * Structure used to encode to CBOR.
+ */
+
+/**
+ * Initializes a CborEncoder structure \a encoder by pointing it to buffer \a
+ * buffer of size \a size. The \a flags field is currently unused and must be
+ * zero.
+ */
+void cbor_encoder_init(CborEncoder *encoder, uint8_t *buffer, size_t size, int flags)
+{
+ encoder->data.ptr = buffer;
+ encoder->end = buffer + size;
+ encoder->remaining = 2;
+ encoder->flags = flags;
+}
+
+void cbor_encoder_init_writer(CborEncoder *encoder, CborEncoderWriteFunction writer, void *token)
+{
+#ifdef CBOR_ENCODER_WRITE_FUNCTION
+ (void) writer;
+#else
+ encoder->data.writer = writer;
+#endif
+ encoder->end = (uint8_t *)token;
+ encoder->remaining = 2;
+ encoder->flags = CborIteratorFlag_WriterFunction;
+}
+
+static inline void put16(void *where, uint16_t v)
+{
+ v = cbor_htons(v);
+ memcpy(where, &v, sizeof(v));
+}
+
+/* Note: Since this is currently only used in situations where OOM is the only
+ * valid error, we KNOW this to be true. Thus, this function now returns just 'true',
+ * but if in the future, any function starts returning a non-OOM error, this will need
+ * to be changed to the test. At the moment, this is done to prevent more branches
+ * being created in the tinycbor output */
+static inline bool isOomError(CborError err)
+{
+ if (CBOR_ENCODER_WRITER_CONTROL < 0)
+ return true;
+
+ /* CborErrorOutOfMemory is the only negative error code, intentionally
+ * so we can write the test like this */
+ return (int)err < 0;
+}
+
+static inline void put32(void *where, uint32_t v)
+{
+ v = cbor_htonl(v);
+ memcpy(where, &v, sizeof(v));
+}
+
+static inline void put64(void *where, uint64_t v)
+{
+ v = cbor_htonll(v);
+ memcpy(where, &v, sizeof(v));
+}
+
+static inline bool would_overflow(CborEncoder *encoder, size_t len)
+{
+ ptrdiff_t remaining = (ptrdiff_t)encoder->end;
+ remaining -= remaining ? (ptrdiff_t)encoder->data.ptr : encoder->data.bytes_needed;
+ remaining -= (ptrdiff_t)len;
+ return unlikely(remaining < 0);
+}
+
+static inline void advance_ptr(CborEncoder *encoder, size_t n)
+{
+ if (encoder->end)
+ encoder->data.ptr += n;
+ else
+ encoder->data.bytes_needed += n;
+}
+
+static inline CborError append_to_buffer(CborEncoder *encoder, const void *data, size_t len,
+ CborEncoderAppendType appendType)
+{
+ if (CBOR_ENCODER_WRITER_CONTROL >= 0) {
+ if (encoder->flags & CborIteratorFlag_WriterFunction || CBOR_ENCODER_WRITER_CONTROL != 0) {
+# ifdef CBOR_ENCODER_WRITE_FUNCTION
+ return CBOR_ENCODER_WRITE_FUNCTION(encoder->end, data, len, appendType);
+# else
+ return encoder->data.writer(encoder->end, data, len, appendType);
+# endif
+ }
+ }
+
+#if CBOR_ENCODER_WRITER_CONTROL <= 0
+ if (would_overflow(encoder, len)) {
+ if (encoder->end != NULL) {
+ len -= encoder->end - encoder->data.ptr;
+ encoder->end = NULL;
+ encoder->data.bytes_needed = 0;
+ }
+
+ advance_ptr(encoder, len);
+ return CborErrorOutOfMemory;
+ }
+
+ memcpy(encoder->data.ptr, data, len);
+ encoder->data.ptr += len;
+#endif
+ return CborNoError;
+}
+
+static inline CborError append_byte_to_buffer(CborEncoder *encoder, uint8_t byte)
+{
+ return append_to_buffer(encoder, &byte, 1, CborEncoderAppendCborData);
+}
+
+static inline CborError encode_number_no_update(CborEncoder *encoder, uint64_t ui, uint8_t shiftedMajorType)
+{
+ /* Little-endian would have been so much more convenient here:
+ * We could just write at the beginning of buf but append_to_buffer
+ * only the necessary bytes.
+ * Since it has to be big endian, do it the other way around:
+ * write from the end. */
+ uint64_t buf[2];
+ uint8_t *const bufend = (uint8_t *)buf + sizeof(buf);
+ uint8_t *bufstart = bufend - 1;
+ put64(buf + 1, ui); /* we probably have a bunch of zeros in the beginning */
+
+ if (ui < Value8Bit) {
+ *bufstart += shiftedMajorType;
+ } else {
+ uint8_t more = 0;
+ if (ui > 0xffU)
+ ++more;
+ if (ui > 0xffffU)
+ ++more;
+ if (ui > 0xffffffffU)
+ ++more;
+ bufstart -= (size_t)1 << more;
+ *bufstart = shiftedMajorType + Value8Bit + more;
+ }
+
+ return append_to_buffer(encoder, bufstart, bufend - bufstart, CborEncoderAppendCborData);
+}
+
+static inline void saturated_decrement(CborEncoder *encoder)
+{
+ if (encoder->remaining)
+ --encoder->remaining;
+}
+
+static inline CborError encode_number(CborEncoder *encoder, uint64_t ui, uint8_t shiftedMajorType)
+{
+ saturated_decrement(encoder);
+ return encode_number_no_update(encoder, ui, shiftedMajorType);
+}
+
+/**
+ * Appends the unsigned 64-bit integer \a value to the CBOR stream provided by
+ * \a encoder.
+ *
+ * \sa cbor_encode_negative_int, cbor_encode_int
+ */
+CborError cbor_encode_uint(CborEncoder *encoder, uint64_t value)
+{
+ return encode_number(encoder, value, UnsignedIntegerType << MajorTypeShift);
+}
+
+/**
+ * Appends the negative 64-bit integer whose absolute value is \a
+ * absolute_value to the CBOR stream provided by \a encoder.
+ *
+ * If the value \a absolute_value is zero, this function encodes -2^64.
+ *
+ * \sa cbor_encode_uint, cbor_encode_int
+ */
+CborError cbor_encode_negative_int(CborEncoder *encoder, uint64_t absolute_value)
+{
+ return encode_number(encoder, absolute_value - 1, NegativeIntegerType << MajorTypeShift);
+}
+
+/**
+ * Appends the signed 64-bit integer \a value to the CBOR stream provided by
+ * \a encoder.
+ *
+ * \sa cbor_encode_negative_int, cbor_encode_uint
+ */
+CborError cbor_encode_int(CborEncoder *encoder, int64_t value)
+{
+ /* adapted from code in RFC 7049 appendix C (pseudocode) */
+ uint64_t ui = value >> 63; /* extend sign to whole length */
+ uint8_t majorType = ui & 0x20; /* extract major type */
+ ui ^= value; /* complement negatives */
+ return encode_number(encoder, ui, majorType);
+}
+
+/**
+ * Appends the CBOR Simple Type of value \a value to the CBOR stream provided by
+ * \a encoder.
+ *
+ * This function may return error CborErrorIllegalSimpleType if the \a value
+ * variable contains a number that is not a valid simple type.
+ */
+CborError cbor_encode_simple_value(CborEncoder *encoder, uint8_t value)
+{
+#ifndef CBOR_ENCODER_NO_CHECK_USER
+ /* check if this is a valid simple type */
+ if (value >= HalfPrecisionFloat && value <= Break)
+ return CborErrorIllegalSimpleType;
+#endif
+ return encode_number(encoder, value, SimpleTypesType << MajorTypeShift);
+}
+
+/**
+ * Appends the floating-point value of type \a fpType and pointed to by \a
+ * value to the CBOR stream provided by \a encoder. The value of \a fpType must
+ * be one of CborHalfFloatType, CborFloatType or CborDoubleType, otherwise the
+ * behavior of this function is undefined.
+ *
+ * This function is useful for code that needs to pass through floating point
+ * values but does not wish to have the actual floating-point code.
+ *
+ * \sa cbor_encode_half_float, cbor_encode_float, cbor_encode_double
+ */
+CborError cbor_encode_floating_point(CborEncoder *encoder, CborType fpType, const void *value)
+{
+ uint8_t buf[1 + sizeof(uint64_t)];
+ cbor_assert(fpType == CborHalfFloatType || fpType == CborFloatType || fpType == CborDoubleType);
+ buf[0] = fpType;
+
+ unsigned size = 2U << (fpType - CborHalfFloatType);
+ if (size == 8)
+ put64(buf + 1, *(const uint64_t*)value);
+ else if (size == 4)
+ put32(buf + 1, *(const uint32_t*)value);
+ else
+ put16(buf + 1, *(const uint16_t*)value);
+ saturated_decrement(encoder);
+ return append_to_buffer(encoder, buf, size + 1, CborEncoderAppendCborData);
+}
+
+/**
+ * Appends the CBOR tag \a tag to the CBOR stream provided by \a encoder.
+ *
+ * \sa CborTag
+ */
+CborError cbor_encode_tag(CborEncoder *encoder, CborTag tag)
+{
+ /* tags don't count towards the number of elements in an array or map */
+ return encode_number_no_update(encoder, tag, TagType << MajorTypeShift);
+}
+
+static CborError encode_string(CborEncoder *encoder, size_t length, uint8_t shiftedMajorType, const void *string)
+{
+ CborError err = encode_number(encoder, length, shiftedMajorType);
+ if (err && !isOomError(err))
+ return err;
+ return append_to_buffer(encoder, string, length, CborEncoderAppendStringData);
+}
+
+/**
+ * \fn CborError cbor_encode_text_stringz(CborEncoder *encoder, const char *string)
+ *
+ * Appends the null-terminated text string \a string to the CBOR stream
+ * provided by \a encoder. CBOR requires that \a string be valid UTF-8, but
+ * TinyCBOR makes no verification of correctness. The terminating null is not
+ * included in the stream.
+ *
+ * \sa cbor_encode_text_string, cbor_encode_byte_string
+ */
+
+/**
+ * Appends the text string \a string of length \a length to the CBOR stream
+ * provided by \a encoder. CBOR requires that \a string be valid UTF-8, but
+ * TinyCBOR makes no verification of correctness.
+ *
+ * \sa CborError cbor_encode_text_stringz, cbor_encode_byte_string
+ */
+CborError cbor_encode_byte_string(CborEncoder *encoder, const uint8_t *string, size_t length)
+{
+ return encode_string(encoder, length, ByteStringType << MajorTypeShift, string);
+}
+
+/**
+ * Appends the byte string \a string of length \a length to the CBOR stream
+ * provided by \a encoder. CBOR byte strings are arbitrary raw data.
+ *
+ * \sa cbor_encode_text_stringz, cbor_encode_text_string
+ */
+CborError cbor_encode_text_string(CborEncoder *encoder, const char *string, size_t length)
+{
+ return encode_string(encoder, length, TextStringType << MajorTypeShift, string);
+}
+
+#ifdef __GNUC__
+__attribute__((noinline))
+#endif
+static CborError create_container(CborEncoder *encoder, CborEncoder *container, size_t length, uint8_t shiftedMajorType)
+{
+ CborError err;
+ container->data.ptr = encoder->data.ptr;
+ container->end = encoder->end;
+ saturated_decrement(encoder);
+ container->remaining = length + 1; /* overflow ok on CborIndefiniteLength */
+
+ cbor_static_assert((int)CborIteratorFlag_ContainerIsMap_ == (int)CborIteratorFlag_ContainerIsMap);
+ cbor_static_assert(((MapType << MajorTypeShift) & CborIteratorFlag_ContainerIsMap) == CborIteratorFlag_ContainerIsMap);
+ cbor_static_assert(((ArrayType << MajorTypeShift) & CborIteratorFlag_ContainerIsMap) == 0);
+ container->flags = shiftedMajorType & CborIteratorFlag_ContainerIsMap;
+ if (CBOR_ENCODER_WRITER_CONTROL == 0)
+ container->flags |= encoder->flags & CborIteratorFlag_WriterFunction;
+
+ if (length == CborIndefiniteLength) {
+ container->flags |= CborIteratorFlag_UnknownLength;
+ err = append_byte_to_buffer(container, shiftedMajorType + IndefiniteLength);
+ } else {
+ if (shiftedMajorType & CborIteratorFlag_ContainerIsMap)
+ container->remaining += length;
+ err = encode_number_no_update(container, length, shiftedMajorType);
+ }
+ return err;
+}
+
+/**
+ * Creates a CBOR array in the CBOR stream provided by \a encoder and
+ * initializes \a arrayEncoder so that items can be added to the array using
+ * the CborEncoder functions. The array must be terminated by calling either
+ * cbor_encoder_close_container() or cbor_encoder_close_container_checked()
+ * with the same \a encoder and \a arrayEncoder parameters.
+ *
+ * The number of items inserted into the array must be exactly \a length items,
+ * otherwise the stream is invalid. If the number of items is not known when
+ * creating the array, the constant \ref CborIndefiniteLength may be passed as
+ * length instead.
+ *
+ * \sa cbor_encoder_create_map
+ */
+CborError cbor_encoder_create_array(CborEncoder *encoder, CborEncoder *arrayEncoder, size_t length)
+{
+ return create_container(encoder, arrayEncoder, length, ArrayType << MajorTypeShift);
+}
+
+/**
+ * Creates a CBOR map in the CBOR stream provided by \a encoder and
+ * initializes \a mapEncoder so that items can be added to the map using
+ * the CborEncoder functions. The map must be terminated by calling either
+ * cbor_encoder_close_container() or cbor_encoder_close_container_checked()
+ * with the same \a encoder and \a mapEncoder parameters.
+ *
+ * The number of pair of items inserted into the map must be exactly \a length
+ * items, otherwise the stream is invalid. If the number is not known
+ * when creating the map, the constant \ref CborIndefiniteLength may be passed as
+ * length instead.
+ *
+ * \b{Implementation limitation:} TinyCBOR cannot encode more than SIZE_MAX/2
+ * key-value pairs in the stream. If the length \a length is larger than this
+ * value (and is not \ref CborIndefiniteLength), this function returns error
+ * CborErrorDataTooLarge.
+ *
+ * \sa cbor_encoder_create_array
+ */
+CborError cbor_encoder_create_map(CborEncoder *encoder, CborEncoder *mapEncoder, size_t length)
+{
+ if (length != CborIndefiniteLength && length > SIZE_MAX / 2)
+ return CborErrorDataTooLarge;
+ return create_container(encoder, mapEncoder, length, MapType << MajorTypeShift);
+}
+
+/**
+ * Closes the CBOR container (array or map) provided by \a containerEncoder and
+ * updates the CBOR stream provided by \a encoder. Both parameters must be the
+ * same as were passed to cbor_encoder_create_array() or
+ * cbor_encoder_create_map().
+ *
+ * Since version 0.5, this function verifies that the number of items (or pairs
+ * of items, in the case of a map) was correct. It is no longer necessary to call
+ * cbor_encoder_close_container_checked() instead.
+ *
+ * \sa cbor_encoder_create_array(), cbor_encoder_create_map()
+ */
+CborError cbor_encoder_close_container(CborEncoder *encoder, const CborEncoder *containerEncoder)
+{
+ if (encoder->end && !(encoder->flags & CborIteratorFlag_WriterFunction))
+ encoder->data.ptr = containerEncoder->data.ptr;
+ else
+ encoder->data.bytes_needed = containerEncoder->data.bytes_needed;
+ encoder->end = containerEncoder->end;
+ if (containerEncoder->flags & CborIteratorFlag_UnknownLength)
+ return append_byte_to_buffer(encoder, BreakByte);
+
+ if (containerEncoder->remaining != 1)
+ return containerEncoder->remaining == 0 ? CborErrorTooManyItems : CborErrorTooFewItems;
+
+ if (!encoder->end)
+ return CborErrorOutOfMemory; /* keep the state */
+ return CborNoError;
+}
+
+/**
+ * \fn CborError cbor_encode_boolean(CborEncoder *encoder, bool value)
+ *
+ * Appends the boolean value \a value to the CBOR stream provided by \a encoder.
+ */
+
+/**
+ * \fn CborError cbor_encode_null(CborEncoder *encoder)
+ *
+ * Appends the CBOR type representing a null value to the CBOR stream provided
+ * by \a encoder.
+ *
+ * \sa cbor_encode_undefined()
+ */
+
+/**
+ * \fn CborError cbor_encode_undefined(CborEncoder *encoder)
+ *
+ * Appends the CBOR type representing an undefined value to the CBOR stream
+ * provided by \a encoder.
+ *
+ * \sa cbor_encode_null()
+ */
+
+/**
+ * \fn CborError cbor_encode_half_float(CborEncoder *encoder, const void *value)
+ *
+ * Appends the IEEE 754 half-precision (16-bit) floating point value pointed to
+ * by \a value to the CBOR stream provided by \a encoder.
+ *
+ * \sa cbor_encode_floating_point(), cbor_encode_float(), cbor_encode_double()
+ */
+
+/**
+ * \fn CborError cbor_encode_float(CborEncoder *encoder, float value)
+ *
+ * Appends the IEEE 754 single-precision (32-bit) floating point value \a value
+ * to the CBOR stream provided by \a encoder.
+ *
+ * \sa cbor_encode_floating_point(), cbor_encode_half_float(), cbor_encode_double()
+ */
+
+/**
+ * \fn CborError cbor_encode_double(CborEncoder *encoder, double value)
+ *
+ * Appends the IEEE 754 double-precision (64-bit) floating point value \a value
+ * to the CBOR stream provided by \a encoder.
+ *
+ * \sa cbor_encode_floating_point(), cbor_encode_half_float(), cbor_encode_float()
+ */
+
+/**
+ * \fn size_t cbor_encoder_get_buffer_size(const CborEncoder *encoder, const uint8_t *buffer)
+ *
+ * Returns the total size of the buffer starting at \a buffer after the
+ * encoding finished without errors. The \a encoder and \a buffer arguments
+ * must be the same as supplied to cbor_encoder_init().
+ *
+ * If the encoding process had errors, the return value of this function is
+ * meaningless. If the only errors were CborErrorOutOfMemory, instead use
+ * cbor_encoder_get_extra_bytes_needed() to find out by how much to grow the
+ * buffer before encoding again.
+ *
+ * See \ref CborEncoding for an example of using this function.
+ *
+ * \sa cbor_encoder_init(), cbor_encoder_get_extra_bytes_needed(), CborEncoding
+ */
+
+/**
+ * \fn size_t cbor_encoder_get_extra_bytes_needed(const CborEncoder *encoder)
+ *
+ * Returns how many more bytes the original buffer supplied to
+ * cbor_encoder_init() needs to be extended by so that no CborErrorOutOfMemory
+ * condition will happen for the encoding. If the buffer was big enough, this
+ * function returns 0. The \a encoder must be the original argument as passed
+ * to cbor_encoder_init().
+ *
+ * This function is usually called after an encoding sequence ended with one or
+ * more CborErrorOutOfMemory errors, but no other error. If any other error
+ * happened, the return value of this function is meaningless.
+ *
+ * See \ref CborEncoding for an example of using this function.
+ *
+ * \sa cbor_encoder_init(), cbor_encoder_get_buffer_size(), CborEncoding
+ */
+
+/** @} */
diff --git a/src/3rdparty/tinycbor/src/cborerrorstrings.c b/src/3rdparty/tinycbor/src/cborerrorstrings.c
new file mode 100644
index 0000000000..1dd8ae25bd
--- /dev/null
+++ b/src/3rdparty/tinycbor/src/cborerrorstrings.c
@@ -0,0 +1,188 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Intel Corporation
+**
+** Permission is hereby granted, free of charge, to any person obtaining a copy
+** of this software and associated documentation files (the "Software"), to deal
+** in the Software without restriction, including without limitation the rights
+** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+** copies of the Software, and to permit persons to whom the Software is
+** furnished to do so, subject to the following conditions:
+**
+** The above copyright notice and this permission notice shall be included in
+** all copies or substantial portions of the Software.
+**
+** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+** THE SOFTWARE.
+**
+****************************************************************************/
+
+#include "cbor.h"
+
+#ifndef _
+# define _(msg) msg
+#endif
+
+/**
+ * \enum CborError
+ * \ingroup CborGlobals
+ * The CborError enum contains the possible error values used by the CBOR encoder and decoder.
+ *
+ * TinyCBOR functions report success by returning CborNoError, or one error
+ * condition by returning one of the values below. One exception is the
+ * out-of-memory condition (CborErrorOutOfMemory), which the functions for \ref
+ * CborEncoding may report in bit-wise OR with other conditions.
+ *
+ * This technique allows code to determine whether the only error condition was
+ * a lack of buffer space, which may not be a fatal condition if the buffer can
+ * be resized. Additionally, the functions for \ref CborEncoding may continue
+ * to be used even after CborErrorOutOfMemory is returned, and instead they
+ * will simply calculate the extra space needed.
+ *
+ * \value CborNoError No error occurred
+ * \omitvalue CborUnknownError
+ * \value CborErrorUnknownLength Request for the length of an array, map or string whose length is not provided in the CBOR stream
+ * \value CborErrorAdvancePastEOF Not enough data in the stream to decode item (decoding would advance past end of stream)
+ * \value CborErrorIO An I/O error occurred, probably due to an out-of-memory situation
+ * \value CborErrorGarbageAtEnd Bytes exist past the end of the CBOR stream
+ * \value CborErrorUnexpectedEOF End of stream reached unexpectedly
+ * \value CborErrorUnexpectedBreak A CBOR break byte was found where not expected
+ * \value CborErrorUnknownType An unknown type (future extension to CBOR) was found in the stream
+ * \value CborErrorIllegalType An invalid type was found while parsing a chunked CBOR string
+ * \value CborErrorIllegalNumber An illegal initial byte (encoding unspecified additional information) was found
+ * \value CborErrorIllegalSimpleType An illegal encoding of a CBOR Simple Type of value less than 32 was found
+ * \omitvalue CborErrorUnknownSimpleType
+ * \omitvalue CborErrorUnknownTag
+ * \omitvalue CborErrorInappropriateTagForType
+ * \omitvalue CborErrorDuplicateObjectKeys
+ * \value CborErrorInvalidUtf8TextString Illegal UTF-8 encoding found while parsing CBOR Text String
+ * \value CborErrorTooManyItems Too many items were added to CBOR map or array of pre-determined length
+ * \value CborErrorTooFewItems Too few items were added to CBOR map or array of pre-determined length
+ * \value CborErrorDataTooLarge Data item size exceeds TinyCBOR's implementation limits
+ * \value CborErrorNestingTooDeep Data item nesting exceeds TinyCBOR's implementation limits
+ * \omitvalue CborErrorUnsupportedType
+ * \value CborErrorJsonObjectKeyIsAggregate Conversion to JSON failed because the key in a map is a CBOR map or array
+ * \value CborErrorJsonObjectKeyNotString Conversion to JSON failed because the key in a map is not a text string
+ * \value CborErrorOutOfMemory During CBOR encoding, the buffer provided is insufficient for encoding the data item;
+ * in other situations, TinyCBOR failed to allocate memory
+ * \value CborErrorInternalError An internal error occurred in TinyCBOR
+ */
+
+/**
+ * \ingroup CborGlobals
+ * Returns the error string corresponding to the CBOR error condition \a error.
+ */
+const char *cbor_error_string(CborError error)
+{
+ switch (error) {
+ case CborNoError:
+ return "";
+
+ case CborUnknownError:
+ return _("unknown error");
+
+ case CborErrorOutOfMemory:
+ return _("out of memory/need more memory");
+
+ case CborErrorUnknownLength:
+ return _("unknown length (attempted to get the length of a map/array/string of indeterminate length");
+
+ case CborErrorAdvancePastEOF:
+ return _("attempted to advance past EOF");
+
+ case CborErrorIO:
+ return _("I/O error");
+
+ case CborErrorGarbageAtEnd:
+ return _("garbage after the end of the content");
+
+ case CborErrorUnexpectedEOF:
+ return _("unexpected end of data");
+
+ case CborErrorUnexpectedBreak:
+ return _("unexpected 'break' byte");
+
+ case CborErrorUnknownType:
+ return _("illegal byte (encodes future extension type)");
+
+ case CborErrorIllegalType:
+ return _("mismatched string type in chunked string");
+
+ case CborErrorIllegalNumber:
+ return _("illegal initial byte (encodes unspecified additional information)");
+
+ case CborErrorIllegalSimpleType:
+ return _("illegal encoding of simple type smaller than 32");
+
+ case CborErrorNoMoreStringChunks:
+ return _("no more byte or text strings available");
+
+ case CborErrorUnknownSimpleType:
+ return _("unknown simple type");
+
+ case CborErrorUnknownTag:
+ return _("unknown tag");
+
+ case CborErrorInappropriateTagForType:
+ return _("inappropriate tag for type");
+
+ case CborErrorDuplicateObjectKeys:
+ return _("duplicate keys in object");
+
+ case CborErrorInvalidUtf8TextString:
+ return _("invalid UTF-8 content in string");
+
+ case CborErrorExcludedType:
+ return _("excluded type found");
+
+ case CborErrorExcludedValue:
+ return _("excluded value found");
+
+ case CborErrorImproperValue:
+ case CborErrorOverlongEncoding:
+ return _("value encoded in non-canonical form");
+
+ case CborErrorMapKeyNotString:
+ case CborErrorJsonObjectKeyNotString:
+ return _("key in map is not a string");
+
+ case CborErrorMapNotSorted:
+ return _("map is not sorted");
+
+ case CborErrorMapKeysNotUnique:
+ return _("map keys are not unique");
+
+ case CborErrorTooManyItems:
+ return _("too many items added to encoder");
+
+ case CborErrorTooFewItems:
+ return _("too few items added to encoder");
+
+ case CborErrorDataTooLarge:
+ return _("internal error: data too large");
+
+ case CborErrorNestingTooDeep:
+ return _("internal error: too many nested containers found in recursive function");
+
+ case CborErrorUnsupportedType:
+ return _("unsupported type");
+
+ case CborErrorUnimplementedValidation:
+ return _("validation not implemented for the current parser state");
+
+ case CborErrorJsonObjectKeyIsAggregate:
+ return _("conversion to JSON failed: key in object is an array or map");
+
+ case CborErrorJsonNotImplemented:
+ return _("conversion to JSON failed: open_memstream unavailable");
+
+ case CborErrorInternalError:
+ return _("internal error");
+ }
+ return cbor_error_string(CborUnknownError);
+}
diff --git a/src/3rdparty/tinycbor/src/cborinternal_p.h b/src/3rdparty/tinycbor/src/cborinternal_p.h
new file mode 100644
index 0000000000..9546e44d61
--- /dev/null
+++ b/src/3rdparty/tinycbor/src/cborinternal_p.h
@@ -0,0 +1,245 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Intel Corporation
+**
+** Permission is hereby granted, free of charge, to any person obtaining a copy
+** of this software and associated documentation files (the "Software"), to deal
+** in the Software without restriction, including without limitation the rights
+** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+** copies of the Software, and to permit persons to whom the Software is
+** furnished to do so, subject to the following conditions:
+**
+** The above copyright notice and this permission notice shall be included in
+** all copies or substantial portions of the Software.
+**
+** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+** THE SOFTWARE.
+**
+****************************************************************************/
+
+#ifndef CBORINTERNAL_P_H
+#define CBORINTERNAL_P_H
+
+#include "compilersupport_p.h"
+
+#ifndef CBOR_INTERNAL_API
+# define CBOR_INTERNAL_API
+#endif
+
+#ifndef CBOR_PARSER_MAX_RECURSIONS
+# define CBOR_PARSER_MAX_RECURSIONS 1024
+#endif
+
+#ifndef CBOR_ENCODER_WRITER_CONTROL
+# define CBOR_ENCODER_WRITER_CONTROL 0
+#endif
+#ifndef CBOR_PARSER_READER_CONTROL
+# define CBOR_PARSER_READER_CONTROL 0
+#endif
+
+/*
+ * CBOR Major types
+ * Encoded in the high 3 bits of the descriptor byte
+ * See http://tools.ietf.org/html/rfc7049#section-2.1
+ */
+typedef enum CborMajorTypes {
+ UnsignedIntegerType = 0U,
+ NegativeIntegerType = 1U,
+ ByteStringType = 2U,
+ TextStringType = 3U,
+ ArrayType = 4U,
+ MapType = 5U, /* a.k.a. object */
+ TagType = 6U,
+ SimpleTypesType = 7U
+} CborMajorTypes;
+
+/*
+ * CBOR simple and floating point types
+ * Encoded in the low 8 bits of the descriptor byte when the
+ * Major Type is 7.
+ */
+typedef enum CborSimpleTypes {
+ FalseValue = 20,
+ TrueValue = 21,
+ NullValue = 22,
+ UndefinedValue = 23,
+ SimpleTypeInNextByte = 24, /* not really a simple type */
+ HalfPrecisionFloat = 25, /* ditto */
+ SinglePrecisionFloat = 26, /* ditto */
+ DoublePrecisionFloat = 27, /* ditto */
+ Break = 31
+} CborSimpleTypes;
+
+enum {
+ SmallValueBitLength = 5U,
+ SmallValueMask = (1U << SmallValueBitLength) - 1, /* 31 */
+ Value8Bit = 24U,
+ Value16Bit = 25U,
+ Value32Bit = 26U,
+ Value64Bit = 27U,
+ IndefiniteLength = 31U,
+
+ MajorTypeShift = SmallValueBitLength,
+ MajorTypeMask = (int) (~0U << MajorTypeShift),
+
+ BreakByte = (unsigned)Break | (SimpleTypesType << MajorTypeShift)
+};
+
+static inline void copy_current_position(CborValue *dst, const CborValue *src)
+{
+ // This "if" is here for pedantry only: the two branches should perform
+ // the same memory operation.
+ if (src->parser->flags & CborParserFlag_ExternalSource)
+ dst->source.token = src->source.token;
+ else
+ dst->source.ptr = src->source.ptr;
+}
+
+static inline bool can_read_bytes(const CborValue *it, size_t n)
+{
+ if (CBOR_PARSER_READER_CONTROL >= 0) {
+ if (it->parser->flags & CborParserFlag_ExternalSource || CBOR_PARSER_READER_CONTROL != 0) {
+#ifdef CBOR_PARSER_CAN_READ_BYTES_FUNCTION
+ return CBOR_PARSER_CAN_READ_BYTES_FUNCTION(it->source.token, n);
+#else
+ return it->parser->source.ops->can_read_bytes(it->source.token, n);
+#endif
+ }
+ }
+
+ /* Convert the pointer subtraction to size_t since end >= ptr
+ * (this prevents issues with (ptrdiff_t)n becoming negative).
+ */
+ return (size_t)(it->parser->source.end - it->source.ptr) >= n;
+}
+
+static inline void advance_bytes(CborValue *it, size_t n)
+{
+ if (CBOR_PARSER_READER_CONTROL >= 0) {
+ if (it->parser->flags & CborParserFlag_ExternalSource || CBOR_PARSER_READER_CONTROL != 0) {
+#ifdef CBOR_PARSER_ADVANCE_BYTES_FUNCTION
+ CBOR_PARSER_ADVANCE_BYTES_FUNCTION(it->source.token, n);
+#else
+ it->parser->source.ops->advance_bytes(it->source.token, n);
+#endif
+ return;
+ }
+ }
+
+ it->source.ptr += n;
+}
+
+static inline CborError transfer_string(CborValue *it, const void **ptr, size_t offset, size_t len)
+{
+ if (CBOR_PARSER_READER_CONTROL >= 0) {
+ if (it->parser->flags & CborParserFlag_ExternalSource || CBOR_PARSER_READER_CONTROL != 0) {
+#ifdef CBOR_PARSER_TRANSFER_STRING_FUNCTION
+ return CBOR_PARSER_TRANSFER_STRING_FUNCTION(it->source.token, ptr, offset, len);
+#else
+ return it->parser->source.ops->transfer_string(it->source.token, ptr, offset, len);
+#endif
+ }
+ }
+
+ it->source.ptr += offset;
+ if (can_read_bytes(it, len)) {
+ *CONST_CAST(const void **, ptr) = it->source.ptr;
+ it->source.ptr += len;
+ return CborNoError;
+ }
+ return CborErrorUnexpectedEOF;
+}
+
+static inline void *read_bytes_unchecked(const CborValue *it, void *dst, size_t offset, size_t n)
+{
+ if (CBOR_PARSER_READER_CONTROL >= 0) {
+ if (it->parser->flags & CborParserFlag_ExternalSource || CBOR_PARSER_READER_CONTROL != 0) {
+#ifdef CBOR_PARSER_READ_BYTES_FUNCTION
+ return CBOR_PARSER_READ_BYTES_FUNCTION(it->source.token, dst, offset, n);
+#else
+ return it->parser->source.ops->read_bytes(it->source.token, dst, offset, n);
+#endif
+ }
+ }
+
+ return memcpy(dst, it->source.ptr + offset, n);
+}
+
+#ifdef __GNUC__
+__attribute__((warn_unused_result))
+#endif
+static inline void *read_bytes(const CborValue *it, void *dst, size_t offset, size_t n)
+{
+ if (can_read_bytes(it, offset + n))
+ return read_bytes_unchecked(it, dst, offset, n);
+ return NULL;
+}
+
+static inline uint16_t read_uint8(const CborValue *it, size_t offset)
+{
+ uint8_t result;
+ read_bytes_unchecked(it, &result, offset, sizeof(result));
+ return result;
+}
+
+static inline uint16_t read_uint16(const CborValue *it, size_t offset)
+{
+ uint16_t result;
+ read_bytes_unchecked(it, &result, offset, sizeof(result));
+ return cbor_ntohs(result);
+}
+
+static inline uint32_t read_uint32(const CborValue *it, size_t offset)
+{
+ uint32_t result;
+ read_bytes_unchecked(it, &result, offset, sizeof(result));
+ return cbor_ntohl(result);
+}
+
+static inline uint64_t read_uint64(const CborValue *it, size_t offset)
+{
+ uint64_t result;
+ read_bytes_unchecked(it, &result, offset, sizeof(result));
+ return cbor_ntohll(result);
+}
+
+static inline CborError extract_number_checked(const CborValue *it, uint64_t *value, size_t *bytesUsed)
+{
+ uint8_t descriptor;
+ size_t bytesNeeded = 0;
+
+ /* We've already verified that there's at least one byte to be read */
+ read_bytes_unchecked(it, &descriptor, 0, 1);
+ descriptor &= SmallValueMask;
+ if (descriptor < Value8Bit) {
+ *value = descriptor;
+ } else if (unlikely(descriptor > Value64Bit)) {
+ return CborErrorIllegalNumber;
+ } else {
+ bytesNeeded = (size_t)(1 << (descriptor - Value8Bit));
+ if (!can_read_bytes(it, 1 + bytesNeeded))
+ return CborErrorUnexpectedEOF;
+ if (descriptor <= Value16Bit) {
+ if (descriptor == Value16Bit)
+ *value = read_uint16(it, 1);
+ else
+ *value = read_uint8(it, 1);
+ } else {
+ if (descriptor == Value32Bit)
+ *value = read_uint32(it, 1);
+ else
+ *value = read_uint64(it, 1);
+ }
+ }
+
+ if (bytesUsed)
+ *bytesUsed = bytesNeeded;
+ return CborNoError;
+}
+
+#endif /* CBORINTERNAL_P_H */
diff --git a/src/3rdparty/tinycbor/src/cborjson.h b/src/3rdparty/tinycbor/src/cborjson.h
new file mode 100644
index 0000000000..8ff27b9202
--- /dev/null
+++ b/src/3rdparty/tinycbor/src/cborjson.h
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Intel Corporation
+**
+** Permission is hereby granted, free of charge, to any person obtaining a copy
+** of this software and associated documentation files (the "Software"), to deal
+** in the Software without restriction, including without limitation the rights
+** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+** copies of the Software, and to permit persons to whom the Software is
+** furnished to do so, subject to the following conditions:
+**
+** The above copyright notice and this permission notice shall be included in
+** all copies or substantial portions of the Software.
+**
+** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+** THE SOFTWARE.
+**
+****************************************************************************/
+
+#ifndef CBORJSON_H
+#define CBORJSON_H
+
+#include "cbor.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Conversion to JSON */
+enum CborToJsonFlags
+{
+ CborConvertAddMetadata = 1,
+ CborConvertTagsToObjects = 2,
+ CborConvertIgnoreTags = 0,
+
+ CborConvertObeyByteStringTags = 0,
+ CborConvertByteStringsToBase64Url = 4,
+
+ CborConvertRequireMapStringKeys = 0,
+ CborConvertStringifyMapKeys = 8,
+
+ CborConvertDefaultFlags = 0
+};
+
+CBOR_API CborError cbor_value_to_json_advance(FILE *out, CborValue *value, int flags);
+CBOR_INLINE_API CborError cbor_value_to_json(FILE *out, const CborValue *value, int flags)
+{
+ CborValue copy = *value;
+ return cbor_value_to_json_advance(out, &copy, flags);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CBORJSON_H */
+
diff --git a/src/3rdparty/tinycbor/src/cborparser.c b/src/3rdparty/tinycbor/src/cborparser.c
new file mode 100644
index 0000000000..65b0b4b5c8
--- /dev/null
+++ b/src/3rdparty/tinycbor/src/cborparser.c
@@ -0,0 +1,1522 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Intel Corporation
+**
+** Permission is hereby granted, free of charge, to any person obtaining a copy
+** of this software and associated documentation files (the "Software"), to deal
+** in the Software without restriction, including without limitation the rights
+** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+** copies of the Software, and to permit persons to whom the Software is
+** furnished to do so, subject to the following conditions:
+**
+** The above copyright notice and this permission notice shall be included in
+** all copies or substantial portions of the Software.
+**
+** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+** THE SOFTWARE.
+**
+****************************************************************************/
+
+#ifndef _BSD_SOURCE
+#define _BSD_SOURCE 1
+#endif
+#ifndef _DEFAULT_SOURCE
+#define _DEFAULT_SOURCE 1
+#endif
+#ifndef __STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS 1
+#endif
+
+#include "cbor.h"
+#include "cborinternal_p.h"
+#include "compilersupport_p.h"
+
+#include <string.h>
+
+/**
+ * \defgroup CborParsing Parsing CBOR streams
+ * \brief Group of functions used to parse CBOR streams.
+ *
+ * TinyCBOR provides functions for pull-based stream parsing of a CBOR-encoded
+ * payload. The main data type for the parsing is a CborValue, which behaves
+ * like an iterator and can be used to extract the encoded data. It is first
+ * initialized with a call to cbor_parser_init() and is usually used to extract
+ * exactly one item, most often an array or map.
+ *
+ * Nested CborValue objects can be parsed using cbor_value_enter_container().
+ * Each call to cbor_value_enter_container() must be matched by a call to
+ * cbor_value_leave_container(), with the exact same parameters.
+ *
+ * The example below initializes a CborParser object, begins the parsing with a
+ * CborValue and decodes a single integer:
+ *
+ * \code
+ * int extract_int(const uint8_t *buffer, size_t len)
+ * {
+ * CborParser parser;
+ * CborValue value;
+ * int result;
+ * cbor_parser_init(buffer, len, 0, &parser, &value);
+ * cbor_value_get_int(&value, &result);
+ * return result;
+ * }
+ * \endcode
+ *
+ * The code above does no error checking, which means it assumes the data comes
+ * from a source trusted to send one properly-encoded integer. The following
+ * example does the exact same operation, but includes error checking and
+ * returns 0 on parsing failure:
+ *
+ * \code
+ * int extract_int(const uint8_t *buffer, size_t len)
+ * {
+ * CborParser parser;
+ * CborValue value;
+ * int result;
+ * if (cbor_parser_init(buffer, len, 0, &parser, &value) != CborNoError)
+ * return 0;
+ * if (!cbor_value_is_integer(&value) ||
+ * cbor_value_get_int(&value, &result) != CborNoError)
+ * return 0;
+ * return result;
+ * }
+ * \endcode
+ *
+ * Note, in the example above, that one can't distinguish a parsing failure
+ * from an encoded value of zero. Reporting a parsing error is left as an
+ * exercise to the reader.
+ *
+ * The code above does not execute a range-check either: it is possible that
+ * the value decoded from the CBOR stream encodes a number larger than what can
+ * be represented in a variable of type \c{int}. If detecting that case is
+ * important, the code should call cbor_value_get_int_checked() instead.
+ *
+ * <h3 class="groupheader">Memory and parsing constraints</h3>
+ *
+ * TinyCBOR is designed to run with little memory and with minimal overhead.
+ * Except where otherwise noted, the parser functions always run on constant
+ * time (O(1)), do not recurse and never allocate memory (thus, stack usage is
+ * bounded and is O(1)).
+ *
+ * <h3 class="groupheader">Error handling and preconditions</h3>
+ *
+ * All functions operating on a CborValue return a CborError condition, with
+ * CborNoError standing for the normal situation in which no parsing error
+ * occurred. All functions may return parsing errors in case the stream cannot
+ * be decoded properly, be it due to corrupted data or due to reaching the end
+ * of the input buffer.
+ *
+ * Error conditions must not be ignored. All decoder functions have undefined
+ * behavior if called after an error has been reported, and may crash.
+ *
+ * Some functions are also documented to have preconditions, like
+ * cbor_value_get_int() requiring that the input be an integral value.
+ * Violation of preconditions also results in undefined behavior and the
+ * program may crash.
+ */
+
+/**
+ * \addtogroup CborParsing
+ * @{
+ */
+
+/**
+ * \struct CborValue
+ *
+ * This type contains one value parsed from the CBOR stream. Each CborValue
+ * behaves as an iterator in a StAX-style parser.
+ *
+ * \if privatedocs
+ * Implementation details: the CborValue contains these fields:
+ * \list
+ * \li ptr: pointer to the actual data
+ * \li flags: flags from the decoder
+ * \li extra: partially decoded integer value (0, 1 or 2 bytes)
+ * \li remaining: remaining items in this collection after this item or UINT32_MAX if length is unknown
+ * \endlist
+ * \endif
+ */
+
+static uint64_t extract_number_and_advance(CborValue *it)
+{
+ /* This function is only called after we've verified that the number
+ * here is valid, so we can just use _cbor_value_extract_int64_helper. */
+ uint8_t descriptor;
+ uint64_t v = _cbor_value_extract_int64_helper(it);
+
+ read_bytes_unchecked(it, &descriptor, 0, 1);
+ descriptor &= SmallValueMask;
+
+ size_t bytesNeeded = descriptor < Value8Bit ? 0 : (1 << (descriptor - Value8Bit));
+ advance_bytes(it, bytesNeeded + 1);
+
+ return v;
+}
+
+static bool is_fixed_type(uint8_t type)
+{
+ return type != CborTextStringType && type != CborByteStringType && type != CborArrayType &&
+ type != CborMapType;
+}
+
+static CborError preparse_value(CborValue *it)
+{
+ enum {
+ /* flags to keep */
+ FlagsToKeep = CborIteratorFlag_ContainerIsMap | CborIteratorFlag_NextIsMapKey
+ };
+ uint8_t descriptor;
+
+ /* are we at the end? */
+ it->type = CborInvalidType;
+ it->flags &= FlagsToKeep;
+ if (!read_bytes(it, &descriptor, 0, 1))
+ return CborErrorUnexpectedEOF;
+
+ uint8_t type = descriptor & MajorTypeMask;
+ it->type = type;
+ it->extra = (descriptor &= SmallValueMask);
+
+ if (descriptor > Value64Bit) {
+ if (unlikely(descriptor != IndefiniteLength))
+ return type == CborSimpleType ? CborErrorUnknownType : CborErrorIllegalNumber;
+ if (likely(!is_fixed_type(type))) {
+ /* special case */
+ it->flags |= CborIteratorFlag_UnknownLength;
+ it->type = type;
+ return CborNoError;
+ }
+ return type == CborSimpleType ? CborErrorUnexpectedBreak : CborErrorIllegalNumber;
+ }
+
+ size_t bytesNeeded = descriptor < Value8Bit ? 0 : (1 << (descriptor - Value8Bit));
+
+ if (bytesNeeded) {
+ if (!can_read_bytes(it, bytesNeeded + 1))
+ return CborErrorUnexpectedEOF;
+
+ it->extra = 0;
+
+ /* read up to 16 bits into it->extra */
+ if (bytesNeeded <= 2) {
+ read_bytes_unchecked(it, &it->extra, 1, bytesNeeded);
+ if (bytesNeeded == 2)
+ it->extra = cbor_ntohs(it->extra);
+ } else {
+ cbor_static_assert(CborIteratorFlag_IntegerValueTooLarge == (Value32Bit & 3));
+ cbor_static_assert((CborIteratorFlag_IntegerValueIs64Bit |
+ CborIteratorFlag_IntegerValueTooLarge) == (Value64Bit & 3));
+ it->flags |= (descriptor & 3);
+ }
+ }
+
+ uint8_t majortype = type >> MajorTypeShift;
+ if (majortype == NegativeIntegerType) {
+ it->flags |= CborIteratorFlag_NegativeInteger;
+ it->type = CborIntegerType;
+ } else if (majortype == SimpleTypesType) {
+ switch (descriptor) {
+ case FalseValue:
+ it->extra = false;
+ it->type = CborBooleanType;
+ break;
+
+ case SinglePrecisionFloat:
+ case DoublePrecisionFloat:
+ it->flags |= CborIteratorFlag_IntegerValueTooLarge;
+ /* fall through */
+ case TrueValue:
+ case NullValue:
+ case UndefinedValue:
+ case HalfPrecisionFloat:
+ read_bytes_unchecked(it, &it->type, 0, 1);
+ break;
+
+ case SimpleTypeInNextByte:
+#ifndef CBOR_PARSER_NO_STRICT_CHECKS
+ if (unlikely(it->extra < 32)) {
+ it->type = CborInvalidType;
+ return CborErrorIllegalSimpleType;
+ }
+#endif
+ break;
+
+ case 28:
+ case 29:
+ case 30:
+ case Break:
+ cbor_assert(false); /* these conditions can't be reached */
+ return CborErrorUnexpectedBreak;
+ }
+ }
+
+ return CborNoError;
+}
+
+static CborError preparse_next_value_nodecrement(CborValue *it)
+{
+ uint8_t byte;
+ if (it->remaining == UINT32_MAX && read_bytes(it, &byte, 0, 1) && byte == (uint8_t)BreakByte) {
+ /* end of map or array */
+ if ((it->flags & CborIteratorFlag_ContainerIsMap && it->flags & CborIteratorFlag_NextIsMapKey)
+ || it->type == CborTagType) {
+ /* but we weren't expecting it! */
+ return CborErrorUnexpectedBreak;
+ }
+ it->type = CborInvalidType;
+ it->remaining = 0;
+ it->flags |= CborIteratorFlag_UnknownLength; /* leave_container must consume the Break */
+ return CborNoError;
+ }
+
+ return preparse_value(it);
+}
+
+static CborError preparse_next_value(CborValue *it)
+{
+ /* tags don't count towards item totals or whether we've successfully
+ * read a map's key or value */
+ bool itemCounts = it->type != CborTagType;
+
+ if (it->remaining != UINT32_MAX) {
+ if (itemCounts && --it->remaining == 0) {
+ it->type = CborInvalidType;
+ it->flags &= ~CborIteratorFlag_UnknownLength; /* no Break to consume */
+ return CborNoError;
+ }
+ }
+ if (itemCounts) {
+ /* toggle the flag indicating whether this was a map key */
+ it->flags ^= CborIteratorFlag_NextIsMapKey;
+ }
+ return preparse_next_value_nodecrement(it);
+}
+
+static CborError advance_internal(CborValue *it)
+{
+ uint64_t length = extract_number_and_advance(it);
+
+ if (it->type == CborByteStringType || it->type == CborTextStringType) {
+ cbor_assert(length == (size_t)length);
+ cbor_assert((it->flags & CborIteratorFlag_UnknownLength) == 0);
+ advance_bytes(it, length);
+ }
+
+ return preparse_next_value(it);
+}
+
+/** \internal
+ *
+ * Decodes the CBOR integer value when it is larger than the 16 bits available
+ * in value->extra. This function requires that value->flags have the
+ * CborIteratorFlag_IntegerValueTooLarge flag set.
+ *
+ * This function is also used to extract single- and double-precision floating
+ * point values (SinglePrecisionFloat == Value32Bit and DoublePrecisionFloat ==
+ * Value64Bit).
+ */
+uint64_t _cbor_value_decode_int64_internal(const CborValue *value)
+{
+ cbor_assert(value->flags & CborIteratorFlag_IntegerValueTooLarge ||
+ value->type == CborFloatType || value->type == CborDoubleType);
+ if (value->flags & CborIteratorFlag_IntegerValueIs64Bit)
+ return read_uint64(value, 1);
+
+ return read_uint32(value, 1);
+}
+
+/**
+ * Initializes the CBOR parser for parsing \a size bytes beginning at \a
+ * buffer. Parsing will use flags set in \a flags. The iterator to the first
+ * element is returned in \a it.
+ *
+ * The \a parser structure needs to remain valid throughout the decoding
+ * process. It is not thread-safe to share one CborParser among multiple
+ * threads iterating at the same time, but the object can be copied so multiple
+ * threads can iterate.
+ */
+CborError cbor_parser_init(const uint8_t *buffer, size_t size, int flags, CborParser *parser, CborValue *it)
+{
+ memset(parser, 0, sizeof(*parser));
+ parser->source.end = buffer + size;
+ parser->flags = (enum CborParserGlobalFlags)flags;
+ it->parser = parser;
+ it->source.ptr = buffer;
+ it->remaining = 1; /* there's one type altogether, usually an array or map */
+ it->flags = 0;
+ return preparse_value(it);
+}
+
+CborError cbor_parser_init_reader(const struct CborParserOperations *ops, CborParser *parser, CborValue *it, void *token)
+{
+ memset(parser, 0, sizeof(*parser));
+ parser->source.ops = ops;
+ parser->flags = CborParserFlag_ExternalSource;
+ it->parser = parser;
+ it->source.token = token;
+ it->remaining = 1;
+ return preparse_value(it);
+}
+
+/**
+ * \fn bool cbor_value_at_end(const CborValue *it)
+ *
+ * Returns true if \a it has reached the end of the iteration, usually when
+ * advancing after the last item in an array or map.
+ *
+ * In the case of the outermost CborValue object, this function returns true
+ * after decoding a single element. A pointer to the first byte of the
+ * remaining data (if any) can be obtained with cbor_value_get_next_byte().
+ *
+ * \sa cbor_value_advance(), cbor_value_is_valid(), cbor_value_get_next_byte()
+ */
+
+/**
+ * \fn const uint8_t *cbor_value_get_next_byte(const CborValue *it)
+ *
+ * Returns a pointer to the next byte that would be decoded if this CborValue
+ * object were advanced.
+ *
+ * This function is useful if cbor_value_at_end() returns true for the
+ * outermost CborValue: the pointer returned is the first byte of the data
+ * remaining in the buffer, if any. Code can decide whether to begin decoding a
+ * new CBOR data stream from this point, or parse some other data appended to
+ * the same buffer.
+ *
+ * This function may be used even after a parsing error. If that occurred,
+ * then this function returns a pointer to where the parsing error occurred.
+ * Note that the error recovery is not precise and the pointer may not indicate
+ * the exact byte containing bad data.
+ *
+ * This function makes sense only when using a linear buffer (that is, when the
+ * parser is initialize by cbor_parser_init()). If using an external source,
+ * this function may return garbage; instead, consult the external source itself
+ * to find out more details about the presence of more data.
+ *
+ * \sa cbor_value_at_end()
+ */
+
+CborError cbor_value_reparse(CborValue *it)
+{
+ if (it->flags & CborIteratorFlag_IteratingStringChunks)
+ return CborNoError;
+ return preparse_next_value_nodecrement(it);
+}
+
+/**
+ * \fn bool cbor_value_is_valid(const CborValue *it)
+ *
+ * Returns true if the iterator \a it contains a valid value. Invalid iterators
+ * happen when iteration reaches the end of a container (see \ref
+ * cbor_value_at_end()) or when a search function resulted in no matches.
+ *
+ * \sa cbor_value_advance(), cbor_value_at_end(), cbor_value_get_type()
+ */
+
+/**
+ * Performs a basic validation of the CBOR stream pointed by \a it and returns
+ * the error it found. If no error was found, it returns CborNoError and the
+ * application can iterate over the items with certainty that no other errors
+ * will appear during parsing.
+ *
+ * A basic validation checks for:
+ * \list
+ * \li absence of undefined additional information bytes;
+ * \li well-formedness of all numbers, lengths, and simple values;
+ * \li string contents match reported sizes;
+ * \li arrays and maps contain the number of elements they are reported to have;
+ * \endlist
+ *
+ * For further checks, see cbor_value_validate().
+ *
+ * This function has the same timing and memory requirements as
+ * cbor_value_advance().
+ *
+ * \sa cbor_value_validate(), cbor_value_advance()
+ */
+CborError cbor_value_validate_basic(const CborValue *it)
+{
+ CborValue value = *it;
+ return cbor_value_advance(&value);
+}
+
+/**
+ * Advances the CBOR value \a it by one fixed-size position. Fixed-size types
+ * are: integers, tags, simple types (including boolean, null and undefined
+ * values) and floating point types.
+ *
+ * If the type is not of fixed size, this function has undefined behavior. Code
+ * must be sure that the current type is one of the fixed-size types before
+ * calling this function. This function is provided because it can guarantee
+ * that it runs in constant time (O(1)).
+ *
+ * If the caller is not able to determine whether the type is fixed or not, code
+ * can use the cbor_value_advance() function instead.
+ *
+ * \sa cbor_value_at_end(), cbor_value_advance(), cbor_value_enter_container(), cbor_value_leave_container()
+ */
+CborError cbor_value_advance_fixed(CborValue *it)
+{
+ cbor_assert(it->type != CborInvalidType);
+ cbor_assert(is_fixed_type(it->type));
+ if (!it->remaining)
+ return CborErrorAdvancePastEOF;
+ return advance_internal(it);
+}
+
+static CborError advance_recursive(CborValue *it, int nestingLevel)
+{
+ if (is_fixed_type(it->type))
+ return advance_internal(it);
+
+ if (!cbor_value_is_container(it)) {
+ size_t len = SIZE_MAX;
+ return _cbor_value_copy_string(it, NULL, &len, it);
+ }
+
+ /* map or array */
+ if (nestingLevel == 0)
+ return CborErrorNestingTooDeep;
+
+ CborError err;
+ CborValue recursed;
+ err = cbor_value_enter_container(it, &recursed);
+ if (err)
+ return err;
+ while (!cbor_value_at_end(&recursed)) {
+ err = advance_recursive(&recursed, nestingLevel - 1);
+ if (err)
+ return err;
+ }
+ return cbor_value_leave_container(it, &recursed);
+}
+
+
+/**
+ * Advances the CBOR value \a it by one element, skipping over containers.
+ * Unlike cbor_value_advance_fixed(), this function can be called on a CBOR
+ * value of any type. However, if the type is a container (map or array) or a
+ * string with a chunked payload, this function will not run in constant time
+ * and will recurse into itself (it will run on O(n) time for the number of
+ * elements or chunks and will use O(n) memory for the number of nested
+ * containers).
+ *
+ * The number of recursions can be limited at compile time to avoid stack
+ * exhaustion in constrained systems.
+ *
+ * \sa cbor_value_at_end(), cbor_value_advance_fixed(), cbor_value_enter_container(), cbor_value_leave_container()
+ */
+CborError cbor_value_advance(CborValue *it)
+{
+ cbor_assert(it->type != CborInvalidType);
+ if (!it->remaining)
+ return CborErrorAdvancePastEOF;
+ return advance_recursive(it, CBOR_PARSER_MAX_RECURSIONS);
+}
+
+/**
+ * \fn bool cbor_value_is_tag(const CborValue *value)
+ *
+ * Returns true if the iterator \a value is valid and points to a CBOR tag.
+ *
+ * \sa cbor_value_get_tag(), cbor_value_skip_tag()
+ */
+
+/**
+ * \fn CborError cbor_value_get_tag(const CborValue *value, CborTag *result)
+ *
+ * Retrieves the CBOR tag value that \a value points to and stores it in \a
+ * result. If the iterator \a value does not point to a CBOR tag value, the
+ * behavior is undefined, so checking with \ref cbor_value_get_type or with
+ * \ref cbor_value_is_tag is recommended.
+ *
+ * \sa cbor_value_get_type(), cbor_value_is_valid(), cbor_value_is_tag()
+ */
+
+/**
+ * Advances the CBOR value \a it until it no longer points to a tag. If \a it is
+ * already not pointing to a tag, then this function returns it unchanged.
+ *
+ * This function does not run in constant time: it will run on O(n) for n being
+ * the number of tags. It does use constant memory (O(1) memory requirements).
+ *
+ * \sa cbor_value_advance_fixed(), cbor_value_advance()
+ */
+CborError cbor_value_skip_tag(CborValue *it)
+{
+ while (cbor_value_is_tag(it)) {
+ CborError err = cbor_value_advance_fixed(it);
+ if (err)
+ return err;
+ }
+ return CborNoError;
+}
+
+/**
+ * \fn bool cbor_value_is_container(const CborValue *it)
+ *
+ * Returns true if the \a it value is a container and requires recursion in
+ * order to decode (maps and arrays), false otherwise.
+ */
+
+/**
+ * Creates a CborValue iterator pointing to the first element of the container
+ * represented by \a it and saves it in \a recursed. The \a it container object
+ * needs to be kept and passed again to cbor_value_leave_container() in order
+ * to continue iterating past this container.
+ *
+ * The \a it CborValue iterator must point to a container.
+ *
+ * \sa cbor_value_is_container(), cbor_value_leave_container(), cbor_value_advance()
+ */
+CborError cbor_value_enter_container(const CborValue *it, CborValue *recursed)
+{
+ cbor_static_assert(CborIteratorFlag_ContainerIsMap == (CborMapType & ~CborArrayType));
+ cbor_assert(cbor_value_is_container(it));
+ *recursed = *it;
+
+ if (it->flags & CborIteratorFlag_UnknownLength) {
+ recursed->remaining = UINT32_MAX;
+ advance_bytes(recursed, 1);
+ } else {
+ uint64_t len = extract_number_and_advance(recursed);
+
+ recursed->remaining = (uint32_t)len;
+ if (recursed->remaining != len || len == UINT32_MAX) {
+ /* back track the pointer to indicate where the error occurred */
+ copy_current_position(recursed, it);
+ return CborErrorDataTooLarge;
+ }
+ if (recursed->type == CborMapType) {
+ /* maps have keys and values, so we need to multiply by 2 */
+ if (recursed->remaining > UINT32_MAX / 2) {
+ /* back track the pointer to indicate where the error occurred */
+ copy_current_position(recursed, it);
+ return CborErrorDataTooLarge;
+ }
+ recursed->remaining *= 2;
+ }
+ if (len == 0) {
+ /* the case of the empty container */
+ recursed->type = CborInvalidType;
+ return CborNoError;
+ }
+ }
+ recursed->flags = (recursed->type & CborIteratorFlag_ContainerIsMap);
+ return preparse_next_value_nodecrement(recursed);
+}
+
+/**
+ * Updates \a it to point to the next element after the container. The \a
+ * recursed object needs to point to the element obtained either by advancing
+ * the last element of the container (via cbor_value_advance(),
+ * cbor_value_advance_fixed(), a nested cbor_value_leave_container(), or the \c
+ * next pointer from cbor_value_copy_string() or cbor_value_dup_string()).
+ *
+ * The \a it and \a recursed parameters must be the exact same as passed to
+ * cbor_value_enter_container().
+ *
+ * \sa cbor_value_enter_container(), cbor_value_at_end()
+ */
+CborError cbor_value_leave_container(CborValue *it, const CborValue *recursed)
+{
+ cbor_assert(cbor_value_is_container(it));
+ cbor_assert(recursed->type == CborInvalidType);
+
+ copy_current_position(it, recursed);
+ if (recursed->flags & CborIteratorFlag_UnknownLength)
+ advance_bytes(it, 1);
+ return preparse_next_value(it);
+}
+
+
+/**
+ * \fn CborType cbor_value_get_type(const CborValue *value)
+ *
+ * Returns the type of the CBOR value that the iterator \a value points to. If
+ * \a value does not point to a valid value, this function returns \ref
+ * CborInvalidType.
+ *
+ * TinyCBOR also provides functions to test directly if a given CborValue object
+ * is of a given type, like cbor_value_is_text_string() and cbor_value_is_null().
+ *
+ * \sa cbor_value_is_valid()
+ */
+
+/**
+ * \fn bool cbor_value_is_null(const CborValue *value)
+ *
+ * Returns true if the iterator \a value is valid and points to a CBOR null type.
+ *
+ * \sa cbor_value_is_valid(), cbor_value_is_undefined()
+ */
+
+/**
+ * \fn bool cbor_value_is_undefined(const CborValue *value)
+ *
+ * Returns true if the iterator \a value is valid and points to a CBOR undefined type.
+ *
+ * \sa cbor_value_is_valid(), cbor_value_is_null()
+ */
+
+/**
+ * \fn bool cbor_value_is_boolean(const CborValue *value)
+ *
+ * Returns true if the iterator \a value is valid and points to a CBOR boolean
+ * type (true or false).
+ *
+ * \sa cbor_value_is_valid(), cbor_value_get_boolean()
+ */
+
+/**
+ * \fn CborError cbor_value_get_boolean(const CborValue *value, bool *result)
+ *
+ * Retrieves the boolean value that \a value points to and stores it in \a
+ * result. If the iterator \a value does not point to a boolean value, the
+ * behavior is undefined, so checking with \ref cbor_value_get_type or with
+ * \ref cbor_value_is_boolean is recommended.
+ *
+ * \sa cbor_value_get_type(), cbor_value_is_valid(), cbor_value_is_boolean()
+ */
+
+/**
+ * \fn bool cbor_value_is_simple_type(const CborValue *value)
+ *
+ * Returns true if the iterator \a value is valid and points to a CBOR Simple Type
+ * type (other than true, false, null and undefined).
+ *
+ * \sa cbor_value_is_valid(), cbor_value_get_simple_type()
+ */
+
+/**
+ * \fn CborError cbor_value_get_simple_type(const CborValue *value, uint8_t *result)
+ *
+ * Retrieves the CBOR Simple Type value that \a value points to and stores it
+ * in \a result. If the iterator \a value does not point to a simple_type
+ * value, the behavior is undefined, so checking with \ref cbor_value_get_type
+ * or with \ref cbor_value_is_simple_type is recommended.
+ *
+ * \sa cbor_value_get_type(), cbor_value_is_valid(), cbor_value_is_simple_type()
+ */
+
+/**
+ * \fn bool cbor_value_is_integer(const CborValue *value)
+ *
+ * Returns true if the iterator \a value is valid and points to a CBOR integer
+ * type.
+ *
+ * \sa cbor_value_is_valid(), cbor_value_get_int, cbor_value_get_int64, cbor_value_get_uint64, cbor_value_get_raw_integer
+ */
+
+/**
+ * \fn bool cbor_value_is_unsigned_integer(const CborValue *value)
+ *
+ * Returns true if the iterator \a value is valid and points to a CBOR unsigned
+ * integer type (positive values or zero).
+ *
+ * \sa cbor_value_is_valid(), cbor_value_get_uint64()
+ */
+
+/**
+ * \fn bool cbor_value_is_negative_integer(const CborValue *value)
+ *
+ * Returns true if the iterator \a value is valid and points to a CBOR negative
+ * integer type.
+ *
+ * \sa cbor_value_is_valid(), cbor_value_get_int, cbor_value_get_int64, cbor_value_get_raw_integer
+ */
+
+/**
+ * \fn CborError cbor_value_get_int(const CborValue *value, int *result)
+ *
+ * Retrieves the CBOR integer value that \a value points to and stores it in \a
+ * result. If the iterator \a value does not point to an integer value, the
+ * behavior is undefined, so checking with \ref cbor_value_get_type or with
+ * \ref cbor_value_is_integer is recommended.
+ *
+ * Note that this function does not do range-checking: integral values that do
+ * not fit in a variable of type \c{int} are silently truncated to fit. Use
+ * cbor_value_get_int_checked() if that is not acceptable.
+ *
+ * \sa cbor_value_get_type(), cbor_value_is_valid(), cbor_value_is_integer()
+ */
+
+/**
+ * \fn CborError cbor_value_get_int64(const CborValue *value, int64_t *result)
+ *
+ * Retrieves the CBOR integer value that \a value points to and stores it in \a
+ * result. If the iterator \a value does not point to an integer value, the
+ * behavior is undefined, so checking with \ref cbor_value_get_type or with
+ * \ref cbor_value_is_integer is recommended.
+ *
+ * Note that this function does not do range-checking: integral values that do
+ * not fit in a variable of type \c{int64_t} are silently truncated to fit. Use
+ * cbor_value_get_int64_checked() that is not acceptable.
+ *
+ * \sa cbor_value_get_type(), cbor_value_is_valid(), cbor_value_is_integer()
+ */
+
+/**
+ * \fn CborError cbor_value_get_uint64(const CborValue *value, uint64_t *result)
+ *
+ * Retrieves the CBOR integer value that \a value points to and stores it in \a
+ * result. If the iterator \a value does not point to an unsigned integer
+ * value, the behavior is undefined, so checking with \ref cbor_value_get_type
+ * or with \ref cbor_value_is_unsigned_integer is recommended.
+ *
+ * \sa cbor_value_get_type(), cbor_value_is_valid(), cbor_value_is_unsigned_integer()
+ */
+
+/**
+ * \fn CborError cbor_value_get_raw_integer(const CborValue *value, uint64_t *result)
+ *
+ * Retrieves the CBOR integer value that \a value points to and stores it in \a
+ * result. If the iterator \a value does not point to an integer value, the
+ * behavior is undefined, so checking with \ref cbor_value_get_type or with
+ * \ref cbor_value_is_integer is recommended.
+ *
+ * This function is provided because CBOR negative integers can assume values
+ * that cannot be represented with normal 64-bit integer variables.
+ *
+ * If the integer is unsigned (that is, if cbor_value_is_unsigned_integer()
+ * returns true), then \a result will contain the actual value. If the integer
+ * is negative, then \a result will contain the absolute value of that integer,
+ * minus one. That is, \c {actual = -result - 1}. On architectures using two's
+ * complement for representation of negative integers, it is equivalent to say
+ * that \a result will contain the bitwise negation of the actual value.
+ *
+ * \sa cbor_value_get_type(), cbor_value_is_valid(), cbor_value_is_integer()
+ */
+
+/**
+ * Retrieves the CBOR integer value that \a value points to and stores it in \a
+ * result. If the iterator \a value does not point to an integer value, the
+ * behavior is undefined, so checking with \ref cbor_value_get_type or with
+ * \ref cbor_value_is_integer is recommended.
+ *
+ * Unlike \ref cbor_value_get_int64(), this function performs a check to see if the
+ * stored integer fits in \a result without data loss. If the number is outside
+ * the valid range for the data type, this function returns the recoverable
+ * error CborErrorDataTooLarge. In that case, use either
+ * cbor_value_get_uint64() (if the number is positive) or
+ * cbor_value_get_raw_integer().
+ *
+ * \sa cbor_value_get_type(), cbor_value_is_valid(), cbor_value_is_integer(), cbor_value_get_int64()
+ */
+CborError cbor_value_get_int64_checked(const CborValue *value, int64_t *result)
+{
+ cbor_assert(cbor_value_is_integer(value));
+ uint64_t v = _cbor_value_extract_int64_helper(value);
+
+ /* Check before converting, as the standard says (C11 6.3.1.3 paragraph 3):
+ * "[if] the new type is signed and the value cannot be represented in it; either the
+ * result is implementation-defined or an implementation-defined signal is raised."
+ *
+ * The range for int64_t is -2^63 to 2^63-1 (int64_t is required to be
+ * two's complement, C11 7.20.1.1 paragraph 3), which in CBOR is
+ * represented the same way, differing only on the "sign bit" (the major
+ * type).
+ */
+
+ if (unlikely(v > (uint64_t)INT64_MAX))
+ return CborErrorDataTooLarge;
+
+ *result = v;
+ if (value->flags & CborIteratorFlag_NegativeInteger)
+ *result = -*result - 1;
+ return CborNoError;
+}
+
+/**
+ * Retrieves the CBOR integer value that \a value points to and stores it in \a
+ * result. If the iterator \a value does not point to an integer value, the
+ * behavior is undefined, so checking with \ref cbor_value_get_type or with
+ * \ref cbor_value_is_integer is recommended.
+ *
+ * Unlike \ref cbor_value_get_int(), this function performs a check to see if the
+ * stored integer fits in \a result without data loss. If the number is outside
+ * the valid range for the data type, this function returns the recoverable
+ * error CborErrorDataTooLarge. In that case, use one of the other integer
+ * functions to obtain the value.
+ *
+ * \sa cbor_value_get_type(), cbor_value_is_valid(), cbor_value_is_integer(), cbor_value_get_int64(),
+ * cbor_value_get_uint64(), cbor_value_get_int64_checked(), cbor_value_get_raw_integer()
+ */
+CborError cbor_value_get_int_checked(const CborValue *value, int *result)
+{
+ cbor_assert(cbor_value_is_integer(value));
+ uint64_t v = _cbor_value_extract_int64_helper(value);
+
+ /* Check before converting, as the standard says (C11 6.3.1.3 paragraph 3):
+ * "[if] the new type is signed and the value cannot be represented in it; either the
+ * result is implementation-defined or an implementation-defined signal is raised."
+ *
+ * But we can convert from signed to unsigned without fault (paragraph 2).
+ *
+ * The range for int is implementation-defined and int is not guaranteed to use
+ * two's complement representation (although int32_t is).
+ */
+
+ if (value->flags & CborIteratorFlag_NegativeInteger) {
+ if (unlikely(v > (unsigned) -(INT_MIN + 1)))
+ return CborErrorDataTooLarge;
+
+ *result = (int)v;
+ *result = -*result - 1;
+ } else {
+ if (unlikely(v > (uint64_t)INT_MAX))
+ return CborErrorDataTooLarge;
+
+ *result = (int)v;
+ }
+ return CborNoError;
+
+}
+
+/**
+ * \fn bool cbor_value_is_length_known(const CborValue *value)
+ *
+ * Returns true if the length of this type is known without calculation. That
+ * is, if the length of this CBOR string, map or array is encoded in the data
+ * stream, this function returns true. If the length is not encoded, it returns
+ * false.
+ *
+ * If the length is known, code can call cbor_value_get_string_length(),
+ * cbor_value_get_array_length() or cbor_value_get_map_length() to obtain the
+ * length. If the length is not known but is necessary, code can use the
+ * cbor_value_calculate_string_length() function (no equivalent function is
+ * provided for maps and arrays).
+ */
+
+/**
+ * \fn bool cbor_value_is_text_string(const CborValue *value)
+ *
+ * Returns true if the iterator \a value is valid and points to a CBOR text
+ * string. CBOR text strings are UTF-8 encoded and usually contain
+ * human-readable text.
+ *
+ * \sa cbor_value_is_valid(), cbor_value_get_string_length(), cbor_value_calculate_string_length(),
+ * cbor_value_copy_text_string(), cbor_value_dup_text_string()
+ */
+
+/**
+ * \fn bool cbor_value_is_byte_string(const CborValue *value)
+ *
+ * Returns true if the iterator \a value is valid and points to a CBOR text
+ * string. CBOR byte strings are binary data with no specified encoding or
+ * format.
+ *
+ * \sa cbor_value_is_valid(), cbor_value_get_string_length(), cbor_value_calculate_string_length(),
+ * cbor_value_copy_byte_string(), cbor_value_dup_byte_string()
+ */
+
+/**
+ * \fn CborError cbor_value_get_string_length(const CborValue *value, size_t *length)
+ *
+ * Extracts the length of the byte or text string that \a value points to and
+ * stores it in \a result. If the iterator \a value does not point to a text
+ * string or a byte string, the behaviour is undefined, so checking with \ref
+ * cbor_value_get_type, with \ref cbor_value_is_text_string or \ref
+ * cbor_value_is_byte_string is recommended.
+ *
+ * If the length of this string is not encoded in the CBOR data stream, this
+ * function will return the recoverable error CborErrorUnknownLength. You may
+ * also check whether that is the case by using cbor_value_is_length_known().
+ *
+ * If the length of the string is required but the length was not encoded, use
+ * cbor_value_calculate_string_length(), but note that that function does not
+ * run in constant time.
+ *
+ * \note On 32-bit platforms, this function will return error condition of \ref
+ * CborErrorDataTooLarge if the stream indicates a length that is too big to
+ * fit in 32-bit.
+ *
+ * \sa cbor_value_is_valid(), cbor_value_is_length_known(), cbor_value_calculate_string_length()
+ */
+
+/**
+ * Calculates the length of the byte or text string that \a value points to and
+ * stores it in \a len. If the iterator \a value does not point to a text
+ * string or a byte string, the behaviour is undefined, so checking with \ref
+ * cbor_value_get_type, with \ref cbor_value_is_text_string or \ref
+ * cbor_value_is_byte_string is recommended.
+ *
+ * This function is different from cbor_value_get_string_length() in that it
+ * calculates the length even for strings sent in chunks. For that reason, this
+ * function may not run in constant time (it will run in O(n) time on the
+ * number of chunks). It does use constant memory (O(1)).
+ *
+ * \note On 32-bit platforms, this function will return error condition of \ref
+ * CborErrorDataTooLarge if the stream indicates a length that is too big to
+ * fit in 32-bit.
+ *
+ * \sa cbor_value_get_string_length(), cbor_value_copy_text_string(), cbor_value_copy_byte_string(), cbor_value_is_length_known()
+ */
+CborError cbor_value_calculate_string_length(const CborValue *value, size_t *len)
+{
+ *len = SIZE_MAX;
+ return _cbor_value_copy_string(value, NULL, len, NULL);
+}
+
+CborError _cbor_value_begin_string_iteration(CborValue *it)
+{
+ it->flags |= CborIteratorFlag_IteratingStringChunks |
+ CborIteratorFlag_BeforeFirstStringChunk;
+ if (!cbor_value_is_length_known(it)) {
+ /* chunked string: we're before the first chunk;
+ * advance to the first chunk */
+ advance_bytes(it, 1);
+ }
+
+ return CborNoError;
+}
+
+CborError _cbor_value_finish_string_iteration(CborValue *it)
+{
+ if (!cbor_value_is_length_known(it))
+ advance_bytes(it, 1); /* skip the Break */
+
+ return preparse_next_value(it);
+}
+
+static CborError get_string_chunk_size(const CborValue *it, size_t *offset, size_t *len)
+{
+ uint8_t descriptor;
+ size_t bytesNeeded = 1;
+
+ if (cbor_value_is_length_known(it) && (it->flags & CborIteratorFlag_BeforeFirstStringChunk) == 0)
+ return CborErrorNoMoreStringChunks;
+
+ /* are we at the end? */
+ if (!read_bytes(it, &descriptor, 0, 1))
+ return CborErrorUnexpectedEOF;
+
+ if (descriptor == BreakByte)
+ return CborErrorNoMoreStringChunks;
+ if ((descriptor & MajorTypeMask) != it->type)
+ return CborErrorIllegalType;
+
+ /* find the string length */
+ descriptor &= SmallValueMask;
+ if (descriptor < Value8Bit) {
+ *len = descriptor;
+ } else if (unlikely(descriptor > Value64Bit)) {
+ return CborErrorIllegalNumber;
+ } else {
+ uint64_t val;
+ bytesNeeded = (size_t)(1 << (descriptor - Value8Bit));
+ if (!can_read_bytes(it, 1 + bytesNeeded))
+ return CborErrorUnexpectedEOF;
+
+ if (descriptor <= Value16Bit) {
+ if (descriptor == Value16Bit)
+ val = read_uint16(it, 1);
+ else
+ val = read_uint8(it, 1);
+ } else {
+ if (descriptor == Value32Bit)
+ val = read_uint32(it, 1);
+ else
+ val = read_uint64(it, 1);
+ }
+
+ *len = val;
+ if (*len != val)
+ return CborErrorDataTooLarge;
+
+ ++bytesNeeded;
+ }
+
+ *offset = bytesNeeded;
+ return CborNoError;
+}
+
+CborError _cbor_value_get_string_chunk_size(const CborValue *value, size_t *len)
+{
+ size_t offset;
+ return get_string_chunk_size(value, &offset, len);
+}
+
+static CborError get_string_chunk(CborValue *it, const void **bufferptr, size_t *len)
+{
+ size_t offset;
+ CborError err = get_string_chunk_size(it, &offset, len);
+ if (err)
+ return err;
+
+ /* we're good, transfer the string now */
+ err = transfer_string(it, bufferptr, offset, *len);
+ if (err)
+ return err;
+
+ /* we've iterated at least once */
+ it->flags &= ~CborIteratorFlag_BeforeFirstStringChunk;
+ return CborNoError;
+}
+
+/**
+ * \fn CborError cbor_value_get_text_string_chunk(const CborValue *value, const char **bufferptr, size_t *len, CborValue *next)
+ *
+ * Extracts one text string chunk pointed to by \a value and stores a pointer
+ * to the data in \a buffer and the size in \a len, which must not be null. If
+ * no more chunks are available, then \a bufferptr will be set to null. This
+ * function may be used to iterate over any string without causing its contents
+ * to be copied to a separate buffer, like the convenience function
+ * cbor_value_copy_text_string() does.
+ *
+ * It is designed to be used in code like:
+ *
+ * \code
+ * if (cbor_value_is_text_string(value)) {
+ * char *ptr;
+ * size_t len;
+ * while (1) {
+ * err = cbor_value_get_text_string_chunk(value, &ptr, &len, &value));
+ * if (err) return err;
+ * if (ptr == NULL) return CborNoError;
+ * consume(ptr, len);
+ * }
+ * }
+ * \endcode
+ *
+ * If the iterator \a value does not point to a text string, the behaviour is
+ * undefined, so checking with \ref cbor_value_get_type or \ref
+ * cbor_value_is_text_string is recommended.
+ *
+ * The \a next pointer, if not null, will be updated to point to the next item
+ * after this string. During iteration, the pointer must only be passed back
+ * again to this function; passing it to any other function in this library
+ * results in undefined behavior. If there are no more chunks to be read from
+ * \a value, then \a next will be set to the next item after this string; if \a
+ * value points to the last item, then \a next will be invalid.
+ *
+ * \note This function does not perform UTF-8 validation on the incoming text
+ * string.
+ *
+ * \sa cbor_value_dup_text_string(), cbor_value_copy_text_string(), cbor_value_caculate_string_length(), cbor_value_get_byte_string_chunk()
+ */
+
+/**
+ * \fn CborError cbor_value_get_byte_string_chunk(const CborValue *value, const char **bufferptr, size_t *len, CborValue *next)
+ *
+ * Extracts one byte string chunk pointed to by \a value and stores a pointer
+ * to the data in \a buffer and the size in \a len, which must not be null. If
+ * no more chunks are available, then \a bufferptr will be set to null. This
+ * function may be used to iterate over any string without causing its contents
+ * to be copied to a separate buffer, like the convenience function
+ * cbor_value_copy_byte_string() does.
+ *
+ * It is designed to be used in code like:
+ *
+ * \code
+ * if (cbor_value_is_byte_string(value)) {
+ * char *ptr;
+ * size_t len;
+ * while (1) {
+ * err = cbor_value_get_byte_string_chunk(value, &ptr, &len, &value));
+ * if (err) return err;
+ * if (ptr == NULL) return CborNoError;
+ * consume(ptr, len);
+ * }
+ * }
+ * \endcode
+ *
+ * If the iterator \a value does not point to a byte string, the behaviour is
+ * undefined, so checking with \ref cbor_value_get_type or \ref
+ * cbor_value_is_byte_string is recommended.
+ *
+ * The \a next pointer, if not null, will be updated to point to the next item
+ * after this string. During iteration, the pointer must only be passed back
+ * again to this function; passing it to any other function in this library
+ * results in undefined behavior. If there are no more chunks to be read from
+ * \a value, then \a next will be set to the next item after this string; if \a
+ * value points to the last item, then \a next will be invalid.
+ *
+ * \sa cbor_value_dup_byte_string(), cbor_value_copy_byte_string(), cbor_value_caculate_string_length(), cbor_value_get_text_string_chunk()
+ */
+
+CborError _cbor_value_get_string_chunk(const CborValue *value, const void **bufferptr,
+ size_t *len, CborValue *next)
+{
+ CborValue tmp;
+ if (!next)
+ next = &tmp;
+ *next = *value;
+ return get_string_chunk(next, bufferptr, len);
+}
+
+/* We return uintptr_t so that we can pass memcpy directly as the iteration
+ * function. The choice is to optimize for memcpy, which is used in the base
+ * parser API (cbor_value_copy_string), while memcmp is used in convenience API
+ * only. */
+typedef uintptr_t (*IterateFunction)(char *, const uint8_t *, size_t);
+
+static uintptr_t iterate_noop(char *dest, const uint8_t *src, size_t len)
+{
+ (void)dest;
+ (void)src;
+ (void)len;
+ return true;
+}
+
+static uintptr_t iterate_memcmp(char *s1, const uint8_t *s2, size_t len)
+{
+ return memcmp(s1, (const char *)s2, len) == 0;
+}
+
+static uintptr_t iterate_memcpy(char *dest, const uint8_t *src, size_t len)
+{
+ return (uintptr_t)memcpy(dest, src, len);
+}
+
+static CborError iterate_string_chunks(const CborValue *value, char *buffer, size_t *buflen,
+ bool *result, CborValue *next, IterateFunction func)
+{
+ cbor_assert(cbor_value_is_byte_string(value) || cbor_value_is_text_string(value));
+
+ CborError err;
+ CborValue tmp;
+ size_t total = 0;
+ const void *ptr;
+
+ if (!next)
+ next = &tmp;
+ *next = *value;
+ *result = true;
+
+ err = _cbor_value_begin_string_iteration(next);
+ if (err)
+ return err;
+
+ while (1) {
+ size_t newTotal;
+ size_t chunkLen;
+ err = get_string_chunk(next, &ptr, &chunkLen);
+ if (err == CborErrorNoMoreStringChunks)
+ break;
+ if (err)
+ return err;
+
+ if (unlikely(add_check_overflow(total, chunkLen, &newTotal)))
+ return CborErrorDataTooLarge;
+
+ if (*result && *buflen >= newTotal)
+ *result = !!func(buffer + total, (const uint8_t *)ptr, chunkLen);
+ else
+ *result = false;
+
+ total = newTotal;
+ }
+
+ /* is there enough room for the ending NUL byte? */
+ if (*result && *buflen > total) {
+ uint8_t nul[] = { 0 };
+ *result = !!func(buffer + total, nul, 1);
+ }
+ *buflen = total;
+ return _cbor_value_finish_string_iteration(next);
+}
+
+/**
+ * \fn CborError cbor_value_copy_text_string(const CborValue *value, char *buffer, size_t *buflen, CborValue *next)
+ *
+ * Copies the string pointed to by \a value into the buffer provided at \a buffer
+ * of \a buflen bytes. If \a buffer is a NULL pointer, this function will not
+ * copy anything and will only update the \a next value.
+ *
+ * If the iterator \a value does not point to a text string, the behaviour is
+ * undefined, so checking with \ref cbor_value_get_type or \ref
+ * cbor_value_is_text_string is recommended.
+ *
+ * If the provided buffer length was too small, this function returns an error
+ * condition of \ref CborErrorOutOfMemory. If you need to calculate the length
+ * of the string in order to preallocate a buffer, use
+ * cbor_value_calculate_string_length().
+ *
+ * On success, this function sets the number of bytes copied to \c{*buflen}. If
+ * the buffer is large enough, this function will insert a null byte after the
+ * last copied byte, to facilitate manipulation of text strings. That byte is
+ * not included in the returned value of \c{*buflen}. If there was no space for
+ * the terminating null, no error is returned, so callers must check the value
+ * of *buflen after the call, before relying on the '\0'; if it has not been
+ * changed by the call, there is no '\0'-termination on the buffer's contents.
+ *
+ * The \a next pointer, if not null, will be updated to point to the next item
+ * after this string. If \a value points to the last item, then \a next will be
+ * invalid.
+ *
+ * This function may not run in constant time (it will run in O(n) time on the
+ * number of chunks). It requires constant memory (O(1)).
+ *
+ * \note This function does not perform UTF-8 validation on the incoming text
+ * string.
+ *
+ * \sa cbor_value_get_text_string_chunk() cbor_value_dup_text_string(), cbor_value_copy_byte_string(), cbor_value_get_string_length(), cbor_value_calculate_string_length()
+ */
+
+/**
+ * \fn CborError cbor_value_copy_byte_string(const CborValue *value, uint8_t *buffer, size_t *buflen, CborValue *next)
+ *
+ * Copies the string pointed by \a value into the buffer provided at \a buffer
+ * of \a buflen bytes. If \a buffer is a NULL pointer, this function will not
+ * copy anything and will only update the \a next value.
+ *
+ * If the iterator \a value does not point to a byte string, the behaviour is
+ * undefined, so checking with \ref cbor_value_get_type or \ref
+ * cbor_value_is_byte_string is recommended.
+ *
+ * If the provided buffer length was too small, this function returns an error
+ * condition of \ref CborErrorOutOfMemory. If you need to calculate the length
+ * of the string in order to preallocate a buffer, use
+ * cbor_value_calculate_string_length().
+ *
+ * On success, this function sets the number of bytes copied to \c{*buflen}. If
+ * the buffer is large enough, this function will insert a null byte after the
+ * last copied byte, to facilitate manipulation of null-terminated strings.
+ * That byte is not included in the returned value of \c{*buflen}.
+ *
+ * The \a next pointer, if not null, will be updated to point to the next item
+ * after this string. If \a value points to the last item, then \a next will be
+ * invalid.
+ *
+ * This function may not run in constant time (it will run in O(n) time on the
+ * number of chunks). It requires constant memory (O(1)).
+ *
+ * \sa cbor_value_get_byte_string_chunk(), cbor_value_dup_text_string(), cbor_value_copy_text_string(), cbor_value_get_string_length(), cbor_value_calculate_string_length()
+ */
+
+CborError _cbor_value_copy_string(const CborValue *value, void *buffer,
+ size_t *buflen, CborValue *next)
+{
+ bool copied_all;
+ CborError err = iterate_string_chunks(value, (char*)buffer, buflen, &copied_all, next,
+ buffer ? iterate_memcpy : iterate_noop);
+ return err ? err :
+ copied_all ? CborNoError : CborErrorOutOfMemory;
+}
+
+/**
+ * Compares the entry \a value with the string \a string and stores the result
+ * in \a result. If the value is different from \a string \a result will
+ * contain \c false.
+ *
+ * The entry at \a value may be a tagged string. If \a value is not a string or
+ * a tagged string, the comparison result will be false.
+ *
+ * CBOR requires text strings to be encoded in UTF-8, but this function does
+ * not validate either the strings in the stream or the string \a string to be
+ * matched. Moreover, comparison is done on strict codepoint comparison,
+ * without any Unicode normalization.
+ *
+ * This function may not run in constant time (it will run in O(n) time on the
+ * number of chunks). It requires constant memory (O(1)).
+ *
+ * \sa cbor_value_skip_tag(), cbor_value_copy_text_string()
+ */
+CborError cbor_value_text_string_equals(const CborValue *value, const char *string, bool *result)
+{
+ CborValue copy = *value;
+ CborError err = cbor_value_skip_tag(&copy);
+ if (err)
+ return err;
+ if (!cbor_value_is_text_string(&copy)) {
+ *result = false;
+ return CborNoError;
+ }
+
+ size_t len = strlen(string);
+ return iterate_string_chunks(&copy, CONST_CAST(char *, string), &len, result, NULL, iterate_memcmp);
+}
+
+/**
+ * \fn bool cbor_value_is_array(const CborValue *value)
+ *
+ * Returns true if the iterator \a value is valid and points to a CBOR array.
+ *
+ * \sa cbor_value_is_valid(), cbor_value_is_map()
+ */
+
+/**
+ * \fn CborError cbor_value_get_array_length(const CborValue *value, size_t *length)
+ *
+ * Extracts the length of the CBOR array that \a value points to and stores it
+ * in \a result. If the iterator \a value does not point to a CBOR array, the
+ * behaviour is undefined, so checking with \ref cbor_value_get_type or \ref
+ * cbor_value_is_array is recommended.
+ *
+ * If the length of this array is not encoded in the CBOR data stream, this
+ * function will return the recoverable error CborErrorUnknownLength. You may
+ * also check whether that is the case by using cbor_value_is_length_known().
+ *
+ * \note On 32-bit platforms, this function will return error condition of \ref
+ * CborErrorDataTooLarge if the stream indicates a length that is too big to
+ * fit in 32-bit.
+ *
+ * \sa cbor_value_is_valid(), cbor_value_is_length_known()
+ */
+
+/**
+ * \fn bool cbor_value_is_map(const CborValue *value)
+ *
+ * Returns true if the iterator \a value is valid and points to a CBOR map.
+ *
+ * \sa cbor_value_is_valid(), cbor_value_is_array()
+ */
+
+/**
+ * \fn CborError cbor_value_get_map_length(const CborValue *value, size_t *length)
+ *
+ * Extracts the length of the CBOR map that \a value points to and stores it in
+ * \a result. If the iterator \a value does not point to a CBOR map, the
+ * behaviour is undefined, so checking with \ref cbor_value_get_type or \ref
+ * cbor_value_is_map is recommended.
+ *
+ * If the length of this map is not encoded in the CBOR data stream, this
+ * function will return the recoverable error CborErrorUnknownLength. You may
+ * also check whether that is the case by using cbor_value_is_length_known().
+ *
+ * \note On 32-bit platforms, this function will return error condition of \ref
+ * CborErrorDataTooLarge if the stream indicates a length that is too big to
+ * fit in 32-bit.
+ *
+ * \sa cbor_value_is_valid(), cbor_value_is_length_known()
+ */
+
+/**
+ * Attempts to find the value in map \a map that corresponds to the text string
+ * entry \a string. If the iterator \a value does not point to a CBOR map, the
+ * behaviour is undefined, so checking with \ref cbor_value_get_type or \ref
+ * cbor_value_is_map is recommended.
+ *
+ * If the item is found, it is stored in \a result. If no item is found
+ * matching the key, then \a result will contain an element of type \ref
+ * CborInvalidType. Matching is performed using
+ * cbor_value_text_string_equals(), so tagged strings will also match.
+ *
+ * This function has a time complexity of O(n) where n is the number of
+ * elements in the map to be searched. In addition, this function is has O(n)
+ * memory requirement based on the number of nested containers (maps or arrays)
+ * found as elements of this map.
+ *
+ * \sa cbor_value_is_valid(), cbor_value_text_string_equals(), cbor_value_advance()
+ */
+CborError cbor_value_map_find_value(const CborValue *map, const char *string, CborValue *element)
+{
+ cbor_assert(cbor_value_is_map(map));
+ size_t len = strlen(string);
+ CborError err = cbor_value_enter_container(map, element);
+ if (err)
+ goto error;
+
+ while (!cbor_value_at_end(element)) {
+ /* find the non-tag so we can compare */
+ err = cbor_value_skip_tag(element);
+ if (err)
+ goto error;
+ if (cbor_value_is_text_string(element)) {
+ bool equals;
+ size_t dummyLen = len;
+ err = iterate_string_chunks(element, CONST_CAST(char *, string), &dummyLen,
+ &equals, element, iterate_memcmp);
+ if (err)
+ goto error;
+ if (equals)
+ return preparse_value(element);
+ } else {
+ /* skip this key */
+ err = cbor_value_advance(element);
+ if (err)
+ goto error;
+ }
+
+ /* skip this value */
+ err = cbor_value_skip_tag(element);
+ if (err)
+ goto error;
+ err = cbor_value_advance(element);
+ if (err)
+ goto error;
+ }
+
+ /* not found */
+ element->type = CborInvalidType;
+ return CborNoError;
+
+error:
+ element->type = CborInvalidType;
+ return err;
+}
+
+/**
+ * \fn bool cbor_value_is_float(const CborValue *value)
+ *
+ * Returns true if the iterator \a value is valid and points to a CBOR
+ * single-precision floating point (32-bit).
+ *
+ * \sa cbor_value_is_valid(), cbor_value_is_double(), cbor_value_is_half_float()
+ */
+
+/**
+ * \fn CborError cbor_value_get_float(const CborValue *value, float *result)
+ *
+ * Retrieves the CBOR single-precision floating point (32-bit) value that \a
+ * value points to and stores it in \a result. If the iterator \a value does
+ * not point to a single-precision floating point value, the behavior is
+ * undefined, so checking with \ref cbor_value_get_type or with \ref
+ * cbor_value_is_float is recommended.
+ *
+ * \sa cbor_value_get_type(), cbor_value_is_valid(), cbor_value_is_float(), cbor_value_get_double()
+ */
+
+/**
+ * \fn bool cbor_value_is_double(const CborValue *value)
+ *
+ * Returns true if the iterator \a value is valid and points to a CBOR
+ * double-precision floating point (64-bit).
+ *
+ * \sa cbor_value_is_valid(), cbor_value_is_float(), cbor_value_is_half_float()
+ */
+
+/**
+ * \fn CborError cbor_value_get_double(const CborValue *value, float *result)
+ *
+ * Retrieves the CBOR double-precision floating point (64-bit) value that \a
+ * value points to and stores it in \a result. If the iterator \a value does
+ * not point to a double-precision floating point value, the behavior is
+ * undefined, so checking with \ref cbor_value_get_type or with \ref
+ * cbor_value_is_double is recommended.
+ *
+ * \sa cbor_value_get_type(), cbor_value_is_valid(), cbor_value_is_double(), cbor_value_get_float()
+ */
+
+/**
+ * \fn bool cbor_value_is_half_float(const CborValue *value)
+ *
+ * Returns true if the iterator \a value is valid and points to a CBOR
+ * single-precision floating point (16-bit).
+ *
+ * \sa cbor_value_is_valid(), cbor_value_is_double(), cbor_value_is_float()
+ */
+
+/**
+ * \fn CborError cbor_value_get_half_float(const CborValue *value, void *result)
+ *
+ * Retrieves the CBOR half-precision floating point (16-bit) value that \a
+ * value points to and stores it in \a result. If the iterator \a value does
+ * not point to a half-precision floating point value, the behavior is
+ * undefined, so checking with \ref cbor_value_get_type or with \ref
+ * cbor_value_is_half_float is recommended.
+ *
+ * Note: since the C language does not have a standard type for half-precision
+ * floating point, this function takes a \c{void *} as a parameter for the
+ * storage area, which must be at least 16 bits wide.
+ *
+ * \sa cbor_value_get_type(), cbor_value_is_valid(), cbor_value_is_half_float(), cbor_value_get_float()
+ */
+
+/** @} */
diff --git a/src/3rdparty/tinycbor/src/compilersupport_p.h b/src/3rdparty/tinycbor/src/compilersupport_p.h
new file mode 100644
index 0000000000..d9c8c1f82e
--- /dev/null
+++ b/src/3rdparty/tinycbor/src/compilersupport_p.h
@@ -0,0 +1,263 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Intel Corporation
+**
+** Permission is hereby granted, free of charge, to any person obtaining a copy
+** of this software and associated documentation files (the "Software"), to deal
+** in the Software without restriction, including without limitation the rights
+** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+** copies of the Software, and to permit persons to whom the Software is
+** furnished to do so, subject to the following conditions:
+**
+** The above copyright notice and this permission notice shall be included in
+** all copies or substantial portions of the Software.
+**
+** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+** THE SOFTWARE.
+**
+****************************************************************************/
+
+#ifndef COMPILERSUPPORT_H
+#define COMPILERSUPPORT_H
+
+#include "cbor.h"
+
+#ifndef _BSD_SOURCE
+# define _BSD_SOURCE
+#endif
+#ifndef _DEFAULT_SOURCE
+# define _DEFAULT_SOURCE
+#endif
+#ifndef assert
+# include <assert.h>
+#endif
+#include <float.h>
+#include <math.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <string.h>
+
+#ifndef __cplusplus
+# include <stdbool.h>
+#endif
+
+#ifdef __F16C__
+# include <immintrin.h>
+#endif
+
+#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L || __cpp_static_assert >= 200410
+# define cbor_static_assert(x) static_assert(x, #x)
+#elif !defined(__cplusplus) && defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) && (__STDC_VERSION__ > 199901L)
+# define cbor_static_assert(x) _Static_assert(x, #x)
+#else
+# define cbor_static_assert(x) ((void)sizeof(char[2*!!(x) - 1]))
+#endif
+#if __STDC_VERSION__ >= 199901L || defined(__cplusplus)
+/* inline is a keyword */
+#else
+/* use the definition from cbor.h */
+# define inline CBOR_INLINE
+#endif
+
+#ifdef NDEBUG
+# define cbor_assert(cond) do { if (!(cond)) unreachable(); } while (0)
+#else
+# define cbor_assert(cond) assert(cond)
+#endif
+
+#ifndef STRINGIFY
+#define STRINGIFY(x) STRINGIFY2(x)
+#endif
+#define STRINGIFY2(x) #x
+
+#if !defined(UINT32_MAX) || !defined(INT64_MAX)
+/* C89? We can define UINT32_MAX portably, but not INT64_MAX */
+# error "Your system has stdint.h but that doesn't define UINT32_MAX or INT64_MAX"
+#endif
+
+#ifndef DBL_DECIMAL_DIG
+/* DBL_DECIMAL_DIG is C11 */
+# define DBL_DECIMAL_DIG 17
+#endif
+#define DBL_DECIMAL_DIG_STR STRINGIFY(DBL_DECIMAL_DIG)
+
+#if defined(__GNUC__) && defined(__i386__) && !defined(__iamcu__)
+# define CBOR_INTERNAL_API_CC __attribute__((regparm(3)))
+#elif defined(_MSC_VER) && defined(_M_IX86)
+# define CBOR_INTERNAL_API_CC __fastcall
+#else
+# define CBOR_INTERNAL_API_CC
+#endif
+
+#ifndef __has_builtin
+# define __has_builtin(x) 0
+#endif
+
+#if (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 403)) || \
+ (__has_builtin(__builtin_bswap64) && __has_builtin(__builtin_bswap32))
+# if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+# define cbor_ntohll __builtin_bswap64
+# define cbor_htonll __builtin_bswap64
+# define cbor_ntohl __builtin_bswap32
+# define cbor_htonl __builtin_bswap32
+# ifdef __INTEL_COMPILER
+# define cbor_ntohs _bswap16
+# define cbor_htons _bswap16
+# elif (__GNUC__ * 100 + __GNUC_MINOR__ >= 608) || __has_builtin(__builtin_bswap16)
+# define cbor_ntohs __builtin_bswap16
+# define cbor_htons __builtin_bswap16
+# else
+# define cbor_ntohs(x) (((uint16_t)x >> 8) | ((uint16_t)x << 8))
+# define cbor_htons cbor_ntohs
+# endif
+# else
+# define cbor_ntohll
+# define cbor_htonll
+# define cbor_ntohl
+# define cbor_htonl
+# define cbor_ntohs
+# define cbor_htons
+# endif
+#elif defined(__sun)
+# include <sys/byteorder.h>
+#elif defined(_MSC_VER)
+/* MSVC, which implies Windows, which implies little-endian and sizeof(long) == 4 */
+# include <stdlib.h>
+# define cbor_ntohll _byteswap_uint64
+# define cbor_htonll _byteswap_uint64
+# define cbor_ntohl _byteswap_ulong
+# define cbor_htonl _byteswap_ulong
+# define cbor_ntohs _byteswap_ushort
+# define cbor_htons _byteswap_ushort
+#endif
+#ifndef cbor_ntohs
+# include <arpa/inet.h>
+# define cbor_ntohs ntohs
+# define cbor_htons htons
+#endif
+#ifndef cbor_ntohl
+# include <arpa/inet.h>
+# define cbor_ntohl ntohl
+# define cbor_htonl htonl
+#endif
+#ifndef cbor_ntohll
+# define cbor_ntohll ntohll
+# define cbor_htonll htonll
+/* ntohll isn't usually defined */
+# ifndef ntohll
+# if (defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) || \
+ (defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && __BYTE_ORDER == __BIG_ENDIAN) || \
+ (defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN) || \
+ (defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN)) || (defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)) || \
+ defined(__ARMEB__) || defined(__MIPSEB__) || defined(__s390__) || defined(__sparc__)
+# define ntohll
+# define htonll
+# elif (defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) || \
+ (defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && __BYTE_ORDER == __LITTLE_ENDIAN) || \
+ (defined(BYTE_ORDER) && defined(LITTLE_ENDIAN) && BYTE_ORDER == LITTLE_ENDIAN) || \
+ defined(_LITTLE_ENDIAN) || defined(__LITTLE_ENDIAN__) || defined(__ARMEL__) || defined(__MIPSEL__) || \
+ defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) || defined(__amd64)
+# define ntohll(x) ((ntohl((uint32_t)(x)) * UINT64_C(0x100000000)) + (ntohl((x) >> 32)))
+# define htonll ntohll
+# else
+# error "Unable to determine byte order!"
+# endif
+# endif
+#endif
+
+
+#ifdef __cplusplus
+# define CONST_CAST(t, v) const_cast<t>(v)
+#else
+/* C-style const_cast without triggering a warning with -Wcast-qual */
+# define CONST_CAST(t, v) (t)(uintptr_t)(v)
+#endif
+
+#ifdef __GNUC__
+#ifndef likely
+# define likely(x) __builtin_expect(!!(x), 1)
+#endif
+#ifndef unlikely
+# define unlikely(x) __builtin_expect(!!(x), 0)
+#endif
+# define unreachable() __builtin_unreachable()
+#elif defined(_MSC_VER)
+# define likely(x) (x)
+# define unlikely(x) (x)
+# define unreachable() __assume(0)
+#else
+# define likely(x) (x)
+# define unlikely(x) (x)
+# define unreachable() do {} while (0)
+#endif
+
+static inline bool add_check_overflow(size_t v1, size_t v2, size_t *r)
+{
+#if ((defined(__GNUC__) && (__GNUC__ >= 5)) && !defined(__INTEL_COMPILER)) || __has_builtin(__builtin_add_overflow)
+ return __builtin_add_overflow(v1, v2, r);
+#else
+ /* unsigned additions are well-defined */
+ *r = v1 + v2;
+ return v1 > v1 + v2;
+#endif
+}
+
+static inline unsigned short encode_half(double val)
+{
+#ifdef __F16C__
+ return _cvtss_sh((float)val, 3);
+#else
+ uint64_t v;
+ memcpy(&v, &val, sizeof(v));
+ int sign = v >> 63 << 15;
+ int exp = (v >> 52) & 0x7ff;
+ int mant = v << 12 >> 12 >> (53-11); /* keep only the 11 most significant bits of the mantissa */
+ exp -= 1023;
+ if (exp == 1024) {
+ /* infinity or NaN */
+ exp = 16;
+ mant >>= 1;
+ } else if (exp >= 16) {
+ /* overflow, as largest number */
+ exp = 15;
+ mant = 1023;
+ } else if (exp >= -14) {
+ /* regular normal */
+ } else if (exp >= -24) {
+ /* subnormal */
+ mant |= 1024;
+ mant >>= -(exp + 14);
+ exp = -15;
+ } else {
+ /* underflow, make zero */
+ return 0;
+ }
+
+ /* safe cast here as bit operations above guarantee not to overflow */
+ return (unsigned short)(sign | ((exp + 15) << 10) | mant);
+#endif
+}
+
+/* this function was copied & adapted from RFC 7049 Appendix D */
+static inline double decode_half(unsigned short half)
+{
+#ifdef __F16C__
+ return _cvtsh_ss(half);
+#else
+ int exp = (half >> 10) & 0x1f;
+ int mant = half & 0x3ff;
+ double val;
+ if (exp == 0) val = ldexp(mant, -24);
+ else if (exp != 31) val = ldexp(mant + 1024, exp - 25);
+ else val = mant == 0 ? INFINITY : NAN;
+ return half & 0x8000 ? -val : val;
+#endif
+}
+
+#endif /* COMPILERSUPPORT_H */
+
diff --git a/src/3rdparty/tinycbor/src/tinycbor-version.h b/src/3rdparty/tinycbor/src/tinycbor-version.h
new file mode 100644
index 0000000000..c26560cce8
--- /dev/null
+++ b/src/3rdparty/tinycbor/src/tinycbor-version.h
@@ -0,0 +1,3 @@
+#define TINYCBOR_VERSION_MAJOR 0
+#define TINYCBOR_VERSION_MINOR 6
+#define TINYCBOR_VERSION_PATCH 0
diff --git a/src/3rdparty/tinycbor/tests/.gitignore b/src/3rdparty/tinycbor/tests/.gitignore
new file mode 100644
index 0000000000..e65577d287
--- /dev/null
+++ b/src/3rdparty/tinycbor/tests/.gitignore
@@ -0,0 +1,15 @@
+Makefile
+debug
+moc_predefs.h
+release
+target_wrapper.*
+
+# The executables
+cpp/cpp
+cpp/cpp.exe
+encoder/encoder
+encoder/encoder.exe
+parser/parser
+parser/parser.exe
+tojson/tojson
+tojson/tojson.exe
diff --git a/src/3rdparty/tinycbor/tests/encoder/data.cpp b/src/3rdparty/tinycbor/tests/encoder/data.cpp
new file mode 100644
index 0000000000..c33fb605aa
--- /dev/null
+++ b/src/3rdparty/tinycbor/tests/encoder/data.cpp
@@ -0,0 +1,310 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Intel Corporation
+**
+** Permission is hereby granted, free of charge, to any person obtaining a copy
+** of this software and associated documentation files (the "Software"), to deal
+** in the Software without restriction, including without limitation the rights
+** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+** copies of the Software, and to permit persons to whom the Software is
+** furnished to do so, subject to the following conditions:
+**
+** The above copyright notice and this permission notice shall be included in
+** all copies or substantial portions of the Software.
+**
+** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+** THE SOFTWARE.
+**
+****************************************************************************/
+
+#include <QtTest>
+
+static float myNaNf()
+{
+ uint32_t v = 0x7fc00000;
+ float f;
+ memcpy(&f, &v, sizeof(f));
+ Q_ASSERT(qIsNaN(f));
+ return f;
+}
+
+static float myInff()
+{
+ uint32_t v = 0x7f800000;
+ float f;
+ memcpy(&f, &v, sizeof(f));
+ Q_ASSERT(qIsInf(f));
+ return f;
+}
+
+static float myNInff()
+{
+ uint32_t v = 0xff800000;
+ float f;
+ memcpy(&f, &v, sizeof(f));
+ Q_ASSERT(qIsInf(f));
+ return f;
+}
+
+static double myNaN()
+{
+ uint64_t v = UINT64_C(0x7ff8000000000000);
+ double f;
+ memcpy(&f, &v, sizeof(f));
+ Q_ASSERT(qIsNaN(f));
+ return f;
+}
+
+static double myInf()
+{
+ uint64_t v = UINT64_C(0x7ff0000000000000);
+ double f;
+ memcpy(&f, &v, sizeof(f));
+ Q_ASSERT(qIsInf(f));
+ return f;
+}
+
+static double myNInf()
+{
+ uint64_t v = UINT64_C(0xfff0000000000000);
+ double f;
+ memcpy(&f, &v, sizeof(f));
+ Q_ASSERT(qIsInf(f));
+ return f;
+}
+
+template <size_t N> QByteArray raw(const char (&data)[N])
+{
+ return QByteArray::fromRawData(data, N - 1);
+}
+
+struct NegativeInteger { quint64 abs; };
+Q_DECLARE_METATYPE(NegativeInteger)
+
+struct SimpleType { uint8_t type; };
+Q_DECLARE_METATYPE(SimpleType)
+
+struct Float16Standin { uint16_t val; };
+Q_DECLARE_METATYPE(Float16Standin)
+
+struct Tag { CborTag tag; QVariant tagged; };
+Q_DECLARE_METATYPE(Tag)
+
+template <typename... Args>
+QVariant make_list(const Args &... args)
+{
+ return QVariantList{args...};
+}
+
+typedef QVector<QPair<QVariant, QVariant>> Map;
+Q_DECLARE_METATYPE(Map)
+QVariant make_map(const std::initializer_list<QPair<QVariant, QVariant>> &list)
+{
+ return QVariant::fromValue(Map(list));
+}
+
+struct IndeterminateLengthArray : QVariantList { using QVariantList::QVariantList; };
+struct IndeterminateLengthMap : Map { using Map::Map; };
+Q_DECLARE_METATYPE(IndeterminateLengthArray)
+Q_DECLARE_METATYPE(IndeterminateLengthMap)
+
+QVariant make_ilarray(const std::initializer_list<QVariant> &list)
+{
+ return QVariant::fromValue(IndeterminateLengthArray(list));
+}
+
+QVariant make_ilmap(const std::initializer_list<QPair<QVariant, QVariant>> &list)
+{
+ return QVariant::fromValue(IndeterminateLengthMap(list));
+}
+
+void addColumns()
+{
+ QTest::addColumn<QByteArray>("output");
+ QTest::addColumn<QVariant>("input");
+}
+
+void addFixedData()
+{
+ // unsigned integers
+ QTest::newRow("0U") << raw("\x00") << QVariant(0U);
+ QTest::newRow("1U") << raw("\x01") << QVariant(1U);
+ QTest::newRow("10U") << raw("\x0a") << QVariant(10U);
+ QTest::newRow("23U") << raw("\x17") << QVariant(23U);
+ QTest::newRow("24U") << raw("\x18\x18") << QVariant(24U);
+ QTest::newRow("255U") << raw("\x18\xff") << QVariant(255U);
+ QTest::newRow("256U") << raw("\x19\x01\x00") << QVariant(256U);
+ QTest::newRow("65535U") << raw("\x19\xff\xff") << QVariant(65535U);
+ QTest::newRow("65536U") << raw("\x1a\0\1\x00\x00") << QVariant(65536U);
+ QTest::newRow("4294967295U") << raw("\x1a\xff\xff\xff\xff") << QVariant(4294967295U);
+ QTest::newRow("4294967296U") << raw("\x1b\0\0\0\1\0\0\0\0") << QVariant(Q_UINT64_C(4294967296));
+ QTest::newRow("UINT64_MAX") << raw("\x1b" "\xff\xff\xff\xff" "\xff\xff\xff\xff")
+ << QVariant(std::numeric_limits<quint64>::max());
+
+ // signed integers containing non-negative numbers
+ QTest::newRow("0") << raw("\x00") << QVariant(0);
+ QTest::newRow("1") << raw("\x01") << QVariant(1);
+ QTest::newRow("10") << raw("\x0a") << QVariant(10);
+ QTest::newRow("23") << raw("\x17") << QVariant(23);
+ QTest::newRow("24") << raw("\x18\x18") << QVariant(24);
+ QTest::newRow("255") << raw("\x18\xff") << QVariant(255);
+ QTest::newRow("256") << raw("\x19\x01\x00") << QVariant(256);
+ QTest::newRow("65535") << raw("\x19\xff\xff") << QVariant(65535);
+ QTest::newRow("65536") << raw("\x1a\0\1\x00\x00") << QVariant(65536);
+ QTest::newRow("4294967295") << raw("\x1a\xff\xff\xff\xff") << QVariant(Q_INT64_C(4294967295));
+ QTest::newRow("4294967296") << raw("\x1b\0\0\0\1\0\0\0\0") << QVariant(Q_INT64_C(4294967296));
+
+ // signed integers containing negative numbers
+ QTest::newRow("-1") << raw("\x20") << QVariant(-1);
+ QTest::newRow("-2") << raw("\x21") << QVariant(-2);
+ QTest::newRow("-24") << raw("\x37") << QVariant(-24);
+ QTest::newRow("-25") << raw("\x38\x18") << QVariant(-25);
+ QTest::newRow("-UINT8_MAX") << raw("\x38\xff") << QVariant(-256);
+ QTest::newRow("-UINT8_MAX-1") << raw("\x39\x01\x00") << QVariant(-257);
+ QTest::newRow("-UINT16_MAX") << raw("\x39\xff\xff") << QVariant(-65536);
+ QTest::newRow("-UINT16_MAX-1") << raw("\x3a\0\1\x00\x00") << QVariant(-65537);
+ QTest::newRow("-UINT32_MAX") << raw("\x3a\xff\xff\xff\xff") << QVariant(Q_INT64_C(-4294967296));
+ QTest::newRow("-UINT32_MAX-1") << raw("\x3b\0\0\0\1\0\0\0\0") << QVariant(Q_INT64_C(-4294967297));
+
+ // negative integers
+ auto neg = [](quint64 v) { return QVariant::fromValue<NegativeInteger>({v}); };
+ QTest::newRow("negative1") << raw("\x20") << neg(1);
+ QTest::newRow("negative2") << raw("\x21") << neg(2);
+ QTest::newRow("negative24") << raw("\x37") << neg(24);
+ QTest::newRow("negative25") << raw("\x38\x18") << neg(25);
+ QTest::newRow("negativeUINT8_MAX") << raw("\x38\xff") << neg(256);
+ QTest::newRow("negativeUINT8_MAX-1") << raw("\x39\x01\x00") << neg(257);
+ QTest::newRow("negativeUINT16_MAX") << raw("\x39\xff\xff") << neg(65536);
+ QTest::newRow("negativeUINT16_MAX-1") << raw("\x3a\0\1\x00\x00") << neg(65537);
+ QTest::newRow("negativeUINT32_MAX") << raw("\x3a\xff\xff\xff\xff") << neg(Q_UINT64_C(4294967296));
+ QTest::newRow("negativeUINT32_MAX-1") << raw("\x3b\0\0\0\1\0\0\0\0") << neg(Q_UINT64_C(4294967297));
+ QTest::newRow("negativeUINT64_MAX") << raw("\x3b" "\xff\xff\xff\xff" "\xff\xff\xff\xfe")
+ << neg(std::numeric_limits<quint64>::max());
+ QTest::newRow("negativeUINT64_MAX+1") << raw("\x3b" "\xff\xff\xff\xff" "\xff\xff\xff\xff") << neg(0);
+
+ QTest::newRow("simple0") << raw("\xe0") << QVariant::fromValue(SimpleType{0});
+ QTest::newRow("simple19") << raw("\xf3") << QVariant::fromValue(SimpleType{19});
+ QTest::newRow("false") << raw("\xf4") << QVariant(false);
+ QTest::newRow("true") << raw("\xf5") << QVariant(true);
+ QTest::newRow("null") << raw("\xf6") << QVariant::fromValue<void *>(nullptr);
+ QTest::newRow("undefined") << raw("\xf7") << QVariant();
+ QTest::newRow("simple32") << raw("\xf8\x20") << QVariant::fromValue(SimpleType{32});
+ QTest::newRow("simple255") << raw("\xf8\xff") << QVariant::fromValue(SimpleType{255});
+
+ // floating point
+#if QT_VERSION < QT_VERSION_CHECK(5, 9, 0)
+ QTest::newRow("0.f16") << raw("\xf9\0\0") << QVariant::fromValue(Float16Standin{0x0000});
+#else
+ QTest::newRow("0.f16") << raw("\xf9\0\0") << QVariant::fromValue(qfloat16(0));
+ QTest::newRow("-1.f16") << raw("\xf9\xbc\0") << QVariant::fromValue(qfloat16(-1));
+ QTest::newRow("1.5f16") << raw("\xf9\x3e\0") << QVariant::fromValue(qfloat16(1.5));
+ QTest::newRow("nan_f16") << raw("\xf9\x7e\0") << QVariant::fromValue<qfloat16>(myNaNf());
+ QTest::newRow("-inf_f16") << raw("\xf9\xfc\0") << QVariant::fromValue<qfloat16>(myNInff());
+ QTest::newRow("+inf_f16") << raw("\xf9\x7c\0") << QVariant::fromValue<qfloat16>(myInff());
+#endif
+
+ QTest::newRow("0.f") << raw("\xfa\0\0\0\0") << QVariant::fromValue(0.f);
+ QTest::newRow("0.") << raw("\xfb\0\0\0\0\0\0\0\0") << QVariant(0.);
+ QTest::newRow("-1.f") << raw("\xfa\xbf\x80\0\0") << QVariant::fromValue(-1.f);
+ QTest::newRow("-1.") << raw("\xfb\xbf\xf0\0\0\0\0\0\0") << QVariant(-1.);
+ QTest::newRow("16777215.f") << raw("\xfa\x4b\x7f\xff\xff") << QVariant::fromValue(16777215.f);
+ QTest::newRow("16777215.") << raw("\xfb\x41\x6f\xff\xff\xe0\0\0\0") << QVariant::fromValue(16777215.);
+ QTest::newRow("-16777215.f") << raw("\xfa\xcb\x7f\xff\xff") << QVariant(-16777215.f);
+ QTest::newRow("-16777215.") << raw("\xfb\xc1\x6f\xff\xff\xe0\0\0\0") << QVariant::fromValue(-16777215.);
+
+ QTest::newRow("nan_f") << raw("\xfa\x7f\xc0\0\0") << QVariant::fromValue<float>(myNaNf());
+ QTest::newRow("nan") << raw("\xfb\x7f\xf8\0\0\0\0\0\0") << QVariant(myNaN());
+ QTest::newRow("-inf_f") << raw("\xfa\xff\x80\0\0") << QVariant::fromValue<float>(myNInff());
+ QTest::newRow("-inf") << raw("\xfb\xff\xf0\0\0\0\0\0\0") << QVariant(myNInf());
+ QTest::newRow("+inf_f") << raw("\xfa\x7f\x80\0\0") << QVariant::fromValue<float>(myInff());
+ QTest::newRow("+inf") << raw("\xfb\x7f\xf0\0\0\0\0\0\0") << QVariant(myInf());
+}
+
+void addStringsData()
+{
+ // byte strings
+ QTest::newRow("emptybytestring") << raw("\x40") << QVariant(QByteArray(""));
+ QTest::newRow("bytestring1") << raw("\x41 ") << QVariant(QByteArray(" "));
+ QTest::newRow("bytestring1-nul") << raw("\x41\0") << QVariant(QByteArray("", 1));
+ QTest::newRow("bytestring5") << raw("\x45Hello") << QVariant(QByteArray("Hello"));
+ QTest::newRow("bytestring24") << raw("\x58\x18""123456789012345678901234")
+ << QVariant(QByteArray("123456789012345678901234"));
+ QTest::newRow("bytestring256") << raw("\x59\1\0") + QByteArray(256, '3')
+ << QVariant(QByteArray(256, '3'));
+
+ // text strings
+ QTest::newRow("emptytextstring") << raw("\x60") << QVariant("");
+ QTest::newRow("textstring1") << raw("\x61 ") << QVariant(" ");
+ QTest::newRow("textstring1-nul") << raw("\x61\0") << QVariant(QString::fromLatin1("", 1));
+ QTest::newRow("textstring5") << raw("\x65Hello") << QVariant("Hello");
+ QTest::newRow("textstring24") << raw("\x78\x18""123456789012345678901234")
+ << QVariant("123456789012345678901234");
+ QTest::newRow("textstring256") << raw("\x79\1\0") + QByteArray(256, '3')
+ << QVariant(QString(256, '3'));
+}
+
+void addArraysAndMaps()
+{
+ QTest::newRow("emptyarray") << raw("\x80") << make_list();
+ QTest::newRow("emptymap") << raw("\xa0") << make_map({});
+
+ QTest::newRow("array-0") << raw("\x81\0") << make_list(0);
+ QTest::newRow("array-{0-0}") << raw("\x82\0\0") << make_list(0, 0);
+ QTest::newRow("array-Hello") << raw("\x81\x65Hello") << make_list("Hello");
+ QTest::newRow("array-array-0") << raw("\x81\x81\0") << make_list(make_list(0));
+ QTest::newRow("array-array-{0-0}") << raw("\x81\x82\0\0") << make_list(make_list(0, 0));
+ QTest::newRow("array-array-0-0") << raw("\x82\x81\0\0") << make_list(make_list(0),0);
+ QTest::newRow("array-array-Hello") << raw("\x81\x81\x65Hello") << make_list(make_list("Hello"));
+
+ QTest::newRow("map-0:0") << raw("\xa1\0\0") << make_map({{0,0}});
+ QTest::newRow("map-0:0-1:1") << raw("\xa2\0\0\1\1") << make_map({{0,0}, {1,1}});
+ QTest::newRow("map-0:{map-0:0-1:1}") << raw("\xa1\0\xa2\0\0\1\1") << make_map({{0, make_map({{0,0}, {1,1}})}});
+
+ QTest::newRow("array-map1") << raw("\x81\xa1\0\0") << make_list(make_map({{0,0}}));
+ QTest::newRow("array-map2") << raw("\x82\xa1\0\0\xa1\1\1") << make_list(make_map({{0,0}}), make_map({{1,1}}));
+
+ QTest::newRow("map-array1") << raw("\xa1\x62oc\x81\0") << make_map({{"oc", make_list(0)}});
+ QTest::newRow("map-array2") << raw("\xa1\x62oc\x84\0\1\2\3") << make_map({{"oc", make_list(0, 1, 2, 3)}});
+ QTest::newRow("map-array3") << raw("\xa2\x62oc\x82\0\1\2\3") << make_map({{"oc", make_list(0, 1)}, {2, 3}});
+
+ // indeterminate length
+ QTest::newRow("_emptyarray") << raw("\x9f\xff") << QVariant::fromValue(IndeterminateLengthArray{});
+ QTest::newRow("_emptymap") << raw("\xbf\xff") << make_ilmap({});
+
+ QTest::newRow("_array-0") << raw("\x9f\0\xff") << make_ilarray({0});
+ QTest::newRow("_array-{0-0}") << raw("\x9f\0\0\xff") << make_ilarray({0, 0});
+ QTest::newRow("_array-Hello") << raw("\x9f\x65Hello\xff") << make_ilarray({"Hello"});
+ QTest::newRow("_array-array-0") << raw("\x9f\x81\0\xff") << make_ilarray({make_list(0)});
+ QTest::newRow("_array-_array-0") << raw("\x9f\x9f\0\xff\xff") << make_ilarray({make_ilarray({0})});
+ QTest::newRow("_array-_array-{0-0}") << raw("\x9f\x9f\0\0\xff\xff") << make_ilarray({make_ilarray({0, 0})});
+ QTest::newRow("_array-_array-0-0") << raw("\x9f\x9f\0\xff\0\xff") << make_ilarray({make_ilarray({0}),0});
+ QTest::newRow("_array-_array-Hello") << raw("\x9f\x9f\x65Hello\xff\xff") << make_ilarray({make_ilarray({"Hello"})});
+
+ QTest::newRow("_map-0:0") << raw("\xbf\0\0\xff") << make_ilmap({{0,0}});
+ QTest::newRow("_map-0:0-1:1") << raw("\xbf\0\0\1\1\xff") << make_ilmap({{0,0}, {1,1}});
+ QTest::newRow("_map-0:{map-0:0-1:1}") << raw("\xbf\0\xa2\0\0\1\1\xff") << make_ilmap({{0, make_map({{0,0}, {1,1}})}});
+ QTest::newRow("_map-0:{_map-0:0-1:1}") << raw("\xbf\0\xbf\0\0\1\1\xff\xff") << make_ilmap({{0, make_ilmap({{0,0}, {1,1}})}});
+
+ QTest::newRow("_array-map1") << raw("\x9f\xa1\0\0\xff") << make_ilarray({make_map({{0,0}})});
+ QTest::newRow("_array-_map1") << raw("\x9f\xbf\0\0\xff\xff") << make_ilarray({make_ilmap({{0,0}})});
+ QTest::newRow("_array-map2") << raw("\x9f\xa1\0\0\xa1\1\1\xff") << make_ilarray({make_map({{0,0}}), make_map({{1,1}})});
+ QTest::newRow("_array-_map2") << raw("\x9f\xbf\0\0\xff\xbf\1\1\xff\xff") << make_ilarray({make_ilmap({{0,0}}), make_ilmap({{1,1}})});
+
+ QTest::newRow("_map-array1") << raw("\xbf\x62oc\x81\0\xff") << make_ilmap({{"oc", make_list(0)}});
+ QTest::newRow("_map-_array1") << raw("\xbf\x62oc\x9f\0\xff\xff") << make_ilmap({{"oc", make_ilarray({0})}});
+ QTest::newRow("_map-array2") << raw("\xbf\x62oc\x84\0\1\2\3\xff") << make_ilmap({{"oc", make_list(0, 1, 2, 3)}});
+ QTest::newRow("_map-_array2") << raw("\xbf\x62oc\x9f\0\1\2\3\xff\xff") << make_ilmap({{"oc", make_ilarray({0, 1, 2, 3})}});
+ QTest::newRow("_map-array3") << raw("\xbf\x62oc\x82\0\1\2\3\xff") << make_ilmap({{"oc", make_list(0, 1)}, {2, 3}});
+ QTest::newRow("_map-_array3") << raw("\xbf\x62oc\x9f\0\1\xff\2\3\xff") << make_ilmap({{"oc", make_ilarray({0, 1})}, {2, 3}});
+
+ // tagged
+ QTest::newRow("array-1(0)") << raw("\x81\xc1\0") << make_list(QVariant::fromValue(Tag{1, 0}));
+ QTest::newRow("array-1(map)") << raw("\x81\xc1\xa0") << make_list(QVariant::fromValue(Tag{1, make_map({})}));
+ QTest::newRow("map-1(2):3(4)") << raw("\xa1\xc1\2\xc3\4") << make_map({{QVariant::fromValue(Tag{1, 2}), QVariant::fromValue(Tag{3, 4})}});
+}
+
diff --git a/src/3rdparty/tinycbor/tests/encoder/encoder.pro b/src/3rdparty/tinycbor/tests/encoder/encoder.pro
new file mode 100644
index 0000000000..62d9b7e409
--- /dev/null
+++ b/src/3rdparty/tinycbor/tests/encoder/encoder.pro
@@ -0,0 +1,9 @@
+SOURCES += tst_encoder.cpp
+
+CONFIG += testcase parallel_test c++11
+QT = core testlib
+
+INCLUDEPATH += ../../src
+msvc: POST_TARGETDEPS = ../../lib/tinycbor.lib
+else: POST_TARGETDEPS += ../../lib/libtinycbor.a
+LIBS += $$POST_TARGETDEPS
diff --git a/src/3rdparty/tinycbor/tests/encoder/tst_encoder.cpp b/src/3rdparty/tinycbor/tests/encoder/tst_encoder.cpp
new file mode 100644
index 0000000000..f30c522601
--- /dev/null
+++ b/src/3rdparty/tinycbor/tests/encoder/tst_encoder.cpp
@@ -0,0 +1,496 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 Intel Corporation
+**
+** Permission is hereby granted, free of charge, to any person obtaining a copy
+** of this software and associated documentation files (the "Software"), to deal
+** in the Software without restriction, including without limitation the rights
+** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+** copies of the Software, and to permit persons to whom the Software is
+** furnished to do so, subject to the following conditions:
+**
+** The above copyright notice and this permission notice shall be included in
+** all copies or substantial portions of the Software.
+**
+** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+** THE SOFTWARE.
+**
+****************************************************************************/
+
+#include <QtTest>
+#include "cbor.h"
+
+#if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)
+#include <qfloat16.h>
+#endif
+
+Q_DECLARE_METATYPE(CborError)
+namespace QTest {
+template<> char *toString<CborError>(const CborError &err)
+{
+ return qstrdup(cbor_error_string(err));
+}
+}
+
+class tst_Encoder : public QObject
+{
+ Q_OBJECT
+private slots:
+ void fixed_data();
+ void fixed();
+ void strings_data();
+ void strings() { fixed(); }
+ void arraysAndMaps_data();
+ void arraysAndMaps() { fixed(); }
+ void tags_data();
+ void tags();
+ void arrays_data() { tags_data(); }
+ void arrays();
+ void maps_data() { tags_data(); }
+ void maps();
+
+ void writerApi_data() { tags_data(); }
+ void writerApi();
+ void writerApiFail_data() { tags_data(); }
+ void writerApiFail();
+ void shortBuffer_data() { tags_data(); }
+ void shortBuffer();
+ void tooShortArrays_data() { tags_data(); }
+ void tooShortArrays();
+ void tooShortMaps_data() { tags_data(); }
+ void tooShortMaps();
+ void tooBigArrays_data() { tags_data(); }
+ void tooBigArrays();
+ void tooBigMaps_data() { tags_data(); }
+ void tooBigMaps();
+ void illegalSimpleType_data();
+ void illegalSimpleType();
+};
+
+#include "tst_encoder.moc"
+#include "data.cpp"
+
+static inline bool isOomError(CborError err)
+{
+ return err == CborErrorOutOfMemory;
+}
+
+CborError encodeVariant(CborEncoder *encoder, const QVariant &v)
+{
+ int type = v.userType();
+ switch (type) {
+ case QVariant::Int:
+ case QVariant::LongLong:
+ return cbor_encode_int(encoder, v.toLongLong());
+
+ case QVariant::UInt:
+ case QVariant::ULongLong:
+ return cbor_encode_uint(encoder, v.toULongLong());
+
+ case QVariant::Bool:
+ return cbor_encode_boolean(encoder, v.toBool());
+
+ case QVariant::Invalid:
+ return cbor_encode_undefined(encoder);
+
+ case QMetaType::VoidStar:
+ return cbor_encode_null(encoder);
+
+ case QVariant::Double:
+ return cbor_encode_double(encoder, v.toDouble());
+
+ case QMetaType::Float:
+ return cbor_encode_float(encoder, v.toFloat());
+
+ case QVariant::String: {
+ QByteArray string = v.toString().toUtf8();
+ return cbor_encode_text_string(encoder, string.constData(), string.length());
+ }
+
+ case QVariant::ByteArray: {
+ QByteArray string = v.toByteArray();
+ return cbor_encode_byte_string(encoder, reinterpret_cast<const quint8 *>(string.constData()), string.length());
+ }
+
+ default:
+ if (type == qMetaTypeId<NegativeInteger>())
+ return cbor_encode_negative_int(encoder, v.value<NegativeInteger>().abs);
+ if (type == qMetaTypeId<SimpleType>())
+ return cbor_encode_simple_value(encoder, v.value<SimpleType>().type);
+#if QT_VERSION < QT_VERSION_CHECK(5, 9, 0)
+ if (type == qMetaTypeId<Float16Standin>())
+ return cbor_encode_half_float(encoder, v.constData());
+#else
+ if (type == qMetaTypeId<qfloat16>())
+ return cbor_encode_half_float(encoder, v.constData());
+#endif
+ if (type == qMetaTypeId<Tag>()) {
+ CborError err = cbor_encode_tag(encoder, v.value<Tag>().tag);
+ if (err && !isOomError(err))
+ return err;
+ return static_cast<CborError>(err | encodeVariant(encoder, v.value<Tag>().tagged));
+ }
+ if (type == QVariant::List || type == qMetaTypeId<IndeterminateLengthArray>()) {
+ CborEncoder sub;
+ QVariantList list = v.toList();
+ size_t len = list.length();
+ if (type == qMetaTypeId<IndeterminateLengthArray>()) {
+ len = CborIndefiniteLength;
+ list = v.value<IndeterminateLengthArray>();
+ }
+ CborError err = cbor_encoder_create_array(encoder, &sub, len);
+ if (err && !isOomError(err))
+ return err;
+ foreach (const QVariant &v2, list) {
+ err = static_cast<CborError>(err | encodeVariant(&sub, v2));
+ if (err && !isOomError(err))
+ return err;
+ }
+ return cbor_encoder_close_container_checked(encoder, &sub);
+ }
+ if (type == qMetaTypeId<Map>() || type == qMetaTypeId<IndeterminateLengthMap>()) {
+ CborEncoder sub;
+ Map map = v.value<Map>();
+ size_t len = map.length();
+ if (type == qMetaTypeId<IndeterminateLengthMap>()) {
+ len = CborIndefiniteLength;
+ map = v.value<IndeterminateLengthMap>();
+ }
+ CborError err = cbor_encoder_create_map(encoder, &sub, len);
+ if (err && !isOomError(err))
+ return err;
+ for (auto pair : map) {
+ err = static_cast<CborError>(err | encodeVariant(&sub, pair.first));
+ if (err && !isOomError(err))
+ return err;
+ err = static_cast<CborError>(err | encodeVariant(&sub, pair.second));
+ if (err && !isOomError(err))
+ return err;
+ }
+ return cbor_encoder_close_container_checked(encoder, &sub);
+ }
+ }
+ return CborErrorUnknownType;
+}
+
+void compare(const QVariant &input, const QByteArray &output)
+{
+ QByteArray buffer(output.length(), Qt::Uninitialized);
+ uint8_t *bufptr = reinterpret_cast<quint8 *>(buffer.data());
+ CborEncoder encoder;
+ cbor_encoder_init(&encoder, bufptr, buffer.length(), 0);
+
+ QCOMPARE(encodeVariant(&encoder, input), CborNoError);
+ QCOMPARE(encoder.remaining, size_t(1));
+ QCOMPARE(cbor_encoder_get_extra_bytes_needed(&encoder), size_t(0));
+
+ buffer.resize(int(cbor_encoder_get_buffer_size(&encoder, bufptr)));
+ QCOMPARE(buffer, output);
+}
+
+void tst_Encoder::fixed_data()
+{
+ addColumns();
+ addFixedData();
+}
+
+void tst_Encoder::fixed()
+{
+ QFETCH(QVariant, input);
+ QFETCH(QByteArray, output);
+ compare(input, output);
+}
+
+void tst_Encoder::strings_data()
+{
+ addColumns();
+ addStringsData();
+}
+
+void tst_Encoder::arraysAndMaps_data()
+{
+ addColumns();
+ addArraysAndMaps();
+}
+
+void tst_Encoder::tags_data()
+{
+ addColumns();
+ addFixedData();
+ addStringsData();
+ addArraysAndMaps();
+}
+
+void tst_Encoder::tags()
+{
+ QFETCH(QVariant, input);
+ QFETCH(QByteArray, output);
+
+ compare(QVariant::fromValue(Tag{1, input}), "\xc1" + output);
+ if (QTest::currentTestFailed()) return;
+
+ compare(QVariant::fromValue(Tag{24, input}), "\xd8\x18" + output);
+ if (QTest::currentTestFailed()) return;
+
+ compare(QVariant::fromValue(Tag{255, input}), "\xd8\xff" + output);
+ if (QTest::currentTestFailed()) return;
+
+ compare(QVariant::fromValue(Tag{256, input}), raw("\xd9\1\0") + output);
+ if (QTest::currentTestFailed()) return;
+
+ compare(QVariant::fromValue(Tag{CborSignatureTag, input}), raw("\xd9\xd9\xf7") + output);
+ if (QTest::currentTestFailed()) return;
+
+ compare(QVariant::fromValue(Tag{65535, input}), raw("\xd9\xff\xff") + output);
+ if (QTest::currentTestFailed()) return;
+
+ compare(QVariant::fromValue(Tag{65536, input}), raw("\xda\0\1\0\0") + output);
+ if (QTest::currentTestFailed()) return;
+
+ compare(QVariant::fromValue(Tag{UINT32_MAX, input}), raw("\xda\xff\xff\xff\xff") + output);
+ if (QTest::currentTestFailed()) return;
+
+ compare(QVariant::fromValue(Tag{UINT32_MAX + Q_UINT64_C(1), input}), raw("\xdb\0\0\0\1\0\0\0\0") + output);
+ if (QTest::currentTestFailed()) return;
+
+ compare(QVariant::fromValue(Tag{UINT64_MAX, input}), raw("\xdb\xff\xff\xff\xff\xff\xff\xff\xff") + output);
+ if (QTest::currentTestFailed()) return;
+
+ // nested tags
+ compare(QVariant::fromValue(Tag{1, QVariant::fromValue(Tag{1, input})}), "\xc1\xc1" + output);
+}
+
+void tst_Encoder::arrays()
+{
+ QFETCH(QVariant, input);
+ QFETCH(QByteArray, output);
+
+ compare(make_list(input), "\x81" + output);
+ if (QTest::currentTestFailed()) return;
+
+ compare(make_list(input, input), "\x82" + output + output);
+ if (QTest::currentTestFailed()) return;
+
+ {
+ QVariantList list{input};
+ QByteArray longoutput = output;
+
+ // make a list with 32 elements (1 << 5)
+ for (int i = 0; i < 5; ++i) {
+ list += list;
+ longoutput += longoutput;
+ }
+ compare(list, "\x98\x20" + longoutput);
+ if (QTest::currentTestFailed()) return;
+
+ // now 256 elements (32 << 3)
+ for (int i = 0; i < 3; ++i) {
+ list += list;
+ longoutput += longoutput;
+ }
+ compare(list, raw("\x99\1\0") + longoutput);
+ if (QTest::currentTestFailed()) return;
+ }
+
+ // nested lists
+ compare(make_list(make_list(input)), "\x81\x81" + output);
+ if (QTest::currentTestFailed()) return;
+
+ compare(make_list(make_list(input, input)), "\x81\x82" + output + output);
+ if (QTest::currentTestFailed()) return;
+
+ compare(make_list(make_list(input), input), "\x82\x81" + output + output);
+ if (QTest::currentTestFailed()) return;
+
+ compare(make_list(make_list(input), make_list(input)), "\x82\x81" + output + "\x81" + output);
+}
+
+void tst_Encoder::maps()
+{
+ QFETCH(QVariant, input);
+ QFETCH(QByteArray, output);
+
+ compare(make_map({{1, input}}), "\xa1\1" + output);
+ if (QTest::currentTestFailed()) return;
+
+ compare(make_map({{1, input}, {input, 24}}), "\xa2\1" + output + output + "\x18\x18");
+ if (QTest::currentTestFailed()) return;
+
+ compare(make_map({{input, input}}), "\xa1" + output + output);
+ if (QTest::currentTestFailed()) return;
+
+ {
+ Map map{{1, input}};
+ QByteArray longoutput = "\1" + output;
+
+ // make a map with 32 elements (1 << 5)
+ for (int i = 0; i < 5; ++i) {
+ map += map;
+ longoutput += longoutput;
+ }
+ compare(QVariant::fromValue(map), "\xb8\x20" + longoutput);
+ if (QTest::currentTestFailed()) return;
+
+ // now 256 elements (32 << 3)
+ for (int i = 0; i < 3; ++i) {
+ map += map;
+ longoutput += longoutput;
+ }
+ compare(QVariant::fromValue(map), raw("\xb9\1\0") + longoutput);
+ if (QTest::currentTestFailed()) return;
+ }
+
+ // nested maps
+ compare(make_map({{1, make_map({{2, input}})}}), "\xa1\1\xa1\2" + output);
+ if (QTest::currentTestFailed()) return;
+
+ compare(make_map({{1, make_map({{2, input}, {input, false}})}}), "\xa1\1\xa2\2" + output + output + "\xf4");
+ if (QTest::currentTestFailed()) return;
+
+ compare(make_map({{1, make_map({{2, input}})}, {input, false}}), "\xa2\1\xa1\2" + output + output + "\xf4");
+ if (QTest::currentTestFailed()) return;
+}
+
+void tst_Encoder::writerApi()
+{
+ QFETCH(QVariant, input);
+ QFETCH(QByteArray, output);
+
+ // instead of writing to a QByteArray like all other tests, write to a QBuffer
+ QBuffer buffer;
+ buffer.open(QIODevice::ReadWrite);
+ auto callback = [](void *token, const void *data, size_t len, CborEncoderAppendType) {
+ auto buffer = static_cast<QBuffer *>(token);
+ buffer->write(static_cast<const char *>(data), len);
+ return CborNoError;
+ };
+
+ CborEncoder encoder;
+ cbor_encoder_init_writer(&encoder, callback, &buffer);
+ QCOMPARE(encodeVariant(&encoder, input), CborNoError);
+
+ buffer.reset();
+ QCOMPARE(buffer.readAll(), output);
+}
+
+void tst_Encoder::writerApiFail()
+{
+ QFETCH(QVariant, input);
+ QFETCH(QByteArray, output);
+
+ // same as above, but we'll produce an error during writing and we expect
+ // it to be returned
+ int callCount = 0;
+ auto callback = [](void *token, const void *, size_t, CborEncoderAppendType) {
+ ++*static_cast<int *>(token);
+ return CborErrorIO;
+ };
+
+ CborEncoder encoder;
+ cbor_encoder_init_writer(&encoder, callback, &callCount);
+ QCOMPARE(encodeVariant(&encoder, input), CborErrorIO);
+ QCOMPARE(callCount, 1);
+}
+
+void tst_Encoder::shortBuffer()
+{
+ QFETCH(QVariant, input);
+ QFETCH(QByteArray, output);
+ QByteArray buffer(output.length(), Qt::Uninitialized);
+
+ for (int len = 0; len < output.length(); ++len) {
+ CborEncoder encoder;
+ cbor_encoder_init(&encoder, reinterpret_cast<quint8 *>(buffer.data()), len, 0);
+ QCOMPARE(encodeVariant(&encoder, input), CborErrorOutOfMemory);
+ QVERIFY(cbor_encoder_get_extra_bytes_needed(&encoder) != 0);
+ QCOMPARE(len + cbor_encoder_get_extra_bytes_needed(&encoder), size_t(output.length()));
+ }
+}
+
+void tst_Encoder::tooShortArrays()
+{
+ QFETCH(QVariant, input);
+ QFETCH(QByteArray, output);
+ QByteArray buffer(output.length() + 1, Qt::Uninitialized);
+
+ CborEncoder encoder, container;
+ cbor_encoder_init(&encoder, reinterpret_cast<quint8 *>(buffer.data()), buffer.length(), 0);
+ QCOMPARE(cbor_encoder_create_array(&encoder, &container, 2), CborNoError);
+ QCOMPARE(encodeVariant(&container, input), CborNoError);
+ QCOMPARE(container.remaining, size_t(2));
+ QCOMPARE(cbor_encoder_close_container_checked(&encoder, &container), CborErrorTooFewItems);
+}
+
+void tst_Encoder::tooShortMaps()
+{
+ QFETCH(QVariant, input);
+ QFETCH(QByteArray, output);
+ QByteArray buffer(output.length() + 1, Qt::Uninitialized);
+
+ CborEncoder encoder, container;
+ cbor_encoder_init(&encoder, reinterpret_cast<quint8 *>(buffer.data()), buffer.length(), 0);
+ QCOMPARE(cbor_encoder_create_map(&encoder, &container, 2), CborNoError);
+ QCOMPARE(encodeVariant(&container, input), CborNoError);
+ QCOMPARE(container.remaining, size_t(4));
+ QCOMPARE(cbor_encoder_close_container_checked(&encoder, &container), CborErrorTooFewItems);
+}
+
+void tst_Encoder::tooBigArrays()
+{
+ QFETCH(QVariant, input);
+ QFETCH(QByteArray, output);
+ QByteArray buffer(output.length() * 2 + 1, Qt::Uninitialized);
+
+ CborEncoder encoder, container;
+ cbor_encoder_init(&encoder, reinterpret_cast<quint8 *>(buffer.data()), buffer.length(), 0);
+ QCOMPARE(cbor_encoder_create_array(&encoder, &container, 1), CborNoError);
+ QCOMPARE(encodeVariant(&container, input), CborNoError);
+ QCOMPARE(encodeVariant(&container, input), CborNoError);
+ QCOMPARE(container.remaining, size_t(0));
+ QCOMPARE(cbor_encoder_close_container_checked(&encoder, &container), CborErrorTooManyItems);
+}
+
+void tst_Encoder::tooBigMaps()
+{
+ QFETCH(QVariant, input);
+ QFETCH(QByteArray, output);
+ QByteArray buffer(output.length() * 3 + 1, Qt::Uninitialized);
+
+ CborEncoder encoder, container;
+ cbor_encoder_init(&encoder, reinterpret_cast<quint8 *>(buffer.data()), buffer.length(), 0);
+ QCOMPARE(cbor_encoder_create_map(&encoder, &container, 1), CborNoError);
+ QCOMPARE(encodeVariant(&container, input), CborNoError);
+ QCOMPARE(encodeVariant(&container, input), CborNoError);
+ QCOMPARE(encodeVariant(&container, input), CborNoError);
+ QCOMPARE(container.remaining, size_t(0));
+ QCOMPARE(cbor_encoder_close_container_checked(&encoder, &container), CborErrorTooManyItems);
+}
+
+void tst_Encoder::illegalSimpleType_data()
+{
+ QTest::addColumn<int>("type");
+ QTest::newRow("half-float") << 25;
+ QTest::newRow("float") << 26;
+ QTest::newRow("double") << 27;
+ QTest::newRow("28") << 28;
+ QTest::newRow("29") << 29;
+ QTest::newRow("30") << 30;
+ QTest::newRow("31") << 31;
+}
+
+void tst_Encoder::illegalSimpleType()
+{
+ QFETCH(int, type);
+
+ quint8 buf[2];
+ CborEncoder encoder;
+ cbor_encoder_init(&encoder, buf, sizeof(buf), 0);
+ QCOMPARE(cbor_encode_simple_value(&encoder, type), CborErrorIllegalSimpleType);
+}
+
+QTEST_MAIN(tst_Encoder)
diff --git a/src/3rdparty/tinycbor/tests/parser/data.cpp b/src/3rdparty/tinycbor/tests/parser/data.cpp
new file mode 100644
index 0000000000..0ab0e47be4
--- /dev/null
+++ b/src/3rdparty/tinycbor/tests/parser/data.cpp
@@ -0,0 +1,573 @@
+#include <QtTest>
+#include <limits>
+#include <cbor.h>
+
+Q_DECLARE_METATYPE(CborError)
+
+template <size_t N> QByteArray raw(const char (&data)[N])
+{
+ return QByteArray::fromRawData(data, N - 1);
+}
+
+void addIntegers()
+{
+ QTest::addColumn<QByteArray>("data");
+ QTest::addColumn<quint64>("expectedRaw");
+ QTest::addColumn<qint64>("expectedValue");
+ QTest::addColumn<bool>("isNegative");
+ QTest::addColumn<bool>("inInt64Range");
+
+ // unsigned integers
+ QTest::newRow("0") << raw("\x00") << Q_UINT64_C(0) << Q_INT64_C(0) << false << true;
+ QTest::newRow("1") << raw("\x01") << Q_UINT64_C(1) << Q_INT64_C(1) << false << true;
+ QTest::newRow("10") << raw("\x0a") << Q_UINT64_C(10) << Q_INT64_C(10) << false << true;
+ QTest::newRow("23") << raw("\x17") << Q_UINT64_C(23) << Q_INT64_C(23) << false << true;
+ QTest::newRow("24") << raw("\x18\x18") << Q_UINT64_C(24) << Q_INT64_C(24) << false << true;
+ QTest::newRow("UINT8_MAX") << raw("\x18\xff") << Q_UINT64_C(255) << Q_INT64_C(255) << false << true;
+ QTest::newRow("UINT8_MAX+1") << raw("\x19\x01\x00") << Q_UINT64_C(256) << Q_INT64_C(256) << false << true;
+ QTest::newRow("UINT16_MAX") << raw("\x19\xff\xff") << Q_UINT64_C(65535) << Q_INT64_C(65535) << false << true;
+ QTest::newRow("UINT16_MAX+1") << raw("\x1a\0\1\x00\x00") << Q_UINT64_C(65536) << Q_INT64_C(65536) << false << true;
+ QTest::newRow("UINT32_MAX") << raw("\x1a\xff\xff\xff\xff") << Q_UINT64_C(4294967295) << Q_INT64_C(4294967295) << false << true;
+ QTest::newRow("UINT32_MAX+1") << raw("\x1b\0\0\0\1\0\0\0\0") << Q_UINT64_C(4294967296) << Q_INT64_C(4294967296) << false << true;
+ QTest::newRow("INT64_MAX") << raw("\x1b" "\x7f\xff\xff\xff" "\xff\xff\xff\xff")
+ << quint64(std::numeric_limits<qint64>::max())
+ << std::numeric_limits<qint64>::max() << false << true;
+ QTest::newRow("UINT64_MAX") << raw("\x1b" "\xff\xff\xff\xff" "\xff\xff\xff\xff")
+ << std::numeric_limits<quint64>::max() << qint64(-123456) << false << false;
+
+ // negative integers
+ QTest::newRow("-1") << raw("\x20") << Q_UINT64_C(0) << Q_INT64_C(-1) << true << true;
+ QTest::newRow("-2") << raw("\x21") << Q_UINT64_C(1) << Q_INT64_C(-2) << true << true;
+ QTest::newRow("-24") << raw("\x37") << Q_UINT64_C(23) << Q_INT64_C(-24) << true << true;
+ QTest::newRow("-25") << raw("\x38\x18") << Q_UINT64_C(24) << Q_INT64_C(-25) << true << true;
+ QTest::newRow("-UINT8_MAX") << raw("\x38\xff") << Q_UINT64_C(255) << Q_INT64_C(-256) << true << true;
+ QTest::newRow("-UINT8_MAX-1") << raw("\x39\x01\x00") << Q_UINT64_C(256) << Q_INT64_C(-257) << true << true;
+ QTest::newRow("-UINT16_MAX") << raw("\x39\xff\xff") << Q_UINT64_C(65535) << Q_INT64_C(-65536) << true << true;
+ QTest::newRow("-UINT16_MAX-1") << raw("\x3a\0\1\x00\x00") << Q_UINT64_C(65536) << Q_INT64_C(-65537) << true << true;
+ QTest::newRow("-UINT32_MAX") << raw("\x3a\xff\xff\xff\xff") << Q_UINT64_C(4294967295) << Q_INT64_C(-4294967296) << true << true;
+ QTest::newRow("-UINT32_MAX-1") << raw("\x3b\0\0\0\1\0\0\0\0") << Q_UINT64_C(4294967296) << Q_INT64_C(-4294967297) << true << true;
+ QTest::newRow("INT64_MIN+1") << raw("\x3b\x7f\xff\xff\xff""\xff\xff\xff\xfe")
+ << quint64(std::numeric_limits<qint64>::max() - 1)
+ << (std::numeric_limits<qint64>::min() + 1)
+ << true << true;
+ QTest::newRow("INT64_MIN") << raw("\x3b\x7f\xff\xff\xff""\xff\xff\xff\xff")
+ << quint64(std::numeric_limits<qint64>::max())
+ << std::numeric_limits<qint64>::min()
+ << true << true;
+ QTest::newRow("INT64_MIN-1") << raw("\x3b\x80\0\0\0""\0\0\0\0") << Q_UINT64_C(9223372036854775808) << qint64(-123456) << true << false;
+ QTest::newRow("-UINT64_MAX") << raw("\x3b" "\xff\xff\xff\xff" "\xff\xff\xff\xfe")
+ << (std::numeric_limits<quint64>::max() - 1) << qint64(-123456) << true << false;
+ QTest::newRow("-UINT64_MAX+1") << raw("\x3b" "\xff\xff\xff\xff" "\xff\xff\xff\xff")
+ << std::numeric_limits<quint64>::max() << qint64(-123456) << true << false;
+}
+
+void addColumns()
+{
+ QTest::addColumn<QByteArray>("data");
+ QTest::addColumn<QString>("expected");
+ QTest::addColumn<int>("n"); // some aux integer, not added in all columns
+}
+
+void addFixedData()
+{
+ // unsigned integers
+ QTest::newRow("0") << raw("\x00") << "0";
+ QTest::newRow("1") << raw("\x01") << "1";
+ QTest::newRow("10") << raw("\x0a") << "10";
+ QTest::newRow("23") << raw("\x17") << "23";
+ QTest::newRow("24") << raw("\x18\x18") << "24";
+ QTest::newRow("UINT8_MAX") << raw("\x18\xff") << "255";
+ QTest::newRow("UINT8_MAX+1") << raw("\x19\x01\x00") << "256";
+ QTest::newRow("UINT16_MAX") << raw("\x19\xff\xff") << "65535";
+ QTest::newRow("UINT16_MAX+1") << raw("\x1a\0\1\x00\x00") << "65536";
+ QTest::newRow("UINT32_MAX") << raw("\x1a\xff\xff\xff\xff") << "4294967295";
+ QTest::newRow("UINT32_MAX+1") << raw("\x1b\0\0\0\1\0\0\0\0") << "4294967296";
+ QTest::newRow("UINT64_MAX") << raw("\x1b" "\xff\xff\xff\xff" "\xff\xff\xff\xff")
+ << QString::number(std::numeric_limits<uint64_t>::max());
+
+ // negative integers
+ QTest::newRow("-1") << raw("\x20") << "-1";
+ QTest::newRow("-2") << raw("\x21") << "-2";
+ QTest::newRow("-24") << raw("\x37") << "-24";
+ QTest::newRow("-25") << raw("\x38\x18") << "-25";
+ QTest::newRow("-UINT8_MAX") << raw("\x38\xff") << "-256";
+ QTest::newRow("-UINT8_MAX-1") << raw("\x39\x01\x00") << "-257";
+ QTest::newRow("-UINT16_MAX") << raw("\x39\xff\xff") << "-65536";
+ QTest::newRow("-UINT16_MAX-1") << raw("\x3a\0\1\x00\x00") << "-65537";
+ QTest::newRow("-UINT32_MAX") << raw("\x3a\xff\xff\xff\xff") << "-4294967296";
+ QTest::newRow("-UINT32_MAX-1") << raw("\x3b\0\0\0\1\0\0\0\0") << "-4294967297";
+ QTest::newRow("INT64_MIN+1") << raw("\x3b\x7f\xff\xff\xff""\xff\xff\xff\xfe")
+ << QString::number(std::numeric_limits<int64_t>::min() + 1);
+ QTest::newRow("INT64_MIN") << raw("\x3b\x7f\xff\xff\xff""\xff\xff\xff\xff")
+ << QString::number(std::numeric_limits<int64_t>::min());
+ QTest::newRow("INT64_MIN-1") << raw("\x3b\x80\0\0\0""\0\0\0\0") << "-9223372036854775809";
+ QTest::newRow("-UINT64_MAX") << raw("\x3b" "\xff\xff\xff\xff" "\xff\xff\xff\xfe")
+ << '-' + QString::number(std::numeric_limits<uint64_t>::max());
+ QTest::newRow("-UINT64_MAX+1") << raw("\x3b" "\xff\xff\xff\xff" "\xff\xff\xff\xff")
+ << "-18446744073709551616";
+
+ // overlongs
+ QTest::newRow("0*1") << raw("\x18\x00") << "0_0";
+ QTest::newRow("0*2") << raw("\x19\x00\x00") << "0_1";
+ QTest::newRow("0*4") << raw("\x1a\0\0\0\0") << "0_2";
+ QTest::newRow("0*8") << raw("\x1b\0\0\0\0\0\0\0\0") << "0_3";
+ QTest::newRow("-1*1") << raw("\x38\x00") << "-1_0";
+ QTest::newRow("-1*2") << raw("\x39\x00\x00") << "-1_1";
+ QTest::newRow("-1*4") << raw("\x3a\0\0\0\0") << "-1_2";
+ QTest::newRow("-1*8") << raw("\x3b\0\0\0\0\0\0\0\0") << "-1_3";
+
+ QTest::newRow("simple0") << raw("\xe0") << "simple(0)";
+ QTest::newRow("simple19") << raw("\xf3") << "simple(19)";
+ QTest::newRow("false") << raw("\xf4") << "false";
+ QTest::newRow("true") << raw("\xf5") << "true";
+ QTest::newRow("null") << raw("\xf6") << "null";
+ QTest::newRow("undefined") << raw("\xf7") << "undefined";
+ QTest::newRow("simple32") << raw("\xf8\x20") << "simple(32)";
+ QTest::newRow("simple255") << raw("\xf8\xff") << "simple(255)";
+
+ // floating point
+
+ QTest::newRow("0.f16") << raw("\xf9\0\0") << "0.f16";
+ QTest::newRow("0.f") << raw("\xfa\0\0\0\0") << "0.f";
+ QTest::newRow("0.") << raw("\xfb\0\0\0\0\0\0\0\0") << "0.";
+ QTest::newRow("-1.f16") << raw("\xf9\xbc\x00") << "-1.f16";
+ QTest::newRow("-1.f") << raw("\xfa\xbf\x80\0\0") << "-1.f";
+ QTest::newRow("-1.") << raw("\xfb\xbf\xf0\0\0\0\0\0\0") << "-1.";
+ QTest::newRow("65504.f16") << raw("\xf9\x7b\xff") << "65504.f16";
+ QTest::newRow("16777215.f") << raw("\xfa\x4b\x7f\xff\xff") << "16777215.f";
+ QTest::newRow("16777215.") << raw("\xfb\x41\x6f\xff\xff\xe0\0\0\0") << "16777215.";
+ QTest::newRow("-16777215.f") << raw("\xfa\xcb\x7f\xff\xff") << "-16777215.f";
+ QTest::newRow("-16777215.") << raw("\xfb\xc1\x6f\xff\xff\xe0\0\0\0") << "-16777215.";
+
+ QTest::newRow("0.5f16") << raw("\xf9\x38\0") << "0.5f16";
+ QTest::newRow("0.5f") << raw("\xfa\x3f\0\0\0") << "0.5f";
+ QTest::newRow("0.5") << raw("\xfb\x3f\xe0\0\0\0\0\0\0") << "0.5";
+ QTest::newRow("2.f16^11-1") << raw("\xf9\x67\xff") << "2047.f16";
+ QTest::newRow("2.f^24-1") << raw("\xfa\x4b\x7f\xff\xff") << "16777215.f";
+ QTest::newRow("2.^53-1") << raw("\xfb\x43\x3f\xff\xff""\xff\xff\xff\xff") << "9007199254740991.";
+ QTest::newRow("2.f^64-epsilon") << raw("\xfa\x5f\x7f\xff\xff") << "18446742974197923840.f";
+ QTest::newRow("2.^64-epsilon") << raw("\xfb\x43\xef\xff\xff""\xff\xff\xff\xff") << "18446744073709549568.";
+ QTest::newRow("2.f^64") << raw("\xfa\x5f\x80\0\0") << "1.8446744073709552e+19f";
+ QTest::newRow("2.^64") << raw("\xfb\x43\xf0\0\0\0\0\0\0") << "1.8446744073709552e+19";
+
+ QTest::newRow("nan_f16") << raw("\xf9\x7e\x00") << "nan";
+ QTest::newRow("nan_f") << raw("\xfa\x7f\xc0\0\0") << "nan";
+ QTest::newRow("nan") << raw("\xfb\x7f\xf8\0\0\0\0\0\0") << "nan";
+ QTest::newRow("-inf_f16") << raw("\xf9\xfc\x00") << "-inf";
+ QTest::newRow("-inf_f") << raw("\xfa\xff\x80\0\0") << "-inf";
+ QTest::newRow("-inf") << raw("\xfb\xff\xf0\0\0\0\0\0\0") << "-inf";
+ QTest::newRow("+inf_f16") << raw("\xf9\x7c\x00") << "inf";
+ QTest::newRow("+inf_f") << raw("\xfa\x7f\x80\0\0") << "inf";
+ QTest::newRow("+inf") << raw("\xfb\x7f\xf0\0\0\0\0\0\0") << "inf";
+
+}
+
+void addNonChunkedStringsData()
+{
+ // byte strings
+ QTest::newRow("emptybytestring") << raw("\x40") << "h''";
+ QTest::newRow("bytestring1") << raw("\x41 ") << "h'20'";
+ QTest::newRow("bytestring1-nul") << raw("\x41\0") << "h'00'";
+ QTest::newRow("bytestring5") << raw("\x45Hello") << "h'48656c6c6f'";
+ QTest::newRow("bytestring24") << raw("\x58\x18""123456789012345678901234")
+ << "h'313233343536373839303132333435363738393031323334'";
+ QTest::newRow("bytestring256") << raw("\x59\1\0") + QByteArray(256, '3')
+ << "h'" + QString(256 * 2, '3') + '\'';
+
+ // text strings
+ QTest::newRow("emptytextstring") << raw("\x60") << "\"\"";
+ QTest::newRow("textstring1") << raw("\x61 ") << "\" \"";
+ QTest::newRow("textstring1-nul") << raw("\x61\0") << "\"\\u0000\"";
+ QTest::newRow("textstring5") << raw("\x65Hello") << "\"Hello\"";
+ QTest::newRow("textstring24") << raw("\x78\x18""123456789012345678901234")
+ << "\"123456789012345678901234\"";
+ QTest::newRow("textstring256") << raw("\x79\1\0") + QByteArray(256, '3')
+ << '"' + QString(256, '3') + '"';
+
+ // some strings with UTF-8 content
+ // we had a bug in the pretty dumper - see issue #54
+ QTest::newRow("textstringutf8-2char") << raw("\x62\xc2\xa0") << "\"\\u00A0\"";
+ QTest::newRow("textstringutf8-2char2") << raw("\x64\xc2\xa0\xc2\xa9") << "\"\\u00A0\\u00A9\"";
+ QTest::newRow("textstringutf8-3char") << raw("\x63\xe2\x88\x80") << "\"\\u2200\"";
+ QTest::newRow("textstringutf8-4char") << raw("\x64\xf0\x90\x88\x83") << "\"\\uD800\\uDE03\"";
+
+ // strings with overlong length
+ QTest::newRow("emptybytestring*1") << raw("\x58\x00") << "h''_0";
+ QTest::newRow("emptytextstring*1") << raw("\x78\x00") << "\"\"_0";
+ QTest::newRow("emptybytestring*2") << raw("\x59\x00\x00") << "h''_1";
+ QTest::newRow("emptytextstring*2") << raw("\x79\x00\x00") << "\"\"_1";
+ QTest::newRow("emptybytestring*4") << raw("\x5a\0\0\0\0") << "h''_2";
+ QTest::newRow("emptytextstring*4") << raw("\x7a\0\0\0\0") << "\"\"_2";
+ QTest::newRow("emptybytestring*8") << raw("\x5b\0\0\0\0\0\0\0\0") << "h''_3";
+ QTest::newRow("emptytextstring*8") << raw("\x7b\0\0\0\0\0\0\0\0") << "\"\"_3";
+ QTest::newRow("bytestring5*1") << raw("\x58\x05Hello") << "h'48656c6c6f'_0";
+ QTest::newRow("textstring5*1") << raw("\x78\x05Hello") << "\"Hello\"_0";
+ QTest::newRow("bytestring5*2") << raw("\x59\0\5Hello") << "h'48656c6c6f'_1";
+ QTest::newRow("textstring5*2") << raw("\x79\0\x05Hello") << "\"Hello\"_1";
+ QTest::newRow("bytestring5*4") << raw("\x5a\0\0\0\5Hello") << "h'48656c6c6f'_2";
+ QTest::newRow("textstring5*4") << raw("\x7a\0\0\0\x05Hello") << "\"Hello\"_2";
+ QTest::newRow("bytestring5*8") << raw("\x5b\0\0\0\0\0\0\0\5Hello") << "h'48656c6c6f'_3";
+ QTest::newRow("textstring5*8") << raw("\x7b\0\0\0\0\0\0\0\x05Hello") << "\"Hello\"_3";
+
+}
+
+void addStringsData()
+{
+ addNonChunkedStringsData();
+
+ // strings with undefined length
+ QTest::newRow("_emptybytestring") << raw("\x5f\xff") << "(_ )";
+ QTest::newRow("_emptytextstring") << raw("\x7f\xff") << "(_ )";
+ QTest::newRow("_emptybytestring2") << raw("\x5f\x40\xff") << "(_ h'')";
+ QTest::newRow("_emptytextstring2") << raw("\x7f\x60\xff") << "(_ \"\")";
+ QTest::newRow("_emptybytestring2*1") << raw("\x5f\x58\x00\xff") << "(_ h''_0)";
+ QTest::newRow("_emptytextstring2*1") << raw("\x7f\x78\x00\xff") << "(_ \"\"_0)";
+ QTest::newRow("_emptybytestring3") << raw("\x5f\x40\x40\xff") << "(_ h'', h'')";
+ QTest::newRow("_emptytextstring3") << raw("\x7f\x60\x60\xff") << "(_ \"\", \"\")";
+ QTest::newRow("_emptybytestring3*2") << raw("\x5f\x59\x00\x00\x40\xff") << "(_ h''_1, h'')";
+ QTest::newRow("_emptytextstring3*2") << raw("\x7f\x79\x00\x00\x60\xff") << "(_ \"\"_1, \"\")";
+ QTest::newRow("_bytestring5x2") << raw("\x5f\x43Hel\x42lo\xff") << "(_ h'48656c', h'6c6f')";
+ QTest::newRow("_textstring5x2") << raw("\x7f\x63Hel\x62lo\xff") << "(_ \"Hel\", \"lo\")";
+ QTest::newRow("_bytestring5x2*8*4") << raw("\x5f\x5b\0\0\0\0\0\0\0\3Hel\x5a\0\0\0\2lo\xff") << "(_ h'48656c'_3, h'6c6f'_2)";
+ QTest::newRow("_textstring5x2*8*4") << raw("\x7f\x7b\0\0\0\0\0\0\0\3Hel\x7a\0\0\0\2lo\xff") << "(_ \"Hel\"_3, \"lo\"_2)";
+ QTest::newRow("_bytestring5x5") << raw("\x5f\x41H\x41""e\x41l\x41l\x41o\xff") << "(_ h'48', h'65', h'6c', h'6c', h'6f')";
+ QTest::newRow("_textstring5x5") << raw("\x7f\x61H\x61""e\x61l\x61l\x61o\xff") << "(_ \"H\", \"e\", \"l\", \"l\", \"o\")";
+ QTest::newRow("_bytestring5x6") << raw("\x5f\x41H\x41""e\x40\x41l\x41l\x41o\xff") << "(_ h'48', h'65', h'', h'6c', h'6c', h'6f')";
+ QTest::newRow("_textstring5x6") << raw("\x7f\x61H\x61""e\x61l\x60\x61l\x61o\xff") << "(_ \"H\", \"e\", \"l\", \"\", \"l\", \"o\")";
+}
+
+void addTagsData()
+{
+ // since parseOne() works recursively for tags, we can't test lone tags
+ QTest::newRow("tag0") << raw("\xc0\x00") << "0(0)";
+ QTest::newRow("tag1") << raw("\xc1\x00") << "1(0)";
+ QTest::newRow("tag24") << raw("\xd8\x18\x00") << "24(0)";
+ QTest::newRow("tag255") << raw("\xd8\xff\x00") << "255(0)";
+ QTest::newRow("tag256") << raw("\xd9\1\0\x00") << "256(0)";
+ QTest::newRow("tag65535") << raw("\xd9\xff\xff\x00") << "65535(0)";
+ QTest::newRow("tag65536") << raw("\xda\0\1\0\0\x00") << "65536(0)";
+ QTest::newRow("tagUINT32_MAX-1") << raw("\xda\xff\xff\xff\xff\x00") << "4294967295(0)";
+ QTest::newRow("tagUINT32_MAX") << raw("\xdb\0\0\0\1\0\0\0\0\x00") << "4294967296(0)";
+ QTest::newRow("tagUINT64_MAX") << raw("\xdb" "\xff\xff\xff\xff" "\xff\xff\xff\xff" "\x00")
+ << QString::number(std::numeric_limits<uint64_t>::max()) + "(0)";
+
+ // overlong tags
+ QTest::newRow("tag0*1") << raw("\xd8\0\x00") << "0_0(0)";
+ QTest::newRow("tag0*2") << raw("\xd9\0\0\x00") << "0_1(0)";
+ QTest::newRow("tag0*4") << raw("\xda\0\0\0\0\x00") << "0_2(0)";
+ QTest::newRow("tag0*8") << raw("\xdb\0\0\0\0\0\0\0\0\x00") << "0_3(0)";
+
+ // tag other things
+ QTest::newRow("unixtime") << raw("\xc1\x1a\x55\x4b\xbf\xd3") << "1(1431027667)";
+ QTest::newRow("rfc3339date") << raw("\xc0\x78\x19" "2015-05-07 12:41:07-07:00")
+ << "0(\"2015-05-07 12:41:07-07:00\")";
+ QTest::newRow("tag6+false") << raw("\xc6\xf4") << "6(false)";
+ QTest::newRow("tag25+true") << raw("\xd8\x19\xf5") << "25(true)";
+ QTest::newRow("tag256+null") << raw("\xd9\1\0\xf6") << "256(null)";
+ QTest::newRow("tag65536+simple32") << raw("\xda\0\1\0\0\xf8\x20") << "65536(simple(32))";
+ QTest::newRow("float+unixtime") << raw("\xc1\xfa\x4e\xaa\x97\x80") << "1(1431027712.f)";
+ QTest::newRow("double+unixtime") << raw("\xc1\xfb" "\x41\xd5\x52\xef" "\xf4\xc7\xce\xfe")
+ << "1(1431027667.1220088)";
+}
+
+void addEmptyContainersData()
+{
+ QTest::newRow("emptyarray") << raw("\x80") << "[]" << 0;
+ QTest::newRow("emptymap") << raw("\xa0") << "{}" << 0;
+ QTest::newRow("_emptyarray") << raw("\x9f\xff") << "[_ ]" << -1;
+ QTest::newRow("_emptymap") << raw("\xbf\xff") << "{_ }" << -1;
+}
+
+void addMapMixedData()
+{
+ QTest::newRow("map-0-24") << raw("\xa1\0\x18\x18") << "{0: 24}" << 1;
+ QTest::newRow("map-0*1-24") << raw("\xa1\x18\0\x18\x18") << "{0_0: 24}" << 1;
+ QTest::newRow("map-0*1-24*2") << raw("\xa1\x18\0\x19\0\x18") << "{0_0: 24_1}" << 1;
+ QTest::newRow("map-0*4-24*2") << raw("\xa1\x1a\0\0\0\0\x19\0\x18") << "{0_2: 24_1}" << 1;
+ QTest::newRow("map-24-0") << raw("\xa1\x18\x18\0") << "{24: 0}" << 1;
+ QTest::newRow("map-24-0*1") << raw("\xa1\x18\x18\x18\0") << "{24: 0_0}" << 1;
+ QTest::newRow("map-255-65535") << raw("\xa1\x18\xff\x19\xff\xff") << "{255: 65535}" << 1;
+
+ QTest::newRow("_map-0-24") << raw("\xbf\0\x18\x18\xff") << "{_ 0: 24}" << 1;
+ QTest::newRow("_map-0*1-24") << raw("\xbf\x18\0\x18\x18\xff") << "{_ 0_0: 24}" << 1;
+ QTest::newRow("_map-0*1-24*2") << raw("\xbf\x18\0\x19\0\x18\xff") << "{_ 0_0: 24_1}" << 1;
+ QTest::newRow("_map-0*4-24*2") << raw("\xbf\x1a\0\0\0\0\x19\0\x18\xff") << "{_ 0_2: 24_1}" << 1;
+ QTest::newRow("_map-24-0") << raw("\xbf\x18\x18\0\xff") << "{_ 24: 0}" << 1;
+ QTest::newRow("_map-24-0*1") << raw("\xbf\x18\x18\x18\0\xff") << "{_ 24: 0_0}" << 1;
+ QTest::newRow("_map-255-65535") << raw("\xbf\x18\xff\x19\xff\xff\xff") << "{_ 255: 65535}" << 1;
+}
+
+void addChunkedStringData()
+{
+ QTest::addColumn<QByteArray>("data");
+ QTest::addColumn<QString>("concatenated");
+ QTest::addColumn<QStringList>("chunks");
+
+ // non-chunked:
+ QTest::newRow("emptybytestring") << raw("\x40") << "h''" << QStringList{"h''"};
+ QTest::newRow("bytestring1") << raw("\x41 ") << "h'20'" << QStringList{"h'20'"};
+ QTest::newRow("emptytextstring") << raw("\x60") << "\"\"" << QStringList{"\"\""};
+ QTest::newRow("textstring1") << raw("\x61 ") << "\" \"" << QStringList{"\" \""};
+
+ // empty chunked:
+ QTest::newRow("_emptybytestring") << raw("\x5f\xff") << "h''" << QStringList{};
+ QTest::newRow("_emptytextstring") << raw("\x7f\xff") << "\"\"" << QStringList{};
+ QTest::newRow("_emptybytestring2") << raw("\x5f\x40\xff") << "h''" << QStringList{"h''"};
+ QTest::newRow("_emptytextstring2") << raw("\x7f\x60\xff") << "\"\"" << QStringList{"\"\""};
+ QTest::newRow("_emptybytestring3") << raw("\x5f\x40\x40\xff") << "h''" << QStringList{"h''", "h''"};
+ QTest::newRow("_emptytextstring3") << raw("\x7f\x60\x60\xff") << "\"\"" << QStringList{"\"\"", "\"\""};
+
+ // regular chunks
+ QTest::newRow("_bytestring1") << raw("\x5f\x41 \xff") << "h'20'" << QStringList{"h'20'"};
+ QTest::newRow("_bytestring2") << raw("\x5f\x41 \x41z\xff") << "h'207a'" << QStringList{"h'20'", "h'7a'"};
+ QTest::newRow("_bytestring3") << raw("\x5f\x41 \x58\x18""123456789012345678901234\x41z\xff")
+ << "h'203132333435363738393031323334353637383930313233347a'"
+ << QStringList{"h'20'", "h'313233343536373839303132333435363738393031323334'", "h'7a'"};
+
+ QTest::newRow("_textstring1") << raw("\x7f\x61 \xff") << "\" \"" << QStringList{"\" \""};
+ QTest::newRow("_textstring2") << raw("\x7f\x61 \x61z\xff") << "\" z\"" << QStringList{"\" \"", "\"z\""};
+ QTest::newRow("_textstring3") << raw("\x7f\x61 \x78\x18""123456789012345678901234\x61z\xff")
+ << "\" 123456789012345678901234z\""
+ << QStringList{"\" \"", "\"123456789012345678901234\"", "\"z\""};
+}
+
+void addValidationColumns()
+{
+ QTest::addColumn<QByteArray>("data");
+ QTest::addColumn<int>("flags"); // future
+ QTest::addColumn<CborError>("expectedError");
+}
+
+void addValidationData()
+{
+ // illegal numbers are future extension points
+ QTest::newRow("illegal-number-in-unsigned-1") << raw("\x81\x1c") << 0 << CborErrorIllegalNumber;
+ QTest::newRow("illegal-number-in-unsigned-2") << raw("\x81\x1d") << 0 << CborErrorIllegalNumber;
+ QTest::newRow("illegal-number-in-unsigned-3") << raw("\x81\x1e") << 0 << CborErrorIllegalNumber;
+ QTest::newRow("illegal-number-in-unsigned-4") << raw("\x81\x1f") << 0 << CborErrorIllegalNumber;
+ QTest::newRow("illegal-number-in-negative-1") << raw("\x81\x3c") << 0 << CborErrorIllegalNumber;
+ QTest::newRow("illegal-number-in-negative-2") << raw("\x81\x3d") << 0 << CborErrorIllegalNumber;
+ QTest::newRow("illegal-number-in-negative-3") << raw("\x81\x3e") << 0 << CborErrorIllegalNumber;
+ QTest::newRow("illegal-number-in-negative-4") << raw("\x81\x3f") << 0 << CborErrorIllegalNumber;
+ QTest::newRow("illegal-number-in-bytearray-length-1") << raw("\x81\x5c") << 0 << CborErrorIllegalNumber;
+ QTest::newRow("illegal-number-in-bytearray-length-2") << raw("\x81\x5d") << 0 << CborErrorIllegalNumber;
+ QTest::newRow("illegal-number-in-bytearray-length-3") << raw("\x81\x5e") << 0 << CborErrorIllegalNumber;
+ QTest::newRow("illegal-number-in-string-length-1") << raw("\x81\x7c") << 0 << CborErrorIllegalNumber;
+ QTest::newRow("illegal-number-in-string-length-2") << raw("\x81\x7d") << 0 << CborErrorIllegalNumber;
+ QTest::newRow("illegal-number-in-string-length-3") << raw("\x81\x7e") << 0 << CborErrorIllegalNumber;
+ QTest::newRow("illegal-number-in-array-length-1") << raw("\x81\x9c") << 0 << CborErrorIllegalNumber;
+ QTest::newRow("illegal-number-in-array-length-2") << raw("\x81\x9d") << 0 << CborErrorIllegalNumber;
+ QTest::newRow("illegal-number-in-array-length-3") << raw("\x81\x9e") << 0 << CborErrorIllegalNumber;
+ QTest::newRow("illegal-number-in-map-length-1") << raw("\x81\xbc") << 0 << CborErrorIllegalNumber;
+ QTest::newRow("illegal-number-in-map-length-2") << raw("\x81\xbd") << 0 << CborErrorIllegalNumber;
+ QTest::newRow("illegal-number-in-map-length-3") << raw("\x81\xbe") << 0 << CborErrorIllegalNumber;
+ QTest::newRow("illegal-number-in-tag-1") << raw("\x81\xdc") << 0 << CborErrorIllegalNumber;
+ QTest::newRow("illegal-number-in-tag-2") << raw("\x81\xdd") << 0 << CborErrorIllegalNumber;
+ QTest::newRow("illegal-number-in-tag-3") << raw("\x81\xde") << 0 << CborErrorIllegalNumber;
+ QTest::newRow("illegal-number-in-tag-4") << raw("\x81\xdf") << 0 << CborErrorIllegalNumber;
+
+ QTest::newRow("unsigned-too-short-1-0") << raw("\x81\x18") << 0 << CborErrorUnexpectedEOF; // requires 1 byte, 0 given
+ QTest::newRow("unsigned-too-short-2-0") << raw("\x81\x19") << 0 << CborErrorUnexpectedEOF; // requires 2 bytes, 0 given
+ QTest::newRow("unsigned-too-short-2-1") << raw("\x81\x19\x01") << 0 << CborErrorUnexpectedEOF; // etc
+ QTest::newRow("unsigned-too-short-4-0") << raw("\x81\x1a") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("unsigned-too-short-4-3") << raw("\x81\x1a\x01\x02\x03") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("unsigned-too-short-8-0") << raw("\x81\x1b") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("unsigned-too-short-8-7") << raw("\x81\x1b\1\2\3\4\5\6\7") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("negative-length-too-short-1-0") << raw("\x81\x38") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("negative-length-too-short-2-0") << raw("\x81\x39") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("negative-length-too-short-2-1") << raw("\x81\x39\x01") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("negative-length-too-short-4-0") << raw("\x81\x3a") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("negative-length-too-short-4-3") << raw("\x81\x3a\x01\x02\x03") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("negative-length-too-short-8-0") << raw("\x81\x3b") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("negative-length-too-short-8-7") << raw("\x81\x3b\1\2\3\4\5\6\7") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-length-too-short-1-0") << raw("\x81\x58") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-length-too-short-2-0") << raw("\x81\x59") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-length-too-short-2-1") << raw("\x81\x59\x01") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-length-too-short-4-0") << raw("\x81\x5a") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-length-too-short-4-3") << raw("\x81\x5a\x01\x02\x03") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-length-too-short-8-0") << raw("\x81\x5b") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-length-too-short-8-7") << raw("\x81\x5b\1\2\3\4\5\6\7") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-length-too-short-1-0") << raw("\x81\x78") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-length-too-short-2-0") << raw("\x81\x79") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-length-too-short-2-1") << raw("\x81\x79\x01") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-length-too-short-4-0") << raw("\x81\x7a") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-length-too-short-4-3") << raw("\x81\x7a\x01\x02\x03") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-length-too-short-8-0") << raw("\x81\x7b") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-length-too-short-8-7") << raw("\x81\x7b\1\2\3\4\5\6\7") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-chunked-length-too-short-1-0") << raw("\x81\x5f\x58") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-chunked-length-too-short-2-0") << raw("\x81\x5f\x59") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-chunked-length-too-short-2-1") << raw("\x81\x5f\x59\x01") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-chunked-length-too-short-4-0") << raw("\x81\x5f\x5a") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-chunked-length-too-short-4-3") << raw("\x81\x5f\x5a\x01\x02\x03") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-chunked-length-too-short-8-0") << raw("\x81\x5f\x5b") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-chunked-length-too-short-8-7") << raw("\x81\x5f\x5b\1\2\3\4\5\6\7") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-chunked-length-too-short-1-0") << raw("\x81\x7f\x78") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-chunked-length-too-short-2-0") << raw("\x81\x7f\x79") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-chunked-length-too-short-2-1") << raw("\x81\x7f\x79\x01") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-chunked-length-too-short-4-0") << raw("\x81\x7f\x7a") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-chunked-length-too-short-4-3") << raw("\x81\x7f\x7a\x01\x02\x03") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-chunked-length-too-short-8-0") << raw("\x81\x7f\x7b") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-chunked-length-too-short-8-7") << raw("\x81\x7f\x7b\1\2\3\4\5\6\7") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-chunked-2-length-too-short-1-0") << raw("\x81\x5f\x40\x58") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-chunked-2-length-too-short-2-0") << raw("\x81\x5f\x40\x59") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-chunked-2-length-too-short-2-1") << raw("\x81\x5f\x40\x59\x01") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-chunked-2-length-too-short-4-0") << raw("\x81\x5f\x40\x5a") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-chunked-2-length-too-short-4-3") << raw("\x81\x5f\x40\x5a\x01\x02\x03") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-chunked-2-length-too-short-8-0") << raw("\x81\x5f\x40\x5b") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-chunked-2-length-too-short-8-7") << raw("\x81\x5f\x40\x5b\1\2\3\4\5\6\7") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-chunked-2-length-too-short-1-0") << raw("\x81\x7f\x60\x78") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-chunked-2-length-too-short-2-0") << raw("\x81\x7f\x60\x79") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-chunked-2-length-too-short-2-1") << raw("\x81\x7f\x60\x79\x01") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-chunked-2-length-too-short-4-0") << raw("\x81\x7f\x60\x7a") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-chunked-2-length-too-short-4-3") << raw("\x81\x7f\x60\x7a\x01\x02\x03") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-chunked-2-length-too-short-8-0") << raw("\x81\x7f\x60\x7b") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-chunked-2-length-too-short-8-7") << raw("\x81\x7f\x60\x7b\1\2\3\4\5\6\7") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("array-length-too-short-1-0") << raw("\x81\x98") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("array-length-too-short-2-0") << raw("\x81\x99") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("array-length-too-short-2-1") << raw("\x81\x99\x01") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("array-length-too-short-4-0") << raw("\x81\x9a") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("array-length-too-short-4-3") << raw("\x81\x9a\x01\x02\x03") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("array-length-too-short-8-0") << raw("\x81\x9b") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("array-length-too-short-8-7") << raw("\x81\x9b\1\2\3\4\5\6\7") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("map-length-too-short-1-0") << raw("\x81\xb8") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("map-length-too-short-2-0") << raw("\x81\xb9") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("map-length-too-short-2-1") << raw("\x81\xb9\x01") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("map-length-too-short-4-0") << raw("\x81\xba") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("map-length-too-short-4-3") << raw("\x81\xba\x01\x02\x03") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("map-length-too-short-8-0") << raw("\x81\xbb") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("map-length-too-short-8-7") << raw("\x81\xbb\1\2\3\4\5\6\7") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("tag-too-short-1-0") << raw("\x81\xd8") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("tag-too-short-2-0") << raw("\x81\xd9") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("tag-too-short-2-1") << raw("\x81\xd9\x01") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("tag-too-short-4-0") << raw("\x81\xda") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("tag-too-short-4-3") << raw("\x81\xda\x01\x02\x03") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("tag-too-short-8-0") << raw("\x81\xdb") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("tag-too-short-8-7") << raw("\x81\xdb\1\2\3\4\5\6\7") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("fp16-too-short1") << raw("\x81\xf9") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("fp16-too-short2") << raw("\x81\xf9\x00") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("float-too-short1") << raw("\x81\xfa") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("float-too-short2") << raw("\x81\xfa\0\0\0") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("double-too-short1") << raw("\x81\xfb") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("double-too-short2") << raw("\x81\xfb\0\0\0\0\0\0\0") << 0 << CborErrorUnexpectedEOF;
+
+ QTest::newRow("bytearray-too-short1") << raw("\x81\x42z") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-too-short2") << raw("\x81\x58\x02z") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-too-short3") << raw("\x81\x5a\0\0\0\2z") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-too-short4") << raw("\x81\x5b\0\0\0\0\0\0\0\2z") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-too-short1") << raw("\x81\x62z") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-too-short2") << raw("\x81\x78\x02z") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-too-short3") << raw("\x81\x7a\0\0\0\2z") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-too-short4") << raw("\x81\x7b\0\0\0\0\0\0\0\2z") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-chunked-too-short1") << raw("\x81\x5f\x42z") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-chunked-too-short2") << raw("\x81\x5f\x58\x02z") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-chunked-too-short3") << raw("\x81\x5f\x5a\0\0\0\2z") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-chunked-too-short4") << raw("\x81\x5f\x5b\0\0\0\0\0\0\0\2z") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-chunked-too-short1") << raw("\x81\x7f\x62z") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-chunked-too-short2") << raw("\x81\x7f\x78\x02z") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-chunked-too-short3") << raw("\x81\x7f\x7a\0\0\0\2z") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-chunked-too-short4") << raw("\x81\x7f\x7b\0\0\0\0\0\0\0\2z") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-chunked-too-short1x2") << raw("\x81\x5f\x40\x42z") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-chunked-too-short2x2") << raw("\x81\x5f\x40\x58\x02z") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-chunked-too-short3x2") << raw("\x81\x5f\x40\x5a\0\0\0\2z") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-chunked-too-short4x2") << raw("\x81\x5f\x40\x5b\0\0\0\0\0\0\0\2z") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-chunked-too-short1x2") << raw("\x81\x7f\x60\x62z") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-chunked-too-short2x2") << raw("\x81\x7f\x60\x78\x02z") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-chunked-too-short3x2") << raw("\x81\x7f\x60\x7a\0\0\0\2z") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-chunked-too-short4x2") << raw("\x81\x7f\x60\x7b\0\0\0\0\0\0\0\2z") << 0 << CborErrorUnexpectedEOF;
+
+ QTest::newRow("bytearray-no-break1") << raw("\x81\x5f") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("bytearray-no-break2") << raw("\x81\x5f\x40") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-no-break1") << raw("\x81\x7f") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-no-break2") << raw("\x81\x7f\x60") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("array-no-break1") << raw("\x81\x9f") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("array-no-break2") << raw("\x81\x9f\0") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("map-no-break1") << raw("\x81\xbf") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("map-no-break2") << raw("\x81\xbf\0\0") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("map-break-after-key") << raw("\x81\xbf\0\xff") << 0 << CborErrorUnexpectedBreak;
+ QTest::newRow("map-break-after-value-tag") << raw("\x81\xbf\0\xc0\xff") << 0 << CborErrorUnexpectedBreak;
+ QTest::newRow("map-break-after-value-tag2") << raw("\x81\xbf\0\xd8\x20\xff") << 0 << CborErrorUnexpectedBreak;
+
+ // check for pointer additions wrapping over the limit of the address space
+ CborError tooLargeOn32bit = (sizeof(void *) == 4) ? CborErrorDataTooLarge : CborErrorUnexpectedEOF;
+ // on 32-bit systems, this is a -1
+ QTest::newRow("bytearray-wraparound1") << raw("\x81\x5a\xff\xff\xff\xff") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-wraparound1") << raw("\x81\x7a\xff\xff\xff\xff") << 0 << CborErrorUnexpectedEOF;
+ // on 32-bit systems, a 4GB addition could be dropped
+ QTest::newRow("bytearray-wraparound2") << raw("\x81\x5b\0\0\0\1\0\0\0\0") << 0 << tooLargeOn32bit;
+ QTest::newRow("string-wraparound2") << raw("\x81\x7b\0\0\0\1\0\0\0\0") << 0 << tooLargeOn32bit;
+ // on 64-bit systems, this could be a -1
+ QTest::newRow("bytearray-wraparound3") << raw("\x81\x5b\xff\xff\xff\xff\xff\xff\xff\xff") << 0 << tooLargeOn32bit;
+ QTest::newRow("string-wraparound3") << raw("\x81\x7b\xff\xff\xff\xff\xff\xff\xff\xff") << 0 << tooLargeOn32bit;
+
+ // ditto on chunks
+ QTest::newRow("bytearray-chunk-wraparound1") << raw("\x81\x5f\x5a\xff\xff\xff\xff") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("string-chunk-wraparound1") << raw("\x81\x7f\x7a\xff\xff\xff\xff") << 0 << CborErrorUnexpectedEOF;
+ // on 32-bit systems, a 4GB addition could be dropped
+ QTest::newRow("bytearray-chunk-wraparound2") << raw("\x81\x5f\x5b\0\0\0\1\0\0\0\0") << 0 << tooLargeOn32bit;
+ QTest::newRow("string-chunk-wraparound2") << raw("\x81\x7f\x7b\0\0\0\1\0\0\0\0") << 0 << tooLargeOn32bit;
+ // on 64-bit systems, this could be a -1
+ QTest::newRow("bytearray-chunk-wraparound3") << raw("\x81\x5f\x5b\xff\xff\xff\xff\xff\xff\xff\xff") << 0 << tooLargeOn32bit;
+ QTest::newRow("string-chunk-wraparound3") << raw("\x81\x7f\x7b\xff\xff\xff\xff\xff\xff\xff\xff") << 0 << tooLargeOn32bit;
+
+ QTest::newRow("eof-after-array") << raw("\x81") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("eof-after-array2") << raw("\x81\x78\x20") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("eof-after-array-element") << raw("\x81\x82\x01") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("eof-after-object") << raw("\x81\xa1") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("eof-after-object2") << raw("\x81\xb8\x20") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("eof-after-object-key") << raw("\x81\xa1\x01") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("eof-after-object-value") << raw("\x81\xa2\x01\x01") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("eof-after-tag") << raw("\x81\xc0") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("eof-after-tag2") << raw("\x81\xd8\x20") << 0 << CborErrorUnexpectedEOF;
+
+ // major type 7 has future types
+ QTest::newRow("future-type-28") << raw("\x81\xfc") << 0 << CborErrorUnknownType;
+ QTest::newRow("future-type-29") << raw("\x81\xfd") << 0 << CborErrorUnknownType;
+ QTest::newRow("future-type-30") << raw("\x81\xfe") << 0 << CborErrorUnknownType;
+ QTest::newRow("unexpected-break") << raw("\x81\xff") << 0 << CborErrorUnexpectedBreak;
+ QTest::newRow("illegal-simple-0") << raw("\x81\xf8\0") << 0 << CborErrorIllegalSimpleType;
+ QTest::newRow("illegal-simple-31") << raw("\x81\xf8\x1f") << 0 << CborErrorIllegalSimpleType;
+
+ // not only too big (UINT_MAX or UINT_MAX+1 in size), but also incomplete
+ if (sizeof(size_t) < sizeof(uint64_t)) {
+ QTest::newRow("bytearray-too-big1") << raw("\x81\x5b\0\0\0\1\0\0\0\0") << 0 << CborErrorDataTooLarge;
+ QTest::newRow("string-too-big1") << raw("\x81\x7b\0\0\0\1\0\0\0\0") << 0 << CborErrorDataTooLarge;
+ }
+ QTest::newRow("array-too-big1") << raw("\x81\x9a\xff\xff\xff\xff\0\0\0\0") << 0 << CborErrorDataTooLarge;
+ QTest::newRow("array-too-big2") << raw("\x81\x9b\0\0\0\1\0\0\0\0") << 0 << CborErrorDataTooLarge;
+ QTest::newRow("object-too-big1") << raw("\x81\xba\xff\xff\xff\xff\0\0\0\0") << 0 << CborErrorDataTooLarge;
+ QTest::newRow("object-too-big2") << raw("\x81\xbb\0\0\0\1\0\0\0\0") << 0 << CborErrorDataTooLarge;
+
+ QTest::newRow("no-break-for-array0") << raw("\x81\x9f") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("no-break-for-array1") << raw("\x81\x9f\x01") << 0 << CborErrorUnexpectedEOF;
+
+ QTest::newRow("no-break-string0") << raw("\x81\x7f") << 0 << CborErrorUnexpectedEOF;
+ QTest::newRow("no-break-string1") << raw("\x81\x7f\x61Z") << 0 << CborErrorUnexpectedEOF;
+
+ QTest::newRow("nested-indefinite-length-bytearrays") << raw("\x81\x5f\x5f\xff\xff") << 0 << CborErrorIllegalNumber;
+ QTest::newRow("nested-indefinite-length-strings") << raw("\x81\x7f\x7f\xff\xff") << 0 << CborErrorIllegalNumber;
+
+ QTest::newRow("string-chunk-unsigned") << raw("\x81\x7f\0\xff") << 0 << CborErrorIllegalType;
+ QTest::newRow("string-chunk-negative") << raw("\x81\x7f\x20\xff") << 0 << CborErrorIllegalType;
+ QTest::newRow("string-chunk-bytearray") << raw("\x81\x7f\x40\xff") << 0 << CborErrorIllegalType;
+ QTest::newRow("string-chunk-array") << raw("\x81\x7f\x80\xff") << 0 << CborErrorIllegalType;
+ QTest::newRow("string-chunk-map") << raw("\x81\x7f\xa0\xff") << 0 << CborErrorIllegalType;
+ QTest::newRow("string-chunk-tag") << raw("\x81\x7f\xc0\xff") << 0 << CborErrorIllegalType;
+ QTest::newRow("string-chunk-tagged-string") << raw("\x81\x7f\xc0\x60\xff") << 0 << CborErrorIllegalType;
+ QTest::newRow("string-chunk-simple0") << raw("\x81\x7f\xe0\xff") << 0 << CborErrorIllegalType;
+ QTest::newRow("string-chunk-false") << raw("\x81\x7f\xf4\xff") << 0 << CborErrorIllegalType;
+ QTest::newRow("string-chunk-true") << raw("\x81\x7f\xf5\xff") << 0 << CborErrorIllegalType;
+ QTest::newRow("string-chunk-null") << raw("\x81\x7f\xf6\xff") << 0 << CborErrorIllegalType;
+ QTest::newRow("string-chunk-undefined") << raw("\x81\x7f\xf7\xff") << 0 << CborErrorIllegalType;
+
+ QTest::newRow("bytearray-chunk-string") << raw("\x81\x5f\x60\xff") << 0 << CborErrorIllegalType;
+ QTest::newRow("bytearray-chunk-tagged-bytearray") << raw("\x81\x7f\xc0\x40\xff") << 0 << CborErrorIllegalType;
+
+ // RFC 7049 Section 2.2.2 "Indefinite-Length Byte Strings and Text Strings" says
+ // Text strings with indefinite lengths act the same as byte strings
+ // with indefinite lengths, except that all their chunks MUST be
+ // definite-length text strings. Note that this implies that the bytes
+ // of a single UTF-8 character cannot be spread between chunks: a new
+ // chunk can only be started at a character boundary.
+ // This test technically tests the dumper, not the parser.
+ QTest::newRow("string-utf8-chunk-split") << raw("\x81\x7f\x61\xc2\x61\xa0\xff") << 0 << CborErrorInvalidUtf8TextString;
+}
diff --git a/src/3rdparty/tinycbor/tests/parser/parser.pro b/src/3rdparty/tinycbor/tests/parser/parser.pro
new file mode 100644
index 0000000000..a61291a9e4
--- /dev/null
+++ b/src/3rdparty/tinycbor/tests/parser/parser.pro
@@ -0,0 +1,10 @@
+SOURCES += tst_parser.cpp ../../src/cborparser.c
+
+CONFIG += testcase parallel_test c++11
+QT = core testlib
+DEFINES += CBOR_PARSER_MAX_RECURSIONS=16
+
+INCLUDEPATH += ../../src
+msvc: POST_TARGETDEPS = ../../lib/tinycbor.lib
+else: POST_TARGETDEPS += ../../lib/libtinycbor.a
+LIBS += $$POST_TARGETDEPS
diff --git a/src/3rdparty/tinycbor/tests/parser/tst_parser.cpp b/src/3rdparty/tinycbor/tests/parser/tst_parser.cpp
new file mode 100644
index 0000000000..74c480bc51
--- /dev/null
+++ b/src/3rdparty/tinycbor/tests/parser/tst_parser.cpp
@@ -0,0 +1,1667 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Intel Corporation
+**
+** Permission is hereby granted, free of charge, to any person obtaining a copy
+** of this software and associated documentation files (the "Software"), to deal
+** in the Software without restriction, including without limitation the rights
+** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+** copies of the Software, and to permit persons to whom the Software is
+** furnished to do so, subject to the following conditions:
+**
+** The above copyright notice and this permission notice shall be included in
+** all copies or substantial portions of the Software.
+**
+** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+** THE SOFTWARE.
+**
+****************************************************************************/
+
+#define _XOPEN_SOURCE 700
+#include <QtTest>
+#include "cbor.h"
+#include <stdio.h>
+#include <stdarg.h>
+
+namespace QTest {
+template<> char *toString<CborError>(const CborError &err)
+{
+ return qstrdup(cbor_error_string(err));
+}
+}
+
+class tst_Parser : public QObject
+{
+ Q_OBJECT
+private slots:
+ void initParserEmpty();
+
+ // parsing API
+ void integers_data();
+ void integers();
+ void fixed_data();
+ void fixed();
+ void strings_data();
+ void strings() { fixed(); }
+ void tags_data();
+ void tags() { fixed(); }
+ void tagTags_data() { tags_data(); }
+ void tagTags();
+ void emptyContainers_data();
+ void emptyContainers();
+ void arrays_data();
+ void arrays();
+ void undefLengthArrays_data() { arrays_data(); }
+ void undefLengthArrays();
+ void nestedArrays_data() { arrays_data(); }
+ void nestedArrays();
+ void maps_data();
+ void maps();
+ void undefLengthMaps_data() { maps_data(); }
+ void undefLengthMaps();
+ void nestedMaps_data() { maps_data(); }
+ void nestedMaps();
+ void mapMixed_data();
+ void mapMixed() { arrays(); }
+ void mapsAndArrays_data() { arrays_data(); }
+ void mapsAndArrays();
+
+ void readerApi_data() { arrays_data(); }
+ void readerApi();
+ void reparse_data();
+ void reparse();
+
+ // chunked string API
+ void chunkedString_data();
+ void chunkedString();
+ void chunkedStringInUndefArray_data() { chunkedString_data(); }
+ void chunkedStringInUndefArray();
+
+ // convenience API
+ void stringLength_data();
+ void stringLength();
+ void stringCompare_data();
+ void stringCompare();
+ void mapFind_data();
+ void mapFind();
+
+ // validation & errors
+ void checkedIntegers_data();
+ void checkedIntegers();
+ void validation_data();
+ void validation();
+ void strictValidation_data();
+ void strictValidation();
+ void incompleteData_data();
+ void incompleteData();
+ void endPointer_data();
+ void endPointer();
+ void recursionLimit_data();
+ void recursionLimit();
+};
+
+static CborError qstring_printf(void *out, const char *fmt, ...)
+{
+ auto str = static_cast<QString *>(out);
+ va_list va;
+ va_start(va, fmt);
+ *str += QString::vasprintf(fmt, va);
+ va_end(va);
+ return CborNoError;
+};
+
+CborError parseOne(CborValue *it, QString *parsed)
+{
+ int flags = CborPrettyShowStringFragments | CborPrettyIndicateIndeterminateLength |
+ CborPrettyIndicateOverlongNumbers;
+
+ parsed->clear();
+ return cbor_value_to_pretty_stream(qstring_printf, parsed, it, flags);
+}
+
+CborError parseOneChunk(CborValue *it, QString *parsed)
+{
+ CborError err;
+ CborType ourType = cbor_value_get_type(it);
+ if (ourType == CborByteStringType) {
+ const uint8_t *bytes;
+ size_t len;
+ err = cbor_value_get_byte_string_chunk(it, &bytes, &len, it);
+ if (err)
+ return err;
+
+ if (bytes)
+ *parsed = QString::fromLatin1("h'" +
+ QByteArray::fromRawData(reinterpret_cast<const char *>(bytes), len).toHex() +
+ '\'');
+ } else if (ourType == CborTextStringType) {
+ const char *text;
+ size_t len;
+ err = cbor_value_get_text_string_chunk(it, &text, &len, it);
+ if (err)
+ return err;
+
+ if (text)
+ *parsed = '"' + QString::fromUtf8(text, len) + '"';
+ } else {
+ Q_ASSERT(false);
+ }
+ return err;
+}
+
+void tst_Parser::initParserEmpty()
+{
+ CborParser parser;
+ CborValue first;
+ CborError err = cbor_parser_init((const quint8 *)"", 0, 0, &parser, &first);
+ QCOMPARE(err, CborErrorUnexpectedEOF);
+}
+
+bool compareFailed = true;
+void compareOne_real(const QByteArray &data, const QString &expected, int line, int n = -1)
+{
+ compareFailed = true;
+ CborParser parser;
+ CborValue first;
+ CborError err = cbor_parser_init(reinterpret_cast<const quint8 *>(data.constData()), data.length(), 0, &parser, &first);
+ QVERIFY2(!err, QByteArray::number(line) + ": Got error \"" + cbor_error_string(err) + "\"");
+
+ if (cbor_value_get_type(&first) == CborArrayType) {
+ size_t len;
+ if (n >= 0) {
+ QVERIFY(cbor_value_is_length_known(&first));
+ QCOMPARE(cbor_value_get_array_length(&first, &len), CborNoError);
+ QCOMPARE(len, size_t(len));
+ } else {
+ QVERIFY(!cbor_value_is_length_known(&first));
+ QCOMPARE(cbor_value_get_array_length(&first, &len), CborErrorUnknownLength);
+ }
+ } else if (cbor_value_get_type(&first) == CborMapType) {
+ size_t len;
+ if (n >= 0) {
+ QVERIFY(cbor_value_is_length_known(&first));
+ QCOMPARE(cbor_value_get_map_length(&first, &len), CborNoError);
+ QCOMPARE(len, size_t(len));
+ } else {
+ QVERIFY(!cbor_value_is_length_known(&first));
+ QCOMPARE(cbor_value_get_map_length(&first, &len), CborErrorUnknownLength);
+ }
+ } else if (cbor_value_is_text_string(&first) || cbor_value_is_byte_string(&first)) {
+ size_t len;
+ QCOMPARE(cbor_value_calculate_string_length(&first, &len), CborNoError);
+ if (cbor_value_is_length_known(&first)) {
+ size_t len2;
+ QCOMPARE(cbor_value_get_string_length(&first, &len2), CborNoError);
+ QCOMPARE(len2, len);
+ } else {
+ QCOMPARE(cbor_value_get_string_length(&first, &len), CborErrorUnknownLength);
+ }
+ }
+
+ CborError err2 = cbor_value_validate_basic(&first);
+
+ QString decoded;
+ err = parseOne(&first, &decoded);
+ QVERIFY2(!err, QByteArray::number(line) + ": Got error \"" + cbor_error_string(err) +
+ "\"; decoded stream:\n" + decoded.toLatin1());
+ QCOMPARE(decoded, expected);
+
+ // check that the errors are the same
+ QCOMPARE(err2, err);
+
+ // check that we consumed everything
+ QCOMPARE((void*)cbor_value_get_next_byte(&first), (void*)data.constEnd());
+
+ compareFailed = false;
+}
+#define compareOne(data, expected) compareOne_real(data, expected, __LINE__)
+#define compareOneSize(n, data, expected) compareOne_real(data, expected, __LINE__, n)
+
+#include "data.cpp"
+
+void tst_Parser::integers_data()
+{
+ addIntegers();
+}
+
+void tst_Parser::integers()
+{
+ QFETCH(QByteArray, data);
+ QFETCH(bool, isNegative);
+ QFETCH(quint64, expectedRaw);
+ QFETCH(qint64, expectedValue);
+ QFETCH(bool, inInt64Range);
+
+ CborParser parser;
+ CborValue first;
+ CborError err = cbor_parser_init(reinterpret_cast<const quint8 *>(data.constData()), data.length(), 0, &parser, &first);
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+ QVERIFY(cbor_value_is_integer(&first));
+
+ uint64_t raw;
+ cbor_value_get_raw_integer(&first, &raw);
+ QCOMPARE(quint64(raw), expectedRaw);
+
+ if (isNegative) {
+ QVERIFY(cbor_value_is_negative_integer(&first));
+ QVERIFY(!cbor_value_is_unsigned_integer(&first));
+ } else {
+ QVERIFY(!cbor_value_is_negative_integer(&first));
+ QVERIFY(cbor_value_is_unsigned_integer(&first));
+ }
+
+ int64_t value;
+ if (inInt64Range) {
+ cbor_value_get_int64(&first, &value);
+ QCOMPARE(qint64(value), expectedValue);
+ }
+
+ err = cbor_value_get_int64_checked(&first, &value);
+ QCOMPARE(err, inInt64Range ? CborNoError : CborErrorDataTooLarge);
+
+ int ivalue;
+ bool inIntRange = inInt64Range && (expectedValue == int(expectedValue));
+ err = cbor_value_get_int_checked(&first, &ivalue);
+ QCOMPARE(err, inIntRange ? CborNoError : CborErrorDataTooLarge);
+}
+
+void tst_Parser::fixed_data()
+{
+ addColumns();
+ addFixedData();
+}
+
+void tst_Parser::fixed()
+{
+ QFETCH(QByteArray, data);
+ QFETCH(QString, expected);
+
+ compareOne(data, expected);
+}
+
+void tst_Parser::strings_data()
+{
+ addColumns();
+ addStringsData();
+}
+
+void tst_Parser::tags_data()
+{
+ addColumns();
+ addTagsData();
+}
+
+void tst_Parser::tagTags()
+{
+ QFETCH(QByteArray, data);
+ QFETCH(QString, expected);
+
+ compareOne("\xd9\xd9\xf7" + data, "55799(" + expected + ')');
+ if (!compareFailed)
+ compareOne("\xd9\xd9\xf7" "\xd9\xd9\xf7" + data, "55799(55799(" + expected + "))");
+}
+
+void tst_Parser::emptyContainers_data()
+{
+ addColumns();
+ addEmptyContainersData();
+}
+
+void tst_Parser::emptyContainers()
+{
+ QFETCH(QByteArray, data);
+ QFETCH(QString, expected);
+ QFETCH(int, n);
+
+ compareOneSize(n, data, expected);
+}
+
+void tst_Parser::arrays_data()
+{
+ addColumns();
+ addFixedData();
+ addStringsData();
+ addTagsData();
+}
+
+void tst_Parser::arrays()
+{
+ QFETCH(QByteArray, data);
+ QFETCH(QString, expected);
+
+ compareOneSize(1, "\x81" + data, '[' + expected + ']');
+ if (compareFailed) return;
+
+ compareOneSize(2, "\x82" + data + data, '[' + expected + ", " + expected + ']');
+ if (compareFailed) return;
+
+ // overlong length
+ compareOneSize(1, "\x98\1" + data, "[_0 " + expected + ']');
+ if (compareFailed) return;
+ compareOneSize(1, raw("\x99\0\1") + data, "[_1 " + expected + ']');
+ if (compareFailed) return;
+ compareOneSize(1, raw("\x9a\0\0\0\1") + data, "[_2 " + expected + ']');
+ if (compareFailed) return;
+ compareOneSize(1, raw("\x9b\0\0\0\0\0\0\0\1") + data, "[_3 " + expected + ']');
+ if (compareFailed) return;
+
+ // medium-sized array: 32 elements (1 << 5)
+ expected += ", ";
+ for (int i = 0; i < 5; ++i) {
+ data += data;
+ expected += expected;
+ }
+ expected.chop(2); // remove the last ", "
+ compareOneSize(32, "\x98\x20" + data, '[' + expected + ']');
+ if (compareFailed) return;
+
+ // large array: 256 elements (32 << 3)
+ expected += ", ";
+ for (int i = 0; i < 3; ++i) {
+ data += data;
+ expected += expected;
+ }
+ expected.chop(2); // remove the last ", "
+ compareOneSize(256, raw("\x99\1\0") + data, '[' + expected + ']');
+ if (compareFailed) return;
+}
+
+void tst_Parser::undefLengthArrays()
+{
+ QFETCH(QByteArray, data);
+ QFETCH(QString, expected);
+
+ compareOne("\x9f" + data + "\xff", "[_ " + expected + ']');
+ if (compareFailed) return;
+
+ compareOne("\x9f" + data + data + "\xff", "[_ " + expected + ", " + expected + ']');
+}
+
+void tst_Parser::nestedArrays()
+{
+ QFETCH(QByteArray, data);
+ QFETCH(QString, expected);
+
+ compareOneSize(1, "\x81\x81" + data, "[[" + expected + "]]");
+ if (compareFailed) return;
+
+ compareOneSize(1, "\x81\x81\x81" + data, "[[[" + expected + "]]]");
+ if (compareFailed) return;
+
+ compareOneSize(1, "\x81\x82" + data + data, "[[" + expected + ", " + expected + "]]");
+ if (compareFailed) return;
+
+ compareOneSize(2, "\x82\x81" + data + data, "[[" + expected + "], " + expected + "]");
+ if (compareFailed) return;
+
+ compareOneSize(2, "\x82\x81" + data + '\x81' + data, "[[" + expected + "], [" + expected + "]]");
+ if (compareFailed) return;
+
+ // undefined length
+ compareOneSize(-1, "\x9f\x9f" + data + data + "\xff\xff", "[_ [_ " + expected + ", " + expected + "]]");
+ if (compareFailed) return;
+
+ compareOneSize(-1, "\x9f\x9f" + data + "\xff\x9f" + data + "\xff\xff", "[_ [_ " + expected + "], [_ " + expected + "]]");
+ if (compareFailed) return;
+
+ compareOneSize(-1, "\x9f\x9f" + data + data + "\xff\x9f" + data + "\xff\xff",
+ "[_ [_ " + expected + ", " + expected + "], [_ " + expected + "]]");
+ if (compareFailed) return;
+
+ // mix them
+ compareOneSize(1, "\x81\x9f" + data + "\xff", "[[_ " + expected + "]]");
+ if (compareFailed) return;
+
+ compareOneSize(-1, "\x9f\x81" + data + "\xff", "[_ [" + expected + "]]");
+}
+
+void tst_Parser::maps_data()
+{
+ arrays_data();
+}
+
+void tst_Parser::maps()
+{
+ QFETCH(QByteArray, data);
+ QFETCH(QString, expected);
+
+ // integer key
+ compareOneSize(1, "\xa1\1" + data, "{1: " + expected + '}');
+ if (compareFailed) return;
+
+ // string key
+ compareOneSize(1, "\xa1\x65" "Hello" + data, "{\"Hello\": " + expected + '}');
+ if (compareFailed) return;
+
+ // map to self
+ compareOneSize(1, "\xa1" + data + data, '{' + expected + ": " + expected + '}');
+ if (compareFailed) return;
+
+ // two integer keys
+ compareOneSize(2, "\xa2\1" + data + "\2" + data, "{1: " + expected + ", 2: " + expected + '}');
+ if (compareFailed) return;
+
+ // OneSize integer and OneSize string key
+ compareOneSize(2, "\xa2\1" + data + "\x65" "Hello" + data, "{1: " + expected + ", \"Hello\": " + expected + '}');
+ if (compareFailed) return;
+}
+
+void tst_Parser::undefLengthMaps()
+{
+ QFETCH(QByteArray, data);
+ QFETCH(QString, expected);
+
+ // integer key
+ compareOne("\xbf\1" + data + '\xff', "{_ 1: " + expected + '}');
+ if (compareFailed) return;
+
+ compareOne("\xbf\1" + data + '\2' + data + '\xff', "{_ 1: " + expected + ", 2: " + expected + '}');
+ if (compareFailed) return;
+
+ compareOne("\xbf\1" + data + "\x65Hello" + data + '\xff', "{_ 1: " + expected + ", \"Hello\": " + expected + '}');
+ if (compareFailed) return;
+
+ compareOne("\xbf\x65Hello" + data + '\1' + data + '\xff', "{_ \"Hello\": " + expected + ", 1: " + expected + '}');
+}
+
+void tst_Parser::nestedMaps()
+{
+ QFETCH(QByteArray, data);
+ QFETCH(QString, expected);
+
+ // nested maps as values
+ compareOneSize(1, "\xa1\1\xa1\2" + data, "{1: {2: " + expected + "}}");
+ if (compareFailed) return;
+
+ compareOneSize(1, "\xa1\x65Hello\xa1\2" + data, "{\"Hello\": {2: " + expected + "}}");
+ if (compareFailed) return;
+
+ compareOneSize(1, "\xa1\1\xa2\2" + data + '\x20' + data, "{1: {2: " + expected + ", -1: " + expected + "}}");
+ if (compareFailed) return;
+
+ compareOneSize(2, "\xa2\1\xa1\2" + data + "\2\xa1\x20" + data, "{1: {2: " + expected + "}, 2: {-1: " + expected + "}}");
+ if (compareFailed) return;
+
+ // nested maps as keys
+ compareOneSize(1, "\xa1\xa1\xf4" + data + "\xf5", "{{false: " + expected + "}: true}");
+ if (compareFailed) return;
+
+ compareOneSize(1, "\xa1\xa1" + data + data + "\xa1" + data + data,
+ "{{" + expected + ": " + expected + "}: {" + expected + ": " + expected + "}}");
+ if (compareFailed) return;
+
+ // undefined length
+ compareOneSize(-1, "\xbf\1\xbf\2" + data + "\xff\xff", "{_ 1: {_ 2: " + expected + "}}");
+ if (compareFailed) return;
+
+ compareOneSize(-1, "\xbf\1\xbf\2" + data + '\x20' + data + "\xff\xff", "{_ 1: {_ 2: " + expected + ", -1: " + expected + "}}");
+ if (compareFailed) return;
+
+ compareOneSize(-1, "\xbf\1\xbf\2" + data + "\xff\2\xbf\x20" + data + "\xff\xff",
+ "{_ 1: {_ 2: " + expected + "}, 2: {_ -1: " + expected + "}}");
+ if (compareFailed) return;
+
+ compareOneSize(-1, "\xbf\xbf" + data + data + "\xff\xbf" + data + data + "\xff\xff",
+ "{_ {_ " + expected + ": " + expected + "}: {_ " + expected + ": " + expected + "}}");
+ if (compareFailed) return;
+
+ // mix them
+ compareOneSize(1, "\xa1\1\xbf\2" + data + "\xff", "{1: {_ 2: " + expected + "}}");
+ if (compareFailed) return;
+
+ compareOneSize(-1, "\xbf\1\xa1\2" + data + "\xff", "{_ 1: {2: " + expected + "}}");
+ if (compareFailed) return;
+}
+
+void tst_Parser::mapMixed_data()
+{
+ addColumns();
+ addMapMixedData();
+}
+
+void tst_Parser::mapsAndArrays()
+{
+ QFETCH(QByteArray, data);
+ QFETCH(QString, expected);
+
+ // arrays of maps
+ compareOneSize(1, "\x81\xa1\1" + data, "[{1: " + expected + "}]");
+ if (compareFailed) return;
+
+ compareOneSize(2, "\x82\xa1\1" + data + "\xa1\2" + data, "[{1: " + expected + "}, {2: " + expected + "}]");
+ if (compareFailed) return;
+
+ compareOneSize(1, "\x81\xa2\1" + data + "\2" + data, "[{1: " + expected + ", 2: " + expected + "}]");
+ if (compareFailed) return;
+
+ compareOneSize(-1, "\x9f\xa1\1" + data + "\xff", "[_ {1: " + expected + "}]");
+ if (compareFailed) return;
+
+ compareOneSize(1, "\x81\xbf\1" + data + "\xff", "[{_ 1: " + expected + "}]");
+ if (compareFailed) return;
+
+ compareOneSize(-1, "\x9f\xbf\1" + data + "\xff\xff", "[_ {_ 1: " + expected + "}]");
+ if (compareFailed) return;
+
+ // maps of arrays
+ compareOneSize(1, "\xa1\1\x81" + data, "{1: [" + expected + "]}");
+ if (compareFailed) return;
+
+ compareOneSize(1, "\xa1\1\x82" + data + data, "{1: [" + expected + ", " + expected + "]}");
+ if (compareFailed) return;
+
+ compareOneSize(2, "\xa2\1\x81" + data + "\x65Hello\x81" + data, "{1: [" + expected + "], \"Hello\": [" + expected + "]}");
+ if (compareFailed) return;
+
+ compareOneSize(1, "\xa1\1\x9f" + data + "\xff", "{1: [_ " + expected + "]}");
+ if (compareFailed) return;
+
+ compareOneSize(1, "\xa1\1\x9f" + data + data + "\xff", "{1: [_ " + expected + ", " + expected + "]}");
+ if (compareFailed) return;
+
+ compareOneSize(-1, "\xbf\1\x81" + data + "\xff", "{_ 1: [" + expected + "]}");
+ if (compareFailed) return;
+
+ compareOneSize(-1, "\xbf\1\x9f" + data + "\xff\xff", "{_ 1: [_ " + expected + "]}");
+ if (compareFailed) return;
+
+ compareOneSize(-1, "\xbf\1\x9f" + data + data + "\xff\xff", "{_ 1: [_ " + expected + ", " + expected + "]}");
+ if (compareFailed) return;
+
+ // mixed with indeterminate length strings
+ compareOneSize(-1, "\xbf\1\x9f" + data + "\xff\x65Hello\xbf" + data + "\x7f\xff\xff\xff",
+ "{_ 1: [_ " + expected + "], \"Hello\": {_ " + expected + ": (_ )}}");
+}
+
+struct Input {
+ QByteArray data;
+ int consumed;
+};
+
+static const CborParserOperations byteArrayOps = {
+ /* can_read_bytes = */ [](void *token, size_t len) {
+ auto input = static_cast<Input *>(token);
+ return input->data.size() - input->consumed >= int(len);
+ },
+ /* read_bytes = */ [](void *token, void *dst, size_t offset, size_t len) {
+ auto input = static_cast<Input *>(token);
+ return memcpy(dst, input->data.constData() + input->consumed + offset, len);
+ },
+ /* advance_bytes = */ [](void *token, size_t len) {
+ auto input = static_cast<Input *>(token);
+ input->consumed += int(len);
+ },
+ /* transfer_string = */ [](void *token, const void **userptr, size_t offset, size_t len) {
+ // ###
+ auto input = static_cast<Input *>(token);
+ if (input->data.size() - input->consumed < int(len + offset))
+ return CborErrorUnexpectedEOF;
+ input->consumed += int(offset);
+ *userptr = input->data.constData() + input->consumed;
+ input->consumed += int(len);
+ return CborNoError;
+ }
+};
+
+void tst_Parser::readerApi()
+{
+ QFETCH(QByteArray, data);
+ QFETCH(QString, expected);
+
+ Input input = { data, 0 };
+
+ CborParser parser;
+ CborValue first;
+ CborError err = cbor_parser_init_reader(&byteArrayOps, &parser, &first, &input);
+ QCOMPARE(err, CborNoError);
+
+ QString decoded;
+ err = parseOne(&first, &decoded);
+ QCOMPARE(err, CborNoError);
+ QCOMPARE(decoded, expected);
+
+ // check we consumed everything
+ QCOMPARE(input.consumed, data.size());
+}
+
+void tst_Parser::reparse_data()
+{
+ // only one-item rows
+ addColumns();
+ addFixedData();
+}
+
+void tst_Parser::reparse()
+{
+ QFETCH(QByteArray, data);
+ QFETCH(QString, expected);
+
+ Input input = { QByteArray(), 0 };
+ CborParser parser;
+ CborValue first;
+ CborError err = cbor_parser_init_reader(&byteArrayOps, &parser, &first, &input);
+ QCOMPARE(err, CborErrorUnexpectedEOF);
+
+ for (int i = 0; i < data.size(); ++i) {
+ input.data = data.left(i);
+ err = cbor_value_reparse(&first);
+ if (err != CborErrorUnexpectedEOF)
+ qDebug() << "At" << i;
+ QCOMPARE(err, CborErrorUnexpectedEOF);
+ QCOMPARE(input.consumed, 0);
+ }
+
+ // now it should work
+ input.data = data;
+ err = cbor_value_reparse(&first);
+ QCOMPARE(err, CborNoError);
+
+ QString decoded;
+ err = parseOne(&first, &decoded);
+ QCOMPARE(err, CborNoError);
+ QCOMPARE(decoded, expected);
+
+ // check we consumed everything
+ QCOMPARE(input.consumed, data.size());
+}
+
+void tst_Parser::chunkedString_data()
+{
+ addChunkedStringData();
+}
+
+static void chunkedStringTest(const QByteArray &data, const QString &concatenated,
+ QStringList &chunks, CborType ourType)
+{
+ CborParser parser;
+ CborValue first;
+ CborError err = cbor_parser_init(reinterpret_cast<const quint8 *>(data.constData()), data.length(), 0, &parser, &first);
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+
+ CborValue value;
+ QVERIFY(cbor_value_is_array(&first));
+ err = cbor_value_enter_container(&first, &value);
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+ QVERIFY(cbor_value_is_byte_string(&value) || cbor_value_is_text_string(&value));
+
+ CborValue copy = value;
+
+ err = cbor_value_begin_string_iteration(&value);
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+ forever {
+ QString decoded;
+ err = parseOneChunk(&value, &decoded);
+ if (err == CborErrorNoMoreStringChunks)
+ break; // last chunk
+
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+
+ QVERIFY2(!chunks.isEmpty(), "Too many chunks");
+ QString expected = chunks.takeFirst();
+ QCOMPARE(decoded, expected);
+ }
+
+ err = cbor_value_finish_string_iteration(&value);
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+ QVERIFY2(chunks.isEmpty(), "Too few chunks");
+
+ // compare to the concatenated data
+ {
+ size_t n;
+ err = cbor_value_calculate_string_length(&copy, &n);
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+
+ QByteArray buffer(n, Qt::Uninitialized);
+ QString formatted;
+ if (cbor_value_is_byte_string(&copy)) {
+ err = cbor_value_copy_byte_string(&copy, (uint8_t *)buffer.data(), &n, nullptr);
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+ QCOMPARE(int(n), buffer.size());
+
+ formatted = QString::fromLatin1("h'" + buffer.toHex() + '\'');
+ } else {
+ err = cbor_value_copy_text_string(&copy, buffer.data(), &n, nullptr);
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+ QCOMPARE(int(n), buffer.size());
+
+ formatted = '"' + QString::fromUtf8(buffer.data(), n) + '"';
+ }
+ QCOMPARE(formatted, concatenated);
+ }
+
+ // confirm that the extra string we appended is still here
+ QVERIFY(!cbor_value_at_end(&value));
+ QCOMPARE(cbor_value_get_type(&value), ourType);
+ size_t len;
+ err = cbor_value_get_string_length(&value, &len);
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+ QCOMPARE(len, size_t(0));
+
+ err = cbor_value_advance(&value);
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+
+ // confirm EOF
+ QVERIFY(cbor_value_at_end(&value));
+
+ err = cbor_value_leave_container(&first, &value);
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+ QCOMPARE((void*)cbor_value_get_next_byte(&first), (void*)data.constEnd());
+}
+
+void tst_Parser::chunkedString()
+{
+ QFETCH(QByteArray, data);
+ QFETCH(QString, concatenated);
+ QFETCH(QStringList, chunks);
+
+ // Make this an array of two entries, with the second an empty byte or text string
+ CborType ourType = CborType(data.at(0) & 0xe0);
+ data.prepend(char(0x82));
+ data.append(ourType);
+
+ chunkedStringTest(data, concatenated, chunks, ourType);
+}
+
+void tst_Parser::chunkedStringInUndefArray()
+{
+ QFETCH(QByteArray, data);
+ QFETCH(QString, concatenated);
+ QFETCH(QStringList, chunks);
+
+ // Make this an array of undefined length entries, with the second entry an empty byte or text string
+ CborType ourType = CborType(data.at(0) & 0xe0);
+ data.prepend(char(0x9f));
+ data.append(ourType);
+ data.append(char(0xff));
+
+ chunkedStringTest(data, concatenated, chunks, ourType);
+}
+
+void tst_Parser::stringLength_data()
+{
+ QTest::addColumn<QByteArray>("data");
+ QTest::addColumn<int>("expected");
+
+ QTest::newRow("emptybytestring") << raw("\x40") << 0;
+ QTest::newRow("bytestring1") << raw("\x41 ") << 1;
+ QTest::newRow("bytestring1-nul") << raw("\x41\0") << 1;
+ QTest::newRow("bytestring5") << raw("\x45Hello") << 5;
+ QTest::newRow("bytestring24") << raw("\x58\x18""123456789012345678901234") << 24;
+ QTest::newRow("bytestring256") << raw("\x59\1\0") + QByteArray(256, '3') << 256;
+
+ // text strings
+ QTest::newRow("emptytextstring") << raw("\x60") << 0;
+ QTest::newRow("textstring1") << raw("\x61 ") << 1;
+ QTest::newRow("textstring1-nul") << raw("\x61\0") << 1;
+ QTest::newRow("textstring5") << raw("\x65Hello") << 5;
+ QTest::newRow("textstring24") << raw("\x78\x18""123456789012345678901234") << 24;
+ QTest::newRow("textstring256") << raw("\x79\1\0") + QByteArray(256, '3') << 256;
+
+ // strings with overlong length
+ QTest::newRow("emptybytestring*1") << raw("\x58\x00") << 0;
+ QTest::newRow("emptytextstring*1") << raw("\x78\x00") << 0;
+ QTest::newRow("emptybytestring*2") << raw("\x59\x00\x00") << 0;
+ QTest::newRow("emptytextstring*2") << raw("\x79\x00\x00") << 0;
+ QTest::newRow("emptybytestring*4") << raw("\x5a\0\0\0\0") << 0;
+ QTest::newRow("emptytextstring*4") << raw("\x7a\0\0\0\0") << 0;
+ QTest::newRow("emptybytestring*8") << raw("\x5b\0\0\0\0\0\0\0\0") << 0;
+ QTest::newRow("emptytextstring*8") << raw("\x7b\0\0\0\0\0\0\0\0") << 0;
+ QTest::newRow("bytestring5*1") << raw("\x58\x05Hello") << 5;
+ QTest::newRow("textstring5*1") << raw("\x78\x05Hello") << 5;
+ QTest::newRow("bytestring5*2") << raw("\x59\0\5Hello") << 5;
+ QTest::newRow("textstring5*2") << raw("\x79\0\x05Hello") << 5;
+ QTest::newRow("bytestring5*4") << raw("\x5a\0\0\0\5Hello") << 5;
+ QTest::newRow("textstring5*4") << raw("\x7a\0\0\0\x05Hello") << 5;
+ QTest::newRow("bytestring5*8") << raw("\x5b\0\0\0\0\0\0\0\5Hello") << 5;
+ QTest::newRow("textstring5*8") << raw("\x7b\0\0\0\0\0\0\0\x05Hello") << 5;
+
+ // strings with undefined length
+ QTest::newRow("_emptybytestring") << raw("\x5f\xff") << 0;
+ QTest::newRow("_emptytextstring") << raw("\x7f\xff") << 0;
+ QTest::newRow("_emptybytestring2") << raw("\x5f\x40\xff") << 0;
+ QTest::newRow("_emptytextstring2") << raw("\x7f\x60\xff") << 0;
+ QTest::newRow("_emptybytestring3") << raw("\x5f\x40\x40\xff") << 0;
+ QTest::newRow("_emptytextstring3") << raw("\x7f\x60\x60\xff") << 0;
+ QTest::newRow("_bytestring5*2") << raw("\x5f\x43Hel\x42lo\xff") << 5;
+ QTest::newRow("_textstring5*2") << raw("\x7f\x63Hel\x62lo\xff") << 5;
+ QTest::newRow("_bytestring5*5") << raw("\x5f\x41H\x41""e\x41l\x41l\x41o\xff") << 5;
+ QTest::newRow("_textstring5*5") << raw("\x7f\x61H\x61""e\x61l\x61l\x61o\xff") << 5;
+ QTest::newRow("_bytestring5*6") << raw("\x5f\x41H\x41""e\x40\x41l\x41l\x41o\xff") << 5;
+ QTest::newRow("_textstring5*6") << raw("\x7f\x61H\x61""e\x61l\x60\x61l\x61o\xff") << 5;
+}
+
+void tst_Parser::stringLength()
+{
+ QFETCH(QByteArray, data);
+ QFETCH(int, expected);
+
+ CborParser parser;
+ CborValue value;
+ CborError err = cbor_parser_init(reinterpret_cast<const quint8 *>(data.constData()), data.length(), 0, &parser, &value);
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+
+ size_t result;
+ err = cbor_value_calculate_string_length(&value, &result);
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+ QCOMPARE(result, size_t(expected));
+
+ if (cbor_value_is_length_known(&value)) {
+ QCOMPARE(cbor_value_get_string_length(&value, &result), CborNoError);
+ QCOMPARE(result, size_t(expected));
+ }
+
+}
+
+void tst_Parser::stringCompare_data()
+{
+ QTest::addColumn<QByteArray>("data");
+ QTest::addColumn<QString>("string");
+ QTest::addColumn<bool>("expected");
+
+ // compare empty to empty
+ QTest::newRow("empty-empty") << raw("\x60") << QString() << true;
+ QTest::newRow("_empty-empty") << raw("\x7f\xff") << QString() << true;
+ QTest::newRow("_empty*1-empty") << raw("\x7f\x60\xff") << QString() << true;
+ QTest::newRow("_empty*2-empty") << raw("\x7f\x60\x60\xff") << QString() << true;
+
+ // compare empty to non-empty
+ QTest::newRow("empty-nonempty") << raw("\x60") << "Hello" << false;
+ QTest::newRow("_empty-nonempty") << raw("\x7f\xff") << "Hello" << false;
+ QTest::newRow("_empty*1-nonempty") << raw("\x7f\x60\xff") << "Hello" << false;
+ QTest::newRow("_empty*2-nonempty") << raw("\x7f\x60\x60\xff") << "Hello" << false;
+
+ // compare same strings
+ QTest::newRow("same-short-short") << raw("\x65Hello") << "Hello" << true;
+ QTest::newRow("same-_short*1-short") << raw("\x7f\x65Hello\xff") << "Hello" << true;
+ QTest::newRow("same-_short*2-short") << raw("\x7f\x63Hel\x62lo\xff") << "Hello" << true;
+ QTest::newRow("same-_short*5-short") << raw("\x7f\x61H\x61""e\x61l\x61l\x61o\xff") << "Hello" << true;
+ QTest::newRow("same-_short*8-short") << raw("\x7f\x61H\x60\x61""e\x60\x61l\x61l\x60\x61o\xff") << "Hello" << true;
+ QTest::newRow("same-long-long") << raw("\x78\x2aGood morning, good afternoon and goodnight")
+ << "Good morning, good afternoon and goodnight" << true;
+ QTest::newRow("same-_long*1-long") << raw("\x7f\x78\x2aGood morning, good afternoon and goodnight\xff")
+ << "Good morning, good afternoon and goodnight" << true;
+ QTest::newRow("same-_long*2-long") << raw("\x7f\x78\x1cGood morning, good afternoon\x6e and goodnight\xff")
+ << "Good morning, good afternoon and goodnight" << true;
+
+ // compare different strings (same length)
+ QTest::newRow("diff-same-length-short-short") << raw("\x65Hello") << "World" << false;
+ QTest::newRow("diff-same-length-_short*1-short") << raw("\x7f\x65Hello\xff") << "World" << false;
+ QTest::newRow("diff-same-length-_short*2-short") << raw("\x7f\x63Hel\x62lo\xff") << "World" << false;
+ QTest::newRow("diff-same-length-_short*5-short") << raw("\x7f\x61H\x61""e\x61l\x61l\x61o\xff") << "World" << false;
+ QTest::newRow("diff-same-length-_short*8-short") << raw("\x7f\x61H\x60\x61""e\x60\x61l\x61l\x60\x61o\xff") << "World" << false;
+ QTest::newRow("diff-same-length-long-long") << raw("\x78\x2aGood morning, good afternoon and goodnight")
+ << "Good morning, good afternoon and goodnight, world" << false;
+ QTest::newRow("diff-same-length-_long*1-long") << raw("\x7f\x78\x2aGood morning, good afternoon and goodnight\xff")
+ << "Good morning, good afternoon and goodnight, world" << false;
+ QTest::newRow("diff-same-length-_long*2-long") << raw("\x7f\x78\x1cGood morning, good afternoon\x6e and goodnight\xff")
+ << "Good morning, good afternoon and goodnight, world" << false;
+
+ // compare different strings (different length)
+ QTest::newRow("diff-diff-length-short-short") << raw("\x65Hello") << "Hello World" << false;
+ QTest::newRow("diff-diff-length-_short*1-short") << raw("\x7f\x65Hello\xff") << "Hello World" << false;
+ QTest::newRow("diff-diff-length-_short*2-short") << raw("\x7f\x63Hel\x62lo\xff") << "Hello World" << false;
+ QTest::newRow("diff-diff-length-_short*5-short") << raw("\x7f\x61H\x61""e\x61l\x61l\x61o\xff") << "Hello World" << false;
+ QTest::newRow("diff-diff-length-_short*8-short") << raw("\x7f\x61H\x60\x61""e\x60\x61l\x61l\x60\x61o\xff") << "Hello World" << false;
+ QTest::newRow("diff-diff-length-long-long") << raw("\x78\x2aGood morning, good afternoon and goodnight")
+ << "Good morning, good afternoon and goodnight World" << false;
+ QTest::newRow("diff-diff-length-_long*1-long") << raw("\x7f\x78\x2aGood morning, good afternoon and goodnight\xff")
+ << "Good morning, good afternoon and goodnight World" << false;
+ QTest::newRow("diff-diff-length-_long*2-long") << raw("\x7f\x78\x1cGood morning, good afternoon\x6e and goodnight\xff")
+ << "Good morning, good afternoon and goodnight World" << false;
+
+ // compare against non-strings
+ QTest::newRow("unsigned") << raw("\0") << "0" << false;
+ QTest::newRow("negative") << raw("\x20") << "-1" << false;
+ QTest::newRow("emptybytestring") << raw("\x40") << "" << false;
+ QTest::newRow("_emptybytestring") << raw("\x5f\xff") << "" << false;
+ QTest::newRow("shortbytestring") << raw("\x45Hello") << "Hello" << false;
+ QTest::newRow("longbytestring") << raw("\x58\x2aGood morning, good afternoon and goodnight")
+ << "Good morning, good afternoon and goodnight" << false;
+ QTest::newRow("emptyarray") << raw("\x80") << "" << false;
+ QTest::newRow("emptymap") << raw("\xa0") << "" << false;
+ QTest::newRow("array") << raw("\x81\x65Hello") << "Hello" << false;
+ QTest::newRow("map") << raw("\xa1\x65Hello\x65World") << "Hello World" << false;
+ QTest::newRow("false") << raw("\xf4") << "false" << false;
+ QTest::newRow("true") << raw("\xf5") << "true" << false;
+ QTest::newRow("null") << raw("\xf6") << "null" << false;
+}
+
+void compareOneString(const QByteArray &data, const QString &string, bool expected, int line)
+{
+ compareFailed = true;
+
+ CborParser parser;
+ CborValue value;
+ CborError err = cbor_parser_init(reinterpret_cast<const quint8 *>(data.constData()), data.length(), 0, &parser, &value);
+ QVERIFY2(!err, QByteArray::number(line) + ": Got error \"" + cbor_error_string(err) + "\"");
+
+ bool result;
+ QByteArray bastring = string.toUtf8();
+ err = cbor_value_text_string_equals(&value, bastring.constData(), &result);
+ QVERIFY2(!err, QByteArray::number(line) + ": Got error \"" + cbor_error_string(err) + "\"");
+ QCOMPARE(result, expected);
+
+ if (expected) {
+ size_t len;
+ cbor_value_skip_tag(&value);
+ if (cbor_value_is_length_known(&value)) {
+ QCOMPARE(cbor_value_get_string_length(&value, &len), CborNoError);
+ QCOMPARE(int(len), bastring.size());
+ }
+ QCOMPARE(cbor_value_calculate_string_length(&value, &len), CborNoError);
+ QCOMPARE(int(len), bastring.size());
+ }
+
+ compareFailed = false;
+}
+#define compareOneString(data, string, expected) compareOneString(data, string, expected, __LINE__)
+
+void tst_Parser::stringCompare()
+{
+ QFETCH(QByteArray, data);
+ QFETCH(QString, string);
+ QFETCH(bool, expected);
+
+ compareOneString(data, string, expected);
+ if (compareFailed) return;
+
+ // tag it
+ compareOneString("\xc1" + data, string, expected);
+ if (compareFailed) return;
+
+ compareOneString("\xc1\xc2" + data, string, expected);
+}
+
+void tst_Parser::mapFind_data()
+{
+ // Rules:
+ // we are searching for string "needle"
+ // if present, the value should be the string "haystack" (with tag 42)
+
+ QTest::addColumn<QByteArray>("data");
+ QTest::addColumn<bool>("expected");
+
+ QTest::newRow("emptymap") << raw("\xa0") << false;
+ QTest::newRow("_emptymap") << raw("\xbf\xff") << false;
+
+ // maps not containing our items
+ QTest::newRow("absent-unsigned-unsigned") << raw("\xa1\0\0") << false;
+ QTest::newRow("absent-taggedunsigned-unsigned") << raw("\xa1\xc0\0\0") << false;
+ QTest::newRow("absent-unsigned-taggedunsigned") << raw("\xa1\0\xc0\0") << false;
+ QTest::newRow("absent-taggedunsigned-taggedunsigned") << raw("\xa1\xc0\0\xc0\0") << false;
+ QTest::newRow("absent-string-unsigned") << raw("\xa1\x68haystack\0") << false;
+ QTest::newRow("absent-taggedstring-unsigned") << raw("\xa1\xc0\x68haystack\0") << false;
+ QTest::newRow("absent-string-taggedunsigned") << raw("\xa1\x68haystack\xc0\0") << false;
+ QTest::newRow("absent-taggedstring-taggedunsigned") << raw("\xa1\xc0\x68haystack\xc0\0") << false;
+ QTest::newRow("absent-string-string") << raw("\xa1\x68haystack\x66needle") << false;
+ QTest::newRow("absent-string-taggedstring") << raw("\xa1\x68haystack\xc0\x66needle") << false;
+ QTest::newRow("absent-taggedstring-string") << raw("\xa1\xc0\x68haystack\x66needle") << false;
+ QTest::newRow("absent-string-taggedstring") << raw("\xa1\xc0\x68haystack\xc0\x66needle") << false;
+
+ QTest::newRow("absent-string-emptyarray") << raw("\xa1\x68haystack\x80") << false;
+ QTest::newRow("absent-string-_emptyarray") << raw("\xa1\x68haystack\x9f\xff") << false;
+ QTest::newRow("absent-string-array1") << raw("\xa1\x68haystack\x81\0") << false;
+ QTest::newRow("absent-string-array2") << raw("\xa1\x68haystack\x85\0\1\2\3\4") << false;
+ QTest::newRow("absent-string-array3") << raw("\xa1\x68haystack\x85\x63one\x63two\x65three\x64""four\x64""five") << false;
+
+ QTest::newRow("absent-string-emptymap") << raw("\xa1\x68haystack\xa0") << false;
+ QTest::newRow("absent-string-_emptymap") << raw("\xa1\x68haystack\xbf\xff") << false;
+ QTest::newRow("absent-string-map") << raw("\xa1\x68haystack\xa1\x68haystack\x66needle") << false;
+ QTest::newRow("absent-string-map2") << raw("\xa1\x68haystack\xa1\x68haystack\x66needle\61z\62yx") << false;
+
+ // maps containing our items
+ QTest::newRow("alone") << raw("\xa1\x66needle\xd8\x2a\x68haystack") << true;
+ QTest::newRow("tagged") << raw("\xa1\xc1\x66needle\xd8\x2a\x68haystack") << true;
+ QTest::newRow("doubletagged") << raw("\xa1\xc1\xc2\x66needle\xd8\x2a\x68haystack") << true;
+ QTest::newRow("chunked") << raw("\xa1\x7f\x66needle\xff\xd8\x2a\x68haystack") << true;
+ QTest::newRow("chunked*2") << raw("\xa1\x7f\x60\x66needle\xff\xd8\x2a\x68haystack") << true;
+ QTest::newRow("chunked*2bis") << raw("\xa1\x7f\x66needle\x60\xff\xd8\x2a\x68haystack") << true;
+ QTest::newRow("chunked*3") << raw("\xa1\x7f\x62ne\x62""ed\x62le\xff\xd8\x2a\x68haystack") << true;
+ QTest::newRow("chunked*8") << raw("\xa1\x7f\x61n\x61""e\x60\x61""e\x61""d\x60\x62le\x60\xff\xd8\x2a\x68haystack") << true;
+
+ QTest::newRow("1before") << raw("\xa2\x68haystack\x66needle\x66needle\xd8\x2a\x68haystack") << true;
+ QTest::newRow("tagged-1before") << raw("\xa2\xc1\x68haystack\x66needle\xc1\x66needle\xd8\x2a\x68haystack") << true;
+ QTest::newRow("doubletagged-1before2") << raw("\xa2\xc1\xc2\x68haystack\x66needle\xc1\xc2\x66needle\xd8\x2a\x68haystack") << true;
+
+ QTest::newRow("arraybefore") << raw("\xa2\x61z\x80\x66needle\xd8\x2a\x68haystack") << true;
+ QTest::newRow("nestedarraybefore") << raw("\xa2\x61z\x81\x81\0\x66needle\xd8\x2a\x68haystack") << true;
+ QTest::newRow("arrayarraybefore") << raw("\xa2\x82\1\2\x80\x66needle\xd8\x2a\x68haystack") << true;
+
+ QTest::newRow("mapbefore") << raw("\xa2\x61z\xa0\x66needle\xd8\x2a\x68haystack") << true;
+ QTest::newRow("nestedmapbefore") << raw("\xa2\x61z\xa1\0\x81\0\x66needle\xd8\x2a\x68haystack") << true;
+ QTest::newRow("mapmapbefore") << raw("\xa2\xa1\1\2\xa0\x66needle\xd8\x2a\x68haystack") << true;
+}
+
+void tst_Parser::mapFind()
+{
+ QFETCH(QByteArray, data);
+ QFETCH(bool, expected);
+
+ CborParser parser;
+ CborValue value;
+ CborError err = cbor_parser_init(reinterpret_cast<const quint8 *>(data.constData()), data.length(), 0, &parser, &value);
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+
+ CborValue element;
+ err = cbor_value_map_find_value(&value, "needle", &element);
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+
+ if (expected) {
+ QCOMPARE(int(element.type), int(CborTagType));
+
+ CborTag tag;
+ err = cbor_value_get_tag(&element, &tag);
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+ QCOMPARE(int(tag), 42);
+
+ bool equals;
+ err = cbor_value_text_string_equals(&element, "haystack", &equals);
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+ QVERIFY(equals);
+ } else {
+ QCOMPARE(int(element.type), int(CborInvalidType));
+ }
+}
+
+void tst_Parser::checkedIntegers_data()
+{
+ QTest::addColumn<QByteArray>("data");
+ QTest::addColumn<QVariant>("result"); // QVariant so we can note numbers out of int64_t range
+
+ QTest::newRow("0") << raw("\x00") << QVariant(Q_INT64_C(0));
+ QTest::newRow("1") << raw("\x01") << QVariant(Q_INT64_C(1));
+ QTest::newRow("10") << raw("\x0a") << QVariant(Q_INT64_C(10));
+ QTest::newRow("23") << raw("\x17") << QVariant(Q_INT64_C(23));
+ QTest::newRow("24") << raw("\x18\x18") << QVariant(Q_INT64_C(24));
+ QTest::newRow("UINT8_MAX") << raw("\x18\xff") << QVariant(Q_INT64_C(255));
+ QTest::newRow("UINT8_MAX+1") << raw("\x19\x01\x00") << QVariant(Q_INT64_C(256));
+ QTest::newRow("UINT16_MAX") << raw("\x19\xff\xff") << QVariant(Q_INT64_C(65535));
+ QTest::newRow("UINT16_MAX+1") << raw("\x1a\0\1\x00\x00") << QVariant(Q_INT64_C(65536));
+ QTest::newRow("INT32_MAX") << raw("\x1a\x7f\xff\xff\xff") << QVariant(Q_INT64_C(2147483647));
+ QTest::newRow("INT32_MAX+1") << raw("\x1a\x80\x00\x00\x00") << QVariant(Q_INT64_C(2147483648));
+ QTest::newRow("UINT32_MAX") << raw("\x1a\xff\xff\xff\xff") << QVariant(Q_INT64_C(4294967295));
+ QTest::newRow("UINT32_MAX+1") << raw("\x1b\0\0\0\1\0\0\0\0") << QVariant(Q_INT64_C(4294967296));
+ QTest::newRow("UINT64_MAX") << raw("\x1b" "\xff\xff\xff\xff" "\xff\xff\xff\xff")
+ << QVariant(); // out of range
+
+ // negative integers
+ QTest::newRow("-1") << raw("\x20") << QVariant(Q_INT64_C(-1));
+ QTest::newRow("-2") << raw("\x21") << QVariant(Q_INT64_C(-2));
+ QTest::newRow("-24") << raw("\x37") << QVariant(Q_INT64_C(-24));
+ QTest::newRow("-25") << raw("\x38\x18") << QVariant(Q_INT64_C(-25));
+ QTest::newRow("-UINT8_MAX") << raw("\x38\xff") << QVariant(Q_INT64_C(-256));
+ QTest::newRow("-UINT8_MAX-1") << raw("\x39\x01\x00") << QVariant(Q_INT64_C(-257));
+ QTest::newRow("-UINT16_MAX") << raw("\x39\xff\xff") << QVariant(Q_INT64_C(-65536));
+ QTest::newRow("-UINT16_MAX-1") << raw("\x3a\0\1\x00\x00") << QVariant(Q_INT64_C(-65537));
+ QTest::newRow("INT32_MIN") << raw("\x3a\x7f\xff\xff\xff") << QVariant(Q_INT64_C(-2147483648));
+ QTest::newRow("INT32_MIN-1") << raw("\x3a\x80\x00\x00\x00") << QVariant(Q_INT64_C(-2147483649));
+ QTest::newRow("-UINT32_MAX") << raw("\x3a\xff\xff\xff\xff") << QVariant(Q_INT64_C(-4294967296));
+ QTest::newRow("-UINT32_MAX-1") << raw("\x3b\0\0\0\1\0\0\0\0") << QVariant(Q_INT64_C(-4294967297));
+ QTest::newRow("INT64_MIN+1") << raw("\x3b\x7f\xff\xff\xff""\xff\xff\xff\xfe")
+ << QVariant(std::numeric_limits<qint64>::min() + 1);
+ QTest::newRow("INT64_MIN") << raw("\x3b\x7f\xff\xff\xff""\xff\xff\xff\xff")
+ << QVariant(std::numeric_limits<qint64>::min());
+ QTest::newRow("INT64_MIN-1") << raw("\x3b\x80\0\0\0""\0\0\0\0") << QVariant(); // out of range
+ QTest::newRow("-UINT64_MAX") << raw("\x3b" "\xff\xff\xff\xff" "\xff\xff\xff\xfe")
+ << QVariant(); // out of range
+ QTest::newRow("-UINT64_MAX+1") << raw("\x3b" "\xff\xff\xff\xff" "\xff\xff\xff\xff")
+ << QVariant(); // out of range
+}
+
+void tst_Parser::checkedIntegers()
+{
+ QFETCH(QByteArray, data);
+ QFETCH(QVariant, result);
+ int64_t expected = result.toLongLong();
+
+ CborParser parser;
+ CborValue value;
+ CborError err = cbor_parser_init(reinterpret_cast<const quint8 *>(data.constData()), data.length(), 0, &parser, &value);
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+
+ int64_t v;
+ err = cbor_value_get_int64_checked(&value, &v);
+ if (result.isNull()) {
+ QCOMPARE(err, CborErrorDataTooLarge);
+ } else {
+ QCOMPARE(v, expected);
+ }
+
+ int v2;
+ err = cbor_value_get_int_checked(&value, &v2);
+ if (result.isNull() || expected < std::numeric_limits<int>::min() || expected > std::numeric_limits<int>::max()) {
+ QCOMPARE(err, CborErrorDataTooLarge);
+ } else {
+ QCOMPARE(int64_t(v2), expected);
+ }
+}
+
+void tst_Parser::validation_data()
+{
+ addValidationColumns();
+ addValidationData();
+}
+
+void tst_Parser::validation()
+{
+ QFETCH(QByteArray, data);
+ QFETCH(int, flags);
+ QFETCH(CborError, expectedError);
+
+ QString decoded;
+ CborParser parser;
+ CborValue first;
+ CborError err = cbor_parser_init(reinterpret_cast<const quint8 *>(data.constData()), data.length(), flags, &parser, &first);
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+
+ CborError err2 = cbor_value_validate_basic(&first);
+ CborError err3 = cbor_value_validate(&first, CborValidateBasic);
+ err = parseOne(&first, &decoded);
+ QCOMPARE(err, expectedError);
+ if (!QByteArray(QTest::currentDataTag()).contains("utf8")) {
+ QCOMPARE(err2, expectedError);
+ QCOMPARE(err3, expectedError);
+ }
+}
+
+void tst_Parser::strictValidation_data()
+{
+ addValidationColumns();
+
+ // Canonical validation - fixed types
+ QTest::newRow("unsigned-0") << raw("\x00") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("unsigned-24") << raw("\x18\x18") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("unsigned-256") << raw("\x19\1\0") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("unsigned-65536") << raw("\x1a\0\1\0\0") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("unsigned-4294967296") << raw("\x1b\0\0\0\1\0\0\0\0") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("overlong-unsigned-0*1") << raw("\x18\x00") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-unsigned-0*2") << raw("\x19\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-unsigned-0*4") << raw("\x1a\0\0\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-unsigned-0*8") << raw("\x1b\0\0\0\0\0\0\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-unsigned-24*2") << raw("\x19\0\x18") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-unsigned-24*4") << raw("\x1a\0\0\0\x18") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-unsigned-24*8") << raw("\x1b\0\0\0\0\0\0\0\x18") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-unsigned-256*4") << raw("\x1a\0\0\1\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-unsigned-256*8") << raw("\x1b\0\0\0\0\0\0\1\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-unsigned-65536*8") << raw("\x1b\0\0\0\0\0\1\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("negative-1") << raw("\x20") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("negative-25") << raw("\x38\x38") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("negative-257") << raw("\x39\1\0") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("negative-65537") << raw("\x3a\0\1\0\0") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("negative-4294967297") << raw("\x3b\0\0\0\1\0\0\0\0") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("overlong-negative-1*1") << raw("\x38\x00") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-negative-1*2") << raw("\x39\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-negative-1*4") << raw("\x3a\0\0\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-negative-1*8") << raw("\x3b\0\0\0\0\0\0\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-negative-25*2") << raw("\x39\0\x18") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-negative-25*4") << raw("\x3a\0\0\0\x18") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-negative-25*8") << raw("\x3b\0\0\0\0\0\0\0\x18") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-negative-257*4") << raw("\x3a\0\0\1\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-negative-257*8") << raw("\x3b\0\0\0\0\0\0\1\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-negative-65537*8") << raw("\x3b\0\0\0\0\0\1\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("simple-0") << raw("\xe0") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("false") << raw("\xf4") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("true") << raw("\xf5") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("null") << raw("\xf6") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("undefined") << raw("\xf7") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("simple-32") << raw("\xf8\x20") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("fp-nan") << raw("\xf9\x7e\00") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("fp--inf") << raw("\xf9\xfc\00") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("fp-+inf") << raw("\xf9\x7c\00") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("overlong-fp-nan_f") << raw("\xfa\x7f\xc0\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-fp--inf_f") << raw("\xfa\xff\x80\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-fp-+inf_f") << raw("\xfa\x7f\x80\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-fp-nan") << raw("\xfb\x7f\xf8\0\0\0\0\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-fp--inf") << raw("\xfb\xff\xf0\0\0\0\0\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-fp-+inf") << raw("\xfb\x7f\xf0\0\0\0\0\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+
+ // canonical - lengths
+ QByteArray data24(24, 0x20); // also decodes as -1
+ QByteArray data256(256, 0x40); // also decodes as h''
+ QByteArray data65536(65536, 0x60);// also decodes as ""
+ QTest::newRow("bytearray-0") << raw("\x40") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("bytearray-24") << (raw("\x58\x18") + data24) << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("bytearray-256") << (raw("\x59\1\0") + data256) << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("bytearray-65536") << (raw("\x5a\0\1\0\0") + data65536) << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("_bytearray-0") << raw("\x5f\xff") << int(CborValidateCanonicalFormat) << CborErrorUnknownLength;
+ QTest::newRow("overlong-bytearray-0*1") << raw("\x58\x00") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-bytearray-0*2") << raw("\x59\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-bytearray-0*4") << raw("\x5a\0\0\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-bytearray-0*8") << raw("\x5b\0\0\0\0\0\0\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-bytearray-24*2") << (raw("\x59\0\x18") + data24) << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-bytearray-24*4") << (raw("\x5a\0\0\0\x18") + data24) << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-bytearray-24*8") << (raw("\x5b\0\0\0\0\0\0\0\x18") + data24) << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-bytearray-256*4") << (raw("\x5a\0\0\1\0") + data256) << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-bytearray-256*8") << (raw("\x5b\0\0\0\0\0\0\1\0") + data256) << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-bytearray-65536*8") << (raw("\x5b\0\0\0\0\0\1\0\0") + data65536) << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("string-0") << raw("\x60") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("string-24") << (raw("\x78\x18") + data24) << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("string-256") << (raw("\x79\1\0") + data256) << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("string-65536") << (raw("\x7a\0\1\0\0") + data65536) << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("_string-0") << raw("\x7f\xff") << int(CborValidateCanonicalFormat) << CborErrorUnknownLength;
+ QTest::newRow("overlong-string-0*1") << raw("\x78\x00") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-string-0*2") << raw("\x79\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-string-0*4") << raw("\x7a\0\0\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-string-0*8") << raw("\x7b\0\0\0\0\0\0\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-string-24*2") << (raw("\x79\0\x18") + data24) << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-string-24*4") << (raw("\x7a\0\0\0\x18") + data24) << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-string-24*8") << (raw("\x7b\0\0\0\0\0\0\0\x18") + data24) << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-string-256*4") << (raw("\x7a\0\0\1\0") + data256) << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-string-256*8") << (raw("\x7b\0\0\0\0\0\0\1\0") + data256) << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-string-65536*8") << (raw("\x7b\0\0\0\0\0\1\0\0") + data65536) << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("array-0") << raw("\x80") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("array-24") << (raw("\x98\x18") + data24) << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("array-256") << (raw("\x99\1\0") + data256) << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("array-65536") << (raw("\x9a\0\1\0\0") + data65536) << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("_array-0") << raw("\x9f\xff") << int(CborValidateCanonicalFormat) << CborErrorUnknownLength;
+ QTest::newRow("overlong-array-0*1") << raw("\x98\x00") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-array-0*2") << raw("\x99\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-array-0*4") << raw("\x9a\0\0\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-array-0*8") << raw("\x9b\0\0\0\0\0\0\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-array-24*2") << (raw("\x99\0\x18") + data24) << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-array-24*4") << (raw("\x9a\0\0\0\x18") + data24) << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-array-24*8") << (raw("\x9b\0\0\0\0\0\0\0\x18") + data24) << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-array-256*4") << (raw("\x9a\0\0\1\0") + data256) << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-array-256*8") << (raw("\x9b\0\0\0\0\0\0\1\0") + data256) << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-array-65536*8") << (raw("\x9b\0\0\0\0\0\1\0\0") + data65536) << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+
+ // we need unique, sorted, string keys for map
+ // we'll make all key-value pairs a total of 4 bytes
+ char mapentry[] = { 0x62, 0, 0, 0x20 };
+ QByteArray mapdata24(24 * sizeof(mapentry), Qt::Uninitialized);
+ QByteArray mapdata256(256 * sizeof(mapentry), Qt::Uninitialized);
+ char *mapdata24ptr = mapdata24.data();
+ char *mapdata256ptr = mapdata256.data();
+ for (int i = 0; i < 256; ++i) {
+ mapentry[1] = 'A' + (i >> 4);
+ mapentry[2] = 'a' + (i & 0xf);
+ memcpy(mapdata256ptr + i * sizeof(mapentry), mapentry, sizeof(mapentry));
+ if (i < 24)
+ memcpy(mapdata24ptr + i * sizeof(mapentry), mapentry, sizeof(mapentry));
+ }
+ QTest::newRow("map-0") << raw("\xa0") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("map-24") << (raw("\xb8\x18") + mapdata24) << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("map-256") << (raw("\xb9\1\0") + mapdata256) << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("_map-0") << raw("\xbf\xff") << int(CborValidateCanonicalFormat) << CborErrorUnknownLength;
+ QTest::newRow("overlong-map-0*1") << raw("\xb8\x00") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-map-0*2") << raw("\xb9\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-map-0*4") << raw("\xba\0\0\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-map-0*8") << raw("\xbb\0\0\0\0\0\0\0\0") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-map-24*2") << (raw("\xb9\0\x18") + mapdata24) << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-map-24*4") << (raw("\xba\0\0\0\x18") + mapdata24) << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-map-24*8") << (raw("\xbb\0\0\0\0\0\0\0\x18") + mapdata24) << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-map-256*4") << (raw("\xba\0\0\1\0") + mapdata256) << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-map-256*8") << (raw("\xbb\0\0\0\0\0\0\1\0") + mapdata256) << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("unsorted-length-map-UU") << raw("\xa2\1\1\0\0") << int(CborValidateCanonicalFormat) << CborErrorMapNotSorted;
+ QTest::newRow("unsorted-length-map-UUU") << raw("\xa3\1\1\1\1\0\0") << int(CborValidateCanonicalFormat) << CborErrorMapNotSorted;
+ QTest::newRow("unsorted-length-map-SS") << raw("\xa2\x61z\1\x60\0") << int(CborValidateCanonicalFormat) << CborErrorMapNotSorted;
+ QTest::newRow("unsorted-length-map-SSS") << raw("\xa3\x61z\1\x61z\2\x60\0") << int(CborValidateCanonicalFormat) << CborErrorMapNotSorted;
+ QTest::newRow("unsorted-length-map-SB") << raw("\xa2\x61z\1\x40\0") << int(CborValidateCanonicalFormat) << CborErrorMapNotSorted;
+ QTest::newRow("unsorted-length-map-AS") << raw("\xa2\x83\0\x20\x45Hello\1\x60\0") << int(CborValidateCanonicalFormat) << CborErrorMapNotSorted;
+ QTest::newRow("unsorted-content-map-SS") << raw("\xa2\x61z\1\x61y\0") << int(CborValidateCanonicalFormat) << CborErrorMapNotSorted;
+ QTest::newRow("unsorted-content-map-AS") << raw("\xa2\x81\x21\1\x61\x21\0") << int(CborValidateCanonicalFormat) << CborErrorMapNotSorted;
+
+ QTest::newRow("tag-0") << raw("\xc0\x60") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("tag-24") << raw("\xd8\x18\x40") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("tag-65536") << raw("\xda\0\1\0\0\x60") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("tag-4294967296") << raw("\xdb\0\0\0\1\0\0\0\0\x60") << int(CborValidateCanonicalFormat) << CborNoError;
+ QTest::newRow("overlong-tag-0*1") << raw("\xd8\x00\x60") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-tag-0*2") << raw("\xd9\0\0\x60") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-tag-0*4") << raw("\xda\0\0\0\0\x60") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-tag-0*8") << raw("\xdb\0\0\0\0\0\0\0\0\x60") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-tag-24*2") << raw("\xd9\0\x18\x60") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-tag-24*4") << raw("\xda\0\0\0\x18\x60") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-tag-24*8") << raw("\xdb\0\0\0\0\0\0\0\x18\x60") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-tag-256*4") << raw("\xda\0\0\1\0\x60") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-tag-256*8") << raw("\xdb\0\0\0\0\0\0\1\0\x60") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-tag-65536*8") << raw("\xdb\0\0\0\0\0\1\0\0\x60") << int(CborValidateCanonicalFormat) << CborErrorOverlongEncoding;
+
+ // non-canonical: string length in chunked transfer
+ QTest::newRow("overlong-_bytearray-0*1") << raw("\x5f\x58\x00\xff") << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_bytearray-0*2") << raw("\x5f\x59\0\0\xff") << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_bytearray-0*4") << raw("\x5f\x5a\0\0\0\0\xff") << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_bytearray-0*8") << raw("\x5f\x5b\0\0\0\0\0\0\0\0\xff") << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_bytearray-24*2") << (raw("\x5f\x59\0\x18") + data24 + '\xff') << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_bytearray-24*4") << (raw("\x5f\x5a\0\0\0\x18") + data24 + '\xff') << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_bytearray-24*8") << (raw("\x5f\x5b\0\0\0\0\0\0\0\x18") + data24 + '\xff') << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_bytearray-256*4") << (raw("\x5f\x5a\0\0\1\0") + data256 + '\xff') << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_bytearray-256*8") << (raw("\x5f\x5b\0\0\0\0\0\0\1\0") + data256 + '\xff') << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_bytearray-65536*8") << (raw("\x5f\x5b\0\0\0\0\0\1\0\0") + data65536 + '\xff') << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_bytearrayx2-0*1") << raw("\x5f\x40\x58\x00\xff") << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_bytearrayx2-0*2") << raw("\x5f\x40\x59\0\0\xff") << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_bytearrayx2-0*4") << raw("\x5f\x40\x5a\0\0\0\0\xff") << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_bytearrayx2-0*8") << raw("\x5f\x40\x5b\0\0\0\0\0\0\0\0\xff") << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_string-0*1") << raw("\x7f\x78\x00\xff") << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_string-0*2") << raw("\x7f\x79\0\0\xff") << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_string-0*4") << raw("\x7f\x7a\0\0\0\0\xff") << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_string-0*8") << raw("\x7f\x7b\0\0\0\0\0\0\0\0\xff") << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_string-24*2") << (raw("\x7f\x79\0\x18") + data24 + '\xff') << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_string-24*4") << (raw("\x7f\x7a\0\0\0\x18") + data24 + '\xff') << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_string-24*8") << (raw("\x7f\x7b\0\0\0\0\0\0\0\x18") + data24 + '\xff') << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_string-256*4") << (raw("\x7f\x7a\0\0\1\0") + data256 + '\xff') << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_string-256*8") << (raw("\x7f\x7b\0\0\0\0\0\0\1\0") + data256 + '\xff') << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_string-65536*8") << (raw("\x7f\x7b\0\0\0\0\0\1\0\0") + data65536 + '\xff') << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_stringx2-0*1") << raw("\x7f\x60\x78\x00\xff") << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_stringx2-0*2") << raw("\x7f\x60\x79\0\0\xff") << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_stringx2-0*4") << raw("\x7f\x60\x7a\0\0\0\0\xff") << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+ QTest::newRow("overlong-_stringx2-0*8") << raw("\x7f\x60\x7b\0\0\0\0\0\0\0\0\xff") << int(CborValidateShortestNumbers) << CborErrorOverlongEncoding;
+
+ // strict mode
+ QTest::newRow("invalid-utf8-1char") << raw("\x61\x80") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-2chars-1") << raw("\x62\xc2\xc0") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-2chars-2") << raw("\x62\xc3\xdf") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-2chars-3") << raw("\x62\xc7\xf0") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-3chars-1") << raw("\x63\xe0\xa0\xc0") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-3chars-2") << raw("\x63\xe0\xc0\xa0") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-4chars-1") << raw("\x64\xf0\x90\x80\xc0") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-4chars-2") << raw("\x64\xf0\x90\xc0\x80") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-4chars-3") << raw("\x64\xf0\xc0\x80\x80") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-hi-surrogate") << raw("\x63\xed\xa0\x80") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-lo-surrogate") << raw("\x63\xed\xb0\x80") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-surrogate-pair") << raw("\x66\xed\xa0\x80\xed\xb0\x80") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-non-unicode-1") << raw("\x64\xf4\x90\x80\x80") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-non-unicode-2") << raw("\x65\xf8\x88\x80\x80\x80") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-non-unicode-3") << raw("\x66\xfc\x84\x80\x80\x80\x80") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-non-unicode-4") << raw("\x66\xfd\xbf\xbf\xbf\xbf\xbf") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-fe") << raw("\x61\xfe") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-ff") << raw("\x61\xff") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-overlong-1-2") << raw("\x62\xc1\x81") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-overlong-1-3") << raw("\x63\xe0\x81\x81") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-overlong-1-4") << raw("\x64\xf0\x80\x81\x81") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-overlong-1-5") << raw("\x65\xf8\x80\x80\x81\x81") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-overlong-1-6") << raw("\x66\xfc\x80\x80\x80\x81\x81") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-overlong-2-3") << raw("\x63\xe0\x82\x80") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-overlong-2-4") << raw("\x64\xf0\x80\x82\x80") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-overlong-2-5") << raw("\x65\xf8\x80\x80\x82\x80") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-overlong-2-6") << raw("\x66\xfc\x80\x80\x80\x82\x80") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-overlong-3-4") << raw("\x64\xf0\x80\xa0\x80") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-overlong-3-5") << raw("\x65\xf8\x80\x80\xa0\x80") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-overlong-3-6") << raw("\x66\xfc\x80\x80\x80\xa0\x80") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-overlong-4-5") << raw("\x65\xf8\x80\x84\x80\x80") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+ QTest::newRow("invalid-utf8-overlong-4-6") << raw("\x66\xfc\x80\x80\x84\x80\x80") << int(CborValidateStrictMode) << CborErrorInvalidUtf8TextString;
+
+ QTest::newRow("nonunique-content-map-UU") << raw("\xa2\0\1\0\2") << int(CborValidateStrictMode) << CborErrorMapKeysNotUnique;
+ QTest::newRow("nonunique-content-map-SS") << raw("\xa2\x61z\1\x61z\2") << int(CborValidateStrictMode) << CborErrorMapKeysNotUnique;
+ QTest::newRow("nonunique-content-map-AA") << raw("\xa2\x81\x65Hello\1\x81\x65Hello\2") << int(CborValidateStrictMode) << CborErrorMapKeysNotUnique;
+
+ QTest::newRow("tag-0-unsigned") << raw("\xc0\x00") << int(CborValidateStrictMode) << CborErrorInappropriateTagForType;
+ QTest::newRow("tag-0-bytearray") << raw("\xc0\x40") << int(CborValidateStrictMode) << CborErrorInappropriateTagForType;
+ QTest::newRow("tag-0-string") << raw("\xc0\x60") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-0-tag-0-string") << raw("\xc0\xc0\x60") << int(CborValidateStrictMode) << CborErrorInappropriateTagForType;
+ QTest::newRow("tag-1-unsigned") << raw("\xc1\x00") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-1-negative") << raw("\xc1\x20") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-1-bytearray") << raw("\xc1\x40") << int(CborValidateStrictMode) << CborErrorInappropriateTagForType;
+ QTest::newRow("tag-2-bytearray") << raw("\xc2\x40") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-2-string") << raw("\xc2\x60") << int(CborValidateStrictMode) << CborErrorInappropriateTagForType;
+ QTest::newRow("tag-3-bytearray") << raw("\xc3\x40") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-3-string") << raw("\xc3\x60") << int(CborValidateStrictMode) << CborErrorInappropriateTagForType;
+ QTest::newRow("tag-4-string") << raw("\xc4\x60") << int(CborValidateStrictMode) << CborErrorInappropriateTagForType;
+ QTest::newRow("tag-4-array") << raw("\xc4\x82\0\1") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-5-string") << raw("\xc5\x60") << int(CborValidateStrictMode) << CborErrorInappropriateTagForType;
+ QTest::newRow("tag-5-array") << raw("\xc5\x82\0\1") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-21-bytearray") << raw("\xd5\x40") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-21-string") << raw("\xd5\x60") << int(CborValidateStrictMode) << CborErrorInappropriateTagForType;
+ QTest::newRow("tag-21-array") << raw("\xd5\x80") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-21-map") << raw("\xd5\xa0") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-22-bytearray") << raw("\xd6\x40") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-22-string") << raw("\xd6\x60") << int(CborValidateStrictMode) << CborErrorInappropriateTagForType;
+ QTest::newRow("tag-22-array") << raw("\xd6\x80") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-22-map") << raw("\xd6\xa0") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-23-bytearray") << raw("\xd7\x40") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-23-string") << raw("\xd7\x60") << int(CborValidateStrictMode) << CborErrorInappropriateTagForType;
+ QTest::newRow("tag-23-array") << raw("\xd7\x80") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-23-map") << raw("\xd7\xa0") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-24-bytearray") << raw("\xd8\x18\x40") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-24-string") << raw("\xd8\x18\x60") << int(CborValidateStrictMode) << CborErrorInappropriateTagForType;
+ QTest::newRow("tag-32-bytearray") << raw("\xd8\x20\x40") << int(CborValidateStrictMode) << CborErrorInappropriateTagForType;
+ QTest::newRow("tag-32-string") << raw("\xd8\x20\x60") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-33-bytearray") << raw("\xd8\x21\x40") << int(CborValidateStrictMode) << CborErrorInappropriateTagForType;
+ QTest::newRow("tag-33-string") << raw("\xd8\x21\x60") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-34-bytearray") << raw("\xd8\x22\x40") << int(CborValidateStrictMode) << CborErrorInappropriateTagForType;
+ QTest::newRow("tag-34-string") << raw("\xd8\x22\x60") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-35-bytearray") << raw("\xd8\x23\x40") << int(CborValidateStrictMode) << CborErrorInappropriateTagForType;
+ QTest::newRow("tag-35-string") << raw("\xd8\x23\x60") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-36-bytearray") << raw("\xd8\x24\x40") << int(CborValidateStrictMode) << CborErrorInappropriateTagForType;
+ QTest::newRow("tag-36-string") << raw("\xd8\x24\x60") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-55799-unsigned") << raw("\xd9\xd9\xf7\x00") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-55799-negative") << raw("\xd9\xd9\xf7\x20") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-55799-bytearray") << raw("\xd9\xd9\xf7\x40") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-55799-string") << raw("\xd9\xd9\xf7\x60") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-55799-array") << raw("\xd9\xd9\xf7\x80") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-55799-map") << raw("\xd9\xd9\xf7\xa0") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-55799-tag-0-unsigned") << raw("\xd9\xd9\xf7\xc0\x00") << int(CborValidateStrictMode) << CborErrorInappropriateTagForType;
+ QTest::newRow("tag-55799-tag-0-string") << raw("\xd9\xd9\xf7\xc0\x60") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-55799-simple0") << raw("\xd9\xd9\xf7\xe0") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-55799-false") << raw("\xd9\xd9\xf7\xf4") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-55799-true") << raw("\xd9\xd9\xf7\xf5") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-55799-null") << raw("\xd9\xd9\xf7\xf6") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-55799-undefined") << raw("\xd9\xd9\xf7\xf7") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-55799-simple32") << raw("\xd9\xd9\xf7\xf8\x20") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-55799-half") << raw("\xd9\xd9\xf7\xf9\0\0") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-55799-float") << raw("\xd9\xd9\xf7\xfa\0\0\0\0") << int(CborValidateStrictMode) << CborNoError;
+ QTest::newRow("tag-55799-double") << raw("\xd9\xd9\xf7\xfb\0\0\0\0\0\0\0\0") << int(CborValidateStrictMode) << CborNoError;
+
+ // excluded non-finite
+ QTest::newRow("excluded-fp-nan") << raw("\xfb\x7f\xf8\0\0\0\0\0\0") << int(CborValidateFiniteFloatingPoint) << CborErrorExcludedValue;
+ QTest::newRow("excluded-fp-nan_f") << raw("\xfa\x7f\xc0\0\0") << int(CborValidateFiniteFloatingPoint) << CborErrorExcludedValue;
+ QTest::newRow("excluded-fp--inf_f") << raw("\xfa\xff\x80\0\0") << int(CborValidateFiniteFloatingPoint) << CborErrorExcludedValue;
+ QTest::newRow("excluded-fp--inf") << raw("\xfb\xff\xf0\0\0\0\0\0\0") << int(CborValidateFiniteFloatingPoint) << CborErrorExcludedValue;
+ QTest::newRow("excluded-fp-+inf_f") << raw("\xfa\x7f\x80\0\0") << int(CborValidateFiniteFloatingPoint) << CborErrorExcludedValue;
+ QTest::newRow("excluded-fp-+inf") << raw("\xfb\x7f\xf0\0\0\0\0\0\0") << int(CborValidateFiniteFloatingPoint) << CborErrorExcludedValue;
+
+ // excluded undefined
+ QTest::newRow("no-undefined") << raw("\xf7") << int(CborValidateNoUndefined) << CborErrorExcludedType;
+
+ // exclude non-finite
+ QTest::newRow("excluded-fp-nan_f16") << raw("\xf9\x7e\00") << int(CborValidateFiniteFloatingPoint) << CborErrorExcludedValue;
+ QTest::newRow("excluded-fp--inf_f16") << raw("\xf9\xfc\00") << int(CborValidateFiniteFloatingPoint) << CborErrorExcludedValue;
+ QTest::newRow("excluded-fp-+inf_f16") << raw("\xf9\x7c\00") << int(CborValidateFiniteFloatingPoint) << CborErrorExcludedValue;
+ QTest::newRow("excluded-fp-nan_f") << raw("\xfa\x7f\xc0\0\0") << int(CborValidateFiniteFloatingPoint) << CborErrorExcludedValue;
+ QTest::newRow("excluded-fp--inf_f") << raw("\xfa\xff\x80\0\0") << int(CborValidateFiniteFloatingPoint) << CborErrorExcludedValue;
+ QTest::newRow("excluded-fp-+inf_f") << raw("\xfa\x7f\x80\0\0") << int(CborValidateFiniteFloatingPoint) << CborErrorExcludedValue;
+ QTest::newRow("excluded-fp-nan") << raw("\xfb\x7f\xf8\0\0\0\0\0\0") << int(CborValidateFiniteFloatingPoint) << CborErrorExcludedValue;
+ QTest::newRow("excluded-fp--inf") << raw("\xfb\xff\xf0\0\0\0\0\0\0") << int(CborValidateFiniteFloatingPoint) << CborErrorExcludedValue;
+ QTest::newRow("excluded-fp-+inf") << raw("\xfb\x7f\xf0\0\0\0\0\0\0") << int(CborValidateFiniteFloatingPoint) << CborErrorExcludedValue;
+
+ // exclude non-string keys in maps
+ QTest::newRow("excluded-map-unsigned") << raw("\xa1\x00\1") << int(CborValidateMapKeysAreString) << CborErrorMapKeyNotString;
+ QTest::newRow("excluded-map-negative") << raw("\xa1\x20\1") << int(CborValidateMapKeysAreString) << CborErrorMapKeyNotString;
+ QTest::newRow("excluded-map-bytearray") << raw("\xa1\x40\1") << int(CborValidateMapKeysAreString) << CborErrorMapKeyNotString;
+ QTest::newRow("map-string") << raw("\xa1\x60\1") << int(CborValidateMapKeysAreString) << CborNoError;
+ QTest::newRow("map-tag-0-string") << raw("\xa1\xc0\x60\1") << int(CborValidateMapKeysAreString) << CborNoError;
+ QTest::newRow("excluded-map-array") << raw("\xa1\x80\1") << int(CborValidateMapKeysAreString) << CborErrorMapKeyNotString;
+ QTest::newRow("excluded-map-map") << raw("\xa1\xa0\1") << int(CborValidateMapKeysAreString) << CborErrorMapKeyNotString;
+ QTest::newRow("excluded-map-simple-0") << raw("\xa1\xe0\1") << int(CborValidateMapKeysAreString) << CborErrorMapKeyNotString;
+ QTest::newRow("excluded-map-false") << raw("\xa1\xf4\1") << int(CborValidateMapKeysAreString) << CborErrorMapKeyNotString;
+ QTest::newRow("excluded-map-true") << raw("\xa1\xf5\1") << int(CborValidateMapKeysAreString) << CborErrorMapKeyNotString;
+ QTest::newRow("excluded-map-null") << raw("\xa1\xf6\1") << int(CborValidateMapKeysAreString) << CborErrorMapKeyNotString;
+ QTest::newRow("excluded-map-undefined") << raw("\xa1\xf7\1") << int(CborValidateMapKeysAreString) << CborErrorMapKeyNotString;
+ QTest::newRow("excluded-map-half") << raw("\xa1\xf9\0\0\1") << int(CborValidateMapKeysAreString) << CborErrorMapKeyNotString;
+ QTest::newRow("excluded-map-float") << raw("\xa1\xfa\0\0\0\0\1") << int(CborValidateMapKeysAreString) << CborErrorMapKeyNotString;
+ QTest::newRow("excluded-map-double") << raw("\xa1\xfb\0\0\0\0\0\0\0\0\1") << int(CborValidateMapKeysAreString) << CborErrorMapKeyNotString;
+
+ // unknown simple types
+ QTest::newRow("unknown-simple-type-0") << raw("\xe0") << int(CborValidateNoUnknownSimpleTypes) << CborErrorUnknownSimpleType;
+ QTest::newRow("unknown-simple-type-32") << raw("\xf8\x20") << int(CborValidateNoUnknownSimpleTypes) << CborErrorUnknownSimpleType;
+ QTest::newRow("allowed-simple-type-32") << raw("\xf8\x20") << int(CborValidateNoUnknownSimpleTypesSA) << CborNoError;
+
+ // unknown tags
+ QTest::newRow("unknown-tag-6") << raw("\xc6\x60") << int(CborValidateNoUnknownTags) << CborErrorUnknownTag;
+ QTest::newRow("unknown-tag-31") << raw("\xd8\x1f\x60") << int(CborValidateNoUnknownTags) << CborErrorUnknownTag;
+ QTest::newRow("unknown-tag-256") << raw("\xd9\1\0\x60") << int(CborValidateNoUnknownTags) << CborErrorUnknownTag;
+ QTest::newRow("unknown-tag-65536") << raw("\xda\0\1\0\0\x60") << int(CborValidateNoUnknownTags) << CborErrorUnknownTag;
+ QTest::newRow("unknown-tag-4294967296") << raw("\xdb\0\0\0\1\0\0\0\0\x60") << int(CborValidateNoUnknownTags) << CborErrorUnknownTag;
+ QTest::newRow("allowed-tag-31") << raw("\xd8\x1f\x60") << int(CborValidateNoUnknownTagsSA) << CborNoError;
+ QTest::newRow("allowed-tag-256") << raw("\xd9\1\0\x60") << int(CborValidateNoUnknownTagsSR) << CborNoError;
+
+ // excluded tags
+ QTest::newRow("excluded-tag-0") << raw("\xc0\x60") << int(CborValidateNoTags) << CborErrorExcludedType;
+ QTest::newRow("excluded-tag-24") << raw("\xd8\x18\x40") << int(CborValidateNoTags) << CborErrorExcludedType;
+ QTest::newRow("excluded-tag-55799") << raw("\xd9\xd9\xf7\x60") << int(CborValidateNoTags) << CborErrorExcludedType;
+
+ // complete data
+ QTest::newRow("garbage-data-0") << raw("\0\1") << int(CborValidateCompleteData) << CborErrorGarbageAtEnd;
+ QTest::newRow("garbage-data-1") << raw("\x20\1") << int(CborValidateCompleteData) << CborErrorGarbageAtEnd;
+ QTest::newRow("garbage-data-2") << raw("\x40\1") << int(CborValidateCompleteData) << CborErrorGarbageAtEnd;
+ QTest::newRow("garbage-data-3") << raw("\x60\1") << int(CborValidateCompleteData) << CborErrorGarbageAtEnd;
+ QTest::newRow("garbage-data-4") << raw("\x80\1") << int(CborValidateCompleteData) << CborErrorGarbageAtEnd;
+ QTest::newRow("garbage-data-5") << raw("\xa0\1") << int(CborValidateCompleteData) << CborErrorGarbageAtEnd;
+ QTest::newRow("garbage-data-6") << raw("\xc0\x60\1") << int(CborValidateCompleteData) << CborErrorGarbageAtEnd;
+ QTest::newRow("garbage-data-7") << raw("\xf4\1") << int(CborValidateCompleteData) << CborErrorGarbageAtEnd;
+ QTest::newRow("garbage-data-f16") << raw("\xf9\0\0\1") << int(CborValidateCompleteData) << CborErrorGarbageAtEnd;
+ QTest::newRow("garbage-data-f32") << raw("\xfa\0\0\0\0\1") << int(CborValidateCompleteData) << CborErrorGarbageAtEnd;
+ QTest::newRow("garbage-data-f64") << raw("\xfb\0\0\0\0\0\0\0\0\1") << int(CborValidateCompleteData) << CborErrorGarbageAtEnd;
+}
+
+void tst_Parser::strictValidation()
+{
+ QFETCH(QByteArray, data);
+ QFETCH(int, flags);
+ QFETCH(CborError, expectedError);
+
+ QString decoded;
+ CborParser parser;
+ CborValue first;
+ CborError err = cbor_parser_init(reinterpret_cast<const quint8 *>(data.constData()), data.length(), 0, &parser, &first);
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+
+ err = cbor_value_validate(&first, flags);
+ QCOMPARE(err, expectedError);
+}
+
+void tst_Parser::incompleteData_data()
+{
+ addColumns();
+ addFixedData();
+ addStringsData();
+ addTagsData();
+ addMapMixedData();
+}
+
+void tst_Parser::incompleteData()
+{
+ QFETCH(QByteArray, data);
+ QFETCH(QString, expected);
+
+ for (int len = 0; len < data.length() - 1; ++len) {
+ CborParser parser;
+ CborValue first;
+ CborError err = cbor_parser_init(reinterpret_cast<const quint8 *>(data.constData()), len, 0, &parser, &first);
+ if (!err) {
+ QString decoded;
+ err = parseOne(&first, &decoded);
+ }
+ if (err != CborErrorUnexpectedEOF)
+ qDebug() << "Length is" << len;
+ QCOMPARE(err, CborErrorUnexpectedEOF);
+ }
+}
+
+void tst_Parser::endPointer_data()
+{
+ QTest::addColumn<QByteArray>("data");
+ QTest::addColumn<int>("offset");
+
+ QTest::newRow("number1") << raw("\x81\x01\x01") << 2;
+ QTest::newRow("number24") << raw("\x81\x18\x18\x01") << 3;
+ QTest::newRow("string") << raw("\x81\x61Z\x01") << 3;
+ QTest::newRow("indefinite-string") << raw("\x81\x7f\x61Z\xff\x01") << 5;
+ QTest::newRow("array") << raw("\x81\x02\x01") << 2;
+ QTest::newRow("indefinite-array") << raw("\x81\x9f\x02\xff\x01") << 4;
+ QTest::newRow("object") << raw("\x81\xa1\x03\x02\x01") << 4;
+ QTest::newRow("indefinite-object") << raw("\x81\xbf\x03\x02\xff\x01") << 5;
+}
+
+void tst_Parser::endPointer()
+{
+ QFETCH(QByteArray, data);
+ QFETCH(int, offset);
+
+ QString decoded;
+ CborParser parser;
+ CborValue first;
+ CborError err = cbor_parser_init(reinterpret_cast<const quint8 *>(data.constData()), data.length(), 0, &parser, &first);
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+
+ err = parseOne(&first, &decoded);
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+ QCOMPARE(int(cbor_value_get_next_byte(&first) - reinterpret_cast<const quint8 *>(data.constBegin())), offset);
+}
+
+void tst_Parser::recursionLimit_data()
+{
+ static const int recursions = CBOR_PARSER_MAX_RECURSIONS + 2;
+ QTest::addColumn<QByteArray>("data");
+
+ QTest::newRow("array") << QByteArray(recursions, '\x81') + '\x20';
+ QTest::newRow("_array") << QByteArray(recursions, '\x9f') + '\x20' + QByteArray(recursions, '\xff');
+
+ QByteArray data;
+ for (int i = 0; i < recursions; ++i)
+ data += "\xa1\x65Hello";
+ data += '\2';
+ QTest::newRow("map-recursive-values") << data;
+
+ data.clear();
+ for (int i = 0; i < recursions; ++i)
+ data += "\xbf\x65World";
+ data += '\2';
+ for (int i = 0; i < recursions; ++i)
+ data += "\xff";
+ QTest::newRow("_map-recursive-values") << data;
+
+ data = QByteArray(recursions, '\xa1');
+ data += '\2';
+ for (int i = 0; i < recursions; ++i)
+ data += "\x7f\x64quux\xff";
+ QTest::newRow("map-recursive-keys") << data;
+
+ data = QByteArray(recursions, '\xbf');
+ data += '\2';
+ for (int i = 0; i < recursions; ++i)
+ data += "\1\xff";
+ QTest::newRow("_map-recursive-keys") << data;
+
+ data.clear();
+ for (int i = 0; i < recursions / 2; ++i)
+ data += "\x81\xa1\1";
+ data += '\2';
+ QTest::newRow("mixed") << data;
+}
+
+void tst_Parser::recursionLimit()
+{
+ QFETCH(QByteArray, data);
+
+ CborParser parser;
+ CborValue first;
+ CborError err = cbor_parser_init(reinterpret_cast<const quint8 *>(data.constData()), data.length(), 0, &parser, &first);
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+
+ // check that it is valid:
+ CborValue it = first;
+ {
+ QString dummy;
+ err = parseOne(&it, &dummy);
+ QVERIFY2(!err, QByteArray("Got error \"") + cbor_error_string(err) + "\"");
+ }
+
+ it = first;
+ err = cbor_value_advance(&it);
+ QCOMPARE(err, CborErrorNestingTooDeep);
+
+ it = first;
+ if (cbor_value_is_map(&it)) {
+ CborValue dummy;
+ err = cbor_value_map_find_value(&it, "foo", &dummy);
+ QCOMPARE(err, CborErrorNestingTooDeep);
+ }
+}
+
+QTEST_MAIN(tst_Parser)
+#include "tst_parser.moc"
diff --git a/src/3rdparty/xcb/README b/src/3rdparty/xcb/README
index d7c8eba294..9e8ea30b51 100644
--- a/src/3rdparty/xcb/README
+++ b/src/3rdparty/xcb/README
@@ -1,15 +1,19 @@
Contains the header and sources files from selected xcb libraries:
- libxcb-1.5 together with xcb-proto-1.6 (sync, xfixes, randr, xinerama sources)
+ libxcb-1.9.1 together with xcb-proto-1.8 (randr, render, shape, shm, sync,
+ xfixes, xinerama sources)
# libxkbcommon-x11 requires libxcb-xkb >= 1.10
libxcb-1.10 together with xcb-proto-1.10 (xkb sources)
+ libxcb-1.13 together with xcb-proto-1.13 (xinput sources with removed
+ Pointer Barriers API and SendExtensionEvent API)
libxcb-util-image-0.3.9
libxcb-util-keysyms-0.3.9
libxcb-util-renderutil-0.3.8
libxcb-util-wm-0.3.9
The 'include' directory was obtained by compiling and installing all of the modules.
-They have been tested to run also with libxcb 1.5 (the oldest version we support).
+When upgrading the bundled xcb headers, they must be tested to run also with the
+minimal supported libxcb version, which currently is 1.9.1.
Use the -qt-xcb configure option to use the files instead of system xcb libraries.
See src/plugins/platforms/xcb/README for details.
diff --git a/src/3rdparty/xcb/include/xcb/randr.h b/src/3rdparty/xcb/include/xcb/randr.h
index 1035c4043c..4f4f2104cf 100644
--- a/src/3rdparty/xcb/include/xcb/randr.h
+++ b/src/3rdparty/xcb/include/xcb/randr.h
@@ -1379,6 +1379,9 @@ xcb_randr_screen_size_next (xcb_randr_screen_size_iterator_t *i /**< */);
xcb_generic_iterator_t
xcb_randr_screen_size_end (xcb_randr_screen_size_iterator_t i /**< */);
+int
+xcb_randr_refresh_rates_sizeof (const void *_buffer /**< */);
+
/*****************************************************************************
**
@@ -1462,7 +1465,7 @@ xcb_generic_iterator_t
xcb_randr_refresh_rates_end (xcb_randr_refresh_rates_iterator_t i /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1487,7 +1490,7 @@ xcb_randr_query_version (xcb_connection_t *c /**< */,
uint32_t minor_version /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1546,7 +1549,7 @@ xcb_randr_query_version_reply (xcb_connection_t *c /**< */,
xcb_generic_error_t **e /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1579,7 +1582,7 @@ xcb_randr_set_screen_config (xcb_connection_t *c /**< */,
uint16_t rate /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1646,7 +1649,7 @@ xcb_randr_set_screen_config_reply (xcb_connection_t *c /**
xcb_generic_error_t **e /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1674,7 +1677,7 @@ xcb_randr_select_input_checked (xcb_connection_t *c /**< */,
uint16_t enable /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1698,8 +1701,11 @@ xcb_randr_select_input (xcb_connection_t *c /**< */,
xcb_window_t window /**< */,
uint16_t enable /**< */);
+int
+xcb_randr_get_screen_info_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1722,7 +1728,7 @@ xcb_randr_get_screen_info (xcb_connection_t *c /**< */,
xcb_window_t window /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1844,7 +1850,7 @@ xcb_randr_get_screen_info_reply (xcb_connection_t *c /**< */
xcb_generic_error_t **e /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1867,7 +1873,7 @@ xcb_randr_get_screen_size_range (xcb_connection_t *c /**< */,
xcb_window_t window /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1924,7 +1930,7 @@ xcb_randr_get_screen_size_range_reply (xcb_connection_t
xcb_generic_error_t **e /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1958,7 +1964,7 @@ xcb_randr_set_screen_size_checked (xcb_connection_t *c /**< */,
uint32_t mm_height /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2031,8 +2037,11 @@ xcb_randr_mode_info_next (xcb_randr_mode_info_iterator_t *i /**< */);
xcb_generic_iterator_t
xcb_randr_mode_info_end (xcb_randr_mode_info_iterator_t i /**< */);
+int
+xcb_randr_get_screen_resources_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2055,7 +2064,7 @@ xcb_randr_get_screen_resources (xcb_connection_t *c /**< */,
xcb_window_t window /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2267,8 +2276,11 @@ xcb_randr_get_screen_resources_reply (xcb_connection_t *
xcb_randr_get_screen_resources_cookie_t cookie /**< */,
xcb_generic_error_t **e /**< */);
+int
+xcb_randr_get_output_info_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2293,7 +2305,7 @@ xcb_randr_get_output_info (xcb_connection_t *c /**< */,
xcb_timestamp_t config_timestamp /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2507,8 +2519,11 @@ xcb_randr_get_output_info_reply (xcb_connection_t *c /**< */
xcb_randr_get_output_info_cookie_t cookie /**< */,
xcb_generic_error_t **e /**< */);
+int
+xcb_randr_list_output_properties_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2531,7 +2546,7 @@ xcb_randr_list_output_properties (xcb_connection_t *c /**< */,
xcb_randr_output_t output /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2626,8 +2641,11 @@ xcb_randr_list_output_properties_reply (xcb_connection_t
xcb_randr_list_output_properties_cookie_t cookie /**< */,
xcb_generic_error_t **e /**< */);
+int
+xcb_randr_query_output_property_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2652,7 +2670,7 @@ xcb_randr_query_output_property (xcb_connection_t *c /**< */,
xcb_atom_t property /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2749,8 +2767,12 @@ xcb_randr_query_output_property_reply (xcb_connection_t
xcb_randr_query_output_property_cookie_t cookie /**< */,
xcb_generic_error_t **e /**< */);
+int
+xcb_randr_configure_output_property_sizeof (const void *_buffer /**< */,
+ uint32_t values_len /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2786,7 +2808,7 @@ xcb_randr_configure_output_property_checked (xcb_connection_t *c /**< */,
const int32_t *values /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2818,8 +2840,11 @@ xcb_randr_configure_output_property (xcb_connection_t *c /**< */,
uint32_t values_len /**< */,
const int32_t *values /**< */);
+int
+xcb_randr_change_output_property_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2857,7 +2882,7 @@ xcb_randr_change_output_property_checked (xcb_connection_t *c /**< */,
const void *data /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2892,7 +2917,7 @@ xcb_randr_change_output_property (xcb_connection_t *c /**< */,
const void *data /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2920,7 +2945,7 @@ xcb_randr_delete_output_property_checked (xcb_connection_t *c /**< */,
xcb_atom_t property /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2944,8 +2969,11 @@ xcb_randr_delete_output_property (xcb_connection_t *c /**< */,
xcb_randr_output_t output /**< */,
xcb_atom_t property /**< */);
+int
+xcb_randr_get_output_property_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2980,7 +3008,7 @@ xcb_randr_get_output_property (xcb_connection_t *c /**< */,
uint8_t pending /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3087,8 +3115,12 @@ xcb_randr_get_output_property_reply (xcb_connection_t *c
xcb_randr_get_output_property_cookie_t cookie /**< */,
xcb_generic_error_t **e /**< */);
+int
+xcb_randr_create_mode_sizeof (const void *_buffer /**< */,
+ uint32_t name_len /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3117,7 +3149,7 @@ xcb_randr_create_mode (xcb_connection_t *c /**< */,
const char *name /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3180,7 +3212,7 @@ xcb_randr_create_mode_reply (xcb_connection_t *c /**< */,
xcb_generic_error_t **e /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3206,7 +3238,7 @@ xcb_randr_destroy_mode_checked (xcb_connection_t *c /**< */,
xcb_randr_mode_t mode /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3229,7 +3261,7 @@ xcb_randr_destroy_mode (xcb_connection_t *c /**< */,
xcb_randr_mode_t mode /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3257,7 +3289,7 @@ xcb_randr_add_output_mode_checked (xcb_connection_t *c /**< */,
xcb_randr_mode_t mode /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3282,7 +3314,7 @@ xcb_randr_add_output_mode (xcb_connection_t *c /**< */,
xcb_randr_mode_t mode /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3310,7 +3342,7 @@ xcb_randr_delete_output_mode_checked (xcb_connection_t *c /**< */,
xcb_randr_mode_t mode /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3334,8 +3366,11 @@ xcb_randr_delete_output_mode (xcb_connection_t *c /**< */,
xcb_randr_output_t output /**< */,
xcb_randr_mode_t mode /**< */);
+int
+xcb_randr_get_crtc_info_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3360,7 +3395,7 @@ xcb_randr_get_crtc_info (xcb_connection_t *c /**< */,
xcb_timestamp_t config_timestamp /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3496,8 +3531,12 @@ xcb_randr_get_crtc_info_reply (xcb_connection_t *c /**< */,
xcb_randr_get_crtc_info_cookie_t cookie /**< */,
xcb_generic_error_t **e /**< */);
+int
+xcb_randr_set_crtc_config_sizeof (const void *_buffer /**< */,
+ uint32_t outputs_len /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3536,7 +3575,7 @@ xcb_randr_set_crtc_config (xcb_connection_t *c /**< */,
const xcb_randr_output_t *outputs /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3609,7 +3648,7 @@ xcb_randr_set_crtc_config_reply (xcb_connection_t *c /**< */
xcb_generic_error_t **e /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3632,7 +3671,7 @@ xcb_randr_get_crtc_gamma_size (xcb_connection_t *c /**< */,
xcb_randr_crtc_t crtc /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3688,8 +3727,11 @@ xcb_randr_get_crtc_gamma_size_reply (xcb_connection_t *c
xcb_randr_get_crtc_gamma_size_cookie_t cookie /**< */,
xcb_generic_error_t **e /**< */);
+int
+xcb_randr_get_crtc_gamma_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3712,7 +3754,7 @@ xcb_randr_get_crtc_gamma (xcb_connection_t *c /**< */,
xcb_randr_crtc_t crtc /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3885,8 +3927,11 @@ xcb_randr_get_crtc_gamma_reply (xcb_connection_t *c /**< */,
xcb_randr_get_crtc_gamma_cookie_t cookie /**< */,
xcb_generic_error_t **e /**< */);
+int
+xcb_randr_set_crtc_gamma_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3920,7 +3965,7 @@ xcb_randr_set_crtc_gamma_checked (xcb_connection_t *c /**< */,
const uint16_t *blue /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3950,8 +3995,11 @@ xcb_randr_set_crtc_gamma (xcb_connection_t *c /**< */,
const uint16_t *green /**< */,
const uint16_t *blue /**< */);
+int
+xcb_randr_get_screen_resources_current_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3974,7 +4022,7 @@ xcb_randr_get_screen_resources_current (xcb_connection_t *c /**< */,
xcb_window_t window /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -4186,8 +4234,12 @@ xcb_randr_get_screen_resources_current_reply (xcb_connection_t
xcb_randr_get_screen_resources_current_cookie_t cookie /**< */,
xcb_generic_error_t **e /**< */);
+int
+xcb_randr_set_crtc_transform_sizeof (const void *_buffer /**< */,
+ uint32_t filter_params_len /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -4223,7 +4275,7 @@ xcb_randr_set_crtc_transform_checked (xcb_connection_t *c /**< */,
const xcb_render_fixed_t *filter_params /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -4255,8 +4307,11 @@ xcb_randr_set_crtc_transform (xcb_connection_t *c /**< */,
uint32_t filter_params_len /**< */,
const xcb_render_fixed_t *filter_params /**< */);
+int
+xcb_randr_get_crtc_transform_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -4279,7 +4334,7 @@ xcb_randr_get_crtc_transform (xcb_connection_t *c /**< */,
xcb_randr_crtc_t crtc /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -4492,7 +4547,7 @@ xcb_randr_get_crtc_transform_reply (xcb_connection_t *c /
xcb_generic_error_t **e /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -4515,7 +4570,7 @@ xcb_randr_get_panning (xcb_connection_t *c /**< */,
xcb_randr_crtc_t crtc /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -4572,7 +4627,7 @@ xcb_randr_get_panning_reply (xcb_connection_t *c /**< */,
xcb_generic_error_t **e /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -4621,7 +4676,7 @@ xcb_randr_set_panning (xcb_connection_t *c /**< */,
int16_t border_bottom /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -4704,7 +4759,7 @@ xcb_randr_set_panning_reply (xcb_connection_t *c /**< */,
xcb_generic_error_t **e /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -4732,7 +4787,7 @@ xcb_randr_set_output_primary_checked (xcb_connection_t *c /**< */,
xcb_randr_output_t output /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -4757,7 +4812,7 @@ xcb_randr_set_output_primary (xcb_connection_t *c /**< */,
xcb_randr_output_t output /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -4780,7 +4835,7 @@ xcb_randr_get_output_primary (xcb_connection_t *c /**< */,
xcb_window_t window /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
diff --git a/src/3rdparty/xcb/include/xcb/render.h b/src/3rdparty/xcb/include/xcb/render.h
index 0f96ca1fbc..eb7f0424d5 100644
--- a/src/3rdparty/xcb/include/xcb/render.h
+++ b/src/3rdparty/xcb/include/xcb/render.h
@@ -20,7 +20,7 @@ extern "C" {
#endif
#define XCB_RENDER_MAJOR_VERSION 0
-#define XCB_RENDER_MINOR_VERSION 10
+#define XCB_RENDER_MINOR_VERSION 11
extern xcb_extension_t xcb_render_id;
@@ -71,7 +71,22 @@ typedef enum xcb_render_pict_op_t {
XCB_RENDER_PICT_OP_CONJOINT_OUT_REVERSE,
XCB_RENDER_PICT_OP_CONJOINT_ATOP,
XCB_RENDER_PICT_OP_CONJOINT_ATOP_REVERSE,
- XCB_RENDER_PICT_OP_CONJOINT_XOR
+ XCB_RENDER_PICT_OP_CONJOINT_XOR,
+ XCB_RENDER_PICT_OP_MULTIPLY = 48,
+ XCB_RENDER_PICT_OP_SCREEN,
+ XCB_RENDER_PICT_OP_OVERLAY,
+ XCB_RENDER_PICT_OP_DARKEN,
+ XCB_RENDER_PICT_OP_LIGHTEN,
+ XCB_RENDER_PICT_OP_COLOR_DODGE,
+ XCB_RENDER_PICT_OP_COLOR_BURN,
+ XCB_RENDER_PICT_OP_HARD_LIGHT,
+ XCB_RENDER_PICT_OP_SOFT_LIGHT,
+ XCB_RENDER_PICT_OP_DIFFERENCE,
+ XCB_RENDER_PICT_OP_EXCLUSION,
+ XCB_RENDER_PICT_OP_HSL_HUE,
+ XCB_RENDER_PICT_OP_HSL_SATURATION,
+ XCB_RENDER_PICT_OP_HSL_COLOR,
+ XCB_RENDER_PICT_OP_HSL_LUMINOSITY
} xcb_render_pict_op_t;
typedef enum xcb_render_poly_edge_t {
@@ -1453,6 +1468,9 @@ xcb_render_pictvisual_next (xcb_render_pictvisual_iterator_t *i /**< */);
xcb_generic_iterator_t
xcb_render_pictvisual_end (xcb_render_pictvisual_iterator_t i /**< */);
+int
+xcb_render_pictdepth_sizeof (const void *_buffer /**< */);
+
/*****************************************************************************
**
@@ -1535,6 +1553,9 @@ xcb_render_pictdepth_next (xcb_render_pictdepth_iterator_t *i /**< */);
xcb_generic_iterator_t
xcb_render_pictdepth_end (xcb_render_pictdepth_iterator_t i /**< */);
+int
+xcb_render_pictscreen_sizeof (const void *_buffer /**< */);
+
/*****************************************************************************
**
@@ -1906,7 +1927,7 @@ xcb_generic_iterator_t
xcb_render_glyphinfo_end (xcb_render_glyphinfo_iterator_t i /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1931,7 +1952,7 @@ xcb_render_query_version (xcb_connection_t *c /**< */,
uint32_t client_minor_version /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1989,8 +2010,11 @@ xcb_render_query_version_reply (xcb_connection_t *c /**< */,
xcb_render_query_version_cookie_t cookie /**< */,
xcb_generic_error_t **e /**< */);
+int
+xcb_render_query_pict_formats_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2011,7 +2035,7 @@ xcb_render_query_pict_formats_cookie_t
xcb_render_query_pict_formats (xcb_connection_t *c /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2169,8 +2193,11 @@ xcb_render_query_pict_formats_reply (xcb_connection_t *c
xcb_render_query_pict_formats_cookie_t cookie /**< */,
xcb_generic_error_t **e /**< */);
+int
+xcb_render_query_pict_index_values_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2193,7 +2220,7 @@ xcb_render_query_pict_index_values (xcb_connection_t *c /**< */,
xcb_render_pictformat_t format /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2288,8 +2315,11 @@ xcb_render_query_pict_index_values_reply (xcb_connection_t
xcb_render_query_pict_index_values_cookie_t cookie /**< */,
xcb_generic_error_t **e /**< */);
+int
+xcb_render_create_picture_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2323,7 +2353,7 @@ xcb_render_create_picture_checked (xcb_connection_t *c /**< */,
const uint32_t *value_list /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2353,8 +2383,11 @@ xcb_render_create_picture (xcb_connection_t *c /**< */,
uint32_t value_mask /**< */,
const uint32_t *value_list /**< */);
+int
+xcb_render_change_picture_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2384,7 +2417,7 @@ xcb_render_change_picture_checked (xcb_connection_t *c /**< */,
const uint32_t *value_list /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2410,8 +2443,12 @@ xcb_render_change_picture (xcb_connection_t *c /**< */,
uint32_t value_mask /**< */,
const uint32_t *value_list /**< */);
+int
+xcb_render_set_picture_clip_rectangles_sizeof (const void *_buffer /**< */,
+ uint32_t rectangles_len /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2445,7 +2482,7 @@ xcb_render_set_picture_clip_rectangles_checked (xcb_connection_t *c /**< *
const xcb_rectangle_t *rectangles /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2476,7 +2513,7 @@ xcb_render_set_picture_clip_rectangles (xcb_connection_t *c /**< */,
const xcb_rectangle_t *rectangles /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2502,7 +2539,7 @@ xcb_render_free_picture_checked (xcb_connection_t *c /**< */,
xcb_render_picture_t picture /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2525,7 +2562,7 @@ xcb_render_free_picture (xcb_connection_t *c /**< */,
xcb_render_picture_t picture /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2573,7 +2610,7 @@ xcb_render_composite_checked (xcb_connection_t *c /**< */,
uint16_t height /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2617,8 +2654,12 @@ xcb_render_composite (xcb_connection_t *c /**< */,
uint16_t width /**< */,
uint16_t height /**< */);
+int
+xcb_render_trapezoids_sizeof (const void *_buffer /**< */,
+ uint32_t traps_len /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2658,7 +2699,7 @@ xcb_render_trapezoids_checked (xcb_connection_t *c /**< */,
const xcb_render_trapezoid_t *traps /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2694,8 +2735,12 @@ xcb_render_trapezoids (xcb_connection_t *c /**< */,
uint32_t traps_len /**< */,
const xcb_render_trapezoid_t *traps /**< */);
+int
+xcb_render_triangles_sizeof (const void *_buffer /**< */,
+ uint32_t triangles_len /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2735,7 +2780,7 @@ xcb_render_triangles_checked (xcb_connection_t *c /**< */,
const xcb_render_triangle_t *triangles /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2771,8 +2816,12 @@ xcb_render_triangles (xcb_connection_t *c /**< */,
uint32_t triangles_len /**< */,
const xcb_render_triangle_t *triangles /**< */);
+int
+xcb_render_tri_strip_sizeof (const void *_buffer /**< */,
+ uint32_t points_len /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2812,7 +2861,7 @@ xcb_render_tri_strip_checked (xcb_connection_t *c /**< */,
const xcb_render_pointfix_t *points /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2848,8 +2897,12 @@ xcb_render_tri_strip (xcb_connection_t *c /**< */,
uint32_t points_len /**< */,
const xcb_render_pointfix_t *points /**< */);
+int
+xcb_render_tri_fan_sizeof (const void *_buffer /**< */,
+ uint32_t points_len /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2889,7 +2942,7 @@ xcb_render_tri_fan_checked (xcb_connection_t *c /**< */,
const xcb_render_pointfix_t *points /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2926,7 +2979,7 @@ xcb_render_tri_fan (xcb_connection_t *c /**< */,
const xcb_render_pointfix_t *points /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2954,7 +3007,7 @@ xcb_render_create_glyph_set_checked (xcb_connection_t *c /**< */,
xcb_render_pictformat_t format /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2979,7 +3032,7 @@ xcb_render_create_glyph_set (xcb_connection_t *c /**< */,
xcb_render_pictformat_t format /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3007,7 +3060,7 @@ xcb_render_reference_glyph_set_checked (xcb_connection_t *c /**< */,
xcb_render_glyphset_t existing /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3032,7 +3085,7 @@ xcb_render_reference_glyph_set (xcb_connection_t *c /**< */,
xcb_render_glyphset_t existing /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3058,7 +3111,7 @@ xcb_render_free_glyph_set_checked (xcb_connection_t *c /**< */,
xcb_render_glyphset_t glyphset /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3080,8 +3133,12 @@ xcb_void_cookie_t
xcb_render_free_glyph_set (xcb_connection_t *c /**< */,
xcb_render_glyphset_t glyphset /**< */);
+int
+xcb_render_add_glyphs_sizeof (const void *_buffer /**< */,
+ uint32_t data_len /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3117,7 +3174,7 @@ xcb_render_add_glyphs_checked (xcb_connection_t *c /**< */,
const uint8_t *data /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3149,8 +3206,12 @@ xcb_render_add_glyphs (xcb_connection_t *c /**< */,
uint32_t data_len /**< */,
const uint8_t *data /**< */);
+int
+xcb_render_free_glyphs_sizeof (const void *_buffer /**< */,
+ uint32_t glyphs_len /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3180,7 +3241,7 @@ xcb_render_free_glyphs_checked (xcb_connection_t *c /**< */,
const xcb_render_glyph_t *glyphs /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3206,8 +3267,12 @@ xcb_render_free_glyphs (xcb_connection_t *c /**< */,
uint32_t glyphs_len /**< */,
const xcb_render_glyph_t *glyphs /**< */);
+int
+xcb_render_composite_glyphs_8_sizeof (const void *_buffer /**< */,
+ uint32_t glyphcmds_len /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3249,7 +3314,7 @@ xcb_render_composite_glyphs_8_checked (xcb_connection_t *c /**< */,
const uint8_t *glyphcmds /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3287,8 +3352,12 @@ xcb_render_composite_glyphs_8 (xcb_connection_t *c /**< */,
uint32_t glyphcmds_len /**< */,
const uint8_t *glyphcmds /**< */);
+int
+xcb_render_composite_glyphs_16_sizeof (const void *_buffer /**< */,
+ uint32_t glyphcmds_len /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3330,7 +3399,7 @@ xcb_render_composite_glyphs_16_checked (xcb_connection_t *c /**< */,
const uint8_t *glyphcmds /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3368,8 +3437,12 @@ xcb_render_composite_glyphs_16 (xcb_connection_t *c /**< */,
uint32_t glyphcmds_len /**< */,
const uint8_t *glyphcmds /**< */);
+int
+xcb_render_composite_glyphs_32_sizeof (const void *_buffer /**< */,
+ uint32_t glyphcmds_len /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3411,7 +3484,7 @@ xcb_render_composite_glyphs_32_checked (xcb_connection_t *c /**< */,
const uint8_t *glyphcmds /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3449,8 +3522,12 @@ xcb_render_composite_glyphs_32 (xcb_connection_t *c /**< */,
uint32_t glyphcmds_len /**< */,
const uint8_t *glyphcmds /**< */);
+int
+xcb_render_fill_rectangles_sizeof (const void *_buffer /**< */,
+ uint32_t rects_len /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3484,7 +3561,7 @@ xcb_render_fill_rectangles_checked (xcb_connection_t *c /**< */,
const xcb_rectangle_t *rects /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3515,7 +3592,7 @@ xcb_render_fill_rectangles (xcb_connection_t *c /**< */,
const xcb_rectangle_t *rects /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3547,7 +3624,7 @@ xcb_render_create_cursor_checked (xcb_connection_t *c /**< */,
uint16_t y /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3619,7 +3696,7 @@ xcb_generic_iterator_t
xcb_render_transform_end (xcb_render_transform_iterator_t i /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3647,7 +3724,7 @@ xcb_render_set_picture_transform_checked (xcb_connection_t *c /**< */,
xcb_render_transform_t transform /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3671,8 +3748,11 @@ xcb_render_set_picture_transform (xcb_connection_t *c /**< */,
xcb_render_picture_t picture /**< */,
xcb_render_transform_t transform /**< */);
+int
+xcb_render_query_filters_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3695,7 +3775,7 @@ xcb_render_query_filters (xcb_connection_t *c /**< */,
xcb_drawable_t drawable /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3816,8 +3896,12 @@ xcb_render_query_filters_reply (xcb_connection_t *c /**< */,
xcb_render_query_filters_cookie_t cookie /**< */,
xcb_generic_error_t **e /**< */);
+int
+xcb_render_set_picture_filter_sizeof (const void *_buffer /**< */,
+ uint32_t values_len /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3851,7 +3935,7 @@ xcb_render_set_picture_filter_checked (xcb_connection_t *c /**< */,
const xcb_render_fixed_t *values /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3924,8 +4008,12 @@ xcb_render_animcursorelt_next (xcb_render_animcursorelt_iterator_t *i /**< */);
xcb_generic_iterator_t
xcb_render_animcursorelt_end (xcb_render_animcursorelt_iterator_t i /**< */);
+int
+xcb_render_create_anim_cursor_sizeof (const void *_buffer /**< */,
+ uint32_t cursors_len /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -3955,7 +4043,7 @@ xcb_render_create_anim_cursor_checked (xcb_connection_t *c /**<
const xcb_render_animcursorelt_t *cursors /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -4067,8 +4155,12 @@ xcb_render_trap_next (xcb_render_trap_iterator_t *i /**< */);
xcb_generic_iterator_t
xcb_render_trap_end (xcb_render_trap_iterator_t i /**< */);
+int
+xcb_render_add_traps_sizeof (const void *_buffer /**< */,
+ uint32_t traps_len /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -4102,7 +4194,7 @@ xcb_render_add_traps_checked (xcb_connection_t *c /**< */,
const xcb_render_trap_t *traps /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -4133,7 +4225,7 @@ xcb_render_add_traps (xcb_connection_t *c /**< */,
const xcb_render_trap_t *traps /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -4161,7 +4253,7 @@ xcb_render_create_solid_fill_checked (xcb_connection_t *c /**< */,
xcb_render_color_t color /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -4185,8 +4277,11 @@ xcb_render_create_solid_fill (xcb_connection_t *c /**< */,
xcb_render_picture_t picture /**< */,
xcb_render_color_t color /**< */);
+int
+xcb_render_create_linear_gradient_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -4222,7 +4317,7 @@ xcb_render_create_linear_gradient_checked (xcb_connection_t *c /**< */,
const xcb_render_color_t *colors /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -4254,8 +4349,11 @@ xcb_render_create_linear_gradient (xcb_connection_t *c /**< */,
const xcb_render_fixed_t *stops /**< */,
const xcb_render_color_t *colors /**< */);
+int
+xcb_render_create_radial_gradient_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -4295,7 +4393,7 @@ xcb_render_create_radial_gradient_checked (xcb_connection_t *c /**< */,
const xcb_render_color_t *colors /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -4331,8 +4429,11 @@ xcb_render_create_radial_gradient (xcb_connection_t *c /**< */,
const xcb_render_fixed_t *stops /**< */,
const xcb_render_color_t *colors /**< */);
+int
+xcb_render_create_conical_gradient_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -4368,7 +4469,7 @@ xcb_render_create_conical_gradient_checked (xcb_connection_t *c /**< */
const xcb_render_color_t *colors /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
diff --git a/src/3rdparty/xcb/include/xcb/shape.h b/src/3rdparty/xcb/include/xcb/shape.h
index 107d2ff748..63919b42c7 100644
--- a/src/3rdparty/xcb/include/xcb/shape.h
+++ b/src/3rdparty/xcb/include/xcb/shape.h
@@ -393,7 +393,7 @@ xcb_generic_iterator_t
xcb_shape_kind_end (xcb_shape_kind_iterator_t i /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -414,7 +414,7 @@ xcb_shape_query_version_cookie_t
xcb_shape_query_version (xcb_connection_t *c /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -468,8 +468,12 @@ xcb_shape_query_version_reply (xcb_connection_t *c /**< */,
xcb_shape_query_version_cookie_t cookie /**< */,
xcb_generic_error_t **e /**< */);
+int
+xcb_shape_rectangles_sizeof (const void *_buffer /**< */,
+ uint32_t rectangles_len /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -509,7 +513,7 @@ xcb_shape_rectangles_checked (xcb_connection_t *c /**< */,
const xcb_rectangle_t *rectangles /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -546,7 +550,7 @@ xcb_shape_rectangles (xcb_connection_t *c /**< */,
const xcb_rectangle_t *rectangles /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -582,7 +586,7 @@ xcb_shape_mask_checked (xcb_connection_t *c /**< */,
xcb_pixmap_t source_bitmap /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -615,7 +619,7 @@ xcb_shape_mask (xcb_connection_t *c /**< */,
xcb_pixmap_t source_bitmap /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -653,7 +657,7 @@ xcb_shape_combine_checked (xcb_connection_t *c /**< */,
xcb_window_t source_window /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -688,7 +692,7 @@ xcb_shape_combine (xcb_connection_t *c /**< */,
xcb_window_t source_window /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -720,7 +724,7 @@ xcb_shape_offset_checked (xcb_connection_t *c /**< */,
int16_t y_offset /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -749,7 +753,7 @@ xcb_shape_offset (xcb_connection_t *c /**< */,
int16_t y_offset /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -772,7 +776,7 @@ xcb_shape_query_extents (xcb_connection_t *c /**< */,
xcb_window_t destination_window /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -829,7 +833,7 @@ xcb_shape_query_extents_reply (xcb_connection_t *c /**< */,
xcb_generic_error_t **e /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -857,7 +861,7 @@ xcb_shape_select_input_checked (xcb_connection_t *c /**< */,
uint8_t enable /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -882,7 +886,7 @@ xcb_shape_select_input (xcb_connection_t *c /**< */,
uint8_t enable /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -905,7 +909,7 @@ xcb_shape_input_selected (xcb_connection_t *c /**< */,
xcb_window_t destination_window /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -961,8 +965,11 @@ xcb_shape_input_selected_reply (xcb_connection_t *c /**< */,
xcb_shape_input_selected_cookie_t cookie /**< */,
xcb_generic_error_t **e /**< */);
+int
+xcb_shape_get_rectangles_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -987,7 +994,7 @@ xcb_shape_get_rectangles (xcb_connection_t *c /**< */,
xcb_shape_kind_t source_kind /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
diff --git a/src/3rdparty/xcb/include/xcb/shm.h b/src/3rdparty/xcb/include/xcb/shm.h
index bcb60d81f1..315f37e9b9 100644
--- a/src/3rdparty/xcb/include/xcb/shm.h
+++ b/src/3rdparty/xcb/include/xcb/shm.h
@@ -255,7 +255,7 @@ xcb_generic_iterator_t
xcb_shm_seg_end (xcb_shm_seg_iterator_t i /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -276,7 +276,7 @@ xcb_shm_query_version_cookie_t
xcb_shm_query_version (xcb_connection_t *c /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -331,7 +331,7 @@ xcb_shm_query_version_reply (xcb_connection_t *c /**< */,
xcb_generic_error_t **e /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -361,7 +361,7 @@ xcb_shm_attach_checked (xcb_connection_t *c /**< */,
uint8_t read_only /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -388,7 +388,7 @@ xcb_shm_attach (xcb_connection_t *c /**< */,
uint8_t read_only /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -414,7 +414,7 @@ xcb_shm_detach_checked (xcb_connection_t *c /**< */,
xcb_shm_seg_t shmseg /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -437,7 +437,7 @@ xcb_shm_detach (xcb_connection_t *c /**< */,
xcb_shm_seg_t shmseg /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -491,7 +491,7 @@ xcb_shm_put_image_checked (xcb_connection_t *c /**< */,
uint32_t offset /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -542,7 +542,7 @@ xcb_shm_put_image (xcb_connection_t *c /**< */,
uint32_t offset /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -581,7 +581,7 @@ xcb_shm_get_image (xcb_connection_t *c /**< */,
uint32_t offset /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -654,7 +654,7 @@ xcb_shm_get_image_reply (xcb_connection_t *c /**< */,
xcb_generic_error_t **e /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -692,7 +692,7 @@ xcb_shm_create_pixmap_checked (xcb_connection_t *c /**< */,
uint32_t offset /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
diff --git a/src/3rdparty/xcb/include/xcb/sync.h b/src/3rdparty/xcb/include/xcb/sync.h
index 50665c2865..3d0069d7ef 100644
--- a/src/3rdparty/xcb/include/xcb/sync.h
+++ b/src/3rdparty/xcb/include/xcb/sync.h
@@ -20,7 +20,7 @@ extern "C" {
#endif
#define XCB_SYNC_MAJOR_VERSION 3
-#define XCB_SYNC_MINOR_VERSION 0
+#define XCB_SYNC_MINOR_VERSION 1
extern xcb_extension_t xcb_sync_id;
@@ -52,6 +52,17 @@ typedef struct xcb_sync_counter_iterator_t {
int index; /**< */
} xcb_sync_counter_iterator_t;
+typedef uint32_t xcb_sync_fence_t;
+
+/**
+ * @brief xcb_sync_fence_iterator_t
+ **/
+typedef struct xcb_sync_fence_iterator_t {
+ xcb_sync_fence_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_sync_fence_iterator_t;
+
typedef enum xcb_sync_testtype_t {
XCB_SYNC_TESTTYPE_POSITIVE_TRANSITION,
XCB_SYNC_TESTTYPE_NEGATIVE_TRANSITION,
@@ -458,6 +469,104 @@ typedef struct xcb_sync_get_priority_reply_t {
int32_t priority; /**< */
} xcb_sync_get_priority_reply_t;
+/** Opcode for xcb_sync_create_fence. */
+#define XCB_SYNC_CREATE_FENCE 14
+
+/**
+ * @brief xcb_sync_create_fence_request_t
+ **/
+typedef struct xcb_sync_create_fence_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_drawable_t drawable; /**< */
+ xcb_sync_fence_t fence; /**< */
+ uint8_t initially_triggered; /**< */
+} xcb_sync_create_fence_request_t;
+
+/** Opcode for xcb_sync_trigger_fence. */
+#define XCB_SYNC_TRIGGER_FENCE 15
+
+/**
+ * @brief xcb_sync_trigger_fence_request_t
+ **/
+typedef struct xcb_sync_trigger_fence_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_sync_fence_t fence; /**< */
+} xcb_sync_trigger_fence_request_t;
+
+/** Opcode for xcb_sync_reset_fence. */
+#define XCB_SYNC_RESET_FENCE 16
+
+/**
+ * @brief xcb_sync_reset_fence_request_t
+ **/
+typedef struct xcb_sync_reset_fence_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_sync_fence_t fence; /**< */
+} xcb_sync_reset_fence_request_t;
+
+/** Opcode for xcb_sync_destroy_fence. */
+#define XCB_SYNC_DESTROY_FENCE 17
+
+/**
+ * @brief xcb_sync_destroy_fence_request_t
+ **/
+typedef struct xcb_sync_destroy_fence_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_sync_fence_t fence; /**< */
+} xcb_sync_destroy_fence_request_t;
+
+/**
+ * @brief xcb_sync_query_fence_cookie_t
+ **/
+typedef struct xcb_sync_query_fence_cookie_t {
+ unsigned int sequence; /**< */
+} xcb_sync_query_fence_cookie_t;
+
+/** Opcode for xcb_sync_query_fence. */
+#define XCB_SYNC_QUERY_FENCE 18
+
+/**
+ * @brief xcb_sync_query_fence_request_t
+ **/
+typedef struct xcb_sync_query_fence_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_sync_fence_t fence; /**< */
+} xcb_sync_query_fence_request_t;
+
+/**
+ * @brief xcb_sync_query_fence_reply_t
+ **/
+typedef struct xcb_sync_query_fence_reply_t {
+ uint8_t response_type; /**< */
+ uint8_t pad0; /**< */
+ uint16_t sequence; /**< */
+ uint32_t length; /**< */
+ uint8_t triggered; /**< */
+ uint8_t pad1[23]; /**< */
+} xcb_sync_query_fence_reply_t;
+
+/** Opcode for xcb_sync_await_fence. */
+#define XCB_SYNC_AWAIT_FENCE 19
+
+/**
+ * @brief xcb_sync_await_fence_request_t
+ **/
+typedef struct xcb_sync_await_fence_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+} xcb_sync_await_fence_request_t;
+
/** Opcode for xcb_sync_counter_notify. */
#define XCB_SYNC_COUNTER_NOTIFY 0
@@ -583,6 +692,49 @@ xcb_sync_counter_end (xcb_sync_counter_iterator_t i /**< */);
/**
* Get the next element of the iterator
+ * @param i Pointer to a xcb_sync_fence_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_sync_fence_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_sync_fence_next
+ **
+ ** @param xcb_sync_fence_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_sync_fence_next (xcb_sync_fence_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_sync_fence_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_sync_fence_end
+ **
+ ** @param xcb_sync_fence_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_sync_fence_end (xcb_sync_fence_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
* @param i Pointer to a xcb_sync_int64_iterator_t
*
* Get the next element in the iterator. The member rem is
@@ -624,6 +776,9 @@ xcb_sync_int64_next (xcb_sync_int64_iterator_t *i /**< */);
xcb_generic_iterator_t
xcb_sync_int64_end (xcb_sync_int64_iterator_t i /**< */);
+int
+xcb_sync_systemcounter_sizeof (const void *_buffer /**< */);
+
/*****************************************************************************
**
@@ -793,7 +948,7 @@ xcb_generic_iterator_t
xcb_sync_waitcondition_end (xcb_sync_waitcondition_iterator_t i /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -818,7 +973,7 @@ xcb_sync_initialize (xcb_connection_t *c /**< */,
uint8_t desired_minor_version /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -876,8 +1031,11 @@ xcb_sync_initialize_reply (xcb_connection_t *c /**< */,
xcb_sync_initialize_cookie_t cookie /**< */,
xcb_generic_error_t **e /**< */);
+int
+xcb_sync_list_system_counters_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -898,7 +1056,7 @@ xcb_sync_list_system_counters_cookie_t
xcb_sync_list_system_counters (xcb_connection_t *c /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -979,7 +1137,7 @@ xcb_sync_list_system_counters_reply (xcb_connection_t *c
xcb_generic_error_t **e /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1007,7 +1165,7 @@ xcb_sync_create_counter_checked (xcb_connection_t *c /**< */,
xcb_sync_int64_t initial_value /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1032,7 +1190,7 @@ xcb_sync_create_counter (xcb_connection_t *c /**< */,
xcb_sync_int64_t initial_value /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1058,7 +1216,7 @@ xcb_sync_destroy_counter_checked (xcb_connection_t *c /**< */,
xcb_sync_counter_t counter /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1081,7 +1239,7 @@ xcb_sync_destroy_counter (xcb_connection_t *c /**< */,
xcb_sync_counter_t counter /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1104,7 +1262,7 @@ xcb_sync_query_counter (xcb_connection_t *c /**< */,
xcb_sync_counter_t counter /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1160,8 +1318,12 @@ xcb_sync_query_counter_reply (xcb_connection_t *c /**< */,
xcb_sync_query_counter_cookie_t cookie /**< */,
xcb_generic_error_t **e /**< */);
+int
+xcb_sync_await_sizeof (const void *_buffer /**< */,
+ uint32_t wait_list_len /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1189,7 +1351,7 @@ xcb_sync_await_checked (xcb_connection_t *c /**< */,
const xcb_sync_waitcondition_t *wait_list /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1214,7 +1376,7 @@ xcb_sync_await (xcb_connection_t *c /**< */,
const xcb_sync_waitcondition_t *wait_list /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1242,7 +1404,7 @@ xcb_sync_change_counter_checked (xcb_connection_t *c /**< */,
xcb_sync_int64_t amount /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1267,7 +1429,7 @@ xcb_sync_change_counter (xcb_connection_t *c /**< */,
xcb_sync_int64_t amount /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1295,7 +1457,7 @@ xcb_sync_set_counter_checked (xcb_connection_t *c /**< */,
xcb_sync_int64_t value /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1319,8 +1481,11 @@ xcb_sync_set_counter (xcb_connection_t *c /**< */,
xcb_sync_counter_t counter /**< */,
xcb_sync_int64_t value /**< */);
+int
+xcb_sync_create_alarm_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1350,7 +1515,7 @@ xcb_sync_create_alarm_checked (xcb_connection_t *c /**< */,
const uint32_t *value_list /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1376,8 +1541,11 @@ xcb_sync_create_alarm (xcb_connection_t *c /**< */,
uint32_t value_mask /**< */,
const uint32_t *value_list /**< */);
+int
+xcb_sync_change_alarm_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1407,7 +1575,7 @@ xcb_sync_change_alarm_checked (xcb_connection_t *c /**< */,
const uint32_t *value_list /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1434,7 +1602,7 @@ xcb_sync_change_alarm (xcb_connection_t *c /**< */,
const uint32_t *value_list /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1460,7 +1628,7 @@ xcb_sync_destroy_alarm_checked (xcb_connection_t *c /**< */,
xcb_sync_alarm_t alarm /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1483,7 +1651,7 @@ xcb_sync_destroy_alarm (xcb_connection_t *c /**< */,
xcb_sync_alarm_t alarm /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1506,7 +1674,7 @@ xcb_sync_query_alarm (xcb_connection_t *c /**< */,
xcb_sync_alarm_t alarm /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1563,7 +1731,7 @@ xcb_sync_query_alarm_reply (xcb_connection_t *c /**< */,
xcb_generic_error_t **e /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1591,7 +1759,7 @@ xcb_sync_set_priority_checked (xcb_connection_t *c /**< */,
int32_t priority /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1616,7 +1784,7 @@ xcb_sync_set_priority (xcb_connection_t *c /**< */,
int32_t priority /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1639,7 +1807,7 @@ xcb_sync_get_priority (xcb_connection_t *c /**< */,
uint32_t id /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1695,6 +1863,347 @@ xcb_sync_get_priority_reply (xcb_connection_t *c /**< */,
xcb_sync_get_priority_cookie_t cookie /**< */,
xcb_generic_error_t **e /**< */);
+/**
+ *
+ * @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_sync_create_fence_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_drawable_t drawable
+ ** @param xcb_sync_fence_t fence
+ ** @param uint8_t initially_triggered
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_sync_create_fence_checked (xcb_connection_t *c /**< */,
+ xcb_drawable_t drawable /**< */,
+ xcb_sync_fence_t fence /**< */,
+ uint8_t initially_triggered /**< */);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_sync_create_fence
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_drawable_t drawable
+ ** @param xcb_sync_fence_t fence
+ ** @param uint8_t initially_triggered
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_sync_create_fence (xcb_connection_t *c /**< */,
+ xcb_drawable_t drawable /**< */,
+ xcb_sync_fence_t fence /**< */,
+ uint8_t initially_triggered /**< */);
+
+/**
+ *
+ * @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_sync_trigger_fence_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_sync_fence_t fence
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_sync_trigger_fence_checked (xcb_connection_t *c /**< */,
+ xcb_sync_fence_t fence /**< */);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_sync_trigger_fence
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_sync_fence_t fence
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_sync_trigger_fence (xcb_connection_t *c /**< */,
+ xcb_sync_fence_t fence /**< */);
+
+/**
+ *
+ * @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_sync_reset_fence_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_sync_fence_t fence
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_sync_reset_fence_checked (xcb_connection_t *c /**< */,
+ xcb_sync_fence_t fence /**< */);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_sync_reset_fence
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_sync_fence_t fence
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_sync_reset_fence (xcb_connection_t *c /**< */,
+ xcb_sync_fence_t fence /**< */);
+
+/**
+ *
+ * @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_sync_destroy_fence_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_sync_fence_t fence
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_sync_destroy_fence_checked (xcb_connection_t *c /**< */,
+ xcb_sync_fence_t fence /**< */);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_sync_destroy_fence
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_sync_fence_t fence
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_sync_destroy_fence (xcb_connection_t *c /**< */,
+ xcb_sync_fence_t fence /**< */);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_sync_query_fence_cookie_t xcb_sync_query_fence
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_sync_fence_t fence
+ ** @returns xcb_sync_query_fence_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_sync_query_fence_cookie_t
+xcb_sync_query_fence (xcb_connection_t *c /**< */,
+ xcb_sync_fence_t fence /**< */);
+
+/**
+ *
+ * @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_sync_query_fence_cookie_t xcb_sync_query_fence_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_sync_fence_t fence
+ ** @returns xcb_sync_query_fence_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_sync_query_fence_cookie_t
+xcb_sync_query_fence_unchecked (xcb_connection_t *c /**< */,
+ xcb_sync_fence_t fence /**< */);
+
+/**
+ * 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_sync_query_fence_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_sync_query_fence_reply_t * xcb_sync_query_fence_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_sync_query_fence_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_sync_query_fence_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_sync_query_fence_reply_t *
+xcb_sync_query_fence_reply (xcb_connection_t *c /**< */,
+ xcb_sync_query_fence_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */);
+
+int
+xcb_sync_await_fence_sizeof (const void *_buffer /**< */,
+ uint32_t fence_list_len /**< */);
+
+/**
+ *
+ * @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_sync_await_fence_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param uint32_t fence_list_len
+ ** @param const xcb_sync_fence_t *fence_list
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_sync_await_fence_checked (xcb_connection_t *c /**< */,
+ uint32_t fence_list_len /**< */,
+ const xcb_sync_fence_t *fence_list /**< */);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_sync_await_fence
+ **
+ ** @param xcb_connection_t *c
+ ** @param uint32_t fence_list_len
+ ** @param const xcb_sync_fence_t *fence_list
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_sync_await_fence (xcb_connection_t *c /**< */,
+ uint32_t fence_list_len /**< */,
+ const xcb_sync_fence_t *fence_list /**< */);
+
#ifdef __cplusplus
}
diff --git a/src/3rdparty/xcb/include/xcb/xfixes.h b/src/3rdparty/xcb/include/xcb/xfixes.h
index 4d7eb0900a..b67aa85135 100644
--- a/src/3rdparty/xcb/include/xcb/xfixes.h
+++ b/src/3rdparty/xcb/include/xcb/xfixes.h
@@ -683,7 +683,7 @@ typedef struct xcb_xfixes_show_cursor_request_t {
} xcb_xfixes_show_cursor_request_t;
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -708,7 +708,7 @@ xcb_xfixes_query_version (xcb_connection_t *c /**< */,
uint32_t client_minor_version /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -767,7 +767,7 @@ xcb_xfixes_query_version_reply (xcb_connection_t *c /**< */,
xcb_generic_error_t **e /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -799,7 +799,7 @@ xcb_xfixes_change_save_set_checked (xcb_connection_t *c /**< */,
xcb_window_t window /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -828,7 +828,7 @@ xcb_xfixes_change_save_set (xcb_connection_t *c /**< */,
xcb_window_t window /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -858,7 +858,7 @@ xcb_xfixes_select_selection_input_checked (xcb_connection_t *c /**< */,
uint32_t event_mask /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -885,7 +885,7 @@ xcb_xfixes_select_selection_input (xcb_connection_t *c /**< */,
uint32_t event_mask /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -913,7 +913,7 @@ xcb_xfixes_select_cursor_input_checked (xcb_connection_t *c /**< */,
uint32_t event_mask /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -937,8 +937,11 @@ xcb_xfixes_select_cursor_input (xcb_connection_t *c /**< */,
xcb_window_t window /**< */,
uint32_t event_mask /**< */);
+int
+xcb_xfixes_get_cursor_image_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -959,7 +962,7 @@ xcb_xfixes_get_cursor_image_cookie_t
xcb_xfixes_get_cursor_image (xcb_connection_t *c /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1095,8 +1098,12 @@ xcb_xfixes_region_next (xcb_xfixes_region_iterator_t *i /**< */);
xcb_generic_iterator_t
xcb_xfixes_region_end (xcb_xfixes_region_iterator_t i /**< */);
+int
+xcb_xfixes_create_region_sizeof (const void *_buffer /**< */,
+ uint32_t rectangles_len /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1126,7 +1133,7 @@ xcb_xfixes_create_region_checked (xcb_connection_t *c /**< */,
const xcb_rectangle_t *rectangles /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1153,7 +1160,7 @@ xcb_xfixes_create_region (xcb_connection_t *c /**< */,
const xcb_rectangle_t *rectangles /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1181,7 +1188,7 @@ xcb_xfixes_create_region_from_bitmap_checked (xcb_connection_t *c /**< */,
xcb_pixmap_t bitmap /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1206,7 +1213,7 @@ xcb_xfixes_create_region_from_bitmap (xcb_connection_t *c /**< */,
xcb_pixmap_t bitmap /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1236,7 +1243,7 @@ xcb_xfixes_create_region_from_window_checked (xcb_connection_t *c /**< */,
xcb_shape_kind_t kind /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1263,7 +1270,7 @@ xcb_xfixes_create_region_from_window (xcb_connection_t *c /**< */,
xcb_shape_kind_t kind /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1291,7 +1298,7 @@ xcb_xfixes_create_region_from_gc_checked (xcb_connection_t *c /**< */,
xcb_gcontext_t gc /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1316,7 +1323,7 @@ xcb_xfixes_create_region_from_gc (xcb_connection_t *c /**< */,
xcb_gcontext_t gc /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1344,7 +1351,7 @@ xcb_xfixes_create_region_from_picture_checked (xcb_connection_t *c /**< */,
xcb_render_picture_t picture /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1369,7 +1376,7 @@ xcb_xfixes_create_region_from_picture (xcb_connection_t *c /**< */,
xcb_render_picture_t picture /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1395,7 +1402,7 @@ xcb_xfixes_destroy_region_checked (xcb_connection_t *c /**< */,
xcb_xfixes_region_t region /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1417,8 +1424,12 @@ xcb_void_cookie_t
xcb_xfixes_destroy_region (xcb_connection_t *c /**< */,
xcb_xfixes_region_t region /**< */);
+int
+xcb_xfixes_set_region_sizeof (const void *_buffer /**< */,
+ uint32_t rectangles_len /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1448,7 +1459,7 @@ xcb_xfixes_set_region_checked (xcb_connection_t *c /**< */,
const xcb_rectangle_t *rectangles /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1475,7 +1486,7 @@ xcb_xfixes_set_region (xcb_connection_t *c /**< */,
const xcb_rectangle_t *rectangles /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1503,7 +1514,7 @@ xcb_xfixes_copy_region_checked (xcb_connection_t *c /**< */,
xcb_xfixes_region_t destination /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1528,7 +1539,7 @@ xcb_xfixes_copy_region (xcb_connection_t *c /**< */,
xcb_xfixes_region_t destination /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1558,7 +1569,7 @@ xcb_xfixes_union_region_checked (xcb_connection_t *c /**< */,
xcb_xfixes_region_t destination /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1585,7 +1596,7 @@ xcb_xfixes_union_region (xcb_connection_t *c /**< */,
xcb_xfixes_region_t destination /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1615,7 +1626,7 @@ xcb_xfixes_intersect_region_checked (xcb_connection_t *c /**< */,
xcb_xfixes_region_t destination /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1642,7 +1653,7 @@ xcb_xfixes_intersect_region (xcb_connection_t *c /**< */,
xcb_xfixes_region_t destination /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1672,7 +1683,7 @@ xcb_xfixes_subtract_region_checked (xcb_connection_t *c /**< */,
xcb_xfixes_region_t destination /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1699,7 +1710,7 @@ xcb_xfixes_subtract_region (xcb_connection_t *c /**< */,
xcb_xfixes_region_t destination /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1729,7 +1740,7 @@ xcb_xfixes_invert_region_checked (xcb_connection_t *c /**< */,
xcb_xfixes_region_t destination /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1756,7 +1767,7 @@ xcb_xfixes_invert_region (xcb_connection_t *c /**< */,
xcb_xfixes_region_t destination /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1786,7 +1797,7 @@ xcb_xfixes_translate_region_checked (xcb_connection_t *c /**< */,
int16_t dy /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1813,7 +1824,7 @@ xcb_xfixes_translate_region (xcb_connection_t *c /**< */,
int16_t dy /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1841,7 +1852,7 @@ xcb_xfixes_region_extents_checked (xcb_connection_t *c /**< */,
xcb_xfixes_region_t destination /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1865,8 +1876,11 @@ xcb_xfixes_region_extents (xcb_connection_t *c /**< */,
xcb_xfixes_region_t source /**< */,
xcb_xfixes_region_t destination /**< */);
+int
+xcb_xfixes_fetch_region_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1889,7 +1903,7 @@ xcb_xfixes_fetch_region (xcb_connection_t *c /**< */,
xcb_xfixes_region_t region /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -1985,7 +1999,7 @@ xcb_xfixes_fetch_region_reply (xcb_connection_t *c /**< */,
xcb_generic_error_t **e /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2017,7 +2031,7 @@ xcb_xfixes_set_gc_clip_region_checked (xcb_connection_t *c /**< */,
int16_t y_origin /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2046,7 +2060,7 @@ xcb_xfixes_set_gc_clip_region (xcb_connection_t *c /**< */,
int16_t y_origin /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2080,7 +2094,7 @@ xcb_xfixes_set_window_shape_region_checked (xcb_connection_t *c /**< */,
xcb_xfixes_region_t region /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2111,7 +2125,7 @@ xcb_xfixes_set_window_shape_region (xcb_connection_t *c /**< */,
xcb_xfixes_region_t region /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2143,7 +2157,7 @@ xcb_xfixes_set_picture_clip_region_checked (xcb_connection_t *c /**< */,
int16_t y_origin /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2171,8 +2185,11 @@ xcb_xfixes_set_picture_clip_region (xcb_connection_t *c /**< */,
int16_t x_origin /**< */,
int16_t y_origin /**< */);
+int
+xcb_xfixes_set_cursor_name_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2202,7 +2219,7 @@ xcb_xfixes_set_cursor_name_checked (xcb_connection_t *c /**< */,
const char *name /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2228,8 +2245,11 @@ xcb_xfixes_set_cursor_name (xcb_connection_t *c /**< */,
uint16_t nbytes /**< */,
const char *name /**< */);
+int
+xcb_xfixes_get_cursor_name_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2252,7 +2272,7 @@ xcb_xfixes_get_cursor_name (xcb_connection_t *c /**< */,
xcb_cursor_t cursor /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2347,8 +2367,11 @@ xcb_xfixes_get_cursor_name_reply (xcb_connection_t *c /**<
xcb_xfixes_get_cursor_name_cookie_t cookie /**< */,
xcb_generic_error_t **e /**< */);
+int
+xcb_xfixes_get_cursor_image_and_name_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2369,7 +2392,7 @@ xcb_xfixes_get_cursor_image_and_name_cookie_t
xcb_xfixes_get_cursor_image_and_name (xcb_connection_t *c /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2502,7 +2525,7 @@ xcb_xfixes_get_cursor_image_and_name_reply (xcb_connection_t
xcb_generic_error_t **e /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2530,7 +2553,7 @@ xcb_xfixes_change_cursor_checked (xcb_connection_t *c /**< */,
xcb_cursor_t destination /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2554,8 +2577,11 @@ xcb_xfixes_change_cursor (xcb_connection_t *c /**< */,
xcb_cursor_t source /**< */,
xcb_cursor_t destination /**< */);
+int
+xcb_xfixes_change_cursor_by_name_sizeof (const void *_buffer /**< */);
+
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2585,7 +2611,7 @@ xcb_xfixes_change_cursor_by_name_checked (xcb_connection_t *c /**< */,
const char *name /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2612,7 +2638,7 @@ xcb_xfixes_change_cursor_by_name (xcb_connection_t *c /**< */,
const char *name /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2648,7 +2674,7 @@ xcb_xfixes_expand_region_checked (xcb_connection_t *c /**< */,
uint16_t bottom /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2681,7 +2707,7 @@ xcb_xfixes_expand_region (xcb_connection_t *c /**< */,
uint16_t bottom /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2707,7 +2733,7 @@ xcb_xfixes_hide_cursor_checked (xcb_connection_t *c /**< */,
xcb_window_t window /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2730,7 +2756,7 @@ xcb_xfixes_hide_cursor (xcb_connection_t *c /**< */,
xcb_window_t window /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -2756,7 +2782,7 @@ xcb_xfixes_show_cursor_checked (xcb_connection_t *c /**< */,
xcb_window_t window /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
diff --git a/src/3rdparty/xcb/include/xcb/xinerama.h b/src/3rdparty/xcb/include/xcb/xinerama.h
index 74da5458d2..f18a96c791 100644
--- a/src/3rdparty/xcb/include/xcb/xinerama.h
+++ b/src/3rdparty/xcb/include/xcb/xinerama.h
@@ -21,7 +21,7 @@ extern "C" {
#define XCB_XINERAMA_MAJOR_VERSION 1
#define XCB_XINERAMA_MINOR_VERSION 1
-
+
extern xcb_extension_t xcb_xinerama_id;
/**
@@ -246,12 +246,12 @@ typedef struct xcb_xinerama_query_screens_reply_t {
/*****************************************************************************
**
** void xcb_xinerama_screen_info_next
- **
+ **
** @param xcb_xinerama_screen_info_iterator_t *i
** @returns void
**
*****************************************************************************/
-
+
void
xcb_xinerama_screen_info_next (xcb_xinerama_screen_info_iterator_t *i /**< */);
@@ -268,47 +268,47 @@ xcb_xinerama_screen_info_next (xcb_xinerama_screen_info_iterator_t *i /**< */);
/*****************************************************************************
**
** xcb_generic_iterator_t xcb_xinerama_screen_info_end
- **
+ **
** @param xcb_xinerama_screen_info_iterator_t i
** @returns xcb_generic_iterator_t
**
*****************************************************************************/
-
+
xcb_generic_iterator_t
xcb_xinerama_screen_info_end (xcb_xinerama_screen_info_iterator_t i /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
* Delivers a request to the X server.
- *
+ *
*/
/*****************************************************************************
**
** xcb_xinerama_query_version_cookie_t xcb_xinerama_query_version
- **
+ **
** @param xcb_connection_t *c
** @param uint8_t major
** @param uint8_t minor
** @returns xcb_xinerama_query_version_cookie_t
**
*****************************************************************************/
-
+
xcb_xinerama_query_version_cookie_t
xcb_xinerama_query_version (xcb_connection_t *c /**< */,
uint8_t major /**< */,
uint8_t minor /**< */);
/**
- * 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.
@@ -317,14 +317,14 @@ xcb_xinerama_query_version (xcb_connection_t *c /**< */,
/*****************************************************************************
**
** xcb_xinerama_query_version_cookie_t xcb_xinerama_query_version_unchecked
- **
+ **
** @param xcb_connection_t *c
** @param uint8_t major
** @param uint8_t minor
** @returns xcb_xinerama_query_version_cookie_t
**
*****************************************************************************/
-
+
xcb_xinerama_query_version_cookie_t
xcb_xinerama_query_version_unchecked (xcb_connection_t *c /**< */,
uint8_t major /**< */,
@@ -337,7 +337,7 @@ xcb_xinerama_query_version_unchecked (xcb_connection_t *c /**< */,
* @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_xinerama_query_version_unchecked(). is used.
* Otherwise, it stores the error if any.
@@ -348,49 +348,49 @@ xcb_xinerama_query_version_unchecked (xcb_connection_t *c /**< */,
/*****************************************************************************
**
** xcb_xinerama_query_version_reply_t * xcb_xinerama_query_version_reply
- **
+ **
** @param xcb_connection_t *c
** @param xcb_xinerama_query_version_cookie_t cookie
** @param xcb_generic_error_t **e
** @returns xcb_xinerama_query_version_reply_t *
**
*****************************************************************************/
-
+
xcb_xinerama_query_version_reply_t *
xcb_xinerama_query_version_reply (xcb_connection_t *c /**< */,
xcb_xinerama_query_version_cookie_t cookie /**< */,
xcb_generic_error_t **e /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
* Delivers a request to the X server.
- *
+ *
*/
/*****************************************************************************
**
** xcb_xinerama_get_state_cookie_t xcb_xinerama_get_state
- **
+ **
** @param xcb_connection_t *c
** @param xcb_window_t window
** @returns xcb_xinerama_get_state_cookie_t
**
*****************************************************************************/
-
+
xcb_xinerama_get_state_cookie_t
xcb_xinerama_get_state (xcb_connection_t *c /**< */,
xcb_window_t window /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
* Delivers a request to the X server.
- *
+ *
* 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.
@@ -399,13 +399,13 @@ xcb_xinerama_get_state (xcb_connection_t *c /**< */,
/*****************************************************************************
**
** xcb_xinerama_get_state_cookie_t xcb_xinerama_get_state_unchecked
- **
+ **
** @param xcb_connection_t *c
** @param xcb_window_t window
** @returns xcb_xinerama_get_state_cookie_t
**
*****************************************************************************/
-
+
xcb_xinerama_get_state_cookie_t
xcb_xinerama_get_state_unchecked (xcb_connection_t *c /**< */,
xcb_window_t window /**< */);
@@ -417,7 +417,7 @@ xcb_xinerama_get_state_unchecked (xcb_connection_t *c /**< */,
* @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_xinerama_get_state_unchecked(). is used.
* Otherwise, it stores the error if any.
@@ -428,49 +428,49 @@ xcb_xinerama_get_state_unchecked (xcb_connection_t *c /**< */,
/*****************************************************************************
**
** xcb_xinerama_get_state_reply_t * xcb_xinerama_get_state_reply
- **
+ **
** @param xcb_connection_t *c
** @param xcb_xinerama_get_state_cookie_t cookie
** @param xcb_generic_error_t **e
** @returns xcb_xinerama_get_state_reply_t *
**
*****************************************************************************/
-
+
xcb_xinerama_get_state_reply_t *
xcb_xinerama_get_state_reply (xcb_connection_t *c /**< */,
xcb_xinerama_get_state_cookie_t cookie /**< */,
xcb_generic_error_t **e /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
* Delivers a request to the X server.
- *
+ *
*/
/*****************************************************************************
**
** xcb_xinerama_get_screen_count_cookie_t xcb_xinerama_get_screen_count
- **
+ **
** @param xcb_connection_t *c
** @param xcb_window_t window
** @returns xcb_xinerama_get_screen_count_cookie_t
**
*****************************************************************************/
-
+
xcb_xinerama_get_screen_count_cookie_t
xcb_xinerama_get_screen_count (xcb_connection_t *c /**< */,
xcb_window_t window /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
* Delivers a request to the X server.
- *
+ *
* 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.
@@ -479,13 +479,13 @@ xcb_xinerama_get_screen_count (xcb_connection_t *c /**< */,
/*****************************************************************************
**
** xcb_xinerama_get_screen_count_cookie_t xcb_xinerama_get_screen_count_unchecked
- **
+ **
** @param xcb_connection_t *c
** @param xcb_window_t window
** @returns xcb_xinerama_get_screen_count_cookie_t
**
*****************************************************************************/
-
+
xcb_xinerama_get_screen_count_cookie_t
xcb_xinerama_get_screen_count_unchecked (xcb_connection_t *c /**< */,
xcb_window_t window /**< */);
@@ -497,7 +497,7 @@ xcb_xinerama_get_screen_count_unchecked (xcb_connection_t *c /**< */,
* @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_xinerama_get_screen_count_unchecked(). is used.
* Otherwise, it stores the error if any.
@@ -508,51 +508,51 @@ xcb_xinerama_get_screen_count_unchecked (xcb_connection_t *c /**< */,
/*****************************************************************************
**
** xcb_xinerama_get_screen_count_reply_t * xcb_xinerama_get_screen_count_reply
- **
+ **
** @param xcb_connection_t *c
** @param xcb_xinerama_get_screen_count_cookie_t cookie
** @param xcb_generic_error_t **e
** @returns xcb_xinerama_get_screen_count_reply_t *
**
*****************************************************************************/
-
+
xcb_xinerama_get_screen_count_reply_t *
xcb_xinerama_get_screen_count_reply (xcb_connection_t *c /**< */,
xcb_xinerama_get_screen_count_cookie_t cookie /**< */,
xcb_generic_error_t **e /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
* Delivers a request to the X server.
- *
+ *
*/
/*****************************************************************************
**
** xcb_xinerama_get_screen_size_cookie_t xcb_xinerama_get_screen_size
- **
+ **
** @param xcb_connection_t *c
** @param xcb_window_t window
** @param uint32_t screen
** @returns xcb_xinerama_get_screen_size_cookie_t
**
*****************************************************************************/
-
+
xcb_xinerama_get_screen_size_cookie_t
xcb_xinerama_get_screen_size (xcb_connection_t *c /**< */,
xcb_window_t window /**< */,
uint32_t screen /**< */);
/**
- * 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.
@@ -561,14 +561,14 @@ xcb_xinerama_get_screen_size (xcb_connection_t *c /**< */,
/*****************************************************************************
**
** xcb_xinerama_get_screen_size_cookie_t xcb_xinerama_get_screen_size_unchecked
- **
+ **
** @param xcb_connection_t *c
** @param xcb_window_t window
** @param uint32_t screen
** @returns xcb_xinerama_get_screen_size_cookie_t
**
*****************************************************************************/
-
+
xcb_xinerama_get_screen_size_cookie_t
xcb_xinerama_get_screen_size_unchecked (xcb_connection_t *c /**< */,
xcb_window_t window /**< */,
@@ -581,7 +581,7 @@ xcb_xinerama_get_screen_size_unchecked (xcb_connection_t *c /**< */,
* @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_xinerama_get_screen_size_unchecked(). is used.
* Otherwise, it stores the error if any.
@@ -592,47 +592,47 @@ xcb_xinerama_get_screen_size_unchecked (xcb_connection_t *c /**< */,
/*****************************************************************************
**
** xcb_xinerama_get_screen_size_reply_t * xcb_xinerama_get_screen_size_reply
- **
+ **
** @param xcb_connection_t *c
** @param xcb_xinerama_get_screen_size_cookie_t cookie
** @param xcb_generic_error_t **e
** @returns xcb_xinerama_get_screen_size_reply_t *
**
*****************************************************************************/
-
+
xcb_xinerama_get_screen_size_reply_t *
xcb_xinerama_get_screen_size_reply (xcb_connection_t *c /**< */,
xcb_xinerama_get_screen_size_cookie_t cookie /**< */,
xcb_generic_error_t **e /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
* Delivers a request to the X server.
- *
+ *
*/
/*****************************************************************************
**
** xcb_xinerama_is_active_cookie_t xcb_xinerama_is_active
- **
+ **
** @param xcb_connection_t *c
** @returns xcb_xinerama_is_active_cookie_t
**
*****************************************************************************/
-
+
xcb_xinerama_is_active_cookie_t
xcb_xinerama_is_active (xcb_connection_t *c /**< */);
/**
- * 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.
@@ -641,12 +641,12 @@ xcb_xinerama_is_active (xcb_connection_t *c /**< */);
/*****************************************************************************
**
** xcb_xinerama_is_active_cookie_t xcb_xinerama_is_active_unchecked
- **
+ **
** @param xcb_connection_t *c
** @returns xcb_xinerama_is_active_cookie_t
**
*****************************************************************************/
-
+
xcb_xinerama_is_active_cookie_t
xcb_xinerama_is_active_unchecked (xcb_connection_t *c /**< */);
@@ -657,7 +657,7 @@ xcb_xinerama_is_active_unchecked (xcb_connection_t *c /**< */);
* @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_xinerama_is_active_unchecked(). is used.
* Otherwise, it stores the error if any.
@@ -668,47 +668,50 @@ xcb_xinerama_is_active_unchecked (xcb_connection_t *c /**< */);
/*****************************************************************************
**
** xcb_xinerama_is_active_reply_t * xcb_xinerama_is_active_reply
- **
+ **
** @param xcb_connection_t *c
** @param xcb_xinerama_is_active_cookie_t cookie
** @param xcb_generic_error_t **e
** @returns xcb_xinerama_is_active_reply_t *
**
*****************************************************************************/
-
+
xcb_xinerama_is_active_reply_t *
xcb_xinerama_is_active_reply (xcb_connection_t *c /**< */,
xcb_xinerama_is_active_cookie_t cookie /**< */,
xcb_generic_error_t **e /**< */);
+int
+xcb_xinerama_query_screens_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_xinerama_query_screens_cookie_t xcb_xinerama_query_screens
- **
+ **
** @param xcb_connection_t *c
** @returns xcb_xinerama_query_screens_cookie_t
**
*****************************************************************************/
-
+
xcb_xinerama_query_screens_cookie_t
xcb_xinerama_query_screens (xcb_connection_t *c /**< */);
/**
- * 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.
@@ -717,12 +720,12 @@ xcb_xinerama_query_screens (xcb_connection_t *c /**< */);
/*****************************************************************************
**
** xcb_xinerama_query_screens_cookie_t xcb_xinerama_query_screens_unchecked
- **
+ **
** @param xcb_connection_t *c
** @returns xcb_xinerama_query_screens_cookie_t
**
*****************************************************************************/
-
+
xcb_xinerama_query_screens_cookie_t
xcb_xinerama_query_screens_unchecked (xcb_connection_t *c /**< */);
@@ -730,12 +733,12 @@ xcb_xinerama_query_screens_unchecked (xcb_connection_t *c /**< */);
/*****************************************************************************
**
** xcb_xinerama_screen_info_t * xcb_xinerama_query_screens_screen_info
- **
+ **
** @param const xcb_xinerama_query_screens_reply_t *R
** @returns xcb_xinerama_screen_info_t *
**
*****************************************************************************/
-
+
xcb_xinerama_screen_info_t *
xcb_xinerama_query_screens_screen_info (const xcb_xinerama_query_screens_reply_t *R /**< */);
@@ -743,12 +746,12 @@ xcb_xinerama_query_screens_screen_info (const xcb_xinerama_query_screens_reply_t
/*****************************************************************************
**
** int xcb_xinerama_query_screens_screen_info_length
- **
+ **
** @param const xcb_xinerama_query_screens_reply_t *R
** @returns int
**
*****************************************************************************/
-
+
int
xcb_xinerama_query_screens_screen_info_length (const xcb_xinerama_query_screens_reply_t *R /**< */);
@@ -756,12 +759,12 @@ xcb_xinerama_query_screens_screen_info_length (const xcb_xinerama_query_screens_
/*****************************************************************************
**
** xcb_xinerama_screen_info_iterator_t xcb_xinerama_query_screens_screen_info_iterator
- **
+ **
** @param const xcb_xinerama_query_screens_reply_t *R
** @returns xcb_xinerama_screen_info_iterator_t
**
*****************************************************************************/
-
+
xcb_xinerama_screen_info_iterator_t
xcb_xinerama_query_screens_screen_info_iterator (const xcb_xinerama_query_screens_reply_t *R /**< */);
@@ -772,7 +775,7 @@ xcb_xinerama_query_screens_screen_info_iterator (const xcb_xinerama_query_screen
* @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_xinerama_query_screens_unchecked(). is used.
* Otherwise, it stores the error if any.
@@ -783,14 +786,14 @@ xcb_xinerama_query_screens_screen_info_iterator (const xcb_xinerama_query_screen
/*****************************************************************************
**
** xcb_xinerama_query_screens_reply_t * xcb_xinerama_query_screens_reply
- **
+ **
** @param xcb_connection_t *c
** @param xcb_xinerama_query_screens_cookie_t cookie
** @param xcb_generic_error_t **e
** @returns xcb_xinerama_query_screens_reply_t *
**
*****************************************************************************/
-
+
xcb_xinerama_query_screens_reply_t *
xcb_xinerama_query_screens_reply (xcb_connection_t *c /**< */,
xcb_xinerama_query_screens_cookie_t cookie /**< */,
diff --git a/src/3rdparty/xcb/include/xcb/xinput.h b/src/3rdparty/xcb/include/xcb/xinput.h
new file mode 100644
index 0000000000..9420047c71
--- /dev/null
+++ b/src/3rdparty/xcb/include/xcb/xinput.h
@@ -0,0 +1,9306 @@
+/*
+ * This file generated automatically from xinput.xml by c_client.py.
+ * Edit at your peril.
+ */
+
+/**
+ * @defgroup XCB_Input_API XCB Input API
+ * @brief Input XCB Protocol Implementation.
+ * @{
+ **/
+
+#ifndef __XINPUT_H
+#define __XINPUT_H
+
+#include "xcb.h"
+#include "xfixes.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define XCB_INPUT_MAJOR_VERSION 2
+#define XCB_INPUT_MINOR_VERSION 3
+
+extern xcb_extension_t xcb_input_id;
+
+typedef uint32_t xcb_input_event_class_t;
+
+/**
+ * @brief xcb_input_event_class_iterator_t
+ **/
+typedef struct xcb_input_event_class_iterator_t {
+ xcb_input_event_class_t *data;
+ int rem;
+ int index;
+} xcb_input_event_class_iterator_t;
+
+typedef uint8_t xcb_input_key_code_t;
+
+/**
+ * @brief xcb_input_key_code_iterator_t
+ **/
+typedef struct xcb_input_key_code_iterator_t {
+ xcb_input_key_code_t *data;
+ int rem;
+ int index;
+} xcb_input_key_code_iterator_t;
+
+typedef uint16_t xcb_input_device_id_t;
+
+/**
+ * @brief xcb_input_device_id_iterator_t
+ **/
+typedef struct xcb_input_device_id_iterator_t {
+ xcb_input_device_id_t *data;
+ int rem;
+ int index;
+} xcb_input_device_id_iterator_t;
+
+typedef int32_t xcb_input_fp1616_t;
+
+/**
+ * @brief xcb_input_fp1616_iterator_t
+ **/
+typedef struct xcb_input_fp1616_iterator_t {
+ xcb_input_fp1616_t *data;
+ int rem;
+ int index;
+} xcb_input_fp1616_iterator_t;
+
+/**
+ * @brief xcb_input_fp3232_t
+ **/
+typedef struct xcb_input_fp3232_t {
+ int32_t integral;
+ uint32_t frac;
+} xcb_input_fp3232_t;
+
+/**
+ * @brief xcb_input_fp3232_iterator_t
+ **/
+typedef struct xcb_input_fp3232_iterator_t {
+ xcb_input_fp3232_t *data;
+ int rem;
+ int index;
+} xcb_input_fp3232_iterator_t;
+
+/**
+ * @brief xcb_input_get_extension_version_cookie_t
+ **/
+typedef struct xcb_input_get_extension_version_cookie_t {
+ unsigned int sequence;
+} xcb_input_get_extension_version_cookie_t;
+
+/** Opcode for xcb_input_get_extension_version. */
+#define XCB_INPUT_GET_EXTENSION_VERSION 1
+
+/**
+ * @brief xcb_input_get_extension_version_request_t
+ **/
+typedef struct xcb_input_get_extension_version_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ uint16_t name_len;
+ uint8_t pad0[2];
+} xcb_input_get_extension_version_request_t;
+
+/**
+ * @brief xcb_input_get_extension_version_reply_t
+ **/
+typedef struct xcb_input_get_extension_version_reply_t {
+ uint8_t response_type;
+ uint8_t xi_reply_type;
+ uint16_t sequence;
+ uint32_t length;
+ uint16_t server_major;
+ uint16_t server_minor;
+ uint8_t present;
+ uint8_t pad0[19];
+} xcb_input_get_extension_version_reply_t;
+
+typedef enum xcb_input_device_use_t {
+ XCB_INPUT_DEVICE_USE_IS_X_POINTER = 0,
+ XCB_INPUT_DEVICE_USE_IS_X_KEYBOARD = 1,
+ XCB_INPUT_DEVICE_USE_IS_X_EXTENSION_DEVICE = 2,
+ XCB_INPUT_DEVICE_USE_IS_X_EXTENSION_KEYBOARD = 3,
+ XCB_INPUT_DEVICE_USE_IS_X_EXTENSION_POINTER = 4
+} xcb_input_device_use_t;
+
+typedef enum xcb_input_input_class_t {
+ XCB_INPUT_INPUT_CLASS_KEY = 0,
+ XCB_INPUT_INPUT_CLASS_BUTTON = 1,
+ XCB_INPUT_INPUT_CLASS_VALUATOR = 2,
+ XCB_INPUT_INPUT_CLASS_FEEDBACK = 3,
+ XCB_INPUT_INPUT_CLASS_PROXIMITY = 4,
+ XCB_INPUT_INPUT_CLASS_FOCUS = 5,
+ XCB_INPUT_INPUT_CLASS_OTHER = 6
+} xcb_input_input_class_t;
+
+typedef enum xcb_input_valuator_mode_t {
+ XCB_INPUT_VALUATOR_MODE_RELATIVE = 0,
+ XCB_INPUT_VALUATOR_MODE_ABSOLUTE = 1
+} xcb_input_valuator_mode_t;
+
+/**
+ * @brief xcb_input_device_info_t
+ **/
+typedef struct xcb_input_device_info_t {
+ xcb_atom_t device_type;
+ uint8_t device_id;
+ uint8_t num_class_info;
+ uint8_t device_use;
+ uint8_t pad0;
+} xcb_input_device_info_t;
+
+/**
+ * @brief xcb_input_device_info_iterator_t
+ **/
+typedef struct xcb_input_device_info_iterator_t {
+ xcb_input_device_info_t *data;
+ int rem;
+ int index;
+} xcb_input_device_info_iterator_t;
+
+/**
+ * @brief xcb_input_key_info_t
+ **/
+typedef struct xcb_input_key_info_t {
+ uint8_t class_id;
+ uint8_t len;
+ xcb_input_key_code_t min_keycode;
+ xcb_input_key_code_t max_keycode;
+ uint16_t num_keys;
+ uint8_t pad0[2];
+} xcb_input_key_info_t;
+
+/**
+ * @brief xcb_input_key_info_iterator_t
+ **/
+typedef struct xcb_input_key_info_iterator_t {
+ xcb_input_key_info_t *data;
+ int rem;
+ int index;
+} xcb_input_key_info_iterator_t;
+
+/**
+ * @brief xcb_input_button_info_t
+ **/
+typedef struct xcb_input_button_info_t {
+ uint8_t class_id;
+ uint8_t len;
+ uint16_t num_buttons;
+} xcb_input_button_info_t;
+
+/**
+ * @brief xcb_input_button_info_iterator_t
+ **/
+typedef struct xcb_input_button_info_iterator_t {
+ xcb_input_button_info_t *data;
+ int rem;
+ int index;
+} xcb_input_button_info_iterator_t;
+
+/**
+ * @brief xcb_input_axis_info_t
+ **/
+typedef struct xcb_input_axis_info_t {
+ uint32_t resolution;
+ int32_t minimum;
+ int32_t maximum;
+} xcb_input_axis_info_t;
+
+/**
+ * @brief xcb_input_axis_info_iterator_t
+ **/
+typedef struct xcb_input_axis_info_iterator_t {
+ xcb_input_axis_info_t *data;
+ int rem;
+ int index;
+} xcb_input_axis_info_iterator_t;
+
+/**
+ * @brief xcb_input_valuator_info_t
+ **/
+typedef struct xcb_input_valuator_info_t {
+ uint8_t class_id;
+ uint8_t len;
+ uint8_t axes_len;
+ uint8_t mode;
+ uint32_t motion_size;
+} xcb_input_valuator_info_t;
+
+/**
+ * @brief xcb_input_valuator_info_iterator_t
+ **/
+typedef struct xcb_input_valuator_info_iterator_t {
+ xcb_input_valuator_info_t *data;
+ int rem;
+ int index;
+} xcb_input_valuator_info_iterator_t;
+
+/**
+ * @brief xcb_input_input_info_info_t
+ **/
+typedef struct xcb_input_input_info_info_t {
+ struct {
+ xcb_input_key_code_t min_keycode;
+ xcb_input_key_code_t max_keycode;
+ uint16_t num_keys;
+ uint8_t pad0[2];
+ } key;
+ struct {
+ uint16_t num_buttons;
+ } button;
+ struct {
+ uint8_t axes_len;
+ uint8_t mode;
+ uint32_t motion_size;
+ xcb_input_axis_info_t *axes;
+ } valuator;
+} xcb_input_input_info_info_t;
+
+/**
+ * @brief xcb_input_input_info_t
+ **/
+typedef struct xcb_input_input_info_t {
+ uint8_t class_id;
+ uint8_t len;
+} xcb_input_input_info_t;
+
+void *
+xcb_input_input_info_info (const xcb_input_input_info_t *R);
+
+/**
+ * @brief xcb_input_input_info_iterator_t
+ **/
+typedef struct xcb_input_input_info_iterator_t {
+ xcb_input_input_info_t *data;
+ int rem;
+ int index;
+} xcb_input_input_info_iterator_t;
+
+/**
+ * @brief xcb_input_device_name_t
+ **/
+typedef struct xcb_input_device_name_t {
+ uint8_t len;
+} xcb_input_device_name_t;
+
+/**
+ * @brief xcb_input_device_name_iterator_t
+ **/
+typedef struct xcb_input_device_name_iterator_t {
+ xcb_input_device_name_t *data;
+ int rem;
+ int index;
+} xcb_input_device_name_iterator_t;
+
+/**
+ * @brief xcb_input_list_input_devices_cookie_t
+ **/
+typedef struct xcb_input_list_input_devices_cookie_t {
+ unsigned int sequence;
+} xcb_input_list_input_devices_cookie_t;
+
+/** Opcode for xcb_input_list_input_devices. */
+#define XCB_INPUT_LIST_INPUT_DEVICES 2
+
+/**
+ * @brief xcb_input_list_input_devices_request_t
+ **/
+typedef struct xcb_input_list_input_devices_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+} xcb_input_list_input_devices_request_t;
+
+/**
+ * @brief xcb_input_list_input_devices_reply_t
+ **/
+typedef struct xcb_input_list_input_devices_reply_t {
+ uint8_t response_type;
+ uint8_t xi_reply_type;
+ uint16_t sequence;
+ uint32_t length;
+ uint8_t devices_len;
+ uint8_t pad0[23];
+} xcb_input_list_input_devices_reply_t;
+
+typedef uint8_t xcb_input_event_type_base_t;
+
+/**
+ * @brief xcb_input_event_type_base_iterator_t
+ **/
+typedef struct xcb_input_event_type_base_iterator_t {
+ xcb_input_event_type_base_t *data;
+ int rem;
+ int index;
+} xcb_input_event_type_base_iterator_t;
+
+/**
+ * @brief xcb_input_input_class_info_t
+ **/
+typedef struct xcb_input_input_class_info_t {
+ uint8_t class_id;
+ xcb_input_event_type_base_t event_type_base;
+} xcb_input_input_class_info_t;
+
+/**
+ * @brief xcb_input_input_class_info_iterator_t
+ **/
+typedef struct xcb_input_input_class_info_iterator_t {
+ xcb_input_input_class_info_t *data;
+ int rem;
+ int index;
+} xcb_input_input_class_info_iterator_t;
+
+/**
+ * @brief xcb_input_open_device_cookie_t
+ **/
+typedef struct xcb_input_open_device_cookie_t {
+ unsigned int sequence;
+} xcb_input_open_device_cookie_t;
+
+/** Opcode for xcb_input_open_device. */
+#define XCB_INPUT_OPEN_DEVICE 3
+
+/**
+ * @brief xcb_input_open_device_request_t
+ **/
+typedef struct xcb_input_open_device_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ uint8_t device_id;
+ uint8_t pad0[3];
+} xcb_input_open_device_request_t;
+
+/**
+ * @brief xcb_input_open_device_reply_t
+ **/
+typedef struct xcb_input_open_device_reply_t {
+ uint8_t response_type;
+ uint8_t xi_reply_type;
+ uint16_t sequence;
+ uint32_t length;
+ uint8_t num_classes;
+ uint8_t pad0[23];
+} xcb_input_open_device_reply_t;
+
+/** Opcode for xcb_input_close_device. */
+#define XCB_INPUT_CLOSE_DEVICE 4
+
+/**
+ * @brief xcb_input_close_device_request_t
+ **/
+typedef struct xcb_input_close_device_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ uint8_t device_id;
+ uint8_t pad0[3];
+} xcb_input_close_device_request_t;
+
+/**
+ * @brief xcb_input_set_device_mode_cookie_t
+ **/
+typedef struct xcb_input_set_device_mode_cookie_t {
+ unsigned int sequence;
+} xcb_input_set_device_mode_cookie_t;
+
+/** Opcode for xcb_input_set_device_mode. */
+#define XCB_INPUT_SET_DEVICE_MODE 5
+
+/**
+ * @brief xcb_input_set_device_mode_request_t
+ **/
+typedef struct xcb_input_set_device_mode_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ uint8_t device_id;
+ uint8_t mode;
+ uint8_t pad0[2];
+} xcb_input_set_device_mode_request_t;
+
+/**
+ * @brief xcb_input_set_device_mode_reply_t
+ **/
+typedef struct xcb_input_set_device_mode_reply_t {
+ uint8_t response_type;
+ uint8_t xi_reply_type;
+ uint16_t sequence;
+ uint32_t length;
+ uint8_t status;
+ uint8_t pad0[23];
+} xcb_input_set_device_mode_reply_t;
+
+/** Opcode for xcb_input_select_extension_event. */
+#define XCB_INPUT_SELECT_EXTENSION_EVENT 6
+
+/**
+ * @brief xcb_input_select_extension_event_request_t
+ **/
+typedef struct xcb_input_select_extension_event_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_window_t window;
+ uint16_t num_classes;
+ uint8_t pad0[2];
+} xcb_input_select_extension_event_request_t;
+
+/**
+ * @brief xcb_input_get_selected_extension_events_cookie_t
+ **/
+typedef struct xcb_input_get_selected_extension_events_cookie_t {
+ unsigned int sequence;
+} xcb_input_get_selected_extension_events_cookie_t;
+
+/** Opcode for xcb_input_get_selected_extension_events. */
+#define XCB_INPUT_GET_SELECTED_EXTENSION_EVENTS 7
+
+/**
+ * @brief xcb_input_get_selected_extension_events_request_t
+ **/
+typedef struct xcb_input_get_selected_extension_events_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_window_t window;
+} xcb_input_get_selected_extension_events_request_t;
+
+/**
+ * @brief xcb_input_get_selected_extension_events_reply_t
+ **/
+typedef struct xcb_input_get_selected_extension_events_reply_t {
+ uint8_t response_type;
+ uint8_t xi_reply_type;
+ uint16_t sequence;
+ uint32_t length;
+ uint16_t num_this_classes;
+ uint16_t num_all_classes;
+ uint8_t pad0[20];
+} xcb_input_get_selected_extension_events_reply_t;
+
+typedef enum xcb_input_propagate_mode_t {
+ XCB_INPUT_PROPAGATE_MODE_ADD_TO_LIST = 0,
+ XCB_INPUT_PROPAGATE_MODE_DELETE_FROM_LIST = 1
+} xcb_input_propagate_mode_t;
+
+/** Opcode for xcb_input_change_device_dont_propagate_list. */
+#define XCB_INPUT_CHANGE_DEVICE_DONT_PROPAGATE_LIST 8
+
+/**
+ * @brief xcb_input_change_device_dont_propagate_list_request_t
+ **/
+typedef struct xcb_input_change_device_dont_propagate_list_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_window_t window;
+ uint16_t num_classes;
+ uint8_t mode;
+ uint8_t pad0;
+} xcb_input_change_device_dont_propagate_list_request_t;
+
+/**
+ * @brief xcb_input_get_device_dont_propagate_list_cookie_t
+ **/
+typedef struct xcb_input_get_device_dont_propagate_list_cookie_t {
+ unsigned int sequence;
+} xcb_input_get_device_dont_propagate_list_cookie_t;
+
+/** Opcode for xcb_input_get_device_dont_propagate_list. */
+#define XCB_INPUT_GET_DEVICE_DONT_PROPAGATE_LIST 9
+
+/**
+ * @brief xcb_input_get_device_dont_propagate_list_request_t
+ **/
+typedef struct xcb_input_get_device_dont_propagate_list_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_window_t window;
+} xcb_input_get_device_dont_propagate_list_request_t;
+
+/**
+ * @brief xcb_input_get_device_dont_propagate_list_reply_t
+ **/
+typedef struct xcb_input_get_device_dont_propagate_list_reply_t {
+ uint8_t response_type;
+ uint8_t xi_reply_type;
+ uint16_t sequence;
+ uint32_t length;
+ uint16_t num_classes;
+ uint8_t pad0[22];
+} xcb_input_get_device_dont_propagate_list_reply_t;
+
+/**
+ * @brief xcb_input_device_time_coord_t
+ **/
+typedef struct xcb_input_device_time_coord_t {
+ xcb_timestamp_t time;
+} xcb_input_device_time_coord_t;
+
+/**
+ * @brief xcb_input_device_time_coord_iterator_t
+ **/
+typedef struct xcb_input_device_time_coord_iterator_t {
+ xcb_input_device_time_coord_t *data;
+ int rem;
+ int index;
+ uint8_t num_axes; /**< */
+} xcb_input_device_time_coord_iterator_t;
+
+/**
+ * @brief xcb_input_get_device_motion_events_cookie_t
+ **/
+typedef struct xcb_input_get_device_motion_events_cookie_t {
+ unsigned int sequence;
+} xcb_input_get_device_motion_events_cookie_t;
+
+/** Opcode for xcb_input_get_device_motion_events. */
+#define XCB_INPUT_GET_DEVICE_MOTION_EVENTS 10
+
+/**
+ * @brief xcb_input_get_device_motion_events_request_t
+ **/
+typedef struct xcb_input_get_device_motion_events_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_timestamp_t start;
+ xcb_timestamp_t stop;
+ uint8_t device_id;
+ uint8_t pad0[3];
+} xcb_input_get_device_motion_events_request_t;
+
+/**
+ * @brief xcb_input_get_device_motion_events_reply_t
+ **/
+typedef struct xcb_input_get_device_motion_events_reply_t {
+ uint8_t response_type;
+ uint8_t xi_reply_type;
+ uint16_t sequence;
+ uint32_t length;
+ uint32_t num_events;
+ uint8_t num_axes;
+ uint8_t device_mode;
+ uint8_t pad0[18];
+} xcb_input_get_device_motion_events_reply_t;
+
+/**
+ * @brief xcb_input_change_keyboard_device_cookie_t
+ **/
+typedef struct xcb_input_change_keyboard_device_cookie_t {
+ unsigned int sequence;
+} xcb_input_change_keyboard_device_cookie_t;
+
+/** Opcode for xcb_input_change_keyboard_device. */
+#define XCB_INPUT_CHANGE_KEYBOARD_DEVICE 11
+
+/**
+ * @brief xcb_input_change_keyboard_device_request_t
+ **/
+typedef struct xcb_input_change_keyboard_device_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ uint8_t device_id;
+ uint8_t pad0[3];
+} xcb_input_change_keyboard_device_request_t;
+
+/**
+ * @brief xcb_input_change_keyboard_device_reply_t
+ **/
+typedef struct xcb_input_change_keyboard_device_reply_t {
+ uint8_t response_type;
+ uint8_t xi_reply_type;
+ uint16_t sequence;
+ uint32_t length;
+ uint8_t status;
+ uint8_t pad0[23];
+} xcb_input_change_keyboard_device_reply_t;
+
+/**
+ * @brief xcb_input_change_pointer_device_cookie_t
+ **/
+typedef struct xcb_input_change_pointer_device_cookie_t {
+ unsigned int sequence;
+} xcb_input_change_pointer_device_cookie_t;
+
+/** Opcode for xcb_input_change_pointer_device. */
+#define XCB_INPUT_CHANGE_POINTER_DEVICE 12
+
+/**
+ * @brief xcb_input_change_pointer_device_request_t
+ **/
+typedef struct xcb_input_change_pointer_device_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ uint8_t x_axis;
+ uint8_t y_axis;
+ uint8_t device_id;
+ uint8_t pad0;
+} xcb_input_change_pointer_device_request_t;
+
+/**
+ * @brief xcb_input_change_pointer_device_reply_t
+ **/
+typedef struct xcb_input_change_pointer_device_reply_t {
+ uint8_t response_type;
+ uint8_t xi_reply_type;
+ uint16_t sequence;
+ uint32_t length;
+ uint8_t status;
+ uint8_t pad0[23];
+} xcb_input_change_pointer_device_reply_t;
+
+/**
+ * @brief xcb_input_grab_device_cookie_t
+ **/
+typedef struct xcb_input_grab_device_cookie_t {
+ unsigned int sequence;
+} xcb_input_grab_device_cookie_t;
+
+/** Opcode for xcb_input_grab_device. */
+#define XCB_INPUT_GRAB_DEVICE 13
+
+/**
+ * @brief xcb_input_grab_device_request_t
+ **/
+typedef struct xcb_input_grab_device_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_window_t grab_window;
+ xcb_timestamp_t time;
+ uint16_t num_classes;
+ uint8_t this_device_mode;
+ uint8_t other_device_mode;
+ uint8_t owner_events;
+ uint8_t device_id;
+ uint8_t pad0[2];
+} xcb_input_grab_device_request_t;
+
+/**
+ * @brief xcb_input_grab_device_reply_t
+ **/
+typedef struct xcb_input_grab_device_reply_t {
+ uint8_t response_type;
+ uint8_t xi_reply_type;
+ uint16_t sequence;
+ uint32_t length;
+ uint8_t status;
+ uint8_t pad0[23];
+} xcb_input_grab_device_reply_t;
+
+/** Opcode for xcb_input_ungrab_device. */
+#define XCB_INPUT_UNGRAB_DEVICE 14
+
+/**
+ * @brief xcb_input_ungrab_device_request_t
+ **/
+typedef struct xcb_input_ungrab_device_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_timestamp_t time;
+ uint8_t device_id;
+ uint8_t pad0[3];
+} xcb_input_ungrab_device_request_t;
+
+typedef enum xcb_input_modifier_device_t {
+ XCB_INPUT_MODIFIER_DEVICE_USE_X_KEYBOARD = 255
+} xcb_input_modifier_device_t;
+
+/** Opcode for xcb_input_grab_device_key. */
+#define XCB_INPUT_GRAB_DEVICE_KEY 15
+
+/**
+ * @brief xcb_input_grab_device_key_request_t
+ **/
+typedef struct xcb_input_grab_device_key_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_window_t grab_window;
+ uint16_t num_classes;
+ uint16_t modifiers;
+ uint8_t modifier_device;
+ uint8_t grabbed_device;
+ uint8_t key;
+ uint8_t this_device_mode;
+ uint8_t other_device_mode;
+ uint8_t owner_events;
+ uint8_t pad0[2];
+} xcb_input_grab_device_key_request_t;
+
+/** Opcode for xcb_input_ungrab_device_key. */
+#define XCB_INPUT_UNGRAB_DEVICE_KEY 16
+
+/**
+ * @brief xcb_input_ungrab_device_key_request_t
+ **/
+typedef struct xcb_input_ungrab_device_key_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_window_t grabWindow;
+ uint16_t modifiers;
+ uint8_t modifier_device;
+ uint8_t key;
+ uint8_t grabbed_device;
+} xcb_input_ungrab_device_key_request_t;
+
+/** Opcode for xcb_input_grab_device_button. */
+#define XCB_INPUT_GRAB_DEVICE_BUTTON 17
+
+/**
+ * @brief xcb_input_grab_device_button_request_t
+ **/
+typedef struct xcb_input_grab_device_button_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_window_t grab_window;
+ uint8_t grabbed_device;
+ uint8_t modifier_device;
+ uint16_t num_classes;
+ uint16_t modifiers;
+ uint8_t this_device_mode;
+ uint8_t other_device_mode;
+ uint8_t button;
+ uint8_t owner_events;
+ uint8_t pad0[2];
+} xcb_input_grab_device_button_request_t;
+
+/** Opcode for xcb_input_ungrab_device_button. */
+#define XCB_INPUT_UNGRAB_DEVICE_BUTTON 18
+
+/**
+ * @brief xcb_input_ungrab_device_button_request_t
+ **/
+typedef struct xcb_input_ungrab_device_button_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_window_t grab_window;
+ uint16_t modifiers;
+ uint8_t modifier_device;
+ uint8_t button;
+ uint8_t grabbed_device;
+ uint8_t pad0[3];
+} xcb_input_ungrab_device_button_request_t;
+
+typedef enum xcb_input_device_input_mode_t {
+ XCB_INPUT_DEVICE_INPUT_MODE_ASYNC_THIS_DEVICE = 0,
+ XCB_INPUT_DEVICE_INPUT_MODE_SYNC_THIS_DEVICE = 1,
+ XCB_INPUT_DEVICE_INPUT_MODE_REPLAY_THIS_DEVICE = 2,
+ XCB_INPUT_DEVICE_INPUT_MODE_ASYNC_OTHER_DEVICES = 3,
+ XCB_INPUT_DEVICE_INPUT_MODE_ASYNC_ALL = 4,
+ XCB_INPUT_DEVICE_INPUT_MODE_SYNC_ALL = 5
+} xcb_input_device_input_mode_t;
+
+/** Opcode for xcb_input_allow_device_events. */
+#define XCB_INPUT_ALLOW_DEVICE_EVENTS 19
+
+/**
+ * @brief xcb_input_allow_device_events_request_t
+ **/
+typedef struct xcb_input_allow_device_events_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_timestamp_t time;
+ uint8_t mode;
+ uint8_t device_id;
+ uint8_t pad0[2];
+} xcb_input_allow_device_events_request_t;
+
+/**
+ * @brief xcb_input_get_device_focus_cookie_t
+ **/
+typedef struct xcb_input_get_device_focus_cookie_t {
+ unsigned int sequence;
+} xcb_input_get_device_focus_cookie_t;
+
+/** Opcode for xcb_input_get_device_focus. */
+#define XCB_INPUT_GET_DEVICE_FOCUS 20
+
+/**
+ * @brief xcb_input_get_device_focus_request_t
+ **/
+typedef struct xcb_input_get_device_focus_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ uint8_t device_id;
+ uint8_t pad0[3];
+} xcb_input_get_device_focus_request_t;
+
+/**
+ * @brief xcb_input_get_device_focus_reply_t
+ **/
+typedef struct xcb_input_get_device_focus_reply_t {
+ uint8_t response_type;
+ uint8_t xi_reply_type;
+ uint16_t sequence;
+ uint32_t length;
+ xcb_window_t focus;
+ xcb_timestamp_t time;
+ uint8_t revert_to;
+ uint8_t pad0[15];
+} xcb_input_get_device_focus_reply_t;
+
+/** Opcode for xcb_input_set_device_focus. */
+#define XCB_INPUT_SET_DEVICE_FOCUS 21
+
+/**
+ * @brief xcb_input_set_device_focus_request_t
+ **/
+typedef struct xcb_input_set_device_focus_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_window_t focus;
+ xcb_timestamp_t time;
+ uint8_t revert_to;
+ uint8_t device_id;
+ uint8_t pad0[2];
+} xcb_input_set_device_focus_request_t;
+
+typedef enum xcb_input_feedback_class_t {
+ XCB_INPUT_FEEDBACK_CLASS_KEYBOARD = 0,
+ XCB_INPUT_FEEDBACK_CLASS_POINTER = 1,
+ XCB_INPUT_FEEDBACK_CLASS_STRING = 2,
+ XCB_INPUT_FEEDBACK_CLASS_INTEGER = 3,
+ XCB_INPUT_FEEDBACK_CLASS_LED = 4,
+ XCB_INPUT_FEEDBACK_CLASS_BELL = 5
+} xcb_input_feedback_class_t;
+
+/**
+ * @brief xcb_input_kbd_feedback_state_t
+ **/
+typedef struct xcb_input_kbd_feedback_state_t {
+ uint8_t class_id;
+ uint8_t feedback_id;
+ uint16_t len;
+ uint16_t pitch;
+ uint16_t duration;
+ uint32_t led_mask;
+ uint32_t led_values;
+ uint8_t global_auto_repeat;
+ uint8_t click;
+ uint8_t percent;
+ uint8_t pad0;
+ uint8_t auto_repeats[32];
+} xcb_input_kbd_feedback_state_t;
+
+/**
+ * @brief xcb_input_kbd_feedback_state_iterator_t
+ **/
+typedef struct xcb_input_kbd_feedback_state_iterator_t {
+ xcb_input_kbd_feedback_state_t *data;
+ int rem;
+ int index;
+} xcb_input_kbd_feedback_state_iterator_t;
+
+/**
+ * @brief xcb_input_ptr_feedback_state_t
+ **/
+typedef struct xcb_input_ptr_feedback_state_t {
+ uint8_t class_id;
+ uint8_t feedback_id;
+ uint16_t len;
+ uint8_t pad0[2];
+ uint16_t accel_num;
+ uint16_t accel_denom;
+ uint16_t threshold;
+} xcb_input_ptr_feedback_state_t;
+
+/**
+ * @brief xcb_input_ptr_feedback_state_iterator_t
+ **/
+typedef struct xcb_input_ptr_feedback_state_iterator_t {
+ xcb_input_ptr_feedback_state_t *data;
+ int rem;
+ int index;
+} xcb_input_ptr_feedback_state_iterator_t;
+
+/**
+ * @brief xcb_input_integer_feedback_state_t
+ **/
+typedef struct xcb_input_integer_feedback_state_t {
+ uint8_t class_id;
+ uint8_t feedback_id;
+ uint16_t len;
+ uint32_t resolution;
+ int32_t min_value;
+ int32_t max_value;
+} xcb_input_integer_feedback_state_t;
+
+/**
+ * @brief xcb_input_integer_feedback_state_iterator_t
+ **/
+typedef struct xcb_input_integer_feedback_state_iterator_t {
+ xcb_input_integer_feedback_state_t *data;
+ int rem;
+ int index;
+} xcb_input_integer_feedback_state_iterator_t;
+
+/**
+ * @brief xcb_input_string_feedback_state_t
+ **/
+typedef struct xcb_input_string_feedback_state_t {
+ uint8_t class_id;
+ uint8_t feedback_id;
+ uint16_t len;
+ uint16_t max_symbols;
+ uint16_t num_keysyms;
+} xcb_input_string_feedback_state_t;
+
+/**
+ * @brief xcb_input_string_feedback_state_iterator_t
+ **/
+typedef struct xcb_input_string_feedback_state_iterator_t {
+ xcb_input_string_feedback_state_t *data;
+ int rem;
+ int index;
+} xcb_input_string_feedback_state_iterator_t;
+
+/**
+ * @brief xcb_input_bell_feedback_state_t
+ **/
+typedef struct xcb_input_bell_feedback_state_t {
+ uint8_t class_id;
+ uint8_t feedback_id;
+ uint16_t len;
+ uint8_t percent;
+ uint8_t pad0[3];
+ uint16_t pitch;
+ uint16_t duration;
+} xcb_input_bell_feedback_state_t;
+
+/**
+ * @brief xcb_input_bell_feedback_state_iterator_t
+ **/
+typedef struct xcb_input_bell_feedback_state_iterator_t {
+ xcb_input_bell_feedback_state_t *data;
+ int rem;
+ int index;
+} xcb_input_bell_feedback_state_iterator_t;
+
+/**
+ * @brief xcb_input_led_feedback_state_t
+ **/
+typedef struct xcb_input_led_feedback_state_t {
+ uint8_t class_id;
+ uint8_t feedback_id;
+ uint16_t len;
+ uint32_t led_mask;
+ uint32_t led_values;
+} xcb_input_led_feedback_state_t;
+
+/**
+ * @brief xcb_input_led_feedback_state_iterator_t
+ **/
+typedef struct xcb_input_led_feedback_state_iterator_t {
+ xcb_input_led_feedback_state_t *data;
+ int rem;
+ int index;
+} xcb_input_led_feedback_state_iterator_t;
+
+/**
+ * @brief xcb_input_feedback_state_data_t
+ **/
+typedef struct xcb_input_feedback_state_data_t {
+ struct {
+ uint16_t pitch;
+ uint16_t duration;
+ uint32_t led_mask;
+ uint32_t led_values;
+ uint8_t global_auto_repeat;
+ uint8_t click;
+ uint8_t percent;
+ uint8_t pad0;
+ uint8_t auto_repeats[32];
+ } keyboard;
+ struct {
+ uint8_t pad1[2];
+ uint16_t accel_num;
+ uint16_t accel_denom;
+ uint16_t threshold;
+ } pointer;
+ struct {
+ uint16_t max_symbols;
+ uint16_t num_keysyms;
+ xcb_keysym_t *keysyms;
+ } string;
+ struct {
+ uint32_t resolution;
+ int32_t min_value;
+ int32_t max_value;
+ } integer;
+ struct {
+ uint32_t led_mask;
+ uint32_t led_values;
+ } led;
+ struct {
+ uint8_t percent;
+ uint8_t pad2[3];
+ uint16_t pitch;
+ uint16_t duration;
+ } bell;
+} xcb_input_feedback_state_data_t;
+
+/**
+ * @brief xcb_input_feedback_state_t
+ **/
+typedef struct xcb_input_feedback_state_t {
+ uint8_t class_id;
+ uint8_t feedback_id;
+ uint16_t len;
+} xcb_input_feedback_state_t;
+
+void *
+xcb_input_feedback_state_data (const xcb_input_feedback_state_t *R);
+
+/**
+ * @brief xcb_input_feedback_state_iterator_t
+ **/
+typedef struct xcb_input_feedback_state_iterator_t {
+ xcb_input_feedback_state_t *data;
+ int rem;
+ int index;
+} xcb_input_feedback_state_iterator_t;
+
+/**
+ * @brief xcb_input_get_feedback_control_cookie_t
+ **/
+typedef struct xcb_input_get_feedback_control_cookie_t {
+ unsigned int sequence;
+} xcb_input_get_feedback_control_cookie_t;
+
+/** Opcode for xcb_input_get_feedback_control. */
+#define XCB_INPUT_GET_FEEDBACK_CONTROL 22
+
+/**
+ * @brief xcb_input_get_feedback_control_request_t
+ **/
+typedef struct xcb_input_get_feedback_control_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ uint8_t device_id;
+ uint8_t pad0[3];
+} xcb_input_get_feedback_control_request_t;
+
+/**
+ * @brief xcb_input_get_feedback_control_reply_t
+ **/
+typedef struct xcb_input_get_feedback_control_reply_t {
+ uint8_t response_type;
+ uint8_t xi_reply_type;
+ uint16_t sequence;
+ uint32_t length;
+ uint16_t num_feedbacks;
+ uint8_t pad0[22];
+} xcb_input_get_feedback_control_reply_t;
+
+/**
+ * @brief xcb_input_kbd_feedback_ctl_t
+ **/
+typedef struct xcb_input_kbd_feedback_ctl_t {
+ uint8_t class_id;
+ uint8_t feedback_id;
+ uint16_t len;
+ xcb_input_key_code_t key;
+ uint8_t auto_repeat_mode;
+ int8_t key_click_percent;
+ int8_t bell_percent;
+ int16_t bell_pitch;
+ int16_t bell_duration;
+ uint32_t led_mask;
+ uint32_t led_values;
+} xcb_input_kbd_feedback_ctl_t;
+
+/**
+ * @brief xcb_input_kbd_feedback_ctl_iterator_t
+ **/
+typedef struct xcb_input_kbd_feedback_ctl_iterator_t {
+ xcb_input_kbd_feedback_ctl_t *data;
+ int rem;
+ int index;
+} xcb_input_kbd_feedback_ctl_iterator_t;
+
+/**
+ * @brief xcb_input_ptr_feedback_ctl_t
+ **/
+typedef struct xcb_input_ptr_feedback_ctl_t {
+ uint8_t class_id;
+ uint8_t feedback_id;
+ uint16_t len;
+ uint8_t pad0[2];
+ int16_t num;
+ int16_t denom;
+ int16_t threshold;
+} xcb_input_ptr_feedback_ctl_t;
+
+/**
+ * @brief xcb_input_ptr_feedback_ctl_iterator_t
+ **/
+typedef struct xcb_input_ptr_feedback_ctl_iterator_t {
+ xcb_input_ptr_feedback_ctl_t *data;
+ int rem;
+ int index;
+} xcb_input_ptr_feedback_ctl_iterator_t;
+
+/**
+ * @brief xcb_input_integer_feedback_ctl_t
+ **/
+typedef struct xcb_input_integer_feedback_ctl_t {
+ uint8_t class_id;
+ uint8_t feedback_id;
+ uint16_t len;
+ int32_t int_to_display;
+} xcb_input_integer_feedback_ctl_t;
+
+/**
+ * @brief xcb_input_integer_feedback_ctl_iterator_t
+ **/
+typedef struct xcb_input_integer_feedback_ctl_iterator_t {
+ xcb_input_integer_feedback_ctl_t *data;
+ int rem;
+ int index;
+} xcb_input_integer_feedback_ctl_iterator_t;
+
+/**
+ * @brief xcb_input_string_feedback_ctl_t
+ **/
+typedef struct xcb_input_string_feedback_ctl_t {
+ uint8_t class_id;
+ uint8_t feedback_id;
+ uint16_t len;
+ uint8_t pad0[2];
+ uint16_t num_keysyms;
+} xcb_input_string_feedback_ctl_t;
+
+/**
+ * @brief xcb_input_string_feedback_ctl_iterator_t
+ **/
+typedef struct xcb_input_string_feedback_ctl_iterator_t {
+ xcb_input_string_feedback_ctl_t *data;
+ int rem;
+ int index;
+} xcb_input_string_feedback_ctl_iterator_t;
+
+/**
+ * @brief xcb_input_bell_feedback_ctl_t
+ **/
+typedef struct xcb_input_bell_feedback_ctl_t {
+ uint8_t class_id;
+ uint8_t feedback_id;
+ uint16_t len;
+ int8_t percent;
+ uint8_t pad0[3];
+ int16_t pitch;
+ int16_t duration;
+} xcb_input_bell_feedback_ctl_t;
+
+/**
+ * @brief xcb_input_bell_feedback_ctl_iterator_t
+ **/
+typedef struct xcb_input_bell_feedback_ctl_iterator_t {
+ xcb_input_bell_feedback_ctl_t *data;
+ int rem;
+ int index;
+} xcb_input_bell_feedback_ctl_iterator_t;
+
+/**
+ * @brief xcb_input_led_feedback_ctl_t
+ **/
+typedef struct xcb_input_led_feedback_ctl_t {
+ uint8_t class_id;
+ uint8_t feedback_id;
+ uint16_t len;
+ uint32_t led_mask;
+ uint32_t led_values;
+} xcb_input_led_feedback_ctl_t;
+
+/**
+ * @brief xcb_input_led_feedback_ctl_iterator_t
+ **/
+typedef struct xcb_input_led_feedback_ctl_iterator_t {
+ xcb_input_led_feedback_ctl_t *data;
+ int rem;
+ int index;
+} xcb_input_led_feedback_ctl_iterator_t;
+
+/**
+ * @brief xcb_input_feedback_ctl_data_t
+ **/
+typedef struct xcb_input_feedback_ctl_data_t {
+ struct {
+ xcb_input_key_code_t key;
+ uint8_t auto_repeat_mode;
+ int8_t key_click_percent;
+ int8_t bell_percent;
+ int16_t bell_pitch;
+ int16_t bell_duration;
+ uint32_t led_mask;
+ uint32_t led_values;
+ } keyboard;
+ struct {
+ uint8_t pad0[2];
+ int16_t num;
+ int16_t denom;
+ int16_t threshold;
+ } pointer;
+ struct {
+ uint8_t pad1[2];
+ uint16_t num_keysyms;
+ xcb_keysym_t *keysyms;
+ } string;
+ struct {
+ int32_t int_to_display;
+ } integer;
+ struct {
+ uint32_t led_mask;
+ uint32_t led_values;
+ } led;
+ struct {
+ int8_t percent;
+ uint8_t pad2[3];
+ int16_t pitch;
+ int16_t duration;
+ } bell;
+} xcb_input_feedback_ctl_data_t;
+
+/**
+ * @brief xcb_input_feedback_ctl_t
+ **/
+typedef struct xcb_input_feedback_ctl_t {
+ uint8_t class_id;
+ uint8_t feedback_id;
+ uint16_t len;
+} xcb_input_feedback_ctl_t;
+
+void *
+xcb_input_feedback_ctl_data (const xcb_input_feedback_ctl_t *R);
+
+/**
+ * @brief xcb_input_feedback_ctl_iterator_t
+ **/
+typedef struct xcb_input_feedback_ctl_iterator_t {
+ xcb_input_feedback_ctl_t *data;
+ int rem;
+ int index;
+} xcb_input_feedback_ctl_iterator_t;
+
+typedef enum xcb_input_change_feedback_control_mask_t {
+ XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_KEY_CLICK_PERCENT = 1,
+ XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_PERCENT = 2,
+ XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_PITCH = 4,
+ XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_DURATION = 8,
+ XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_LED = 16,
+ XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_LED_MODE = 32,
+ XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_KEY = 64,
+ XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_AUTO_REPEAT_MODE = 128,
+ XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_STRING = 1,
+ XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_INTEGER = 1,
+ XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_ACCEL_NUM = 1,
+ XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_ACCEL_DENOM = 2,
+ XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_THRESHOLD = 4
+} xcb_input_change_feedback_control_mask_t;
+
+/** Opcode for xcb_input_change_feedback_control. */
+#define XCB_INPUT_CHANGE_FEEDBACK_CONTROL 23
+
+/**
+ * @brief xcb_input_change_feedback_control_request_t
+ **/
+typedef struct xcb_input_change_feedback_control_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ uint32_t mask;
+ uint8_t device_id;
+ uint8_t feedback_id;
+ uint8_t pad0[2];
+} xcb_input_change_feedback_control_request_t;
+
+/**
+ * @brief xcb_input_get_device_key_mapping_cookie_t
+ **/
+typedef struct xcb_input_get_device_key_mapping_cookie_t {
+ unsigned int sequence;
+} xcb_input_get_device_key_mapping_cookie_t;
+
+/** Opcode for xcb_input_get_device_key_mapping. */
+#define XCB_INPUT_GET_DEVICE_KEY_MAPPING 24
+
+/**
+ * @brief xcb_input_get_device_key_mapping_request_t
+ **/
+typedef struct xcb_input_get_device_key_mapping_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ uint8_t device_id;
+ xcb_input_key_code_t first_keycode;
+ uint8_t count;
+ uint8_t pad0;
+} xcb_input_get_device_key_mapping_request_t;
+
+/**
+ * @brief xcb_input_get_device_key_mapping_reply_t
+ **/
+typedef struct xcb_input_get_device_key_mapping_reply_t {
+ uint8_t response_type;
+ uint8_t xi_reply_type;
+ uint16_t sequence;
+ uint32_t length;
+ uint8_t keysyms_per_keycode;
+ uint8_t pad0[23];
+} xcb_input_get_device_key_mapping_reply_t;
+
+/** Opcode for xcb_input_change_device_key_mapping. */
+#define XCB_INPUT_CHANGE_DEVICE_KEY_MAPPING 25
+
+/**
+ * @brief xcb_input_change_device_key_mapping_request_t
+ **/
+typedef struct xcb_input_change_device_key_mapping_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ uint8_t device_id;
+ xcb_input_key_code_t first_keycode;
+ uint8_t keysyms_per_keycode;
+ uint8_t keycode_count;
+} xcb_input_change_device_key_mapping_request_t;
+
+/**
+ * @brief xcb_input_get_device_modifier_mapping_cookie_t
+ **/
+typedef struct xcb_input_get_device_modifier_mapping_cookie_t {
+ unsigned int sequence;
+} xcb_input_get_device_modifier_mapping_cookie_t;
+
+/** Opcode for xcb_input_get_device_modifier_mapping. */
+#define XCB_INPUT_GET_DEVICE_MODIFIER_MAPPING 26
+
+/**
+ * @brief xcb_input_get_device_modifier_mapping_request_t
+ **/
+typedef struct xcb_input_get_device_modifier_mapping_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ uint8_t device_id;
+ uint8_t pad0[3];
+} xcb_input_get_device_modifier_mapping_request_t;
+
+/**
+ * @brief xcb_input_get_device_modifier_mapping_reply_t
+ **/
+typedef struct xcb_input_get_device_modifier_mapping_reply_t {
+ uint8_t response_type;
+ uint8_t xi_reply_type;
+ uint16_t sequence;
+ uint32_t length;
+ uint8_t keycodes_per_modifier;
+ uint8_t pad0[23];
+} xcb_input_get_device_modifier_mapping_reply_t;
+
+/**
+ * @brief xcb_input_set_device_modifier_mapping_cookie_t
+ **/
+typedef struct xcb_input_set_device_modifier_mapping_cookie_t {
+ unsigned int sequence;
+} xcb_input_set_device_modifier_mapping_cookie_t;
+
+/** Opcode for xcb_input_set_device_modifier_mapping. */
+#define XCB_INPUT_SET_DEVICE_MODIFIER_MAPPING 27
+
+/**
+ * @brief xcb_input_set_device_modifier_mapping_request_t
+ **/
+typedef struct xcb_input_set_device_modifier_mapping_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ uint8_t device_id;
+ uint8_t keycodes_per_modifier;
+ uint8_t pad0[2];
+} xcb_input_set_device_modifier_mapping_request_t;
+
+/**
+ * @brief xcb_input_set_device_modifier_mapping_reply_t
+ **/
+typedef struct xcb_input_set_device_modifier_mapping_reply_t {
+ uint8_t response_type;
+ uint8_t xi_reply_type;
+ uint16_t sequence;
+ uint32_t length;
+ uint8_t status;
+ uint8_t pad0[23];
+} xcb_input_set_device_modifier_mapping_reply_t;
+
+/**
+ * @brief xcb_input_get_device_button_mapping_cookie_t
+ **/
+typedef struct xcb_input_get_device_button_mapping_cookie_t {
+ unsigned int sequence;
+} xcb_input_get_device_button_mapping_cookie_t;
+
+/** Opcode for xcb_input_get_device_button_mapping. */
+#define XCB_INPUT_GET_DEVICE_BUTTON_MAPPING 28
+
+/**
+ * @brief xcb_input_get_device_button_mapping_request_t
+ **/
+typedef struct xcb_input_get_device_button_mapping_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ uint8_t device_id;
+ uint8_t pad0[3];
+} xcb_input_get_device_button_mapping_request_t;
+
+/**
+ * @brief xcb_input_get_device_button_mapping_reply_t
+ **/
+typedef struct xcb_input_get_device_button_mapping_reply_t {
+ uint8_t response_type;
+ uint8_t xi_reply_type;
+ uint16_t sequence;
+ uint32_t length;
+ uint8_t map_size;
+ uint8_t pad0[23];
+} xcb_input_get_device_button_mapping_reply_t;
+
+/**
+ * @brief xcb_input_set_device_button_mapping_cookie_t
+ **/
+typedef struct xcb_input_set_device_button_mapping_cookie_t {
+ unsigned int sequence;
+} xcb_input_set_device_button_mapping_cookie_t;
+
+/** Opcode for xcb_input_set_device_button_mapping. */
+#define XCB_INPUT_SET_DEVICE_BUTTON_MAPPING 29
+
+/**
+ * @brief xcb_input_set_device_button_mapping_request_t
+ **/
+typedef struct xcb_input_set_device_button_mapping_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ uint8_t device_id;
+ uint8_t map_size;
+ uint8_t pad0[2];
+} xcb_input_set_device_button_mapping_request_t;
+
+/**
+ * @brief xcb_input_set_device_button_mapping_reply_t
+ **/
+typedef struct xcb_input_set_device_button_mapping_reply_t {
+ uint8_t response_type;
+ uint8_t xi_reply_type;
+ uint16_t sequence;
+ uint32_t length;
+ uint8_t status;
+ uint8_t pad0[23];
+} xcb_input_set_device_button_mapping_reply_t;
+
+/**
+ * @brief xcb_input_key_state_t
+ **/
+typedef struct xcb_input_key_state_t {
+ uint8_t class_id;
+ uint8_t len;
+ uint8_t num_keys;
+ uint8_t pad0;
+ uint8_t keys[32];
+} xcb_input_key_state_t;
+
+/**
+ * @brief xcb_input_key_state_iterator_t
+ **/
+typedef struct xcb_input_key_state_iterator_t {
+ xcb_input_key_state_t *data;
+ int rem;
+ int index;
+} xcb_input_key_state_iterator_t;
+
+/**
+ * @brief xcb_input_button_state_t
+ **/
+typedef struct xcb_input_button_state_t {
+ uint8_t class_id;
+ uint8_t len;
+ uint8_t num_buttons;
+ uint8_t pad0;
+ uint8_t buttons[32];
+} xcb_input_button_state_t;
+
+/**
+ * @brief xcb_input_button_state_iterator_t
+ **/
+typedef struct xcb_input_button_state_iterator_t {
+ xcb_input_button_state_t *data;
+ int rem;
+ int index;
+} xcb_input_button_state_iterator_t;
+
+typedef enum xcb_input_valuator_state_mode_mask_t {
+ XCB_INPUT_VALUATOR_STATE_MODE_MASK_DEVICE_MODE_ABSOLUTE = 1,
+ XCB_INPUT_VALUATOR_STATE_MODE_MASK_OUT_OF_PROXIMITY = 2
+} xcb_input_valuator_state_mode_mask_t;
+
+/**
+ * @brief xcb_input_valuator_state_t
+ **/
+typedef struct xcb_input_valuator_state_t {
+ uint8_t class_id;
+ uint8_t len;
+ uint8_t num_valuators;
+ uint8_t mode;
+} xcb_input_valuator_state_t;
+
+/**
+ * @brief xcb_input_valuator_state_iterator_t
+ **/
+typedef struct xcb_input_valuator_state_iterator_t {
+ xcb_input_valuator_state_t *data;
+ int rem;
+ int index;
+} xcb_input_valuator_state_iterator_t;
+
+/**
+ * @brief xcb_input_input_state_data_t
+ **/
+typedef struct xcb_input_input_state_data_t {
+ struct {
+ uint8_t num_keys;
+ uint8_t pad0;
+ uint8_t keys[32];
+ } key;
+ struct {
+ uint8_t num_buttons;
+ uint8_t pad1;
+ uint8_t buttons[32];
+ } button;
+ struct {
+ uint8_t num_valuators;
+ uint8_t mode;
+ int32_t *valuators;
+ } valuator;
+} xcb_input_input_state_data_t;
+
+/**
+ * @brief xcb_input_input_state_t
+ **/
+typedef struct xcb_input_input_state_t {
+ uint8_t class_id;
+ uint8_t len;
+} xcb_input_input_state_t;
+
+void *
+xcb_input_input_state_data (const xcb_input_input_state_t *R);
+
+/**
+ * @brief xcb_input_input_state_iterator_t
+ **/
+typedef struct xcb_input_input_state_iterator_t {
+ xcb_input_input_state_t *data;
+ int rem;
+ int index;
+} xcb_input_input_state_iterator_t;
+
+/**
+ * @brief xcb_input_query_device_state_cookie_t
+ **/
+typedef struct xcb_input_query_device_state_cookie_t {
+ unsigned int sequence;
+} xcb_input_query_device_state_cookie_t;
+
+/** Opcode for xcb_input_query_device_state. */
+#define XCB_INPUT_QUERY_DEVICE_STATE 30
+
+/**
+ * @brief xcb_input_query_device_state_request_t
+ **/
+typedef struct xcb_input_query_device_state_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ uint8_t device_id;
+ uint8_t pad0[3];
+} xcb_input_query_device_state_request_t;
+
+/**
+ * @brief xcb_input_query_device_state_reply_t
+ **/
+typedef struct xcb_input_query_device_state_reply_t {
+ uint8_t response_type;
+ uint8_t xi_reply_type;
+ uint16_t sequence;
+ uint32_t length;
+ uint8_t num_classes;
+ uint8_t pad0[23];
+} xcb_input_query_device_state_reply_t;
+
+/** Opcode for xcb_input_device_bell. */
+#define XCB_INPUT_DEVICE_BELL 32
+
+/**
+ * @brief xcb_input_device_bell_request_t
+ **/
+typedef struct xcb_input_device_bell_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ uint8_t device_id;
+ uint8_t feedback_id;
+ uint8_t feedback_class;
+ int8_t percent;
+} xcb_input_device_bell_request_t;
+
+/**
+ * @brief xcb_input_set_device_valuators_cookie_t
+ **/
+typedef struct xcb_input_set_device_valuators_cookie_t {
+ unsigned int sequence;
+} xcb_input_set_device_valuators_cookie_t;
+
+/** Opcode for xcb_input_set_device_valuators. */
+#define XCB_INPUT_SET_DEVICE_VALUATORS 33
+
+/**
+ * @brief xcb_input_set_device_valuators_request_t
+ **/
+typedef struct xcb_input_set_device_valuators_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ uint8_t device_id;
+ uint8_t first_valuator;
+ uint8_t num_valuators;
+ uint8_t pad0;
+} xcb_input_set_device_valuators_request_t;
+
+/**
+ * @brief xcb_input_set_device_valuators_reply_t
+ **/
+typedef struct xcb_input_set_device_valuators_reply_t {
+ uint8_t response_type;
+ uint8_t xi_reply_type;
+ uint16_t sequence;
+ uint32_t length;
+ uint8_t status;
+ uint8_t pad0[23];
+} xcb_input_set_device_valuators_reply_t;
+
+typedef enum xcb_input_device_control_t {
+ XCB_INPUT_DEVICE_CONTROL_RESOLUTION = 1,
+ XCB_INPUT_DEVICE_CONTROL_ABS_CALIB = 2,
+ XCB_INPUT_DEVICE_CONTROL_CORE = 3,
+ XCB_INPUT_DEVICE_CONTROL_ENABLE = 4,
+ XCB_INPUT_DEVICE_CONTROL_ABS_AREA = 5
+} xcb_input_device_control_t;
+
+/**
+ * @brief xcb_input_device_resolution_state_t
+ **/
+typedef struct xcb_input_device_resolution_state_t {
+ uint16_t control_id;
+ uint16_t len;
+ uint32_t num_valuators;
+} xcb_input_device_resolution_state_t;
+
+/**
+ * @brief xcb_input_device_resolution_state_iterator_t
+ **/
+typedef struct xcb_input_device_resolution_state_iterator_t {
+ xcb_input_device_resolution_state_t *data;
+ int rem;
+ int index;
+} xcb_input_device_resolution_state_iterator_t;
+
+/**
+ * @brief xcb_input_device_abs_calib_state_t
+ **/
+typedef struct xcb_input_device_abs_calib_state_t {
+ uint16_t control_id;
+ uint16_t len;
+ int32_t min_x;
+ int32_t max_x;
+ int32_t min_y;
+ int32_t max_y;
+ uint32_t flip_x;
+ uint32_t flip_y;
+ uint32_t rotation;
+ uint32_t button_threshold;
+} xcb_input_device_abs_calib_state_t;
+
+/**
+ * @brief xcb_input_device_abs_calib_state_iterator_t
+ **/
+typedef struct xcb_input_device_abs_calib_state_iterator_t {
+ xcb_input_device_abs_calib_state_t *data;
+ int rem;
+ int index;
+} xcb_input_device_abs_calib_state_iterator_t;
+
+/**
+ * @brief xcb_input_device_abs_area_state_t
+ **/
+typedef struct xcb_input_device_abs_area_state_t {
+ uint16_t control_id;
+ uint16_t len;
+ uint32_t offset_x;
+ uint32_t offset_y;
+ uint32_t width;
+ uint32_t height;
+ uint32_t screen;
+ uint32_t following;
+} xcb_input_device_abs_area_state_t;
+
+/**
+ * @brief xcb_input_device_abs_area_state_iterator_t
+ **/
+typedef struct xcb_input_device_abs_area_state_iterator_t {
+ xcb_input_device_abs_area_state_t *data;
+ int rem;
+ int index;
+} xcb_input_device_abs_area_state_iterator_t;
+
+/**
+ * @brief xcb_input_device_core_state_t
+ **/
+typedef struct xcb_input_device_core_state_t {
+ uint16_t control_id;
+ uint16_t len;
+ uint8_t status;
+ uint8_t iscore;
+ uint8_t pad0[2];
+} xcb_input_device_core_state_t;
+
+/**
+ * @brief xcb_input_device_core_state_iterator_t
+ **/
+typedef struct xcb_input_device_core_state_iterator_t {
+ xcb_input_device_core_state_t *data;
+ int rem;
+ int index;
+} xcb_input_device_core_state_iterator_t;
+
+/**
+ * @brief xcb_input_device_enable_state_t
+ **/
+typedef struct xcb_input_device_enable_state_t {
+ uint16_t control_id;
+ uint16_t len;
+ uint8_t enable;
+ uint8_t pad0[3];
+} xcb_input_device_enable_state_t;
+
+/**
+ * @brief xcb_input_device_enable_state_iterator_t
+ **/
+typedef struct xcb_input_device_enable_state_iterator_t {
+ xcb_input_device_enable_state_t *data;
+ int rem;
+ int index;
+} xcb_input_device_enable_state_iterator_t;
+
+/**
+ * @brief xcb_input_device_state_data_t
+ **/
+typedef struct xcb_input_device_state_data_t {
+ struct {
+ uint32_t num_valuators;
+ uint32_t *resolution_values;
+ uint32_t *resolution_min;
+ uint32_t *resolution_max;
+ } resolution;
+ struct {
+ int32_t min_x;
+ int32_t max_x;
+ int32_t min_y;
+ int32_t max_y;
+ uint32_t flip_x;
+ uint32_t flip_y;
+ uint32_t rotation;
+ uint32_t button_threshold;
+ } abs_calib;
+ struct {
+ uint8_t status;
+ uint8_t iscore;
+ uint8_t pad0[2];
+ } core;
+ struct {
+ uint8_t enable;
+ uint8_t pad1[3];
+ } enable;
+ struct {
+ uint32_t offset_x;
+ uint32_t offset_y;
+ uint32_t width;
+ uint32_t height;
+ uint32_t screen;
+ uint32_t following;
+ } abs_area;
+} xcb_input_device_state_data_t;
+
+/**
+ * @brief xcb_input_device_state_t
+ **/
+typedef struct xcb_input_device_state_t {
+ uint16_t control_id;
+ uint16_t len;
+} xcb_input_device_state_t;
+
+void *
+xcb_input_device_state_data (const xcb_input_device_state_t *R);
+
+/**
+ * @brief xcb_input_device_state_iterator_t
+ **/
+typedef struct xcb_input_device_state_iterator_t {
+ xcb_input_device_state_t *data;
+ int rem;
+ int index;
+} xcb_input_device_state_iterator_t;
+
+/**
+ * @brief xcb_input_get_device_control_cookie_t
+ **/
+typedef struct xcb_input_get_device_control_cookie_t {
+ unsigned int sequence;
+} xcb_input_get_device_control_cookie_t;
+
+/** Opcode for xcb_input_get_device_control. */
+#define XCB_INPUT_GET_DEVICE_CONTROL 34
+
+/**
+ * @brief xcb_input_get_device_control_request_t
+ **/
+typedef struct xcb_input_get_device_control_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ uint16_t control_id;
+ uint8_t device_id;
+ uint8_t pad0;
+} xcb_input_get_device_control_request_t;
+
+/**
+ * @brief xcb_input_get_device_control_reply_t
+ **/
+typedef struct xcb_input_get_device_control_reply_t {
+ uint8_t response_type;
+ uint8_t xi_reply_type;
+ uint16_t sequence;
+ uint32_t length;
+ uint8_t status;
+ uint8_t pad0[23];
+} xcb_input_get_device_control_reply_t;
+
+/**
+ * @brief xcb_input_device_resolution_ctl_t
+ **/
+typedef struct xcb_input_device_resolution_ctl_t {
+ uint16_t control_id;
+ uint16_t len;
+ uint8_t first_valuator;
+ uint8_t num_valuators;
+ uint8_t pad0[2];
+} xcb_input_device_resolution_ctl_t;
+
+/**
+ * @brief xcb_input_device_resolution_ctl_iterator_t
+ **/
+typedef struct xcb_input_device_resolution_ctl_iterator_t {
+ xcb_input_device_resolution_ctl_t *data;
+ int rem;
+ int index;
+} xcb_input_device_resolution_ctl_iterator_t;
+
+/**
+ * @brief xcb_input_device_abs_calib_ctl_t
+ **/
+typedef struct xcb_input_device_abs_calib_ctl_t {
+ uint16_t control_id;
+ uint16_t len;
+ int32_t min_x;
+ int32_t max_x;
+ int32_t min_y;
+ int32_t max_y;
+ uint32_t flip_x;
+ uint32_t flip_y;
+ uint32_t rotation;
+ uint32_t button_threshold;
+} xcb_input_device_abs_calib_ctl_t;
+
+/**
+ * @brief xcb_input_device_abs_calib_ctl_iterator_t
+ **/
+typedef struct xcb_input_device_abs_calib_ctl_iterator_t {
+ xcb_input_device_abs_calib_ctl_t *data;
+ int rem;
+ int index;
+} xcb_input_device_abs_calib_ctl_iterator_t;
+
+/**
+ * @brief xcb_input_device_abs_area_ctrl_t
+ **/
+typedef struct xcb_input_device_abs_area_ctrl_t {
+ uint16_t control_id;
+ uint16_t len;
+ uint32_t offset_x;
+ uint32_t offset_y;
+ int32_t width;
+ int32_t height;
+ int32_t screen;
+ uint32_t following;
+} xcb_input_device_abs_area_ctrl_t;
+
+/**
+ * @brief xcb_input_device_abs_area_ctrl_iterator_t
+ **/
+typedef struct xcb_input_device_abs_area_ctrl_iterator_t {
+ xcb_input_device_abs_area_ctrl_t *data;
+ int rem;
+ int index;
+} xcb_input_device_abs_area_ctrl_iterator_t;
+
+/**
+ * @brief xcb_input_device_core_ctrl_t
+ **/
+typedef struct xcb_input_device_core_ctrl_t {
+ uint16_t control_id;
+ uint16_t len;
+ uint8_t status;
+ uint8_t pad0[3];
+} xcb_input_device_core_ctrl_t;
+
+/**
+ * @brief xcb_input_device_core_ctrl_iterator_t
+ **/
+typedef struct xcb_input_device_core_ctrl_iterator_t {
+ xcb_input_device_core_ctrl_t *data;
+ int rem;
+ int index;
+} xcb_input_device_core_ctrl_iterator_t;
+
+/**
+ * @brief xcb_input_device_enable_ctrl_t
+ **/
+typedef struct xcb_input_device_enable_ctrl_t {
+ uint16_t control_id;
+ uint16_t len;
+ uint8_t enable;
+ uint8_t pad0[3];
+} xcb_input_device_enable_ctrl_t;
+
+/**
+ * @brief xcb_input_device_enable_ctrl_iterator_t
+ **/
+typedef struct xcb_input_device_enable_ctrl_iterator_t {
+ xcb_input_device_enable_ctrl_t *data;
+ int rem;
+ int index;
+} xcb_input_device_enable_ctrl_iterator_t;
+
+/**
+ * @brief xcb_input_device_ctl_data_t
+ **/
+typedef struct xcb_input_device_ctl_data_t {
+ struct {
+ uint8_t first_valuator;
+ uint8_t num_valuators;
+ uint8_t pad0[2];
+ uint32_t *resolution_values;
+ } resolution;
+ struct {
+ int32_t min_x;
+ int32_t max_x;
+ int32_t min_y;
+ int32_t max_y;
+ uint32_t flip_x;
+ uint32_t flip_y;
+ uint32_t rotation;
+ uint32_t button_threshold;
+ } abs_calib;
+ struct {
+ uint8_t status;
+ uint8_t pad1[3];
+ } core;
+ struct {
+ uint8_t enable;
+ uint8_t pad2[3];
+ } enable;
+ struct {
+ uint32_t offset_x;
+ uint32_t offset_y;
+ int32_t width;
+ int32_t height;
+ int32_t screen;
+ uint32_t following;
+ } abs_area;
+} xcb_input_device_ctl_data_t;
+
+/**
+ * @brief xcb_input_device_ctl_t
+ **/
+typedef struct xcb_input_device_ctl_t {
+ uint16_t control_id;
+ uint16_t len;
+} xcb_input_device_ctl_t;
+
+void *
+xcb_input_device_ctl_data (const xcb_input_device_ctl_t *R);
+
+/**
+ * @brief xcb_input_device_ctl_iterator_t
+ **/
+typedef struct xcb_input_device_ctl_iterator_t {
+ xcb_input_device_ctl_t *data;
+ int rem;
+ int index;
+} xcb_input_device_ctl_iterator_t;
+
+/**
+ * @brief xcb_input_change_device_control_cookie_t
+ **/
+typedef struct xcb_input_change_device_control_cookie_t {
+ unsigned int sequence;
+} xcb_input_change_device_control_cookie_t;
+
+/** Opcode for xcb_input_change_device_control. */
+#define XCB_INPUT_CHANGE_DEVICE_CONTROL 35
+
+/**
+ * @brief xcb_input_change_device_control_request_t
+ **/
+typedef struct xcb_input_change_device_control_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ uint16_t control_id;
+ uint8_t device_id;
+ uint8_t pad0;
+} xcb_input_change_device_control_request_t;
+
+/**
+ * @brief xcb_input_change_device_control_reply_t
+ **/
+typedef struct xcb_input_change_device_control_reply_t {
+ uint8_t response_type;
+ uint8_t xi_reply_type;
+ uint16_t sequence;
+ uint32_t length;
+ uint8_t status;
+ uint8_t pad0[23];
+} xcb_input_change_device_control_reply_t;
+
+/**
+ * @brief xcb_input_list_device_properties_cookie_t
+ **/
+typedef struct xcb_input_list_device_properties_cookie_t {
+ unsigned int sequence;
+} xcb_input_list_device_properties_cookie_t;
+
+/** Opcode for xcb_input_list_device_properties. */
+#define XCB_INPUT_LIST_DEVICE_PROPERTIES 36
+
+/**
+ * @brief xcb_input_list_device_properties_request_t
+ **/
+typedef struct xcb_input_list_device_properties_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ uint8_t device_id;
+ uint8_t pad0[3];
+} xcb_input_list_device_properties_request_t;
+
+/**
+ * @brief xcb_input_list_device_properties_reply_t
+ **/
+typedef struct xcb_input_list_device_properties_reply_t {
+ uint8_t response_type;
+ uint8_t xi_reply_type;
+ uint16_t sequence;
+ uint32_t length;
+ uint16_t num_atoms;
+ uint8_t pad0[22];
+} xcb_input_list_device_properties_reply_t;
+
+typedef enum xcb_input_property_format_t {
+ XCB_INPUT_PROPERTY_FORMAT_8_BITS = 8,
+ XCB_INPUT_PROPERTY_FORMAT_16_BITS = 16,
+ XCB_INPUT_PROPERTY_FORMAT_32_BITS = 32
+} xcb_input_property_format_t;
+
+/**
+ * @brief xcb_input_change_device_property_items_t
+ **/
+typedef struct xcb_input_change_device_property_items_t {
+ uint8_t *data8;
+ uint16_t *data16;
+ uint32_t *data32;
+} xcb_input_change_device_property_items_t;
+
+/** Opcode for xcb_input_change_device_property. */
+#define XCB_INPUT_CHANGE_DEVICE_PROPERTY 37
+
+/**
+ * @brief xcb_input_change_device_property_request_t
+ **/
+typedef struct xcb_input_change_device_property_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_atom_t property;
+ xcb_atom_t type;
+ uint8_t device_id;
+ uint8_t format;
+ uint8_t mode;
+ uint8_t pad0;
+ uint32_t num_items;
+} xcb_input_change_device_property_request_t;
+
+/** Opcode for xcb_input_delete_device_property. */
+#define XCB_INPUT_DELETE_DEVICE_PROPERTY 38
+
+/**
+ * @brief xcb_input_delete_device_property_request_t
+ **/
+typedef struct xcb_input_delete_device_property_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_atom_t property;
+ uint8_t device_id;
+ uint8_t pad0[3];
+} xcb_input_delete_device_property_request_t;
+
+/**
+ * @brief xcb_input_get_device_property_cookie_t
+ **/
+typedef struct xcb_input_get_device_property_cookie_t {
+ unsigned int sequence;
+} xcb_input_get_device_property_cookie_t;
+
+/** Opcode for xcb_input_get_device_property. */
+#define XCB_INPUT_GET_DEVICE_PROPERTY 39
+
+/**
+ * @brief xcb_input_get_device_property_request_t
+ **/
+typedef struct xcb_input_get_device_property_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_atom_t property;
+ xcb_atom_t type;
+ uint32_t offset;
+ uint32_t len;
+ uint8_t device_id;
+ uint8_t _delete;
+ uint8_t pad0[2];
+} xcb_input_get_device_property_request_t;
+
+/**
+ * @brief xcb_input_get_device_property_items_t
+ **/
+typedef struct xcb_input_get_device_property_items_t {
+ uint8_t *data8;
+ uint16_t *data16;
+ uint32_t *data32;
+} xcb_input_get_device_property_items_t;
+
+/**
+ * @brief xcb_input_get_device_property_reply_t
+ **/
+typedef struct xcb_input_get_device_property_reply_t {
+ uint8_t response_type;
+ uint8_t xi_reply_type;
+ uint16_t sequence;
+ uint32_t length;
+ xcb_atom_t type;
+ uint32_t bytes_after;
+ uint32_t num_items;
+ uint8_t format;
+ uint8_t device_id;
+ uint8_t pad0[10];
+} xcb_input_get_device_property_reply_t;
+
+typedef enum xcb_input_device_t {
+ XCB_INPUT_DEVICE_ALL = 0,
+ XCB_INPUT_DEVICE_ALL_MASTER = 1
+} xcb_input_device_t;
+
+/**
+ * @brief xcb_input_group_info_t
+ **/
+typedef struct xcb_input_group_info_t {
+ uint8_t base;
+ uint8_t latched;
+ uint8_t locked;
+ uint8_t effective;
+} xcb_input_group_info_t;
+
+/**
+ * @brief xcb_input_group_info_iterator_t
+ **/
+typedef struct xcb_input_group_info_iterator_t {
+ xcb_input_group_info_t *data;
+ int rem;
+ int index;
+} xcb_input_group_info_iterator_t;
+
+/**
+ * @brief xcb_input_modifier_info_t
+ **/
+typedef struct xcb_input_modifier_info_t {
+ uint32_t base;
+ uint32_t latched;
+ uint32_t locked;
+ uint32_t effective;
+} xcb_input_modifier_info_t;
+
+/**
+ * @brief xcb_input_modifier_info_iterator_t
+ **/
+typedef struct xcb_input_modifier_info_iterator_t {
+ xcb_input_modifier_info_t *data;
+ int rem;
+ int index;
+} xcb_input_modifier_info_iterator_t;
+
+/**
+ * @brief xcb_input_xi_query_pointer_cookie_t
+ **/
+typedef struct xcb_input_xi_query_pointer_cookie_t {
+ unsigned int sequence;
+} xcb_input_xi_query_pointer_cookie_t;
+
+/** Opcode for xcb_input_xi_query_pointer. */
+#define XCB_INPUT_XI_QUERY_POINTER 40
+
+/**
+ * @brief xcb_input_xi_query_pointer_request_t
+ **/
+typedef struct xcb_input_xi_query_pointer_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_window_t window;
+ xcb_input_device_id_t deviceid;
+ uint8_t pad0[2];
+} xcb_input_xi_query_pointer_request_t;
+
+/**
+ * @brief xcb_input_xi_query_pointer_reply_t
+ **/
+typedef struct xcb_input_xi_query_pointer_reply_t {
+ uint8_t response_type;
+ uint8_t pad0;
+ uint16_t sequence;
+ uint32_t length;
+ xcb_window_t root;
+ xcb_window_t child;
+ xcb_input_fp1616_t root_x;
+ xcb_input_fp1616_t root_y;
+ xcb_input_fp1616_t win_x;
+ xcb_input_fp1616_t win_y;
+ uint8_t same_screen;
+ uint8_t pad1;
+ uint16_t buttons_len;
+ xcb_input_modifier_info_t mods;
+ xcb_input_group_info_t group;
+} xcb_input_xi_query_pointer_reply_t;
+
+/** Opcode for xcb_input_xi_warp_pointer. */
+#define XCB_INPUT_XI_WARP_POINTER 41
+
+/**
+ * @brief xcb_input_xi_warp_pointer_request_t
+ **/
+typedef struct xcb_input_xi_warp_pointer_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_window_t src_win;
+ xcb_window_t dst_win;
+ xcb_input_fp1616_t src_x;
+ xcb_input_fp1616_t src_y;
+ uint16_t src_width;
+ uint16_t src_height;
+ xcb_input_fp1616_t dst_x;
+ xcb_input_fp1616_t dst_y;
+ xcb_input_device_id_t deviceid;
+ uint8_t pad0[2];
+} xcb_input_xi_warp_pointer_request_t;
+
+/** Opcode for xcb_input_xi_change_cursor. */
+#define XCB_INPUT_XI_CHANGE_CURSOR 42
+
+/**
+ * @brief xcb_input_xi_change_cursor_request_t
+ **/
+typedef struct xcb_input_xi_change_cursor_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_window_t window;
+ xcb_cursor_t cursor;
+ xcb_input_device_id_t deviceid;
+ uint8_t pad0[2];
+} xcb_input_xi_change_cursor_request_t;
+
+typedef enum xcb_input_hierarchy_change_type_t {
+ XCB_INPUT_HIERARCHY_CHANGE_TYPE_ADD_MASTER = 1,
+ XCB_INPUT_HIERARCHY_CHANGE_TYPE_REMOVE_MASTER = 2,
+ XCB_INPUT_HIERARCHY_CHANGE_TYPE_ATTACH_SLAVE = 3,
+ XCB_INPUT_HIERARCHY_CHANGE_TYPE_DETACH_SLAVE = 4
+} xcb_input_hierarchy_change_type_t;
+
+typedef enum xcb_input_change_mode_t {
+ XCB_INPUT_CHANGE_MODE_ATTACH = 1,
+ XCB_INPUT_CHANGE_MODE_FLOAT = 2
+} xcb_input_change_mode_t;
+
+/**
+ * @brief xcb_input_add_master_t
+ **/
+typedef struct xcb_input_add_master_t {
+ uint16_t type;
+ uint16_t len;
+ uint16_t name_len;
+ uint8_t send_core;
+ uint8_t enable;
+} xcb_input_add_master_t;
+
+/**
+ * @brief xcb_input_add_master_iterator_t
+ **/
+typedef struct xcb_input_add_master_iterator_t {
+ xcb_input_add_master_t *data;
+ int rem;
+ int index;
+} xcb_input_add_master_iterator_t;
+
+/**
+ * @brief xcb_input_remove_master_t
+ **/
+typedef struct xcb_input_remove_master_t {
+ uint16_t type;
+ uint16_t len;
+ xcb_input_device_id_t deviceid;
+ uint8_t return_mode;
+ uint8_t pad0;
+ xcb_input_device_id_t return_pointer;
+ xcb_input_device_id_t return_keyboard;
+} xcb_input_remove_master_t;
+
+/**
+ * @brief xcb_input_remove_master_iterator_t
+ **/
+typedef struct xcb_input_remove_master_iterator_t {
+ xcb_input_remove_master_t *data;
+ int rem;
+ int index;
+} xcb_input_remove_master_iterator_t;
+
+/**
+ * @brief xcb_input_attach_slave_t
+ **/
+typedef struct xcb_input_attach_slave_t {
+ uint16_t type;
+ uint16_t len;
+ xcb_input_device_id_t deviceid;
+ xcb_input_device_id_t master;
+} xcb_input_attach_slave_t;
+
+/**
+ * @brief xcb_input_attach_slave_iterator_t
+ **/
+typedef struct xcb_input_attach_slave_iterator_t {
+ xcb_input_attach_slave_t *data;
+ int rem;
+ int index;
+} xcb_input_attach_slave_iterator_t;
+
+/**
+ * @brief xcb_input_detach_slave_t
+ **/
+typedef struct xcb_input_detach_slave_t {
+ uint16_t type;
+ uint16_t len;
+ xcb_input_device_id_t deviceid;
+ uint8_t pad0[2];
+} xcb_input_detach_slave_t;
+
+/**
+ * @brief xcb_input_detach_slave_iterator_t
+ **/
+typedef struct xcb_input_detach_slave_iterator_t {
+ xcb_input_detach_slave_t *data;
+ int rem;
+ int index;
+} xcb_input_detach_slave_iterator_t;
+
+/**
+ * @brief xcb_input_hierarchy_change_data_t
+ **/
+typedef struct xcb_input_hierarchy_change_data_t {
+ struct {
+ uint16_t name_len;
+ uint8_t send_core;
+ uint8_t enable;
+ char *name;
+ } add_master;
+ struct {
+ xcb_input_device_id_t deviceid;
+ uint8_t return_mode;
+ uint8_t pad1;
+ xcb_input_device_id_t return_pointer;
+ xcb_input_device_id_t return_keyboard;
+ } remove_master;
+ struct {
+ xcb_input_device_id_t deviceid;
+ xcb_input_device_id_t master;
+ } attach_slave;
+ struct {
+ xcb_input_device_id_t deviceid;
+ uint8_t pad2[2];
+ } detach_slave;
+} xcb_input_hierarchy_change_data_t;
+
+/**
+ * @brief xcb_input_hierarchy_change_t
+ **/
+typedef struct xcb_input_hierarchy_change_t {
+ uint16_t type;
+ uint16_t len;
+} xcb_input_hierarchy_change_t;
+
+void *
+xcb_input_hierarchy_change_data (const xcb_input_hierarchy_change_t *R);
+
+/**
+ * @brief xcb_input_hierarchy_change_iterator_t
+ **/
+typedef struct xcb_input_hierarchy_change_iterator_t {
+ xcb_input_hierarchy_change_t *data;
+ int rem;
+ int index;
+} xcb_input_hierarchy_change_iterator_t;
+
+/** Opcode for xcb_input_xi_change_hierarchy. */
+#define XCB_INPUT_XI_CHANGE_HIERARCHY 43
+
+/**
+ * @brief xcb_input_xi_change_hierarchy_request_t
+ **/
+typedef struct xcb_input_xi_change_hierarchy_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ uint8_t num_changes;
+ uint8_t pad0[3];
+} xcb_input_xi_change_hierarchy_request_t;
+
+/** Opcode for xcb_input_xi_set_client_pointer. */
+#define XCB_INPUT_XI_SET_CLIENT_POINTER 44
+
+/**
+ * @brief xcb_input_xi_set_client_pointer_request_t
+ **/
+typedef struct xcb_input_xi_set_client_pointer_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_window_t window;
+ xcb_input_device_id_t deviceid;
+ uint8_t pad0[2];
+} xcb_input_xi_set_client_pointer_request_t;
+
+/**
+ * @brief xcb_input_xi_get_client_pointer_cookie_t
+ **/
+typedef struct xcb_input_xi_get_client_pointer_cookie_t {
+ unsigned int sequence;
+} xcb_input_xi_get_client_pointer_cookie_t;
+
+/** Opcode for xcb_input_xi_get_client_pointer. */
+#define XCB_INPUT_XI_GET_CLIENT_POINTER 45
+
+/**
+ * @brief xcb_input_xi_get_client_pointer_request_t
+ **/
+typedef struct xcb_input_xi_get_client_pointer_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_window_t window;
+} xcb_input_xi_get_client_pointer_request_t;
+
+/**
+ * @brief xcb_input_xi_get_client_pointer_reply_t
+ **/
+typedef struct xcb_input_xi_get_client_pointer_reply_t {
+ uint8_t response_type;
+ uint8_t pad0;
+ uint16_t sequence;
+ uint32_t length;
+ uint8_t set;
+ uint8_t pad1;
+ xcb_input_device_id_t deviceid;
+ uint8_t pad2[20];
+} xcb_input_xi_get_client_pointer_reply_t;
+
+typedef enum xcb_input_xi_event_mask_t {
+ XCB_INPUT_XI_EVENT_MASK_DEVICE_CHANGED = 2,
+ XCB_INPUT_XI_EVENT_MASK_KEY_PRESS = 4,
+ XCB_INPUT_XI_EVENT_MASK_KEY_RELEASE = 8,
+ XCB_INPUT_XI_EVENT_MASK_BUTTON_PRESS = 16,
+ XCB_INPUT_XI_EVENT_MASK_BUTTON_RELEASE = 32,
+ XCB_INPUT_XI_EVENT_MASK_MOTION = 64,
+ XCB_INPUT_XI_EVENT_MASK_ENTER = 128,
+ XCB_INPUT_XI_EVENT_MASK_LEAVE = 256,
+ XCB_INPUT_XI_EVENT_MASK_FOCUS_IN = 512,
+ XCB_INPUT_XI_EVENT_MASK_FOCUS_OUT = 1024,
+ XCB_INPUT_XI_EVENT_MASK_HIERARCHY = 2048,
+ XCB_INPUT_XI_EVENT_MASK_PROPERTY = 4096,
+ XCB_INPUT_XI_EVENT_MASK_RAW_KEY_PRESS = 8192,
+ XCB_INPUT_XI_EVENT_MASK_RAW_KEY_RELEASE = 16384,
+ XCB_INPUT_XI_EVENT_MASK_RAW_BUTTON_PRESS = 32768,
+ XCB_INPUT_XI_EVENT_MASK_RAW_BUTTON_RELEASE = 65536,
+ XCB_INPUT_XI_EVENT_MASK_RAW_MOTION = 131072,
+ XCB_INPUT_XI_EVENT_MASK_TOUCH_BEGIN = 262144,
+ XCB_INPUT_XI_EVENT_MASK_TOUCH_UPDATE = 524288,
+ XCB_INPUT_XI_EVENT_MASK_TOUCH_END = 1048576,
+ XCB_INPUT_XI_EVENT_MASK_TOUCH_OWNERSHIP = 2097152,
+ XCB_INPUT_XI_EVENT_MASK_RAW_TOUCH_BEGIN = 4194304,
+ XCB_INPUT_XI_EVENT_MASK_RAW_TOUCH_UPDATE = 8388608,
+ XCB_INPUT_XI_EVENT_MASK_RAW_TOUCH_END = 16777216,
+ XCB_INPUT_XI_EVENT_MASK_BARRIER_HIT = 33554432,
+ XCB_INPUT_XI_EVENT_MASK_BARRIER_LEAVE = 67108864
+} xcb_input_xi_event_mask_t;
+
+/**
+ * @brief xcb_input_event_mask_t
+ **/
+typedef struct xcb_input_event_mask_t {
+ xcb_input_device_id_t deviceid;
+ uint16_t mask_len;
+} xcb_input_event_mask_t;
+
+/**
+ * @brief xcb_input_event_mask_iterator_t
+ **/
+typedef struct xcb_input_event_mask_iterator_t {
+ xcb_input_event_mask_t *data;
+ int rem;
+ int index;
+} xcb_input_event_mask_iterator_t;
+
+/** Opcode for xcb_input_xi_select_events. */
+#define XCB_INPUT_XI_SELECT_EVENTS 46
+
+/**
+ * @brief xcb_input_xi_select_events_request_t
+ **/
+typedef struct xcb_input_xi_select_events_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_window_t window;
+ uint16_t num_mask;
+ uint8_t pad0[2];
+} xcb_input_xi_select_events_request_t;
+
+/**
+ * @brief xcb_input_xi_query_version_cookie_t
+ **/
+typedef struct xcb_input_xi_query_version_cookie_t {
+ unsigned int sequence;
+} xcb_input_xi_query_version_cookie_t;
+
+/** Opcode for xcb_input_xi_query_version. */
+#define XCB_INPUT_XI_QUERY_VERSION 47
+
+/**
+ * @brief xcb_input_xi_query_version_request_t
+ **/
+typedef struct xcb_input_xi_query_version_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ uint16_t major_version;
+ uint16_t minor_version;
+} xcb_input_xi_query_version_request_t;
+
+/**
+ * @brief xcb_input_xi_query_version_reply_t
+ **/
+typedef struct xcb_input_xi_query_version_reply_t {
+ uint8_t response_type;
+ uint8_t pad0;
+ uint16_t sequence;
+ uint32_t length;
+ uint16_t major_version;
+ uint16_t minor_version;
+ uint8_t pad1[20];
+} xcb_input_xi_query_version_reply_t;
+
+typedef enum xcb_input_device_class_type_t {
+ XCB_INPUT_DEVICE_CLASS_TYPE_KEY = 0,
+ XCB_INPUT_DEVICE_CLASS_TYPE_BUTTON = 1,
+ XCB_INPUT_DEVICE_CLASS_TYPE_VALUATOR = 2,
+ XCB_INPUT_DEVICE_CLASS_TYPE_SCROLL = 3,
+ XCB_INPUT_DEVICE_CLASS_TYPE_TOUCH = 8
+} xcb_input_device_class_type_t;
+
+typedef enum xcb_input_device_type_t {
+ XCB_INPUT_DEVICE_TYPE_MASTER_POINTER = 1,
+ XCB_INPUT_DEVICE_TYPE_MASTER_KEYBOARD = 2,
+ XCB_INPUT_DEVICE_TYPE_SLAVE_POINTER = 3,
+ XCB_INPUT_DEVICE_TYPE_SLAVE_KEYBOARD = 4,
+ XCB_INPUT_DEVICE_TYPE_FLOATING_SLAVE = 5
+} xcb_input_device_type_t;
+
+typedef enum xcb_input_scroll_flags_t {
+ XCB_INPUT_SCROLL_FLAGS_NO_EMULATION = 1,
+ XCB_INPUT_SCROLL_FLAGS_PREFERRED = 2
+} xcb_input_scroll_flags_t;
+
+typedef enum xcb_input_scroll_type_t {
+ XCB_INPUT_SCROLL_TYPE_VERTICAL = 1,
+ XCB_INPUT_SCROLL_TYPE_HORIZONTAL = 2
+} xcb_input_scroll_type_t;
+
+typedef enum xcb_input_touch_mode_t {
+ XCB_INPUT_TOUCH_MODE_DIRECT = 1,
+ XCB_INPUT_TOUCH_MODE_DEPENDENT = 2
+} xcb_input_touch_mode_t;
+
+/**
+ * @brief xcb_input_button_class_t
+ **/
+typedef struct xcb_input_button_class_t {
+ uint16_t type;
+ uint16_t len;
+ xcb_input_device_id_t sourceid;
+ uint16_t num_buttons;
+} xcb_input_button_class_t;
+
+/**
+ * @brief xcb_input_button_class_iterator_t
+ **/
+typedef struct xcb_input_button_class_iterator_t {
+ xcb_input_button_class_t *data;
+ int rem;
+ int index;
+} xcb_input_button_class_iterator_t;
+
+/**
+ * @brief xcb_input_key_class_t
+ **/
+typedef struct xcb_input_key_class_t {
+ uint16_t type;
+ uint16_t len;
+ xcb_input_device_id_t sourceid;
+ uint16_t num_keys;
+} xcb_input_key_class_t;
+
+/**
+ * @brief xcb_input_key_class_iterator_t
+ **/
+typedef struct xcb_input_key_class_iterator_t {
+ xcb_input_key_class_t *data;
+ int rem;
+ int index;
+} xcb_input_key_class_iterator_t;
+
+/**
+ * @brief xcb_input_scroll_class_t
+ **/
+typedef struct xcb_input_scroll_class_t {
+ uint16_t type;
+ uint16_t len;
+ xcb_input_device_id_t sourceid;
+ uint16_t number;
+ uint16_t scroll_type;
+ uint8_t pad0[2];
+ uint32_t flags;
+ xcb_input_fp3232_t increment;
+} xcb_input_scroll_class_t;
+
+/**
+ * @brief xcb_input_scroll_class_iterator_t
+ **/
+typedef struct xcb_input_scroll_class_iterator_t {
+ xcb_input_scroll_class_t *data;
+ int rem;
+ int index;
+} xcb_input_scroll_class_iterator_t;
+
+/**
+ * @brief xcb_input_touch_class_t
+ **/
+typedef struct xcb_input_touch_class_t {
+ uint16_t type;
+ uint16_t len;
+ xcb_input_device_id_t sourceid;
+ uint8_t mode;
+ uint8_t num_touches;
+} xcb_input_touch_class_t;
+
+/**
+ * @brief xcb_input_touch_class_iterator_t
+ **/
+typedef struct xcb_input_touch_class_iterator_t {
+ xcb_input_touch_class_t *data;
+ int rem;
+ int index;
+} xcb_input_touch_class_iterator_t;
+
+/**
+ * @brief xcb_input_valuator_class_t
+ **/
+typedef struct xcb_input_valuator_class_t {
+ uint16_t type;
+ uint16_t len;
+ xcb_input_device_id_t sourceid;
+ uint16_t number;
+ xcb_atom_t label;
+ xcb_input_fp3232_t min;
+ xcb_input_fp3232_t max;
+ xcb_input_fp3232_t value;
+ uint32_t resolution;
+ uint8_t mode;
+ uint8_t pad0[3];
+} xcb_input_valuator_class_t;
+
+/**
+ * @brief xcb_input_valuator_class_iterator_t
+ **/
+typedef struct xcb_input_valuator_class_iterator_t {
+ xcb_input_valuator_class_t *data;
+ int rem;
+ int index;
+} xcb_input_valuator_class_iterator_t;
+
+/**
+ * @brief xcb_input_device_class_data_t
+ **/
+typedef struct xcb_input_device_class_data_t {
+ struct {
+ uint16_t num_keys;
+ uint32_t *keys;
+ } key;
+ struct {
+ uint16_t num_buttons;
+ uint32_t *state;
+ xcb_atom_t *labels;
+ } button;
+ struct {
+ uint16_t number;
+ xcb_atom_t label;
+ xcb_input_fp3232_t min;
+ xcb_input_fp3232_t max;
+ xcb_input_fp3232_t value;
+ uint32_t resolution;
+ uint8_t mode;
+ uint8_t pad0[3];
+ } valuator;
+ struct {
+ uint16_t number;
+ uint16_t scroll_type;
+ uint8_t pad1[2];
+ uint32_t flags;
+ xcb_input_fp3232_t increment;
+ } scroll;
+ struct {
+ uint8_t mode;
+ uint8_t num_touches;
+ } touch;
+} xcb_input_device_class_data_t;
+
+/**
+ * @brief xcb_input_device_class_t
+ **/
+typedef struct xcb_input_device_class_t {
+ uint16_t type;
+ uint16_t len;
+ xcb_input_device_id_t sourceid;
+} xcb_input_device_class_t;
+
+void *
+xcb_input_device_class_data (const xcb_input_device_class_t *R);
+
+/**
+ * @brief xcb_input_device_class_iterator_t
+ **/
+typedef struct xcb_input_device_class_iterator_t {
+ xcb_input_device_class_t *data;
+ int rem;
+ int index;
+} xcb_input_device_class_iterator_t;
+
+/**
+ * @brief xcb_input_xi_device_info_t
+ **/
+typedef struct xcb_input_xi_device_info_t {
+ xcb_input_device_id_t deviceid;
+ uint16_t type;
+ xcb_input_device_id_t attachment;
+ uint16_t num_classes;
+ uint16_t name_len;
+ uint8_t enabled;
+ uint8_t pad0;
+} xcb_input_xi_device_info_t;
+
+/**
+ * @brief xcb_input_xi_device_info_iterator_t
+ **/
+typedef struct xcb_input_xi_device_info_iterator_t {
+ xcb_input_xi_device_info_t *data;
+ int rem;
+ int index;
+} xcb_input_xi_device_info_iterator_t;
+
+/**
+ * @brief xcb_input_xi_query_device_cookie_t
+ **/
+typedef struct xcb_input_xi_query_device_cookie_t {
+ unsigned int sequence;
+} xcb_input_xi_query_device_cookie_t;
+
+/** Opcode for xcb_input_xi_query_device. */
+#define XCB_INPUT_XI_QUERY_DEVICE 48
+
+/**
+ * @brief xcb_input_xi_query_device_request_t
+ **/
+typedef struct xcb_input_xi_query_device_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_input_device_id_t deviceid;
+ uint8_t pad0[2];
+} xcb_input_xi_query_device_request_t;
+
+/**
+ * @brief xcb_input_xi_query_device_reply_t
+ **/
+typedef struct xcb_input_xi_query_device_reply_t {
+ uint8_t response_type;
+ uint8_t pad0;
+ uint16_t sequence;
+ uint32_t length;
+ uint16_t num_infos;
+ uint8_t pad1[22];
+} xcb_input_xi_query_device_reply_t;
+
+/** Opcode for xcb_input_xi_set_focus. */
+#define XCB_INPUT_XI_SET_FOCUS 49
+
+/**
+ * @brief xcb_input_xi_set_focus_request_t
+ **/
+typedef struct xcb_input_xi_set_focus_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_window_t window;
+ xcb_timestamp_t time;
+ xcb_input_device_id_t deviceid;
+ uint8_t pad0[2];
+} xcb_input_xi_set_focus_request_t;
+
+/**
+ * @brief xcb_input_xi_get_focus_cookie_t
+ **/
+typedef struct xcb_input_xi_get_focus_cookie_t {
+ unsigned int sequence;
+} xcb_input_xi_get_focus_cookie_t;
+
+/** Opcode for xcb_input_xi_get_focus. */
+#define XCB_INPUT_XI_GET_FOCUS 50
+
+/**
+ * @brief xcb_input_xi_get_focus_request_t
+ **/
+typedef struct xcb_input_xi_get_focus_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_input_device_id_t deviceid;
+ uint8_t pad0[2];
+} xcb_input_xi_get_focus_request_t;
+
+/**
+ * @brief xcb_input_xi_get_focus_reply_t
+ **/
+typedef struct xcb_input_xi_get_focus_reply_t {
+ uint8_t response_type;
+ uint8_t pad0;
+ uint16_t sequence;
+ uint32_t length;
+ xcb_window_t focus;
+ uint8_t pad1[20];
+} xcb_input_xi_get_focus_reply_t;
+
+typedef enum xcb_input_grab_owner_t {
+ XCB_INPUT_GRAB_OWNER_NO_OWNER = 0,
+ XCB_INPUT_GRAB_OWNER_OWNER = 1
+} xcb_input_grab_owner_t;
+
+/**
+ * @brief xcb_input_xi_grab_device_cookie_t
+ **/
+typedef struct xcb_input_xi_grab_device_cookie_t {
+ unsigned int sequence;
+} xcb_input_xi_grab_device_cookie_t;
+
+/** Opcode for xcb_input_xi_grab_device. */
+#define XCB_INPUT_XI_GRAB_DEVICE 51
+
+/**
+ * @brief xcb_input_xi_grab_device_request_t
+ **/
+typedef struct xcb_input_xi_grab_device_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_window_t window;
+ xcb_timestamp_t time;
+ xcb_cursor_t cursor;
+ xcb_input_device_id_t deviceid;
+ uint8_t mode;
+ uint8_t paired_device_mode;
+ uint8_t owner_events;
+ uint8_t pad0;
+ uint16_t mask_len;
+} xcb_input_xi_grab_device_request_t;
+
+/**
+ * @brief xcb_input_xi_grab_device_reply_t
+ **/
+typedef struct xcb_input_xi_grab_device_reply_t {
+ uint8_t response_type;
+ uint8_t pad0;
+ uint16_t sequence;
+ uint32_t length;
+ uint8_t status;
+ uint8_t pad1[23];
+} xcb_input_xi_grab_device_reply_t;
+
+/** Opcode for xcb_input_xi_ungrab_device. */
+#define XCB_INPUT_XI_UNGRAB_DEVICE 52
+
+/**
+ * @brief xcb_input_xi_ungrab_device_request_t
+ **/
+typedef struct xcb_input_xi_ungrab_device_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_timestamp_t time;
+ xcb_input_device_id_t deviceid;
+ uint8_t pad0[2];
+} xcb_input_xi_ungrab_device_request_t;
+
+typedef enum xcb_input_event_mode_t {
+ XCB_INPUT_EVENT_MODE_ASYNC_DEVICE = 0,
+ XCB_INPUT_EVENT_MODE_SYNC_DEVICE = 1,
+ XCB_INPUT_EVENT_MODE_REPLAY_DEVICE = 2,
+ XCB_INPUT_EVENT_MODE_ASYNC_PAIRED_DEVICE = 3,
+ XCB_INPUT_EVENT_MODE_ASYNC_PAIR = 4,
+ XCB_INPUT_EVENT_MODE_SYNC_PAIR = 5,
+ XCB_INPUT_EVENT_MODE_ACCEPT_TOUCH = 6,
+ XCB_INPUT_EVENT_MODE_REJECT_TOUCH = 7
+} xcb_input_event_mode_t;
+
+/** Opcode for xcb_input_xi_allow_events. */
+#define XCB_INPUT_XI_ALLOW_EVENTS 53
+
+/**
+ * @brief xcb_input_xi_allow_events_request_t
+ **/
+typedef struct xcb_input_xi_allow_events_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_timestamp_t time;
+ xcb_input_device_id_t deviceid;
+ uint8_t event_mode;
+ uint8_t pad0;
+ uint32_t touchid;
+ xcb_window_t grab_window;
+} xcb_input_xi_allow_events_request_t;
+
+typedef enum xcb_input_grab_mode_22_t {
+ XCB_INPUT_GRAB_MODE_22_SYNC = 0,
+ XCB_INPUT_GRAB_MODE_22_ASYNC = 1,
+ XCB_INPUT_GRAB_MODE_22_TOUCH = 2
+} xcb_input_grab_mode_22_t;
+
+typedef enum xcb_input_grab_type_t {
+ XCB_INPUT_GRAB_TYPE_BUTTON = 0,
+ XCB_INPUT_GRAB_TYPE_KEYCODE = 1,
+ XCB_INPUT_GRAB_TYPE_ENTER = 2,
+ XCB_INPUT_GRAB_TYPE_FOCUS_IN = 3,
+ XCB_INPUT_GRAB_TYPE_TOUCH_BEGIN = 4
+} xcb_input_grab_type_t;
+
+typedef enum xcb_input_modifier_mask_t {
+ XCB_INPUT_MODIFIER_MASK_ANY = 2147483648
+} xcb_input_modifier_mask_t;
+
+/**
+ * @brief xcb_input_grab_modifier_info_t
+ **/
+typedef struct xcb_input_grab_modifier_info_t {
+ uint32_t modifiers;
+ uint8_t status;
+ uint8_t pad0[3];
+} xcb_input_grab_modifier_info_t;
+
+/**
+ * @brief xcb_input_grab_modifier_info_iterator_t
+ **/
+typedef struct xcb_input_grab_modifier_info_iterator_t {
+ xcb_input_grab_modifier_info_t *data;
+ int rem;
+ int index;
+} xcb_input_grab_modifier_info_iterator_t;
+
+/**
+ * @brief xcb_input_xi_passive_grab_device_cookie_t
+ **/
+typedef struct xcb_input_xi_passive_grab_device_cookie_t {
+ unsigned int sequence;
+} xcb_input_xi_passive_grab_device_cookie_t;
+
+/** Opcode for xcb_input_xi_passive_grab_device. */
+#define XCB_INPUT_XI_PASSIVE_GRAB_DEVICE 54
+
+/**
+ * @brief xcb_input_xi_passive_grab_device_request_t
+ **/
+typedef struct xcb_input_xi_passive_grab_device_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_timestamp_t time;
+ xcb_window_t grab_window;
+ xcb_cursor_t cursor;
+ uint32_t detail;
+ xcb_input_device_id_t deviceid;
+ uint16_t num_modifiers;
+ uint16_t mask_len;
+ uint8_t grab_type;
+ uint8_t grab_mode;
+ uint8_t paired_device_mode;
+ uint8_t owner_events;
+ uint8_t pad0[2];
+} xcb_input_xi_passive_grab_device_request_t;
+
+/**
+ * @brief xcb_input_xi_passive_grab_device_reply_t
+ **/
+typedef struct xcb_input_xi_passive_grab_device_reply_t {
+ uint8_t response_type;
+ uint8_t pad0;
+ uint16_t sequence;
+ uint32_t length;
+ uint16_t num_modifiers;
+ uint8_t pad1[22];
+} xcb_input_xi_passive_grab_device_reply_t;
+
+/** Opcode for xcb_input_xi_passive_ungrab_device. */
+#define XCB_INPUT_XI_PASSIVE_UNGRAB_DEVICE 55
+
+/**
+ * @brief xcb_input_xi_passive_ungrab_device_request_t
+ **/
+typedef struct xcb_input_xi_passive_ungrab_device_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_window_t grab_window;
+ uint32_t detail;
+ xcb_input_device_id_t deviceid;
+ uint16_t num_modifiers;
+ uint8_t grab_type;
+ uint8_t pad0[3];
+} xcb_input_xi_passive_ungrab_device_request_t;
+
+/**
+ * @brief xcb_input_xi_list_properties_cookie_t
+ **/
+typedef struct xcb_input_xi_list_properties_cookie_t {
+ unsigned int sequence;
+} xcb_input_xi_list_properties_cookie_t;
+
+/** Opcode for xcb_input_xi_list_properties. */
+#define XCB_INPUT_XI_LIST_PROPERTIES 56
+
+/**
+ * @brief xcb_input_xi_list_properties_request_t
+ **/
+typedef struct xcb_input_xi_list_properties_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_input_device_id_t deviceid;
+ uint8_t pad0[2];
+} xcb_input_xi_list_properties_request_t;
+
+/**
+ * @brief xcb_input_xi_list_properties_reply_t
+ **/
+typedef struct xcb_input_xi_list_properties_reply_t {
+ uint8_t response_type;
+ uint8_t pad0;
+ uint16_t sequence;
+ uint32_t length;
+ uint16_t num_properties;
+ uint8_t pad1[22];
+} xcb_input_xi_list_properties_reply_t;
+
+/**
+ * @brief xcb_input_xi_change_property_items_t
+ **/
+typedef struct xcb_input_xi_change_property_items_t {
+ uint8_t *data8;
+ uint16_t *data16;
+ uint32_t *data32;
+} xcb_input_xi_change_property_items_t;
+
+/** Opcode for xcb_input_xi_change_property. */
+#define XCB_INPUT_XI_CHANGE_PROPERTY 57
+
+/**
+ * @brief xcb_input_xi_change_property_request_t
+ **/
+typedef struct xcb_input_xi_change_property_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_input_device_id_t deviceid;
+ uint8_t mode;
+ uint8_t format;
+ xcb_atom_t property;
+ xcb_atom_t type;
+ uint32_t num_items;
+} xcb_input_xi_change_property_request_t;
+
+/** Opcode for xcb_input_xi_delete_property. */
+#define XCB_INPUT_XI_DELETE_PROPERTY 58
+
+/**
+ * @brief xcb_input_xi_delete_property_request_t
+ **/
+typedef struct xcb_input_xi_delete_property_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_input_device_id_t deviceid;
+ uint8_t pad0[2];
+ xcb_atom_t property;
+} xcb_input_xi_delete_property_request_t;
+
+/**
+ * @brief xcb_input_xi_get_property_cookie_t
+ **/
+typedef struct xcb_input_xi_get_property_cookie_t {
+ unsigned int sequence;
+} xcb_input_xi_get_property_cookie_t;
+
+/** Opcode for xcb_input_xi_get_property. */
+#define XCB_INPUT_XI_GET_PROPERTY 59
+
+/**
+ * @brief xcb_input_xi_get_property_request_t
+ **/
+typedef struct xcb_input_xi_get_property_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_input_device_id_t deviceid;
+ uint8_t _delete;
+ uint8_t pad0;
+ xcb_atom_t property;
+ xcb_atom_t type;
+ uint32_t offset;
+ uint32_t len;
+} xcb_input_xi_get_property_request_t;
+
+/**
+ * @brief xcb_input_xi_get_property_items_t
+ **/
+typedef struct xcb_input_xi_get_property_items_t {
+ uint8_t *data8;
+ uint16_t *data16;
+ uint32_t *data32;
+} xcb_input_xi_get_property_items_t;
+
+/**
+ * @brief xcb_input_xi_get_property_reply_t
+ **/
+typedef struct xcb_input_xi_get_property_reply_t {
+ uint8_t response_type;
+ uint8_t pad0;
+ uint16_t sequence;
+ uint32_t length;
+ xcb_atom_t type;
+ uint32_t bytes_after;
+ uint32_t num_items;
+ uint8_t format;
+ uint8_t pad1[11];
+} xcb_input_xi_get_property_reply_t;
+
+/**
+ * @brief xcb_input_xi_get_selected_events_cookie_t
+ **/
+typedef struct xcb_input_xi_get_selected_events_cookie_t {
+ unsigned int sequence;
+} xcb_input_xi_get_selected_events_cookie_t;
+
+/** Opcode for xcb_input_xi_get_selected_events. */
+#define XCB_INPUT_XI_GET_SELECTED_EVENTS 60
+
+/**
+ * @brief xcb_input_xi_get_selected_events_request_t
+ **/
+typedef struct xcb_input_xi_get_selected_events_request_t {
+ uint8_t major_opcode;
+ uint8_t minor_opcode;
+ uint16_t length;
+ xcb_window_t window;
+} xcb_input_xi_get_selected_events_request_t;
+
+/**
+ * @brief xcb_input_xi_get_selected_events_reply_t
+ **/
+typedef struct xcb_input_xi_get_selected_events_reply_t {
+ uint8_t response_type;
+ uint8_t pad0;
+ uint16_t sequence;
+ uint32_t length;
+ uint16_t num_masks;
+ uint8_t pad1[22];
+} xcb_input_xi_get_selected_events_reply_t;
+
+/** Opcode for xcb_input_device_valuator. */
+#define XCB_INPUT_DEVICE_VALUATOR 0
+
+/**
+ * @brief xcb_input_device_valuator_event_t
+ **/
+typedef struct xcb_input_device_valuator_event_t {
+ uint8_t response_type;
+ uint8_t device_id;
+ uint16_t sequence;
+ uint16_t device_state;
+ uint8_t num_valuators;
+ uint8_t first_valuator;
+ int32_t valuators[6];
+} xcb_input_device_valuator_event_t;
+
+typedef enum xcb_input_more_events_mask_t {
+ XCB_INPUT_MORE_EVENTS_MASK_MORE_EVENTS = 128
+} xcb_input_more_events_mask_t;
+
+/** Opcode for xcb_input_device_key_press. */
+#define XCB_INPUT_DEVICE_KEY_PRESS 1
+
+/**
+ * @brief xcb_input_device_key_press_event_t
+ **/
+typedef struct xcb_input_device_key_press_event_t {
+ uint8_t response_type;
+ uint8_t detail;
+ uint16_t sequence;
+ xcb_timestamp_t time;
+ xcb_window_t root;
+ xcb_window_t event;
+ xcb_window_t child;
+ int16_t root_x;
+ int16_t root_y;
+ int16_t event_x;
+ int16_t event_y;
+ uint16_t state;
+ uint8_t same_screen;
+ uint8_t device_id;
+} xcb_input_device_key_press_event_t;
+
+/** Opcode for xcb_input_device_key_release. */
+#define XCB_INPUT_DEVICE_KEY_RELEASE 2
+
+typedef xcb_input_device_key_press_event_t xcb_input_device_key_release_event_t;
+
+/** Opcode for xcb_input_device_button_press. */
+#define XCB_INPUT_DEVICE_BUTTON_PRESS 3
+
+typedef xcb_input_device_key_press_event_t xcb_input_device_button_press_event_t;
+
+/** Opcode for xcb_input_device_button_release. */
+#define XCB_INPUT_DEVICE_BUTTON_RELEASE 4
+
+typedef xcb_input_device_key_press_event_t xcb_input_device_button_release_event_t;
+
+/** Opcode for xcb_input_device_motion_notify. */
+#define XCB_INPUT_DEVICE_MOTION_NOTIFY 5
+
+typedef xcb_input_device_key_press_event_t xcb_input_device_motion_notify_event_t;
+
+/** Opcode for xcb_input_device_focus_in. */
+#define XCB_INPUT_DEVICE_FOCUS_IN 6
+
+/**
+ * @brief xcb_input_device_focus_in_event_t
+ **/
+typedef struct xcb_input_device_focus_in_event_t {
+ uint8_t response_type;
+ uint8_t detail;
+ uint16_t sequence;
+ xcb_timestamp_t time;
+ xcb_window_t window;
+ uint8_t mode;
+ uint8_t device_id;
+ uint8_t pad0[18];
+} xcb_input_device_focus_in_event_t;
+
+/** Opcode for xcb_input_device_focus_out. */
+#define XCB_INPUT_DEVICE_FOCUS_OUT 7
+
+typedef xcb_input_device_focus_in_event_t xcb_input_device_focus_out_event_t;
+
+/** Opcode for xcb_input_proximity_in. */
+#define XCB_INPUT_PROXIMITY_IN 8
+
+typedef xcb_input_device_key_press_event_t xcb_input_proximity_in_event_t;
+
+/** Opcode for xcb_input_proximity_out. */
+#define XCB_INPUT_PROXIMITY_OUT 9
+
+typedef xcb_input_device_key_press_event_t xcb_input_proximity_out_event_t;
+
+typedef enum xcb_input_classes_reported_mask_t {
+ XCB_INPUT_CLASSES_REPORTED_MASK_OUT_OF_PROXIMITY = 128,
+ XCB_INPUT_CLASSES_REPORTED_MASK_DEVICE_MODE_ABSOLUTE = 64,
+ XCB_INPUT_CLASSES_REPORTED_MASK_REPORTING_VALUATORS = 4,
+ XCB_INPUT_CLASSES_REPORTED_MASK_REPORTING_BUTTONS = 2,
+ XCB_INPUT_CLASSES_REPORTED_MASK_REPORTING_KEYS = 1
+} xcb_input_classes_reported_mask_t;
+
+/** Opcode for xcb_input_device_state_notify. */
+#define XCB_INPUT_DEVICE_STATE_NOTIFY 10
+
+/**
+ * @brief xcb_input_device_state_notify_event_t
+ **/
+typedef struct xcb_input_device_state_notify_event_t {
+ uint8_t response_type;
+ uint8_t device_id;
+ uint16_t sequence;
+ xcb_timestamp_t time;
+ uint8_t num_keys;
+ uint8_t num_buttons;
+ uint8_t num_valuators;
+ uint8_t classes_reported;
+ uint8_t buttons[4];
+ uint8_t keys[4];
+ uint32_t valuators[3];
+} xcb_input_device_state_notify_event_t;
+
+/** Opcode for xcb_input_device_mapping_notify. */
+#define XCB_INPUT_DEVICE_MAPPING_NOTIFY 11
+
+/**
+ * @brief xcb_input_device_mapping_notify_event_t
+ **/
+typedef struct xcb_input_device_mapping_notify_event_t {
+ uint8_t response_type;
+ uint8_t device_id;
+ uint16_t sequence;
+ uint8_t request;
+ xcb_input_key_code_t first_keycode;
+ uint8_t count;
+ uint8_t pad0;
+ xcb_timestamp_t time;
+ uint8_t pad1[20];
+} xcb_input_device_mapping_notify_event_t;
+
+typedef enum xcb_input_change_device_t {
+ XCB_INPUT_CHANGE_DEVICE_NEW_POINTER = 0,
+ XCB_INPUT_CHANGE_DEVICE_NEW_KEYBOARD = 1
+} xcb_input_change_device_t;
+
+/** Opcode for xcb_input_change_device_notify. */
+#define XCB_INPUT_CHANGE_DEVICE_NOTIFY 12
+
+/**
+ * @brief xcb_input_change_device_notify_event_t
+ **/
+typedef struct xcb_input_change_device_notify_event_t {
+ uint8_t response_type;
+ uint8_t device_id;
+ uint16_t sequence;
+ xcb_timestamp_t time;
+ uint8_t request;
+ uint8_t pad0[23];
+} xcb_input_change_device_notify_event_t;
+
+/** Opcode for xcb_input_device_key_state_notify. */
+#define XCB_INPUT_DEVICE_KEY_STATE_NOTIFY 13
+
+/**
+ * @brief xcb_input_device_key_state_notify_event_t
+ **/
+typedef struct xcb_input_device_key_state_notify_event_t {
+ uint8_t response_type;
+ uint8_t device_id;
+ uint16_t sequence;
+ uint8_t keys[28];
+} xcb_input_device_key_state_notify_event_t;
+
+/** Opcode for xcb_input_device_button_state_notify. */
+#define XCB_INPUT_DEVICE_BUTTON_STATE_NOTIFY 14
+
+/**
+ * @brief xcb_input_device_button_state_notify_event_t
+ **/
+typedef struct xcb_input_device_button_state_notify_event_t {
+ uint8_t response_type;
+ uint8_t device_id;
+ uint16_t sequence;
+ uint8_t buttons[28];
+} xcb_input_device_button_state_notify_event_t;
+
+typedef enum xcb_input_device_change_t {
+ XCB_INPUT_DEVICE_CHANGE_ADDED = 0,
+ XCB_INPUT_DEVICE_CHANGE_REMOVED = 1,
+ XCB_INPUT_DEVICE_CHANGE_ENABLED = 2,
+ XCB_INPUT_DEVICE_CHANGE_DISABLED = 3,
+ XCB_INPUT_DEVICE_CHANGE_UNRECOVERABLE = 4,
+ XCB_INPUT_DEVICE_CHANGE_CONTROL_CHANGED = 5
+} xcb_input_device_change_t;
+
+/** Opcode for xcb_input_device_presence_notify. */
+#define XCB_INPUT_DEVICE_PRESENCE_NOTIFY 15
+
+/**
+ * @brief xcb_input_device_presence_notify_event_t
+ **/
+typedef struct xcb_input_device_presence_notify_event_t {
+ uint8_t response_type;
+ uint8_t pad0;
+ uint16_t sequence;
+ xcb_timestamp_t time;
+ uint8_t devchange;
+ uint8_t device_id;
+ uint16_t control;
+ uint8_t pad1[20];
+} xcb_input_device_presence_notify_event_t;
+
+/** Opcode for xcb_input_device_property_notify. */
+#define XCB_INPUT_DEVICE_PROPERTY_NOTIFY 16
+
+/**
+ * @brief xcb_input_device_property_notify_event_t
+ **/
+typedef struct xcb_input_device_property_notify_event_t {
+ uint8_t response_type;
+ uint8_t state;
+ uint16_t sequence;
+ xcb_timestamp_t time;
+ xcb_atom_t property;
+ uint8_t pad0[19];
+ uint8_t device_id;
+} xcb_input_device_property_notify_event_t;
+
+typedef enum xcb_input_change_reason_t {
+ XCB_INPUT_CHANGE_REASON_SLAVE_SWITCH = 1,
+ XCB_INPUT_CHANGE_REASON_DEVICE_CHANGE = 2
+} xcb_input_change_reason_t;
+
+/** Opcode for xcb_input_device_changed. */
+#define XCB_INPUT_DEVICE_CHANGED 1
+
+/**
+ * @brief xcb_input_device_changed_event_t
+ **/
+typedef struct xcb_input_device_changed_event_t {
+ uint8_t response_type;
+ uint8_t extension;
+ uint16_t sequence;
+ uint32_t length;
+ uint16_t event_type;
+ xcb_input_device_id_t deviceid;
+ xcb_timestamp_t time;
+ uint16_t num_classes;
+ xcb_input_device_id_t sourceid;
+ uint8_t reason;
+ uint8_t pad0[11];
+ uint32_t full_sequence;
+} xcb_input_device_changed_event_t;
+
+typedef enum xcb_input_key_event_flags_t {
+ XCB_INPUT_KEY_EVENT_FLAGS_KEY_REPEAT = 65536
+} xcb_input_key_event_flags_t;
+
+/** Opcode for xcb_input_key_press. */
+#define XCB_INPUT_KEY_PRESS 2
+
+/**
+ * @brief xcb_input_key_press_event_t
+ **/
+typedef struct xcb_input_key_press_event_t {
+ uint8_t response_type;
+ uint8_t extension;
+ uint16_t sequence;
+ uint32_t length;
+ uint16_t event_type;
+ xcb_input_device_id_t deviceid;
+ xcb_timestamp_t time;
+ uint32_t detail;
+ xcb_window_t root;
+ xcb_window_t event;
+ xcb_window_t child;
+ uint32_t full_sequence;
+ xcb_input_fp1616_t root_x;
+ xcb_input_fp1616_t root_y;
+ xcb_input_fp1616_t event_x;
+ xcb_input_fp1616_t event_y;
+ uint16_t buttons_len;
+ uint16_t valuators_len;
+ xcb_input_device_id_t sourceid;
+ uint8_t pad0[2];
+ uint32_t flags;
+ xcb_input_modifier_info_t mods;
+ xcb_input_group_info_t group;
+} xcb_input_key_press_event_t;
+
+/** Opcode for xcb_input_key_release. */
+#define XCB_INPUT_KEY_RELEASE 3
+
+typedef xcb_input_key_press_event_t xcb_input_key_release_event_t;
+
+typedef enum xcb_input_pointer_event_flags_t {
+ XCB_INPUT_POINTER_EVENT_FLAGS_POINTER_EMULATED = 65536
+} xcb_input_pointer_event_flags_t;
+
+/** Opcode for xcb_input_button_press. */
+#define XCB_INPUT_BUTTON_PRESS 4
+
+/**
+ * @brief xcb_input_button_press_event_t
+ **/
+typedef struct xcb_input_button_press_event_t {
+ uint8_t response_type;
+ uint8_t extension;
+ uint16_t sequence;
+ uint32_t length;
+ uint16_t event_type;
+ xcb_input_device_id_t deviceid;
+ xcb_timestamp_t time;
+ uint32_t detail;
+ xcb_window_t root;
+ xcb_window_t event;
+ xcb_window_t child;
+ uint32_t full_sequence;
+ xcb_input_fp1616_t root_x;
+ xcb_input_fp1616_t root_y;
+ xcb_input_fp1616_t event_x;
+ xcb_input_fp1616_t event_y;
+ uint16_t buttons_len;
+ uint16_t valuators_len;
+ xcb_input_device_id_t sourceid;
+ uint8_t pad0[2];
+ uint32_t flags;
+ xcb_input_modifier_info_t mods;
+ xcb_input_group_info_t group;
+} xcb_input_button_press_event_t;
+
+/** Opcode for xcb_input_button_release. */
+#define XCB_INPUT_BUTTON_RELEASE 5
+
+typedef xcb_input_button_press_event_t xcb_input_button_release_event_t;
+
+/** Opcode for xcb_input_motion. */
+#define XCB_INPUT_MOTION 6
+
+typedef xcb_input_button_press_event_t xcb_input_motion_event_t;
+
+typedef enum xcb_input_notify_mode_t {
+ XCB_INPUT_NOTIFY_MODE_NORMAL = 0,
+ XCB_INPUT_NOTIFY_MODE_GRAB = 1,
+ XCB_INPUT_NOTIFY_MODE_UNGRAB = 2,
+ XCB_INPUT_NOTIFY_MODE_WHILE_GRABBED = 3,
+ XCB_INPUT_NOTIFY_MODE_PASSIVE_GRAB = 4,
+ XCB_INPUT_NOTIFY_MODE_PASSIVE_UNGRAB = 5
+} xcb_input_notify_mode_t;
+
+typedef enum xcb_input_notify_detail_t {
+ XCB_INPUT_NOTIFY_DETAIL_ANCESTOR = 0,
+ XCB_INPUT_NOTIFY_DETAIL_VIRTUAL = 1,
+ XCB_INPUT_NOTIFY_DETAIL_INFERIOR = 2,
+ XCB_INPUT_NOTIFY_DETAIL_NONLINEAR = 3,
+ XCB_INPUT_NOTIFY_DETAIL_NONLINEAR_VIRTUAL = 4,
+ XCB_INPUT_NOTIFY_DETAIL_POINTER = 5,
+ XCB_INPUT_NOTIFY_DETAIL_POINTER_ROOT = 6,
+ XCB_INPUT_NOTIFY_DETAIL_NONE = 7
+} xcb_input_notify_detail_t;
+
+/** Opcode for xcb_input_enter. */
+#define XCB_INPUT_ENTER 7
+
+/**
+ * @brief xcb_input_enter_event_t
+ **/
+typedef struct xcb_input_enter_event_t {
+ uint8_t response_type;
+ uint8_t extension;
+ uint16_t sequence;
+ uint32_t length;
+ uint16_t event_type;
+ xcb_input_device_id_t deviceid;
+ xcb_timestamp_t time;
+ xcb_input_device_id_t sourceid;
+ uint8_t mode;
+ uint8_t detail;
+ xcb_window_t root;
+ xcb_window_t event;
+ xcb_window_t child;
+ uint32_t full_sequence;
+ xcb_input_fp1616_t root_x;
+ xcb_input_fp1616_t root_y;
+ xcb_input_fp1616_t event_x;
+ xcb_input_fp1616_t event_y;
+ uint8_t same_screen;
+ uint8_t focus;
+ uint16_t buttons_len;
+ xcb_input_modifier_info_t mods;
+ xcb_input_group_info_t group;
+} xcb_input_enter_event_t;
+
+/** Opcode for xcb_input_leave. */
+#define XCB_INPUT_LEAVE 8
+
+typedef xcb_input_enter_event_t xcb_input_leave_event_t;
+
+/** Opcode for xcb_input_focus_in. */
+#define XCB_INPUT_FOCUS_IN 9
+
+typedef xcb_input_enter_event_t xcb_input_focus_in_event_t;
+
+/** Opcode for xcb_input_focus_out. */
+#define XCB_INPUT_FOCUS_OUT 10
+
+typedef xcb_input_enter_event_t xcb_input_focus_out_event_t;
+
+typedef enum xcb_input_hierarchy_mask_t {
+ XCB_INPUT_HIERARCHY_MASK_MASTER_ADDED = 1,
+ XCB_INPUT_HIERARCHY_MASK_MASTER_REMOVED = 2,
+ XCB_INPUT_HIERARCHY_MASK_SLAVE_ADDED = 4,
+ XCB_INPUT_HIERARCHY_MASK_SLAVE_REMOVED = 8,
+ XCB_INPUT_HIERARCHY_MASK_SLAVE_ATTACHED = 16,
+ XCB_INPUT_HIERARCHY_MASK_SLAVE_DETACHED = 32,
+ XCB_INPUT_HIERARCHY_MASK_DEVICE_ENABLED = 64,
+ XCB_INPUT_HIERARCHY_MASK_DEVICE_DISABLED = 128
+} xcb_input_hierarchy_mask_t;
+
+/**
+ * @brief xcb_input_hierarchy_info_t
+ **/
+typedef struct xcb_input_hierarchy_info_t {
+ xcb_input_device_id_t deviceid;
+ xcb_input_device_id_t attachment;
+ uint8_t type;
+ uint8_t enabled;
+ uint8_t pad0[2];
+ uint32_t flags;
+} xcb_input_hierarchy_info_t;
+
+/**
+ * @brief xcb_input_hierarchy_info_iterator_t
+ **/
+typedef struct xcb_input_hierarchy_info_iterator_t {
+ xcb_input_hierarchy_info_t *data;
+ int rem;
+ int index;
+} xcb_input_hierarchy_info_iterator_t;
+
+/** Opcode for xcb_input_hierarchy. */
+#define XCB_INPUT_HIERARCHY 11
+
+/**
+ * @brief xcb_input_hierarchy_event_t
+ **/
+typedef struct xcb_input_hierarchy_event_t {
+ uint8_t response_type;
+ uint8_t extension;
+ uint16_t sequence;
+ uint32_t length;
+ uint16_t event_type;
+ xcb_input_device_id_t deviceid;
+ xcb_timestamp_t time;
+ uint32_t flags;
+ uint16_t num_infos;
+ uint8_t pad0[10];
+ uint32_t full_sequence;
+} xcb_input_hierarchy_event_t;
+
+typedef enum xcb_input_property_flag_t {
+ XCB_INPUT_PROPERTY_FLAG_DELETED = 0,
+ XCB_INPUT_PROPERTY_FLAG_CREATED = 1,
+ XCB_INPUT_PROPERTY_FLAG_MODIFIED = 2
+} xcb_input_property_flag_t;
+
+/** Opcode for xcb_input_property. */
+#define XCB_INPUT_PROPERTY 12
+
+/**
+ * @brief xcb_input_property_event_t
+ **/
+typedef struct xcb_input_property_event_t {
+ uint8_t response_type;
+ uint8_t extension;
+ uint16_t sequence;
+ uint32_t length;
+ uint16_t event_type;
+ xcb_input_device_id_t deviceid;
+ xcb_timestamp_t time;
+ xcb_atom_t property;
+ uint8_t what;
+ uint8_t pad0[11];
+ uint32_t full_sequence;
+} xcb_input_property_event_t;
+
+/** Opcode for xcb_input_raw_key_press. */
+#define XCB_INPUT_RAW_KEY_PRESS 13
+
+/**
+ * @brief xcb_input_raw_key_press_event_t
+ **/
+typedef struct xcb_input_raw_key_press_event_t {
+ uint8_t response_type;
+ uint8_t extension;
+ uint16_t sequence;
+ uint32_t length;
+ uint16_t event_type;
+ xcb_input_device_id_t deviceid;
+ xcb_timestamp_t time;
+ uint32_t detail;
+ xcb_input_device_id_t sourceid;
+ uint16_t valuators_len;
+ uint32_t flags;
+ uint8_t pad0[4];
+ uint32_t full_sequence;
+} xcb_input_raw_key_press_event_t;
+
+/** Opcode for xcb_input_raw_key_release. */
+#define XCB_INPUT_RAW_KEY_RELEASE 14
+
+typedef xcb_input_raw_key_press_event_t xcb_input_raw_key_release_event_t;
+
+/** Opcode for xcb_input_raw_button_press. */
+#define XCB_INPUT_RAW_BUTTON_PRESS 15
+
+/**
+ * @brief xcb_input_raw_button_press_event_t
+ **/
+typedef struct xcb_input_raw_button_press_event_t {
+ uint8_t response_type;
+ uint8_t extension;
+ uint16_t sequence;
+ uint32_t length;
+ uint16_t event_type;
+ xcb_input_device_id_t deviceid;
+ xcb_timestamp_t time;
+ uint32_t detail;
+ xcb_input_device_id_t sourceid;
+ uint16_t valuators_len;
+ uint32_t flags;
+ uint8_t pad0[4];
+ uint32_t full_sequence;
+} xcb_input_raw_button_press_event_t;
+
+/** Opcode for xcb_input_raw_button_release. */
+#define XCB_INPUT_RAW_BUTTON_RELEASE 16
+
+typedef xcb_input_raw_button_press_event_t xcb_input_raw_button_release_event_t;
+
+/** Opcode for xcb_input_raw_motion. */
+#define XCB_INPUT_RAW_MOTION 17
+
+typedef xcb_input_raw_button_press_event_t xcb_input_raw_motion_event_t;
+
+typedef enum xcb_input_touch_event_flags_t {
+ XCB_INPUT_TOUCH_EVENT_FLAGS_TOUCH_PENDING_END = 65536,
+ XCB_INPUT_TOUCH_EVENT_FLAGS_TOUCH_EMULATING_POINTER = 131072
+} xcb_input_touch_event_flags_t;
+
+/** Opcode for xcb_input_touch_begin. */
+#define XCB_INPUT_TOUCH_BEGIN 18
+
+/**
+ * @brief xcb_input_touch_begin_event_t
+ **/
+typedef struct xcb_input_touch_begin_event_t {
+ uint8_t response_type;
+ uint8_t extension;
+ uint16_t sequence;
+ uint32_t length;
+ uint16_t event_type;
+ xcb_input_device_id_t deviceid;
+ xcb_timestamp_t time;
+ uint32_t detail;
+ xcb_window_t root;
+ xcb_window_t event;
+ xcb_window_t child;
+ uint32_t full_sequence;
+ xcb_input_fp1616_t root_x;
+ xcb_input_fp1616_t root_y;
+ xcb_input_fp1616_t event_x;
+ xcb_input_fp1616_t event_y;
+ uint16_t buttons_len;
+ uint16_t valuators_len;
+ xcb_input_device_id_t sourceid;
+ uint8_t pad0[2];
+ uint32_t flags;
+ xcb_input_modifier_info_t mods;
+ xcb_input_group_info_t group;
+} xcb_input_touch_begin_event_t;
+
+/** Opcode for xcb_input_touch_update. */
+#define XCB_INPUT_TOUCH_UPDATE 19
+
+typedef xcb_input_touch_begin_event_t xcb_input_touch_update_event_t;
+
+/** Opcode for xcb_input_touch_end. */
+#define XCB_INPUT_TOUCH_END 20
+
+typedef xcb_input_touch_begin_event_t xcb_input_touch_end_event_t;
+
+typedef enum xcb_input_touch_ownership_flags_t {
+ XCB_INPUT_TOUCH_OWNERSHIP_FLAGS_NONE = 0
+} xcb_input_touch_ownership_flags_t;
+
+/** Opcode for xcb_input_touch_ownership. */
+#define XCB_INPUT_TOUCH_OWNERSHIP 21
+
+/**
+ * @brief xcb_input_touch_ownership_event_t
+ **/
+typedef struct xcb_input_touch_ownership_event_t {
+ uint8_t response_type;
+ uint8_t extension;
+ uint16_t sequence;
+ uint32_t length;
+ uint16_t event_type;
+ xcb_input_device_id_t deviceid;
+ xcb_timestamp_t time;
+ uint32_t touchid;
+ xcb_window_t root;
+ xcb_window_t event;
+ xcb_window_t child;
+ uint32_t full_sequence;
+ xcb_input_device_id_t sourceid;
+ uint8_t pad0[2];
+ uint32_t flags;
+ uint8_t pad1[8];
+} xcb_input_touch_ownership_event_t;
+
+/** Opcode for xcb_input_raw_touch_begin. */
+#define XCB_INPUT_RAW_TOUCH_BEGIN 22
+
+/**
+ * @brief xcb_input_raw_touch_begin_event_t
+ **/
+typedef struct xcb_input_raw_touch_begin_event_t {
+ uint8_t response_type;
+ uint8_t extension;
+ uint16_t sequence;
+ uint32_t length;
+ uint16_t event_type;
+ xcb_input_device_id_t deviceid;
+ xcb_timestamp_t time;
+ uint32_t detail;
+ xcb_input_device_id_t sourceid;
+ uint16_t valuators_len;
+ uint32_t flags;
+ uint8_t pad0[4];
+ uint32_t full_sequence;
+} xcb_input_raw_touch_begin_event_t;
+
+/** Opcode for xcb_input_raw_touch_update. */
+#define XCB_INPUT_RAW_TOUCH_UPDATE 23
+
+typedef xcb_input_raw_touch_begin_event_t xcb_input_raw_touch_update_event_t;
+
+/** Opcode for xcb_input_raw_touch_end. */
+#define XCB_INPUT_RAW_TOUCH_END 24
+
+typedef xcb_input_raw_touch_begin_event_t xcb_input_raw_touch_end_event_t;
+
+/** Opcode for xcb_input_barrier_hit. */
+#define XCB_INPUT_BARRIER_HIT 25
+
+/** Opcode for xcb_input_barrier_leave. */
+#define XCB_INPUT_BARRIER_LEAVE 26
+
+/** Opcode for xcb_input_device. */
+#define XCB_INPUT_DEVICE 0
+
+/**
+ * @brief xcb_input_device_error_t
+ **/
+typedef struct xcb_input_device_error_t {
+ uint8_t response_type;
+ uint8_t error_code;
+ uint16_t sequence;
+} xcb_input_device_error_t;
+
+/** Opcode for xcb_input_event. */
+#define XCB_INPUT_EVENT 1
+
+/**
+ * @brief xcb_input_event_error_t
+ **/
+typedef struct xcb_input_event_error_t {
+ uint8_t response_type;
+ uint8_t error_code;
+ uint16_t sequence;
+} xcb_input_event_error_t;
+
+/** Opcode for xcb_input_mode. */
+#define XCB_INPUT_MODE 2
+
+/**
+ * @brief xcb_input_mode_error_t
+ **/
+typedef struct xcb_input_mode_error_t {
+ uint8_t response_type;
+ uint8_t error_code;
+ uint16_t sequence;
+} xcb_input_mode_error_t;
+
+/** Opcode for xcb_input_device_busy. */
+#define XCB_INPUT_DEVICE_BUSY 3
+
+/**
+ * @brief xcb_input_device_busy_error_t
+ **/
+typedef struct xcb_input_device_busy_error_t {
+ uint8_t response_type;
+ uint8_t error_code;
+ uint16_t sequence;
+} xcb_input_device_busy_error_t;
+
+/** Opcode for xcb_input_class. */
+#define XCB_INPUT_CLASS 4
+
+/**
+ * @brief xcb_input_class_error_t
+ **/
+typedef struct xcb_input_class_error_t {
+ uint8_t response_type;
+ uint8_t error_code;
+ uint16_t sequence;
+} xcb_input_class_error_t;
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_event_class_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_input_event_class_t)
+ */
+void
+xcb_input_event_class_next (xcb_input_event_class_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_event_class_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_input_event_class_end (xcb_input_event_class_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_key_code_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_input_key_code_t)
+ */
+void
+xcb_input_key_code_next (xcb_input_key_code_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_key_code_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_input_key_code_end (xcb_input_key_code_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_device_id_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_input_device_id_t)
+ */
+void
+xcb_input_device_id_next (xcb_input_device_id_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_device_id_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_input_device_id_end (xcb_input_device_id_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_fp1616_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_input_fp1616_t)
+ */
+void
+xcb_input_fp1616_next (xcb_input_fp1616_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_fp1616_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_input_fp1616_end (xcb_input_fp1616_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_fp3232_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_input_fp3232_t)
+ */
+void
+xcb_input_fp3232_next (xcb_input_fp3232_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_fp3232_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_input_fp3232_end (xcb_input_fp3232_iterator_t i);
+
+int
+xcb_input_get_extension_version_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_get_extension_version_cookie_t
+xcb_input_get_extension_version (xcb_connection_t *c,
+ uint16_t name_len,
+ const char *name);
+
+/**
+ *
+ * @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_input_get_extension_version_cookie_t
+xcb_input_get_extension_version_unchecked (xcb_connection_t *c,
+ uint16_t name_len,
+ const char *name);
+
+/**
+ * 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_input_get_extension_version_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_get_extension_version_reply_t *
+xcb_input_get_extension_version_reply (xcb_connection_t *c,
+ xcb_input_get_extension_version_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_device_info_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_input_device_info_t)
+ */
+void
+xcb_input_device_info_next (xcb_input_device_info_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_device_info_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+xcb_generic_iterator_t
+xcb_input_device_info_end (xcb_input_device_info_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_key_info_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_input_key_info_t)
+ */
+void
+xcb_input_key_info_next (xcb_input_key_info_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_key_info_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+xcb_generic_iterator_t
+xcb_input_key_info_end (xcb_input_key_info_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_button_info_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_input_button_info_t)
+ */
+void
+xcb_input_button_info_next (xcb_input_button_info_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_button_info_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+xcb_generic_iterator_t
+xcb_input_button_info_end (xcb_input_button_info_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_axis_info_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_input_axis_info_t)
+ */
+void
+xcb_input_axis_info_next (xcb_input_axis_info_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_axis_info_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+xcb_generic_iterator_t
+xcb_input_axis_info_end (xcb_input_axis_info_iterator_t i);
+
+int
+xcb_input_valuator_info_sizeof (const void *_buffer);
+
+xcb_input_axis_info_t *
+xcb_input_valuator_info_axes (const xcb_input_valuator_info_t *R);
+
+int
+xcb_input_valuator_info_axes_length (const xcb_input_valuator_info_t *R);
+
+xcb_input_axis_info_iterator_t
+xcb_input_valuator_info_axes_iterator (const xcb_input_valuator_info_t *R);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_valuator_info_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_input_valuator_info_t)
+ */
+void
+xcb_input_valuator_info_next (xcb_input_valuator_info_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_valuator_info_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+xcb_generic_iterator_t
+xcb_input_valuator_info_end (xcb_input_valuator_info_iterator_t i);
+
+xcb_input_axis_info_t *
+xcb_input_input_info_info_valuator_axes (const xcb_input_input_info_info_t *S);
+
+int
+xcb_input_input_info_info_valuator_axes_length (const xcb_input_input_info_t *R,
+ const xcb_input_input_info_info_t *S);
+
+xcb_input_axis_info_iterator_t
+xcb_input_input_info_info_valuator_axes_iterator (const xcb_input_input_info_t *R,
+ const xcb_input_input_info_info_t *S);
+
+int
+xcb_input_input_info_info_serialize (void **_buffer,
+ uint8_t class_id,
+ const xcb_input_input_info_info_t *_aux);
+
+int
+xcb_input_input_info_info_unpack (const void *_buffer,
+ uint8_t class_id,
+ xcb_input_input_info_info_t *_aux);
+
+int
+xcb_input_input_info_info_sizeof (const void *_buffer,
+ uint8_t class_id);
+
+int
+xcb_input_input_info_sizeof (const void *_buffer);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_input_info_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_input_input_info_t)
+ */
+void
+xcb_input_input_info_next (xcb_input_input_info_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_input_info_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+xcb_generic_iterator_t
+xcb_input_input_info_end (xcb_input_input_info_iterator_t i);
+
+int
+xcb_input_device_name_sizeof (const void *_buffer);
+
+char *
+xcb_input_device_name_string (const xcb_input_device_name_t *R);
+
+int
+xcb_input_device_name_string_length (const xcb_input_device_name_t *R);
+
+xcb_generic_iterator_t
+xcb_input_device_name_string_end (const xcb_input_device_name_t *R);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_device_name_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_input_device_name_t)
+ */
+void
+xcb_input_device_name_next (xcb_input_device_name_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_device_name_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+xcb_generic_iterator_t
+xcb_input_device_name_end (xcb_input_device_name_iterator_t i);
+
+int
+xcb_input_list_input_devices_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_list_input_devices_cookie_t
+xcb_input_list_input_devices (xcb_connection_t *c);
+
+/**
+ *
+ * @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_input_list_input_devices_cookie_t
+xcb_input_list_input_devices_unchecked (xcb_connection_t *c);
+
+xcb_input_device_info_t *
+xcb_input_list_input_devices_devices (const xcb_input_list_input_devices_reply_t *R);
+
+int
+xcb_input_list_input_devices_devices_length (const xcb_input_list_input_devices_reply_t *R);
+
+xcb_input_device_info_iterator_t
+xcb_input_list_input_devices_devices_iterator (const xcb_input_list_input_devices_reply_t *R);
+
+int
+xcb_input_list_input_devices_infos_length (const xcb_input_list_input_devices_reply_t *R);
+
+xcb_input_input_info_iterator_t
+xcb_input_list_input_devices_infos_iterator (const xcb_input_list_input_devices_reply_t *R);
+
+int
+xcb_input_list_input_devices_names_length (const xcb_input_list_input_devices_reply_t *R);
+
+xcb_str_iterator_t
+xcb_input_list_input_devices_names_iterator (const xcb_input_list_input_devices_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_input_list_input_devices_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_list_input_devices_reply_t *
+xcb_input_list_input_devices_reply (xcb_connection_t *c,
+ xcb_input_list_input_devices_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_event_type_base_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_input_event_type_base_t)
+ */
+void
+xcb_input_event_type_base_next (xcb_input_event_type_base_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_event_type_base_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_input_event_type_base_end (xcb_input_event_type_base_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_input_class_info_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_input_input_class_info_t)
+ */
+void
+xcb_input_input_class_info_next (xcb_input_input_class_info_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_input_class_info_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+xcb_generic_iterator_t
+xcb_input_input_class_info_end (xcb_input_input_class_info_iterator_t i);
+
+int
+xcb_input_open_device_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_open_device_cookie_t
+xcb_input_open_device (xcb_connection_t *c,
+ uint8_t device_id);
+
+/**
+ *
+ * @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_input_open_device_cookie_t
+xcb_input_open_device_unchecked (xcb_connection_t *c,
+ uint8_t device_id);
+
+xcb_input_input_class_info_t *
+xcb_input_open_device_class_info (const xcb_input_open_device_reply_t *R);
+
+int
+xcb_input_open_device_class_info_length (const xcb_input_open_device_reply_t *R);
+
+xcb_input_input_class_info_iterator_t
+xcb_input_open_device_class_info_iterator (const xcb_input_open_device_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_input_open_device_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_open_device_reply_t *
+xcb_input_open_device_reply (xcb_connection_t *c,
+ xcb_input_open_device_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+/**
+ *
+ * @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_input_close_device_checked (xcb_connection_t *c,
+ uint8_t device_id);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_close_device (xcb_connection_t *c,
+ uint8_t device_id);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_set_device_mode_cookie_t
+xcb_input_set_device_mode (xcb_connection_t *c,
+ uint8_t device_id,
+ uint8_t mode);
+
+/**
+ *
+ * @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_input_set_device_mode_cookie_t
+xcb_input_set_device_mode_unchecked (xcb_connection_t *c,
+ uint8_t device_id,
+ uint8_t mode);
+
+/**
+ * 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_input_set_device_mode_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_set_device_mode_reply_t *
+xcb_input_set_device_mode_reply (xcb_connection_t *c,
+ xcb_input_set_device_mode_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+int
+xcb_input_select_extension_event_sizeof (const void *_buffer);
+
+/**
+ *
+ * @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_input_select_extension_event_checked (xcb_connection_t *c,
+ xcb_window_t window,
+ uint16_t num_classes,
+ const xcb_input_event_class_t *classes);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_select_extension_event (xcb_connection_t *c,
+ xcb_window_t window,
+ uint16_t num_classes,
+ const xcb_input_event_class_t *classes);
+
+xcb_input_event_class_t *
+xcb_input_select_extension_event_classes (const xcb_input_select_extension_event_request_t *R);
+
+int
+xcb_input_select_extension_event_classes_length (const xcb_input_select_extension_event_request_t *R);
+
+xcb_generic_iterator_t
+xcb_input_select_extension_event_classes_end (const xcb_input_select_extension_event_request_t *R);
+
+int
+xcb_input_get_selected_extension_events_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_get_selected_extension_events_cookie_t
+xcb_input_get_selected_extension_events (xcb_connection_t *c,
+ xcb_window_t window);
+
+/**
+ *
+ * @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_input_get_selected_extension_events_cookie_t
+xcb_input_get_selected_extension_events_unchecked (xcb_connection_t *c,
+ xcb_window_t window);
+
+xcb_input_event_class_t *
+xcb_input_get_selected_extension_events_this_classes (const xcb_input_get_selected_extension_events_reply_t *R);
+
+int
+xcb_input_get_selected_extension_events_this_classes_length (const xcb_input_get_selected_extension_events_reply_t *R);
+
+xcb_generic_iterator_t
+xcb_input_get_selected_extension_events_this_classes_end (const xcb_input_get_selected_extension_events_reply_t *R);
+
+xcb_input_event_class_t *
+xcb_input_get_selected_extension_events_all_classes (const xcb_input_get_selected_extension_events_reply_t *R);
+
+int
+xcb_input_get_selected_extension_events_all_classes_length (const xcb_input_get_selected_extension_events_reply_t *R);
+
+xcb_generic_iterator_t
+xcb_input_get_selected_extension_events_all_classes_end (const xcb_input_get_selected_extension_events_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_input_get_selected_extension_events_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_get_selected_extension_events_reply_t *
+xcb_input_get_selected_extension_events_reply (xcb_connection_t *c,
+ xcb_input_get_selected_extension_events_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+int
+xcb_input_change_device_dont_propagate_list_sizeof (const void *_buffer);
+
+/**
+ *
+ * @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_input_change_device_dont_propagate_list_checked (xcb_connection_t *c,
+ xcb_window_t window,
+ uint16_t num_classes,
+ uint8_t mode,
+ const xcb_input_event_class_t *classes);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_change_device_dont_propagate_list (xcb_connection_t *c,
+ xcb_window_t window,
+ uint16_t num_classes,
+ uint8_t mode,
+ const xcb_input_event_class_t *classes);
+
+xcb_input_event_class_t *
+xcb_input_change_device_dont_propagate_list_classes (const xcb_input_change_device_dont_propagate_list_request_t *R);
+
+int
+xcb_input_change_device_dont_propagate_list_classes_length (const xcb_input_change_device_dont_propagate_list_request_t *R);
+
+xcb_generic_iterator_t
+xcb_input_change_device_dont_propagate_list_classes_end (const xcb_input_change_device_dont_propagate_list_request_t *R);
+
+int
+xcb_input_get_device_dont_propagate_list_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_get_device_dont_propagate_list_cookie_t
+xcb_input_get_device_dont_propagate_list (xcb_connection_t *c,
+ xcb_window_t window);
+
+/**
+ *
+ * @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_input_get_device_dont_propagate_list_cookie_t
+xcb_input_get_device_dont_propagate_list_unchecked (xcb_connection_t *c,
+ xcb_window_t window);
+
+xcb_input_event_class_t *
+xcb_input_get_device_dont_propagate_list_classes (const xcb_input_get_device_dont_propagate_list_reply_t *R);
+
+int
+xcb_input_get_device_dont_propagate_list_classes_length (const xcb_input_get_device_dont_propagate_list_reply_t *R);
+
+xcb_generic_iterator_t
+xcb_input_get_device_dont_propagate_list_classes_end (const xcb_input_get_device_dont_propagate_list_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_input_get_device_dont_propagate_list_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_get_device_dont_propagate_list_reply_t *
+xcb_input_get_device_dont_propagate_list_reply (xcb_connection_t *c,
+ xcb_input_get_device_dont_propagate_list_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+int
+xcb_input_device_time_coord_sizeof (const void *_buffer,
+ uint8_t num_axes);
+
+int32_t *
+xcb_input_device_time_coord_axisvalues (const xcb_input_device_time_coord_t *R);
+
+int
+xcb_input_device_time_coord_axisvalues_length (const xcb_input_device_time_coord_t *R,
+ uint8_t num_axes);
+
+xcb_generic_iterator_t
+xcb_input_device_time_coord_axisvalues_end (const xcb_input_device_time_coord_t *R,
+ uint8_t num_axes);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_device_time_coord_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_input_device_time_coord_t)
+ */
+void
+xcb_input_device_time_coord_next (xcb_input_device_time_coord_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_device_time_coord_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_input_device_time_coord_end (xcb_input_device_time_coord_iterator_t i);
+
+int
+xcb_input_get_device_motion_events_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_get_device_motion_events_cookie_t
+xcb_input_get_device_motion_events (xcb_connection_t *c,
+ xcb_timestamp_t start,
+ xcb_timestamp_t stop,
+ uint8_t device_id);
+
+/**
+ *
+ * @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_input_get_device_motion_events_cookie_t
+xcb_input_get_device_motion_events_unchecked (xcb_connection_t *c,
+ xcb_timestamp_t start,
+ xcb_timestamp_t stop,
+ uint8_t device_id);
+
+int
+xcb_input_get_device_motion_events_events_length (const xcb_input_get_device_motion_events_reply_t *R);
+
+xcb_input_device_time_coord_iterator_t
+xcb_input_get_device_motion_events_events_iterator (const xcb_input_get_device_motion_events_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_input_get_device_motion_events_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_get_device_motion_events_reply_t *
+xcb_input_get_device_motion_events_reply (xcb_connection_t *c,
+ xcb_input_get_device_motion_events_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_change_keyboard_device_cookie_t
+xcb_input_change_keyboard_device (xcb_connection_t *c,
+ uint8_t device_id);
+
+/**
+ *
+ * @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_input_change_keyboard_device_cookie_t
+xcb_input_change_keyboard_device_unchecked (xcb_connection_t *c,
+ uint8_t device_id);
+
+/**
+ * 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_input_change_keyboard_device_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_change_keyboard_device_reply_t *
+xcb_input_change_keyboard_device_reply (xcb_connection_t *c,
+ xcb_input_change_keyboard_device_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_change_pointer_device_cookie_t
+xcb_input_change_pointer_device (xcb_connection_t *c,
+ uint8_t x_axis,
+ uint8_t y_axis,
+ uint8_t device_id);
+
+/**
+ *
+ * @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_input_change_pointer_device_cookie_t
+xcb_input_change_pointer_device_unchecked (xcb_connection_t *c,
+ uint8_t x_axis,
+ uint8_t y_axis,
+ uint8_t device_id);
+
+/**
+ * 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_input_change_pointer_device_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_change_pointer_device_reply_t *
+xcb_input_change_pointer_device_reply (xcb_connection_t *c,
+ xcb_input_change_pointer_device_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+int
+xcb_input_grab_device_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_grab_device_cookie_t
+xcb_input_grab_device (xcb_connection_t *c,
+ xcb_window_t grab_window,
+ xcb_timestamp_t time,
+ uint16_t num_classes,
+ uint8_t this_device_mode,
+ uint8_t other_device_mode,
+ uint8_t owner_events,
+ uint8_t device_id,
+ const xcb_input_event_class_t *classes);
+
+/**
+ *
+ * @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_input_grab_device_cookie_t
+xcb_input_grab_device_unchecked (xcb_connection_t *c,
+ xcb_window_t grab_window,
+ xcb_timestamp_t time,
+ uint16_t num_classes,
+ uint8_t this_device_mode,
+ uint8_t other_device_mode,
+ uint8_t owner_events,
+ uint8_t device_id,
+ const xcb_input_event_class_t *classes);
+
+/**
+ * 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_input_grab_device_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_grab_device_reply_t *
+xcb_input_grab_device_reply (xcb_connection_t *c,
+ xcb_input_grab_device_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+/**
+ *
+ * @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_input_ungrab_device_checked (xcb_connection_t *c,
+ xcb_timestamp_t time,
+ uint8_t device_id);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_ungrab_device (xcb_connection_t *c,
+ xcb_timestamp_t time,
+ uint8_t device_id);
+
+int
+xcb_input_grab_device_key_sizeof (const void *_buffer);
+
+/**
+ *
+ * @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_input_grab_device_key_checked (xcb_connection_t *c,
+ xcb_window_t grab_window,
+ uint16_t num_classes,
+ uint16_t modifiers,
+ uint8_t modifier_device,
+ uint8_t grabbed_device,
+ uint8_t key,
+ uint8_t this_device_mode,
+ uint8_t other_device_mode,
+ uint8_t owner_events,
+ const xcb_input_event_class_t *classes);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_grab_device_key (xcb_connection_t *c,
+ xcb_window_t grab_window,
+ uint16_t num_classes,
+ uint16_t modifiers,
+ uint8_t modifier_device,
+ uint8_t grabbed_device,
+ uint8_t key,
+ uint8_t this_device_mode,
+ uint8_t other_device_mode,
+ uint8_t owner_events,
+ const xcb_input_event_class_t *classes);
+
+xcb_input_event_class_t *
+xcb_input_grab_device_key_classes (const xcb_input_grab_device_key_request_t *R);
+
+int
+xcb_input_grab_device_key_classes_length (const xcb_input_grab_device_key_request_t *R);
+
+xcb_generic_iterator_t
+xcb_input_grab_device_key_classes_end (const xcb_input_grab_device_key_request_t *R);
+
+/**
+ *
+ * @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_input_ungrab_device_key_checked (xcb_connection_t *c,
+ xcb_window_t grabWindow,
+ uint16_t modifiers,
+ uint8_t modifier_device,
+ uint8_t key,
+ uint8_t grabbed_device);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_ungrab_device_key (xcb_connection_t *c,
+ xcb_window_t grabWindow,
+ uint16_t modifiers,
+ uint8_t modifier_device,
+ uint8_t key,
+ uint8_t grabbed_device);
+
+int
+xcb_input_grab_device_button_sizeof (const void *_buffer);
+
+/**
+ *
+ * @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_input_grab_device_button_checked (xcb_connection_t *c,
+ xcb_window_t grab_window,
+ uint8_t grabbed_device,
+ uint8_t modifier_device,
+ uint16_t num_classes,
+ uint16_t modifiers,
+ uint8_t this_device_mode,
+ uint8_t other_device_mode,
+ uint8_t button,
+ uint8_t owner_events,
+ const xcb_input_event_class_t *classes);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_grab_device_button (xcb_connection_t *c,
+ xcb_window_t grab_window,
+ uint8_t grabbed_device,
+ uint8_t modifier_device,
+ uint16_t num_classes,
+ uint16_t modifiers,
+ uint8_t this_device_mode,
+ uint8_t other_device_mode,
+ uint8_t button,
+ uint8_t owner_events,
+ const xcb_input_event_class_t *classes);
+
+xcb_input_event_class_t *
+xcb_input_grab_device_button_classes (const xcb_input_grab_device_button_request_t *R);
+
+int
+xcb_input_grab_device_button_classes_length (const xcb_input_grab_device_button_request_t *R);
+
+xcb_generic_iterator_t
+xcb_input_grab_device_button_classes_end (const xcb_input_grab_device_button_request_t *R);
+
+/**
+ *
+ * @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_input_ungrab_device_button_checked (xcb_connection_t *c,
+ xcb_window_t grab_window,
+ uint16_t modifiers,
+ uint8_t modifier_device,
+ uint8_t button,
+ uint8_t grabbed_device);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_ungrab_device_button (xcb_connection_t *c,
+ xcb_window_t grab_window,
+ uint16_t modifiers,
+ uint8_t modifier_device,
+ uint8_t button,
+ uint8_t grabbed_device);
+
+/**
+ *
+ * @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_input_allow_device_events_checked (xcb_connection_t *c,
+ xcb_timestamp_t time,
+ uint8_t mode,
+ uint8_t device_id);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_allow_device_events (xcb_connection_t *c,
+ xcb_timestamp_t time,
+ uint8_t mode,
+ uint8_t device_id);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_get_device_focus_cookie_t
+xcb_input_get_device_focus (xcb_connection_t *c,
+ uint8_t device_id);
+
+/**
+ *
+ * @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_input_get_device_focus_cookie_t
+xcb_input_get_device_focus_unchecked (xcb_connection_t *c,
+ uint8_t device_id);
+
+/**
+ * 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_input_get_device_focus_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_get_device_focus_reply_t *
+xcb_input_get_device_focus_reply (xcb_connection_t *c,
+ xcb_input_get_device_focus_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+/**
+ *
+ * @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_input_set_device_focus_checked (xcb_connection_t *c,
+ xcb_window_t focus,
+ xcb_timestamp_t time,
+ uint8_t revert_to,
+ uint8_t device_id);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_set_device_focus (xcb_connection_t *c,
+ xcb_window_t focus,
+ xcb_timestamp_t time,
+ uint8_t revert_to,
+ uint8_t device_id);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_kbd_feedback_state_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_input_kbd_feedback_state_t)
+ */
+void
+xcb_input_kbd_feedback_state_next (xcb_input_kbd_feedback_state_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_kbd_feedback_state_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_input_kbd_feedback_state_end (xcb_input_kbd_feedback_state_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_ptr_feedback_state_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_input_ptr_feedback_state_t)
+ */
+void
+xcb_input_ptr_feedback_state_next (xcb_input_ptr_feedback_state_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_ptr_feedback_state_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_input_ptr_feedback_state_end (xcb_input_ptr_feedback_state_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_integer_feedback_state_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_input_integer_feedback_state_t)
+ */
+void
+xcb_input_integer_feedback_state_next (xcb_input_integer_feedback_state_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_integer_feedback_state_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_input_integer_feedback_state_end (xcb_input_integer_feedback_state_iterator_t i);
+
+int
+xcb_input_string_feedback_state_sizeof (const void *_buffer);
+
+xcb_keysym_t *
+xcb_input_string_feedback_state_keysyms (const xcb_input_string_feedback_state_t *R);
+
+int
+xcb_input_string_feedback_state_keysyms_length (const xcb_input_string_feedback_state_t *R);
+
+xcb_generic_iterator_t
+xcb_input_string_feedback_state_keysyms_end (const xcb_input_string_feedback_state_t *R);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_string_feedback_state_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_input_string_feedback_state_t)
+ */
+void
+xcb_input_string_feedback_state_next (xcb_input_string_feedback_state_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_string_feedback_state_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_input_string_feedback_state_end (xcb_input_string_feedback_state_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_bell_feedback_state_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_input_bell_feedback_state_t)
+ */
+void
+xcb_input_bell_feedback_state_next (xcb_input_bell_feedback_state_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_bell_feedback_state_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_input_bell_feedback_state_end (xcb_input_bell_feedback_state_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_led_feedback_state_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_input_led_feedback_state_t)
+ */
+void
+xcb_input_led_feedback_state_next (xcb_input_led_feedback_state_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_led_feedback_state_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_input_led_feedback_state_end (xcb_input_led_feedback_state_iterator_t i);
+
+xcb_keysym_t *
+xcb_input_feedback_state_data_string_keysyms (const xcb_input_feedback_state_data_t *S);
+
+int
+xcb_input_feedback_state_data_string_keysyms_length (const xcb_input_feedback_state_t *R,
+ const xcb_input_feedback_state_data_t *S);
+
+xcb_generic_iterator_t
+xcb_input_feedback_state_data_string_keysyms_end (const xcb_input_feedback_state_t *R,
+ const xcb_input_feedback_state_data_t *S);
+
+int
+xcb_input_feedback_state_data_serialize (void **_buffer,
+ uint8_t class_id,
+ const xcb_input_feedback_state_data_t *_aux);
+
+int
+xcb_input_feedback_state_data_unpack (const void *_buffer,
+ uint8_t class_id,
+ xcb_input_feedback_state_data_t *_aux);
+
+int
+xcb_input_feedback_state_data_sizeof (const void *_buffer,
+ uint8_t class_id);
+
+int
+xcb_input_feedback_state_sizeof (const void *_buffer);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_feedback_state_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_input_feedback_state_t)
+ */
+void
+xcb_input_feedback_state_next (xcb_input_feedback_state_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_feedback_state_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_input_feedback_state_end (xcb_input_feedback_state_iterator_t i);
+
+int
+xcb_input_get_feedback_control_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_get_feedback_control_cookie_t
+xcb_input_get_feedback_control (xcb_connection_t *c,
+ uint8_t device_id);
+
+/**
+ *
+ * @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_input_get_feedback_control_cookie_t
+xcb_input_get_feedback_control_unchecked (xcb_connection_t *c,
+ uint8_t device_id);
+
+int
+xcb_input_get_feedback_control_feedbacks_length (const xcb_input_get_feedback_control_reply_t *R);
+
+xcb_input_feedback_state_iterator_t
+xcb_input_get_feedback_control_feedbacks_iterator (const xcb_input_get_feedback_control_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_input_get_feedback_control_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_get_feedback_control_reply_t *
+xcb_input_get_feedback_control_reply (xcb_connection_t *c,
+ xcb_input_get_feedback_control_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_kbd_feedback_ctl_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_input_kbd_feedback_ctl_t)
+ */
+void
+xcb_input_kbd_feedback_ctl_next (xcb_input_kbd_feedback_ctl_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_kbd_feedback_ctl_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_input_kbd_feedback_ctl_end (xcb_input_kbd_feedback_ctl_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_ptr_feedback_ctl_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_input_ptr_feedback_ctl_t)
+ */
+void
+xcb_input_ptr_feedback_ctl_next (xcb_input_ptr_feedback_ctl_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_ptr_feedback_ctl_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_input_ptr_feedback_ctl_end (xcb_input_ptr_feedback_ctl_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_integer_feedback_ctl_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_input_integer_feedback_ctl_t)
+ */
+void
+xcb_input_integer_feedback_ctl_next (xcb_input_integer_feedback_ctl_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_integer_feedback_ctl_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_input_integer_feedback_ctl_end (xcb_input_integer_feedback_ctl_iterator_t i);
+
+int
+xcb_input_string_feedback_ctl_sizeof (const void *_buffer);
+
+xcb_keysym_t *
+xcb_input_string_feedback_ctl_keysyms (const xcb_input_string_feedback_ctl_t *R);
+
+int
+xcb_input_string_feedback_ctl_keysyms_length (const xcb_input_string_feedback_ctl_t *R);
+
+xcb_generic_iterator_t
+xcb_input_string_feedback_ctl_keysyms_end (const xcb_input_string_feedback_ctl_t *R);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_string_feedback_ctl_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_input_string_feedback_ctl_t)
+ */
+void
+xcb_input_string_feedback_ctl_next (xcb_input_string_feedback_ctl_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_string_feedback_ctl_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_input_string_feedback_ctl_end (xcb_input_string_feedback_ctl_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_bell_feedback_ctl_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_input_bell_feedback_ctl_t)
+ */
+void
+xcb_input_bell_feedback_ctl_next (xcb_input_bell_feedback_ctl_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_bell_feedback_ctl_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_input_bell_feedback_ctl_end (xcb_input_bell_feedback_ctl_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_led_feedback_ctl_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_input_led_feedback_ctl_t)
+ */
+void
+xcb_input_led_feedback_ctl_next (xcb_input_led_feedback_ctl_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_led_feedback_ctl_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_input_led_feedback_ctl_end (xcb_input_led_feedback_ctl_iterator_t i);
+
+xcb_keysym_t *
+xcb_input_feedback_ctl_data_string_keysyms (const xcb_input_feedback_ctl_data_t *S);
+
+int
+xcb_input_feedback_ctl_data_string_keysyms_length (const xcb_input_feedback_ctl_t *R,
+ const xcb_input_feedback_ctl_data_t *S);
+
+xcb_generic_iterator_t
+xcb_input_feedback_ctl_data_string_keysyms_end (const xcb_input_feedback_ctl_t *R,
+ const xcb_input_feedback_ctl_data_t *S);
+
+int
+xcb_input_feedback_ctl_data_serialize (void **_buffer,
+ uint8_t class_id,
+ const xcb_input_feedback_ctl_data_t *_aux);
+
+int
+xcb_input_feedback_ctl_data_unpack (const void *_buffer,
+ uint8_t class_id,
+ xcb_input_feedback_ctl_data_t *_aux);
+
+int
+xcb_input_feedback_ctl_data_sizeof (const void *_buffer,
+ uint8_t class_id);
+
+int
+xcb_input_feedback_ctl_sizeof (const void *_buffer);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_feedback_ctl_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_input_feedback_ctl_t)
+ */
+void
+xcb_input_feedback_ctl_next (xcb_input_feedback_ctl_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_feedback_ctl_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_input_feedback_ctl_end (xcb_input_feedback_ctl_iterator_t i);
+
+int
+xcb_input_change_feedback_control_sizeof (const void *_buffer);
+
+/**
+ *
+ * @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_input_change_feedback_control_checked (xcb_connection_t *c,
+ uint32_t mask,
+ uint8_t device_id,
+ uint8_t feedback_id,
+ xcb_input_feedback_ctl_t *feedback);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_change_feedback_control (xcb_connection_t *c,
+ uint32_t mask,
+ uint8_t device_id,
+ uint8_t feedback_id,
+ xcb_input_feedback_ctl_t *feedback);
+
+xcb_input_feedback_ctl_t *
+xcb_input_change_feedback_control_feedback (const xcb_input_change_feedback_control_request_t *R);
+
+int
+xcb_input_get_device_key_mapping_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_get_device_key_mapping_cookie_t
+xcb_input_get_device_key_mapping (xcb_connection_t *c,
+ uint8_t device_id,
+ xcb_input_key_code_t first_keycode,
+ uint8_t count);
+
+/**
+ *
+ * @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_input_get_device_key_mapping_cookie_t
+xcb_input_get_device_key_mapping_unchecked (xcb_connection_t *c,
+ uint8_t device_id,
+ xcb_input_key_code_t first_keycode,
+ uint8_t count);
+
+xcb_keysym_t *
+xcb_input_get_device_key_mapping_keysyms (const xcb_input_get_device_key_mapping_reply_t *R);
+
+int
+xcb_input_get_device_key_mapping_keysyms_length (const xcb_input_get_device_key_mapping_reply_t *R);
+
+xcb_generic_iterator_t
+xcb_input_get_device_key_mapping_keysyms_end (const xcb_input_get_device_key_mapping_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_input_get_device_key_mapping_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_get_device_key_mapping_reply_t *
+xcb_input_get_device_key_mapping_reply (xcb_connection_t *c,
+ xcb_input_get_device_key_mapping_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+int
+xcb_input_change_device_key_mapping_sizeof (const void *_buffer);
+
+/**
+ *
+ * @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_input_change_device_key_mapping_checked (xcb_connection_t *c,
+ uint8_t device_id,
+ xcb_input_key_code_t first_keycode,
+ uint8_t keysyms_per_keycode,
+ uint8_t keycode_count,
+ const xcb_keysym_t *keysyms);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_change_device_key_mapping (xcb_connection_t *c,
+ uint8_t device_id,
+ xcb_input_key_code_t first_keycode,
+ uint8_t keysyms_per_keycode,
+ uint8_t keycode_count,
+ const xcb_keysym_t *keysyms);
+
+xcb_keysym_t *
+xcb_input_change_device_key_mapping_keysyms (const xcb_input_change_device_key_mapping_request_t *R);
+
+int
+xcb_input_change_device_key_mapping_keysyms_length (const xcb_input_change_device_key_mapping_request_t *R);
+
+xcb_generic_iterator_t
+xcb_input_change_device_key_mapping_keysyms_end (const xcb_input_change_device_key_mapping_request_t *R);
+
+int
+xcb_input_get_device_modifier_mapping_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_get_device_modifier_mapping_cookie_t
+xcb_input_get_device_modifier_mapping (xcb_connection_t *c,
+ uint8_t device_id);
+
+/**
+ *
+ * @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_input_get_device_modifier_mapping_cookie_t
+xcb_input_get_device_modifier_mapping_unchecked (xcb_connection_t *c,
+ uint8_t device_id);
+
+uint8_t *
+xcb_input_get_device_modifier_mapping_keymaps (const xcb_input_get_device_modifier_mapping_reply_t *R);
+
+int
+xcb_input_get_device_modifier_mapping_keymaps_length (const xcb_input_get_device_modifier_mapping_reply_t *R);
+
+xcb_generic_iterator_t
+xcb_input_get_device_modifier_mapping_keymaps_end (const xcb_input_get_device_modifier_mapping_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_input_get_device_modifier_mapping_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_get_device_modifier_mapping_reply_t *
+xcb_input_get_device_modifier_mapping_reply (xcb_connection_t *c,
+ xcb_input_get_device_modifier_mapping_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+int
+xcb_input_set_device_modifier_mapping_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_set_device_modifier_mapping_cookie_t
+xcb_input_set_device_modifier_mapping (xcb_connection_t *c,
+ uint8_t device_id,
+ uint8_t keycodes_per_modifier,
+ const uint8_t *keymaps);
+
+/**
+ *
+ * @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_input_set_device_modifier_mapping_cookie_t
+xcb_input_set_device_modifier_mapping_unchecked (xcb_connection_t *c,
+ uint8_t device_id,
+ uint8_t keycodes_per_modifier,
+ const uint8_t *keymaps);
+
+/**
+ * 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_input_set_device_modifier_mapping_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_set_device_modifier_mapping_reply_t *
+xcb_input_set_device_modifier_mapping_reply (xcb_connection_t *c,
+ xcb_input_set_device_modifier_mapping_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+int
+xcb_input_get_device_button_mapping_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_get_device_button_mapping_cookie_t
+xcb_input_get_device_button_mapping (xcb_connection_t *c,
+ uint8_t device_id);
+
+/**
+ *
+ * @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_input_get_device_button_mapping_cookie_t
+xcb_input_get_device_button_mapping_unchecked (xcb_connection_t *c,
+ uint8_t device_id);
+
+uint8_t *
+xcb_input_get_device_button_mapping_map (const xcb_input_get_device_button_mapping_reply_t *R);
+
+int
+xcb_input_get_device_button_mapping_map_length (const xcb_input_get_device_button_mapping_reply_t *R);
+
+xcb_generic_iterator_t
+xcb_input_get_device_button_mapping_map_end (const xcb_input_get_device_button_mapping_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_input_get_device_button_mapping_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_get_device_button_mapping_reply_t *
+xcb_input_get_device_button_mapping_reply (xcb_connection_t *c,
+ xcb_input_get_device_button_mapping_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+int
+xcb_input_set_device_button_mapping_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_set_device_button_mapping_cookie_t
+xcb_input_set_device_button_mapping (xcb_connection_t *c,
+ uint8_t device_id,
+ uint8_t map_size,
+ const uint8_t *map);
+
+/**
+ *
+ * @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_input_set_device_button_mapping_cookie_t
+xcb_input_set_device_button_mapping_unchecked (xcb_connection_t *c,
+ uint8_t device_id,
+ uint8_t map_size,
+ const uint8_t *map);
+
+/**
+ * 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_input_set_device_button_mapping_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_set_device_button_mapping_reply_t *
+xcb_input_set_device_button_mapping_reply (xcb_connection_t *c,
+ xcb_input_set_device_button_mapping_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_key_state_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_input_key_state_t)
+ */
+void
+xcb_input_key_state_next (xcb_input_key_state_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_key_state_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_input_key_state_end (xcb_input_key_state_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_button_state_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_input_button_state_t)
+ */
+void
+xcb_input_button_state_next (xcb_input_button_state_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_button_state_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_input_button_state_end (xcb_input_button_state_iterator_t i);
+
+int
+xcb_input_valuator_state_sizeof (const void *_buffer);
+
+int32_t *
+xcb_input_valuator_state_valuators (const xcb_input_valuator_state_t *R);
+
+int
+xcb_input_valuator_state_valuators_length (const xcb_input_valuator_state_t *R);
+
+xcb_generic_iterator_t
+xcb_input_valuator_state_valuators_end (const xcb_input_valuator_state_t *R);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_valuator_state_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_input_valuator_state_t)
+ */
+void
+xcb_input_valuator_state_next (xcb_input_valuator_state_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_valuator_state_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_input_valuator_state_end (xcb_input_valuator_state_iterator_t i);
+
+int32_t *
+xcb_input_input_state_data_valuator_valuators (const xcb_input_input_state_data_t *S);
+
+int
+xcb_input_input_state_data_valuator_valuators_length (const xcb_input_input_state_t *R,
+ const xcb_input_input_state_data_t *S);
+
+xcb_generic_iterator_t
+xcb_input_input_state_data_valuator_valuators_end (const xcb_input_input_state_t *R,
+ const xcb_input_input_state_data_t *S);
+
+int
+xcb_input_input_state_data_serialize (void **_buffer,
+ uint8_t class_id,
+ const xcb_input_input_state_data_t *_aux);
+
+int
+xcb_input_input_state_data_unpack (const void *_buffer,
+ uint8_t class_id,
+ xcb_input_input_state_data_t *_aux);
+
+int
+xcb_input_input_state_data_sizeof (const void *_buffer,
+ uint8_t class_id);
+
+int
+xcb_input_input_state_sizeof (const void *_buffer);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_input_state_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_input_input_state_t)
+ */
+void
+xcb_input_input_state_next (xcb_input_input_state_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_input_state_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_input_input_state_end (xcb_input_input_state_iterator_t i);
+
+int
+xcb_input_query_device_state_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_query_device_state_cookie_t
+xcb_input_query_device_state (xcb_connection_t *c,
+ uint8_t device_id);
+
+/**
+ *
+ * @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_input_query_device_state_cookie_t
+xcb_input_query_device_state_unchecked (xcb_connection_t *c,
+ uint8_t device_id);
+
+int
+xcb_input_query_device_state_classes_length (const xcb_input_query_device_state_reply_t *R);
+
+xcb_input_input_state_iterator_t
+xcb_input_query_device_state_classes_iterator (const xcb_input_query_device_state_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_input_query_device_state_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_query_device_state_reply_t *
+xcb_input_query_device_state_reply (xcb_connection_t *c,
+ xcb_input_query_device_state_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+/**
+ *
+ * @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_input_device_bell_checked (xcb_connection_t *c,
+ uint8_t device_id,
+ uint8_t feedback_id,
+ uint8_t feedback_class,
+ int8_t percent);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_device_bell (xcb_connection_t *c,
+ uint8_t device_id,
+ uint8_t feedback_id,
+ uint8_t feedback_class,
+ int8_t percent);
+
+int
+xcb_input_set_device_valuators_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_set_device_valuators_cookie_t
+xcb_input_set_device_valuators (xcb_connection_t *c,
+ uint8_t device_id,
+ uint8_t first_valuator,
+ uint8_t num_valuators,
+ const int32_t *valuators);
+
+/**
+ *
+ * @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_input_set_device_valuators_cookie_t
+xcb_input_set_device_valuators_unchecked (xcb_connection_t *c,
+ uint8_t device_id,
+ uint8_t first_valuator,
+ uint8_t num_valuators,
+ const int32_t *valuators);
+
+/**
+ * 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_input_set_device_valuators_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_set_device_valuators_reply_t *
+xcb_input_set_device_valuators_reply (xcb_connection_t *c,
+ xcb_input_set_device_valuators_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+int
+xcb_input_device_resolution_state_sizeof (const void *_buffer);
+
+uint32_t *
+xcb_input_device_resolution_state_resolution_values (const xcb_input_device_resolution_state_t *R);
+
+int
+xcb_input_device_resolution_state_resolution_values_length (const xcb_input_device_resolution_state_t *R);
+
+xcb_generic_iterator_t
+xcb_input_device_resolution_state_resolution_values_end (const xcb_input_device_resolution_state_t *R);
+
+uint32_t *
+xcb_input_device_resolution_state_resolution_min (const xcb_input_device_resolution_state_t *R);
+
+int
+xcb_input_device_resolution_state_resolution_min_length (const xcb_input_device_resolution_state_t *R);
+
+xcb_generic_iterator_t
+xcb_input_device_resolution_state_resolution_min_end (const xcb_input_device_resolution_state_t *R);
+
+uint32_t *
+xcb_input_device_resolution_state_resolution_max (const xcb_input_device_resolution_state_t *R);
+
+int
+xcb_input_device_resolution_state_resolution_max_length (const xcb_input_device_resolution_state_t *R);
+
+xcb_generic_iterator_t
+xcb_input_device_resolution_state_resolution_max_end (const xcb_input_device_resolution_state_t *R);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_device_resolution_state_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_input_device_resolution_state_t)
+ */
+void
+xcb_input_device_resolution_state_next (xcb_input_device_resolution_state_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_device_resolution_state_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_input_device_resolution_state_end (xcb_input_device_resolution_state_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_device_abs_calib_state_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_input_device_abs_calib_state_t)
+ */
+void
+xcb_input_device_abs_calib_state_next (xcb_input_device_abs_calib_state_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_device_abs_calib_state_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_input_device_abs_calib_state_end (xcb_input_device_abs_calib_state_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_device_abs_area_state_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_input_device_abs_area_state_t)
+ */
+void
+xcb_input_device_abs_area_state_next (xcb_input_device_abs_area_state_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_device_abs_area_state_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_input_device_abs_area_state_end (xcb_input_device_abs_area_state_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_device_core_state_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_input_device_core_state_t)
+ */
+void
+xcb_input_device_core_state_next (xcb_input_device_core_state_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_device_core_state_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_input_device_core_state_end (xcb_input_device_core_state_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_device_enable_state_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_input_device_enable_state_t)
+ */
+void
+xcb_input_device_enable_state_next (xcb_input_device_enable_state_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_device_enable_state_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_input_device_enable_state_end (xcb_input_device_enable_state_iterator_t i);
+
+uint32_t *
+xcb_input_device_state_data_resolution_resolution_values (const xcb_input_device_state_data_t *S);
+
+int
+xcb_input_device_state_data_resolution_resolution_values_length (const xcb_input_device_state_t *R,
+ const xcb_input_device_state_data_t *S);
+
+xcb_generic_iterator_t
+xcb_input_device_state_data_resolution_resolution_values_end (const xcb_input_device_state_t *R,
+ const xcb_input_device_state_data_t *S);
+
+uint32_t *
+xcb_input_device_state_data_resolution_resolution_min (const xcb_input_device_state_data_t *S);
+
+int
+xcb_input_device_state_data_resolution_resolution_min_length (const xcb_input_device_state_t *R,
+ const xcb_input_device_state_data_t *S);
+
+xcb_generic_iterator_t
+xcb_input_device_state_data_resolution_resolution_min_end (const xcb_input_device_state_t *R,
+ const xcb_input_device_state_data_t *S);
+
+uint32_t *
+xcb_input_device_state_data_resolution_resolution_max (const xcb_input_device_state_data_t *S);
+
+int
+xcb_input_device_state_data_resolution_resolution_max_length (const xcb_input_device_state_t *R,
+ const xcb_input_device_state_data_t *S);
+
+xcb_generic_iterator_t
+xcb_input_device_state_data_resolution_resolution_max_end (const xcb_input_device_state_t *R,
+ const xcb_input_device_state_data_t *S);
+
+int
+xcb_input_device_state_data_serialize (void **_buffer,
+ uint16_t control_id,
+ const xcb_input_device_state_data_t *_aux);
+
+int
+xcb_input_device_state_data_unpack (const void *_buffer,
+ uint16_t control_id,
+ xcb_input_device_state_data_t *_aux);
+
+int
+xcb_input_device_state_data_sizeof (const void *_buffer,
+ uint16_t control_id);
+
+int
+xcb_input_device_state_sizeof (const void *_buffer);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_device_state_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_input_device_state_t)
+ */
+void
+xcb_input_device_state_next (xcb_input_device_state_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_device_state_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_input_device_state_end (xcb_input_device_state_iterator_t i);
+
+int
+xcb_input_get_device_control_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_get_device_control_cookie_t
+xcb_input_get_device_control (xcb_connection_t *c,
+ uint16_t control_id,
+ uint8_t device_id);
+
+/**
+ *
+ * @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_input_get_device_control_cookie_t
+xcb_input_get_device_control_unchecked (xcb_connection_t *c,
+ uint16_t control_id,
+ uint8_t device_id);
+
+xcb_input_device_state_t *
+xcb_input_get_device_control_control (const xcb_input_get_device_control_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_input_get_device_control_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_get_device_control_reply_t *
+xcb_input_get_device_control_reply (xcb_connection_t *c,
+ xcb_input_get_device_control_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+int
+xcb_input_device_resolution_ctl_sizeof (const void *_buffer);
+
+uint32_t *
+xcb_input_device_resolution_ctl_resolution_values (const xcb_input_device_resolution_ctl_t *R);
+
+int
+xcb_input_device_resolution_ctl_resolution_values_length (const xcb_input_device_resolution_ctl_t *R);
+
+xcb_generic_iterator_t
+xcb_input_device_resolution_ctl_resolution_values_end (const xcb_input_device_resolution_ctl_t *R);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_device_resolution_ctl_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_input_device_resolution_ctl_t)
+ */
+void
+xcb_input_device_resolution_ctl_next (xcb_input_device_resolution_ctl_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_device_resolution_ctl_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_input_device_resolution_ctl_end (xcb_input_device_resolution_ctl_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_device_abs_calib_ctl_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_input_device_abs_calib_ctl_t)
+ */
+void
+xcb_input_device_abs_calib_ctl_next (xcb_input_device_abs_calib_ctl_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_device_abs_calib_ctl_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_input_device_abs_calib_ctl_end (xcb_input_device_abs_calib_ctl_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_device_abs_area_ctrl_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_input_device_abs_area_ctrl_t)
+ */
+void
+xcb_input_device_abs_area_ctrl_next (xcb_input_device_abs_area_ctrl_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_device_abs_area_ctrl_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_input_device_abs_area_ctrl_end (xcb_input_device_abs_area_ctrl_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_device_core_ctrl_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_input_device_core_ctrl_t)
+ */
+void
+xcb_input_device_core_ctrl_next (xcb_input_device_core_ctrl_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_device_core_ctrl_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_input_device_core_ctrl_end (xcb_input_device_core_ctrl_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_device_enable_ctrl_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_input_device_enable_ctrl_t)
+ */
+void
+xcb_input_device_enable_ctrl_next (xcb_input_device_enable_ctrl_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_device_enable_ctrl_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_input_device_enable_ctrl_end (xcb_input_device_enable_ctrl_iterator_t i);
+
+uint32_t *
+xcb_input_device_ctl_data_resolution_resolution_values (const xcb_input_device_ctl_data_t *S);
+
+int
+xcb_input_device_ctl_data_resolution_resolution_values_length (const xcb_input_device_ctl_t *R,
+ const xcb_input_device_ctl_data_t *S);
+
+xcb_generic_iterator_t
+xcb_input_device_ctl_data_resolution_resolution_values_end (const xcb_input_device_ctl_t *R,
+ const xcb_input_device_ctl_data_t *S);
+
+int
+xcb_input_device_ctl_data_serialize (void **_buffer,
+ uint16_t control_id,
+ const xcb_input_device_ctl_data_t *_aux);
+
+int
+xcb_input_device_ctl_data_unpack (const void *_buffer,
+ uint16_t control_id,
+ xcb_input_device_ctl_data_t *_aux);
+
+int
+xcb_input_device_ctl_data_sizeof (const void *_buffer,
+ uint16_t control_id);
+
+int
+xcb_input_device_ctl_sizeof (const void *_buffer);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_device_ctl_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_input_device_ctl_t)
+ */
+void
+xcb_input_device_ctl_next (xcb_input_device_ctl_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_device_ctl_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_input_device_ctl_end (xcb_input_device_ctl_iterator_t i);
+
+int
+xcb_input_change_device_control_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_change_device_control_cookie_t
+xcb_input_change_device_control (xcb_connection_t *c,
+ uint16_t control_id,
+ uint8_t device_id,
+ xcb_input_device_ctl_t *control);
+
+/**
+ *
+ * @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_input_change_device_control_cookie_t
+xcb_input_change_device_control_unchecked (xcb_connection_t *c,
+ uint16_t control_id,
+ uint8_t device_id,
+ xcb_input_device_ctl_t *control);
+
+/**
+ * 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_input_change_device_control_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_change_device_control_reply_t *
+xcb_input_change_device_control_reply (xcb_connection_t *c,
+ xcb_input_change_device_control_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+int
+xcb_input_list_device_properties_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_list_device_properties_cookie_t
+xcb_input_list_device_properties (xcb_connection_t *c,
+ uint8_t device_id);
+
+/**
+ *
+ * @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_input_list_device_properties_cookie_t
+xcb_input_list_device_properties_unchecked (xcb_connection_t *c,
+ uint8_t device_id);
+
+xcb_atom_t *
+xcb_input_list_device_properties_atoms (const xcb_input_list_device_properties_reply_t *R);
+
+int
+xcb_input_list_device_properties_atoms_length (const xcb_input_list_device_properties_reply_t *R);
+
+xcb_generic_iterator_t
+xcb_input_list_device_properties_atoms_end (const xcb_input_list_device_properties_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_input_list_device_properties_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_list_device_properties_reply_t *
+xcb_input_list_device_properties_reply (xcb_connection_t *c,
+ xcb_input_list_device_properties_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+uint8_t *
+xcb_input_change_device_property_items_data_8 (const xcb_input_change_device_property_items_t *S);
+
+int
+xcb_input_change_device_property_items_data_8_length (const xcb_input_change_device_property_request_t *R,
+ const xcb_input_change_device_property_items_t *S);
+
+xcb_generic_iterator_t
+xcb_input_change_device_property_items_data_8_end (const xcb_input_change_device_property_request_t *R,
+ const xcb_input_change_device_property_items_t *S);
+
+uint16_t *
+xcb_input_change_device_property_items_data_16 (const xcb_input_change_device_property_items_t *S);
+
+int
+xcb_input_change_device_property_items_data_16_length (const xcb_input_change_device_property_request_t *R,
+ const xcb_input_change_device_property_items_t *S);
+
+xcb_generic_iterator_t
+xcb_input_change_device_property_items_data_16_end (const xcb_input_change_device_property_request_t *R,
+ const xcb_input_change_device_property_items_t *S);
+
+uint32_t *
+xcb_input_change_device_property_items_data_32 (const xcb_input_change_device_property_items_t *S);
+
+int
+xcb_input_change_device_property_items_data_32_length (const xcb_input_change_device_property_request_t *R,
+ const xcb_input_change_device_property_items_t *S);
+
+xcb_generic_iterator_t
+xcb_input_change_device_property_items_data_32_end (const xcb_input_change_device_property_request_t *R,
+ const xcb_input_change_device_property_items_t *S);
+
+int
+xcb_input_change_device_property_items_serialize (void **_buffer,
+ uint32_t num_items,
+ uint8_t format,
+ const xcb_input_change_device_property_items_t *_aux);
+
+int
+xcb_input_change_device_property_items_unpack (const void *_buffer,
+ uint32_t num_items,
+ uint8_t format,
+ xcb_input_change_device_property_items_t *_aux);
+
+int
+xcb_input_change_device_property_items_sizeof (const void *_buffer,
+ uint32_t num_items,
+ uint8_t format);
+
+int
+xcb_input_change_device_property_sizeof (const void *_buffer);
+
+/**
+ *
+ * @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_input_change_device_property_checked (xcb_connection_t *c,
+ xcb_atom_t property,
+ xcb_atom_t type,
+ uint8_t device_id,
+ uint8_t format,
+ uint8_t mode,
+ uint32_t num_items,
+ const void *items);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_change_device_property (xcb_connection_t *c,
+ xcb_atom_t property,
+ xcb_atom_t type,
+ uint8_t device_id,
+ uint8_t format,
+ uint8_t mode,
+ uint32_t num_items,
+ const void *items);
+
+/**
+ *
+ * @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_input_change_device_property_aux_checked (xcb_connection_t *c,
+ xcb_atom_t property,
+ xcb_atom_t type,
+ uint8_t device_id,
+ uint8_t format,
+ uint8_t mode,
+ uint32_t num_items,
+ const xcb_input_change_device_property_items_t *items);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_change_device_property_aux (xcb_connection_t *c,
+ xcb_atom_t property,
+ xcb_atom_t type,
+ uint8_t device_id,
+ uint8_t format,
+ uint8_t mode,
+ uint32_t num_items,
+ const xcb_input_change_device_property_items_t *items);
+
+void *
+xcb_input_change_device_property_items (const xcb_input_change_device_property_request_t *R);
+
+/**
+ *
+ * @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_input_delete_device_property_checked (xcb_connection_t *c,
+ xcb_atom_t property,
+ uint8_t device_id);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_delete_device_property (xcb_connection_t *c,
+ xcb_atom_t property,
+ uint8_t device_id);
+
+uint8_t *
+xcb_input_get_device_property_items_data_8 (const xcb_input_get_device_property_items_t *S);
+
+int
+xcb_input_get_device_property_items_data_8_length (const xcb_input_get_device_property_reply_t *R,
+ const xcb_input_get_device_property_items_t *S);
+
+xcb_generic_iterator_t
+xcb_input_get_device_property_items_data_8_end (const xcb_input_get_device_property_reply_t *R,
+ const xcb_input_get_device_property_items_t *S);
+
+uint16_t *
+xcb_input_get_device_property_items_data_16 (const xcb_input_get_device_property_items_t *S);
+
+int
+xcb_input_get_device_property_items_data_16_length (const xcb_input_get_device_property_reply_t *R,
+ const xcb_input_get_device_property_items_t *S);
+
+xcb_generic_iterator_t
+xcb_input_get_device_property_items_data_16_end (const xcb_input_get_device_property_reply_t *R,
+ const xcb_input_get_device_property_items_t *S);
+
+uint32_t *
+xcb_input_get_device_property_items_data_32 (const xcb_input_get_device_property_items_t *S);
+
+int
+xcb_input_get_device_property_items_data_32_length (const xcb_input_get_device_property_reply_t *R,
+ const xcb_input_get_device_property_items_t *S);
+
+xcb_generic_iterator_t
+xcb_input_get_device_property_items_data_32_end (const xcb_input_get_device_property_reply_t *R,
+ const xcb_input_get_device_property_items_t *S);
+
+int
+xcb_input_get_device_property_items_serialize (void **_buffer,
+ uint32_t num_items,
+ uint8_t format,
+ const xcb_input_get_device_property_items_t *_aux);
+
+int
+xcb_input_get_device_property_items_unpack (const void *_buffer,
+ uint32_t num_items,
+ uint8_t format,
+ xcb_input_get_device_property_items_t *_aux);
+
+int
+xcb_input_get_device_property_items_sizeof (const void *_buffer,
+ uint32_t num_items,
+ uint8_t format);
+
+int
+xcb_input_get_device_property_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_get_device_property_cookie_t
+xcb_input_get_device_property (xcb_connection_t *c,
+ xcb_atom_t property,
+ xcb_atom_t type,
+ uint32_t offset,
+ uint32_t len,
+ uint8_t device_id,
+ uint8_t _delete);
+
+/**
+ *
+ * @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_input_get_device_property_cookie_t
+xcb_input_get_device_property_unchecked (xcb_connection_t *c,
+ xcb_atom_t property,
+ xcb_atom_t type,
+ uint32_t offset,
+ uint32_t len,
+ uint8_t device_id,
+ uint8_t _delete);
+
+void *
+xcb_input_get_device_property_items (const xcb_input_get_device_property_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_input_get_device_property_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_get_device_property_reply_t *
+xcb_input_get_device_property_reply (xcb_connection_t *c,
+ xcb_input_get_device_property_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_group_info_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_input_group_info_t)
+ */
+void
+xcb_input_group_info_next (xcb_input_group_info_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_group_info_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+xcb_generic_iterator_t
+xcb_input_group_info_end (xcb_input_group_info_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_modifier_info_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_input_modifier_info_t)
+ */
+void
+xcb_input_modifier_info_next (xcb_input_modifier_info_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_modifier_info_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+xcb_generic_iterator_t
+xcb_input_modifier_info_end (xcb_input_modifier_info_iterator_t i);
+
+int
+xcb_input_xi_query_pointer_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_xi_query_pointer_cookie_t
+xcb_input_xi_query_pointer (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_input_device_id_t deviceid);
+
+/**
+ *
+ * @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_input_xi_query_pointer_cookie_t
+xcb_input_xi_query_pointer_unchecked (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_input_device_id_t deviceid);
+
+uint32_t *
+xcb_input_xi_query_pointer_buttons (const xcb_input_xi_query_pointer_reply_t *R);
+
+int
+xcb_input_xi_query_pointer_buttons_length (const xcb_input_xi_query_pointer_reply_t *R);
+
+xcb_generic_iterator_t
+xcb_input_xi_query_pointer_buttons_end (const xcb_input_xi_query_pointer_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_input_xi_query_pointer_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_xi_query_pointer_reply_t *
+xcb_input_xi_query_pointer_reply (xcb_connection_t *c,
+ xcb_input_xi_query_pointer_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+/**
+ *
+ * @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_input_xi_warp_pointer_checked (xcb_connection_t *c,
+ xcb_window_t src_win,
+ xcb_window_t dst_win,
+ xcb_input_fp1616_t src_x,
+ xcb_input_fp1616_t src_y,
+ uint16_t src_width,
+ uint16_t src_height,
+ xcb_input_fp1616_t dst_x,
+ xcb_input_fp1616_t dst_y,
+ xcb_input_device_id_t deviceid);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_xi_warp_pointer (xcb_connection_t *c,
+ xcb_window_t src_win,
+ xcb_window_t dst_win,
+ xcb_input_fp1616_t src_x,
+ xcb_input_fp1616_t src_y,
+ uint16_t src_width,
+ uint16_t src_height,
+ xcb_input_fp1616_t dst_x,
+ xcb_input_fp1616_t dst_y,
+ xcb_input_device_id_t deviceid);
+
+/**
+ *
+ * @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_input_xi_change_cursor_checked (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_cursor_t cursor,
+ xcb_input_device_id_t deviceid);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_xi_change_cursor (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_cursor_t cursor,
+ xcb_input_device_id_t deviceid);
+
+int
+xcb_input_add_master_sizeof (const void *_buffer);
+
+char *
+xcb_input_add_master_name (const xcb_input_add_master_t *R);
+
+int
+xcb_input_add_master_name_length (const xcb_input_add_master_t *R);
+
+xcb_generic_iterator_t
+xcb_input_add_master_name_end (const xcb_input_add_master_t *R);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_add_master_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_input_add_master_t)
+ */
+void
+xcb_input_add_master_next (xcb_input_add_master_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_add_master_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_input_add_master_end (xcb_input_add_master_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_remove_master_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_input_remove_master_t)
+ */
+void
+xcb_input_remove_master_next (xcb_input_remove_master_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_remove_master_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_input_remove_master_end (xcb_input_remove_master_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_attach_slave_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_input_attach_slave_t)
+ */
+void
+xcb_input_attach_slave_next (xcb_input_attach_slave_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_attach_slave_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_input_attach_slave_end (xcb_input_attach_slave_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_detach_slave_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_input_detach_slave_t)
+ */
+void
+xcb_input_detach_slave_next (xcb_input_detach_slave_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_detach_slave_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_input_detach_slave_end (xcb_input_detach_slave_iterator_t i);
+
+char *
+xcb_input_hierarchy_change_data_add_master_name (const xcb_input_hierarchy_change_data_t *S);
+
+int
+xcb_input_hierarchy_change_data_add_master_name_length (const xcb_input_hierarchy_change_t *R,
+ const xcb_input_hierarchy_change_data_t *S);
+
+xcb_generic_iterator_t
+xcb_input_hierarchy_change_data_add_master_name_end (const xcb_input_hierarchy_change_t *R,
+ const xcb_input_hierarchy_change_data_t *S);
+
+int
+xcb_input_hierarchy_change_data_serialize (void **_buffer,
+ uint16_t type,
+ const xcb_input_hierarchy_change_data_t *_aux);
+
+int
+xcb_input_hierarchy_change_data_unpack (const void *_buffer,
+ uint16_t type,
+ xcb_input_hierarchy_change_data_t *_aux);
+
+int
+xcb_input_hierarchy_change_data_sizeof (const void *_buffer,
+ uint16_t type);
+
+int
+xcb_input_hierarchy_change_sizeof (const void *_buffer);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_hierarchy_change_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_input_hierarchy_change_t)
+ */
+void
+xcb_input_hierarchy_change_next (xcb_input_hierarchy_change_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_hierarchy_change_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_input_hierarchy_change_end (xcb_input_hierarchy_change_iterator_t i);
+
+int
+xcb_input_xi_change_hierarchy_sizeof (const void *_buffer);
+
+/**
+ *
+ * @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_input_xi_change_hierarchy_checked (xcb_connection_t *c,
+ uint8_t num_changes,
+ const xcb_input_hierarchy_change_t *changes);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_xi_change_hierarchy (xcb_connection_t *c,
+ uint8_t num_changes,
+ const xcb_input_hierarchy_change_t *changes);
+
+int
+xcb_input_xi_change_hierarchy_changes_length (const xcb_input_xi_change_hierarchy_request_t *R);
+
+xcb_input_hierarchy_change_iterator_t
+xcb_input_xi_change_hierarchy_changes_iterator (const xcb_input_xi_change_hierarchy_request_t *R);
+
+/**
+ *
+ * @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_input_xi_set_client_pointer_checked (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_input_device_id_t deviceid);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_xi_set_client_pointer (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_input_device_id_t deviceid);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_xi_get_client_pointer_cookie_t
+xcb_input_xi_get_client_pointer (xcb_connection_t *c,
+ xcb_window_t window);
+
+/**
+ *
+ * @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_input_xi_get_client_pointer_cookie_t
+xcb_input_xi_get_client_pointer_unchecked (xcb_connection_t *c,
+ xcb_window_t window);
+
+/**
+ * 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_input_xi_get_client_pointer_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_xi_get_client_pointer_reply_t *
+xcb_input_xi_get_client_pointer_reply (xcb_connection_t *c,
+ xcb_input_xi_get_client_pointer_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+int
+xcb_input_event_mask_sizeof (const void *_buffer);
+
+uint32_t *
+xcb_input_event_mask_mask (const xcb_input_event_mask_t *R);
+
+int
+xcb_input_event_mask_mask_length (const xcb_input_event_mask_t *R);
+
+xcb_generic_iterator_t
+xcb_input_event_mask_mask_end (const xcb_input_event_mask_t *R);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_event_mask_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_input_event_mask_t)
+ */
+void
+xcb_input_event_mask_next (xcb_input_event_mask_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_event_mask_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_input_event_mask_end (xcb_input_event_mask_iterator_t i);
+
+int
+xcb_input_xi_select_events_sizeof (const void *_buffer);
+
+/**
+ *
+ * @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_input_xi_select_events_checked (xcb_connection_t *c,
+ xcb_window_t window,
+ uint16_t num_mask,
+ const xcb_input_event_mask_t *masks);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_xi_select_events (xcb_connection_t *c,
+ xcb_window_t window,
+ uint16_t num_mask,
+ const xcb_input_event_mask_t *masks);
+
+int
+xcb_input_xi_select_events_masks_length (const xcb_input_xi_select_events_request_t *R);
+
+xcb_input_event_mask_iterator_t
+xcb_input_xi_select_events_masks_iterator (const xcb_input_xi_select_events_request_t *R);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_xi_query_version_cookie_t
+xcb_input_xi_query_version (xcb_connection_t *c,
+ uint16_t major_version,
+ uint16_t minor_version);
+
+/**
+ *
+ * @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_input_xi_query_version_cookie_t
+xcb_input_xi_query_version_unchecked (xcb_connection_t *c,
+ uint16_t major_version,
+ uint16_t minor_version);
+
+/**
+ * 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_input_xi_query_version_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_xi_query_version_reply_t *
+xcb_input_xi_query_version_reply (xcb_connection_t *c,
+ xcb_input_xi_query_version_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+int
+xcb_input_button_class_sizeof (const void *_buffer);
+
+uint32_t *
+xcb_input_button_class_state (const xcb_input_button_class_t *R);
+
+int
+xcb_input_button_class_state_length (const xcb_input_button_class_t *R);
+
+xcb_generic_iterator_t
+xcb_input_button_class_state_end (const xcb_input_button_class_t *R);
+
+xcb_atom_t *
+xcb_input_button_class_labels (const xcb_input_button_class_t *R);
+
+int
+xcb_input_button_class_labels_length (const xcb_input_button_class_t *R);
+
+xcb_generic_iterator_t
+xcb_input_button_class_labels_end (const xcb_input_button_class_t *R);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_button_class_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_input_button_class_t)
+ */
+void
+xcb_input_button_class_next (xcb_input_button_class_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_button_class_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_input_button_class_end (xcb_input_button_class_iterator_t i);
+
+int
+xcb_input_key_class_sizeof (const void *_buffer);
+
+uint32_t *
+xcb_input_key_class_keys (const xcb_input_key_class_t *R);
+
+int
+xcb_input_key_class_keys_length (const xcb_input_key_class_t *R);
+
+xcb_generic_iterator_t
+xcb_input_key_class_keys_end (const xcb_input_key_class_t *R);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_key_class_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_input_key_class_t)
+ */
+void
+xcb_input_key_class_next (xcb_input_key_class_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_key_class_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_input_key_class_end (xcb_input_key_class_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_scroll_class_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_input_scroll_class_t)
+ */
+void
+xcb_input_scroll_class_next (xcb_input_scroll_class_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_scroll_class_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_input_scroll_class_end (xcb_input_scroll_class_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_touch_class_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_input_touch_class_t)
+ */
+void
+xcb_input_touch_class_next (xcb_input_touch_class_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_touch_class_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_input_touch_class_end (xcb_input_touch_class_iterator_t i);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_valuator_class_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_input_valuator_class_t)
+ */
+void
+xcb_input_valuator_class_next (xcb_input_valuator_class_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_valuator_class_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_input_valuator_class_end (xcb_input_valuator_class_iterator_t i);
+
+uint32_t *
+xcb_input_device_class_data_key_keys (const xcb_input_device_class_data_t *S);
+
+int
+xcb_input_device_class_data_key_keys_length (const xcb_input_device_class_t *R,
+ const xcb_input_device_class_data_t *S);
+
+xcb_generic_iterator_t
+xcb_input_device_class_data_key_keys_end (const xcb_input_device_class_t *R,
+ const xcb_input_device_class_data_t *S);
+
+uint32_t *
+xcb_input_device_class_data_button_state (const xcb_input_device_class_data_t *S);
+
+int
+xcb_input_device_class_data_button_state_length (const xcb_input_device_class_t *R,
+ const xcb_input_device_class_data_t *S);
+
+xcb_generic_iterator_t
+xcb_input_device_class_data_button_state_end (const xcb_input_device_class_t *R,
+ const xcb_input_device_class_data_t *S);
+
+xcb_atom_t *
+xcb_input_device_class_data_button_labels (const xcb_input_device_class_data_t *S);
+
+int
+xcb_input_device_class_data_button_labels_length (const xcb_input_device_class_t *R,
+ const xcb_input_device_class_data_t *S);
+
+xcb_generic_iterator_t
+xcb_input_device_class_data_button_labels_end (const xcb_input_device_class_t *R,
+ const xcb_input_device_class_data_t *S);
+
+int
+xcb_input_device_class_data_serialize (void **_buffer,
+ uint16_t type,
+ const xcb_input_device_class_data_t *_aux);
+
+int
+xcb_input_device_class_data_unpack (const void *_buffer,
+ uint16_t type,
+ xcb_input_device_class_data_t *_aux);
+
+int
+xcb_input_device_class_data_sizeof (const void *_buffer,
+ uint16_t type);
+
+int
+xcb_input_device_class_sizeof (const void *_buffer);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_device_class_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_input_device_class_t)
+ */
+void
+xcb_input_device_class_next (xcb_input_device_class_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_device_class_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_input_device_class_end (xcb_input_device_class_iterator_t i);
+
+int
+xcb_input_xi_device_info_sizeof (const void *_buffer);
+
+char *
+xcb_input_xi_device_info_name (const xcb_input_xi_device_info_t *R);
+
+int
+xcb_input_xi_device_info_name_length (const xcb_input_xi_device_info_t *R);
+
+xcb_generic_iterator_t
+xcb_input_xi_device_info_name_end (const xcb_input_xi_device_info_t *R);
+
+int
+xcb_input_xi_device_info_classes_length (const xcb_input_xi_device_info_t *R);
+
+xcb_input_device_class_iterator_t
+xcb_input_xi_device_info_classes_iterator (const xcb_input_xi_device_info_t *R);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_xi_device_info_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_input_xi_device_info_t)
+ */
+void
+xcb_input_xi_device_info_next (xcb_input_xi_device_info_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_xi_device_info_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+xcb_generic_iterator_t
+xcb_input_xi_device_info_end (xcb_input_xi_device_info_iterator_t i);
+
+int
+xcb_input_xi_query_device_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_xi_query_device_cookie_t
+xcb_input_xi_query_device (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid);
+
+/**
+ *
+ * @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_input_xi_query_device_cookie_t
+xcb_input_xi_query_device_unchecked (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid);
+
+int
+xcb_input_xi_query_device_infos_length (const xcb_input_xi_query_device_reply_t *R);
+
+xcb_input_xi_device_info_iterator_t
+xcb_input_xi_query_device_infos_iterator (const xcb_input_xi_query_device_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_input_xi_query_device_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_xi_query_device_reply_t *
+xcb_input_xi_query_device_reply (xcb_connection_t *c,
+ xcb_input_xi_query_device_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+/**
+ *
+ * @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_input_xi_set_focus_checked (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_timestamp_t time,
+ xcb_input_device_id_t deviceid);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_xi_set_focus (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_timestamp_t time,
+ xcb_input_device_id_t deviceid);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_xi_get_focus_cookie_t
+xcb_input_xi_get_focus (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid);
+
+/**
+ *
+ * @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_input_xi_get_focus_cookie_t
+xcb_input_xi_get_focus_unchecked (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid);
+
+/**
+ * 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_input_xi_get_focus_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_xi_get_focus_reply_t *
+xcb_input_xi_get_focus_reply (xcb_connection_t *c,
+ xcb_input_xi_get_focus_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+int
+xcb_input_xi_grab_device_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_xi_grab_device_cookie_t
+xcb_input_xi_grab_device (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_timestamp_t time,
+ xcb_cursor_t cursor,
+ xcb_input_device_id_t deviceid,
+ uint8_t mode,
+ uint8_t paired_device_mode,
+ uint8_t owner_events,
+ uint16_t mask_len,
+ const uint32_t *mask);
+
+/**
+ *
+ * @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_input_xi_grab_device_cookie_t
+xcb_input_xi_grab_device_unchecked (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_timestamp_t time,
+ xcb_cursor_t cursor,
+ xcb_input_device_id_t deviceid,
+ uint8_t mode,
+ uint8_t paired_device_mode,
+ uint8_t owner_events,
+ uint16_t mask_len,
+ const uint32_t *mask);
+
+/**
+ * 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_input_xi_grab_device_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_xi_grab_device_reply_t *
+xcb_input_xi_grab_device_reply (xcb_connection_t *c,
+ xcb_input_xi_grab_device_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+/**
+ *
+ * @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_input_xi_ungrab_device_checked (xcb_connection_t *c,
+ xcb_timestamp_t time,
+ xcb_input_device_id_t deviceid);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_xi_ungrab_device (xcb_connection_t *c,
+ xcb_timestamp_t time,
+ xcb_input_device_id_t deviceid);
+
+/**
+ *
+ * @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_input_xi_allow_events_checked (xcb_connection_t *c,
+ xcb_timestamp_t time,
+ xcb_input_device_id_t deviceid,
+ uint8_t event_mode,
+ uint32_t touchid,
+ xcb_window_t grab_window);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_xi_allow_events (xcb_connection_t *c,
+ xcb_timestamp_t time,
+ xcb_input_device_id_t deviceid,
+ uint8_t event_mode,
+ uint32_t touchid,
+ xcb_window_t grab_window);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_grab_modifier_info_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_input_grab_modifier_info_t)
+ */
+void
+xcb_input_grab_modifier_info_next (xcb_input_grab_modifier_info_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_grab_modifier_info_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+xcb_generic_iterator_t
+xcb_input_grab_modifier_info_end (xcb_input_grab_modifier_info_iterator_t i);
+
+int
+xcb_input_xi_passive_grab_device_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_xi_passive_grab_device_cookie_t
+xcb_input_xi_passive_grab_device (xcb_connection_t *c,
+ xcb_timestamp_t time,
+ xcb_window_t grab_window,
+ xcb_cursor_t cursor,
+ uint32_t detail,
+ xcb_input_device_id_t deviceid,
+ uint16_t num_modifiers,
+ uint16_t mask_len,
+ uint8_t grab_type,
+ uint8_t grab_mode,
+ uint8_t paired_device_mode,
+ uint8_t owner_events,
+ const uint32_t *mask,
+ const uint32_t *modifiers);
+
+/**
+ *
+ * @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_input_xi_passive_grab_device_cookie_t
+xcb_input_xi_passive_grab_device_unchecked (xcb_connection_t *c,
+ xcb_timestamp_t time,
+ xcb_window_t grab_window,
+ xcb_cursor_t cursor,
+ uint32_t detail,
+ xcb_input_device_id_t deviceid,
+ uint16_t num_modifiers,
+ uint16_t mask_len,
+ uint8_t grab_type,
+ uint8_t grab_mode,
+ uint8_t paired_device_mode,
+ uint8_t owner_events,
+ const uint32_t *mask,
+ const uint32_t *modifiers);
+
+xcb_input_grab_modifier_info_t *
+xcb_input_xi_passive_grab_device_modifiers (const xcb_input_xi_passive_grab_device_reply_t *R);
+
+int
+xcb_input_xi_passive_grab_device_modifiers_length (const xcb_input_xi_passive_grab_device_reply_t *R);
+
+xcb_input_grab_modifier_info_iterator_t
+xcb_input_xi_passive_grab_device_modifiers_iterator (const xcb_input_xi_passive_grab_device_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_input_xi_passive_grab_device_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_xi_passive_grab_device_reply_t *
+xcb_input_xi_passive_grab_device_reply (xcb_connection_t *c,
+ xcb_input_xi_passive_grab_device_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+int
+xcb_input_xi_passive_ungrab_device_sizeof (const void *_buffer);
+
+/**
+ *
+ * @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_input_xi_passive_ungrab_device_checked (xcb_connection_t *c,
+ xcb_window_t grab_window,
+ uint32_t detail,
+ xcb_input_device_id_t deviceid,
+ uint16_t num_modifiers,
+ uint8_t grab_type,
+ const uint32_t *modifiers);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_xi_passive_ungrab_device (xcb_connection_t *c,
+ xcb_window_t grab_window,
+ uint32_t detail,
+ xcb_input_device_id_t deviceid,
+ uint16_t num_modifiers,
+ uint8_t grab_type,
+ const uint32_t *modifiers);
+
+uint32_t *
+xcb_input_xi_passive_ungrab_device_modifiers (const xcb_input_xi_passive_ungrab_device_request_t *R);
+
+int
+xcb_input_xi_passive_ungrab_device_modifiers_length (const xcb_input_xi_passive_ungrab_device_request_t *R);
+
+xcb_generic_iterator_t
+xcb_input_xi_passive_ungrab_device_modifiers_end (const xcb_input_xi_passive_ungrab_device_request_t *R);
+
+int
+xcb_input_xi_list_properties_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_xi_list_properties_cookie_t
+xcb_input_xi_list_properties (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid);
+
+/**
+ *
+ * @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_input_xi_list_properties_cookie_t
+xcb_input_xi_list_properties_unchecked (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid);
+
+xcb_atom_t *
+xcb_input_xi_list_properties_properties (const xcb_input_xi_list_properties_reply_t *R);
+
+int
+xcb_input_xi_list_properties_properties_length (const xcb_input_xi_list_properties_reply_t *R);
+
+xcb_generic_iterator_t
+xcb_input_xi_list_properties_properties_end (const xcb_input_xi_list_properties_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_input_xi_list_properties_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_xi_list_properties_reply_t *
+xcb_input_xi_list_properties_reply (xcb_connection_t *c,
+ xcb_input_xi_list_properties_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+uint8_t *
+xcb_input_xi_change_property_items_data_8 (const xcb_input_xi_change_property_items_t *S);
+
+int
+xcb_input_xi_change_property_items_data_8_length (const xcb_input_xi_change_property_request_t *R,
+ const xcb_input_xi_change_property_items_t *S);
+
+xcb_generic_iterator_t
+xcb_input_xi_change_property_items_data_8_end (const xcb_input_xi_change_property_request_t *R,
+ const xcb_input_xi_change_property_items_t *S);
+
+uint16_t *
+xcb_input_xi_change_property_items_data_16 (const xcb_input_xi_change_property_items_t *S);
+
+int
+xcb_input_xi_change_property_items_data_16_length (const xcb_input_xi_change_property_request_t *R,
+ const xcb_input_xi_change_property_items_t *S);
+
+xcb_generic_iterator_t
+xcb_input_xi_change_property_items_data_16_end (const xcb_input_xi_change_property_request_t *R,
+ const xcb_input_xi_change_property_items_t *S);
+
+uint32_t *
+xcb_input_xi_change_property_items_data_32 (const xcb_input_xi_change_property_items_t *S);
+
+int
+xcb_input_xi_change_property_items_data_32_length (const xcb_input_xi_change_property_request_t *R,
+ const xcb_input_xi_change_property_items_t *S);
+
+xcb_generic_iterator_t
+xcb_input_xi_change_property_items_data_32_end (const xcb_input_xi_change_property_request_t *R,
+ const xcb_input_xi_change_property_items_t *S);
+
+int
+xcb_input_xi_change_property_items_serialize (void **_buffer,
+ uint32_t num_items,
+ uint8_t format,
+ const xcb_input_xi_change_property_items_t *_aux);
+
+int
+xcb_input_xi_change_property_items_unpack (const void *_buffer,
+ uint32_t num_items,
+ uint8_t format,
+ xcb_input_xi_change_property_items_t *_aux);
+
+int
+xcb_input_xi_change_property_items_sizeof (const void *_buffer,
+ uint32_t num_items,
+ uint8_t format);
+
+int
+xcb_input_xi_change_property_sizeof (const void *_buffer);
+
+/**
+ *
+ * @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_input_xi_change_property_checked (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid,
+ uint8_t mode,
+ uint8_t format,
+ xcb_atom_t property,
+ xcb_atom_t type,
+ uint32_t num_items,
+ const void *items);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_xi_change_property (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid,
+ uint8_t mode,
+ uint8_t format,
+ xcb_atom_t property,
+ xcb_atom_t type,
+ uint32_t num_items,
+ const void *items);
+
+/**
+ *
+ * @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_input_xi_change_property_aux_checked (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid,
+ uint8_t mode,
+ uint8_t format,
+ xcb_atom_t property,
+ xcb_atom_t type,
+ uint32_t num_items,
+ const xcb_input_xi_change_property_items_t *items);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_xi_change_property_aux (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid,
+ uint8_t mode,
+ uint8_t format,
+ xcb_atom_t property,
+ xcb_atom_t type,
+ uint32_t num_items,
+ const xcb_input_xi_change_property_items_t *items);
+
+void *
+xcb_input_xi_change_property_items (const xcb_input_xi_change_property_request_t *R);
+
+/**
+ *
+ * @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_input_xi_delete_property_checked (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid,
+ xcb_atom_t property);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_void_cookie_t
+xcb_input_xi_delete_property (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid,
+ xcb_atom_t property);
+
+uint8_t *
+xcb_input_xi_get_property_items_data_8 (const xcb_input_xi_get_property_items_t *S);
+
+int
+xcb_input_xi_get_property_items_data_8_length (const xcb_input_xi_get_property_reply_t *R,
+ const xcb_input_xi_get_property_items_t *S);
+
+xcb_generic_iterator_t
+xcb_input_xi_get_property_items_data_8_end (const xcb_input_xi_get_property_reply_t *R,
+ const xcb_input_xi_get_property_items_t *S);
+
+uint16_t *
+xcb_input_xi_get_property_items_data_16 (const xcb_input_xi_get_property_items_t *S);
+
+int
+xcb_input_xi_get_property_items_data_16_length (const xcb_input_xi_get_property_reply_t *R,
+ const xcb_input_xi_get_property_items_t *S);
+
+xcb_generic_iterator_t
+xcb_input_xi_get_property_items_data_16_end (const xcb_input_xi_get_property_reply_t *R,
+ const xcb_input_xi_get_property_items_t *S);
+
+uint32_t *
+xcb_input_xi_get_property_items_data_32 (const xcb_input_xi_get_property_items_t *S);
+
+int
+xcb_input_xi_get_property_items_data_32_length (const xcb_input_xi_get_property_reply_t *R,
+ const xcb_input_xi_get_property_items_t *S);
+
+xcb_generic_iterator_t
+xcb_input_xi_get_property_items_data_32_end (const xcb_input_xi_get_property_reply_t *R,
+ const xcb_input_xi_get_property_items_t *S);
+
+int
+xcb_input_xi_get_property_items_serialize (void **_buffer,
+ uint32_t num_items,
+ uint8_t format,
+ const xcb_input_xi_get_property_items_t *_aux);
+
+int
+xcb_input_xi_get_property_items_unpack (const void *_buffer,
+ uint32_t num_items,
+ uint8_t format,
+ xcb_input_xi_get_property_items_t *_aux);
+
+int
+xcb_input_xi_get_property_items_sizeof (const void *_buffer,
+ uint32_t num_items,
+ uint8_t format);
+
+int
+xcb_input_xi_get_property_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_xi_get_property_cookie_t
+xcb_input_xi_get_property (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid,
+ uint8_t _delete,
+ xcb_atom_t property,
+ xcb_atom_t type,
+ uint32_t offset,
+ uint32_t len);
+
+/**
+ *
+ * @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_input_xi_get_property_cookie_t
+xcb_input_xi_get_property_unchecked (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid,
+ uint8_t _delete,
+ xcb_atom_t property,
+ xcb_atom_t type,
+ uint32_t offset,
+ uint32_t len);
+
+void *
+xcb_input_xi_get_property_items (const xcb_input_xi_get_property_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_input_xi_get_property_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_xi_get_property_reply_t *
+xcb_input_xi_get_property_reply (xcb_connection_t *c,
+ xcb_input_xi_get_property_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+int
+xcb_input_xi_get_selected_events_sizeof (const void *_buffer);
+
+/**
+ *
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+xcb_input_xi_get_selected_events_cookie_t
+xcb_input_xi_get_selected_events (xcb_connection_t *c,
+ xcb_window_t window);
+
+/**
+ *
+ * @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_input_xi_get_selected_events_cookie_t
+xcb_input_xi_get_selected_events_unchecked (xcb_connection_t *c,
+ xcb_window_t window);
+
+int
+xcb_input_xi_get_selected_events_masks_length (const xcb_input_xi_get_selected_events_reply_t *R);
+
+xcb_input_event_mask_iterator_t
+xcb_input_xi_get_selected_events_masks_iterator (const xcb_input_xi_get_selected_events_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_input_xi_get_selected_events_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+xcb_input_xi_get_selected_events_reply_t *
+xcb_input_xi_get_selected_events_reply (xcb_connection_t *c,
+ xcb_input_xi_get_selected_events_cookie_t cookie /**< */,
+ xcb_generic_error_t **e);
+
+int
+xcb_input_device_changed_sizeof (const void *_buffer);
+
+int
+xcb_input_device_changed_classes_length (const xcb_input_device_changed_event_t *R);
+
+xcb_input_device_class_iterator_t
+xcb_input_device_changed_classes_iterator (const xcb_input_device_changed_event_t *R);
+
+int
+xcb_input_key_press_sizeof (const void *_buffer);
+
+uint32_t *
+xcb_input_key_press_button_mask (const xcb_input_key_press_event_t *R);
+
+int
+xcb_input_key_press_button_mask_length (const xcb_input_key_press_event_t *R);
+
+xcb_generic_iterator_t
+xcb_input_key_press_button_mask_end (const xcb_input_key_press_event_t *R);
+
+uint32_t *
+xcb_input_key_press_valuator_mask (const xcb_input_key_press_event_t *R);
+
+int
+xcb_input_key_press_valuator_mask_length (const xcb_input_key_press_event_t *R);
+
+xcb_generic_iterator_t
+xcb_input_key_press_valuator_mask_end (const xcb_input_key_press_event_t *R);
+
+xcb_input_fp3232_t *
+xcb_input_key_press_axisvalues (const xcb_input_key_press_event_t *R);
+
+int
+xcb_input_key_press_axisvalues_length (const xcb_input_key_press_event_t *R);
+
+xcb_input_fp3232_iterator_t
+xcb_input_key_press_axisvalues_iterator (const xcb_input_key_press_event_t *R);
+
+int
+xcb_input_key_release_sizeof (const void *_buffer /**< */);
+
+int
+xcb_input_button_press_sizeof (const void *_buffer);
+
+uint32_t *
+xcb_input_button_press_button_mask (const xcb_input_button_press_event_t *R);
+
+int
+xcb_input_button_press_button_mask_length (const xcb_input_button_press_event_t *R);
+
+xcb_generic_iterator_t
+xcb_input_button_press_button_mask_end (const xcb_input_button_press_event_t *R);
+
+uint32_t *
+xcb_input_button_press_valuator_mask (const xcb_input_button_press_event_t *R);
+
+int
+xcb_input_button_press_valuator_mask_length (const xcb_input_button_press_event_t *R);
+
+xcb_generic_iterator_t
+xcb_input_button_press_valuator_mask_end (const xcb_input_button_press_event_t *R);
+
+xcb_input_fp3232_t *
+xcb_input_button_press_axisvalues (const xcb_input_button_press_event_t *R);
+
+int
+xcb_input_button_press_axisvalues_length (const xcb_input_button_press_event_t *R);
+
+xcb_input_fp3232_iterator_t
+xcb_input_button_press_axisvalues_iterator (const xcb_input_button_press_event_t *R);
+
+int
+xcb_input_button_release_sizeof (const void *_buffer /**< */);
+
+int
+xcb_input_motion_sizeof (const void *_buffer /**< */);
+
+int
+xcb_input_enter_sizeof (const void *_buffer);
+
+uint32_t *
+xcb_input_enter_buttons (const xcb_input_enter_event_t *R);
+
+int
+xcb_input_enter_buttons_length (const xcb_input_enter_event_t *R);
+
+xcb_generic_iterator_t
+xcb_input_enter_buttons_end (const xcb_input_enter_event_t *R);
+
+int
+xcb_input_leave_sizeof (const void *_buffer /**< */);
+
+int
+xcb_input_focus_in_sizeof (const void *_buffer /**< */);
+
+int
+xcb_input_focus_out_sizeof (const void *_buffer /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_input_hierarchy_info_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_input_hierarchy_info_t)
+ */
+void
+xcb_input_hierarchy_info_next (xcb_input_hierarchy_info_iterator_t *i);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_input_hierarchy_info_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+xcb_generic_iterator_t
+xcb_input_hierarchy_info_end (xcb_input_hierarchy_info_iterator_t i);
+
+int
+xcb_input_hierarchy_sizeof (const void *_buffer);
+
+xcb_input_hierarchy_info_t *
+xcb_input_hierarchy_infos (const xcb_input_hierarchy_event_t *R);
+
+int
+xcb_input_hierarchy_infos_length (const xcb_input_hierarchy_event_t *R);
+
+xcb_input_hierarchy_info_iterator_t
+xcb_input_hierarchy_infos_iterator (const xcb_input_hierarchy_event_t *R);
+
+int
+xcb_input_raw_key_press_sizeof (const void *_buffer);
+
+uint32_t *
+xcb_input_raw_key_press_valuator_mask (const xcb_input_raw_key_press_event_t *R);
+
+int
+xcb_input_raw_key_press_valuator_mask_length (const xcb_input_raw_key_press_event_t *R);
+
+xcb_generic_iterator_t
+xcb_input_raw_key_press_valuator_mask_end (const xcb_input_raw_key_press_event_t *R);
+
+xcb_input_fp3232_t *
+xcb_input_raw_key_press_axisvalues (const xcb_input_raw_key_press_event_t *R);
+
+int
+xcb_input_raw_key_press_axisvalues_length (const xcb_input_raw_key_press_event_t *R);
+
+xcb_input_fp3232_iterator_t
+xcb_input_raw_key_press_axisvalues_iterator (const xcb_input_raw_key_press_event_t *R);
+
+xcb_input_fp3232_t *
+xcb_input_raw_key_press_axisvalues_raw (const xcb_input_raw_key_press_event_t *R);
+
+int
+xcb_input_raw_key_press_axisvalues_raw_length (const xcb_input_raw_key_press_event_t *R);
+
+xcb_input_fp3232_iterator_t
+xcb_input_raw_key_press_axisvalues_raw_iterator (const xcb_input_raw_key_press_event_t *R);
+
+int
+xcb_input_raw_key_release_sizeof (const void *_buffer /**< */);
+
+int
+xcb_input_raw_button_press_sizeof (const void *_buffer);
+
+uint32_t *
+xcb_input_raw_button_press_valuator_mask (const xcb_input_raw_button_press_event_t *R);
+
+int
+xcb_input_raw_button_press_valuator_mask_length (const xcb_input_raw_button_press_event_t *R);
+
+xcb_generic_iterator_t
+xcb_input_raw_button_press_valuator_mask_end (const xcb_input_raw_button_press_event_t *R);
+
+xcb_input_fp3232_t *
+xcb_input_raw_button_press_axisvalues (const xcb_input_raw_button_press_event_t *R);
+
+int
+xcb_input_raw_button_press_axisvalues_length (const xcb_input_raw_button_press_event_t *R);
+
+xcb_input_fp3232_iterator_t
+xcb_input_raw_button_press_axisvalues_iterator (const xcb_input_raw_button_press_event_t *R);
+
+xcb_input_fp3232_t *
+xcb_input_raw_button_press_axisvalues_raw (const xcb_input_raw_button_press_event_t *R);
+
+int
+xcb_input_raw_button_press_axisvalues_raw_length (const xcb_input_raw_button_press_event_t *R);
+
+xcb_input_fp3232_iterator_t
+xcb_input_raw_button_press_axisvalues_raw_iterator (const xcb_input_raw_button_press_event_t *R);
+
+int
+xcb_input_raw_button_release_sizeof (const void *_buffer /**< */);
+
+int
+xcb_input_raw_motion_sizeof (const void *_buffer /**< */);
+
+int
+xcb_input_touch_begin_sizeof (const void *_buffer);
+
+uint32_t *
+xcb_input_touch_begin_button_mask (const xcb_input_touch_begin_event_t *R);
+
+int
+xcb_input_touch_begin_button_mask_length (const xcb_input_touch_begin_event_t *R);
+
+xcb_generic_iterator_t
+xcb_input_touch_begin_button_mask_end (const xcb_input_touch_begin_event_t *R);
+
+uint32_t *
+xcb_input_touch_begin_valuator_mask (const xcb_input_touch_begin_event_t *R);
+
+int
+xcb_input_touch_begin_valuator_mask_length (const xcb_input_touch_begin_event_t *R);
+
+xcb_generic_iterator_t
+xcb_input_touch_begin_valuator_mask_end (const xcb_input_touch_begin_event_t *R);
+
+xcb_input_fp3232_t *
+xcb_input_touch_begin_axisvalues (const xcb_input_touch_begin_event_t *R);
+
+int
+xcb_input_touch_begin_axisvalues_length (const xcb_input_touch_begin_event_t *R);
+
+xcb_input_fp3232_iterator_t
+xcb_input_touch_begin_axisvalues_iterator (const xcb_input_touch_begin_event_t *R);
+
+int
+xcb_input_touch_update_sizeof (const void *_buffer /**< */);
+
+int
+xcb_input_touch_end_sizeof (const void *_buffer /**< */);
+
+int
+xcb_input_raw_touch_begin_sizeof (const void *_buffer);
+
+uint32_t *
+xcb_input_raw_touch_begin_valuator_mask (const xcb_input_raw_touch_begin_event_t *R);
+
+int
+xcb_input_raw_touch_begin_valuator_mask_length (const xcb_input_raw_touch_begin_event_t *R);
+
+xcb_generic_iterator_t
+xcb_input_raw_touch_begin_valuator_mask_end (const xcb_input_raw_touch_begin_event_t *R);
+
+xcb_input_fp3232_t *
+xcb_input_raw_touch_begin_axisvalues (const xcb_input_raw_touch_begin_event_t *R);
+
+int
+xcb_input_raw_touch_begin_axisvalues_length (const xcb_input_raw_touch_begin_event_t *R);
+
+xcb_input_fp3232_iterator_t
+xcb_input_raw_touch_begin_axisvalues_iterator (const xcb_input_raw_touch_begin_event_t *R);
+
+xcb_input_fp3232_t *
+xcb_input_raw_touch_begin_axisvalues_raw (const xcb_input_raw_touch_begin_event_t *R);
+
+int
+xcb_input_raw_touch_begin_axisvalues_raw_length (const xcb_input_raw_touch_begin_event_t *R);
+
+xcb_input_fp3232_iterator_t
+xcb_input_raw_touch_begin_axisvalues_raw_iterator (const xcb_input_raw_touch_begin_event_t *R);
+
+int
+xcb_input_raw_touch_update_sizeof (const void *_buffer /**< */);
+
+int
+xcb_input_raw_touch_end_sizeof (const void *_buffer /**< */);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/src/3rdparty/xcb/libxcb/randr.c b/src/3rdparty/xcb/libxcb/randr.c
index 1956ee033e..0232af802f 100644
--- a/src/3rdparty/xcb/libxcb/randr.c
+++ b/src/3rdparty/xcb/libxcb/randr.c
@@ -3,10 +3,17 @@
* Edit at your peril.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#include <stdlib.h>
#include <string.h>
#include <assert.h>
+#include <stddef.h> /* for offsetof() */
#include "xcbext.h"
#include "randr.h"
+
+#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
#include "xproto.h"
#include "render.h"
@@ -164,6 +171,35 @@ xcb_randr_screen_size_end (xcb_randr_screen_size_iterator_t i /**< */)
return ret;
}
+int
+xcb_randr_refresh_rates_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_randr_refresh_rates_t *_aux = (xcb_randr_refresh_rates_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_randr_refresh_rates_t);
+ xcb_tmp += xcb_block_len;
+ /* rates */
+ xcb_block_len += _aux->nRates * sizeof(uint16_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
/*****************************************************************************
**
@@ -230,10 +266,11 @@ void
xcb_randr_refresh_rates_next (xcb_randr_refresh_rates_iterator_t *i /**< */)
{
xcb_randr_refresh_rates_t *R = i->data;
- xcb_generic_iterator_t child = xcb_randr_refresh_rates_rates_end(R);
+ xcb_generic_iterator_t child;
+ child.data = (xcb_randr_refresh_rates_t *)(((char *)R) + xcb_randr_refresh_rates_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
--i->rem;
i->data = (xcb_randr_refresh_rates_t *) child.data;
- i->index = child.index;
}
@@ -293,6 +330,7 @@ xcb_randr_query_version (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -332,6 +370,7 @@ xcb_randr_query_version_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -404,6 +443,7 @@ xcb_randr_set_screen_config (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -456,6 +496,7 @@ xcb_randr_set_screen_config_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -516,6 +557,7 @@ xcb_randr_select_input_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -556,10 +598,57 @@ xcb_randr_select_input (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_randr_get_screen_info_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_randr_get_screen_info_reply_t *_aux = (xcb_randr_get_screen_info_reply_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+
+ xcb_block_len += sizeof(xcb_randr_get_screen_info_reply_t);
+ xcb_tmp += xcb_block_len;
+ /* sizes */
+ xcb_block_len += _aux->nSizes * sizeof(xcb_randr_screen_size_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_randr_screen_size_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;
+ /* rates */
+ for(i=0; i<(_aux->nInfo - _aux->nSizes); i++) {
+ xcb_tmp_len = xcb_randr_refresh_rates_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_randr_refresh_rates_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;
+}
+
/*****************************************************************************
**
@@ -592,6 +681,7 @@ xcb_randr_get_screen_info (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -628,6 +718,7 @@ xcb_randr_get_screen_info_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -773,6 +864,7 @@ xcb_randr_get_screen_size_range (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -809,6 +901,7 @@ xcb_randr_get_screen_size_range_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -877,6 +970,7 @@ xcb_randr_set_screen_size_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -925,6 +1019,7 @@ xcb_randr_set_screen_size (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -967,6 +1062,71 @@ xcb_randr_mode_info_end (xcb_randr_mode_info_iterator_t i /**< */)
return ret;
}
+int
+xcb_randr_get_screen_resources_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_randr_get_screen_resources_reply_t *_aux = (xcb_randr_get_screen_resources_reply_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_randr_get_screen_resources_reply_t);
+ xcb_tmp += xcb_block_len;
+ /* crtcs */
+ xcb_block_len += _aux->num_crtcs * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_randr_crtc_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;
+ /* outputs */
+ xcb_block_len += _aux->num_outputs * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_randr_output_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;
+ /* modes */
+ xcb_block_len += _aux->num_modes * sizeof(xcb_randr_mode_info_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_randr_mode_info_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* names */
+ xcb_block_len += _aux->names_len * 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;
+}
+
/*****************************************************************************
**
@@ -999,6 +1159,7 @@ xcb_randr_get_screen_resources (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1035,6 +1196,7 @@ xcb_randr_get_screen_resources_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1273,6 +1435,71 @@ xcb_randr_get_screen_resources_reply (xcb_connection_t *
return (xcb_randr_get_screen_resources_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
}
+int
+xcb_randr_get_output_info_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_randr_get_output_info_reply_t *_aux = (xcb_randr_get_output_info_reply_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_randr_get_output_info_reply_t);
+ xcb_tmp += xcb_block_len;
+ /* crtcs */
+ xcb_block_len += _aux->num_crtcs * sizeof(xcb_randr_output_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_randr_crtc_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;
+ /* modes */
+ xcb_block_len += _aux->num_modes * sizeof(xcb_randr_output_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_randr_mode_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;
+ /* clones */
+ xcb_block_len += _aux->num_clones * sizeof(xcb_randr_output_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_randr_output_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;
+ /* name */
+ xcb_block_len += _aux->name_len * 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;
+}
+
/*****************************************************************************
**
@@ -1308,6 +1535,7 @@ xcb_randr_get_output_info (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1347,6 +1575,7 @@ xcb_randr_get_output_info_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1585,6 +1814,35 @@ xcb_randr_get_output_info_reply (xcb_connection_t *c /**< */
return (xcb_randr_get_output_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
}
+int
+xcb_randr_list_output_properties_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_randr_list_output_properties_reply_t *_aux = (xcb_randr_list_output_properties_reply_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_randr_list_output_properties_reply_t);
+ xcb_tmp += xcb_block_len;
+ /* atoms */
+ xcb_block_len += _aux->num_atoms * 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;
+}
+
/*****************************************************************************
**
@@ -1617,6 +1875,7 @@ xcb_randr_list_output_properties (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1653,6 +1912,7 @@ xcb_randr_list_output_properties_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1729,6 +1989,35 @@ xcb_randr_list_output_properties_reply (xcb_connection_t
return (xcb_randr_list_output_properties_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
}
+int
+xcb_randr_query_output_property_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_randr_query_output_property_reply_t *_aux = (xcb_randr_query_output_property_reply_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_randr_query_output_property_reply_t);
+ xcb_tmp += xcb_block_len;
+ /* validValues */
+ xcb_block_len += _aux->length * sizeof(int32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(int32_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;
+}
+
/*****************************************************************************
**
@@ -1764,6 +2053,7 @@ xcb_randr_query_output_property (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1803,6 +2093,7 @@ xcb_randr_query_output_property_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1879,6 +2170,35 @@ xcb_randr_query_output_property_reply (xcb_connection_t
return (xcb_randr_query_output_property_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
}
+int
+xcb_randr_configure_output_property_sizeof (const void *_buffer /**< */,
+ uint32_t values_len /**< */)
+{
+ 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_randr_configure_output_property_request_t);
+ xcb_tmp += xcb_block_len;
+ /* values */
+ xcb_block_len += values_len * sizeof(int32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(int32_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;
+}
+
/*****************************************************************************
**
@@ -1925,10 +2245,12 @@ xcb_randr_configure_output_property_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;
+ /* int32_t values */
xcb_parts[4].iov_base = (char *) values;
xcb_parts[4].iov_len = values_len * sizeof(int32_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1979,14 +2301,45 @@ xcb_randr_configure_output_property (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;
+ /* int32_t values */
xcb_parts[4].iov_base = (char *) values;
xcb_parts[4].iov_len = values_len * sizeof(int32_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_randr_change_output_property_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_randr_change_output_property_request_t *_aux = (xcb_randr_change_output_property_request_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_randr_change_output_property_request_t);
+ xcb_tmp += xcb_block_len;
+ /* data */
+ xcb_block_len += ((_aux->num_units * _aux->format) / 8) * 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
/*****************************************************************************
**
@@ -2037,10 +2390,12 @@ xcb_randr_change_output_property_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;
+ /* void data */
xcb_parts[4].iov_base = (char *) data;
xcb_parts[4].iov_len = ((num_units * format) / 8) * sizeof(char);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2095,10 +2450,12 @@ xcb_randr_change_output_property (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;
+ /* void data */
xcb_parts[4].iov_base = (char *) data;
xcb_parts[4].iov_len = ((num_units * format) / 8) * sizeof(char);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2138,6 +2495,7 @@ xcb_randr_delete_output_property_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2177,10 +2535,40 @@ xcb_randr_delete_output_property (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_randr_get_output_property_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_randr_get_output_property_reply_t *_aux = (xcb_randr_get_output_property_reply_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_randr_get_output_property_reply_t);
+ xcb_tmp += xcb_block_len;
+ /* data */
+ xcb_block_len += (_aux->num_items * (_aux->format / 8)) * 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;
+}
+
/*****************************************************************************
**
@@ -2232,6 +2620,7 @@ xcb_randr_get_output_property (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2287,6 +2676,7 @@ xcb_randr_get_output_property_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2363,6 +2753,35 @@ xcb_randr_get_output_property_reply (xcb_connection_t *c
return (xcb_randr_get_output_property_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
}
+int
+xcb_randr_create_mode_sizeof (const void *_buffer /**< */,
+ uint32_t name_len /**< */)
+{
+ 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_randr_create_mode_request_t);
+ xcb_tmp += xcb_block_len;
+ /* name */
+ xcb_block_len += name_len * 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
/*****************************************************************************
**
@@ -2402,10 +2821,12 @@ xcb_randr_create_mode (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;
+ /* char name */
xcb_parts[4].iov_base = (char *) name;
xcb_parts[4].iov_len = name_len * sizeof(char);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2449,10 +2870,12 @@ xcb_randr_create_mode_unchecked (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;
+ /* char name */
xcb_parts[4].iov_base = (char *) name;
xcb_parts[4].iov_len = name_len * sizeof(char);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2509,6 +2932,7 @@ xcb_randr_destroy_mode_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2545,6 +2969,7 @@ xcb_randr_destroy_mode (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2584,6 +3009,7 @@ xcb_randr_add_output_mode_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2623,6 +3049,7 @@ xcb_randr_add_output_mode (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2662,6 +3089,7 @@ xcb_randr_delete_output_mode_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2701,10 +3129,52 @@ xcb_randr_delete_output_mode (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_randr_get_crtc_info_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_randr_get_crtc_info_reply_t *_aux = (xcb_randr_get_crtc_info_reply_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_randr_get_crtc_info_reply_t);
+ xcb_tmp += xcb_block_len;
+ /* outputs */
+ xcb_block_len += _aux->num_outputs * sizeof(xcb_randr_output_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_randr_output_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;
+ /* possible */
+ xcb_block_len += _aux->num_possible_outputs * sizeof(xcb_randr_output_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_randr_output_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;
+}
+
/*****************************************************************************
**
@@ -2740,6 +3210,7 @@ xcb_randr_get_crtc_info (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2779,6 +3250,7 @@ xcb_randr_get_crtc_info_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2909,6 +3381,35 @@ xcb_randr_get_crtc_info_reply (xcb_connection_t *c /**< */,
return (xcb_randr_get_crtc_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
}
+int
+xcb_randr_set_crtc_config_sizeof (const void *_buffer /**< */,
+ uint32_t outputs_len /**< */)
+{
+ 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_randr_set_crtc_config_request_t);
+ xcb_tmp += xcb_block_len;
+ /* outputs */
+ xcb_block_len += outputs_len * sizeof(xcb_randr_output_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_randr_output_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;
+}
+
/*****************************************************************************
**
@@ -2964,10 +3465,12 @@ xcb_randr_set_crtc_config (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;
+ /* xcb_randr_output_t outputs */
xcb_parts[4].iov_base = (char *) outputs;
xcb_parts[4].iov_len = outputs_len * sizeof(xcb_timestamp_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3027,10 +3530,12 @@ xcb_randr_set_crtc_config_unchecked (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;
+ /* xcb_randr_output_t outputs */
xcb_parts[4].iov_base = (char *) outputs;
xcb_parts[4].iov_len = outputs_len * sizeof(xcb_timestamp_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3087,6 +3592,7 @@ xcb_randr_get_crtc_gamma_size (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3123,6 +3629,7 @@ xcb_randr_get_crtc_gamma_size_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3147,6 +3654,59 @@ xcb_randr_get_crtc_gamma_size_reply (xcb_connection_t *c
return (xcb_randr_get_crtc_gamma_size_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
}
+int
+xcb_randr_get_crtc_gamma_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_randr_get_crtc_gamma_reply_t *_aux = (xcb_randr_get_crtc_gamma_reply_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_randr_get_crtc_gamma_reply_t);
+ xcb_tmp += xcb_block_len;
+ /* red */
+ xcb_block_len += _aux->size * sizeof(uint16_t);
+ xcb_tmp += xcb_block_len;
+ 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;
+ /* green */
+ xcb_block_len += _aux->size * sizeof(uint16_t);
+ xcb_tmp += xcb_block_len;
+ 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;
+ /* blue */
+ xcb_block_len += _aux->size * sizeof(uint16_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
/*****************************************************************************
**
@@ -3179,6 +3739,7 @@ xcb_randr_get_crtc_gamma (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3215,6 +3776,7 @@ xcb_randr_get_crtc_gamma_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3399,6 +3961,59 @@ xcb_randr_get_crtc_gamma_reply (xcb_connection_t *c /**< */,
return (xcb_randr_get_crtc_gamma_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
}
+int
+xcb_randr_set_crtc_gamma_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_randr_set_crtc_gamma_request_t *_aux = (xcb_randr_set_crtc_gamma_request_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_randr_set_crtc_gamma_request_t);
+ xcb_tmp += xcb_block_len;
+ /* red */
+ xcb_block_len += _aux->size * sizeof(uint16_t);
+ xcb_tmp += xcb_block_len;
+ 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;
+ /* green */
+ xcb_block_len += _aux->size * sizeof(uint16_t);
+ xcb_tmp += xcb_block_len;
+ 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;
+ /* blue */
+ xcb_block_len += _aux->size * sizeof(uint16_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
/*****************************************************************************
**
@@ -3441,18 +4056,22 @@ xcb_randr_set_crtc_gamma_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;
+ /* uint16_t red */
xcb_parts[4].iov_base = (char *) red;
xcb_parts[4].iov_len = size * sizeof(uint16_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+ /* uint16_t green */
xcb_parts[6].iov_base = (char *) green;
xcb_parts[6].iov_len = size * sizeof(uint16_t);
xcb_parts[7].iov_base = 0;
xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
+ /* uint16_t blue */
xcb_parts[8].iov_base = (char *) blue;
xcb_parts[8].iov_len = size * sizeof(uint16_t);
xcb_parts[9].iov_base = 0;
xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3499,22 +4118,91 @@ xcb_randr_set_crtc_gamma (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;
+ /* uint16_t red */
xcb_parts[4].iov_base = (char *) red;
xcb_parts[4].iov_len = size * sizeof(uint16_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+ /* uint16_t green */
xcb_parts[6].iov_base = (char *) green;
xcb_parts[6].iov_len = size * sizeof(uint16_t);
xcb_parts[7].iov_base = 0;
xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
+ /* uint16_t blue */
xcb_parts[8].iov_base = (char *) blue;
xcb_parts[8].iov_len = size * sizeof(uint16_t);
xcb_parts[9].iov_base = 0;
xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_randr_get_screen_resources_current_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_randr_get_screen_resources_current_reply_t *_aux = (xcb_randr_get_screen_resources_current_reply_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_randr_get_screen_resources_current_reply_t);
+ xcb_tmp += xcb_block_len;
+ /* crtcs */
+ xcb_block_len += _aux->num_crtcs * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_randr_crtc_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;
+ /* outputs */
+ xcb_block_len += _aux->num_outputs * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_randr_output_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;
+ /* modes */
+ xcb_block_len += _aux->num_modes * sizeof(xcb_randr_mode_info_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_randr_mode_info_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* names */
+ xcb_block_len += _aux->names_len * 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;
+}
+
/*****************************************************************************
**
@@ -3547,6 +4235,7 @@ xcb_randr_get_screen_resources_current (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3583,6 +4272,7 @@ xcb_randr_get_screen_resources_current_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3821,6 +4511,48 @@ xcb_randr_get_screen_resources_current_reply (xcb_connection_t
return (xcb_randr_get_screen_resources_current_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
}
+int
+xcb_randr_set_crtc_transform_sizeof (const void *_buffer /**< */,
+ uint32_t filter_params_len /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_randr_set_crtc_transform_request_t *_aux = (xcb_randr_set_crtc_transform_request_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_randr_set_crtc_transform_request_t);
+ xcb_tmp += xcb_block_len;
+ /* filter_name */
+ xcb_block_len += _aux->filter_len * 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* filter_params */
+ xcb_block_len += filter_params_len * sizeof(xcb_render_fixed_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_render_fixed_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;
+}
+
/*****************************************************************************
**
@@ -3866,14 +4598,17 @@ xcb_randr_set_crtc_transform_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;
+ /* char filter_name */
xcb_parts[4].iov_base = (char *) filter_name;
xcb_parts[4].iov_len = filter_len * sizeof(char);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+ /* xcb_render_fixed_t filter_params */
xcb_parts[6].iov_base = (char *) filter_params;
xcb_parts[6].iov_len = filter_params_len * sizeof(xcb_render_fixed_t);
xcb_parts[7].iov_base = 0;
xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3923,18 +4658,86 @@ xcb_randr_set_crtc_transform (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;
+ /* char filter_name */
xcb_parts[4].iov_base = (char *) filter_name;
xcb_parts[4].iov_len = filter_len * sizeof(char);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+ /* xcb_render_fixed_t filter_params */
xcb_parts[6].iov_base = (char *) filter_params;
xcb_parts[6].iov_len = filter_params_len * sizeof(xcb_render_fixed_t);
xcb_parts[7].iov_base = 0;
xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_randr_get_crtc_transform_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_randr_get_crtc_transform_reply_t *_aux = (xcb_randr_get_crtc_transform_reply_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_randr_get_crtc_transform_reply_t);
+ xcb_tmp += xcb_block_len;
+ /* pending_filter_name */
+ xcb_block_len += _aux->pending_len * 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* pending_params */
+ xcb_block_len += _aux->pending_nparams * sizeof(xcb_render_fixed_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_render_fixed_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;
+ /* current_filter_name */
+ xcb_block_len += _aux->current_len * 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* current_params */
+ xcb_block_len += _aux->current_nparams * sizeof(xcb_render_fixed_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_render_fixed_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;
+}
+
/*****************************************************************************
**
@@ -3967,6 +4770,7 @@ xcb_randr_get_crtc_transform (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -4003,6 +4807,7 @@ xcb_randr_get_crtc_transform_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -4273,6 +5078,7 @@ xcb_randr_get_panning (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -4309,6 +5115,7 @@ xcb_randr_get_panning_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -4404,6 +5211,7 @@ xcb_randr_set_panning (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -4479,6 +5287,7 @@ xcb_randr_set_panning_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -4538,6 +5347,7 @@ xcb_randr_set_output_primary_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -4577,6 +5387,7 @@ xcb_randr_set_output_primary (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -4613,6 +5424,7 @@ xcb_randr_get_output_primary (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -4649,6 +5461,7 @@ xcb_randr_get_output_primary_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
diff --git a/src/3rdparty/xcb/libxcb/render.c b/src/3rdparty/xcb/libxcb/render.c
index b251f8814c..7e5379cfcf 100644
--- a/src/3rdparty/xcb/libxcb/render.c
+++ b/src/3rdparty/xcb/libxcb/render.c
@@ -3,10 +3,17 @@
* Edit at your peril.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#include <stdlib.h>
#include <string.h>
#include <assert.h>
+#include <stddef.h> /* for offsetof() */
#include "xcbext.h"
#include "render.h"
+
+#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
#include "xproto.h"
xcb_extension_t xcb_render_id = { "RENDER", 0 };
@@ -315,6 +322,35 @@ xcb_render_pictvisual_end (xcb_render_pictvisual_iterator_t i /**< */)
return ret;
}
+int
+xcb_render_pictdepth_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_render_pictdepth_t *_aux = (xcb_render_pictdepth_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_render_pictdepth_t);
+ xcb_tmp += xcb_block_len;
+ /* visuals */
+ xcb_block_len += _aux->num_visuals * sizeof(xcb_render_pictvisual_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_render_pictvisual_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;
+}
+
/*****************************************************************************
**
@@ -381,10 +417,11 @@ void
xcb_render_pictdepth_next (xcb_render_pictdepth_iterator_t *i /**< */)
{
xcb_render_pictdepth_t *R = i->data;
- xcb_generic_iterator_t child = xcb_render_pictvisual_end(xcb_render_pictdepth_visuals_iterator(R));
+ xcb_generic_iterator_t child;
+ child.data = (xcb_render_pictdepth_t *)(((char *)R) + xcb_render_pictdepth_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
--i->rem;
i->data = (xcb_render_pictdepth_t *) child.data;
- i->index = child.index;
}
@@ -409,6 +446,40 @@ xcb_render_pictdepth_end (xcb_render_pictdepth_iterator_t i /**< */)
return ret;
}
+int
+xcb_render_pictscreen_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_render_pictscreen_t *_aux = (xcb_render_pictscreen_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_render_pictscreen_t);
+ xcb_tmp += xcb_block_len;
+ /* depths */
+ for(i=0; i<_aux->num_depths; i++) {
+ xcb_tmp_len = xcb_render_pictdepth_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_render_pictdepth_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;
+}
+
/*****************************************************************************
**
@@ -459,10 +530,11 @@ void
xcb_render_pictscreen_next (xcb_render_pictscreen_iterator_t *i /**< */)
{
xcb_render_pictscreen_t *R = i->data;
- xcb_generic_iterator_t child = xcb_render_pictdepth_end(xcb_render_pictscreen_depths_iterator(R));
+ xcb_generic_iterator_t child;
+ child.data = (xcb_render_pictscreen_t *)(((char *)R) + xcb_render_pictscreen_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
--i->rem;
i->data = (xcb_render_pictscreen_t *) child.data;
- i->index = child.index;
}
@@ -788,6 +860,7 @@ xcb_render_query_version (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -827,6 +900,7 @@ xcb_render_query_version_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -851,6 +925,64 @@ xcb_render_query_version_reply (xcb_connection_t *c /**< */,
return (xcb_render_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
}
+int
+xcb_render_query_pict_formats_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_render_query_pict_formats_reply_t *_aux = (xcb_render_query_pict_formats_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_render_query_pict_formats_reply_t);
+ xcb_tmp += xcb_block_len;
+ /* formats */
+ xcb_block_len += _aux->num_formats * sizeof(xcb_render_pictforminfo_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_render_pictforminfo_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;
+ /* screens */
+ for(i=0; i<_aux->num_screens; i++) {
+ xcb_tmp_len = xcb_render_pictscreen_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_render_pictscreen_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;
+ /* subpixels */
+ xcb_block_len += _aux->num_subpixel * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+}
+
/*****************************************************************************
**
@@ -880,6 +1012,7 @@ xcb_render_query_pict_formats (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -913,6 +1046,7 @@ xcb_render_query_pict_formats_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1080,6 +1214,35 @@ xcb_render_query_pict_formats_reply (xcb_connection_t *c
return (xcb_render_query_pict_formats_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
}
+int
+xcb_render_query_pict_index_values_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_render_query_pict_index_values_reply_t *_aux = (xcb_render_query_pict_index_values_reply_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_render_query_pict_index_values_reply_t);
+ xcb_tmp += xcb_block_len;
+ /* values */
+ xcb_block_len += _aux->num_values * sizeof(xcb_render_indexvalue_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_render_indexvalue_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;
+}
+
/*****************************************************************************
**
@@ -1112,6 +1275,7 @@ xcb_render_query_pict_index_values (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1148,6 +1312,7 @@ xcb_render_query_pict_index_values_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1224,6 +1389,35 @@ xcb_render_query_pict_index_values_reply (xcb_connection_t
return (xcb_render_query_pict_index_values_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
}
+int
+xcb_render_create_picture_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_render_create_picture_request_t *_aux = (xcb_render_create_picture_request_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_render_create_picture_request_t);
+ xcb_tmp += xcb_block_len;
+ /* value_list */
+ xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+}
+
/*****************************************************************************
**
@@ -1267,10 +1461,12 @@ xcb_render_create_picture_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;
+ /* uint32_t value_list */
xcb_parts[4].iov_base = (char *) value_list;
xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1318,14 +1514,45 @@ xcb_render_create_picture (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;
+ /* uint32_t value_list */
xcb_parts[4].iov_base = (char *) value_list;
xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_render_change_picture_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_render_change_picture_request_t *_aux = (xcb_render_change_picture_request_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_render_change_picture_request_t);
+ xcb_tmp += xcb_block_len;
+ /* value_list */
+ xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+}
+
/*****************************************************************************
**
@@ -1363,10 +1590,12 @@ xcb_render_change_picture_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;
+ /* uint32_t value_list */
xcb_parts[4].iov_base = (char *) value_list;
xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1408,14 +1637,45 @@ xcb_render_change_picture (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;
+ /* uint32_t value_list */
xcb_parts[4].iov_base = (char *) value_list;
xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_render_set_picture_clip_rectangles_sizeof (const void *_buffer /**< */,
+ uint32_t rectangles_len /**< */)
+{
+ 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_render_set_picture_clip_rectangles_request_t);
+ xcb_tmp += xcb_block_len;
+ /* rectangles */
+ xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_rectangle_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;
+}
+
/*****************************************************************************
**
@@ -1458,10 +1718,12 @@ xcb_render_set_picture_clip_rectangles_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;
+ /* xcb_rectangle_t rectangles */
xcb_parts[4].iov_base = (char *) rectangles;
xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1508,10 +1770,12 @@ xcb_render_set_picture_clip_rectangles (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;
+ /* xcb_rectangle_t rectangles */
xcb_parts[4].iov_base = (char *) rectangles;
xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1548,6 +1812,7 @@ xcb_render_free_picture_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1584,6 +1849,7 @@ xcb_render_free_picture (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1654,6 +1920,7 @@ xcb_render_composite_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1724,10 +1991,40 @@ xcb_render_composite (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_render_trapezoids_sizeof (const void *_buffer /**< */,
+ uint32_t traps_len /**< */)
+{
+ 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_render_trapezoids_request_t);
+ xcb_tmp += xcb_block_len;
+ /* traps */
+ xcb_block_len += traps_len * sizeof(xcb_render_trapezoid_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_render_trapezoid_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;
+}
+
/*****************************************************************************
**
@@ -1780,10 +2077,12 @@ xcb_render_trapezoids_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;
+ /* xcb_render_trapezoid_t traps */
xcb_parts[4].iov_base = (char *) traps;
xcb_parts[4].iov_len = traps_len * sizeof(xcb_render_trapezoid_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1840,14 +2139,45 @@ xcb_render_trapezoids (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;
+ /* xcb_render_trapezoid_t traps */
xcb_parts[4].iov_base = (char *) traps;
xcb_parts[4].iov_len = traps_len * sizeof(xcb_render_trapezoid_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_render_triangles_sizeof (const void *_buffer /**< */,
+ uint32_t triangles_len /**< */)
+{
+ 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_render_triangles_request_t);
+ xcb_tmp += xcb_block_len;
+ /* triangles */
+ xcb_block_len += triangles_len * sizeof(xcb_render_triangle_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_render_triangle_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;
+}
+
/*****************************************************************************
**
@@ -1900,10 +2230,12 @@ xcb_render_triangles_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;
+ /* xcb_render_triangle_t triangles */
xcb_parts[4].iov_base = (char *) triangles;
xcb_parts[4].iov_len = triangles_len * sizeof(xcb_render_triangle_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1960,14 +2292,45 @@ xcb_render_triangles (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;
+ /* xcb_render_triangle_t triangles */
xcb_parts[4].iov_base = (char *) triangles;
xcb_parts[4].iov_len = triangles_len * sizeof(xcb_render_triangle_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_render_tri_strip_sizeof (const void *_buffer /**< */,
+ uint32_t points_len /**< */)
+{
+ 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_render_tri_strip_request_t);
+ xcb_tmp += xcb_block_len;
+ /* points */
+ xcb_block_len += points_len * sizeof(xcb_render_pointfix_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_render_pointfix_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;
+}
+
/*****************************************************************************
**
@@ -2020,10 +2383,12 @@ xcb_render_tri_strip_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;
+ /* xcb_render_pointfix_t points */
xcb_parts[4].iov_base = (char *) points;
xcb_parts[4].iov_len = points_len * sizeof(xcb_render_pointfix_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2080,14 +2445,45 @@ xcb_render_tri_strip (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;
+ /* xcb_render_pointfix_t points */
xcb_parts[4].iov_base = (char *) points;
xcb_parts[4].iov_len = points_len * sizeof(xcb_render_pointfix_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_render_tri_fan_sizeof (const void *_buffer /**< */,
+ uint32_t points_len /**< */)
+{
+ 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_render_tri_fan_request_t);
+ xcb_tmp += xcb_block_len;
+ /* points */
+ xcb_block_len += points_len * sizeof(xcb_render_pointfix_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_render_pointfix_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;
+}
+
/*****************************************************************************
**
@@ -2140,10 +2536,12 @@ xcb_render_tri_fan_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;
+ /* xcb_render_pointfix_t points */
xcb_parts[4].iov_base = (char *) points;
xcb_parts[4].iov_len = points_len * sizeof(xcb_render_pointfix_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2200,10 +2598,12 @@ xcb_render_tri_fan (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;
+ /* xcb_render_pointfix_t points */
xcb_parts[4].iov_base = (char *) points;
xcb_parts[4].iov_len = points_len * sizeof(xcb_render_pointfix_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2243,6 +2643,7 @@ xcb_render_create_glyph_set_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2282,6 +2683,7 @@ xcb_render_create_glyph_set (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2321,6 +2723,7 @@ xcb_render_reference_glyph_set_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2360,6 +2763,7 @@ xcb_render_reference_glyph_set (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2396,6 +2800,7 @@ xcb_render_free_glyph_set_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2432,10 +2837,65 @@ xcb_render_free_glyph_set (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_render_add_glyphs_sizeof (const void *_buffer /**< */,
+ uint32_t data_len /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_render_add_glyphs_request_t *_aux = (xcb_render_add_glyphs_request_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_render_add_glyphs_request_t);
+ xcb_tmp += xcb_block_len;
+ /* glyphids */
+ xcb_block_len += _aux->glyphs_len * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+ /* glyphs */
+ xcb_block_len += _aux->glyphs_len * sizeof(xcb_render_glyphinfo_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_render_glyphinfo_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;
+ /* data */
+ xcb_block_len += data_len * 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;
+}
+
/*****************************************************************************
**
@@ -2479,18 +2939,22 @@ xcb_render_add_glyphs_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;
+ /* uint32_t glyphids */
xcb_parts[4].iov_base = (char *) glyphids;
xcb_parts[4].iov_len = glyphs_len * sizeof(uint32_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+ /* xcb_render_glyphinfo_t glyphs */
xcb_parts[6].iov_base = (char *) glyphs;
xcb_parts[6].iov_len = glyphs_len * sizeof(xcb_render_glyphinfo_t);
xcb_parts[7].iov_base = 0;
xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
+ /* uint8_t data */
xcb_parts[8].iov_base = (char *) data;
xcb_parts[8].iov_len = data_len * sizeof(uint8_t);
xcb_parts[9].iov_base = 0;
xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2538,22 +3002,55 @@ xcb_render_add_glyphs (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;
+ /* uint32_t glyphids */
xcb_parts[4].iov_base = (char *) glyphids;
xcb_parts[4].iov_len = glyphs_len * sizeof(uint32_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+ /* xcb_render_glyphinfo_t glyphs */
xcb_parts[6].iov_base = (char *) glyphs;
xcb_parts[6].iov_len = glyphs_len * sizeof(xcb_render_glyphinfo_t);
xcb_parts[7].iov_base = 0;
xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
+ /* uint8_t data */
xcb_parts[8].iov_base = (char *) data;
xcb_parts[8].iov_len = data_len * sizeof(uint8_t);
xcb_parts[9].iov_base = 0;
xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_render_free_glyphs_sizeof (const void *_buffer /**< */,
+ uint32_t glyphs_len /**< */)
+{
+ 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_render_free_glyphs_request_t);
+ xcb_tmp += xcb_block_len;
+ /* glyphs */
+ xcb_block_len += glyphs_len * sizeof(xcb_render_glyph_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_render_glyph_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;
+}
+
/*****************************************************************************
**
@@ -2590,10 +3087,12 @@ xcb_render_free_glyphs_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;
+ /* xcb_render_glyph_t glyphs */
xcb_parts[4].iov_base = (char *) glyphs;
xcb_parts[4].iov_len = glyphs_len * sizeof(xcb_render_glyph_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2634,14 +3133,45 @@ xcb_render_free_glyphs (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;
+ /* xcb_render_glyph_t glyphs */
xcb_parts[4].iov_base = (char *) glyphs;
xcb_parts[4].iov_len = glyphs_len * sizeof(xcb_render_glyph_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_render_composite_glyphs_8_sizeof (const void *_buffer /**< */,
+ uint32_t glyphcmds_len /**< */)
+{
+ 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_render_composite_glyphs_8_request_t);
+ xcb_tmp += xcb_block_len;
+ /* glyphcmds */
+ xcb_block_len += glyphcmds_len * 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;
+}
+
/*****************************************************************************
**
@@ -2697,10 +3227,12 @@ xcb_render_composite_glyphs_8_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 glyphcmds */
xcb_parts[4].iov_base = (char *) glyphcmds;
xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2760,14 +3292,45 @@ xcb_render_composite_glyphs_8 (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 glyphcmds */
xcb_parts[4].iov_base = (char *) glyphcmds;
xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_render_composite_glyphs_16_sizeof (const void *_buffer /**< */,
+ uint32_t glyphcmds_len /**< */)
+{
+ 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_render_composite_glyphs_16_request_t);
+ xcb_tmp += xcb_block_len;
+ /* glyphcmds */
+ xcb_block_len += glyphcmds_len * 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;
+}
+
/*****************************************************************************
**
@@ -2823,10 +3386,12 @@ xcb_render_composite_glyphs_16_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 glyphcmds */
xcb_parts[4].iov_base = (char *) glyphcmds;
xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2886,14 +3451,45 @@ xcb_render_composite_glyphs_16 (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 glyphcmds */
xcb_parts[4].iov_base = (char *) glyphcmds;
xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_render_composite_glyphs_32_sizeof (const void *_buffer /**< */,
+ uint32_t glyphcmds_len /**< */)
+{
+ 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_render_composite_glyphs_32_request_t);
+ xcb_tmp += xcb_block_len;
+ /* glyphcmds */
+ xcb_block_len += glyphcmds_len * 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;
+}
+
/*****************************************************************************
**
@@ -2949,10 +3545,12 @@ xcb_render_composite_glyphs_32_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 glyphcmds */
xcb_parts[4].iov_base = (char *) glyphcmds;
xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3012,14 +3610,45 @@ xcb_render_composite_glyphs_32 (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 glyphcmds */
xcb_parts[4].iov_base = (char *) glyphcmds;
xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_render_fill_rectangles_sizeof (const void *_buffer /**< */,
+ uint32_t rects_len /**< */)
+{
+ 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_render_fill_rectangles_request_t);
+ xcb_tmp += xcb_block_len;
+ /* rects */
+ xcb_block_len += rects_len * sizeof(xcb_rectangle_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_rectangle_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;
+}
+
/*****************************************************************************
**
@@ -3063,10 +3692,12 @@ xcb_render_fill_rectangles_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;
+ /* xcb_rectangle_t rects */
xcb_parts[4].iov_base = (char *) rects;
xcb_parts[4].iov_len = rects_len * sizeof(xcb_rectangle_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3114,10 +3745,12 @@ xcb_render_fill_rectangles (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;
+ /* xcb_rectangle_t rects */
xcb_parts[4].iov_base = (char *) rects;
xcb_parts[4].iov_len = rects_len * sizeof(xcb_rectangle_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3163,6 +3796,7 @@ xcb_render_create_cursor_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3208,6 +3842,7 @@ xcb_render_create_cursor (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3285,6 +3920,7 @@ xcb_render_set_picture_transform_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3324,10 +3960,57 @@ xcb_render_set_picture_transform (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_render_query_filters_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_render_query_filters_reply_t *_aux = (xcb_render_query_filters_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_render_query_filters_reply_t);
+ xcb_tmp += xcb_block_len;
+ /* aliases */
+ xcb_block_len += _aux->num_aliases * sizeof(uint16_t);
+ xcb_tmp += xcb_block_len;
+ 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;
+ /* filters */
+ for(i=0; i<_aux->num_filters; i++) {
+ xcb_tmp_len = xcb_str_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_str_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;
+}
+
/*****************************************************************************
**
@@ -3360,6 +4043,7 @@ xcb_render_query_filters (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3396,6 +4080,7 @@ xcb_render_query_filters_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3509,6 +4194,48 @@ xcb_render_query_filters_reply (xcb_connection_t *c /**< */,
return (xcb_render_query_filters_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
}
+int
+xcb_render_set_picture_filter_sizeof (const void *_buffer /**< */,
+ uint32_t values_len /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_render_set_picture_filter_request_t *_aux = (xcb_render_set_picture_filter_request_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_render_set_picture_filter_request_t);
+ xcb_tmp += xcb_block_len;
+ /* filter */
+ xcb_block_len += _aux->filter_len * 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* values */
+ xcb_block_len += values_len * sizeof(xcb_render_fixed_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_render_fixed_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;
+}
+
/*****************************************************************************
**
@@ -3551,14 +4278,17 @@ xcb_render_set_picture_filter_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;
+ /* char filter */
xcb_parts[4].iov_base = (char *) filter;
xcb_parts[4].iov_len = filter_len * sizeof(char);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+ /* xcb_render_fixed_t values */
xcb_parts[6].iov_base = (char *) values;
xcb_parts[6].iov_len = values_len * sizeof(xcb_render_fixed_t);
xcb_parts[7].iov_base = 0;
xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3605,14 +4335,17 @@ xcb_render_set_picture_filter (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;
+ /* char filter */
xcb_parts[4].iov_base = (char *) filter;
xcb_parts[4].iov_len = filter_len * sizeof(char);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+ /* xcb_render_fixed_t values */
xcb_parts[6].iov_base = (char *) values;
xcb_parts[6].iov_len = values_len * sizeof(xcb_render_fixed_t);
xcb_parts[7].iov_base = 0;
xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3655,6 +4388,35 @@ xcb_render_animcursorelt_end (xcb_render_animcursorelt_iterator_t i /**< */)
return ret;
}
+int
+xcb_render_create_anim_cursor_sizeof (const void *_buffer /**< */,
+ uint32_t cursors_len /**< */)
+{
+ 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_render_create_anim_cursor_request_t);
+ xcb_tmp += xcb_block_len;
+ /* cursors */
+ xcb_block_len += cursors_len * sizeof(xcb_render_animcursorelt_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_render_animcursorelt_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;
+}
+
/*****************************************************************************
**
@@ -3691,10 +4453,12 @@ xcb_render_create_anim_cursor_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;
+ /* xcb_render_animcursorelt_t cursors */
xcb_parts[4].iov_base = (char *) cursors;
xcb_parts[4].iov_len = cursors_len * sizeof(xcb_render_animcursorelt_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3735,10 +4499,12 @@ xcb_render_create_anim_cursor (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;
+ /* xcb_render_animcursorelt_t cursors */
xcb_parts[4].iov_base = (char *) cursors;
xcb_parts[4].iov_len = cursors_len * sizeof(xcb_render_animcursorelt_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3819,6 +4585,35 @@ xcb_render_trap_end (xcb_render_trap_iterator_t i /**< */)
return ret;
}
+int
+xcb_render_add_traps_sizeof (const void *_buffer /**< */,
+ uint32_t traps_len /**< */)
+{
+ 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_render_add_traps_request_t);
+ xcb_tmp += xcb_block_len;
+ /* traps */
+ xcb_block_len += traps_len * sizeof(xcb_render_trap_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_render_trap_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;
+}
+
/*****************************************************************************
**
@@ -3861,10 +4656,12 @@ xcb_render_add_traps_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;
+ /* xcb_render_trap_t traps */
xcb_parts[4].iov_base = (char *) traps;
xcb_parts[4].iov_len = traps_len * sizeof(xcb_render_trap_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3911,10 +4708,12 @@ xcb_render_add_traps (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;
+ /* xcb_render_trap_t traps */
xcb_parts[4].iov_base = (char *) traps;
xcb_parts[4].iov_len = traps_len * sizeof(xcb_render_trap_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3954,6 +4753,7 @@ xcb_render_create_solid_fill_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -3993,10 +4793,52 @@ xcb_render_create_solid_fill (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_render_create_linear_gradient_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_render_create_linear_gradient_request_t *_aux = (xcb_render_create_linear_gradient_request_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_render_create_linear_gradient_request_t);
+ xcb_tmp += xcb_block_len;
+ /* stops */
+ xcb_block_len += _aux->num_stops * sizeof(xcb_render_fixed_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_render_fixed_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 */
+ xcb_block_len += _aux->num_stops * sizeof(xcb_render_color_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_render_color_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;
+}
+
/*****************************************************************************
**
@@ -4042,14 +4884,17 @@ xcb_render_create_linear_gradient_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;
+ /* xcb_render_fixed_t stops */
xcb_parts[4].iov_base = (char *) stops;
xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+ /* xcb_render_color_t colors */
xcb_parts[6].iov_base = (char *) colors;
xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t);
xcb_parts[7].iov_base = 0;
xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -4099,18 +4944,62 @@ xcb_render_create_linear_gradient (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;
+ /* xcb_render_fixed_t stops */
xcb_parts[4].iov_base = (char *) stops;
xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+ /* xcb_render_color_t colors */
xcb_parts[6].iov_base = (char *) colors;
xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t);
xcb_parts[7].iov_base = 0;
xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_render_create_radial_gradient_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_render_create_radial_gradient_request_t *_aux = (xcb_render_create_radial_gradient_request_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_render_create_radial_gradient_request_t);
+ xcb_tmp += xcb_block_len;
+ /* stops */
+ xcb_block_len += _aux->num_stops * sizeof(xcb_render_fixed_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_render_fixed_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 */
+ xcb_block_len += _aux->num_stops * sizeof(xcb_render_color_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_render_color_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;
+}
+
/*****************************************************************************
**
@@ -4162,14 +5051,17 @@ xcb_render_create_radial_gradient_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;
+ /* xcb_render_fixed_t stops */
xcb_parts[4].iov_base = (char *) stops;
xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+ /* xcb_render_color_t colors */
xcb_parts[6].iov_base = (char *) colors;
xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t);
xcb_parts[7].iov_base = 0;
xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -4225,18 +5117,62 @@ xcb_render_create_radial_gradient (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;
+ /* xcb_render_fixed_t stops */
xcb_parts[4].iov_base = (char *) stops;
xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+ /* xcb_render_color_t colors */
xcb_parts[6].iov_base = (char *) colors;
xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t);
xcb_parts[7].iov_base = 0;
xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_render_create_conical_gradient_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_render_create_conical_gradient_request_t *_aux = (xcb_render_create_conical_gradient_request_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_render_create_conical_gradient_request_t);
+ xcb_tmp += xcb_block_len;
+ /* stops */
+ xcb_block_len += _aux->num_stops * sizeof(xcb_render_fixed_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_render_fixed_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 */
+ xcb_block_len += _aux->num_stops * sizeof(xcb_render_color_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_render_color_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;
+}
+
/*****************************************************************************
**
@@ -4282,14 +5218,17 @@ xcb_render_create_conical_gradient_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;
+ /* xcb_render_fixed_t stops */
xcb_parts[4].iov_base = (char *) stops;
xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+ /* xcb_render_color_t colors */
xcb_parts[6].iov_base = (char *) colors;
xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t);
xcb_parts[7].iov_base = 0;
xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -4339,14 +5278,17 @@ xcb_render_create_conical_gradient (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;
+ /* xcb_render_fixed_t stops */
xcb_parts[4].iov_base = (char *) stops;
xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+ /* xcb_render_color_t colors */
xcb_parts[6].iov_base = (char *) colors;
xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t);
xcb_parts[7].iov_base = 0;
xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
diff --git a/src/3rdparty/xcb/libxcb/shape.c b/src/3rdparty/xcb/libxcb/shape.c
index 948522581e..98621c4983 100644
--- a/src/3rdparty/xcb/libxcb/shape.c
+++ b/src/3rdparty/xcb/libxcb/shape.c
@@ -3,10 +3,17 @@
* Edit at your peril.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#include <stdlib.h>
#include <string.h>
#include <assert.h>
+#include <stddef.h> /* for offsetof() */
#include "xcbext.h"
#include "shape.h"
+
+#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
#include "xproto.h"
xcb_extension_t xcb_shape_id = { "SHAPE", 0 };
@@ -116,6 +123,7 @@ xcb_shape_query_version (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -149,6 +157,7 @@ xcb_shape_query_version_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -173,6 +182,35 @@ xcb_shape_query_version_reply (xcb_connection_t *c /**< */,
return (xcb_shape_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
}
+int
+xcb_shape_rectangles_sizeof (const void *_buffer /**< */,
+ uint32_t rectangles_len /**< */)
+{
+ 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_shape_rectangles_request_t);
+ xcb_tmp += xcb_block_len;
+ /* rectangles */
+ xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_rectangle_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;
+}
+
/*****************************************************************************
**
@@ -225,10 +263,12 @@ xcb_shape_rectangles_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;
+ /* xcb_rectangle_t rectangles */
xcb_parts[4].iov_base = (char *) rectangles;
xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -285,10 +325,12 @@ xcb_shape_rectangles (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;
+ /* xcb_rectangle_t rectangles */
xcb_parts[4].iov_base = (char *) rectangles;
xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -341,6 +383,7 @@ xcb_shape_mask_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -393,6 +436,7 @@ xcb_shape_mask (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -448,6 +492,7 @@ xcb_shape_combine_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -503,6 +548,7 @@ xcb_shape_combine (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -549,6 +595,7 @@ xcb_shape_offset_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -595,6 +642,7 @@ xcb_shape_offset (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -631,6 +679,7 @@ xcb_shape_query_extents (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -667,6 +716,7 @@ xcb_shape_query_extents_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -727,6 +777,7 @@ xcb_shape_select_input_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -767,6 +818,7 @@ xcb_shape_select_input (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -803,6 +855,7 @@ xcb_shape_input_selected (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -839,6 +892,7 @@ xcb_shape_input_selected_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -863,6 +917,35 @@ xcb_shape_input_selected_reply (xcb_connection_t *c /**< */,
return (xcb_shape_input_selected_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
}
+int
+xcb_shape_get_rectangles_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_shape_get_rectangles_reply_t *_aux = (xcb_shape_get_rectangles_reply_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_shape_get_rectangles_reply_t);
+ xcb_tmp += xcb_block_len;
+ /* rectangles */
+ xcb_block_len += _aux->rectangles_len * sizeof(xcb_rectangle_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_rectangle_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;
+}
+
/*****************************************************************************
**
@@ -899,6 +982,7 @@ xcb_shape_get_rectangles (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -939,6 +1023,7 @@ xcb_shape_get_rectangles_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
diff --git a/src/3rdparty/xcb/libxcb/shm.c b/src/3rdparty/xcb/libxcb/shm.c
index c1637a8654..0a1c238732 100644
--- a/src/3rdparty/xcb/libxcb/shm.c
+++ b/src/3rdparty/xcb/libxcb/shm.c
@@ -3,10 +3,17 @@
* Edit at your peril.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#include <stdlib.h>
#include <string.h>
#include <assert.h>
+#include <stddef.h> /* for offsetof() */
#include "xcbext.h"
#include "shm.h"
+
+#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
#include "xproto.h"
xcb_extension_t xcb_shm_id = { "MIT-SHM", 0 };
@@ -78,6 +85,7 @@ xcb_shm_query_version (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -111,6 +119,7 @@ xcb_shm_query_version_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -174,6 +183,7 @@ xcb_shm_attach_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -217,6 +227,7 @@ xcb_shm_attach (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -253,6 +264,7 @@ xcb_shm_detach_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -289,6 +301,7 @@ xcb_shm_detach (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -368,6 +381,7 @@ xcb_shm_put_image_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -447,6 +461,7 @@ xcb_shm_put_image (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -508,6 +523,7 @@ xcb_shm_get_image (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -569,6 +585,7 @@ xcb_shm_get_image_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -644,6 +661,7 @@ xcb_shm_create_pixmap_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -699,6 +717,7 @@ xcb_shm_create_pixmap (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
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
deleted file mode 100644
index a73e633e73..0000000000
--- a/src/3rdparty/xcb/libxcb/support_libxcb_versions_where_xcb_sumof_not_available.patch
+++ /dev/null
@@ -1,273 +0,0 @@
-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/sync.c b/src/3rdparty/xcb/libxcb/sync.c
index 408a263d2b..1f352756d8 100644
--- a/src/3rdparty/xcb/libxcb/sync.c
+++ b/src/3rdparty/xcb/libxcb/sync.c
@@ -3,10 +3,17 @@
* Edit at your peril.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#include <stdlib.h>
#include <string.h>
#include <assert.h>
+#include <stddef.h> /* for offsetof() */
#include "xcbext.h"
#include "sync.h"
+
+#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
#include "xproto.h"
xcb_extension_t xcb_sync_id = { "SYNC", 0 };
@@ -90,6 +97,44 @@ xcb_sync_counter_end (xcb_sync_counter_iterator_t i /**< */)
/*****************************************************************************
**
+ ** void xcb_sync_fence_next
+ **
+ ** @param xcb_sync_fence_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_sync_fence_next (xcb_sync_fence_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_sync_fence_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_sync_fence_end
+ **
+ ** @param xcb_sync_fence_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_sync_fence_end (xcb_sync_fence_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_sync_int64_next
**
** @param xcb_sync_int64_iterator_t *i
@@ -125,6 +170,35 @@ xcb_sync_int64_end (xcb_sync_int64_iterator_t i /**< */)
return ret;
}
+int
+xcb_sync_systemcounter_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_sync_systemcounter_t *_aux = (xcb_sync_systemcounter_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_sync_systemcounter_t);
+ xcb_tmp += xcb_block_len;
+ /* name */
+ xcb_block_len += _aux->name_len * 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
/*****************************************************************************
**
@@ -191,10 +265,11 @@ void
xcb_sync_systemcounter_next (xcb_sync_systemcounter_iterator_t *i /**< */)
{
xcb_sync_systemcounter_t *R = i->data;
- xcb_generic_iterator_t child = xcb_sync_systemcounter_name_end(R);
+ xcb_generic_iterator_t child;
+ child.data = (xcb_sync_systemcounter_t *)(((char *)R) + xcb_sync_systemcounter_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
--i->rem;
i->data = (xcb_sync_systemcounter_t *) child.data;
- i->index = child.index;
}
@@ -330,6 +405,7 @@ xcb_sync_initialize (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -369,6 +445,7 @@ xcb_sync_initialize_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -393,6 +470,40 @@ xcb_sync_initialize_reply (xcb_connection_t *c /**< */,
return (xcb_sync_initialize_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
}
+int
+xcb_sync_list_system_counters_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_sync_list_system_counters_reply_t *_aux = (xcb_sync_list_system_counters_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_sync_list_system_counters_reply_t);
+ xcb_tmp += xcb_block_len;
+ /* counters */
+ for(i=0; i<_aux->counters_len; i++) {
+ xcb_tmp_len = xcb_sync_systemcounter_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_sync_systemcounter_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;
+}
+
/*****************************************************************************
**
@@ -422,6 +533,7 @@ xcb_sync_list_system_counters (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -455,6 +567,7 @@ xcb_sync_list_system_counters_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -550,6 +663,7 @@ xcb_sync_create_counter_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -589,6 +703,7 @@ xcb_sync_create_counter (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -625,6 +740,7 @@ xcb_sync_destroy_counter_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -661,6 +777,7 @@ xcb_sync_destroy_counter (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -697,6 +814,7 @@ xcb_sync_query_counter (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -733,6 +851,7 @@ xcb_sync_query_counter_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -757,6 +876,35 @@ xcb_sync_query_counter_reply (xcb_connection_t *c /**< */,
return (xcb_sync_query_counter_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
}
+int
+xcb_sync_await_sizeof (const void *_buffer /**< */,
+ uint32_t wait_list_len /**< */)
+{
+ 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_sync_await_request_t);
+ xcb_tmp += xcb_block_len;
+ /* wait_list */
+ xcb_block_len += wait_list_len * sizeof(xcb_sync_waitcondition_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_sync_waitcondition_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;
+}
+
/*****************************************************************************
**
@@ -790,10 +938,12 @@ xcb_sync_await_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;
+ /* xcb_sync_waitcondition_t wait_list */
xcb_parts[4].iov_base = (char *) wait_list;
xcb_parts[4].iov_len = wait_list_len * sizeof(xcb_sync_waitcondition_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -831,10 +981,12 @@ xcb_sync_await (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;
+ /* xcb_sync_waitcondition_t wait_list */
xcb_parts[4].iov_base = (char *) wait_list;
xcb_parts[4].iov_len = wait_list_len * sizeof(xcb_sync_waitcondition_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -874,6 +1026,7 @@ xcb_sync_change_counter_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -913,6 +1066,7 @@ xcb_sync_change_counter (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -952,6 +1106,7 @@ xcb_sync_set_counter_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -991,10 +1146,40 @@ xcb_sync_set_counter (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_sync_create_alarm_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_sync_create_alarm_request_t *_aux = (xcb_sync_create_alarm_request_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_sync_create_alarm_request_t);
+ xcb_tmp += xcb_block_len;
+ /* value_list */
+ xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+}
+
/*****************************************************************************
**
@@ -1032,10 +1217,12 @@ xcb_sync_create_alarm_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;
+ /* uint32_t value_list */
xcb_parts[4].iov_base = (char *) value_list;
xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1077,14 +1264,45 @@ xcb_sync_create_alarm (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;
+ /* uint32_t value_list */
xcb_parts[4].iov_base = (char *) value_list;
xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_sync_change_alarm_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_sync_change_alarm_request_t *_aux = (xcb_sync_change_alarm_request_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_sync_change_alarm_request_t);
+ xcb_tmp += xcb_block_len;
+ /* value_list */
+ xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+}
+
/*****************************************************************************
**
@@ -1122,10 +1340,12 @@ xcb_sync_change_alarm_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;
+ /* uint32_t value_list */
xcb_parts[4].iov_base = (char *) value_list;
xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1167,10 +1387,12 @@ xcb_sync_change_alarm (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;
+ /* uint32_t value_list */
xcb_parts[4].iov_base = (char *) value_list;
xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1207,6 +1429,7 @@ xcb_sync_destroy_alarm_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1243,6 +1466,7 @@ xcb_sync_destroy_alarm (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1279,6 +1503,7 @@ xcb_sync_query_alarm (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1315,6 +1540,7 @@ xcb_sync_query_alarm_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1374,6 +1600,7 @@ xcb_sync_set_priority_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1413,6 +1640,7 @@ xcb_sync_set_priority (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1449,6 +1677,7 @@ xcb_sync_get_priority (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1485,6 +1714,7 @@ xcb_sync_get_priority_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1509,3 +1739,520 @@ xcb_sync_get_priority_reply (xcb_connection_t *c /**< */,
return (xcb_sync_get_priority_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
}
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_sync_create_fence_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_drawable_t drawable
+ ** @param xcb_sync_fence_t fence
+ ** @param uint8_t initially_triggered
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_sync_create_fence_checked (xcb_connection_t *c /**< */,
+ xcb_drawable_t drawable /**< */,
+ xcb_sync_fence_t fence /**< */,
+ uint8_t initially_triggered /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_sync_id,
+ /* opcode */ XCB_SYNC_CREATE_FENCE,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_sync_create_fence_request_t xcb_out;
+
+ xcb_out.drawable = drawable;
+ xcb_out.fence = fence;
+ xcb_out.initially_triggered = initially_triggered;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_sync_create_fence
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_drawable_t drawable
+ ** @param xcb_sync_fence_t fence
+ ** @param uint8_t initially_triggered
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_sync_create_fence (xcb_connection_t *c /**< */,
+ xcb_drawable_t drawable /**< */,
+ xcb_sync_fence_t fence /**< */,
+ uint8_t initially_triggered /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_sync_id,
+ /* opcode */ XCB_SYNC_CREATE_FENCE,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_sync_create_fence_request_t xcb_out;
+
+ xcb_out.drawable = drawable;
+ xcb_out.fence = fence;
+ xcb_out.initially_triggered = initially_triggered;
+
+ 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_void_cookie_t xcb_sync_trigger_fence_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_sync_fence_t fence
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_sync_trigger_fence_checked (xcb_connection_t *c /**< */,
+ xcb_sync_fence_t fence /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_sync_id,
+ /* opcode */ XCB_SYNC_TRIGGER_FENCE,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_sync_trigger_fence_request_t xcb_out;
+
+ xcb_out.fence = fence;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_sync_trigger_fence
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_sync_fence_t fence
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_sync_trigger_fence (xcb_connection_t *c /**< */,
+ xcb_sync_fence_t fence /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_sync_id,
+ /* opcode */ XCB_SYNC_TRIGGER_FENCE,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_sync_trigger_fence_request_t xcb_out;
+
+ xcb_out.fence = fence;
+
+ 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_void_cookie_t xcb_sync_reset_fence_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_sync_fence_t fence
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_sync_reset_fence_checked (xcb_connection_t *c /**< */,
+ xcb_sync_fence_t fence /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_sync_id,
+ /* opcode */ XCB_SYNC_RESET_FENCE,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_sync_reset_fence_request_t xcb_out;
+
+ xcb_out.fence = fence;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_sync_reset_fence
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_sync_fence_t fence
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_sync_reset_fence (xcb_connection_t *c /**< */,
+ xcb_sync_fence_t fence /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_sync_id,
+ /* opcode */ XCB_SYNC_RESET_FENCE,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_sync_reset_fence_request_t xcb_out;
+
+ xcb_out.fence = fence;
+
+ 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_void_cookie_t xcb_sync_destroy_fence_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_sync_fence_t fence
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_sync_destroy_fence_checked (xcb_connection_t *c /**< */,
+ xcb_sync_fence_t fence /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_sync_id,
+ /* opcode */ XCB_SYNC_DESTROY_FENCE,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_sync_destroy_fence_request_t xcb_out;
+
+ xcb_out.fence = fence;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_sync_destroy_fence
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_sync_fence_t fence
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_sync_destroy_fence (xcb_connection_t *c /**< */,
+ xcb_sync_fence_t fence /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_sync_id,
+ /* opcode */ XCB_SYNC_DESTROY_FENCE,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_sync_destroy_fence_request_t xcb_out;
+
+ xcb_out.fence = fence;
+
+ 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_sync_query_fence_cookie_t xcb_sync_query_fence
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_sync_fence_t fence
+ ** @returns xcb_sync_query_fence_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_sync_query_fence_cookie_t
+xcb_sync_query_fence (xcb_connection_t *c /**< */,
+ xcb_sync_fence_t fence /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_sync_id,
+ /* opcode */ XCB_SYNC_QUERY_FENCE,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_sync_query_fence_cookie_t xcb_ret;
+ xcb_sync_query_fence_request_t xcb_out;
+
+ xcb_out.fence = fence;
+
+ 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_sync_query_fence_cookie_t xcb_sync_query_fence_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_sync_fence_t fence
+ ** @returns xcb_sync_query_fence_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_sync_query_fence_cookie_t
+xcb_sync_query_fence_unchecked (xcb_connection_t *c /**< */,
+ xcb_sync_fence_t fence /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_sync_id,
+ /* opcode */ XCB_SYNC_QUERY_FENCE,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_sync_query_fence_cookie_t xcb_ret;
+ xcb_sync_query_fence_request_t xcb_out;
+
+ xcb_out.fence = fence;
+
+ 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_sync_query_fence_reply_t * xcb_sync_query_fence_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_sync_query_fence_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_sync_query_fence_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_sync_query_fence_reply_t *
+xcb_sync_query_fence_reply (xcb_connection_t *c /**< */,
+ xcb_sync_query_fence_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */)
+{
+ return (xcb_sync_query_fence_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_sync_await_fence_sizeof (const void *_buffer /**< */,
+ uint32_t fence_list_len /**< */)
+{
+ 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_sync_await_fence_request_t);
+ xcb_tmp += xcb_block_len;
+ /* fence_list */
+ xcb_block_len += fence_list_len * sizeof(xcb_sync_fence_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_sync_fence_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_sync_await_fence_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param uint32_t fence_list_len
+ ** @param const xcb_sync_fence_t *fence_list
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_sync_await_fence_checked (xcb_connection_t *c /**< */,
+ uint32_t fence_list_len /**< */,
+ const xcb_sync_fence_t *fence_list /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 4,
+ /* ext */ &xcb_sync_id,
+ /* opcode */ XCB_SYNC_AWAIT_FENCE,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_void_cookie_t xcb_ret;
+ xcb_sync_await_fence_request_t xcb_out;
+
+
+ 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_sync_fence_t fence_list */
+ xcb_parts[4].iov_base = (char *) fence_list;
+ xcb_parts[4].iov_len = fence_list_len * sizeof(xcb_sync_fence_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_sync_await_fence
+ **
+ ** @param xcb_connection_t *c
+ ** @param uint32_t fence_list_len
+ ** @param const xcb_sync_fence_t *fence_list
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_sync_await_fence (xcb_connection_t *c /**< */,
+ uint32_t fence_list_len /**< */,
+ const xcb_sync_fence_t *fence_list /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 4,
+ /* ext */ &xcb_sync_id,
+ /* opcode */ XCB_SYNC_AWAIT_FENCE,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_void_cookie_t xcb_ret;
+ xcb_sync_await_fence_request_t xcb_out;
+
+
+ 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_sync_fence_t fence_list */
+ xcb_parts[4].iov_base = (char *) fence_list;
+ xcb_parts[4].iov_len = fence_list_len * sizeof(xcb_sync_fence_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
diff --git a/src/3rdparty/xcb/libxcb/xfixes.c b/src/3rdparty/xcb/libxcb/xfixes.c
index 541918ce16..4c0dc84b64 100644
--- a/src/3rdparty/xcb/libxcb/xfixes.c
+++ b/src/3rdparty/xcb/libxcb/xfixes.c
@@ -3,10 +3,17 @@
* Edit at your peril.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#include <stdlib.h>
#include <string.h>
#include <assert.h>
+#include <stddef.h> /* for offsetof() */
#include "xcbext.h"
#include "xfixes.h"
+
+#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
#include "xproto.h"
#include "render.h"
#include "shape.h"
@@ -48,6 +55,7 @@ xcb_xfixes_query_version (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -87,6 +95,7 @@ xcb_xfixes_query_version_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -153,6 +162,7 @@ xcb_xfixes_change_save_set_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -199,6 +209,7 @@ xcb_xfixes_change_save_set (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -241,6 +252,7 @@ xcb_xfixes_select_selection_input_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -283,6 +295,7 @@ xcb_xfixes_select_selection_input (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -322,6 +335,7 @@ xcb_xfixes_select_cursor_input_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -361,10 +375,40 @@ xcb_xfixes_select_cursor_input (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_xfixes_get_cursor_image_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xfixes_get_cursor_image_reply_t *_aux = (xcb_xfixes_get_cursor_image_reply_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xfixes_get_cursor_image_reply_t);
+ xcb_tmp += xcb_block_len;
+ /* cursor_image */
+ xcb_block_len += (_aux->width * _aux->height) * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+}
+
/*****************************************************************************
**
@@ -394,6 +438,7 @@ xcb_xfixes_get_cursor_image (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -427,6 +472,7 @@ xcb_xfixes_get_cursor_image_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -541,6 +587,35 @@ xcb_xfixes_region_end (xcb_xfixes_region_iterator_t i /**< */)
return ret;
}
+int
+xcb_xfixes_create_region_sizeof (const void *_buffer /**< */,
+ uint32_t rectangles_len /**< */)
+{
+ 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_xfixes_create_region_request_t);
+ xcb_tmp += xcb_block_len;
+ /* rectangles */
+ xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_rectangle_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;
+}
+
/*****************************************************************************
**
@@ -577,10 +652,12 @@ xcb_xfixes_create_region_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;
+ /* xcb_rectangle_t rectangles */
xcb_parts[4].iov_base = (char *) rectangles;
xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -621,10 +698,12 @@ xcb_xfixes_create_region (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;
+ /* xcb_rectangle_t rectangles */
xcb_parts[4].iov_base = (char *) rectangles;
xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -664,6 +743,7 @@ xcb_xfixes_create_region_from_bitmap_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -703,6 +783,7 @@ xcb_xfixes_create_region_from_bitmap (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -746,6 +827,7 @@ xcb_xfixes_create_region_from_window_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -789,6 +871,7 @@ xcb_xfixes_create_region_from_window (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -828,6 +911,7 @@ xcb_xfixes_create_region_from_gc_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -867,6 +951,7 @@ xcb_xfixes_create_region_from_gc (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -906,6 +991,7 @@ xcb_xfixes_create_region_from_picture_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -945,6 +1031,7 @@ xcb_xfixes_create_region_from_picture (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -981,6 +1068,7 @@ xcb_xfixes_destroy_region_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1017,10 +1105,40 @@ xcb_xfixes_destroy_region (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_xfixes_set_region_sizeof (const void *_buffer /**< */,
+ uint32_t rectangles_len /**< */)
+{
+ 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_xfixes_set_region_request_t);
+ xcb_tmp += xcb_block_len;
+ /* rectangles */
+ xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_rectangle_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;
+}
+
/*****************************************************************************
**
@@ -1057,10 +1175,12 @@ xcb_xfixes_set_region_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;
+ /* xcb_rectangle_t rectangles */
xcb_parts[4].iov_base = (char *) rectangles;
xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1101,10 +1221,12 @@ xcb_xfixes_set_region (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;
+ /* xcb_rectangle_t rectangles */
xcb_parts[4].iov_base = (char *) rectangles;
xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1144,6 +1266,7 @@ xcb_xfixes_copy_region_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1183,6 +1306,7 @@ xcb_xfixes_copy_region (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1225,6 +1349,7 @@ xcb_xfixes_union_region_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1267,6 +1392,7 @@ xcb_xfixes_union_region (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1309,6 +1435,7 @@ xcb_xfixes_intersect_region_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1351,6 +1478,7 @@ xcb_xfixes_intersect_region (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1393,6 +1521,7 @@ xcb_xfixes_subtract_region_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1435,6 +1564,7 @@ xcb_xfixes_subtract_region (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1477,6 +1607,7 @@ xcb_xfixes_invert_region_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1519,6 +1650,7 @@ xcb_xfixes_invert_region (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1561,6 +1693,7 @@ xcb_xfixes_translate_region_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1603,6 +1736,7 @@ xcb_xfixes_translate_region (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1642,6 +1776,7 @@ xcb_xfixes_region_extents_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1681,10 +1816,40 @@ xcb_xfixes_region_extents (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_xfixes_fetch_region_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xfixes_fetch_region_reply_t *_aux = (xcb_xfixes_fetch_region_reply_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xfixes_fetch_region_reply_t);
+ xcb_tmp += xcb_block_len;
+ /* rectangles */
+ xcb_block_len += (_aux->length / 2) * sizeof(xcb_rectangle_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_rectangle_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;
+}
+
/*****************************************************************************
**
@@ -1717,6 +1882,7 @@ xcb_xfixes_fetch_region (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1753,6 +1919,7 @@ xcb_xfixes_fetch_region_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1870,6 +2037,7 @@ xcb_xfixes_set_gc_clip_region_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1915,6 +2083,7 @@ xcb_xfixes_set_gc_clip_region (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -1964,6 +2133,7 @@ xcb_xfixes_set_window_shape_region_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2013,6 +2183,7 @@ xcb_xfixes_set_window_shape_region (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2058,6 +2229,7 @@ xcb_xfixes_set_picture_clip_region_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2103,10 +2275,40 @@ xcb_xfixes_set_picture_clip_region (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_xfixes_set_cursor_name_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xfixes_set_cursor_name_request_t *_aux = (xcb_xfixes_set_cursor_name_request_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xfixes_set_cursor_name_request_t);
+ xcb_tmp += xcb_block_len;
+ /* name */
+ xcb_block_len += _aux->nbytes * 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
/*****************************************************************************
**
@@ -2145,10 +2347,12 @@ xcb_xfixes_set_cursor_name_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;
+ /* char name */
xcb_parts[4].iov_base = (char *) name;
xcb_parts[4].iov_len = nbytes * sizeof(char);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2191,14 +2395,45 @@ xcb_xfixes_set_cursor_name (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;
+ /* char name */
xcb_parts[4].iov_base = (char *) name;
xcb_parts[4].iov_len = nbytes * sizeof(char);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_xfixes_get_cursor_name_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xfixes_get_cursor_name_reply_t *_aux = (xcb_xfixes_get_cursor_name_reply_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xfixes_get_cursor_name_reply_t);
+ xcb_tmp += xcb_block_len;
+ /* name */
+ xcb_block_len += _aux->nbytes * 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
/*****************************************************************************
**
@@ -2231,6 +2466,7 @@ xcb_xfixes_get_cursor_name (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2267,6 +2503,7 @@ xcb_xfixes_get_cursor_name_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2343,6 +2580,47 @@ xcb_xfixes_get_cursor_name_reply (xcb_connection_t *c /**<
return (xcb_xfixes_get_cursor_name_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
}
+int
+xcb_xfixes_get_cursor_image_and_name_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xfixes_get_cursor_image_and_name_reply_t *_aux = (xcb_xfixes_get_cursor_image_and_name_reply_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xfixes_get_cursor_image_and_name_reply_t);
+ xcb_tmp += xcb_block_len;
+ /* name */
+ xcb_block_len += _aux->nbytes * 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* cursor_image */
+ xcb_block_len += (_aux->width * _aux->height) * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+}
+
/*****************************************************************************
**
@@ -2372,6 +2650,7 @@ xcb_xfixes_get_cursor_image_and_name (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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2405,6 +2684,7 @@ xcb_xfixes_get_cursor_image_and_name_unchecked (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2570,6 +2850,7 @@ xcb_xfixes_change_cursor_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2609,10 +2890,40 @@ xcb_xfixes_change_cursor (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
+int
+xcb_xfixes_change_cursor_by_name_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xfixes_change_cursor_by_name_request_t *_aux = (xcb_xfixes_change_cursor_by_name_request_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xfixes_change_cursor_by_name_request_t);
+ xcb_tmp += xcb_block_len;
+ /* name */
+ xcb_block_len += _aux->nbytes * 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
/*****************************************************************************
**
@@ -2651,10 +2962,12 @@ xcb_xfixes_change_cursor_by_name_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;
+ /* char name */
xcb_parts[4].iov_base = (char *) name;
xcb_parts[4].iov_len = nbytes * sizeof(char);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2697,10 +3010,12 @@ xcb_xfixes_change_cursor_by_name (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;
+ /* char name */
xcb_parts[4].iov_base = (char *) name;
xcb_parts[4].iov_len = nbytes * sizeof(char);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2752,6 +3067,7 @@ xcb_xfixes_expand_region_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2803,6 +3119,7 @@ xcb_xfixes_expand_region (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2839,6 +3156,7 @@ xcb_xfixes_hide_cursor_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2875,6 +3193,7 @@ xcb_xfixes_hide_cursor (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2911,6 +3230,7 @@ xcb_xfixes_show_cursor_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;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -2947,6 +3267,7 @@ xcb_xfixes_show_cursor (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;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
diff --git a/src/3rdparty/xcb/libxcb/xinerama.c b/src/3rdparty/xcb/libxcb/xinerama.c
index 05b6b73707..e660be267b 100644
--- a/src/3rdparty/xcb/libxcb/xinerama.c
+++ b/src/3rdparty/xcb/libxcb/xinerama.c
@@ -3,10 +3,17 @@
* Edit at your peril.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#include <stdlib.h>
#include <string.h>
#include <assert.h>
+#include <stddef.h> /* for offsetof() */
#include "xcbext.h"
#include "xinerama.h"
+
+#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
#include "xproto.h"
xcb_extension_t xcb_xinerama_id = { "XINERAMA", 0 };
@@ -15,12 +22,12 @@ xcb_extension_t xcb_xinerama_id = { "XINERAMA", 0 };
/*****************************************************************************
**
** void xcb_xinerama_screen_info_next
- **
+ **
** @param xcb_xinerama_screen_info_iterator_t *i
** @returns void
**
*****************************************************************************/
-
+
void
xcb_xinerama_screen_info_next (xcb_xinerama_screen_info_iterator_t *i /**< */)
{
@@ -33,12 +40,12 @@ xcb_xinerama_screen_info_next (xcb_xinerama_screen_info_iterator_t *i /**< */)
/*****************************************************************************
**
** xcb_generic_iterator_t xcb_xinerama_screen_info_end
- **
+ **
** @param xcb_xinerama_screen_info_iterator_t i
** @returns xcb_generic_iterator_t
**
*****************************************************************************/
-
+
xcb_generic_iterator_t
xcb_xinerama_screen_info_end (xcb_xinerama_screen_info_iterator_t i /**< */)
{
@@ -53,14 +60,14 @@ xcb_xinerama_screen_info_end (xcb_xinerama_screen_info_iterator_t i /**< */)
/*****************************************************************************
**
** xcb_xinerama_query_version_cookie_t xcb_xinerama_query_version
- **
+ **
** @param xcb_connection_t *c
** @param uint8_t major
** @param uint8_t minor
** @returns xcb_xinerama_query_version_cookie_t
**
*****************************************************************************/
-
+
xcb_xinerama_query_version_cookie_t
xcb_xinerama_query_version (xcb_connection_t *c /**< */,
uint8_t major /**< */,
@@ -72,18 +79,19 @@ xcb_xinerama_query_version (xcb_connection_t *c /**< */,
/* opcode */ XCB_XINERAMA_QUERY_VERSION,
/* isvoid */ 0
};
-
+
struct iovec xcb_parts[4];
xcb_xinerama_query_version_cookie_t xcb_ret;
xcb_xinerama_query_version_request_t xcb_out;
-
+
xcb_out.major = major;
xcb_out.minor = minor;
-
+
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;
}
@@ -92,14 +100,14 @@ xcb_xinerama_query_version (xcb_connection_t *c /**< */,
/*****************************************************************************
**
** xcb_xinerama_query_version_cookie_t xcb_xinerama_query_version_unchecked
- **
+ **
** @param xcb_connection_t *c
** @param uint8_t major
** @param uint8_t minor
** @returns xcb_xinerama_query_version_cookie_t
**
*****************************************************************************/
-
+
xcb_xinerama_query_version_cookie_t
xcb_xinerama_query_version_unchecked (xcb_connection_t *c /**< */,
uint8_t major /**< */,
@@ -111,18 +119,19 @@ xcb_xinerama_query_version_unchecked (xcb_connection_t *c /**< */,
/* opcode */ XCB_XINERAMA_QUERY_VERSION,
/* isvoid */ 0
};
-
+
struct iovec xcb_parts[4];
xcb_xinerama_query_version_cookie_t xcb_ret;
xcb_xinerama_query_version_request_t xcb_out;
-
+
xcb_out.major = major;
xcb_out.minor = minor;
-
+
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;
}
@@ -131,14 +140,14 @@ xcb_xinerama_query_version_unchecked (xcb_connection_t *c /**< */,
/*****************************************************************************
**
** xcb_xinerama_query_version_reply_t * xcb_xinerama_query_version_reply
- **
+ **
** @param xcb_connection_t *c
** @param xcb_xinerama_query_version_cookie_t cookie
** @param xcb_generic_error_t **e
** @returns xcb_xinerama_query_version_reply_t *
**
*****************************************************************************/
-
+
xcb_xinerama_query_version_reply_t *
xcb_xinerama_query_version_reply (xcb_connection_t *c /**< */,
xcb_xinerama_query_version_cookie_t cookie /**< */,
@@ -151,13 +160,13 @@ xcb_xinerama_query_version_reply (xcb_connection_t *c /**<
/*****************************************************************************
**
** xcb_xinerama_get_state_cookie_t xcb_xinerama_get_state
- **
+ **
** @param xcb_connection_t *c
** @param xcb_window_t window
** @returns xcb_xinerama_get_state_cookie_t
**
*****************************************************************************/
-
+
xcb_xinerama_get_state_cookie_t
xcb_xinerama_get_state (xcb_connection_t *c /**< */,
xcb_window_t window /**< */)
@@ -168,17 +177,18 @@ xcb_xinerama_get_state (xcb_connection_t *c /**< */,
/* opcode */ XCB_XINERAMA_GET_STATE,
/* isvoid */ 0
};
-
+
struct iovec xcb_parts[4];
xcb_xinerama_get_state_cookie_t xcb_ret;
xcb_xinerama_get_state_request_t xcb_out;
-
+
xcb_out.window = window;
-
+
xcb_parts[2].iov_base = (char *) &xcb_out;
xcb_parts[2].iov_len = sizeof(xcb_out);
xcb_parts[3].iov_base = 0;
xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -187,13 +197,13 @@ xcb_xinerama_get_state (xcb_connection_t *c /**< */,
/*****************************************************************************
**
** xcb_xinerama_get_state_cookie_t xcb_xinerama_get_state_unchecked
- **
+ **
** @param xcb_connection_t *c
** @param xcb_window_t window
** @returns xcb_xinerama_get_state_cookie_t
**
*****************************************************************************/
-
+
xcb_xinerama_get_state_cookie_t
xcb_xinerama_get_state_unchecked (xcb_connection_t *c /**< */,
xcb_window_t window /**< */)
@@ -204,17 +214,18 @@ xcb_xinerama_get_state_unchecked (xcb_connection_t *c /**< */,
/* opcode */ XCB_XINERAMA_GET_STATE,
/* isvoid */ 0
};
-
+
struct iovec xcb_parts[4];
xcb_xinerama_get_state_cookie_t xcb_ret;
xcb_xinerama_get_state_request_t xcb_out;
-
+
xcb_out.window = window;
-
+
xcb_parts[2].iov_base = (char *) &xcb_out;
xcb_parts[2].iov_len = sizeof(xcb_out);
xcb_parts[3].iov_base = 0;
xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -223,14 +234,14 @@ xcb_xinerama_get_state_unchecked (xcb_connection_t *c /**< */,
/*****************************************************************************
**
** xcb_xinerama_get_state_reply_t * xcb_xinerama_get_state_reply
- **
+ **
** @param xcb_connection_t *c
** @param xcb_xinerama_get_state_cookie_t cookie
** @param xcb_generic_error_t **e
** @returns xcb_xinerama_get_state_reply_t *
**
*****************************************************************************/
-
+
xcb_xinerama_get_state_reply_t *
xcb_xinerama_get_state_reply (xcb_connection_t *c /**< */,
xcb_xinerama_get_state_cookie_t cookie /**< */,
@@ -243,13 +254,13 @@ xcb_xinerama_get_state_reply (xcb_connection_t *c /**< */,
/*****************************************************************************
**
** xcb_xinerama_get_screen_count_cookie_t xcb_xinerama_get_screen_count
- **
+ **
** @param xcb_connection_t *c
** @param xcb_window_t window
** @returns xcb_xinerama_get_screen_count_cookie_t
**
*****************************************************************************/
-
+
xcb_xinerama_get_screen_count_cookie_t
xcb_xinerama_get_screen_count (xcb_connection_t *c /**< */,
xcb_window_t window /**< */)
@@ -260,17 +271,18 @@ xcb_xinerama_get_screen_count (xcb_connection_t *c /**< */,
/* opcode */ XCB_XINERAMA_GET_SCREEN_COUNT,
/* isvoid */ 0
};
-
+
struct iovec xcb_parts[4];
xcb_xinerama_get_screen_count_cookie_t xcb_ret;
xcb_xinerama_get_screen_count_request_t xcb_out;
-
+
xcb_out.window = window;
-
+
xcb_parts[2].iov_base = (char *) &xcb_out;
xcb_parts[2].iov_len = sizeof(xcb_out);
xcb_parts[3].iov_base = 0;
xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -279,13 +291,13 @@ xcb_xinerama_get_screen_count (xcb_connection_t *c /**< */,
/*****************************************************************************
**
** xcb_xinerama_get_screen_count_cookie_t xcb_xinerama_get_screen_count_unchecked
- **
+ **
** @param xcb_connection_t *c
** @param xcb_window_t window
** @returns xcb_xinerama_get_screen_count_cookie_t
**
*****************************************************************************/
-
+
xcb_xinerama_get_screen_count_cookie_t
xcb_xinerama_get_screen_count_unchecked (xcb_connection_t *c /**< */,
xcb_window_t window /**< */)
@@ -296,17 +308,18 @@ xcb_xinerama_get_screen_count_unchecked (xcb_connection_t *c /**< */,
/* opcode */ XCB_XINERAMA_GET_SCREEN_COUNT,
/* isvoid */ 0
};
-
+
struct iovec xcb_parts[4];
xcb_xinerama_get_screen_count_cookie_t xcb_ret;
xcb_xinerama_get_screen_count_request_t xcb_out;
-
+
xcb_out.window = window;
-
+
xcb_parts[2].iov_base = (char *) &xcb_out;
xcb_parts[2].iov_len = sizeof(xcb_out);
xcb_parts[3].iov_base = 0;
xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
}
@@ -315,14 +328,14 @@ xcb_xinerama_get_screen_count_unchecked (xcb_connection_t *c /**< */,
/*****************************************************************************
**
** xcb_xinerama_get_screen_count_reply_t * xcb_xinerama_get_screen_count_reply
- **
+ **
** @param xcb_connection_t *c
** @param xcb_xinerama_get_screen_count_cookie_t cookie
** @param xcb_generic_error_t **e
** @returns xcb_xinerama_get_screen_count_reply_t *
**
*****************************************************************************/
-
+
xcb_xinerama_get_screen_count_reply_t *
xcb_xinerama_get_screen_count_reply (xcb_connection_t *c /**< */,
xcb_xinerama_get_screen_count_cookie_t cookie /**< */,
@@ -335,14 +348,14 @@ xcb_xinerama_get_screen_count_reply (xcb_connection_t *c
/*****************************************************************************
**
** xcb_xinerama_get_screen_size_cookie_t xcb_xinerama_get_screen_size
- **
+ **
** @param xcb_connection_t *c
** @param xcb_window_t window
** @param uint32_t screen
** @returns xcb_xinerama_get_screen_size_cookie_t
**
*****************************************************************************/
-
+
xcb_xinerama_get_screen_size_cookie_t
xcb_xinerama_get_screen_size (xcb_connection_t *c /**< */,
xcb_window_t window /**< */,
@@ -354,18 +367,19 @@ xcb_xinerama_get_screen_size (xcb_connection_t *c /**< */,
/* opcode */ XCB_XINERAMA_GET_SCREEN_SIZE,
/* isvoid */ 0
};
-
+
struct iovec xcb_parts[4];
xcb_xinerama_get_screen_size_cookie_t xcb_ret;
xcb_xinerama_get_screen_size_request_t xcb_out;
-
+
xcb_out.window = window;
xcb_out.screen = screen;
-
+
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;
}
@@ -374,14 +388,14 @@ xcb_xinerama_get_screen_size (xcb_connection_t *c /**< */,
/*****************************************************************************
**
** xcb_xinerama_get_screen_size_cookie_t xcb_xinerama_get_screen_size_unchecked
- **
+ **
** @param xcb_connection_t *c
** @param xcb_window_t window
** @param uint32_t screen
** @returns xcb_xinerama_get_screen_size_cookie_t
**
*****************************************************************************/
-
+
xcb_xinerama_get_screen_size_cookie_t
xcb_xinerama_get_screen_size_unchecked (xcb_connection_t *c /**< */,
xcb_window_t window /**< */,
@@ -393,18 +407,19 @@ xcb_xinerama_get_screen_size_unchecked (xcb_connection_t *c /**< */,
/* opcode */ XCB_XINERAMA_GET_SCREEN_SIZE,
/* isvoid */ 0
};
-
+
struct iovec xcb_parts[4];
xcb_xinerama_get_screen_size_cookie_t xcb_ret;
xcb_xinerama_get_screen_size_request_t xcb_out;
-
+
xcb_out.window = window;
xcb_out.screen = screen;
-
+
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;
}
@@ -413,14 +428,14 @@ xcb_xinerama_get_screen_size_unchecked (xcb_connection_t *c /**< */,
/*****************************************************************************
**
** xcb_xinerama_get_screen_size_reply_t * xcb_xinerama_get_screen_size_reply
- **
+ **
** @param xcb_connection_t *c
** @param xcb_xinerama_get_screen_size_cookie_t cookie
** @param xcb_generic_error_t **e
** @returns xcb_xinerama_get_screen_size_reply_t *
**
*****************************************************************************/
-
+
xcb_xinerama_get_screen_size_reply_t *
xcb_xinerama_get_screen_size_reply (xcb_connection_t *c /**< */,
xcb_xinerama_get_screen_size_cookie_t cookie /**< */,
@@ -433,12 +448,12 @@ xcb_xinerama_get_screen_size_reply (xcb_connection_t *c /
/*****************************************************************************
**
** xcb_xinerama_is_active_cookie_t xcb_xinerama_is_active
- **
+ **
** @param xcb_connection_t *c
** @returns xcb_xinerama_is_active_cookie_t
**
*****************************************************************************/
-
+
xcb_xinerama_is_active_cookie_t
xcb_xinerama_is_active (xcb_connection_t *c /**< */)
{
@@ -448,16 +463,17 @@ xcb_xinerama_is_active (xcb_connection_t *c /**< */)
/* opcode */ XCB_XINERAMA_IS_ACTIVE,
/* isvoid */ 0
};
-
+
struct iovec xcb_parts[4];
xcb_xinerama_is_active_cookie_t xcb_ret;
xcb_xinerama_is_active_request_t xcb_out;
-
-
+
+
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;
}
@@ -466,12 +482,12 @@ xcb_xinerama_is_active (xcb_connection_t *c /**< */)
/*****************************************************************************
**
** xcb_xinerama_is_active_cookie_t xcb_xinerama_is_active_unchecked
- **
+ **
** @param xcb_connection_t *c
** @returns xcb_xinerama_is_active_cookie_t
**
*****************************************************************************/
-
+
xcb_xinerama_is_active_cookie_t
xcb_xinerama_is_active_unchecked (xcb_connection_t *c /**< */)
{
@@ -481,16 +497,17 @@ xcb_xinerama_is_active_unchecked (xcb_connection_t *c /**< */)
/* opcode */ XCB_XINERAMA_IS_ACTIVE,
/* isvoid */ 0
};
-
+
struct iovec xcb_parts[4];
xcb_xinerama_is_active_cookie_t xcb_ret;
xcb_xinerama_is_active_request_t xcb_out;
-
-
+
+
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;
}
@@ -499,14 +516,14 @@ xcb_xinerama_is_active_unchecked (xcb_connection_t *c /**< */)
/*****************************************************************************
**
** xcb_xinerama_is_active_reply_t * xcb_xinerama_is_active_reply
- **
+ **
** @param xcb_connection_t *c
** @param xcb_xinerama_is_active_cookie_t cookie
** @param xcb_generic_error_t **e
** @returns xcb_xinerama_is_active_reply_t *
**
*****************************************************************************/
-
+
xcb_xinerama_is_active_reply_t *
xcb_xinerama_is_active_reply (xcb_connection_t *c /**< */,
xcb_xinerama_is_active_cookie_t cookie /**< */,
@@ -515,16 +532,45 @@ xcb_xinerama_is_active_reply (xcb_connection_t *c /**< */,
return (xcb_xinerama_is_active_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
}
+int
+xcb_xinerama_query_screens_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xinerama_query_screens_reply_t *_aux = (xcb_xinerama_query_screens_reply_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xinerama_query_screens_reply_t);
+ xcb_tmp += xcb_block_len;
+ /* screen_info */
+ xcb_block_len += _aux->number * sizeof(xcb_xinerama_screen_info_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xinerama_screen_info_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
/*****************************************************************************
**
** xcb_xinerama_query_screens_cookie_t xcb_xinerama_query_screens
- **
+ **
** @param xcb_connection_t *c
** @returns xcb_xinerama_query_screens_cookie_t
**
*****************************************************************************/
-
+
xcb_xinerama_query_screens_cookie_t
xcb_xinerama_query_screens (xcb_connection_t *c /**< */)
{
@@ -534,16 +580,17 @@ xcb_xinerama_query_screens (xcb_connection_t *c /**< */)
/* opcode */ XCB_XINERAMA_QUERY_SCREENS,
/* isvoid */ 0
};
-
+
struct iovec xcb_parts[4];
xcb_xinerama_query_screens_cookie_t xcb_ret;
xcb_xinerama_query_screens_request_t xcb_out;
-
-
+
+
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;
}
@@ -552,12 +599,12 @@ xcb_xinerama_query_screens (xcb_connection_t *c /**< */)
/*****************************************************************************
**
** xcb_xinerama_query_screens_cookie_t xcb_xinerama_query_screens_unchecked
- **
+ **
** @param xcb_connection_t *c
** @returns xcb_xinerama_query_screens_cookie_t
**
*****************************************************************************/
-
+
xcb_xinerama_query_screens_cookie_t
xcb_xinerama_query_screens_unchecked (xcb_connection_t *c /**< */)
{
@@ -567,16 +614,17 @@ xcb_xinerama_query_screens_unchecked (xcb_connection_t *c /**< */)
/* opcode */ XCB_XINERAMA_QUERY_SCREENS,
/* isvoid */ 0
};
-
+
struct iovec xcb_parts[4];
xcb_xinerama_query_screens_cookie_t xcb_ret;
xcb_xinerama_query_screens_request_t xcb_out;
-
-
+
+
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;
}
@@ -585,12 +633,12 @@ xcb_xinerama_query_screens_unchecked (xcb_connection_t *c /**< */)
/*****************************************************************************
**
** xcb_xinerama_screen_info_t * xcb_xinerama_query_screens_screen_info
- **
+ **
** @param const xcb_xinerama_query_screens_reply_t *R
** @returns xcb_xinerama_screen_info_t *
**
*****************************************************************************/
-
+
xcb_xinerama_screen_info_t *
xcb_xinerama_query_screens_screen_info (const xcb_xinerama_query_screens_reply_t *R /**< */)
{
@@ -601,12 +649,12 @@ xcb_xinerama_query_screens_screen_info (const xcb_xinerama_query_screens_reply_t
/*****************************************************************************
**
** int xcb_xinerama_query_screens_screen_info_length
- **
+ **
** @param const xcb_xinerama_query_screens_reply_t *R
** @returns int
**
*****************************************************************************/
-
+
int
xcb_xinerama_query_screens_screen_info_length (const xcb_xinerama_query_screens_reply_t *R /**< */)
{
@@ -617,12 +665,12 @@ xcb_xinerama_query_screens_screen_info_length (const xcb_xinerama_query_screens_
/*****************************************************************************
**
** xcb_xinerama_screen_info_iterator_t xcb_xinerama_query_screens_screen_info_iterator
- **
+ **
** @param const xcb_xinerama_query_screens_reply_t *R
** @returns xcb_xinerama_screen_info_iterator_t
**
*****************************************************************************/
-
+
xcb_xinerama_screen_info_iterator_t
xcb_xinerama_query_screens_screen_info_iterator (const xcb_xinerama_query_screens_reply_t *R /**< */)
{
@@ -637,14 +685,14 @@ xcb_xinerama_query_screens_screen_info_iterator (const xcb_xinerama_query_screen
/*****************************************************************************
**
** xcb_xinerama_query_screens_reply_t * xcb_xinerama_query_screens_reply
- **
+ **
** @param xcb_connection_t *c
** @param xcb_xinerama_query_screens_cookie_t cookie
** @param xcb_generic_error_t **e
** @returns xcb_xinerama_query_screens_reply_t *
**
*****************************************************************************/
-
+
xcb_xinerama_query_screens_reply_t *
xcb_xinerama_query_screens_reply (xcb_connection_t *c /**< */,
xcb_xinerama_query_screens_cookie_t cookie /**< */,
diff --git a/src/3rdparty/xcb/libxcb/xinput.c b/src/3rdparty/xcb/libxcb/xinput.c
new file mode 100644
index 0000000000..0edfde656c
--- /dev/null
+++ b/src/3rdparty/xcb/libxcb/xinput.c
@@ -0,0 +1,14156 @@
+/*
+ * This file generated automatically from xinput.xml by c_client.py.
+ * Edit at your peril.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <stddef.h> /* for offsetof() */
+#include "xcbext.h"
+#include "xinput.h"
+
+#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
+#include "xfixes.h"
+
+xcb_extension_t xcb_input_id = { "XInputExtension", 0 };
+
+void
+xcb_input_event_class_next (xcb_input_event_class_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_event_class_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_event_class_end (xcb_input_event_class_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_input_key_code_next (xcb_input_key_code_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_key_code_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_key_code_end (xcb_input_key_code_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_input_device_id_next (xcb_input_device_id_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_device_id_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_device_id_end (xcb_input_device_id_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_input_fp1616_next (xcb_input_fp1616_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_fp1616_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_fp1616_end (xcb_input_fp1616_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_input_fp3232_next (xcb_input_fp3232_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_fp3232_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_fp3232_end (xcb_input_fp3232_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_input_get_extension_version_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_get_extension_version_request_t *_aux = (xcb_input_get_extension_version_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_get_extension_version_request_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* name */
+ xcb_block_len += _aux->name_len * 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+xcb_input_get_extension_version_cookie_t
+xcb_input_get_extension_version (xcb_connection_t *c,
+ uint16_t name_len,
+ const char *name)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GET_EXTENSION_VERSION,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_input_get_extension_version_cookie_t xcb_ret;
+ xcb_input_get_extension_version_request_t xcb_out;
+
+ xcb_out.name_len = name_len;
+ 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;
+ /* char name */
+ xcb_parts[4].iov_base = (char *) name;
+ xcb_parts[4].iov_len = name_len * sizeof(char);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_get_extension_version_cookie_t
+xcb_input_get_extension_version_unchecked (xcb_connection_t *c,
+ uint16_t name_len,
+ const char *name)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GET_EXTENSION_VERSION,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_input_get_extension_version_cookie_t xcb_ret;
+ xcb_input_get_extension_version_request_t xcb_out;
+
+ xcb_out.name_len = name_len;
+ 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;
+ /* char name */
+ xcb_parts[4].iov_base = (char *) name;
+ xcb_parts[4].iov_len = name_len * sizeof(char);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_get_extension_version_reply_t *
+xcb_input_get_extension_version_reply (xcb_connection_t *c,
+ xcb_input_get_extension_version_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_get_extension_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+void
+xcb_input_device_info_next (xcb_input_device_info_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_device_info_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_device_info_end (xcb_input_device_info_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_input_key_info_next (xcb_input_key_info_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_key_info_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_key_info_end (xcb_input_key_info_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_input_button_info_next (xcb_input_button_info_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_button_info_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_button_info_end (xcb_input_button_info_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_input_axis_info_next (xcb_input_axis_info_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_axis_info_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_axis_info_end (xcb_input_axis_info_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_input_valuator_info_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_valuator_info_t *_aux = (xcb_input_valuator_info_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_valuator_info_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* axes */
+ xcb_block_len += _aux->axes_len * sizeof(xcb_input_axis_info_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_axis_info_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+xcb_input_axis_info_t *
+xcb_input_valuator_info_axes (const xcb_input_valuator_info_t *R)
+{
+ return (xcb_input_axis_info_t *) (R + 1);
+}
+
+int
+xcb_input_valuator_info_axes_length (const xcb_input_valuator_info_t *R)
+{
+ return R->axes_len;
+}
+
+xcb_input_axis_info_iterator_t
+xcb_input_valuator_info_axes_iterator (const xcb_input_valuator_info_t *R)
+{
+ xcb_input_axis_info_iterator_t i;
+ i.data = (xcb_input_axis_info_t *) (R + 1);
+ i.rem = R->axes_len;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+void
+xcb_input_valuator_info_next (xcb_input_valuator_info_iterator_t *i)
+{
+ xcb_input_valuator_info_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_input_valuator_info_t *)(((char *)R) + xcb_input_valuator_info_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_input_valuator_info_t *) child.data;
+}
+
+xcb_generic_iterator_t
+xcb_input_valuator_info_end (xcb_input_valuator_info_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_input_valuator_info_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+xcb_input_axis_info_t *
+xcb_input_input_info_info_valuator_axes (const xcb_input_input_info_info_t *S)
+{
+ return S->valuator.axes;
+}
+
+int
+xcb_input_input_info_info_valuator_axes_length (const xcb_input_input_info_t *R,
+ const xcb_input_input_info_info_t *S)
+{
+ return S->valuator.axes_len;
+}
+
+xcb_input_axis_info_iterator_t
+xcb_input_input_info_info_valuator_axes_iterator (const xcb_input_input_info_t *R,
+ const xcb_input_input_info_info_t *S)
+{
+ xcb_input_axis_info_iterator_t i;
+ i.data = S->valuator.axes;
+ i.rem = S->valuator.axes_len;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+int
+xcb_input_input_info_info_serialize (void **_buffer,
+ uint8_t class_id,
+ const xcb_input_input_info_info_t *_aux)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to = 0;
+ unsigned int xcb_padding_offset = 2;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[11];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ if(class_id == XCB_INPUT_INPUT_CLASS_KEY) {
+ /* xcb_input_input_info_info_t.key.min_keycode */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key.min_keycode;
+ xcb_block_len += sizeof(xcb_input_key_code_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_input_key_code_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_input_key_code_t);
+ /* xcb_input_input_info_info_t.key.max_keycode */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key.max_keycode;
+ xcb_block_len += sizeof(xcb_input_key_code_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_input_key_code_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_input_key_code_t);
+ /* xcb_input_input_info_info_t.key.num_keys */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key.num_keys;
+ 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_input_input_info_info_t.key.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);
+ }
+ if(class_id == XCB_INPUT_INPUT_CLASS_BUTTON) {
+ /* xcb_input_input_info_info_t.button.num_buttons */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->button.num_buttons;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ }
+ if(class_id == XCB_INPUT_INPUT_CLASS_VALUATOR) {
+ /* xcb_input_input_info_info_t.valuator.axes_len */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->valuator.axes_len;
+ 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_input_input_info_info_t.valuator.mode */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->valuator.mode;
+ 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_input_input_info_info_t.valuator.motion_size */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->valuator.motion_size;
+ 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);
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* axes */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->valuator.axes;
+ xcb_block_len += _aux->valuator.axes_len * sizeof(xcb_input_axis_info_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->valuator.axes_len * sizeof(xcb_input_axis_info_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_input_axis_info_t);
+ }
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 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_input_input_info_info_unpack (const void *_buffer,
+ uint8_t class_id,
+ xcb_input_input_info_info_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 = 0;
+ unsigned int xcb_padding_offset = 2;
+
+
+ if(class_id == XCB_INPUT_INPUT_CLASS_KEY) {
+ /* xcb_input_input_info_info_t.key.min_keycode */
+ _aux->key.min_keycode = *(xcb_input_key_code_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_input_key_code_t);
+ xcb_tmp += sizeof(xcb_input_key_code_t);
+ xcb_align_to = ALIGNOF(xcb_input_key_code_t);
+ /* xcb_input_input_info_info_t.key.max_keycode */
+ _aux->key.max_keycode = *(xcb_input_key_code_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_input_key_code_t);
+ xcb_tmp += sizeof(xcb_input_key_code_t);
+ xcb_align_to = ALIGNOF(xcb_input_key_code_t);
+ /* xcb_input_input_info_info_t.key.num_keys */
+ _aux->key.num_keys = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_input_input_info_info_t.key.pad0 */
+ _aux->key.pad0[0] = *(uint8_t *)xcb_tmp;
+ _aux->key.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);
+ }
+ if(class_id == XCB_INPUT_INPUT_CLASS_BUTTON) {
+ /* xcb_input_input_info_info_t.button.num_buttons */
+ _aux->button.num_buttons = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ }
+ if(class_id == XCB_INPUT_INPUT_CLASS_VALUATOR) {
+ /* xcb_input_input_info_info_t.valuator.axes_len */
+ _aux->valuator.axes_len = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_input_info_info_t.valuator.mode */
+ _aux->valuator.mode = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_input_info_info_t.valuator.motion_size */
+ _aux->valuator.motion_size = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* axes */
+ _aux->valuator.axes = (xcb_input_axis_info_t *)xcb_tmp;
+ xcb_block_len += _aux->valuator.axes_len * sizeof(xcb_input_axis_info_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_axis_info_t);
+ }
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_input_input_info_info_sizeof (const void *_buffer,
+ uint8_t class_id)
+{
+ xcb_input_input_info_info_t _aux;
+ return xcb_input_input_info_info_unpack(_buffer, class_id, &_aux);
+}
+
+int
+xcb_input_input_info_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_input_info_t *_aux = (xcb_input_input_info_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_input_info_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* info */
+ xcb_block_len += xcb_input_input_info_info_sizeof(xcb_tmp, _aux->class_id);
+ 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+void *
+xcb_input_input_info_info (const xcb_input_input_info_t *R)
+{
+ return (void *) (R + 1);
+}
+
+void
+xcb_input_input_info_next (xcb_input_input_info_iterator_t *i)
+{
+ xcb_input_input_info_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_input_input_info_t *)(((char *)R) + xcb_input_input_info_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_input_input_info_t *) child.data;
+}
+
+xcb_generic_iterator_t
+xcb_input_input_info_end (xcb_input_input_info_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_input_input_info_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+int
+xcb_input_device_name_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_device_name_t *_aux = (xcb_input_device_name_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_device_name_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* string */
+ xcb_block_len += _aux->len * 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+char *
+xcb_input_device_name_string (const xcb_input_device_name_t *R)
+{
+ return (char *) (R + 1);
+}
+
+int
+xcb_input_device_name_string_length (const xcb_input_device_name_t *R)
+{
+ return R->len;
+}
+
+xcb_generic_iterator_t
+xcb_input_device_name_string_end (const xcb_input_device_name_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((char *) (R + 1)) + (R->len);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+void
+xcb_input_device_name_next (xcb_input_device_name_iterator_t *i)
+{
+ xcb_input_device_name_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_input_device_name_t *)(((char *)R) + xcb_input_device_name_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_input_device_name_t *) child.data;
+}
+
+xcb_generic_iterator_t
+xcb_input_device_name_end (xcb_input_device_name_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_input_device_name_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+int
+xcb_input_list_input_devices_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_list_input_devices_reply_t *_aux = (xcb_input_list_input_devices_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 = 0;
+
+ int xcb_pre_tmp_1; /* sumof length */
+ int xcb_pre_tmp_2; /* sumof loop counter */
+ int64_t xcb_pre_tmp_3; /* sumof sum */
+ const xcb_input_device_info_t* xcb_pre_tmp_4; /* sumof list ptr */
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+
+ xcb_block_len += sizeof(xcb_input_list_input_devices_reply_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* devices */
+ xcb_block_len += _aux->devices_len * sizeof(xcb_input_device_info_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_device_info_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* infos */
+ /* sumof start */
+ xcb_pre_tmp_1 = _aux->devices_len;
+ xcb_pre_tmp_3 = 0;
+ xcb_pre_tmp_4 = xcb_input_list_input_devices_devices(_aux);
+ for (xcb_pre_tmp_2 = 0; xcb_pre_tmp_2 < xcb_pre_tmp_1; xcb_pre_tmp_2++) {
+ xcb_pre_tmp_3 += xcb_pre_tmp_4->num_class_info;
+ xcb_pre_tmp_4++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_3 */
+ for(i=0; i<xcb_pre_tmp_3; i++) {
+ xcb_tmp_len = xcb_input_input_info_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_input_input_info_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* names */
+ for(i=0; i<_aux->devices_len; i++) {
+ xcb_tmp_len = xcb_str_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_str_t);
+ xcb_align_to = 4;
+ /* 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;
+ /* 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_input_list_input_devices_cookie_t
+xcb_input_list_input_devices (xcb_connection_t *c)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_LIST_INPUT_DEVICES,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_list_input_devices_cookie_t xcb_ret;
+ xcb_input_list_input_devices_request_t xcb_out;
+
+
+ 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_input_list_input_devices_cookie_t
+xcb_input_list_input_devices_unchecked (xcb_connection_t *c)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_LIST_INPUT_DEVICES,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_list_input_devices_cookie_t xcb_ret;
+ xcb_input_list_input_devices_request_t xcb_out;
+
+
+ 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_input_device_info_t *
+xcb_input_list_input_devices_devices (const xcb_input_list_input_devices_reply_t *R)
+{
+ return (xcb_input_device_info_t *) (R + 1);
+}
+
+int
+xcb_input_list_input_devices_devices_length (const xcb_input_list_input_devices_reply_t *R)
+{
+ return R->devices_len;
+}
+
+xcb_input_device_info_iterator_t
+xcb_input_list_input_devices_devices_iterator (const xcb_input_list_input_devices_reply_t *R)
+{
+ xcb_input_device_info_iterator_t i;
+ i.data = (xcb_input_device_info_t *) (R + 1);
+ i.rem = R->devices_len;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+int
+xcb_input_list_input_devices_infos_length (const xcb_input_list_input_devices_reply_t *R)
+{
+ int xcb_pre_tmp_5; /* sumof length */
+ int xcb_pre_tmp_6; /* sumof loop counter */
+ int64_t xcb_pre_tmp_7; /* sumof sum */
+ const xcb_input_device_info_t* xcb_pre_tmp_8; /* sumof list ptr */
+ /* sumof start */
+ xcb_pre_tmp_5 = R->devices_len;
+ xcb_pre_tmp_7 = 0;
+ xcb_pre_tmp_8 = xcb_input_list_input_devices_devices(R);
+ for (xcb_pre_tmp_6 = 0; xcb_pre_tmp_6 < xcb_pre_tmp_5; xcb_pre_tmp_6++) {
+ xcb_pre_tmp_7 += xcb_pre_tmp_8->num_class_info;
+ xcb_pre_tmp_8++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_7 */
+ return xcb_pre_tmp_7;
+}
+
+xcb_input_input_info_iterator_t
+xcb_input_list_input_devices_infos_iterator (const xcb_input_list_input_devices_reply_t *R)
+{
+ xcb_input_input_info_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_input_device_info_end(xcb_input_list_input_devices_devices_iterator(R));
+ int xcb_pre_tmp_9; /* sumof length */
+ int xcb_pre_tmp_10; /* sumof loop counter */
+ int64_t xcb_pre_tmp_11; /* sumof sum */
+ const xcb_input_device_info_t* xcb_pre_tmp_12; /* sumof list ptr */
+ /* sumof start */
+ xcb_pre_tmp_9 = R->devices_len;
+ xcb_pre_tmp_11 = 0;
+ xcb_pre_tmp_12 = xcb_input_list_input_devices_devices(R);
+ for (xcb_pre_tmp_10 = 0; xcb_pre_tmp_10 < xcb_pre_tmp_9; xcb_pre_tmp_10++) {
+ xcb_pre_tmp_11 += xcb_pre_tmp_12->num_class_info;
+ xcb_pre_tmp_12++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_11 */
+ i.data = (xcb_input_input_info_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_input_input_info_t, prev.index));
+ i.rem = xcb_pre_tmp_11;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+int
+xcb_input_list_input_devices_names_length (const xcb_input_list_input_devices_reply_t *R)
+{
+ return R->devices_len;
+}
+
+xcb_str_iterator_t
+xcb_input_list_input_devices_names_iterator (const xcb_input_list_input_devices_reply_t *R)
+{
+ xcb_str_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_input_input_info_end(xcb_input_list_input_devices_infos_iterator(R));
+ i.data = (xcb_str_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_str_t, prev.index));
+ i.rem = R->devices_len;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_list_input_devices_reply_t *
+xcb_input_list_input_devices_reply (xcb_connection_t *c,
+ xcb_input_list_input_devices_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_list_input_devices_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+void
+xcb_input_event_type_base_next (xcb_input_event_type_base_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_event_type_base_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_event_type_base_end (xcb_input_event_type_base_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_input_input_class_info_next (xcb_input_input_class_info_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_input_class_info_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_input_class_info_end (xcb_input_input_class_info_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_input_open_device_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_open_device_reply_t *_aux = (xcb_input_open_device_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_open_device_reply_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* class_info */
+ xcb_block_len += _aux->num_classes * sizeof(xcb_input_input_class_info_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_input_class_info_t);
+ xcb_align_to = 4;
+ /* 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;
+ /* 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_input_open_device_cookie_t
+xcb_input_open_device (xcb_connection_t *c,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_OPEN_DEVICE,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_open_device_cookie_t xcb_ret;
+ xcb_input_open_device_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 3);
+
+ 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_input_open_device_cookie_t
+xcb_input_open_device_unchecked (xcb_connection_t *c,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_OPEN_DEVICE,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_open_device_cookie_t xcb_ret;
+ xcb_input_open_device_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 3);
+
+ 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_input_input_class_info_t *
+xcb_input_open_device_class_info (const xcb_input_open_device_reply_t *R)
+{
+ return (xcb_input_input_class_info_t *) (R + 1);
+}
+
+int
+xcb_input_open_device_class_info_length (const xcb_input_open_device_reply_t *R)
+{
+ return R->num_classes;
+}
+
+xcb_input_input_class_info_iterator_t
+xcb_input_open_device_class_info_iterator (const xcb_input_open_device_reply_t *R)
+{
+ xcb_input_input_class_info_iterator_t i;
+ i.data = (xcb_input_input_class_info_t *) (R + 1);
+ i.rem = R->num_classes;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_open_device_reply_t *
+xcb_input_open_device_reply (xcb_connection_t *c,
+ xcb_input_open_device_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_open_device_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+xcb_void_cookie_t
+xcb_input_close_device_checked (xcb_connection_t *c,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_CLOSE_DEVICE,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_close_device_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 3);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_close_device (xcb_connection_t *c,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_CLOSE_DEVICE,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_close_device_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 3);
+
+ 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_input_set_device_mode_cookie_t
+xcb_input_set_device_mode (xcb_connection_t *c,
+ uint8_t device_id,
+ uint8_t mode)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_SET_DEVICE_MODE,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_set_device_mode_cookie_t xcb_ret;
+ xcb_input_set_device_mode_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ xcb_out.mode = mode;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_set_device_mode_cookie_t
+xcb_input_set_device_mode_unchecked (xcb_connection_t *c,
+ uint8_t device_id,
+ uint8_t mode)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_SET_DEVICE_MODE,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_set_device_mode_cookie_t xcb_ret;
+ xcb_input_set_device_mode_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ xcb_out.mode = mode;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_set_device_mode_reply_t *
+xcb_input_set_device_mode_reply (xcb_connection_t *c,
+ xcb_input_set_device_mode_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_set_device_mode_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_input_select_extension_event_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_select_extension_event_request_t *_aux = (xcb_input_select_extension_event_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_select_extension_event_request_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* classes */
+ xcb_block_len += _aux->num_classes * sizeof(xcb_input_event_class_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_event_class_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_input_select_extension_event_checked (xcb_connection_t *c,
+ xcb_window_t window,
+ uint16_t num_classes,
+ const xcb_input_event_class_t *classes)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_SELECT_EXTENSION_EVENT,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_select_extension_event_request_t xcb_out;
+
+ xcb_out.window = window;
+ xcb_out.num_classes = num_classes;
+ 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_input_event_class_t classes */
+ xcb_parts[4].iov_base = (char *) classes;
+ xcb_parts[4].iov_len = num_classes * sizeof(xcb_input_event_class_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_select_extension_event (xcb_connection_t *c,
+ xcb_window_t window,
+ uint16_t num_classes,
+ const xcb_input_event_class_t *classes)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_SELECT_EXTENSION_EVENT,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_select_extension_event_request_t xcb_out;
+
+ xcb_out.window = window;
+ xcb_out.num_classes = num_classes;
+ 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_input_event_class_t classes */
+ xcb_parts[4].iov_base = (char *) classes;
+ xcb_parts[4].iov_len = num_classes * sizeof(xcb_input_event_class_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_event_class_t *
+xcb_input_select_extension_event_classes (const xcb_input_select_extension_event_request_t *R)
+{
+ return (xcb_input_event_class_t *) (R + 1);
+}
+
+int
+xcb_input_select_extension_event_classes_length (const xcb_input_select_extension_event_request_t *R)
+{
+ return R->num_classes;
+}
+
+xcb_generic_iterator_t
+xcb_input_select_extension_event_classes_end (const xcb_input_select_extension_event_request_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((xcb_input_event_class_t *) (R + 1)) + (R->num_classes);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+int
+xcb_input_get_selected_extension_events_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_get_selected_extension_events_reply_t *_aux = (xcb_input_get_selected_extension_events_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_get_selected_extension_events_reply_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* this_classes */
+ xcb_block_len += _aux->num_this_classes * sizeof(xcb_input_event_class_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_event_class_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;
+ /* all_classes */
+ xcb_block_len += _aux->num_all_classes * sizeof(xcb_input_event_class_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_event_class_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_input_get_selected_extension_events_cookie_t
+xcb_input_get_selected_extension_events (xcb_connection_t *c,
+ xcb_window_t window)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GET_SELECTED_EXTENSION_EVENTS,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_get_selected_extension_events_cookie_t xcb_ret;
+ xcb_input_get_selected_extension_events_request_t xcb_out;
+
+ xcb_out.window = window;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_get_selected_extension_events_cookie_t
+xcb_input_get_selected_extension_events_unchecked (xcb_connection_t *c,
+ xcb_window_t window)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GET_SELECTED_EXTENSION_EVENTS,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_get_selected_extension_events_cookie_t xcb_ret;
+ xcb_input_get_selected_extension_events_request_t xcb_out;
+
+ xcb_out.window = window;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_event_class_t *
+xcb_input_get_selected_extension_events_this_classes (const xcb_input_get_selected_extension_events_reply_t *R)
+{
+ return (xcb_input_event_class_t *) (R + 1);
+}
+
+int
+xcb_input_get_selected_extension_events_this_classes_length (const xcb_input_get_selected_extension_events_reply_t *R)
+{
+ return R->num_this_classes;
+}
+
+xcb_generic_iterator_t
+xcb_input_get_selected_extension_events_this_classes_end (const xcb_input_get_selected_extension_events_reply_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((xcb_input_event_class_t *) (R + 1)) + (R->num_this_classes);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_event_class_t *
+xcb_input_get_selected_extension_events_all_classes (const xcb_input_get_selected_extension_events_reply_t *R)
+{
+ xcb_generic_iterator_t prev = xcb_input_get_selected_extension_events_this_classes_end(R);
+ return (xcb_input_event_class_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_input_event_class_t, prev.index) + 0);
+}
+
+int
+xcb_input_get_selected_extension_events_all_classes_length (const xcb_input_get_selected_extension_events_reply_t *R)
+{
+ return R->num_all_classes;
+}
+
+xcb_generic_iterator_t
+xcb_input_get_selected_extension_events_all_classes_end (const xcb_input_get_selected_extension_events_reply_t *R)
+{
+ xcb_generic_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_input_get_selected_extension_events_this_classes_end(R);
+ i.data = ((xcb_input_event_class_t *) ((char*) prev.data + XCB_TYPE_PAD(xcb_input_event_class_t, prev.index))) + (R->num_all_classes);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_get_selected_extension_events_reply_t *
+xcb_input_get_selected_extension_events_reply (xcb_connection_t *c,
+ xcb_input_get_selected_extension_events_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_get_selected_extension_events_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_input_change_device_dont_propagate_list_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_change_device_dont_propagate_list_request_t *_aux = (xcb_input_change_device_dont_propagate_list_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_change_device_dont_propagate_list_request_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* classes */
+ xcb_block_len += _aux->num_classes * sizeof(xcb_input_event_class_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_event_class_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_input_change_device_dont_propagate_list_checked (xcb_connection_t *c,
+ xcb_window_t window,
+ uint16_t num_classes,
+ uint8_t mode,
+ const xcb_input_event_class_t *classes)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_CHANGE_DEVICE_DONT_PROPAGATE_LIST,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_change_device_dont_propagate_list_request_t xcb_out;
+
+ xcb_out.window = window;
+ xcb_out.num_classes = num_classes;
+ xcb_out.mode = mode;
+ xcb_out.pad0 = 0;
+
+ 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_input_event_class_t classes */
+ xcb_parts[4].iov_base = (char *) classes;
+ xcb_parts[4].iov_len = num_classes * sizeof(xcb_input_event_class_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_change_device_dont_propagate_list (xcb_connection_t *c,
+ xcb_window_t window,
+ uint16_t num_classes,
+ uint8_t mode,
+ const xcb_input_event_class_t *classes)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_CHANGE_DEVICE_DONT_PROPAGATE_LIST,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_change_device_dont_propagate_list_request_t xcb_out;
+
+ xcb_out.window = window;
+ xcb_out.num_classes = num_classes;
+ xcb_out.mode = mode;
+ xcb_out.pad0 = 0;
+
+ 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_input_event_class_t classes */
+ xcb_parts[4].iov_base = (char *) classes;
+ xcb_parts[4].iov_len = num_classes * sizeof(xcb_input_event_class_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_event_class_t *
+xcb_input_change_device_dont_propagate_list_classes (const xcb_input_change_device_dont_propagate_list_request_t *R)
+{
+ return (xcb_input_event_class_t *) (R + 1);
+}
+
+int
+xcb_input_change_device_dont_propagate_list_classes_length (const xcb_input_change_device_dont_propagate_list_request_t *R)
+{
+ return R->num_classes;
+}
+
+xcb_generic_iterator_t
+xcb_input_change_device_dont_propagate_list_classes_end (const xcb_input_change_device_dont_propagate_list_request_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((xcb_input_event_class_t *) (R + 1)) + (R->num_classes);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+int
+xcb_input_get_device_dont_propagate_list_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_get_device_dont_propagate_list_reply_t *_aux = (xcb_input_get_device_dont_propagate_list_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_get_device_dont_propagate_list_reply_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* classes */
+ xcb_block_len += _aux->num_classes * sizeof(xcb_input_event_class_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_event_class_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_input_get_device_dont_propagate_list_cookie_t
+xcb_input_get_device_dont_propagate_list (xcb_connection_t *c,
+ xcb_window_t window)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GET_DEVICE_DONT_PROPAGATE_LIST,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_get_device_dont_propagate_list_cookie_t xcb_ret;
+ xcb_input_get_device_dont_propagate_list_request_t xcb_out;
+
+ xcb_out.window = window;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_get_device_dont_propagate_list_cookie_t
+xcb_input_get_device_dont_propagate_list_unchecked (xcb_connection_t *c,
+ xcb_window_t window)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GET_DEVICE_DONT_PROPAGATE_LIST,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_get_device_dont_propagate_list_cookie_t xcb_ret;
+ xcb_input_get_device_dont_propagate_list_request_t xcb_out;
+
+ xcb_out.window = window;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_event_class_t *
+xcb_input_get_device_dont_propagate_list_classes (const xcb_input_get_device_dont_propagate_list_reply_t *R)
+{
+ return (xcb_input_event_class_t *) (R + 1);
+}
+
+int
+xcb_input_get_device_dont_propagate_list_classes_length (const xcb_input_get_device_dont_propagate_list_reply_t *R)
+{
+ return R->num_classes;
+}
+
+xcb_generic_iterator_t
+xcb_input_get_device_dont_propagate_list_classes_end (const xcb_input_get_device_dont_propagate_list_reply_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((xcb_input_event_class_t *) (R + 1)) + (R->num_classes);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_get_device_dont_propagate_list_reply_t *
+xcb_input_get_device_dont_propagate_list_reply (xcb_connection_t *c,
+ xcb_input_get_device_dont_propagate_list_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_get_device_dont_propagate_list_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_input_device_time_coord_sizeof (const void *_buffer,
+ uint8_t num_axes)
+{
+ 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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_device_time_coord_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* axisvalues */
+ xcb_block_len += num_axes * sizeof(int32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(int32_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;
+}
+
+int32_t *
+xcb_input_device_time_coord_axisvalues (const xcb_input_device_time_coord_t *R)
+{
+ return (int32_t *) (R + 1);
+}
+
+int
+xcb_input_device_time_coord_axisvalues_length (const xcb_input_device_time_coord_t *R,
+ uint8_t num_axes)
+{
+ return num_axes;
+}
+
+xcb_generic_iterator_t
+xcb_input_device_time_coord_axisvalues_end (const xcb_input_device_time_coord_t *R,
+ uint8_t num_axes)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((int32_t *) (R + 1)) + (num_axes);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+void
+xcb_input_device_time_coord_next (xcb_input_device_time_coord_iterator_t *i)
+{
+ xcb_input_device_time_coord_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_input_device_time_coord_t *)(((char *)R) + xcb_input_device_time_coord_sizeof(R, i->num_axes));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_input_device_time_coord_t *) child.data;
+}
+
+xcb_generic_iterator_t
+xcb_input_device_time_coord_end (xcb_input_device_time_coord_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_input_device_time_coord_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+int
+xcb_input_get_device_motion_events_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_get_device_motion_events_reply_t *_aux = (xcb_input_get_device_motion_events_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 = 0;
+
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+
+ xcb_block_len += sizeof(xcb_input_get_device_motion_events_reply_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* events */
+ for(i=0; i<_aux->num_events; i++) {
+ xcb_tmp_len = xcb_input_device_time_coord_sizeof(xcb_tmp, _aux->num_axes);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_input_device_time_coord_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_input_get_device_motion_events_cookie_t
+xcb_input_get_device_motion_events (xcb_connection_t *c,
+ xcb_timestamp_t start,
+ xcb_timestamp_t stop,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GET_DEVICE_MOTION_EVENTS,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_get_device_motion_events_cookie_t xcb_ret;
+ xcb_input_get_device_motion_events_request_t xcb_out;
+
+ xcb_out.start = start;
+ xcb_out.stop = stop;
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 3);
+
+ 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_input_get_device_motion_events_cookie_t
+xcb_input_get_device_motion_events_unchecked (xcb_connection_t *c,
+ xcb_timestamp_t start,
+ xcb_timestamp_t stop,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GET_DEVICE_MOTION_EVENTS,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_get_device_motion_events_cookie_t xcb_ret;
+ xcb_input_get_device_motion_events_request_t xcb_out;
+
+ xcb_out.start = start;
+ xcb_out.stop = stop;
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 3);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+int
+xcb_input_get_device_motion_events_events_length (const xcb_input_get_device_motion_events_reply_t *R)
+{
+ return R->num_events;
+}
+
+xcb_input_device_time_coord_iterator_t
+xcb_input_get_device_motion_events_events_iterator (const xcb_input_get_device_motion_events_reply_t *R)
+{
+ xcb_input_device_time_coord_iterator_t i;
+ i.data = (xcb_input_device_time_coord_t *) (R + 1);
+ i.rem = R->num_events;
+ i.index = (char *) i.data - (char *) R;
+ i.num_axes = R->num_axes;
+ return i;
+}
+
+xcb_input_get_device_motion_events_reply_t *
+xcb_input_get_device_motion_events_reply (xcb_connection_t *c,
+ xcb_input_get_device_motion_events_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_get_device_motion_events_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+xcb_input_change_keyboard_device_cookie_t
+xcb_input_change_keyboard_device (xcb_connection_t *c,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_CHANGE_KEYBOARD_DEVICE,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_change_keyboard_device_cookie_t xcb_ret;
+ xcb_input_change_keyboard_device_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 3);
+
+ 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_input_change_keyboard_device_cookie_t
+xcb_input_change_keyboard_device_unchecked (xcb_connection_t *c,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_CHANGE_KEYBOARD_DEVICE,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_change_keyboard_device_cookie_t xcb_ret;
+ xcb_input_change_keyboard_device_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 3);
+
+ 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_input_change_keyboard_device_reply_t *
+xcb_input_change_keyboard_device_reply (xcb_connection_t *c,
+ xcb_input_change_keyboard_device_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_change_keyboard_device_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+xcb_input_change_pointer_device_cookie_t
+xcb_input_change_pointer_device (xcb_connection_t *c,
+ uint8_t x_axis,
+ uint8_t y_axis,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_CHANGE_POINTER_DEVICE,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_change_pointer_device_cookie_t xcb_ret;
+ xcb_input_change_pointer_device_request_t xcb_out;
+
+ xcb_out.x_axis = x_axis;
+ xcb_out.y_axis = y_axis;
+ xcb_out.device_id = device_id;
+ xcb_out.pad0 = 0;
+
+ 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_input_change_pointer_device_cookie_t
+xcb_input_change_pointer_device_unchecked (xcb_connection_t *c,
+ uint8_t x_axis,
+ uint8_t y_axis,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_CHANGE_POINTER_DEVICE,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_change_pointer_device_cookie_t xcb_ret;
+ xcb_input_change_pointer_device_request_t xcb_out;
+
+ xcb_out.x_axis = x_axis;
+ xcb_out.y_axis = y_axis;
+ xcb_out.device_id = device_id;
+ xcb_out.pad0 = 0;
+
+ 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_input_change_pointer_device_reply_t *
+xcb_input_change_pointer_device_reply (xcb_connection_t *c,
+ xcb_input_change_pointer_device_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_change_pointer_device_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_input_grab_device_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_grab_device_request_t *_aux = (xcb_input_grab_device_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_grab_device_request_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* classes */
+ xcb_block_len += _aux->num_classes * sizeof(xcb_input_event_class_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_event_class_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_input_grab_device_cookie_t
+xcb_input_grab_device (xcb_connection_t *c,
+ xcb_window_t grab_window,
+ xcb_timestamp_t time,
+ uint16_t num_classes,
+ uint8_t this_device_mode,
+ uint8_t other_device_mode,
+ uint8_t owner_events,
+ uint8_t device_id,
+ const xcb_input_event_class_t *classes)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GRAB_DEVICE,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_input_grab_device_cookie_t xcb_ret;
+ xcb_input_grab_device_request_t xcb_out;
+
+ xcb_out.grab_window = grab_window;
+ xcb_out.time = time;
+ xcb_out.num_classes = num_classes;
+ xcb_out.this_device_mode = this_device_mode;
+ xcb_out.other_device_mode = other_device_mode;
+ xcb_out.owner_events = owner_events;
+ xcb_out.device_id = device_id;
+ 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_input_event_class_t classes */
+ xcb_parts[4].iov_base = (char *) classes;
+ xcb_parts[4].iov_len = num_classes * sizeof(uint32_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_grab_device_cookie_t
+xcb_input_grab_device_unchecked (xcb_connection_t *c,
+ xcb_window_t grab_window,
+ xcb_timestamp_t time,
+ uint16_t num_classes,
+ uint8_t this_device_mode,
+ uint8_t other_device_mode,
+ uint8_t owner_events,
+ uint8_t device_id,
+ const xcb_input_event_class_t *classes)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GRAB_DEVICE,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_input_grab_device_cookie_t xcb_ret;
+ xcb_input_grab_device_request_t xcb_out;
+
+ xcb_out.grab_window = grab_window;
+ xcb_out.time = time;
+ xcb_out.num_classes = num_classes;
+ xcb_out.this_device_mode = this_device_mode;
+ xcb_out.other_device_mode = other_device_mode;
+ xcb_out.owner_events = owner_events;
+ xcb_out.device_id = device_id;
+ 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_input_event_class_t classes */
+ xcb_parts[4].iov_base = (char *) classes;
+ xcb_parts[4].iov_len = num_classes * sizeof(uint32_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_grab_device_reply_t *
+xcb_input_grab_device_reply (xcb_connection_t *c,
+ xcb_input_grab_device_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_grab_device_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+xcb_void_cookie_t
+xcb_input_ungrab_device_checked (xcb_connection_t *c,
+ xcb_timestamp_t time,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_UNGRAB_DEVICE,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_ungrab_device_request_t xcb_out;
+
+ xcb_out.time = time;
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 3);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_ungrab_device (xcb_connection_t *c,
+ xcb_timestamp_t time,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_UNGRAB_DEVICE,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_ungrab_device_request_t xcb_out;
+
+ xcb_out.time = time;
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 3);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+int
+xcb_input_grab_device_key_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_grab_device_key_request_t *_aux = (xcb_input_grab_device_key_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_grab_device_key_request_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* classes */
+ xcb_block_len += _aux->num_classes * sizeof(xcb_input_event_class_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_event_class_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_input_grab_device_key_checked (xcb_connection_t *c,
+ xcb_window_t grab_window,
+ uint16_t num_classes,
+ uint16_t modifiers,
+ uint8_t modifier_device,
+ uint8_t grabbed_device,
+ uint8_t key,
+ uint8_t this_device_mode,
+ uint8_t other_device_mode,
+ uint8_t owner_events,
+ const xcb_input_event_class_t *classes)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GRAB_DEVICE_KEY,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_grab_device_key_request_t xcb_out;
+
+ xcb_out.grab_window = grab_window;
+ xcb_out.num_classes = num_classes;
+ xcb_out.modifiers = modifiers;
+ xcb_out.modifier_device = modifier_device;
+ xcb_out.grabbed_device = grabbed_device;
+ xcb_out.key = key;
+ xcb_out.this_device_mode = this_device_mode;
+ xcb_out.other_device_mode = other_device_mode;
+ xcb_out.owner_events = owner_events;
+ 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_input_event_class_t classes */
+ xcb_parts[4].iov_base = (char *) classes;
+ xcb_parts[4].iov_len = num_classes * sizeof(xcb_input_event_class_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_grab_device_key (xcb_connection_t *c,
+ xcb_window_t grab_window,
+ uint16_t num_classes,
+ uint16_t modifiers,
+ uint8_t modifier_device,
+ uint8_t grabbed_device,
+ uint8_t key,
+ uint8_t this_device_mode,
+ uint8_t other_device_mode,
+ uint8_t owner_events,
+ const xcb_input_event_class_t *classes)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GRAB_DEVICE_KEY,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_grab_device_key_request_t xcb_out;
+
+ xcb_out.grab_window = grab_window;
+ xcb_out.num_classes = num_classes;
+ xcb_out.modifiers = modifiers;
+ xcb_out.modifier_device = modifier_device;
+ xcb_out.grabbed_device = grabbed_device;
+ xcb_out.key = key;
+ xcb_out.this_device_mode = this_device_mode;
+ xcb_out.other_device_mode = other_device_mode;
+ xcb_out.owner_events = owner_events;
+ 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_input_event_class_t classes */
+ xcb_parts[4].iov_base = (char *) classes;
+ xcb_parts[4].iov_len = num_classes * sizeof(xcb_input_event_class_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_event_class_t *
+xcb_input_grab_device_key_classes (const xcb_input_grab_device_key_request_t *R)
+{
+ return (xcb_input_event_class_t *) (R + 1);
+}
+
+int
+xcb_input_grab_device_key_classes_length (const xcb_input_grab_device_key_request_t *R)
+{
+ return R->num_classes;
+}
+
+xcb_generic_iterator_t
+xcb_input_grab_device_key_classes_end (const xcb_input_grab_device_key_request_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((xcb_input_event_class_t *) (R + 1)) + (R->num_classes);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_void_cookie_t
+xcb_input_ungrab_device_key_checked (xcb_connection_t *c,
+ xcb_window_t grabWindow,
+ uint16_t modifiers,
+ uint8_t modifier_device,
+ uint8_t key,
+ uint8_t grabbed_device)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_UNGRAB_DEVICE_KEY,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_ungrab_device_key_request_t xcb_out;
+
+ xcb_out.grabWindow = grabWindow;
+ xcb_out.modifiers = modifiers;
+ xcb_out.modifier_device = modifier_device;
+ xcb_out.key = key;
+ xcb_out.grabbed_device = grabbed_device;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_ungrab_device_key (xcb_connection_t *c,
+ xcb_window_t grabWindow,
+ uint16_t modifiers,
+ uint8_t modifier_device,
+ uint8_t key,
+ uint8_t grabbed_device)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_UNGRAB_DEVICE_KEY,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_ungrab_device_key_request_t xcb_out;
+
+ xcb_out.grabWindow = grabWindow;
+ xcb_out.modifiers = modifiers;
+ xcb_out.modifier_device = modifier_device;
+ xcb_out.key = key;
+ xcb_out.grabbed_device = grabbed_device;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+int
+xcb_input_grab_device_button_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_grab_device_button_request_t *_aux = (xcb_input_grab_device_button_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_grab_device_button_request_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* classes */
+ xcb_block_len += _aux->num_classes * sizeof(xcb_input_event_class_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_event_class_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_input_grab_device_button_checked (xcb_connection_t *c,
+ xcb_window_t grab_window,
+ uint8_t grabbed_device,
+ uint8_t modifier_device,
+ uint16_t num_classes,
+ uint16_t modifiers,
+ uint8_t this_device_mode,
+ uint8_t other_device_mode,
+ uint8_t button,
+ uint8_t owner_events,
+ const xcb_input_event_class_t *classes)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GRAB_DEVICE_BUTTON,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_grab_device_button_request_t xcb_out;
+
+ xcb_out.grab_window = grab_window;
+ xcb_out.grabbed_device = grabbed_device;
+ xcb_out.modifier_device = modifier_device;
+ xcb_out.num_classes = num_classes;
+ xcb_out.modifiers = modifiers;
+ xcb_out.this_device_mode = this_device_mode;
+ xcb_out.other_device_mode = other_device_mode;
+ xcb_out.button = button;
+ xcb_out.owner_events = owner_events;
+ 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_input_event_class_t classes */
+ xcb_parts[4].iov_base = (char *) classes;
+ xcb_parts[4].iov_len = num_classes * sizeof(xcb_input_event_class_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_grab_device_button (xcb_connection_t *c,
+ xcb_window_t grab_window,
+ uint8_t grabbed_device,
+ uint8_t modifier_device,
+ uint16_t num_classes,
+ uint16_t modifiers,
+ uint8_t this_device_mode,
+ uint8_t other_device_mode,
+ uint8_t button,
+ uint8_t owner_events,
+ const xcb_input_event_class_t *classes)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GRAB_DEVICE_BUTTON,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_grab_device_button_request_t xcb_out;
+
+ xcb_out.grab_window = grab_window;
+ xcb_out.grabbed_device = grabbed_device;
+ xcb_out.modifier_device = modifier_device;
+ xcb_out.num_classes = num_classes;
+ xcb_out.modifiers = modifiers;
+ xcb_out.this_device_mode = this_device_mode;
+ xcb_out.other_device_mode = other_device_mode;
+ xcb_out.button = button;
+ xcb_out.owner_events = owner_events;
+ 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_input_event_class_t classes */
+ xcb_parts[4].iov_base = (char *) classes;
+ xcb_parts[4].iov_len = num_classes * sizeof(xcb_input_event_class_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_event_class_t *
+xcb_input_grab_device_button_classes (const xcb_input_grab_device_button_request_t *R)
+{
+ return (xcb_input_event_class_t *) (R + 1);
+}
+
+int
+xcb_input_grab_device_button_classes_length (const xcb_input_grab_device_button_request_t *R)
+{
+ return R->num_classes;
+}
+
+xcb_generic_iterator_t
+xcb_input_grab_device_button_classes_end (const xcb_input_grab_device_button_request_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((xcb_input_event_class_t *) (R + 1)) + (R->num_classes);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_void_cookie_t
+xcb_input_ungrab_device_button_checked (xcb_connection_t *c,
+ xcb_window_t grab_window,
+ uint16_t modifiers,
+ uint8_t modifier_device,
+ uint8_t button,
+ uint8_t grabbed_device)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_UNGRAB_DEVICE_BUTTON,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_ungrab_device_button_request_t xcb_out;
+
+ xcb_out.grab_window = grab_window;
+ xcb_out.modifiers = modifiers;
+ xcb_out.modifier_device = modifier_device;
+ xcb_out.button = button;
+ xcb_out.grabbed_device = grabbed_device;
+ memset(xcb_out.pad0, 0, 3);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_ungrab_device_button (xcb_connection_t *c,
+ xcb_window_t grab_window,
+ uint16_t modifiers,
+ uint8_t modifier_device,
+ uint8_t button,
+ uint8_t grabbed_device)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_UNGRAB_DEVICE_BUTTON,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_ungrab_device_button_request_t xcb_out;
+
+ xcb_out.grab_window = grab_window;
+ xcb_out.modifiers = modifiers;
+ xcb_out.modifier_device = modifier_device;
+ xcb_out.button = button;
+ xcb_out.grabbed_device = grabbed_device;
+ memset(xcb_out.pad0, 0, 3);
+
+ 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_void_cookie_t
+xcb_input_allow_device_events_checked (xcb_connection_t *c,
+ xcb_timestamp_t time,
+ uint8_t mode,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_ALLOW_DEVICE_EVENTS,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_allow_device_events_request_t xcb_out;
+
+ xcb_out.time = time;
+ xcb_out.mode = mode;
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_allow_device_events (xcb_connection_t *c,
+ xcb_timestamp_t time,
+ uint8_t mode,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_ALLOW_DEVICE_EVENTS,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_allow_device_events_request_t xcb_out;
+
+ xcb_out.time = time;
+ xcb_out.mode = mode;
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_get_device_focus_cookie_t
+xcb_input_get_device_focus (xcb_connection_t *c,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GET_DEVICE_FOCUS,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_get_device_focus_cookie_t xcb_ret;
+ xcb_input_get_device_focus_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 3);
+
+ 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_input_get_device_focus_cookie_t
+xcb_input_get_device_focus_unchecked (xcb_connection_t *c,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GET_DEVICE_FOCUS,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_get_device_focus_cookie_t xcb_ret;
+ xcb_input_get_device_focus_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 3);
+
+ 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_input_get_device_focus_reply_t *
+xcb_input_get_device_focus_reply (xcb_connection_t *c,
+ xcb_input_get_device_focus_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_get_device_focus_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+xcb_void_cookie_t
+xcb_input_set_device_focus_checked (xcb_connection_t *c,
+ xcb_window_t focus,
+ xcb_timestamp_t time,
+ uint8_t revert_to,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_SET_DEVICE_FOCUS,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_set_device_focus_request_t xcb_out;
+
+ xcb_out.focus = focus;
+ xcb_out.time = time;
+ xcb_out.revert_to = revert_to;
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_set_device_focus (xcb_connection_t *c,
+ xcb_window_t focus,
+ xcb_timestamp_t time,
+ uint8_t revert_to,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_SET_DEVICE_FOCUS,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_set_device_focus_request_t xcb_out;
+
+ xcb_out.focus = focus;
+ xcb_out.time = time;
+ xcb_out.revert_to = revert_to;
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+void
+xcb_input_kbd_feedback_state_next (xcb_input_kbd_feedback_state_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_kbd_feedback_state_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_kbd_feedback_state_end (xcb_input_kbd_feedback_state_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_input_ptr_feedback_state_next (xcb_input_ptr_feedback_state_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_ptr_feedback_state_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_ptr_feedback_state_end (xcb_input_ptr_feedback_state_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_input_integer_feedback_state_next (xcb_input_integer_feedback_state_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_integer_feedback_state_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_integer_feedback_state_end (xcb_input_integer_feedback_state_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_input_string_feedback_state_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_string_feedback_state_t *_aux = (xcb_input_string_feedback_state_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_string_feedback_state_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* keysyms */
+ xcb_block_len += _aux->num_keysyms * sizeof(xcb_keysym_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_keysym_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+xcb_keysym_t *
+xcb_input_string_feedback_state_keysyms (const xcb_input_string_feedback_state_t *R)
+{
+ return (xcb_keysym_t *) (R + 1);
+}
+
+int
+xcb_input_string_feedback_state_keysyms_length (const xcb_input_string_feedback_state_t *R)
+{
+ return R->num_keysyms;
+}
+
+xcb_generic_iterator_t
+xcb_input_string_feedback_state_keysyms_end (const xcb_input_string_feedback_state_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((xcb_keysym_t *) (R + 1)) + (R->num_keysyms);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+void
+xcb_input_string_feedback_state_next (xcb_input_string_feedback_state_iterator_t *i)
+{
+ xcb_input_string_feedback_state_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_input_string_feedback_state_t *)(((char *)R) + xcb_input_string_feedback_state_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_input_string_feedback_state_t *) child.data;
+}
+
+xcb_generic_iterator_t
+xcb_input_string_feedback_state_end (xcb_input_string_feedback_state_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_input_string_feedback_state_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+void
+xcb_input_bell_feedback_state_next (xcb_input_bell_feedback_state_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_bell_feedback_state_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_bell_feedback_state_end (xcb_input_bell_feedback_state_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_input_led_feedback_state_next (xcb_input_led_feedback_state_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_led_feedback_state_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_led_feedback_state_end (xcb_input_led_feedback_state_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+xcb_keysym_t *
+xcb_input_feedback_state_data_string_keysyms (const xcb_input_feedback_state_data_t *S)
+{
+ return S->string.keysyms;
+}
+
+int
+xcb_input_feedback_state_data_string_keysyms_length (const xcb_input_feedback_state_t *R,
+ const xcb_input_feedback_state_data_t *S)
+{
+ return S->string.num_keysyms;
+}
+
+xcb_generic_iterator_t
+xcb_input_feedback_state_data_string_keysyms_end (const xcb_input_feedback_state_t *R,
+ const xcb_input_feedback_state_data_t *S)
+{
+ xcb_generic_iterator_t i;
+ i.data = S->string.keysyms + S->string.num_keysyms;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+int
+xcb_input_feedback_state_data_serialize (void **_buffer,
+ uint8_t class_id,
+ const xcb_input_feedback_state_data_t *_aux)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to = 0;
+ unsigned int xcb_padding_offset = 0;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[27];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ if(class_id == XCB_INPUT_FEEDBACK_CLASS_KEYBOARD) {
+ /* xcb_input_feedback_state_data_t.keyboard.pitch */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keyboard.pitch;
+ 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_input_feedback_state_data_t.keyboard.duration */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keyboard.duration;
+ 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_input_feedback_state_data_t.keyboard.led_mask */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keyboard.led_mask;
+ 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_input_feedback_state_data_t.keyboard.led_values */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keyboard.led_values;
+ 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_input_feedback_state_data_t.keyboard.global_auto_repeat */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keyboard.global_auto_repeat;
+ 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_input_feedback_state_data_t.keyboard.click */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keyboard.click;
+ 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_input_feedback_state_data_t.keyboard.percent */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keyboard.percent;
+ 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_input_feedback_state_data_t.keyboard.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_input_feedback_state_data_t.keyboard.auto_repeats */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyboard.auto_repeats;
+ xcb_block_len += 32;
+ xcb_parts[xcb_parts_idx].iov_len = 32;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if(class_id == XCB_INPUT_FEEDBACK_CLASS_POINTER) {
+ /* xcb_input_feedback_state_data_t.pointer.pad1 */
+ 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_input_feedback_state_data_t.pointer.accel_num */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->pointer.accel_num;
+ 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_input_feedback_state_data_t.pointer.accel_denom */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->pointer.accel_denom;
+ 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_input_feedback_state_data_t.pointer.threshold */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->pointer.threshold;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ }
+ if(class_id == XCB_INPUT_FEEDBACK_CLASS_STRING) {
+ /* xcb_input_feedback_state_data_t.string.max_symbols */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->string.max_symbols;
+ 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_input_feedback_state_data_t.string.num_keysyms */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->string.num_keysyms;
+ 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_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* keysyms */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->string.keysyms;
+ xcb_block_len += _aux->string.num_keysyms * sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->string.num_keysyms * sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keysym_t);
+ }
+ if(class_id == XCB_INPUT_FEEDBACK_CLASS_INTEGER) {
+ /* xcb_input_feedback_state_data_t.integer.resolution */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->integer.resolution;
+ 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_input_feedback_state_data_t.integer.min_value */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->integer.min_value;
+ xcb_block_len += sizeof(int32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(int32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int32_t);
+ /* xcb_input_feedback_state_data_t.integer.max_value */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->integer.max_value;
+ xcb_block_len += sizeof(int32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(int32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int32_t);
+ }
+ if(class_id == XCB_INPUT_FEEDBACK_CLASS_LED) {
+ /* xcb_input_feedback_state_data_t.led.led_mask */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->led.led_mask;
+ 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_input_feedback_state_data_t.led.led_values */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->led.led_values;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ if(class_id == XCB_INPUT_FEEDBACK_CLASS_BELL) {
+ /* xcb_input_feedback_state_data_t.bell.percent */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->bell.percent;
+ 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_input_feedback_state_data_t.bell.pad2 */
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_block_len += sizeof(uint8_t)*3;
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*3;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_feedback_state_data_t.bell.pitch */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->bell.pitch;
+ 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_input_feedback_state_data_t.bell.duration */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->bell.duration;
+ 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_padding_offset) & (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;
+ xcb_padding_offset = 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_input_feedback_state_data_unpack (const void *_buffer,
+ uint8_t class_id,
+ xcb_input_feedback_state_data_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 = 0;
+ unsigned int xcb_padding_offset = 0;
+
+
+ if(class_id == XCB_INPUT_FEEDBACK_CLASS_KEYBOARD) {
+ /* xcb_input_feedback_state_data_t.keyboard.pitch */
+ _aux->keyboard.pitch = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_input_feedback_state_data_t.keyboard.duration */
+ _aux->keyboard.duration = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_input_feedback_state_data_t.keyboard.led_mask */
+ _aux->keyboard.led_mask = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_input_feedback_state_data_t.keyboard.led_values */
+ _aux->keyboard.led_values = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_input_feedback_state_data_t.keyboard.global_auto_repeat */
+ _aux->keyboard.global_auto_repeat = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_feedback_state_data_t.keyboard.click */
+ _aux->keyboard.click = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_feedback_state_data_t.keyboard.percent */
+ _aux->keyboard.percent = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_feedback_state_data_t.keyboard.pad0 */
+ _aux->keyboard.pad0 = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_feedback_state_data_t.keyboard.auto_repeats */
+ memcpy(_aux->keyboard.auto_repeats, xcb_tmp, sizeof(uint8_t) * 32);
+ xcb_block_len += sizeof(uint8_t) * 32;
+ xcb_tmp += sizeof(uint8_t) * 32;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if(class_id == XCB_INPUT_FEEDBACK_CLASS_POINTER) {
+ /* xcb_input_feedback_state_data_t.pointer.pad1 */
+ _aux->pointer.pad1[0] = *(uint8_t *)xcb_tmp;
+ _aux->pointer.pad1[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_input_feedback_state_data_t.pointer.accel_num */
+ _aux->pointer.accel_num = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_input_feedback_state_data_t.pointer.accel_denom */
+ _aux->pointer.accel_denom = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_input_feedback_state_data_t.pointer.threshold */
+ _aux->pointer.threshold = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ }
+ if(class_id == XCB_INPUT_FEEDBACK_CLASS_STRING) {
+ /* xcb_input_feedback_state_data_t.string.max_symbols */
+ _aux->string.max_symbols = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_input_feedback_state_data_t.string.num_keysyms */
+ _aux->string.num_keysyms = *(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_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* keysyms */
+ _aux->string.keysyms = (xcb_keysym_t *)xcb_tmp;
+ xcb_block_len += _aux->string.num_keysyms * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_keysym_t);
+ }
+ if(class_id == XCB_INPUT_FEEDBACK_CLASS_INTEGER) {
+ /* xcb_input_feedback_state_data_t.integer.resolution */
+ _aux->integer.resolution = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_input_feedback_state_data_t.integer.min_value */
+ _aux->integer.min_value = *(int32_t *)xcb_tmp;
+ xcb_block_len += sizeof(int32_t);
+ xcb_tmp += sizeof(int32_t);
+ xcb_align_to = ALIGNOF(int32_t);
+ /* xcb_input_feedback_state_data_t.integer.max_value */
+ _aux->integer.max_value = *(int32_t *)xcb_tmp;
+ xcb_block_len += sizeof(int32_t);
+ xcb_tmp += sizeof(int32_t);
+ xcb_align_to = ALIGNOF(int32_t);
+ }
+ if(class_id == XCB_INPUT_FEEDBACK_CLASS_LED) {
+ /* xcb_input_feedback_state_data_t.led.led_mask */
+ _aux->led.led_mask = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_input_feedback_state_data_t.led.led_values */
+ _aux->led.led_values = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ if(class_id == XCB_INPUT_FEEDBACK_CLASS_BELL) {
+ /* xcb_input_feedback_state_data_t.bell.percent */
+ _aux->bell.percent = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_feedback_state_data_t.bell.pad2 */
+ _aux->bell.pad2[0] = *(uint8_t *)xcb_tmp;
+ _aux->bell.pad2[1] = *(uint8_t *)xcb_tmp;
+ _aux->bell.pad2[2] = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t) * 3;
+ xcb_tmp += sizeof(uint8_t) * 3;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_feedback_state_data_t.bell.pitch */
+ _aux->bell.pitch = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_input_feedback_state_data_t.bell.duration */
+ _aux->bell.duration = *(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_padding_offset) & (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;
+ xcb_padding_offset = 0;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_input_feedback_state_data_sizeof (const void *_buffer,
+ uint8_t class_id)
+{
+ xcb_input_feedback_state_data_t _aux;
+ return xcb_input_feedback_state_data_unpack(_buffer, class_id, &_aux);
+}
+
+int
+xcb_input_feedback_state_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_feedback_state_t *_aux = (xcb_input_feedback_state_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_feedback_state_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* data */
+ xcb_block_len += xcb_input_feedback_state_data_sizeof(xcb_tmp, _aux->class_id);
+ 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+void *
+xcb_input_feedback_state_data (const xcb_input_feedback_state_t *R)
+{
+ return (void *) (R + 1);
+}
+
+void
+xcb_input_feedback_state_next (xcb_input_feedback_state_iterator_t *i)
+{
+ xcb_input_feedback_state_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_input_feedback_state_t *)(((char *)R) + xcb_input_feedback_state_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_input_feedback_state_t *) child.data;
+}
+
+xcb_generic_iterator_t
+xcb_input_feedback_state_end (xcb_input_feedback_state_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_input_feedback_state_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+int
+xcb_input_get_feedback_control_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_get_feedback_control_reply_t *_aux = (xcb_input_get_feedback_control_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 = 0;
+
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+
+ xcb_block_len += sizeof(xcb_input_get_feedback_control_reply_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* feedbacks */
+ for(i=0; i<_aux->num_feedbacks; i++) {
+ xcb_tmp_len = xcb_input_feedback_state_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_input_feedback_state_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_input_get_feedback_control_cookie_t
+xcb_input_get_feedback_control (xcb_connection_t *c,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GET_FEEDBACK_CONTROL,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_get_feedback_control_cookie_t xcb_ret;
+ xcb_input_get_feedback_control_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 3);
+
+ 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_input_get_feedback_control_cookie_t
+xcb_input_get_feedback_control_unchecked (xcb_connection_t *c,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GET_FEEDBACK_CONTROL,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_get_feedback_control_cookie_t xcb_ret;
+ xcb_input_get_feedback_control_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 3);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+int
+xcb_input_get_feedback_control_feedbacks_length (const xcb_input_get_feedback_control_reply_t *R)
+{
+ return R->num_feedbacks;
+}
+
+xcb_input_feedback_state_iterator_t
+xcb_input_get_feedback_control_feedbacks_iterator (const xcb_input_get_feedback_control_reply_t *R)
+{
+ xcb_input_feedback_state_iterator_t i;
+ i.data = (xcb_input_feedback_state_t *) (R + 1);
+ i.rem = R->num_feedbacks;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_get_feedback_control_reply_t *
+xcb_input_get_feedback_control_reply (xcb_connection_t *c,
+ xcb_input_get_feedback_control_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_get_feedback_control_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+void
+xcb_input_kbd_feedback_ctl_next (xcb_input_kbd_feedback_ctl_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_kbd_feedback_ctl_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_kbd_feedback_ctl_end (xcb_input_kbd_feedback_ctl_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_input_ptr_feedback_ctl_next (xcb_input_ptr_feedback_ctl_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_ptr_feedback_ctl_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_ptr_feedback_ctl_end (xcb_input_ptr_feedback_ctl_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_input_integer_feedback_ctl_next (xcb_input_integer_feedback_ctl_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_integer_feedback_ctl_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_integer_feedback_ctl_end (xcb_input_integer_feedback_ctl_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_input_string_feedback_ctl_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_string_feedback_ctl_t *_aux = (xcb_input_string_feedback_ctl_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_string_feedback_ctl_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* keysyms */
+ xcb_block_len += _aux->num_keysyms * sizeof(xcb_keysym_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_keysym_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+xcb_keysym_t *
+xcb_input_string_feedback_ctl_keysyms (const xcb_input_string_feedback_ctl_t *R)
+{
+ return (xcb_keysym_t *) (R + 1);
+}
+
+int
+xcb_input_string_feedback_ctl_keysyms_length (const xcb_input_string_feedback_ctl_t *R)
+{
+ return R->num_keysyms;
+}
+
+xcb_generic_iterator_t
+xcb_input_string_feedback_ctl_keysyms_end (const xcb_input_string_feedback_ctl_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((xcb_keysym_t *) (R + 1)) + (R->num_keysyms);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+void
+xcb_input_string_feedback_ctl_next (xcb_input_string_feedback_ctl_iterator_t *i)
+{
+ xcb_input_string_feedback_ctl_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_input_string_feedback_ctl_t *)(((char *)R) + xcb_input_string_feedback_ctl_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_input_string_feedback_ctl_t *) child.data;
+}
+
+xcb_generic_iterator_t
+xcb_input_string_feedback_ctl_end (xcb_input_string_feedback_ctl_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_input_string_feedback_ctl_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+void
+xcb_input_bell_feedback_ctl_next (xcb_input_bell_feedback_ctl_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_bell_feedback_ctl_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_bell_feedback_ctl_end (xcb_input_bell_feedback_ctl_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_input_led_feedback_ctl_next (xcb_input_led_feedback_ctl_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_led_feedback_ctl_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_led_feedback_ctl_end (xcb_input_led_feedback_ctl_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+xcb_keysym_t *
+xcb_input_feedback_ctl_data_string_keysyms (const xcb_input_feedback_ctl_data_t *S)
+{
+ return S->string.keysyms;
+}
+
+int
+xcb_input_feedback_ctl_data_string_keysyms_length (const xcb_input_feedback_ctl_t *R,
+ const xcb_input_feedback_ctl_data_t *S)
+{
+ return S->string.num_keysyms;
+}
+
+xcb_generic_iterator_t
+xcb_input_feedback_ctl_data_string_keysyms_end (const xcb_input_feedback_ctl_t *R,
+ const xcb_input_feedback_ctl_data_t *S)
+{
+ xcb_generic_iterator_t i;
+ i.data = S->string.keysyms + S->string.num_keysyms;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+int
+xcb_input_feedback_ctl_data_serialize (void **_buffer,
+ uint8_t class_id,
+ const xcb_input_feedback_ctl_data_t *_aux)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to = 0;
+ unsigned int xcb_padding_offset = 0;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[24];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ if(class_id == XCB_INPUT_FEEDBACK_CLASS_KEYBOARD) {
+ /* xcb_input_feedback_ctl_data_t.keyboard.key */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keyboard.key;
+ xcb_block_len += sizeof(xcb_input_key_code_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_input_key_code_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_input_key_code_t);
+ /* xcb_input_feedback_ctl_data_t.keyboard.auto_repeat_mode */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keyboard.auto_repeat_mode;
+ 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_input_feedback_ctl_data_t.keyboard.key_click_percent */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keyboard.key_click_percent;
+ xcb_block_len += sizeof(int8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(int8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int8_t);
+ /* xcb_input_feedback_ctl_data_t.keyboard.bell_percent */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keyboard.bell_percent;
+ xcb_block_len += sizeof(int8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(int8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int8_t);
+ /* xcb_input_feedback_ctl_data_t.keyboard.bell_pitch */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keyboard.bell_pitch;
+ xcb_block_len += sizeof(int16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(int16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int16_t);
+ /* xcb_input_feedback_ctl_data_t.keyboard.bell_duration */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keyboard.bell_duration;
+ xcb_block_len += sizeof(int16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(int16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int16_t);
+ /* xcb_input_feedback_ctl_data_t.keyboard.led_mask */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keyboard.led_mask;
+ 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_input_feedback_ctl_data_t.keyboard.led_values */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keyboard.led_values;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ if(class_id == XCB_INPUT_FEEDBACK_CLASS_POINTER) {
+ /* xcb_input_feedback_ctl_data_t.pointer.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_input_feedback_ctl_data_t.pointer.num */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->pointer.num;
+ xcb_block_len += sizeof(int16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(int16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int16_t);
+ /* xcb_input_feedback_ctl_data_t.pointer.denom */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->pointer.denom;
+ xcb_block_len += sizeof(int16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(int16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int16_t);
+ /* xcb_input_feedback_ctl_data_t.pointer.threshold */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->pointer.threshold;
+ xcb_block_len += sizeof(int16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(int16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int16_t);
+ }
+ if(class_id == XCB_INPUT_FEEDBACK_CLASS_STRING) {
+ /* xcb_input_feedback_ctl_data_t.string.pad1 */
+ 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_input_feedback_ctl_data_t.string.num_keysyms */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->string.num_keysyms;
+ 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_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* keysyms */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->string.keysyms;
+ xcb_block_len += _aux->string.num_keysyms * sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->string.num_keysyms * sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keysym_t);
+ }
+ if(class_id == XCB_INPUT_FEEDBACK_CLASS_INTEGER) {
+ /* xcb_input_feedback_ctl_data_t.integer.int_to_display */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->integer.int_to_display;
+ xcb_block_len += sizeof(int32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(int32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int32_t);
+ }
+ if(class_id == XCB_INPUT_FEEDBACK_CLASS_LED) {
+ /* xcb_input_feedback_ctl_data_t.led.led_mask */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->led.led_mask;
+ 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_input_feedback_ctl_data_t.led.led_values */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->led.led_values;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ if(class_id == XCB_INPUT_FEEDBACK_CLASS_BELL) {
+ /* xcb_input_feedback_ctl_data_t.bell.percent */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->bell.percent;
+ xcb_block_len += sizeof(int8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(int8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int8_t);
+ /* xcb_input_feedback_ctl_data_t.bell.pad2 */
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_block_len += sizeof(uint8_t)*3;
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*3;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_feedback_ctl_data_t.bell.pitch */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->bell.pitch;
+ xcb_block_len += sizeof(int16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(int16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int16_t);
+ /* xcb_input_feedback_ctl_data_t.bell.duration */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->bell.duration;
+ xcb_block_len += sizeof(int16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(int16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int16_t);
+ }
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 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_input_feedback_ctl_data_unpack (const void *_buffer,
+ uint8_t class_id,
+ xcb_input_feedback_ctl_data_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 = 0;
+ unsigned int xcb_padding_offset = 0;
+
+
+ if(class_id == XCB_INPUT_FEEDBACK_CLASS_KEYBOARD) {
+ /* xcb_input_feedback_ctl_data_t.keyboard.key */
+ _aux->keyboard.key = *(xcb_input_key_code_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_input_key_code_t);
+ xcb_tmp += sizeof(xcb_input_key_code_t);
+ xcb_align_to = ALIGNOF(xcb_input_key_code_t);
+ /* xcb_input_feedback_ctl_data_t.keyboard.auto_repeat_mode */
+ _aux->keyboard.auto_repeat_mode = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_feedback_ctl_data_t.keyboard.key_click_percent */
+ _aux->keyboard.key_click_percent = *(int8_t *)xcb_tmp;
+ xcb_block_len += sizeof(int8_t);
+ xcb_tmp += sizeof(int8_t);
+ xcb_align_to = ALIGNOF(int8_t);
+ /* xcb_input_feedback_ctl_data_t.keyboard.bell_percent */
+ _aux->keyboard.bell_percent = *(int8_t *)xcb_tmp;
+ xcb_block_len += sizeof(int8_t);
+ xcb_tmp += sizeof(int8_t);
+ xcb_align_to = ALIGNOF(int8_t);
+ /* xcb_input_feedback_ctl_data_t.keyboard.bell_pitch */
+ _aux->keyboard.bell_pitch = *(int16_t *)xcb_tmp;
+ xcb_block_len += sizeof(int16_t);
+ xcb_tmp += sizeof(int16_t);
+ xcb_align_to = ALIGNOF(int16_t);
+ /* xcb_input_feedback_ctl_data_t.keyboard.bell_duration */
+ _aux->keyboard.bell_duration = *(int16_t *)xcb_tmp;
+ xcb_block_len += sizeof(int16_t);
+ xcb_tmp += sizeof(int16_t);
+ xcb_align_to = ALIGNOF(int16_t);
+ /* xcb_input_feedback_ctl_data_t.keyboard.led_mask */
+ _aux->keyboard.led_mask = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_input_feedback_ctl_data_t.keyboard.led_values */
+ _aux->keyboard.led_values = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ if(class_id == XCB_INPUT_FEEDBACK_CLASS_POINTER) {
+ /* xcb_input_feedback_ctl_data_t.pointer.pad0 */
+ _aux->pointer.pad0[0] = *(uint8_t *)xcb_tmp;
+ _aux->pointer.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_input_feedback_ctl_data_t.pointer.num */
+ _aux->pointer.num = *(int16_t *)xcb_tmp;
+ xcb_block_len += sizeof(int16_t);
+ xcb_tmp += sizeof(int16_t);
+ xcb_align_to = ALIGNOF(int16_t);
+ /* xcb_input_feedback_ctl_data_t.pointer.denom */
+ _aux->pointer.denom = *(int16_t *)xcb_tmp;
+ xcb_block_len += sizeof(int16_t);
+ xcb_tmp += sizeof(int16_t);
+ xcb_align_to = ALIGNOF(int16_t);
+ /* xcb_input_feedback_ctl_data_t.pointer.threshold */
+ _aux->pointer.threshold = *(int16_t *)xcb_tmp;
+ xcb_block_len += sizeof(int16_t);
+ xcb_tmp += sizeof(int16_t);
+ xcb_align_to = ALIGNOF(int16_t);
+ }
+ if(class_id == XCB_INPUT_FEEDBACK_CLASS_STRING) {
+ /* xcb_input_feedback_ctl_data_t.string.pad1 */
+ _aux->string.pad1[0] = *(uint8_t *)xcb_tmp;
+ _aux->string.pad1[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_input_feedback_ctl_data_t.string.num_keysyms */
+ _aux->string.num_keysyms = *(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_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* keysyms */
+ _aux->string.keysyms = (xcb_keysym_t *)xcb_tmp;
+ xcb_block_len += _aux->string.num_keysyms * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_keysym_t);
+ }
+ if(class_id == XCB_INPUT_FEEDBACK_CLASS_INTEGER) {
+ /* xcb_input_feedback_ctl_data_t.integer.int_to_display */
+ _aux->integer.int_to_display = *(int32_t *)xcb_tmp;
+ xcb_block_len += sizeof(int32_t);
+ xcb_tmp += sizeof(int32_t);
+ xcb_align_to = ALIGNOF(int32_t);
+ }
+ if(class_id == XCB_INPUT_FEEDBACK_CLASS_LED) {
+ /* xcb_input_feedback_ctl_data_t.led.led_mask */
+ _aux->led.led_mask = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_input_feedback_ctl_data_t.led.led_values */
+ _aux->led.led_values = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ if(class_id == XCB_INPUT_FEEDBACK_CLASS_BELL) {
+ /* xcb_input_feedback_ctl_data_t.bell.percent */
+ _aux->bell.percent = *(int8_t *)xcb_tmp;
+ xcb_block_len += sizeof(int8_t);
+ xcb_tmp += sizeof(int8_t);
+ xcb_align_to = ALIGNOF(int8_t);
+ /* xcb_input_feedback_ctl_data_t.bell.pad2 */
+ _aux->bell.pad2[0] = *(uint8_t *)xcb_tmp;
+ _aux->bell.pad2[1] = *(uint8_t *)xcb_tmp;
+ _aux->bell.pad2[2] = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t) * 3;
+ xcb_tmp += sizeof(uint8_t) * 3;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_feedback_ctl_data_t.bell.pitch */
+ _aux->bell.pitch = *(int16_t *)xcb_tmp;
+ xcb_block_len += sizeof(int16_t);
+ xcb_tmp += sizeof(int16_t);
+ xcb_align_to = ALIGNOF(int16_t);
+ /* xcb_input_feedback_ctl_data_t.bell.duration */
+ _aux->bell.duration = *(int16_t *)xcb_tmp;
+ xcb_block_len += sizeof(int16_t);
+ xcb_tmp += sizeof(int16_t);
+ xcb_align_to = ALIGNOF(int16_t);
+ }
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_input_feedback_ctl_data_sizeof (const void *_buffer,
+ uint8_t class_id)
+{
+ xcb_input_feedback_ctl_data_t _aux;
+ return xcb_input_feedback_ctl_data_unpack(_buffer, class_id, &_aux);
+}
+
+int
+xcb_input_feedback_ctl_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_feedback_ctl_t *_aux = (xcb_input_feedback_ctl_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_feedback_ctl_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* data */
+ xcb_block_len += xcb_input_feedback_ctl_data_sizeof(xcb_tmp, _aux->class_id);
+ 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+void *
+xcb_input_feedback_ctl_data (const xcb_input_feedback_ctl_t *R)
+{
+ return (void *) (R + 1);
+}
+
+void
+xcb_input_feedback_ctl_next (xcb_input_feedback_ctl_iterator_t *i)
+{
+ xcb_input_feedback_ctl_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_input_feedback_ctl_t *)(((char *)R) + xcb_input_feedback_ctl_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_input_feedback_ctl_t *) child.data;
+}
+
+xcb_generic_iterator_t
+xcb_input_feedback_ctl_end (xcb_input_feedback_ctl_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_input_feedback_ctl_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+int
+xcb_input_change_feedback_control_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_change_feedback_control_request_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* feedback */
+ xcb_block_len += xcb_input_feedback_ctl_sizeof(xcb_tmp);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_feedback_ctl_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_input_change_feedback_control_checked (xcb_connection_t *c,
+ uint32_t mask,
+ uint8_t device_id,
+ uint8_t feedback_id,
+ xcb_input_feedback_ctl_t *feedback)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_CHANGE_FEEDBACK_CONTROL,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_change_feedback_control_request_t xcb_out;
+
+ xcb_out.mask = mask;
+ xcb_out.device_id = device_id;
+ xcb_out.feedback_id = feedback_id;
+ 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_input_feedback_ctl_t feedback */
+ xcb_parts[4].iov_base = (char *) feedback;
+ xcb_parts[4].iov_len =
+ xcb_input_feedback_ctl_sizeof (feedback);
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_change_feedback_control (xcb_connection_t *c,
+ uint32_t mask,
+ uint8_t device_id,
+ uint8_t feedback_id,
+ xcb_input_feedback_ctl_t *feedback)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_CHANGE_FEEDBACK_CONTROL,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_change_feedback_control_request_t xcb_out;
+
+ xcb_out.mask = mask;
+ xcb_out.device_id = device_id;
+ xcb_out.feedback_id = feedback_id;
+ 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_input_feedback_ctl_t feedback */
+ xcb_parts[4].iov_base = (char *) feedback;
+ xcb_parts[4].iov_len =
+ xcb_input_feedback_ctl_sizeof (feedback);
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_feedback_ctl_t *
+xcb_input_change_feedback_control_feedback (const xcb_input_change_feedback_control_request_t *R)
+{
+ return (xcb_input_feedback_ctl_t *) (R + 1);
+}
+
+int
+xcb_input_get_device_key_mapping_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_get_device_key_mapping_reply_t *_aux = (xcb_input_get_device_key_mapping_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_get_device_key_mapping_reply_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* keysyms */
+ xcb_block_len += _aux->length * sizeof(xcb_keysym_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_keysym_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+xcb_input_get_device_key_mapping_cookie_t
+xcb_input_get_device_key_mapping (xcb_connection_t *c,
+ uint8_t device_id,
+ xcb_input_key_code_t first_keycode,
+ uint8_t count)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GET_DEVICE_KEY_MAPPING,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_get_device_key_mapping_cookie_t xcb_ret;
+ xcb_input_get_device_key_mapping_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ xcb_out.first_keycode = first_keycode;
+ xcb_out.count = count;
+ xcb_out.pad0 = 0;
+
+ 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_input_get_device_key_mapping_cookie_t
+xcb_input_get_device_key_mapping_unchecked (xcb_connection_t *c,
+ uint8_t device_id,
+ xcb_input_key_code_t first_keycode,
+ uint8_t count)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GET_DEVICE_KEY_MAPPING,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_get_device_key_mapping_cookie_t xcb_ret;
+ xcb_input_get_device_key_mapping_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ xcb_out.first_keycode = first_keycode;
+ xcb_out.count = count;
+ xcb_out.pad0 = 0;
+
+ 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_keysym_t *
+xcb_input_get_device_key_mapping_keysyms (const xcb_input_get_device_key_mapping_reply_t *R)
+{
+ return (xcb_keysym_t *) (R + 1);
+}
+
+int
+xcb_input_get_device_key_mapping_keysyms_length (const xcb_input_get_device_key_mapping_reply_t *R)
+{
+ return R->length;
+}
+
+xcb_generic_iterator_t
+xcb_input_get_device_key_mapping_keysyms_end (const xcb_input_get_device_key_mapping_reply_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((xcb_keysym_t *) (R + 1)) + (R->length);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_get_device_key_mapping_reply_t *
+xcb_input_get_device_key_mapping_reply (xcb_connection_t *c,
+ xcb_input_get_device_key_mapping_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_get_device_key_mapping_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_input_change_device_key_mapping_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_change_device_key_mapping_request_t *_aux = (xcb_input_change_device_key_mapping_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_change_device_key_mapping_request_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* keysyms */
+ xcb_block_len += (_aux->keycode_count * _aux->keysyms_per_keycode) * sizeof(xcb_keysym_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_keysym_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+xcb_void_cookie_t
+xcb_input_change_device_key_mapping_checked (xcb_connection_t *c,
+ uint8_t device_id,
+ xcb_input_key_code_t first_keycode,
+ uint8_t keysyms_per_keycode,
+ uint8_t keycode_count,
+ const xcb_keysym_t *keysyms)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_CHANGE_DEVICE_KEY_MAPPING,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_change_device_key_mapping_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ xcb_out.first_keycode = first_keycode;
+ xcb_out.keysyms_per_keycode = keysyms_per_keycode;
+ xcb_out.keycode_count = keycode_count;
+
+ 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_keysym_t keysyms */
+ xcb_parts[4].iov_base = (char *) keysyms;
+ xcb_parts[4].iov_len = (keycode_count * keysyms_per_keycode) * sizeof(xcb_keysym_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_change_device_key_mapping (xcb_connection_t *c,
+ uint8_t device_id,
+ xcb_input_key_code_t first_keycode,
+ uint8_t keysyms_per_keycode,
+ uint8_t keycode_count,
+ const xcb_keysym_t *keysyms)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_CHANGE_DEVICE_KEY_MAPPING,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_change_device_key_mapping_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ xcb_out.first_keycode = first_keycode;
+ xcb_out.keysyms_per_keycode = keysyms_per_keycode;
+ xcb_out.keycode_count = keycode_count;
+
+ 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_keysym_t keysyms */
+ xcb_parts[4].iov_base = (char *) keysyms;
+ xcb_parts[4].iov_len = (keycode_count * keysyms_per_keycode) * sizeof(xcb_keysym_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_keysym_t *
+xcb_input_change_device_key_mapping_keysyms (const xcb_input_change_device_key_mapping_request_t *R)
+{
+ return (xcb_keysym_t *) (R + 1);
+}
+
+int
+xcb_input_change_device_key_mapping_keysyms_length (const xcb_input_change_device_key_mapping_request_t *R)
+{
+ return (R->keycode_count * R->keysyms_per_keycode);
+}
+
+xcb_generic_iterator_t
+xcb_input_change_device_key_mapping_keysyms_end (const xcb_input_change_device_key_mapping_request_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((xcb_keysym_t *) (R + 1)) + ((R->keycode_count * R->keysyms_per_keycode));
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+int
+xcb_input_get_device_modifier_mapping_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_get_device_modifier_mapping_reply_t *_aux = (xcb_input_get_device_modifier_mapping_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_get_device_modifier_mapping_reply_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* keymaps */
+ xcb_block_len += (_aux->keycodes_per_modifier * 8) * 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;
+}
+
+xcb_input_get_device_modifier_mapping_cookie_t
+xcb_input_get_device_modifier_mapping (xcb_connection_t *c,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GET_DEVICE_MODIFIER_MAPPING,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_get_device_modifier_mapping_cookie_t xcb_ret;
+ xcb_input_get_device_modifier_mapping_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 3);
+
+ 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_input_get_device_modifier_mapping_cookie_t
+xcb_input_get_device_modifier_mapping_unchecked (xcb_connection_t *c,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GET_DEVICE_MODIFIER_MAPPING,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_get_device_modifier_mapping_cookie_t xcb_ret;
+ xcb_input_get_device_modifier_mapping_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 3);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+uint8_t *
+xcb_input_get_device_modifier_mapping_keymaps (const xcb_input_get_device_modifier_mapping_reply_t *R)
+{
+ return (uint8_t *) (R + 1);
+}
+
+int
+xcb_input_get_device_modifier_mapping_keymaps_length (const xcb_input_get_device_modifier_mapping_reply_t *R)
+{
+ return (R->keycodes_per_modifier * 8);
+}
+
+xcb_generic_iterator_t
+xcb_input_get_device_modifier_mapping_keymaps_end (const xcb_input_get_device_modifier_mapping_reply_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((uint8_t *) (R + 1)) + ((R->keycodes_per_modifier * 8));
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_get_device_modifier_mapping_reply_t *
+xcb_input_get_device_modifier_mapping_reply (xcb_connection_t *c,
+ xcb_input_get_device_modifier_mapping_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_get_device_modifier_mapping_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_input_set_device_modifier_mapping_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_set_device_modifier_mapping_request_t *_aux = (xcb_input_set_device_modifier_mapping_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_set_device_modifier_mapping_request_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* keymaps */
+ xcb_block_len += (_aux->keycodes_per_modifier * 8) * 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;
+}
+
+xcb_input_set_device_modifier_mapping_cookie_t
+xcb_input_set_device_modifier_mapping (xcb_connection_t *c,
+ uint8_t device_id,
+ uint8_t keycodes_per_modifier,
+ const uint8_t *keymaps)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_SET_DEVICE_MODIFIER_MAPPING,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_input_set_device_modifier_mapping_cookie_t xcb_ret;
+ xcb_input_set_device_modifier_mapping_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ xcb_out.keycodes_per_modifier = keycodes_per_modifier;
+ 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;
+ /* uint8_t keymaps */
+ xcb_parts[4].iov_base = (char *) keymaps;
+ xcb_parts[4].iov_len = (keycodes_per_modifier * 8) * sizeof(uint8_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_set_device_modifier_mapping_cookie_t
+xcb_input_set_device_modifier_mapping_unchecked (xcb_connection_t *c,
+ uint8_t device_id,
+ uint8_t keycodes_per_modifier,
+ const uint8_t *keymaps)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_SET_DEVICE_MODIFIER_MAPPING,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_input_set_device_modifier_mapping_cookie_t xcb_ret;
+ xcb_input_set_device_modifier_mapping_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ xcb_out.keycodes_per_modifier = keycodes_per_modifier;
+ 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;
+ /* uint8_t keymaps */
+ xcb_parts[4].iov_base = (char *) keymaps;
+ xcb_parts[4].iov_len = (keycodes_per_modifier * 8) * sizeof(uint8_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_set_device_modifier_mapping_reply_t *
+xcb_input_set_device_modifier_mapping_reply (xcb_connection_t *c,
+ xcb_input_set_device_modifier_mapping_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_set_device_modifier_mapping_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_input_get_device_button_mapping_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_get_device_button_mapping_reply_t *_aux = (xcb_input_get_device_button_mapping_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_get_device_button_mapping_reply_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* map */
+ xcb_block_len += _aux->map_size * sizeof(uint8_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint8_t);
+ xcb_align_to = 4;
+ /* 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;
+ /* 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_input_get_device_button_mapping_cookie_t
+xcb_input_get_device_button_mapping (xcb_connection_t *c,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GET_DEVICE_BUTTON_MAPPING,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_get_device_button_mapping_cookie_t xcb_ret;
+ xcb_input_get_device_button_mapping_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 3);
+
+ 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_input_get_device_button_mapping_cookie_t
+xcb_input_get_device_button_mapping_unchecked (xcb_connection_t *c,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GET_DEVICE_BUTTON_MAPPING,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_get_device_button_mapping_cookie_t xcb_ret;
+ xcb_input_get_device_button_mapping_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 3);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+uint8_t *
+xcb_input_get_device_button_mapping_map (const xcb_input_get_device_button_mapping_reply_t *R)
+{
+ return (uint8_t *) (R + 1);
+}
+
+int
+xcb_input_get_device_button_mapping_map_length (const xcb_input_get_device_button_mapping_reply_t *R)
+{
+ return R->map_size;
+}
+
+xcb_generic_iterator_t
+xcb_input_get_device_button_mapping_map_end (const xcb_input_get_device_button_mapping_reply_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((uint8_t *) (R + 1)) + (R->map_size);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_get_device_button_mapping_reply_t *
+xcb_input_get_device_button_mapping_reply (xcb_connection_t *c,
+ xcb_input_get_device_button_mapping_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_get_device_button_mapping_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_input_set_device_button_mapping_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_set_device_button_mapping_request_t *_aux = (xcb_input_set_device_button_mapping_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_set_device_button_mapping_request_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* map */
+ xcb_block_len += _aux->map_size * 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;
+}
+
+xcb_input_set_device_button_mapping_cookie_t
+xcb_input_set_device_button_mapping (xcb_connection_t *c,
+ uint8_t device_id,
+ uint8_t map_size,
+ const uint8_t *map)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_SET_DEVICE_BUTTON_MAPPING,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_input_set_device_button_mapping_cookie_t xcb_ret;
+ xcb_input_set_device_button_mapping_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ xcb_out.map_size = map_size;
+ 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;
+ /* uint8_t map */
+ xcb_parts[4].iov_base = (char *) map;
+ xcb_parts[4].iov_len = map_size * sizeof(uint8_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_set_device_button_mapping_cookie_t
+xcb_input_set_device_button_mapping_unchecked (xcb_connection_t *c,
+ uint8_t device_id,
+ uint8_t map_size,
+ const uint8_t *map)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_SET_DEVICE_BUTTON_MAPPING,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_input_set_device_button_mapping_cookie_t xcb_ret;
+ xcb_input_set_device_button_mapping_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ xcb_out.map_size = map_size;
+ 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;
+ /* uint8_t map */
+ xcb_parts[4].iov_base = (char *) map;
+ xcb_parts[4].iov_len = map_size * sizeof(uint8_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_set_device_button_mapping_reply_t *
+xcb_input_set_device_button_mapping_reply (xcb_connection_t *c,
+ xcb_input_set_device_button_mapping_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_set_device_button_mapping_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+void
+xcb_input_key_state_next (xcb_input_key_state_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_key_state_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_key_state_end (xcb_input_key_state_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_input_button_state_next (xcb_input_button_state_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_button_state_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_button_state_end (xcb_input_button_state_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_input_valuator_state_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_valuator_state_t *_aux = (xcb_input_valuator_state_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_valuator_state_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* valuators */
+ xcb_block_len += _aux->num_valuators * sizeof(int32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(int32_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;
+}
+
+int32_t *
+xcb_input_valuator_state_valuators (const xcb_input_valuator_state_t *R)
+{
+ return (int32_t *) (R + 1);
+}
+
+int
+xcb_input_valuator_state_valuators_length (const xcb_input_valuator_state_t *R)
+{
+ return R->num_valuators;
+}
+
+xcb_generic_iterator_t
+xcb_input_valuator_state_valuators_end (const xcb_input_valuator_state_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((int32_t *) (R + 1)) + (R->num_valuators);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+void
+xcb_input_valuator_state_next (xcb_input_valuator_state_iterator_t *i)
+{
+ xcb_input_valuator_state_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_input_valuator_state_t *)(((char *)R) + xcb_input_valuator_state_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_input_valuator_state_t *) child.data;
+}
+
+xcb_generic_iterator_t
+xcb_input_valuator_state_end (xcb_input_valuator_state_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_input_valuator_state_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+int32_t *
+xcb_input_input_state_data_valuator_valuators (const xcb_input_input_state_data_t *S)
+{
+ return S->valuator.valuators;
+}
+
+int
+xcb_input_input_state_data_valuator_valuators_length (const xcb_input_input_state_t *R,
+ const xcb_input_input_state_data_t *S)
+{
+ return S->valuator.num_valuators;
+}
+
+xcb_generic_iterator_t
+xcb_input_input_state_data_valuator_valuators_end (const xcb_input_input_state_t *R,
+ const xcb_input_input_state_data_t *S)
+{
+ xcb_generic_iterator_t i;
+ i.data = S->valuator.valuators + S->valuator.num_valuators;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+int
+xcb_input_input_state_data_serialize (void **_buffer,
+ uint8_t class_id,
+ const xcb_input_input_state_data_t *_aux)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to = 0;
+ unsigned int xcb_padding_offset = 2;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[11];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ if(class_id == XCB_INPUT_INPUT_CLASS_KEY) {
+ /* xcb_input_input_state_data_t.key.num_keys */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key.num_keys;
+ 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_input_input_state_data_t.key.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_input_input_state_data_t.key.keys */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->key.keys;
+ xcb_block_len += 32;
+ xcb_parts[xcb_parts_idx].iov_len = 32;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if(class_id == XCB_INPUT_INPUT_CLASS_BUTTON) {
+ /* xcb_input_input_state_data_t.button.num_buttons */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->button.num_buttons;
+ 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_input_input_state_data_t.button.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_input_input_state_data_t.button.buttons */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->button.buttons;
+ xcb_block_len += 32;
+ xcb_parts[xcb_parts_idx].iov_len = 32;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if(class_id == XCB_INPUT_INPUT_CLASS_VALUATOR) {
+ /* xcb_input_input_state_data_t.valuator.num_valuators */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->valuator.num_valuators;
+ 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_input_input_state_data_t.valuator.mode */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->valuator.mode;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* valuators */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->valuator.valuators;
+ xcb_block_len += _aux->valuator.num_valuators * sizeof(int32_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->valuator.num_valuators * sizeof(int32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int32_t);
+ }
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 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_input_input_state_data_unpack (const void *_buffer,
+ uint8_t class_id,
+ xcb_input_input_state_data_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 = 0;
+ unsigned int xcb_padding_offset = 2;
+
+
+ if(class_id == XCB_INPUT_INPUT_CLASS_KEY) {
+ /* xcb_input_input_state_data_t.key.num_keys */
+ _aux->key.num_keys = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_input_state_data_t.key.pad0 */
+ _aux->key.pad0 = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_input_state_data_t.key.keys */
+ memcpy(_aux->key.keys, xcb_tmp, sizeof(uint8_t) * 32);
+ xcb_block_len += sizeof(uint8_t) * 32;
+ xcb_tmp += sizeof(uint8_t) * 32;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if(class_id == XCB_INPUT_INPUT_CLASS_BUTTON) {
+ /* xcb_input_input_state_data_t.button.num_buttons */
+ _aux->button.num_buttons = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_input_state_data_t.button.pad1 */
+ _aux->button.pad1 = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_input_state_data_t.button.buttons */
+ memcpy(_aux->button.buttons, xcb_tmp, sizeof(uint8_t) * 32);
+ xcb_block_len += sizeof(uint8_t) * 32;
+ xcb_tmp += sizeof(uint8_t) * 32;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if(class_id == XCB_INPUT_INPUT_CLASS_VALUATOR) {
+ /* xcb_input_input_state_data_t.valuator.num_valuators */
+ _aux->valuator.num_valuators = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_input_state_data_t.valuator.mode */
+ _aux->valuator.mode = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* valuators */
+ _aux->valuator.valuators = (int32_t *)xcb_tmp;
+ xcb_block_len += _aux->valuator.num_valuators * sizeof(int32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(int32_t);
+ }
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_input_input_state_data_sizeof (const void *_buffer,
+ uint8_t class_id)
+{
+ xcb_input_input_state_data_t _aux;
+ return xcb_input_input_state_data_unpack(_buffer, class_id, &_aux);
+}
+
+int
+xcb_input_input_state_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_input_state_t *_aux = (xcb_input_input_state_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_input_state_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* data */
+ xcb_block_len += xcb_input_input_state_data_sizeof(xcb_tmp, _aux->class_id);
+ 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+void *
+xcb_input_input_state_data (const xcb_input_input_state_t *R)
+{
+ return (void *) (R + 1);
+}
+
+void
+xcb_input_input_state_next (xcb_input_input_state_iterator_t *i)
+{
+ xcb_input_input_state_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_input_input_state_t *)(((char *)R) + xcb_input_input_state_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_input_input_state_t *) child.data;
+}
+
+xcb_generic_iterator_t
+xcb_input_input_state_end (xcb_input_input_state_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_input_input_state_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+int
+xcb_input_query_device_state_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_query_device_state_reply_t *_aux = (xcb_input_query_device_state_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 = 0;
+
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+
+ xcb_block_len += sizeof(xcb_input_query_device_state_reply_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* classes */
+ for(i=0; i<_aux->num_classes; i++) {
+ xcb_tmp_len = xcb_input_input_state_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_input_input_state_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_input_query_device_state_cookie_t
+xcb_input_query_device_state (xcb_connection_t *c,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_QUERY_DEVICE_STATE,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_query_device_state_cookie_t xcb_ret;
+ xcb_input_query_device_state_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 3);
+
+ 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_input_query_device_state_cookie_t
+xcb_input_query_device_state_unchecked (xcb_connection_t *c,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_QUERY_DEVICE_STATE,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_query_device_state_cookie_t xcb_ret;
+ xcb_input_query_device_state_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 3);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+int
+xcb_input_query_device_state_classes_length (const xcb_input_query_device_state_reply_t *R)
+{
+ return R->num_classes;
+}
+
+xcb_input_input_state_iterator_t
+xcb_input_query_device_state_classes_iterator (const xcb_input_query_device_state_reply_t *R)
+{
+ xcb_input_input_state_iterator_t i;
+ i.data = (xcb_input_input_state_t *) (R + 1);
+ i.rem = R->num_classes;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_query_device_state_reply_t *
+xcb_input_query_device_state_reply (xcb_connection_t *c,
+ xcb_input_query_device_state_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_query_device_state_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+xcb_void_cookie_t
+xcb_input_device_bell_checked (xcb_connection_t *c,
+ uint8_t device_id,
+ uint8_t feedback_id,
+ uint8_t feedback_class,
+ int8_t percent)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_DEVICE_BELL,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_device_bell_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ xcb_out.feedback_id = feedback_id;
+ xcb_out.feedback_class = feedback_class;
+ xcb_out.percent = percent;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_device_bell (xcb_connection_t *c,
+ uint8_t device_id,
+ uint8_t feedback_id,
+ uint8_t feedback_class,
+ int8_t percent)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_DEVICE_BELL,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_device_bell_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ xcb_out.feedback_id = feedback_id;
+ xcb_out.feedback_class = feedback_class;
+ xcb_out.percent = percent;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+int
+xcb_input_set_device_valuators_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_set_device_valuators_request_t *_aux = (xcb_input_set_device_valuators_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_set_device_valuators_request_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* valuators */
+ xcb_block_len += _aux->num_valuators * sizeof(int32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(int32_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_input_set_device_valuators_cookie_t
+xcb_input_set_device_valuators (xcb_connection_t *c,
+ uint8_t device_id,
+ uint8_t first_valuator,
+ uint8_t num_valuators,
+ const int32_t *valuators)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_SET_DEVICE_VALUATORS,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_input_set_device_valuators_cookie_t xcb_ret;
+ xcb_input_set_device_valuators_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ xcb_out.first_valuator = first_valuator;
+ xcb_out.num_valuators = num_valuators;
+ xcb_out.pad0 = 0;
+
+ 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;
+ /* int32_t valuators */
+ xcb_parts[4].iov_base = (char *) valuators;
+ xcb_parts[4].iov_len = num_valuators * sizeof(int32_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_set_device_valuators_cookie_t
+xcb_input_set_device_valuators_unchecked (xcb_connection_t *c,
+ uint8_t device_id,
+ uint8_t first_valuator,
+ uint8_t num_valuators,
+ const int32_t *valuators)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_SET_DEVICE_VALUATORS,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_input_set_device_valuators_cookie_t xcb_ret;
+ xcb_input_set_device_valuators_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ xcb_out.first_valuator = first_valuator;
+ xcb_out.num_valuators = num_valuators;
+ xcb_out.pad0 = 0;
+
+ 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;
+ /* int32_t valuators */
+ xcb_parts[4].iov_base = (char *) valuators;
+ xcb_parts[4].iov_len = num_valuators * sizeof(int32_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_set_device_valuators_reply_t *
+xcb_input_set_device_valuators_reply (xcb_connection_t *c,
+ xcb_input_set_device_valuators_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_set_device_valuators_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_input_device_resolution_state_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_device_resolution_state_t *_aux = (xcb_input_device_resolution_state_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_device_resolution_state_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* resolution_values */
+ xcb_block_len += _aux->num_valuators * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+ /* resolution_min */
+ xcb_block_len += _aux->num_valuators * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+ /* resolution_max */
+ xcb_block_len += _aux->num_valuators * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+}
+
+uint32_t *
+xcb_input_device_resolution_state_resolution_values (const xcb_input_device_resolution_state_t *R)
+{
+ return (uint32_t *) (R + 1);
+}
+
+int
+xcb_input_device_resolution_state_resolution_values_length (const xcb_input_device_resolution_state_t *R)
+{
+ return R->num_valuators;
+}
+
+xcb_generic_iterator_t
+xcb_input_device_resolution_state_resolution_values_end (const xcb_input_device_resolution_state_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((uint32_t *) (R + 1)) + (R->num_valuators);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+uint32_t *
+xcb_input_device_resolution_state_resolution_min (const xcb_input_device_resolution_state_t *R)
+{
+ xcb_generic_iterator_t prev = xcb_input_device_resolution_state_resolution_values_end(R);
+ return (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0);
+}
+
+int
+xcb_input_device_resolution_state_resolution_min_length (const xcb_input_device_resolution_state_t *R)
+{
+ return R->num_valuators;
+}
+
+xcb_generic_iterator_t
+xcb_input_device_resolution_state_resolution_min_end (const xcb_input_device_resolution_state_t *R)
+{
+ xcb_generic_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_input_device_resolution_state_resolution_values_end(R);
+ i.data = ((uint32_t *) ((char*) prev.data + XCB_TYPE_PAD(uint32_t, prev.index))) + (R->num_valuators);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+uint32_t *
+xcb_input_device_resolution_state_resolution_max (const xcb_input_device_resolution_state_t *R)
+{
+ xcb_generic_iterator_t prev = xcb_input_device_resolution_state_resolution_min_end(R);
+ return (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0);
+}
+
+int
+xcb_input_device_resolution_state_resolution_max_length (const xcb_input_device_resolution_state_t *R)
+{
+ return R->num_valuators;
+}
+
+xcb_generic_iterator_t
+xcb_input_device_resolution_state_resolution_max_end (const xcb_input_device_resolution_state_t *R)
+{
+ xcb_generic_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_input_device_resolution_state_resolution_min_end(R);
+ i.data = ((uint32_t *) ((char*) prev.data + XCB_TYPE_PAD(uint32_t, prev.index))) + (R->num_valuators);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+void
+xcb_input_device_resolution_state_next (xcb_input_device_resolution_state_iterator_t *i)
+{
+ xcb_input_device_resolution_state_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_input_device_resolution_state_t *)(((char *)R) + xcb_input_device_resolution_state_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_input_device_resolution_state_t *) child.data;
+}
+
+xcb_generic_iterator_t
+xcb_input_device_resolution_state_end (xcb_input_device_resolution_state_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_input_device_resolution_state_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+void
+xcb_input_device_abs_calib_state_next (xcb_input_device_abs_calib_state_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_device_abs_calib_state_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_device_abs_calib_state_end (xcb_input_device_abs_calib_state_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_input_device_abs_area_state_next (xcb_input_device_abs_area_state_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_device_abs_area_state_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_device_abs_area_state_end (xcb_input_device_abs_area_state_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_input_device_core_state_next (xcb_input_device_core_state_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_device_core_state_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_device_core_state_end (xcb_input_device_core_state_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_input_device_enable_state_next (xcb_input_device_enable_state_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_device_enable_state_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_device_enable_state_end (xcb_input_device_enable_state_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;
+}
+
+uint32_t *
+xcb_input_device_state_data_resolution_resolution_values (const xcb_input_device_state_data_t *S)
+{
+ return S->resolution.resolution_values;
+}
+
+int
+xcb_input_device_state_data_resolution_resolution_values_length (const xcb_input_device_state_t *R,
+ const xcb_input_device_state_data_t *S)
+{
+ return S->resolution.num_valuators;
+}
+
+xcb_generic_iterator_t
+xcb_input_device_state_data_resolution_resolution_values_end (const xcb_input_device_state_t *R,
+ const xcb_input_device_state_data_t *S)
+{
+ xcb_generic_iterator_t i;
+ i.data = S->resolution.resolution_values + S->resolution.num_valuators;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+uint32_t *
+xcb_input_device_state_data_resolution_resolution_min (const xcb_input_device_state_data_t *S)
+{
+ return S->resolution.resolution_min;
+}
+
+int
+xcb_input_device_state_data_resolution_resolution_min_length (const xcb_input_device_state_t *R,
+ const xcb_input_device_state_data_t *S)
+{
+ return S->resolution.num_valuators;
+}
+
+xcb_generic_iterator_t
+xcb_input_device_state_data_resolution_resolution_min_end (const xcb_input_device_state_t *R,
+ const xcb_input_device_state_data_t *S)
+{
+ xcb_generic_iterator_t i;
+ i.data = S->resolution.resolution_min + S->resolution.num_valuators;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+uint32_t *
+xcb_input_device_state_data_resolution_resolution_max (const xcb_input_device_state_data_t *S)
+{
+ return S->resolution.resolution_max;
+}
+
+int
+xcb_input_device_state_data_resolution_resolution_max_length (const xcb_input_device_state_t *R,
+ const xcb_input_device_state_data_t *S)
+{
+ return S->resolution.num_valuators;
+}
+
+xcb_generic_iterator_t
+xcb_input_device_state_data_resolution_resolution_max_end (const xcb_input_device_state_t *R,
+ const xcb_input_device_state_data_t *S)
+{
+ xcb_generic_iterator_t i;
+ i.data = S->resolution.resolution_max + S->resolution.num_valuators;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+int
+xcb_input_device_state_data_serialize (void **_buffer,
+ uint16_t control_id,
+ const xcb_input_device_state_data_t *_aux)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to = 0;
+ unsigned int xcb_padding_offset = 0;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[27];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ if(control_id == XCB_INPUT_DEVICE_CONTROL_RESOLUTION) {
+ /* xcb_input_device_state_data_t.resolution.num_valuators */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->resolution.num_valuators;
+ 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);
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* resolution_values */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->resolution.resolution_values;
+ xcb_block_len += _aux->resolution.num_valuators * sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->resolution.num_valuators * sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* resolution_min */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->resolution.resolution_min;
+ xcb_block_len += _aux->resolution.num_valuators * sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->resolution.num_valuators * sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* resolution_max */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->resolution.resolution_max;
+ xcb_block_len += _aux->resolution.num_valuators * sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->resolution.num_valuators * sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ if(control_id == XCB_INPUT_DEVICE_CONTROL_ABS_CALIB) {
+ /* xcb_input_device_state_data_t.abs_calib.min_x */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_calib.min_x;
+ xcb_block_len += sizeof(int32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(int32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int32_t);
+ /* xcb_input_device_state_data_t.abs_calib.max_x */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_calib.max_x;
+ xcb_block_len += sizeof(int32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(int32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int32_t);
+ /* xcb_input_device_state_data_t.abs_calib.min_y */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_calib.min_y;
+ xcb_block_len += sizeof(int32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(int32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int32_t);
+ /* xcb_input_device_state_data_t.abs_calib.max_y */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_calib.max_y;
+ xcb_block_len += sizeof(int32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(int32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int32_t);
+ /* xcb_input_device_state_data_t.abs_calib.flip_x */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_calib.flip_x;
+ 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_input_device_state_data_t.abs_calib.flip_y */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_calib.flip_y;
+ 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_input_device_state_data_t.abs_calib.rotation */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_calib.rotation;
+ 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_input_device_state_data_t.abs_calib.button_threshold */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_calib.button_threshold;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ if(control_id == XCB_INPUT_DEVICE_CONTROL_CORE) {
+ /* xcb_input_device_state_data_t.core.status */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->core.status;
+ 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_input_device_state_data_t.core.iscore */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->core.iscore;
+ 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_input_device_state_data_t.core.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);
+ }
+ if(control_id == XCB_INPUT_DEVICE_CONTROL_ENABLE) {
+ /* xcb_input_device_state_data_t.enable.enable */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->enable.enable;
+ 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_input_device_state_data_t.enable.pad1 */
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_block_len += sizeof(uint8_t)*3;
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*3;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if(control_id == XCB_INPUT_DEVICE_CONTROL_ABS_AREA) {
+ /* xcb_input_device_state_data_t.abs_area.offset_x */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_area.offset_x;
+ 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_input_device_state_data_t.abs_area.offset_y */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_area.offset_y;
+ 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_input_device_state_data_t.abs_area.width */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_area.width;
+ 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_input_device_state_data_t.abs_area.height */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_area.height;
+ 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_input_device_state_data_t.abs_area.screen */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_area.screen;
+ 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_input_device_state_data_t.abs_area.following */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_area.following;
+ 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);
+ }
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 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_input_device_state_data_unpack (const void *_buffer,
+ uint16_t control_id,
+ xcb_input_device_state_data_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 = 0;
+ unsigned int xcb_padding_offset = 0;
+
+
+ if(control_id == XCB_INPUT_DEVICE_CONTROL_RESOLUTION) {
+ /* xcb_input_device_state_data_t.resolution.num_valuators */
+ _aux->resolution.num_valuators = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* resolution_values */
+ _aux->resolution.resolution_values = (uint32_t *)xcb_tmp;
+ xcb_block_len += _aux->resolution.num_valuators * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* resolution_min */
+ _aux->resolution.resolution_min = (uint32_t *)xcb_tmp;
+ xcb_block_len += _aux->resolution.num_valuators * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* resolution_max */
+ _aux->resolution.resolution_max = (uint32_t *)xcb_tmp;
+ xcb_block_len += _aux->resolution.num_valuators * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ if(control_id == XCB_INPUT_DEVICE_CONTROL_ABS_CALIB) {
+ /* xcb_input_device_state_data_t.abs_calib.min_x */
+ _aux->abs_calib.min_x = *(int32_t *)xcb_tmp;
+ xcb_block_len += sizeof(int32_t);
+ xcb_tmp += sizeof(int32_t);
+ xcb_align_to = ALIGNOF(int32_t);
+ /* xcb_input_device_state_data_t.abs_calib.max_x */
+ _aux->abs_calib.max_x = *(int32_t *)xcb_tmp;
+ xcb_block_len += sizeof(int32_t);
+ xcb_tmp += sizeof(int32_t);
+ xcb_align_to = ALIGNOF(int32_t);
+ /* xcb_input_device_state_data_t.abs_calib.min_y */
+ _aux->abs_calib.min_y = *(int32_t *)xcb_tmp;
+ xcb_block_len += sizeof(int32_t);
+ xcb_tmp += sizeof(int32_t);
+ xcb_align_to = ALIGNOF(int32_t);
+ /* xcb_input_device_state_data_t.abs_calib.max_y */
+ _aux->abs_calib.max_y = *(int32_t *)xcb_tmp;
+ xcb_block_len += sizeof(int32_t);
+ xcb_tmp += sizeof(int32_t);
+ xcb_align_to = ALIGNOF(int32_t);
+ /* xcb_input_device_state_data_t.abs_calib.flip_x */
+ _aux->abs_calib.flip_x = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_input_device_state_data_t.abs_calib.flip_y */
+ _aux->abs_calib.flip_y = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_input_device_state_data_t.abs_calib.rotation */
+ _aux->abs_calib.rotation = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_input_device_state_data_t.abs_calib.button_threshold */
+ _aux->abs_calib.button_threshold = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ if(control_id == XCB_INPUT_DEVICE_CONTROL_CORE) {
+ /* xcb_input_device_state_data_t.core.status */
+ _aux->core.status = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_device_state_data_t.core.iscore */
+ _aux->core.iscore = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_device_state_data_t.core.pad0 */
+ _aux->core.pad0[0] = *(uint8_t *)xcb_tmp;
+ _aux->core.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);
+ }
+ if(control_id == XCB_INPUT_DEVICE_CONTROL_ENABLE) {
+ /* xcb_input_device_state_data_t.enable.enable */
+ _aux->enable.enable = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_device_state_data_t.enable.pad1 */
+ _aux->enable.pad1[0] = *(uint8_t *)xcb_tmp;
+ _aux->enable.pad1[1] = *(uint8_t *)xcb_tmp;
+ _aux->enable.pad1[2] = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t) * 3;
+ xcb_tmp += sizeof(uint8_t) * 3;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if(control_id == XCB_INPUT_DEVICE_CONTROL_ABS_AREA) {
+ /* xcb_input_device_state_data_t.abs_area.offset_x */
+ _aux->abs_area.offset_x = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_input_device_state_data_t.abs_area.offset_y */
+ _aux->abs_area.offset_y = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_input_device_state_data_t.abs_area.width */
+ _aux->abs_area.width = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_input_device_state_data_t.abs_area.height */
+ _aux->abs_area.height = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_input_device_state_data_t.abs_area.screen */
+ _aux->abs_area.screen = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_input_device_state_data_t.abs_area.following */
+ _aux->abs_area.following = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_input_device_state_data_sizeof (const void *_buffer,
+ uint16_t control_id)
+{
+ xcb_input_device_state_data_t _aux;
+ return xcb_input_device_state_data_unpack(_buffer, control_id, &_aux);
+}
+
+int
+xcb_input_device_state_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_device_state_t *_aux = (xcb_input_device_state_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_device_state_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* data */
+ xcb_block_len += xcb_input_device_state_data_sizeof(xcb_tmp, _aux->control_id);
+ 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+void *
+xcb_input_device_state_data (const xcb_input_device_state_t *R)
+{
+ return (void *) (R + 1);
+}
+
+void
+xcb_input_device_state_next (xcb_input_device_state_iterator_t *i)
+{
+ xcb_input_device_state_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_input_device_state_t *)(((char *)R) + xcb_input_device_state_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_input_device_state_t *) child.data;
+}
+
+xcb_generic_iterator_t
+xcb_input_device_state_end (xcb_input_device_state_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_input_device_state_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+int
+xcb_input_get_device_control_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_get_device_control_reply_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* control */
+ xcb_block_len += xcb_input_device_state_sizeof(xcb_tmp);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_device_state_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_input_get_device_control_cookie_t
+xcb_input_get_device_control (xcb_connection_t *c,
+ uint16_t control_id,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GET_DEVICE_CONTROL,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_get_device_control_cookie_t xcb_ret;
+ xcb_input_get_device_control_request_t xcb_out;
+
+ xcb_out.control_id = control_id;
+ xcb_out.device_id = device_id;
+ xcb_out.pad0 = 0;
+
+ 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_input_get_device_control_cookie_t
+xcb_input_get_device_control_unchecked (xcb_connection_t *c,
+ uint16_t control_id,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GET_DEVICE_CONTROL,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_get_device_control_cookie_t xcb_ret;
+ xcb_input_get_device_control_request_t xcb_out;
+
+ xcb_out.control_id = control_id;
+ xcb_out.device_id = device_id;
+ xcb_out.pad0 = 0;
+
+ 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_input_device_state_t *
+xcb_input_get_device_control_control (const xcb_input_get_device_control_reply_t *R)
+{
+ return (xcb_input_device_state_t *) (R + 1);
+}
+
+xcb_input_get_device_control_reply_t *
+xcb_input_get_device_control_reply (xcb_connection_t *c,
+ xcb_input_get_device_control_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_get_device_control_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_input_device_resolution_ctl_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_device_resolution_ctl_t *_aux = (xcb_input_device_resolution_ctl_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_device_resolution_ctl_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* resolution_values */
+ xcb_block_len += _aux->num_valuators * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+}
+
+uint32_t *
+xcb_input_device_resolution_ctl_resolution_values (const xcb_input_device_resolution_ctl_t *R)
+{
+ return (uint32_t *) (R + 1);
+}
+
+int
+xcb_input_device_resolution_ctl_resolution_values_length (const xcb_input_device_resolution_ctl_t *R)
+{
+ return R->num_valuators;
+}
+
+xcb_generic_iterator_t
+xcb_input_device_resolution_ctl_resolution_values_end (const xcb_input_device_resolution_ctl_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((uint32_t *) (R + 1)) + (R->num_valuators);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+void
+xcb_input_device_resolution_ctl_next (xcb_input_device_resolution_ctl_iterator_t *i)
+{
+ xcb_input_device_resolution_ctl_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_input_device_resolution_ctl_t *)(((char *)R) + xcb_input_device_resolution_ctl_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_input_device_resolution_ctl_t *) child.data;
+}
+
+xcb_generic_iterator_t
+xcb_input_device_resolution_ctl_end (xcb_input_device_resolution_ctl_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_input_device_resolution_ctl_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+void
+xcb_input_device_abs_calib_ctl_next (xcb_input_device_abs_calib_ctl_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_device_abs_calib_ctl_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_device_abs_calib_ctl_end (xcb_input_device_abs_calib_ctl_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_input_device_abs_area_ctrl_next (xcb_input_device_abs_area_ctrl_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_device_abs_area_ctrl_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_device_abs_area_ctrl_end (xcb_input_device_abs_area_ctrl_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_input_device_core_ctrl_next (xcb_input_device_core_ctrl_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_device_core_ctrl_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_device_core_ctrl_end (xcb_input_device_core_ctrl_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_input_device_enable_ctrl_next (xcb_input_device_enable_ctrl_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_device_enable_ctrl_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_device_enable_ctrl_end (xcb_input_device_enable_ctrl_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;
+}
+
+uint32_t *
+xcb_input_device_ctl_data_resolution_resolution_values (const xcb_input_device_ctl_data_t *S)
+{
+ return S->resolution.resolution_values;
+}
+
+int
+xcb_input_device_ctl_data_resolution_resolution_values_length (const xcb_input_device_ctl_t *R,
+ const xcb_input_device_ctl_data_t *S)
+{
+ return S->resolution.num_valuators;
+}
+
+xcb_generic_iterator_t
+xcb_input_device_ctl_data_resolution_resolution_values_end (const xcb_input_device_ctl_t *R,
+ const xcb_input_device_ctl_data_t *S)
+{
+ xcb_generic_iterator_t i;
+ i.data = S->resolution.resolution_values + S->resolution.num_valuators;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+int
+xcb_input_device_ctl_data_serialize (void **_buffer,
+ uint16_t control_id,
+ const xcb_input_device_ctl_data_t *_aux)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to = 0;
+ unsigned int xcb_padding_offset = 0;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[24];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ if(control_id == XCB_INPUT_DEVICE_CONTROL_RESOLUTION) {
+ /* xcb_input_device_ctl_data_t.resolution.first_valuator */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->resolution.first_valuator;
+ 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_input_device_ctl_data_t.resolution.num_valuators */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->resolution.num_valuators;
+ 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_input_device_ctl_data_t.resolution.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);
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* resolution_values */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->resolution.resolution_values;
+ xcb_block_len += _aux->resolution.num_valuators * sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->resolution.num_valuators * sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ if(control_id == XCB_INPUT_DEVICE_CONTROL_ABS_CALIB) {
+ /* xcb_input_device_ctl_data_t.abs_calib.min_x */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_calib.min_x;
+ xcb_block_len += sizeof(int32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(int32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int32_t);
+ /* xcb_input_device_ctl_data_t.abs_calib.max_x */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_calib.max_x;
+ xcb_block_len += sizeof(int32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(int32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int32_t);
+ /* xcb_input_device_ctl_data_t.abs_calib.min_y */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_calib.min_y;
+ xcb_block_len += sizeof(int32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(int32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int32_t);
+ /* xcb_input_device_ctl_data_t.abs_calib.max_y */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_calib.max_y;
+ xcb_block_len += sizeof(int32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(int32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int32_t);
+ /* xcb_input_device_ctl_data_t.abs_calib.flip_x */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_calib.flip_x;
+ 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_input_device_ctl_data_t.abs_calib.flip_y */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_calib.flip_y;
+ 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_input_device_ctl_data_t.abs_calib.rotation */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_calib.rotation;
+ 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_input_device_ctl_data_t.abs_calib.button_threshold */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_calib.button_threshold;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ if(control_id == XCB_INPUT_DEVICE_CONTROL_CORE) {
+ /* xcb_input_device_ctl_data_t.core.status */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->core.status;
+ 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_input_device_ctl_data_t.core.pad1 */
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_block_len += sizeof(uint8_t)*3;
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*3;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if(control_id == XCB_INPUT_DEVICE_CONTROL_ENABLE) {
+ /* xcb_input_device_ctl_data_t.enable.enable */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->enable.enable;
+ 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_input_device_ctl_data_t.enable.pad2 */
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_block_len += sizeof(uint8_t)*3;
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*3;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if(control_id == XCB_INPUT_DEVICE_CONTROL_ABS_AREA) {
+ /* xcb_input_device_ctl_data_t.abs_area.offset_x */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_area.offset_x;
+ 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_input_device_ctl_data_t.abs_area.offset_y */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_area.offset_y;
+ 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_input_device_ctl_data_t.abs_area.width */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_area.width;
+ xcb_block_len += sizeof(int32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(int32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int32_t);
+ /* xcb_input_device_ctl_data_t.abs_area.height */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_area.height;
+ xcb_block_len += sizeof(int32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(int32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int32_t);
+ /* xcb_input_device_ctl_data_t.abs_area.screen */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_area.screen;
+ xcb_block_len += sizeof(int32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(int32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(int32_t);
+ /* xcb_input_device_ctl_data_t.abs_area.following */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->abs_area.following;
+ 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);
+ }
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 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_input_device_ctl_data_unpack (const void *_buffer,
+ uint16_t control_id,
+ xcb_input_device_ctl_data_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 = 0;
+ unsigned int xcb_padding_offset = 0;
+
+
+ if(control_id == XCB_INPUT_DEVICE_CONTROL_RESOLUTION) {
+ /* xcb_input_device_ctl_data_t.resolution.first_valuator */
+ _aux->resolution.first_valuator = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_device_ctl_data_t.resolution.num_valuators */
+ _aux->resolution.num_valuators = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_device_ctl_data_t.resolution.pad0 */
+ _aux->resolution.pad0[0] = *(uint8_t *)xcb_tmp;
+ _aux->resolution.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);
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* resolution_values */
+ _aux->resolution.resolution_values = (uint32_t *)xcb_tmp;
+ xcb_block_len += _aux->resolution.num_valuators * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ if(control_id == XCB_INPUT_DEVICE_CONTROL_ABS_CALIB) {
+ /* xcb_input_device_ctl_data_t.abs_calib.min_x */
+ _aux->abs_calib.min_x = *(int32_t *)xcb_tmp;
+ xcb_block_len += sizeof(int32_t);
+ xcb_tmp += sizeof(int32_t);
+ xcb_align_to = ALIGNOF(int32_t);
+ /* xcb_input_device_ctl_data_t.abs_calib.max_x */
+ _aux->abs_calib.max_x = *(int32_t *)xcb_tmp;
+ xcb_block_len += sizeof(int32_t);
+ xcb_tmp += sizeof(int32_t);
+ xcb_align_to = ALIGNOF(int32_t);
+ /* xcb_input_device_ctl_data_t.abs_calib.min_y */
+ _aux->abs_calib.min_y = *(int32_t *)xcb_tmp;
+ xcb_block_len += sizeof(int32_t);
+ xcb_tmp += sizeof(int32_t);
+ xcb_align_to = ALIGNOF(int32_t);
+ /* xcb_input_device_ctl_data_t.abs_calib.max_y */
+ _aux->abs_calib.max_y = *(int32_t *)xcb_tmp;
+ xcb_block_len += sizeof(int32_t);
+ xcb_tmp += sizeof(int32_t);
+ xcb_align_to = ALIGNOF(int32_t);
+ /* xcb_input_device_ctl_data_t.abs_calib.flip_x */
+ _aux->abs_calib.flip_x = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_input_device_ctl_data_t.abs_calib.flip_y */
+ _aux->abs_calib.flip_y = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_input_device_ctl_data_t.abs_calib.rotation */
+ _aux->abs_calib.rotation = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_input_device_ctl_data_t.abs_calib.button_threshold */
+ _aux->abs_calib.button_threshold = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ if(control_id == XCB_INPUT_DEVICE_CONTROL_CORE) {
+ /* xcb_input_device_ctl_data_t.core.status */
+ _aux->core.status = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_device_ctl_data_t.core.pad1 */
+ _aux->core.pad1[0] = *(uint8_t *)xcb_tmp;
+ _aux->core.pad1[1] = *(uint8_t *)xcb_tmp;
+ _aux->core.pad1[2] = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t) * 3;
+ xcb_tmp += sizeof(uint8_t) * 3;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if(control_id == XCB_INPUT_DEVICE_CONTROL_ENABLE) {
+ /* xcb_input_device_ctl_data_t.enable.enable */
+ _aux->enable.enable = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_device_ctl_data_t.enable.pad2 */
+ _aux->enable.pad2[0] = *(uint8_t *)xcb_tmp;
+ _aux->enable.pad2[1] = *(uint8_t *)xcb_tmp;
+ _aux->enable.pad2[2] = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t) * 3;
+ xcb_tmp += sizeof(uint8_t) * 3;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if(control_id == XCB_INPUT_DEVICE_CONTROL_ABS_AREA) {
+ /* xcb_input_device_ctl_data_t.abs_area.offset_x */
+ _aux->abs_area.offset_x = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_input_device_ctl_data_t.abs_area.offset_y */
+ _aux->abs_area.offset_y = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_input_device_ctl_data_t.abs_area.width */
+ _aux->abs_area.width = *(int32_t *)xcb_tmp;
+ xcb_block_len += sizeof(int32_t);
+ xcb_tmp += sizeof(int32_t);
+ xcb_align_to = ALIGNOF(int32_t);
+ /* xcb_input_device_ctl_data_t.abs_area.height */
+ _aux->abs_area.height = *(int32_t *)xcb_tmp;
+ xcb_block_len += sizeof(int32_t);
+ xcb_tmp += sizeof(int32_t);
+ xcb_align_to = ALIGNOF(int32_t);
+ /* xcb_input_device_ctl_data_t.abs_area.screen */
+ _aux->abs_area.screen = *(int32_t *)xcb_tmp;
+ xcb_block_len += sizeof(int32_t);
+ xcb_tmp += sizeof(int32_t);
+ xcb_align_to = ALIGNOF(int32_t);
+ /* xcb_input_device_ctl_data_t.abs_area.following */
+ _aux->abs_area.following = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_input_device_ctl_data_sizeof (const void *_buffer,
+ uint16_t control_id)
+{
+ xcb_input_device_ctl_data_t _aux;
+ return xcb_input_device_ctl_data_unpack(_buffer, control_id, &_aux);
+}
+
+int
+xcb_input_device_ctl_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_device_ctl_t *_aux = (xcb_input_device_ctl_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_device_ctl_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* data */
+ xcb_block_len += xcb_input_device_ctl_data_sizeof(xcb_tmp, _aux->control_id);
+ 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+void *
+xcb_input_device_ctl_data (const xcb_input_device_ctl_t *R)
+{
+ return (void *) (R + 1);
+}
+
+void
+xcb_input_device_ctl_next (xcb_input_device_ctl_iterator_t *i)
+{
+ xcb_input_device_ctl_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_input_device_ctl_t *)(((char *)R) + xcb_input_device_ctl_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_input_device_ctl_t *) child.data;
+}
+
+xcb_generic_iterator_t
+xcb_input_device_ctl_end (xcb_input_device_ctl_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_input_device_ctl_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+int
+xcb_input_change_device_control_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_change_device_control_request_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* control */
+ xcb_block_len += xcb_input_device_ctl_sizeof(xcb_tmp);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_device_ctl_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_input_change_device_control_cookie_t
+xcb_input_change_device_control (xcb_connection_t *c,
+ uint16_t control_id,
+ uint8_t device_id,
+ xcb_input_device_ctl_t *control)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_CHANGE_DEVICE_CONTROL,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_input_change_device_control_cookie_t xcb_ret;
+ xcb_input_change_device_control_request_t xcb_out;
+
+ xcb_out.control_id = control_id;
+ xcb_out.device_id = device_id;
+ xcb_out.pad0 = 0;
+
+ 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_input_device_ctl_t control */
+ xcb_parts[4].iov_base = (char *) control;
+ xcb_parts[4].iov_len =
+ xcb_input_device_ctl_sizeof (control);
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_change_device_control_cookie_t
+xcb_input_change_device_control_unchecked (xcb_connection_t *c,
+ uint16_t control_id,
+ uint8_t device_id,
+ xcb_input_device_ctl_t *control)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_CHANGE_DEVICE_CONTROL,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_input_change_device_control_cookie_t xcb_ret;
+ xcb_input_change_device_control_request_t xcb_out;
+
+ xcb_out.control_id = control_id;
+ xcb_out.device_id = device_id;
+ xcb_out.pad0 = 0;
+
+ 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_input_device_ctl_t control */
+ xcb_parts[4].iov_base = (char *) control;
+ xcb_parts[4].iov_len =
+ xcb_input_device_ctl_sizeof (control);
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_change_device_control_reply_t *
+xcb_input_change_device_control_reply (xcb_connection_t *c,
+ xcb_input_change_device_control_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_change_device_control_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_input_list_device_properties_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_list_device_properties_reply_t *_aux = (xcb_input_list_device_properties_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_list_device_properties_reply_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* atoms */
+ xcb_block_len += _aux->num_atoms * 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;
+}
+
+xcb_input_list_device_properties_cookie_t
+xcb_input_list_device_properties (xcb_connection_t *c,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_LIST_DEVICE_PROPERTIES,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_list_device_properties_cookie_t xcb_ret;
+ xcb_input_list_device_properties_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 3);
+
+ 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_input_list_device_properties_cookie_t
+xcb_input_list_device_properties_unchecked (xcb_connection_t *c,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_LIST_DEVICE_PROPERTIES,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_list_device_properties_cookie_t xcb_ret;
+ xcb_input_list_device_properties_request_t xcb_out;
+
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 3);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_atom_t *
+xcb_input_list_device_properties_atoms (const xcb_input_list_device_properties_reply_t *R)
+{
+ return (xcb_atom_t *) (R + 1);
+}
+
+int
+xcb_input_list_device_properties_atoms_length (const xcb_input_list_device_properties_reply_t *R)
+{
+ return R->num_atoms;
+}
+
+xcb_generic_iterator_t
+xcb_input_list_device_properties_atoms_end (const xcb_input_list_device_properties_reply_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((xcb_atom_t *) (R + 1)) + (R->num_atoms);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_list_device_properties_reply_t *
+xcb_input_list_device_properties_reply (xcb_connection_t *c,
+ xcb_input_list_device_properties_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_list_device_properties_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+uint8_t *
+xcb_input_change_device_property_items_data_8 (const xcb_input_change_device_property_items_t *S)
+{
+ return S->data8;
+}
+
+int
+xcb_input_change_device_property_items_data_8_length (const xcb_input_change_device_property_request_t *R,
+ const xcb_input_change_device_property_items_t *S)
+{
+ return R->num_items;
+}
+
+xcb_generic_iterator_t
+xcb_input_change_device_property_items_data_8_end (const xcb_input_change_device_property_request_t *R,
+ const xcb_input_change_device_property_items_t *S)
+{
+ xcb_generic_iterator_t i;
+ i.data = S->data8 + R->num_items;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+uint16_t *
+xcb_input_change_device_property_items_data_16 (const xcb_input_change_device_property_items_t *S)
+{
+ return S->data16;
+}
+
+int
+xcb_input_change_device_property_items_data_16_length (const xcb_input_change_device_property_request_t *R,
+ const xcb_input_change_device_property_items_t *S)
+{
+ return R->num_items;
+}
+
+xcb_generic_iterator_t
+xcb_input_change_device_property_items_data_16_end (const xcb_input_change_device_property_request_t *R,
+ const xcb_input_change_device_property_items_t *S)
+{
+ xcb_generic_iterator_t i;
+ i.data = S->data16 + R->num_items;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+uint32_t *
+xcb_input_change_device_property_items_data_32 (const xcb_input_change_device_property_items_t *S)
+{
+ return S->data32;
+}
+
+int
+xcb_input_change_device_property_items_data_32_length (const xcb_input_change_device_property_request_t *R,
+ const xcb_input_change_device_property_items_t *S)
+{
+ return R->num_items;
+}
+
+xcb_generic_iterator_t
+xcb_input_change_device_property_items_data_32_end (const xcb_input_change_device_property_request_t *R,
+ const xcb_input_change_device_property_items_t *S)
+{
+ xcb_generic_iterator_t i;
+ i.data = S->data32 + R->num_items;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+int
+xcb_input_change_device_property_items_serialize (void **_buffer,
+ uint32_t num_items,
+ uint8_t format,
+ const xcb_input_change_device_property_items_t *_aux)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to = 0;
+ unsigned int xcb_padding_offset = 0;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[9];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ if(format == XCB_INPUT_PROPERTY_FORMAT_8_BITS) {
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* data8 */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->data8;
+ xcb_block_len += num_items * sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = num_items * sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ xcb_align_to = 4;
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ }
+ if(format == XCB_INPUT_PROPERTY_FORMAT_16_BITS) {
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* data16 */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->data16;
+ xcb_block_len += num_items * sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = num_items * sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ xcb_align_to = 4;
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ }
+ if(format == XCB_INPUT_PROPERTY_FORMAT_32_BITS) {
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* data32 */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->data32;
+ xcb_block_len += num_items * sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = num_items * sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 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_input_change_device_property_items_unpack (const void *_buffer,
+ uint32_t num_items,
+ uint8_t format,
+ xcb_input_change_device_property_items_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 = 0;
+ unsigned int xcb_padding_offset = 0;
+
+
+ if(format == XCB_INPUT_PROPERTY_FORMAT_8_BITS) {
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* data8 */
+ _aux->data8 = (uint8_t *)xcb_tmp;
+ xcb_block_len += num_items * sizeof(uint8_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint8_t);
+ xcb_align_to = 4;
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ }
+ if(format == XCB_INPUT_PROPERTY_FORMAT_16_BITS) {
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* data16 */
+ _aux->data16 = (uint16_t *)xcb_tmp;
+ xcb_block_len += num_items * sizeof(uint16_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint16_t);
+ xcb_align_to = 4;
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ }
+ if(format == XCB_INPUT_PROPERTY_FORMAT_32_BITS) {
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* data32 */
+ _aux->data32 = (uint32_t *)xcb_tmp;
+ xcb_block_len += num_items * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_input_change_device_property_items_sizeof (const void *_buffer,
+ uint32_t num_items,
+ uint8_t format)
+{
+ xcb_input_change_device_property_items_t _aux;
+ return xcb_input_change_device_property_items_unpack(_buffer, num_items, format, &_aux);
+}
+
+int
+xcb_input_change_device_property_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_change_device_property_request_t *_aux = (xcb_input_change_device_property_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_change_device_property_request_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* items */
+ xcb_block_len += xcb_input_change_device_property_items_sizeof(xcb_tmp, _aux->num_items, _aux->format);
+ 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+xcb_void_cookie_t
+xcb_input_change_device_property_checked (xcb_connection_t *c,
+ xcb_atom_t property,
+ xcb_atom_t type,
+ uint8_t device_id,
+ uint8_t format,
+ uint8_t mode,
+ uint32_t num_items,
+ const void *items)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 3,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_CHANGE_DEVICE_PROPERTY,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[5];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_change_device_property_request_t xcb_out;
+
+ xcb_out.property = property;
+ xcb_out.type = type;
+ xcb_out.device_id = device_id;
+ xcb_out.format = format;
+ xcb_out.mode = mode;
+ xcb_out.pad0 = 0;
+ xcb_out.num_items = num_items;
+
+ 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_input_change_device_property_items_t items */
+ xcb_parts[4].iov_base = (char *) items;
+ xcb_parts[4].iov_len =
+ xcb_input_change_device_property_items_sizeof (items, num_items, format);
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_change_device_property (xcb_connection_t *c,
+ xcb_atom_t property,
+ xcb_atom_t type,
+ uint8_t device_id,
+ uint8_t format,
+ uint8_t mode,
+ uint32_t num_items,
+ const void *items)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 3,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_CHANGE_DEVICE_PROPERTY,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[5];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_change_device_property_request_t xcb_out;
+
+ xcb_out.property = property;
+ xcb_out.type = type;
+ xcb_out.device_id = device_id;
+ xcb_out.format = format;
+ xcb_out.mode = mode;
+ xcb_out.pad0 = 0;
+ xcb_out.num_items = num_items;
+
+ 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_input_change_device_property_items_t items */
+ xcb_parts[4].iov_base = (char *) items;
+ xcb_parts[4].iov_len =
+ xcb_input_change_device_property_items_sizeof (items, num_items, format);
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_change_device_property_aux_checked (xcb_connection_t *c,
+ xcb_atom_t property,
+ xcb_atom_t type,
+ uint8_t device_id,
+ uint8_t format,
+ uint8_t mode,
+ uint32_t num_items,
+ const xcb_input_change_device_property_items_t *items)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 3,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_CHANGE_DEVICE_PROPERTY,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[5];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_change_device_property_request_t xcb_out;
+ void *xcb_aux0 = 0;
+
+ xcb_out.property = property;
+ xcb_out.type = type;
+ xcb_out.device_id = device_id;
+ xcb_out.format = format;
+ xcb_out.mode = mode;
+ xcb_out.pad0 = 0;
+ xcb_out.num_items = num_items;
+
+ 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_input_change_device_property_items_t items */
+ xcb_parts[4].iov_len =
+ xcb_input_change_device_property_items_serialize (&xcb_aux0, num_items, format, items);
+ xcb_parts[4].iov_base = xcb_aux0;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ free(xcb_aux0);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_change_device_property_aux (xcb_connection_t *c,
+ xcb_atom_t property,
+ xcb_atom_t type,
+ uint8_t device_id,
+ uint8_t format,
+ uint8_t mode,
+ uint32_t num_items,
+ const xcb_input_change_device_property_items_t *items)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 3,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_CHANGE_DEVICE_PROPERTY,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[5];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_change_device_property_request_t xcb_out;
+ void *xcb_aux0 = 0;
+
+ xcb_out.property = property;
+ xcb_out.type = type;
+ xcb_out.device_id = device_id;
+ xcb_out.format = format;
+ xcb_out.mode = mode;
+ xcb_out.pad0 = 0;
+ xcb_out.num_items = num_items;
+
+ 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_input_change_device_property_items_t items */
+ xcb_parts[4].iov_len =
+ xcb_input_change_device_property_items_serialize (&xcb_aux0, num_items, format, items);
+ xcb_parts[4].iov_base = xcb_aux0;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ free(xcb_aux0);
+ return xcb_ret;
+}
+
+void *
+xcb_input_change_device_property_items (const xcb_input_change_device_property_request_t *R)
+{
+ return (void *) (R + 1);
+}
+
+xcb_void_cookie_t
+xcb_input_delete_device_property_checked (xcb_connection_t *c,
+ xcb_atom_t property,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_DELETE_DEVICE_PROPERTY,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_delete_device_property_request_t xcb_out;
+
+ xcb_out.property = property;
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 3);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_delete_device_property (xcb_connection_t *c,
+ xcb_atom_t property,
+ uint8_t device_id)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_DELETE_DEVICE_PROPERTY,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_delete_device_property_request_t xcb_out;
+
+ xcb_out.property = property;
+ xcb_out.device_id = device_id;
+ memset(xcb_out.pad0, 0, 3);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+uint8_t *
+xcb_input_get_device_property_items_data_8 (const xcb_input_get_device_property_items_t *S)
+{
+ return S->data8;
+}
+
+int
+xcb_input_get_device_property_items_data_8_length (const xcb_input_get_device_property_reply_t *R,
+ const xcb_input_get_device_property_items_t *S)
+{
+ return R->num_items;
+}
+
+xcb_generic_iterator_t
+xcb_input_get_device_property_items_data_8_end (const xcb_input_get_device_property_reply_t *R,
+ const xcb_input_get_device_property_items_t *S)
+{
+ xcb_generic_iterator_t i;
+ i.data = S->data8 + R->num_items;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+uint16_t *
+xcb_input_get_device_property_items_data_16 (const xcb_input_get_device_property_items_t *S)
+{
+ return S->data16;
+}
+
+int
+xcb_input_get_device_property_items_data_16_length (const xcb_input_get_device_property_reply_t *R,
+ const xcb_input_get_device_property_items_t *S)
+{
+ return R->num_items;
+}
+
+xcb_generic_iterator_t
+xcb_input_get_device_property_items_data_16_end (const xcb_input_get_device_property_reply_t *R,
+ const xcb_input_get_device_property_items_t *S)
+{
+ xcb_generic_iterator_t i;
+ i.data = S->data16 + R->num_items;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+uint32_t *
+xcb_input_get_device_property_items_data_32 (const xcb_input_get_device_property_items_t *S)
+{
+ return S->data32;
+}
+
+int
+xcb_input_get_device_property_items_data_32_length (const xcb_input_get_device_property_reply_t *R,
+ const xcb_input_get_device_property_items_t *S)
+{
+ return R->num_items;
+}
+
+xcb_generic_iterator_t
+xcb_input_get_device_property_items_data_32_end (const xcb_input_get_device_property_reply_t *R,
+ const xcb_input_get_device_property_items_t *S)
+{
+ xcb_generic_iterator_t i;
+ i.data = S->data32 + R->num_items;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+int
+xcb_input_get_device_property_items_serialize (void **_buffer,
+ uint32_t num_items,
+ uint8_t format,
+ const xcb_input_get_device_property_items_t *_aux)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to = 0;
+ unsigned int xcb_padding_offset = 0;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[9];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ if(format == XCB_INPUT_PROPERTY_FORMAT_8_BITS) {
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* data8 */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->data8;
+ xcb_block_len += num_items * sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = num_items * sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ xcb_align_to = 4;
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ }
+ if(format == XCB_INPUT_PROPERTY_FORMAT_16_BITS) {
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* data16 */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->data16;
+ xcb_block_len += num_items * sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = num_items * sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ xcb_align_to = 4;
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ }
+ if(format == XCB_INPUT_PROPERTY_FORMAT_32_BITS) {
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* data32 */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->data32;
+ xcb_block_len += num_items * sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = num_items * sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 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_input_get_device_property_items_unpack (const void *_buffer,
+ uint32_t num_items,
+ uint8_t format,
+ xcb_input_get_device_property_items_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 = 0;
+ unsigned int xcb_padding_offset = 0;
+
+
+ if(format == XCB_INPUT_PROPERTY_FORMAT_8_BITS) {
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* data8 */
+ _aux->data8 = (uint8_t *)xcb_tmp;
+ xcb_block_len += num_items * sizeof(uint8_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint8_t);
+ xcb_align_to = 4;
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ }
+ if(format == XCB_INPUT_PROPERTY_FORMAT_16_BITS) {
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* data16 */
+ _aux->data16 = (uint16_t *)xcb_tmp;
+ xcb_block_len += num_items * sizeof(uint16_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint16_t);
+ xcb_align_to = 4;
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ }
+ if(format == XCB_INPUT_PROPERTY_FORMAT_32_BITS) {
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* data32 */
+ _aux->data32 = (uint32_t *)xcb_tmp;
+ xcb_block_len += num_items * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_input_get_device_property_items_sizeof (const void *_buffer,
+ uint32_t num_items,
+ uint8_t format)
+{
+ xcb_input_get_device_property_items_t _aux;
+ return xcb_input_get_device_property_items_unpack(_buffer, num_items, format, &_aux);
+}
+
+int
+xcb_input_get_device_property_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_get_device_property_reply_t *_aux = (xcb_input_get_device_property_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_get_device_property_reply_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* items */
+ xcb_block_len += xcb_input_get_device_property_items_sizeof(xcb_tmp, _aux->num_items, _aux->format);
+ 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+xcb_input_get_device_property_cookie_t
+xcb_input_get_device_property (xcb_connection_t *c,
+ xcb_atom_t property,
+ xcb_atom_t type,
+ uint32_t offset,
+ uint32_t len,
+ uint8_t device_id,
+ uint8_t _delete)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GET_DEVICE_PROPERTY,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_get_device_property_cookie_t xcb_ret;
+ xcb_input_get_device_property_request_t xcb_out;
+
+ xcb_out.property = property;
+ xcb_out.type = type;
+ xcb_out.offset = offset;
+ xcb_out.len = len;
+ xcb_out.device_id = device_id;
+ xcb_out._delete = _delete;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_get_device_property_cookie_t
+xcb_input_get_device_property_unchecked (xcb_connection_t *c,
+ xcb_atom_t property,
+ xcb_atom_t type,
+ uint32_t offset,
+ uint32_t len,
+ uint8_t device_id,
+ uint8_t _delete)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_GET_DEVICE_PROPERTY,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_get_device_property_cookie_t xcb_ret;
+ xcb_input_get_device_property_request_t xcb_out;
+
+ xcb_out.property = property;
+ xcb_out.type = type;
+ xcb_out.offset = offset;
+ xcb_out.len = len;
+ xcb_out.device_id = device_id;
+ xcb_out._delete = _delete;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+void *
+xcb_input_get_device_property_items (const xcb_input_get_device_property_reply_t *R)
+{
+ return (void *) (R + 1);
+}
+
+xcb_input_get_device_property_reply_t *
+xcb_input_get_device_property_reply (xcb_connection_t *c,
+ xcb_input_get_device_property_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_get_device_property_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+void
+xcb_input_group_info_next (xcb_input_group_info_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_group_info_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_group_info_end (xcb_input_group_info_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_input_modifier_info_next (xcb_input_modifier_info_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_modifier_info_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_modifier_info_end (xcb_input_modifier_info_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_input_xi_query_pointer_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_xi_query_pointer_reply_t *_aux = (xcb_input_xi_query_pointer_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_xi_query_pointer_reply_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* buttons */
+ xcb_block_len += _aux->buttons_len * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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_input_xi_query_pointer_cookie_t
+xcb_input_xi_query_pointer (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_input_device_id_t deviceid)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_QUERY_POINTER,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_xi_query_pointer_cookie_t xcb_ret;
+ xcb_input_xi_query_pointer_request_t xcb_out;
+
+ xcb_out.window = window;
+ xcb_out.deviceid = deviceid;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_xi_query_pointer_cookie_t
+xcb_input_xi_query_pointer_unchecked (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_input_device_id_t deviceid)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_QUERY_POINTER,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_xi_query_pointer_cookie_t xcb_ret;
+ xcb_input_xi_query_pointer_request_t xcb_out;
+
+ xcb_out.window = window;
+ xcb_out.deviceid = deviceid;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+uint32_t *
+xcb_input_xi_query_pointer_buttons (const xcb_input_xi_query_pointer_reply_t *R)
+{
+ return (uint32_t *) (R + 1);
+}
+
+int
+xcb_input_xi_query_pointer_buttons_length (const xcb_input_xi_query_pointer_reply_t *R)
+{
+ return R->buttons_len;
+}
+
+xcb_generic_iterator_t
+xcb_input_xi_query_pointer_buttons_end (const xcb_input_xi_query_pointer_reply_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((uint32_t *) (R + 1)) + (R->buttons_len);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_xi_query_pointer_reply_t *
+xcb_input_xi_query_pointer_reply (xcb_connection_t *c,
+ xcb_input_xi_query_pointer_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_xi_query_pointer_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+xcb_void_cookie_t
+xcb_input_xi_warp_pointer_checked (xcb_connection_t *c,
+ xcb_window_t src_win,
+ xcb_window_t dst_win,
+ xcb_input_fp1616_t src_x,
+ xcb_input_fp1616_t src_y,
+ uint16_t src_width,
+ uint16_t src_height,
+ xcb_input_fp1616_t dst_x,
+ xcb_input_fp1616_t dst_y,
+ xcb_input_device_id_t deviceid)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_WARP_POINTER,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_xi_warp_pointer_request_t xcb_out;
+
+ xcb_out.src_win = src_win;
+ xcb_out.dst_win = dst_win;
+ xcb_out.src_x = src_x;
+ xcb_out.src_y = src_y;
+ xcb_out.src_width = src_width;
+ xcb_out.src_height = src_height;
+ xcb_out.dst_x = dst_x;
+ xcb_out.dst_y = dst_y;
+ xcb_out.deviceid = deviceid;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_xi_warp_pointer (xcb_connection_t *c,
+ xcb_window_t src_win,
+ xcb_window_t dst_win,
+ xcb_input_fp1616_t src_x,
+ xcb_input_fp1616_t src_y,
+ uint16_t src_width,
+ uint16_t src_height,
+ xcb_input_fp1616_t dst_x,
+ xcb_input_fp1616_t dst_y,
+ xcb_input_device_id_t deviceid)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_WARP_POINTER,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_xi_warp_pointer_request_t xcb_out;
+
+ xcb_out.src_win = src_win;
+ xcb_out.dst_win = dst_win;
+ xcb_out.src_x = src_x;
+ xcb_out.src_y = src_y;
+ xcb_out.src_width = src_width;
+ xcb_out.src_height = src_height;
+ xcb_out.dst_x = dst_x;
+ xcb_out.dst_y = dst_y;
+ xcb_out.deviceid = deviceid;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_xi_change_cursor_checked (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_cursor_t cursor,
+ xcb_input_device_id_t deviceid)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_CHANGE_CURSOR,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_xi_change_cursor_request_t xcb_out;
+
+ xcb_out.window = window;
+ xcb_out.cursor = cursor;
+ xcb_out.deviceid = deviceid;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_xi_change_cursor (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_cursor_t cursor,
+ xcb_input_device_id_t deviceid)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_CHANGE_CURSOR,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_xi_change_cursor_request_t xcb_out;
+
+ xcb_out.window = window;
+ xcb_out.cursor = cursor;
+ xcb_out.deviceid = deviceid;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+int
+xcb_input_add_master_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_add_master_t *_aux = (xcb_input_add_master_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_add_master_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* name */
+ xcb_block_len += _aux->name_len * sizeof(char);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(char);
+ xcb_align_to = 4;
+ /* 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;
+ /* 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;
+}
+
+char *
+xcb_input_add_master_name (const xcb_input_add_master_t *R)
+{
+ return (char *) (R + 1);
+}
+
+int
+xcb_input_add_master_name_length (const xcb_input_add_master_t *R)
+{
+ return R->name_len;
+}
+
+xcb_generic_iterator_t
+xcb_input_add_master_name_end (const xcb_input_add_master_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((char *) (R + 1)) + (R->name_len);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+void
+xcb_input_add_master_next (xcb_input_add_master_iterator_t *i)
+{
+ xcb_input_add_master_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_input_add_master_t *)(((char *)R) + xcb_input_add_master_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_input_add_master_t *) child.data;
+}
+
+xcb_generic_iterator_t
+xcb_input_add_master_end (xcb_input_add_master_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_input_add_master_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+void
+xcb_input_remove_master_next (xcb_input_remove_master_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_remove_master_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_remove_master_end (xcb_input_remove_master_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_input_attach_slave_next (xcb_input_attach_slave_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_attach_slave_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_attach_slave_end (xcb_input_attach_slave_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_input_detach_slave_next (xcb_input_detach_slave_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_detach_slave_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_detach_slave_end (xcb_input_detach_slave_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;
+}
+
+char *
+xcb_input_hierarchy_change_data_add_master_name (const xcb_input_hierarchy_change_data_t *S)
+{
+ return S->add_master.name;
+}
+
+int
+xcb_input_hierarchy_change_data_add_master_name_length (const xcb_input_hierarchy_change_t *R,
+ const xcb_input_hierarchy_change_data_t *S)
+{
+ return S->add_master.name_len;
+}
+
+xcb_generic_iterator_t
+xcb_input_hierarchy_change_data_add_master_name_end (const xcb_input_hierarchy_change_t *R,
+ const xcb_input_hierarchy_change_data_t *S)
+{
+ xcb_generic_iterator_t i;
+ i.data = S->add_master.name + S->add_master.name_len;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+int
+xcb_input_hierarchy_change_data_serialize (void **_buffer,
+ uint16_t type,
+ const xcb_input_hierarchy_change_data_t *_aux)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to = 0;
+ unsigned int xcb_padding_offset = 0;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[16];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ if(type == XCB_INPUT_HIERARCHY_CHANGE_TYPE_ADD_MASTER) {
+ /* xcb_input_hierarchy_change_data_t.add_master.name_len */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->add_master.name_len;
+ 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_input_hierarchy_change_data_t.add_master.send_core */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->add_master.send_core;
+ 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_input_hierarchy_change_data_t.add_master.enable */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->add_master.enable;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* name */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->add_master.name;
+ xcb_block_len += _aux->add_master.name_len * sizeof(char);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->add_master.name_len * sizeof(char);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(char);
+ xcb_align_to = 4;
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ }
+ if(type == XCB_INPUT_HIERARCHY_CHANGE_TYPE_REMOVE_MASTER) {
+ /* xcb_input_hierarchy_change_data_t.remove_master.deviceid */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->remove_master.deviceid;
+ xcb_block_len += sizeof(xcb_input_device_id_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_input_device_id_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_input_device_id_t);
+ /* xcb_input_hierarchy_change_data_t.remove_master.return_mode */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->remove_master.return_mode;
+ 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_input_hierarchy_change_data_t.remove_master.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_input_hierarchy_change_data_t.remove_master.return_pointer */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->remove_master.return_pointer;
+ xcb_block_len += sizeof(xcb_input_device_id_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_input_device_id_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_input_device_id_t);
+ /* xcb_input_hierarchy_change_data_t.remove_master.return_keyboard */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->remove_master.return_keyboard;
+ xcb_block_len += sizeof(xcb_input_device_id_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_input_device_id_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_input_device_id_t);
+ }
+ if(type == XCB_INPUT_HIERARCHY_CHANGE_TYPE_ATTACH_SLAVE) {
+ /* xcb_input_hierarchy_change_data_t.attach_slave.deviceid */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->attach_slave.deviceid;
+ xcb_block_len += sizeof(xcb_input_device_id_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_input_device_id_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_input_device_id_t);
+ /* xcb_input_hierarchy_change_data_t.attach_slave.master */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->attach_slave.master;
+ xcb_block_len += sizeof(xcb_input_device_id_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_input_device_id_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_input_device_id_t);
+ }
+ if(type == XCB_INPUT_HIERARCHY_CHANGE_TYPE_DETACH_SLAVE) {
+ /* xcb_input_hierarchy_change_data_t.detach_slave.deviceid */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->detach_slave.deviceid;
+ xcb_block_len += sizeof(xcb_input_device_id_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_input_device_id_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_input_device_id_t);
+ /* xcb_input_hierarchy_change_data_t.detach_slave.pad2 */
+ 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);
+ }
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 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_input_hierarchy_change_data_unpack (const void *_buffer,
+ uint16_t type,
+ xcb_input_hierarchy_change_data_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 = 0;
+ unsigned int xcb_padding_offset = 0;
+
+
+ if(type == XCB_INPUT_HIERARCHY_CHANGE_TYPE_ADD_MASTER) {
+ /* xcb_input_hierarchy_change_data_t.add_master.name_len */
+ _aux->add_master.name_len = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_input_hierarchy_change_data_t.add_master.send_core */
+ _aux->add_master.send_core = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_hierarchy_change_data_t.add_master.enable */
+ _aux->add_master.enable = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* name */
+ _aux->add_master.name = (char *)xcb_tmp;
+ xcb_block_len += _aux->add_master.name_len * sizeof(char);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(char);
+ xcb_align_to = 4;
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ }
+ if(type == XCB_INPUT_HIERARCHY_CHANGE_TYPE_REMOVE_MASTER) {
+ /* xcb_input_hierarchy_change_data_t.remove_master.deviceid */
+ _aux->remove_master.deviceid = *(xcb_input_device_id_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_input_device_id_t);
+ xcb_tmp += sizeof(xcb_input_device_id_t);
+ xcb_align_to = ALIGNOF(xcb_input_device_id_t);
+ /* xcb_input_hierarchy_change_data_t.remove_master.return_mode */
+ _aux->remove_master.return_mode = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_hierarchy_change_data_t.remove_master.pad1 */
+ _aux->remove_master.pad1 = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_hierarchy_change_data_t.remove_master.return_pointer */
+ _aux->remove_master.return_pointer = *(xcb_input_device_id_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_input_device_id_t);
+ xcb_tmp += sizeof(xcb_input_device_id_t);
+ xcb_align_to = ALIGNOF(xcb_input_device_id_t);
+ /* xcb_input_hierarchy_change_data_t.remove_master.return_keyboard */
+ _aux->remove_master.return_keyboard = *(xcb_input_device_id_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_input_device_id_t);
+ xcb_tmp += sizeof(xcb_input_device_id_t);
+ xcb_align_to = ALIGNOF(xcb_input_device_id_t);
+ }
+ if(type == XCB_INPUT_HIERARCHY_CHANGE_TYPE_ATTACH_SLAVE) {
+ /* xcb_input_hierarchy_change_data_t.attach_slave.deviceid */
+ _aux->attach_slave.deviceid = *(xcb_input_device_id_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_input_device_id_t);
+ xcb_tmp += sizeof(xcb_input_device_id_t);
+ xcb_align_to = ALIGNOF(xcb_input_device_id_t);
+ /* xcb_input_hierarchy_change_data_t.attach_slave.master */
+ _aux->attach_slave.master = *(xcb_input_device_id_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_input_device_id_t);
+ xcb_tmp += sizeof(xcb_input_device_id_t);
+ xcb_align_to = ALIGNOF(xcb_input_device_id_t);
+ }
+ if(type == XCB_INPUT_HIERARCHY_CHANGE_TYPE_DETACH_SLAVE) {
+ /* xcb_input_hierarchy_change_data_t.detach_slave.deviceid */
+ _aux->detach_slave.deviceid = *(xcb_input_device_id_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_input_device_id_t);
+ xcb_tmp += sizeof(xcb_input_device_id_t);
+ xcb_align_to = ALIGNOF(xcb_input_device_id_t);
+ /* xcb_input_hierarchy_change_data_t.detach_slave.pad2 */
+ _aux->detach_slave.pad2[0] = *(uint8_t *)xcb_tmp;
+ _aux->detach_slave.pad2[1] = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t) * 2;
+ xcb_tmp += sizeof(uint8_t) * 2;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_input_hierarchy_change_data_sizeof (const void *_buffer,
+ uint16_t type)
+{
+ xcb_input_hierarchy_change_data_t _aux;
+ return xcb_input_hierarchy_change_data_unpack(_buffer, type, &_aux);
+}
+
+int
+xcb_input_hierarchy_change_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_hierarchy_change_t *_aux = (xcb_input_hierarchy_change_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_hierarchy_change_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* data */
+ xcb_block_len += xcb_input_hierarchy_change_data_sizeof(xcb_tmp, _aux->type);
+ 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+void *
+xcb_input_hierarchy_change_data (const xcb_input_hierarchy_change_t *R)
+{
+ return (void *) (R + 1);
+}
+
+void
+xcb_input_hierarchy_change_next (xcb_input_hierarchy_change_iterator_t *i)
+{
+ xcb_input_hierarchy_change_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_input_hierarchy_change_t *)(((char *)R) + xcb_input_hierarchy_change_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_input_hierarchy_change_t *) child.data;
+}
+
+xcb_generic_iterator_t
+xcb_input_hierarchy_change_end (xcb_input_hierarchy_change_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_input_hierarchy_change_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+int
+xcb_input_xi_change_hierarchy_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_xi_change_hierarchy_request_t *_aux = (xcb_input_xi_change_hierarchy_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 = 0;
+
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+
+ xcb_block_len += sizeof(xcb_input_xi_change_hierarchy_request_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* changes */
+ for(i=0; i<_aux->num_changes; i++) {
+ xcb_tmp_len = xcb_input_hierarchy_change_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_input_hierarchy_change_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_input_xi_change_hierarchy_checked (xcb_connection_t *c,
+ uint8_t num_changes,
+ const xcb_input_hierarchy_change_t *changes)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_CHANGE_HIERARCHY,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_xi_change_hierarchy_request_t xcb_out;
+ unsigned int xcb_tmp_len;
+ char *xcb_tmp;
+ unsigned int i;
+
+ xcb_out.num_changes = num_changes;
+ memset(xcb_out.pad0, 0, 3);
+
+ 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_input_hierarchy_change_t changes */
+ xcb_parts[4].iov_base = (char *) changes;
+ xcb_parts[4].iov_len = 0;
+ xcb_tmp = (char *)changes;
+ for(i=0; i<num_changes; i++) {
+ xcb_tmp_len = xcb_input_hierarchy_change_sizeof(xcb_tmp);
+ xcb_parts[4].iov_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_xi_change_hierarchy (xcb_connection_t *c,
+ uint8_t num_changes,
+ const xcb_input_hierarchy_change_t *changes)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_CHANGE_HIERARCHY,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_xi_change_hierarchy_request_t xcb_out;
+ unsigned int xcb_tmp_len;
+ char *xcb_tmp;
+ unsigned int i;
+
+ xcb_out.num_changes = num_changes;
+ memset(xcb_out.pad0, 0, 3);
+
+ 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_input_hierarchy_change_t changes */
+ xcb_parts[4].iov_base = (char *) changes;
+ xcb_parts[4].iov_len = 0;
+ xcb_tmp = (char *)changes;
+ for(i=0; i<num_changes; i++) {
+ xcb_tmp_len = xcb_input_hierarchy_change_sizeof(xcb_tmp);
+ xcb_parts[4].iov_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+int
+xcb_input_xi_change_hierarchy_changes_length (const xcb_input_xi_change_hierarchy_request_t *R)
+{
+ return R->num_changes;
+}
+
+xcb_input_hierarchy_change_iterator_t
+xcb_input_xi_change_hierarchy_changes_iterator (const xcb_input_xi_change_hierarchy_request_t *R)
+{
+ xcb_input_hierarchy_change_iterator_t i;
+ i.data = (xcb_input_hierarchy_change_t *) (R + 1);
+ i.rem = R->num_changes;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_void_cookie_t
+xcb_input_xi_set_client_pointer_checked (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_input_device_id_t deviceid)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_SET_CLIENT_POINTER,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_xi_set_client_pointer_request_t xcb_out;
+
+ xcb_out.window = window;
+ xcb_out.deviceid = deviceid;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_xi_set_client_pointer (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_input_device_id_t deviceid)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_SET_CLIENT_POINTER,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_xi_set_client_pointer_request_t xcb_out;
+
+ xcb_out.window = window;
+ xcb_out.deviceid = deviceid;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_xi_get_client_pointer_cookie_t
+xcb_input_xi_get_client_pointer (xcb_connection_t *c,
+ xcb_window_t window)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_GET_CLIENT_POINTER,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_xi_get_client_pointer_cookie_t xcb_ret;
+ xcb_input_xi_get_client_pointer_request_t xcb_out;
+
+ xcb_out.window = window;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_xi_get_client_pointer_cookie_t
+xcb_input_xi_get_client_pointer_unchecked (xcb_connection_t *c,
+ xcb_window_t window)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_GET_CLIENT_POINTER,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_xi_get_client_pointer_cookie_t xcb_ret;
+ xcb_input_xi_get_client_pointer_request_t xcb_out;
+
+ xcb_out.window = window;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_xi_get_client_pointer_reply_t *
+xcb_input_xi_get_client_pointer_reply (xcb_connection_t *c,
+ xcb_input_xi_get_client_pointer_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_xi_get_client_pointer_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_input_event_mask_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_event_mask_t *_aux = (xcb_input_event_mask_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_event_mask_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* mask */
+ xcb_block_len += _aux->mask_len * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+}
+
+uint32_t *
+xcb_input_event_mask_mask (const xcb_input_event_mask_t *R)
+{
+ return (uint32_t *) (R + 1);
+}
+
+int
+xcb_input_event_mask_mask_length (const xcb_input_event_mask_t *R)
+{
+ return R->mask_len;
+}
+
+xcb_generic_iterator_t
+xcb_input_event_mask_mask_end (const xcb_input_event_mask_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((uint32_t *) (R + 1)) + (R->mask_len);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+void
+xcb_input_event_mask_next (xcb_input_event_mask_iterator_t *i)
+{
+ xcb_input_event_mask_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_input_event_mask_t *)(((char *)R) + xcb_input_event_mask_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_input_event_mask_t *) child.data;
+}
+
+xcb_generic_iterator_t
+xcb_input_event_mask_end (xcb_input_event_mask_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_input_event_mask_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+int
+xcb_input_xi_select_events_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_xi_select_events_request_t *_aux = (xcb_input_xi_select_events_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 = 0;
+
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+
+ xcb_block_len += sizeof(xcb_input_xi_select_events_request_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* masks */
+ for(i=0; i<_aux->num_mask; i++) {
+ xcb_tmp_len = xcb_input_event_mask_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_input_event_mask_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_input_xi_select_events_checked (xcb_connection_t *c,
+ xcb_window_t window,
+ uint16_t num_mask,
+ const xcb_input_event_mask_t *masks)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_SELECT_EVENTS,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_xi_select_events_request_t xcb_out;
+ unsigned int xcb_tmp_len;
+ char *xcb_tmp;
+ unsigned int i;
+
+ xcb_out.window = window;
+ xcb_out.num_mask = num_mask;
+ 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_input_event_mask_t masks */
+ xcb_parts[4].iov_base = (char *) masks;
+ xcb_parts[4].iov_len = 0;
+ xcb_tmp = (char *)masks;
+ for(i=0; i<num_mask; i++) {
+ xcb_tmp_len = xcb_input_event_mask_sizeof(xcb_tmp);
+ xcb_parts[4].iov_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_xi_select_events (xcb_connection_t *c,
+ xcb_window_t window,
+ uint16_t num_mask,
+ const xcb_input_event_mask_t *masks)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_SELECT_EVENTS,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_xi_select_events_request_t xcb_out;
+ unsigned int xcb_tmp_len;
+ char *xcb_tmp;
+ unsigned int i;
+
+ xcb_out.window = window;
+ xcb_out.num_mask = num_mask;
+ 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_input_event_mask_t masks */
+ xcb_parts[4].iov_base = (char *) masks;
+ xcb_parts[4].iov_len = 0;
+ xcb_tmp = (char *)masks;
+ for(i=0; i<num_mask; i++) {
+ xcb_tmp_len = xcb_input_event_mask_sizeof(xcb_tmp);
+ xcb_parts[4].iov_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+int
+xcb_input_xi_select_events_masks_length (const xcb_input_xi_select_events_request_t *R)
+{
+ return R->num_mask;
+}
+
+xcb_input_event_mask_iterator_t
+xcb_input_xi_select_events_masks_iterator (const xcb_input_xi_select_events_request_t *R)
+{
+ xcb_input_event_mask_iterator_t i;
+ i.data = (xcb_input_event_mask_t *) (R + 1);
+ i.rem = R->num_mask;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_xi_query_version_cookie_t
+xcb_input_xi_query_version (xcb_connection_t *c,
+ uint16_t major_version,
+ uint16_t minor_version)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_QUERY_VERSION,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_xi_query_version_cookie_t xcb_ret;
+ xcb_input_xi_query_version_request_t xcb_out;
+
+ xcb_out.major_version = major_version;
+ xcb_out.minor_version = minor_version;
+
+ 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_input_xi_query_version_cookie_t
+xcb_input_xi_query_version_unchecked (xcb_connection_t *c,
+ uint16_t major_version,
+ uint16_t minor_version)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_QUERY_VERSION,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_xi_query_version_cookie_t xcb_ret;
+ xcb_input_xi_query_version_request_t xcb_out;
+
+ xcb_out.major_version = major_version;
+ xcb_out.minor_version = minor_version;
+
+ 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_input_xi_query_version_reply_t *
+xcb_input_xi_query_version_reply (xcb_connection_t *c,
+ xcb_input_xi_query_version_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_xi_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_input_button_class_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_button_class_t *_aux = (xcb_input_button_class_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_button_class_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* state */
+ xcb_block_len += ((_aux->num_buttons + 31) / 32) * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+ /* labels */
+ xcb_block_len += _aux->num_buttons * 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;
+}
+
+uint32_t *
+xcb_input_button_class_state (const xcb_input_button_class_t *R)
+{
+ return (uint32_t *) (R + 1);
+}
+
+int
+xcb_input_button_class_state_length (const xcb_input_button_class_t *R)
+{
+ return ((R->num_buttons + 31) / 32);
+}
+
+xcb_generic_iterator_t
+xcb_input_button_class_state_end (const xcb_input_button_class_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((uint32_t *) (R + 1)) + (((R->num_buttons + 31) / 32));
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_atom_t *
+xcb_input_button_class_labels (const xcb_input_button_class_t *R)
+{
+ xcb_generic_iterator_t prev = xcb_input_button_class_state_end(R);
+ return (xcb_atom_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_atom_t, prev.index) + 0);
+}
+
+int
+xcb_input_button_class_labels_length (const xcb_input_button_class_t *R)
+{
+ return R->num_buttons;
+}
+
+xcb_generic_iterator_t
+xcb_input_button_class_labels_end (const xcb_input_button_class_t *R)
+{
+ xcb_generic_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_input_button_class_state_end(R);
+ i.data = ((xcb_atom_t *) ((char*) prev.data + XCB_TYPE_PAD(xcb_atom_t, prev.index))) + (R->num_buttons);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+void
+xcb_input_button_class_next (xcb_input_button_class_iterator_t *i)
+{
+ xcb_input_button_class_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_input_button_class_t *)(((char *)R) + xcb_input_button_class_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_input_button_class_t *) child.data;
+}
+
+xcb_generic_iterator_t
+xcb_input_button_class_end (xcb_input_button_class_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_input_button_class_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+int
+xcb_input_key_class_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_key_class_t *_aux = (xcb_input_key_class_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_key_class_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* keys */
+ xcb_block_len += _aux->num_keys * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+}
+
+uint32_t *
+xcb_input_key_class_keys (const xcb_input_key_class_t *R)
+{
+ return (uint32_t *) (R + 1);
+}
+
+int
+xcb_input_key_class_keys_length (const xcb_input_key_class_t *R)
+{
+ return R->num_keys;
+}
+
+xcb_generic_iterator_t
+xcb_input_key_class_keys_end (const xcb_input_key_class_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((uint32_t *) (R + 1)) + (R->num_keys);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+void
+xcb_input_key_class_next (xcb_input_key_class_iterator_t *i)
+{
+ xcb_input_key_class_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_input_key_class_t *)(((char *)R) + xcb_input_key_class_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_input_key_class_t *) child.data;
+}
+
+xcb_generic_iterator_t
+xcb_input_key_class_end (xcb_input_key_class_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_input_key_class_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+void
+xcb_input_scroll_class_next (xcb_input_scroll_class_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_scroll_class_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_scroll_class_end (xcb_input_scroll_class_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_input_touch_class_next (xcb_input_touch_class_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_touch_class_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_touch_class_end (xcb_input_touch_class_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_input_valuator_class_next (xcb_input_valuator_class_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_valuator_class_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_valuator_class_end (xcb_input_valuator_class_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;
+}
+
+uint32_t *
+xcb_input_device_class_data_key_keys (const xcb_input_device_class_data_t *S)
+{
+ return S->key.keys;
+}
+
+int
+xcb_input_device_class_data_key_keys_length (const xcb_input_device_class_t *R,
+ const xcb_input_device_class_data_t *S)
+{
+ return S->key.num_keys;
+}
+
+xcb_generic_iterator_t
+xcb_input_device_class_data_key_keys_end (const xcb_input_device_class_t *R,
+ const xcb_input_device_class_data_t *S)
+{
+ xcb_generic_iterator_t i;
+ i.data = S->key.keys + S->key.num_keys;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+uint32_t *
+xcb_input_device_class_data_button_state (const xcb_input_device_class_data_t *S)
+{
+ return S->button.state;
+}
+
+int
+xcb_input_device_class_data_button_state_length (const xcb_input_device_class_t *R,
+ const xcb_input_device_class_data_t *S)
+{
+ return ((S->button.num_buttons + 31) / 32);
+}
+
+xcb_generic_iterator_t
+xcb_input_device_class_data_button_state_end (const xcb_input_device_class_t *R,
+ const xcb_input_device_class_data_t *S)
+{
+ xcb_generic_iterator_t i;
+ i.data = S->button.state + ((S->button.num_buttons + 31) / 32);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+xcb_atom_t *
+xcb_input_device_class_data_button_labels (const xcb_input_device_class_data_t *S)
+{
+ return S->button.labels;
+}
+
+int
+xcb_input_device_class_data_button_labels_length (const xcb_input_device_class_t *R,
+ const xcb_input_device_class_data_t *S)
+{
+ return S->button.num_buttons;
+}
+
+xcb_generic_iterator_t
+xcb_input_device_class_data_button_labels_end (const xcb_input_device_class_t *R,
+ const xcb_input_device_class_data_t *S)
+{
+ xcb_generic_iterator_t i;
+ i.data = S->button.labels + S->button.num_buttons;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+int
+xcb_input_device_class_data_serialize (void **_buffer,
+ uint16_t type,
+ const xcb_input_device_class_data_t *_aux)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to = 0;
+ unsigned int xcb_padding_offset = 2;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[24];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ if(type == XCB_INPUT_DEVICE_CLASS_TYPE_KEY) {
+ /* xcb_input_device_class_data_t.key.num_keys */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key.num_keys;
+ 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_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* keys */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->key.keys;
+ xcb_block_len += _aux->key.num_keys * sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->key.num_keys * sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ if(type == XCB_INPUT_DEVICE_CLASS_TYPE_BUTTON) {
+ /* xcb_input_device_class_data_t.button.num_buttons */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->button.num_buttons;
+ 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_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* state */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->button.state;
+ xcb_block_len += ((_aux->button.num_buttons + 31) / 32) * sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = ((_aux->button.num_buttons + 31) / 32) * sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* labels */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->button.labels;
+ xcb_block_len += _aux->button.num_buttons * sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->button.num_buttons * sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(type == XCB_INPUT_DEVICE_CLASS_TYPE_VALUATOR) {
+ /* xcb_input_device_class_data_t.valuator.number */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->valuator.number;
+ 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_input_device_class_data_t.valuator.label */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->valuator.label;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ /* xcb_input_device_class_data_t.valuator.min */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->valuator.min;
+ xcb_block_len += sizeof(xcb_input_fp3232_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_input_fp3232_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_input_fp3232_t);
+ /* xcb_input_device_class_data_t.valuator.max */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->valuator.max;
+ xcb_block_len += sizeof(xcb_input_fp3232_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_input_fp3232_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_input_fp3232_t);
+ /* xcb_input_device_class_data_t.valuator.value */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->valuator.value;
+ xcb_block_len += sizeof(xcb_input_fp3232_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_input_fp3232_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_input_fp3232_t);
+ /* xcb_input_device_class_data_t.valuator.resolution */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->valuator.resolution;
+ 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_input_device_class_data_t.valuator.mode */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->valuator.mode;
+ 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_input_device_class_data_t.valuator.pad0 */
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_block_len += sizeof(uint8_t)*3;
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*3;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if(type == XCB_INPUT_DEVICE_CLASS_TYPE_SCROLL) {
+ /* xcb_input_device_class_data_t.scroll.number */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->scroll.number;
+ 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_input_device_class_data_t.scroll.scroll_type */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->scroll.scroll_type;
+ 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_input_device_class_data_t.scroll.pad1 */
+ 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_input_device_class_data_t.scroll.flags */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->scroll.flags;
+ 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_input_device_class_data_t.scroll.increment */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->scroll.increment;
+ xcb_block_len += sizeof(xcb_input_fp3232_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_input_fp3232_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_input_fp3232_t);
+ }
+ if(type == XCB_INPUT_DEVICE_CLASS_TYPE_TOUCH) {
+ /* xcb_input_device_class_data_t.touch.mode */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->touch.mode;
+ 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_input_device_class_data_t.touch.num_touches */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->touch.num_touches;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 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_input_device_class_data_unpack (const void *_buffer,
+ uint16_t type,
+ xcb_input_device_class_data_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 = 0;
+ unsigned int xcb_padding_offset = 2;
+
+
+ if(type == XCB_INPUT_DEVICE_CLASS_TYPE_KEY) {
+ /* xcb_input_device_class_data_t.key.num_keys */
+ _aux->key.num_keys = *(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_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* keys */
+ _aux->key.keys = (uint32_t *)xcb_tmp;
+ xcb_block_len += _aux->key.num_keys * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ if(type == XCB_INPUT_DEVICE_CLASS_TYPE_BUTTON) {
+ /* xcb_input_device_class_data_t.button.num_buttons */
+ _aux->button.num_buttons = *(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_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* state */
+ _aux->button.state = (uint32_t *)xcb_tmp;
+ xcb_block_len += ((_aux->button.num_buttons + 31) / 32) * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* labels */
+ _aux->button.labels = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += _aux->button.num_buttons * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(type == XCB_INPUT_DEVICE_CLASS_TYPE_VALUATOR) {
+ /* xcb_input_device_class_data_t.valuator.number */
+ _aux->valuator.number = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_input_device_class_data_t.valuator.label */
+ _aux->valuator.label = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ /* xcb_input_device_class_data_t.valuator.min */
+ _aux->valuator.min = *(xcb_input_fp3232_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_input_fp3232_t);
+ xcb_tmp += sizeof(xcb_input_fp3232_t);
+ xcb_align_to = ALIGNOF(xcb_input_fp3232_t);
+ /* xcb_input_device_class_data_t.valuator.max */
+ _aux->valuator.max = *(xcb_input_fp3232_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_input_fp3232_t);
+ xcb_tmp += sizeof(xcb_input_fp3232_t);
+ xcb_align_to = ALIGNOF(xcb_input_fp3232_t);
+ /* xcb_input_device_class_data_t.valuator.value */
+ _aux->valuator.value = *(xcb_input_fp3232_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_input_fp3232_t);
+ xcb_tmp += sizeof(xcb_input_fp3232_t);
+ xcb_align_to = ALIGNOF(xcb_input_fp3232_t);
+ /* xcb_input_device_class_data_t.valuator.resolution */
+ _aux->valuator.resolution = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_input_device_class_data_t.valuator.mode */
+ _aux->valuator.mode = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_device_class_data_t.valuator.pad0 */
+ _aux->valuator.pad0[0] = *(uint8_t *)xcb_tmp;
+ _aux->valuator.pad0[1] = *(uint8_t *)xcb_tmp;
+ _aux->valuator.pad0[2] = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t) * 3;
+ xcb_tmp += sizeof(uint8_t) * 3;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if(type == XCB_INPUT_DEVICE_CLASS_TYPE_SCROLL) {
+ /* xcb_input_device_class_data_t.scroll.number */
+ _aux->scroll.number = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_input_device_class_data_t.scroll.scroll_type */
+ _aux->scroll.scroll_type = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_input_device_class_data_t.scroll.pad1 */
+ _aux->scroll.pad1[0] = *(uint8_t *)xcb_tmp;
+ _aux->scroll.pad1[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_input_device_class_data_t.scroll.flags */
+ _aux->scroll.flags = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_input_device_class_data_t.scroll.increment */
+ _aux->scroll.increment = *(xcb_input_fp3232_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_input_fp3232_t);
+ xcb_tmp += sizeof(xcb_input_fp3232_t);
+ xcb_align_to = ALIGNOF(xcb_input_fp3232_t);
+ }
+ if(type == XCB_INPUT_DEVICE_CLASS_TYPE_TOUCH) {
+ /* xcb_input_device_class_data_t.touch.mode */
+ _aux->touch.mode = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_device_class_data_t.touch.num_touches */
+ _aux->touch.num_touches = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_input_device_class_data_sizeof (const void *_buffer,
+ uint16_t type)
+{
+ xcb_input_device_class_data_t _aux;
+ return xcb_input_device_class_data_unpack(_buffer, type, &_aux);
+}
+
+int
+xcb_input_device_class_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_device_class_t *_aux = (xcb_input_device_class_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_device_class_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* data */
+ xcb_block_len += xcb_input_device_class_data_sizeof(xcb_tmp, _aux->type);
+ 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+void *
+xcb_input_device_class_data (const xcb_input_device_class_t *R)
+{
+ return (void *) (R + 1);
+}
+
+void
+xcb_input_device_class_next (xcb_input_device_class_iterator_t *i)
+{
+ xcb_input_device_class_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_input_device_class_t *)(((char *)R) + xcb_input_device_class_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_input_device_class_t *) child.data;
+}
+
+xcb_generic_iterator_t
+xcb_input_device_class_end (xcb_input_device_class_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_input_device_class_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+int
+xcb_input_xi_device_info_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_xi_device_info_t *_aux = (xcb_input_xi_device_info_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+
+ xcb_block_len += sizeof(xcb_input_xi_device_info_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* name */
+ xcb_block_len += _aux->name_len * sizeof(char);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(char);
+ xcb_align_to = 4;
+ /* 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;
+ /* 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;
+ /* classes */
+ for(i=0; i<_aux->num_classes; i++) {
+ xcb_tmp_len = xcb_input_device_class_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_input_device_class_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;
+}
+
+char *
+xcb_input_xi_device_info_name (const xcb_input_xi_device_info_t *R)
+{
+ return (char *) (R + 1);
+}
+
+int
+xcb_input_xi_device_info_name_length (const xcb_input_xi_device_info_t *R)
+{
+ return R->name_len;
+}
+
+xcb_generic_iterator_t
+xcb_input_xi_device_info_name_end (const xcb_input_xi_device_info_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((char *) (R + 1)) + (R->name_len);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+int
+xcb_input_xi_device_info_classes_length (const xcb_input_xi_device_info_t *R)
+{
+ return R->num_classes;
+}
+
+xcb_input_device_class_iterator_t
+xcb_input_xi_device_info_classes_iterator (const xcb_input_xi_device_info_t *R)
+{
+ xcb_input_device_class_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_input_xi_device_info_name_end(R);
+ i.data = (xcb_input_device_class_t *) ((char *) prev.data + ((-prev.index) & (4 - 1)));
+ i.rem = R->num_classes;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+void
+xcb_input_xi_device_info_next (xcb_input_xi_device_info_iterator_t *i)
+{
+ xcb_input_xi_device_info_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_input_xi_device_info_t *)(((char *)R) + xcb_input_xi_device_info_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_input_xi_device_info_t *) child.data;
+}
+
+xcb_generic_iterator_t
+xcb_input_xi_device_info_end (xcb_input_xi_device_info_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_input_xi_device_info_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+int
+xcb_input_xi_query_device_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_xi_query_device_reply_t *_aux = (xcb_input_xi_query_device_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 = 0;
+
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+
+ xcb_block_len += sizeof(xcb_input_xi_query_device_reply_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* infos */
+ for(i=0; i<_aux->num_infos; i++) {
+ xcb_tmp_len = xcb_input_xi_device_info_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_input_xi_device_info_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+xcb_input_xi_query_device_cookie_t
+xcb_input_xi_query_device (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_QUERY_DEVICE,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_xi_query_device_cookie_t xcb_ret;
+ xcb_input_xi_query_device_request_t xcb_out;
+
+ xcb_out.deviceid = deviceid;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_xi_query_device_cookie_t
+xcb_input_xi_query_device_unchecked (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_QUERY_DEVICE,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_xi_query_device_cookie_t xcb_ret;
+ xcb_input_xi_query_device_request_t xcb_out;
+
+ xcb_out.deviceid = deviceid;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+int
+xcb_input_xi_query_device_infos_length (const xcb_input_xi_query_device_reply_t *R)
+{
+ return R->num_infos;
+}
+
+xcb_input_xi_device_info_iterator_t
+xcb_input_xi_query_device_infos_iterator (const xcb_input_xi_query_device_reply_t *R)
+{
+ xcb_input_xi_device_info_iterator_t i;
+ i.data = (xcb_input_xi_device_info_t *) (R + 1);
+ i.rem = R->num_infos;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_xi_query_device_reply_t *
+xcb_input_xi_query_device_reply (xcb_connection_t *c,
+ xcb_input_xi_query_device_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_xi_query_device_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+xcb_void_cookie_t
+xcb_input_xi_set_focus_checked (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_timestamp_t time,
+ xcb_input_device_id_t deviceid)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_SET_FOCUS,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_xi_set_focus_request_t xcb_out;
+
+ xcb_out.window = window;
+ xcb_out.time = time;
+ xcb_out.deviceid = deviceid;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_xi_set_focus (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_timestamp_t time,
+ xcb_input_device_id_t deviceid)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_SET_FOCUS,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_xi_set_focus_request_t xcb_out;
+
+ xcb_out.window = window;
+ xcb_out.time = time;
+ xcb_out.deviceid = deviceid;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_xi_get_focus_cookie_t
+xcb_input_xi_get_focus (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_GET_FOCUS,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_xi_get_focus_cookie_t xcb_ret;
+ xcb_input_xi_get_focus_request_t xcb_out;
+
+ xcb_out.deviceid = deviceid;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_xi_get_focus_cookie_t
+xcb_input_xi_get_focus_unchecked (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_GET_FOCUS,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_xi_get_focus_cookie_t xcb_ret;
+ xcb_input_xi_get_focus_request_t xcb_out;
+
+ xcb_out.deviceid = deviceid;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_xi_get_focus_reply_t *
+xcb_input_xi_get_focus_reply (xcb_connection_t *c,
+ xcb_input_xi_get_focus_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_xi_get_focus_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_input_xi_grab_device_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_xi_grab_device_request_t *_aux = (xcb_input_xi_grab_device_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_xi_grab_device_request_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* mask */
+ xcb_block_len += _aux->mask_len * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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_input_xi_grab_device_cookie_t
+xcb_input_xi_grab_device (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_timestamp_t time,
+ xcb_cursor_t cursor,
+ xcb_input_device_id_t deviceid,
+ uint8_t mode,
+ uint8_t paired_device_mode,
+ uint8_t owner_events,
+ uint16_t mask_len,
+ const uint32_t *mask)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_GRAB_DEVICE,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_input_xi_grab_device_cookie_t xcb_ret;
+ xcb_input_xi_grab_device_request_t xcb_out;
+
+ xcb_out.window = window;
+ xcb_out.time = time;
+ xcb_out.cursor = cursor;
+ xcb_out.deviceid = deviceid;
+ xcb_out.mode = mode;
+ xcb_out.paired_device_mode = paired_device_mode;
+ xcb_out.owner_events = owner_events;
+ xcb_out.pad0 = 0;
+ xcb_out.mask_len = mask_len;
+
+ 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;
+ /* uint32_t mask */
+ xcb_parts[4].iov_base = (char *) mask;
+ xcb_parts[4].iov_len = mask_len * sizeof(uint32_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_xi_grab_device_cookie_t
+xcb_input_xi_grab_device_unchecked (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_timestamp_t time,
+ xcb_cursor_t cursor,
+ xcb_input_device_id_t deviceid,
+ uint8_t mode,
+ uint8_t paired_device_mode,
+ uint8_t owner_events,
+ uint16_t mask_len,
+ const uint32_t *mask)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_GRAB_DEVICE,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_input_xi_grab_device_cookie_t xcb_ret;
+ xcb_input_xi_grab_device_request_t xcb_out;
+
+ xcb_out.window = window;
+ xcb_out.time = time;
+ xcb_out.cursor = cursor;
+ xcb_out.deviceid = deviceid;
+ xcb_out.mode = mode;
+ xcb_out.paired_device_mode = paired_device_mode;
+ xcb_out.owner_events = owner_events;
+ xcb_out.pad0 = 0;
+ xcb_out.mask_len = mask_len;
+
+ 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;
+ /* uint32_t mask */
+ xcb_parts[4].iov_base = (char *) mask;
+ xcb_parts[4].iov_len = mask_len * sizeof(uint32_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_xi_grab_device_reply_t *
+xcb_input_xi_grab_device_reply (xcb_connection_t *c,
+ xcb_input_xi_grab_device_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_xi_grab_device_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+xcb_void_cookie_t
+xcb_input_xi_ungrab_device_checked (xcb_connection_t *c,
+ xcb_timestamp_t time,
+ xcb_input_device_id_t deviceid)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_UNGRAB_DEVICE,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_xi_ungrab_device_request_t xcb_out;
+
+ xcb_out.time = time;
+ xcb_out.deviceid = deviceid;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_xi_ungrab_device (xcb_connection_t *c,
+ xcb_timestamp_t time,
+ xcb_input_device_id_t deviceid)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_UNGRAB_DEVICE,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_xi_ungrab_device_request_t xcb_out;
+
+ xcb_out.time = time;
+ xcb_out.deviceid = deviceid;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_xi_allow_events_checked (xcb_connection_t *c,
+ xcb_timestamp_t time,
+ xcb_input_device_id_t deviceid,
+ uint8_t event_mode,
+ uint32_t touchid,
+ xcb_window_t grab_window)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_ALLOW_EVENTS,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_xi_allow_events_request_t xcb_out;
+
+ xcb_out.time = time;
+ xcb_out.deviceid = deviceid;
+ xcb_out.event_mode = event_mode;
+ xcb_out.pad0 = 0;
+ xcb_out.touchid = touchid;
+ xcb_out.grab_window = grab_window;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_xi_allow_events (xcb_connection_t *c,
+ xcb_timestamp_t time,
+ xcb_input_device_id_t deviceid,
+ uint8_t event_mode,
+ uint32_t touchid,
+ xcb_window_t grab_window)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_ALLOW_EVENTS,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_xi_allow_events_request_t xcb_out;
+
+ xcb_out.time = time;
+ xcb_out.deviceid = deviceid;
+ xcb_out.event_mode = event_mode;
+ xcb_out.pad0 = 0;
+ xcb_out.touchid = touchid;
+ xcb_out.grab_window = grab_window;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+void
+xcb_input_grab_modifier_info_next (xcb_input_grab_modifier_info_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_grab_modifier_info_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_grab_modifier_info_end (xcb_input_grab_modifier_info_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_input_xi_passive_grab_device_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_xi_passive_grab_device_request_t *_aux = (xcb_input_xi_passive_grab_device_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_xi_passive_grab_device_request_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* mask */
+ xcb_block_len += _aux->mask_len * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+ /* modifiers */
+ xcb_block_len += _aux->num_modifiers * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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_input_xi_passive_grab_device_cookie_t
+xcb_input_xi_passive_grab_device (xcb_connection_t *c,
+ xcb_timestamp_t time,
+ xcb_window_t grab_window,
+ xcb_cursor_t cursor,
+ uint32_t detail,
+ xcb_input_device_id_t deviceid,
+ uint16_t num_modifiers,
+ uint16_t mask_len,
+ uint8_t grab_type,
+ uint8_t grab_mode,
+ uint8_t paired_device_mode,
+ uint8_t owner_events,
+ const uint32_t *mask,
+ const uint32_t *modifiers)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 6,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_PASSIVE_GRAB_DEVICE,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[8];
+ xcb_input_xi_passive_grab_device_cookie_t xcb_ret;
+ xcb_input_xi_passive_grab_device_request_t xcb_out;
+
+ xcb_out.time = time;
+ xcb_out.grab_window = grab_window;
+ xcb_out.cursor = cursor;
+ xcb_out.detail = detail;
+ xcb_out.deviceid = deviceid;
+ xcb_out.num_modifiers = num_modifiers;
+ xcb_out.mask_len = mask_len;
+ xcb_out.grab_type = grab_type;
+ xcb_out.grab_mode = grab_mode;
+ xcb_out.paired_device_mode = paired_device_mode;
+ xcb_out.owner_events = owner_events;
+ 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;
+ /* uint32_t mask */
+ xcb_parts[4].iov_base = (char *) mask;
+ xcb_parts[4].iov_len = mask_len * sizeof(uint32_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+ /* uint32_t modifiers */
+ xcb_parts[6].iov_base = (char *) modifiers;
+ xcb_parts[6].iov_len = num_modifiers * sizeof(uint32_t);
+ xcb_parts[7].iov_base = 0;
+ xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_xi_passive_grab_device_cookie_t
+xcb_input_xi_passive_grab_device_unchecked (xcb_connection_t *c,
+ xcb_timestamp_t time,
+ xcb_window_t grab_window,
+ xcb_cursor_t cursor,
+ uint32_t detail,
+ xcb_input_device_id_t deviceid,
+ uint16_t num_modifiers,
+ uint16_t mask_len,
+ uint8_t grab_type,
+ uint8_t grab_mode,
+ uint8_t paired_device_mode,
+ uint8_t owner_events,
+ const uint32_t *mask,
+ const uint32_t *modifiers)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 6,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_PASSIVE_GRAB_DEVICE,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[8];
+ xcb_input_xi_passive_grab_device_cookie_t xcb_ret;
+ xcb_input_xi_passive_grab_device_request_t xcb_out;
+
+ xcb_out.time = time;
+ xcb_out.grab_window = grab_window;
+ xcb_out.cursor = cursor;
+ xcb_out.detail = detail;
+ xcb_out.deviceid = deviceid;
+ xcb_out.num_modifiers = num_modifiers;
+ xcb_out.mask_len = mask_len;
+ xcb_out.grab_type = grab_type;
+ xcb_out.grab_mode = grab_mode;
+ xcb_out.paired_device_mode = paired_device_mode;
+ xcb_out.owner_events = owner_events;
+ 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;
+ /* uint32_t mask */
+ xcb_parts[4].iov_base = (char *) mask;
+ xcb_parts[4].iov_len = mask_len * sizeof(uint32_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+ /* uint32_t modifiers */
+ xcb_parts[6].iov_base = (char *) modifiers;
+ xcb_parts[6].iov_len = num_modifiers * sizeof(uint32_t);
+ xcb_parts[7].iov_base = 0;
+ xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_grab_modifier_info_t *
+xcb_input_xi_passive_grab_device_modifiers (const xcb_input_xi_passive_grab_device_reply_t *R)
+{
+ return (xcb_input_grab_modifier_info_t *) (R + 1);
+}
+
+int
+xcb_input_xi_passive_grab_device_modifiers_length (const xcb_input_xi_passive_grab_device_reply_t *R)
+{
+ return R->num_modifiers;
+}
+
+xcb_input_grab_modifier_info_iterator_t
+xcb_input_xi_passive_grab_device_modifiers_iterator (const xcb_input_xi_passive_grab_device_reply_t *R)
+{
+ xcb_input_grab_modifier_info_iterator_t i;
+ i.data = (xcb_input_grab_modifier_info_t *) (R + 1);
+ i.rem = R->num_modifiers;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_xi_passive_grab_device_reply_t *
+xcb_input_xi_passive_grab_device_reply (xcb_connection_t *c,
+ xcb_input_xi_passive_grab_device_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_xi_passive_grab_device_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_input_xi_passive_ungrab_device_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_xi_passive_ungrab_device_request_t *_aux = (xcb_input_xi_passive_ungrab_device_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_xi_passive_ungrab_device_request_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* modifiers */
+ xcb_block_len += _aux->num_modifiers * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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_input_xi_passive_ungrab_device_checked (xcb_connection_t *c,
+ xcb_window_t grab_window,
+ uint32_t detail,
+ xcb_input_device_id_t deviceid,
+ uint16_t num_modifiers,
+ uint8_t grab_type,
+ const uint32_t *modifiers)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_PASSIVE_UNGRAB_DEVICE,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_xi_passive_ungrab_device_request_t xcb_out;
+
+ xcb_out.grab_window = grab_window;
+ xcb_out.detail = detail;
+ xcb_out.deviceid = deviceid;
+ xcb_out.num_modifiers = num_modifiers;
+ xcb_out.grab_type = grab_type;
+ memset(xcb_out.pad0, 0, 3);
+
+ 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;
+ /* uint32_t modifiers */
+ xcb_parts[4].iov_base = (char *) modifiers;
+ xcb_parts[4].iov_len = num_modifiers * sizeof(uint32_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_xi_passive_ungrab_device (xcb_connection_t *c,
+ xcb_window_t grab_window,
+ uint32_t detail,
+ xcb_input_device_id_t deviceid,
+ uint16_t num_modifiers,
+ uint8_t grab_type,
+ const uint32_t *modifiers)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 4,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_PASSIVE_UNGRAB_DEVICE,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_xi_passive_ungrab_device_request_t xcb_out;
+
+ xcb_out.grab_window = grab_window;
+ xcb_out.detail = detail;
+ xcb_out.deviceid = deviceid;
+ xcb_out.num_modifiers = num_modifiers;
+ xcb_out.grab_type = grab_type;
+ memset(xcb_out.pad0, 0, 3);
+
+ 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;
+ /* uint32_t modifiers */
+ xcb_parts[4].iov_base = (char *) modifiers;
+ xcb_parts[4].iov_len = num_modifiers * sizeof(uint32_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+uint32_t *
+xcb_input_xi_passive_ungrab_device_modifiers (const xcb_input_xi_passive_ungrab_device_request_t *R)
+{
+ return (uint32_t *) (R + 1);
+}
+
+int
+xcb_input_xi_passive_ungrab_device_modifiers_length (const xcb_input_xi_passive_ungrab_device_request_t *R)
+{
+ return R->num_modifiers;
+}
+
+xcb_generic_iterator_t
+xcb_input_xi_passive_ungrab_device_modifiers_end (const xcb_input_xi_passive_ungrab_device_request_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((uint32_t *) (R + 1)) + (R->num_modifiers);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+int
+xcb_input_xi_list_properties_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_xi_list_properties_reply_t *_aux = (xcb_input_xi_list_properties_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_xi_list_properties_reply_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* properties */
+ xcb_block_len += _aux->num_properties * 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;
+}
+
+xcb_input_xi_list_properties_cookie_t
+xcb_input_xi_list_properties (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_LIST_PROPERTIES,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_xi_list_properties_cookie_t xcb_ret;
+ xcb_input_xi_list_properties_request_t xcb_out;
+
+ xcb_out.deviceid = deviceid;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_xi_list_properties_cookie_t
+xcb_input_xi_list_properties_unchecked (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_LIST_PROPERTIES,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_xi_list_properties_cookie_t xcb_ret;
+ xcb_input_xi_list_properties_request_t xcb_out;
+
+ xcb_out.deviceid = deviceid;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_atom_t *
+xcb_input_xi_list_properties_properties (const xcb_input_xi_list_properties_reply_t *R)
+{
+ return (xcb_atom_t *) (R + 1);
+}
+
+int
+xcb_input_xi_list_properties_properties_length (const xcb_input_xi_list_properties_reply_t *R)
+{
+ return R->num_properties;
+}
+
+xcb_generic_iterator_t
+xcb_input_xi_list_properties_properties_end (const xcb_input_xi_list_properties_reply_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((xcb_atom_t *) (R + 1)) + (R->num_properties);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_xi_list_properties_reply_t *
+xcb_input_xi_list_properties_reply (xcb_connection_t *c,
+ xcb_input_xi_list_properties_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_xi_list_properties_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+uint8_t *
+xcb_input_xi_change_property_items_data_8 (const xcb_input_xi_change_property_items_t *S)
+{
+ return S->data8;
+}
+
+int
+xcb_input_xi_change_property_items_data_8_length (const xcb_input_xi_change_property_request_t *R,
+ const xcb_input_xi_change_property_items_t *S)
+{
+ return R->num_items;
+}
+
+xcb_generic_iterator_t
+xcb_input_xi_change_property_items_data_8_end (const xcb_input_xi_change_property_request_t *R,
+ const xcb_input_xi_change_property_items_t *S)
+{
+ xcb_generic_iterator_t i;
+ i.data = S->data8 + R->num_items;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+uint16_t *
+xcb_input_xi_change_property_items_data_16 (const xcb_input_xi_change_property_items_t *S)
+{
+ return S->data16;
+}
+
+int
+xcb_input_xi_change_property_items_data_16_length (const xcb_input_xi_change_property_request_t *R,
+ const xcb_input_xi_change_property_items_t *S)
+{
+ return R->num_items;
+}
+
+xcb_generic_iterator_t
+xcb_input_xi_change_property_items_data_16_end (const xcb_input_xi_change_property_request_t *R,
+ const xcb_input_xi_change_property_items_t *S)
+{
+ xcb_generic_iterator_t i;
+ i.data = S->data16 + R->num_items;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+uint32_t *
+xcb_input_xi_change_property_items_data_32 (const xcb_input_xi_change_property_items_t *S)
+{
+ return S->data32;
+}
+
+int
+xcb_input_xi_change_property_items_data_32_length (const xcb_input_xi_change_property_request_t *R,
+ const xcb_input_xi_change_property_items_t *S)
+{
+ return R->num_items;
+}
+
+xcb_generic_iterator_t
+xcb_input_xi_change_property_items_data_32_end (const xcb_input_xi_change_property_request_t *R,
+ const xcb_input_xi_change_property_items_t *S)
+{
+ xcb_generic_iterator_t i;
+ i.data = S->data32 + R->num_items;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+int
+xcb_input_xi_change_property_items_serialize (void **_buffer,
+ uint32_t num_items,
+ uint8_t format,
+ const xcb_input_xi_change_property_items_t *_aux)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to = 0;
+ unsigned int xcb_padding_offset = 0;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[9];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ if(format == XCB_INPUT_PROPERTY_FORMAT_8_BITS) {
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* data8 */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->data8;
+ xcb_block_len += num_items * sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = num_items * sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ xcb_align_to = 4;
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ }
+ if(format == XCB_INPUT_PROPERTY_FORMAT_16_BITS) {
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* data16 */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->data16;
+ xcb_block_len += num_items * sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = num_items * sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ xcb_align_to = 4;
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ }
+ if(format == XCB_INPUT_PROPERTY_FORMAT_32_BITS) {
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* data32 */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->data32;
+ xcb_block_len += num_items * sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = num_items * sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 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_input_xi_change_property_items_unpack (const void *_buffer,
+ uint32_t num_items,
+ uint8_t format,
+ xcb_input_xi_change_property_items_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 = 0;
+ unsigned int xcb_padding_offset = 0;
+
+
+ if(format == XCB_INPUT_PROPERTY_FORMAT_8_BITS) {
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* data8 */
+ _aux->data8 = (uint8_t *)xcb_tmp;
+ xcb_block_len += num_items * sizeof(uint8_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint8_t);
+ xcb_align_to = 4;
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ }
+ if(format == XCB_INPUT_PROPERTY_FORMAT_16_BITS) {
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* data16 */
+ _aux->data16 = (uint16_t *)xcb_tmp;
+ xcb_block_len += num_items * sizeof(uint16_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint16_t);
+ xcb_align_to = 4;
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ }
+ if(format == XCB_INPUT_PROPERTY_FORMAT_32_BITS) {
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* data32 */
+ _aux->data32 = (uint32_t *)xcb_tmp;
+ xcb_block_len += num_items * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_input_xi_change_property_items_sizeof (const void *_buffer,
+ uint32_t num_items,
+ uint8_t format)
+{
+ xcb_input_xi_change_property_items_t _aux;
+ return xcb_input_xi_change_property_items_unpack(_buffer, num_items, format, &_aux);
+}
+
+int
+xcb_input_xi_change_property_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_xi_change_property_request_t *_aux = (xcb_input_xi_change_property_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_xi_change_property_request_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* items */
+ xcb_block_len += xcb_input_xi_change_property_items_sizeof(xcb_tmp, _aux->num_items, _aux->format);
+ 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+xcb_void_cookie_t
+xcb_input_xi_change_property_checked (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid,
+ uint8_t mode,
+ uint8_t format,
+ xcb_atom_t property,
+ xcb_atom_t type,
+ uint32_t num_items,
+ const void *items)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 3,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_CHANGE_PROPERTY,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[5];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_xi_change_property_request_t xcb_out;
+
+ xcb_out.deviceid = deviceid;
+ xcb_out.mode = mode;
+ xcb_out.format = format;
+ xcb_out.property = property;
+ xcb_out.type = type;
+ xcb_out.num_items = num_items;
+
+ 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_input_xi_change_property_items_t items */
+ xcb_parts[4].iov_base = (char *) items;
+ xcb_parts[4].iov_len =
+ xcb_input_xi_change_property_items_sizeof (items, num_items, format);
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_xi_change_property (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid,
+ uint8_t mode,
+ uint8_t format,
+ xcb_atom_t property,
+ xcb_atom_t type,
+ uint32_t num_items,
+ const void *items)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 3,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_CHANGE_PROPERTY,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[5];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_xi_change_property_request_t xcb_out;
+
+ xcb_out.deviceid = deviceid;
+ xcb_out.mode = mode;
+ xcb_out.format = format;
+ xcb_out.property = property;
+ xcb_out.type = type;
+ xcb_out.num_items = num_items;
+
+ 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_input_xi_change_property_items_t items */
+ xcb_parts[4].iov_base = (char *) items;
+ xcb_parts[4].iov_len =
+ xcb_input_xi_change_property_items_sizeof (items, num_items, format);
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_xi_change_property_aux_checked (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid,
+ uint8_t mode,
+ uint8_t format,
+ xcb_atom_t property,
+ xcb_atom_t type,
+ uint32_t num_items,
+ const xcb_input_xi_change_property_items_t *items)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 3,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_CHANGE_PROPERTY,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[5];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_xi_change_property_request_t xcb_out;
+ void *xcb_aux0 = 0;
+
+ xcb_out.deviceid = deviceid;
+ xcb_out.mode = mode;
+ xcb_out.format = format;
+ xcb_out.property = property;
+ xcb_out.type = type;
+ xcb_out.num_items = num_items;
+
+ 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_input_xi_change_property_items_t items */
+ xcb_parts[4].iov_len =
+ xcb_input_xi_change_property_items_serialize (&xcb_aux0, num_items, format, items);
+ xcb_parts[4].iov_base = xcb_aux0;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ free(xcb_aux0);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_xi_change_property_aux (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid,
+ uint8_t mode,
+ uint8_t format,
+ xcb_atom_t property,
+ xcb_atom_t type,
+ uint32_t num_items,
+ const xcb_input_xi_change_property_items_t *items)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 3,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_CHANGE_PROPERTY,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[5];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_xi_change_property_request_t xcb_out;
+ void *xcb_aux0 = 0;
+
+ xcb_out.deviceid = deviceid;
+ xcb_out.mode = mode;
+ xcb_out.format = format;
+ xcb_out.property = property;
+ xcb_out.type = type;
+ xcb_out.num_items = num_items;
+
+ 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_input_xi_change_property_items_t items */
+ xcb_parts[4].iov_len =
+ xcb_input_xi_change_property_items_serialize (&xcb_aux0, num_items, format, items);
+ xcb_parts[4].iov_base = xcb_aux0;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ free(xcb_aux0);
+ return xcb_ret;
+}
+
+void *
+xcb_input_xi_change_property_items (const xcb_input_xi_change_property_request_t *R)
+{
+ return (void *) (R + 1);
+}
+
+xcb_void_cookie_t
+xcb_input_xi_delete_property_checked (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid,
+ xcb_atom_t property)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_DELETE_PROPERTY,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_xi_delete_property_request_t xcb_out;
+
+ xcb_out.deviceid = deviceid;
+ memset(xcb_out.pad0, 0, 2);
+ xcb_out.property = property;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_void_cookie_t
+xcb_input_xi_delete_property (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid,
+ xcb_atom_t property)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_DELETE_PROPERTY,
+ .isvoid = 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_input_xi_delete_property_request_t xcb_out;
+
+ xcb_out.deviceid = deviceid;
+ memset(xcb_out.pad0, 0, 2);
+ xcb_out.property = property;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+uint8_t *
+xcb_input_xi_get_property_items_data_8 (const xcb_input_xi_get_property_items_t *S)
+{
+ return S->data8;
+}
+
+int
+xcb_input_xi_get_property_items_data_8_length (const xcb_input_xi_get_property_reply_t *R,
+ const xcb_input_xi_get_property_items_t *S)
+{
+ return R->num_items;
+}
+
+xcb_generic_iterator_t
+xcb_input_xi_get_property_items_data_8_end (const xcb_input_xi_get_property_reply_t *R,
+ const xcb_input_xi_get_property_items_t *S)
+{
+ xcb_generic_iterator_t i;
+ i.data = S->data8 + R->num_items;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+uint16_t *
+xcb_input_xi_get_property_items_data_16 (const xcb_input_xi_get_property_items_t *S)
+{
+ return S->data16;
+}
+
+int
+xcb_input_xi_get_property_items_data_16_length (const xcb_input_xi_get_property_reply_t *R,
+ const xcb_input_xi_get_property_items_t *S)
+{
+ return R->num_items;
+}
+
+xcb_generic_iterator_t
+xcb_input_xi_get_property_items_data_16_end (const xcb_input_xi_get_property_reply_t *R,
+ const xcb_input_xi_get_property_items_t *S)
+{
+ xcb_generic_iterator_t i;
+ i.data = S->data16 + R->num_items;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+uint32_t *
+xcb_input_xi_get_property_items_data_32 (const xcb_input_xi_get_property_items_t *S)
+{
+ return S->data32;
+}
+
+int
+xcb_input_xi_get_property_items_data_32_length (const xcb_input_xi_get_property_reply_t *R,
+ const xcb_input_xi_get_property_items_t *S)
+{
+ return R->num_items;
+}
+
+xcb_generic_iterator_t
+xcb_input_xi_get_property_items_data_32_end (const xcb_input_xi_get_property_reply_t *R,
+ const xcb_input_xi_get_property_items_t *S)
+{
+ xcb_generic_iterator_t i;
+ i.data = S->data32 + R->num_items;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+int
+xcb_input_xi_get_property_items_serialize (void **_buffer,
+ uint32_t num_items,
+ uint8_t format,
+ const xcb_input_xi_get_property_items_t *_aux)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to = 0;
+ unsigned int xcb_padding_offset = 0;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[9];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ if(format == XCB_INPUT_PROPERTY_FORMAT_8_BITS) {
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* data8 */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->data8;
+ xcb_block_len += num_items * sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = num_items * sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ xcb_align_to = 4;
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ }
+ if(format == XCB_INPUT_PROPERTY_FORMAT_16_BITS) {
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* data16 */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->data16;
+ xcb_block_len += num_items * sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = num_items * sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ xcb_align_to = 4;
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ }
+ if(format == XCB_INPUT_PROPERTY_FORMAT_32_BITS) {
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* data32 */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->data32;
+ xcb_block_len += num_items * sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = num_items * sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 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_input_xi_get_property_items_unpack (const void *_buffer,
+ uint32_t num_items,
+ uint8_t format,
+ xcb_input_xi_get_property_items_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 = 0;
+ unsigned int xcb_padding_offset = 0;
+
+
+ if(format == XCB_INPUT_PROPERTY_FORMAT_8_BITS) {
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* data8 */
+ _aux->data8 = (uint8_t *)xcb_tmp;
+ xcb_block_len += num_items * sizeof(uint8_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint8_t);
+ xcb_align_to = 4;
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ }
+ if(format == XCB_INPUT_PROPERTY_FORMAT_16_BITS) {
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* data16 */
+ _aux->data16 = (uint16_t *)xcb_tmp;
+ xcb_block_len += num_items * sizeof(uint16_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint16_t);
+ xcb_align_to = 4;
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ }
+ if(format == XCB_INPUT_PROPERTY_FORMAT_32_BITS) {
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+ /* data32 */
+ _aux->data32 = (uint32_t *)xcb_tmp;
+ xcb_block_len += num_items * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (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;
+ xcb_padding_offset = 0;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_input_xi_get_property_items_sizeof (const void *_buffer,
+ uint32_t num_items,
+ uint8_t format)
+{
+ xcb_input_xi_get_property_items_t _aux;
+ return xcb_input_xi_get_property_items_unpack(_buffer, num_items, format, &_aux);
+}
+
+int
+xcb_input_xi_get_property_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_xi_get_property_reply_t *_aux = (xcb_input_xi_get_property_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 = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_xi_get_property_reply_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* items */
+ xcb_block_len += xcb_input_xi_get_property_items_sizeof(xcb_tmp, _aux->num_items, _aux->format);
+ 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;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+xcb_input_xi_get_property_cookie_t
+xcb_input_xi_get_property (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid,
+ uint8_t _delete,
+ xcb_atom_t property,
+ xcb_atom_t type,
+ uint32_t offset,
+ uint32_t len)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_GET_PROPERTY,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_xi_get_property_cookie_t xcb_ret;
+ xcb_input_xi_get_property_request_t xcb_out;
+
+ xcb_out.deviceid = deviceid;
+ xcb_out._delete = _delete;
+ xcb_out.pad0 = 0;
+ xcb_out.property = property;
+ xcb_out.type = type;
+ xcb_out.offset = offset;
+ xcb_out.len = len;
+
+ 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_input_xi_get_property_cookie_t
+xcb_input_xi_get_property_unchecked (xcb_connection_t *c,
+ xcb_input_device_id_t deviceid,
+ uint8_t _delete,
+ xcb_atom_t property,
+ xcb_atom_t type,
+ uint32_t offset,
+ uint32_t len)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_GET_PROPERTY,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_xi_get_property_cookie_t xcb_ret;
+ xcb_input_xi_get_property_request_t xcb_out;
+
+ xcb_out.deviceid = deviceid;
+ xcb_out._delete = _delete;
+ xcb_out.pad0 = 0;
+ xcb_out.property = property;
+ xcb_out.type = type;
+ xcb_out.offset = offset;
+ xcb_out.len = len;
+
+ 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;
+}
+
+void *
+xcb_input_xi_get_property_items (const xcb_input_xi_get_property_reply_t *R)
+{
+ return (void *) (R + 1);
+}
+
+xcb_input_xi_get_property_reply_t *
+xcb_input_xi_get_property_reply (xcb_connection_t *c,
+ xcb_input_xi_get_property_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_xi_get_property_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_input_xi_get_selected_events_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_xi_get_selected_events_reply_t *_aux = (xcb_input_xi_get_selected_events_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 = 0;
+
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+
+ xcb_block_len += sizeof(xcb_input_xi_get_selected_events_reply_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* masks */
+ for(i=0; i<_aux->num_masks; i++) {
+ xcb_tmp_len = xcb_input_event_mask_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_input_event_mask_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_input_xi_get_selected_events_cookie_t
+xcb_input_xi_get_selected_events (xcb_connection_t *c,
+ xcb_window_t window)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_GET_SELECTED_EVENTS,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_xi_get_selected_events_cookie_t xcb_ret;
+ xcb_input_xi_get_selected_events_request_t xcb_out;
+
+ xcb_out.window = window;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+xcb_input_xi_get_selected_events_cookie_t
+xcb_input_xi_get_selected_events_unchecked (xcb_connection_t *c,
+ xcb_window_t window)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ .count = 2,
+ .ext = &xcb_input_id,
+ .opcode = XCB_INPUT_XI_GET_SELECTED_EVENTS,
+ .isvoid = 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_input_xi_get_selected_events_cookie_t xcb_ret;
+ xcb_input_xi_get_selected_events_request_t xcb_out;
+
+ xcb_out.window = window;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+int
+xcb_input_xi_get_selected_events_masks_length (const xcb_input_xi_get_selected_events_reply_t *R)
+{
+ return R->num_masks;
+}
+
+xcb_input_event_mask_iterator_t
+xcb_input_xi_get_selected_events_masks_iterator (const xcb_input_xi_get_selected_events_reply_t *R)
+{
+ xcb_input_event_mask_iterator_t i;
+ i.data = (xcb_input_event_mask_t *) (R + 1);
+ i.rem = R->num_masks;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_xi_get_selected_events_reply_t *
+xcb_input_xi_get_selected_events_reply (xcb_connection_t *c,
+ xcb_input_xi_get_selected_events_cookie_t cookie /**< */,
+ xcb_generic_error_t **e)
+{
+ return (xcb_input_xi_get_selected_events_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_input_device_changed_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_device_changed_event_t *_aux = (xcb_input_device_changed_event_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+
+ xcb_block_len += sizeof(xcb_input_device_changed_event_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* classes */
+ for(i=0; i<_aux->num_classes; i++) {
+ xcb_tmp_len = xcb_input_device_class_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_input_device_class_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_input_device_changed_classes_length (const xcb_input_device_changed_event_t *R)
+{
+ return R->num_classes;
+}
+
+xcb_input_device_class_iterator_t
+xcb_input_device_changed_classes_iterator (const xcb_input_device_changed_event_t *R)
+{
+ xcb_input_device_class_iterator_t i;
+ i.data = (xcb_input_device_class_t *) (R + 1);
+ i.rem = R->num_classes;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+int
+xcb_input_key_press_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_key_press_event_t *_aux = (xcb_input_key_press_event_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+ int xcb_pre_tmp_1; /* sumof length */
+ int xcb_pre_tmp_2; /* sumof loop counter */
+ int64_t xcb_pre_tmp_3; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_4; /* sumof list ptr */
+
+ xcb_block_len += sizeof(xcb_input_key_press_event_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* button_mask */
+ xcb_block_len += _aux->buttons_len * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+ /* valuator_mask */
+ xcb_block_len += _aux->valuators_len * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+ /* axisvalues */
+ /* sumof start */
+ xcb_pre_tmp_1 = _aux->valuators_len;
+ xcb_pre_tmp_3 = 0;
+ xcb_pre_tmp_4 = xcb_input_key_press_valuator_mask(_aux);
+ for (xcb_pre_tmp_2 = 0; xcb_pre_tmp_2 < xcb_pre_tmp_1; xcb_pre_tmp_2++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_4;
+ xcb_pre_tmp_3 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_4++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_3 */
+ xcb_block_len += xcb_pre_tmp_3 * sizeof(xcb_input_fp3232_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_fp3232_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;
+}
+
+uint32_t *
+xcb_input_key_press_button_mask (const xcb_input_key_press_event_t *R)
+{
+ return (uint32_t *) (R + 1);
+}
+
+int
+xcb_input_key_press_button_mask_length (const xcb_input_key_press_event_t *R)
+{
+ return R->buttons_len;
+}
+
+xcb_generic_iterator_t
+xcb_input_key_press_button_mask_end (const xcb_input_key_press_event_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((uint32_t *) (R + 1)) + (R->buttons_len);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+uint32_t *
+xcb_input_key_press_valuator_mask (const xcb_input_key_press_event_t *R)
+{
+ xcb_generic_iterator_t prev = xcb_input_key_press_button_mask_end(R);
+ return (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0);
+}
+
+int
+xcb_input_key_press_valuator_mask_length (const xcb_input_key_press_event_t *R)
+{
+ return R->valuators_len;
+}
+
+xcb_generic_iterator_t
+xcb_input_key_press_valuator_mask_end (const xcb_input_key_press_event_t *R)
+{
+ xcb_generic_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_input_key_press_button_mask_end(R);
+ i.data = ((uint32_t *) ((char*) prev.data + XCB_TYPE_PAD(uint32_t, prev.index))) + (R->valuators_len);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_fp3232_t *
+xcb_input_key_press_axisvalues (const xcb_input_key_press_event_t *R)
+{
+ xcb_generic_iterator_t prev = xcb_input_key_press_valuator_mask_end(R);
+ return (xcb_input_fp3232_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_input_fp3232_t, prev.index) + 0);
+}
+
+int
+xcb_input_key_press_axisvalues_length (const xcb_input_key_press_event_t *R)
+{
+ int xcb_pre_tmp_5; /* sumof length */
+ int xcb_pre_tmp_6; /* sumof loop counter */
+ int64_t xcb_pre_tmp_7; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_8; /* sumof list ptr */
+ /* sumof start */
+ xcb_pre_tmp_5 = R->valuators_len;
+ xcb_pre_tmp_7 = 0;
+ xcb_pre_tmp_8 = xcb_input_key_press_valuator_mask(R);
+ for (xcb_pre_tmp_6 = 0; xcb_pre_tmp_6 < xcb_pre_tmp_5; xcb_pre_tmp_6++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_8;
+ xcb_pre_tmp_7 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_8++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_7 */
+ return xcb_pre_tmp_7;
+}
+
+xcb_input_fp3232_iterator_t
+xcb_input_key_press_axisvalues_iterator (const xcb_input_key_press_event_t *R)
+{
+ xcb_input_fp3232_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_input_key_press_valuator_mask_end(R);
+ int xcb_pre_tmp_9; /* sumof length */
+ int xcb_pre_tmp_10; /* sumof loop counter */
+ int64_t xcb_pre_tmp_11; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_12; /* sumof list ptr */
+ /* sumof start */
+ xcb_pre_tmp_9 = R->valuators_len;
+ xcb_pre_tmp_11 = 0;
+ xcb_pre_tmp_12 = xcb_input_key_press_valuator_mask(R);
+ for (xcb_pre_tmp_10 = 0; xcb_pre_tmp_10 < xcb_pre_tmp_9; xcb_pre_tmp_10++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_12;
+ xcb_pre_tmp_11 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_12++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_11 */
+ i.data = (xcb_input_fp3232_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_input_fp3232_t, prev.index));
+ i.rem = xcb_pre_tmp_11;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+int
+xcb_input_key_release_sizeof (const void *_buffer /**< */)
+{
+ return xcb_input_key_press_sizeof(_buffer);
+}
+
+int
+xcb_input_button_press_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_button_press_event_t *_aux = (xcb_input_button_press_event_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+ int xcb_pre_tmp_1; /* sumof length */
+ int xcb_pre_tmp_2; /* sumof loop counter */
+ int64_t xcb_pre_tmp_3; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_4; /* sumof list ptr */
+
+ xcb_block_len += sizeof(xcb_input_button_press_event_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* button_mask */
+ xcb_block_len += _aux->buttons_len * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+ /* valuator_mask */
+ xcb_block_len += _aux->valuators_len * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+ /* axisvalues */
+ /* sumof start */
+ xcb_pre_tmp_1 = _aux->valuators_len;
+ xcb_pre_tmp_3 = 0;
+ xcb_pre_tmp_4 = xcb_input_button_press_valuator_mask(_aux);
+ for (xcb_pre_tmp_2 = 0; xcb_pre_tmp_2 < xcb_pre_tmp_1; xcb_pre_tmp_2++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_4;
+ xcb_pre_tmp_3 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_4++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_3 */
+ xcb_block_len += xcb_pre_tmp_3 * sizeof(xcb_input_fp3232_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_fp3232_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;
+}
+
+uint32_t *
+xcb_input_button_press_button_mask (const xcb_input_button_press_event_t *R)
+{
+ return (uint32_t *) (R + 1);
+}
+
+int
+xcb_input_button_press_button_mask_length (const xcb_input_button_press_event_t *R)
+{
+ return R->buttons_len;
+}
+
+xcb_generic_iterator_t
+xcb_input_button_press_button_mask_end (const xcb_input_button_press_event_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((uint32_t *) (R + 1)) + (R->buttons_len);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+uint32_t *
+xcb_input_button_press_valuator_mask (const xcb_input_button_press_event_t *R)
+{
+ xcb_generic_iterator_t prev = xcb_input_button_press_button_mask_end(R);
+ return (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0);
+}
+
+int
+xcb_input_button_press_valuator_mask_length (const xcb_input_button_press_event_t *R)
+{
+ return R->valuators_len;
+}
+
+xcb_generic_iterator_t
+xcb_input_button_press_valuator_mask_end (const xcb_input_button_press_event_t *R)
+{
+ xcb_generic_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_input_button_press_button_mask_end(R);
+ i.data = ((uint32_t *) ((char*) prev.data + XCB_TYPE_PAD(uint32_t, prev.index))) + (R->valuators_len);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_fp3232_t *
+xcb_input_button_press_axisvalues (const xcb_input_button_press_event_t *R)
+{
+ xcb_generic_iterator_t prev = xcb_input_button_press_valuator_mask_end(R);
+ return (xcb_input_fp3232_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_input_fp3232_t, prev.index) + 0);
+}
+
+int
+xcb_input_button_press_axisvalues_length (const xcb_input_button_press_event_t *R)
+{
+ int xcb_pre_tmp_5; /* sumof length */
+ int xcb_pre_tmp_6; /* sumof loop counter */
+ int64_t xcb_pre_tmp_7; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_8; /* sumof list ptr */
+ /* sumof start */
+ xcb_pre_tmp_5 = R->valuators_len;
+ xcb_pre_tmp_7 = 0;
+ xcb_pre_tmp_8 = xcb_input_button_press_valuator_mask(R);
+ for (xcb_pre_tmp_6 = 0; xcb_pre_tmp_6 < xcb_pre_tmp_5; xcb_pre_tmp_6++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_8;
+ xcb_pre_tmp_7 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_8++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_7 */
+ return xcb_pre_tmp_7;
+}
+
+xcb_input_fp3232_iterator_t
+xcb_input_button_press_axisvalues_iterator (const xcb_input_button_press_event_t *R)
+{
+ xcb_input_fp3232_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_input_button_press_valuator_mask_end(R);
+ int xcb_pre_tmp_9; /* sumof length */
+ int xcb_pre_tmp_10; /* sumof loop counter */
+ int64_t xcb_pre_tmp_11; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_12; /* sumof list ptr */
+ /* sumof start */
+ xcb_pre_tmp_9 = R->valuators_len;
+ xcb_pre_tmp_11 = 0;
+ xcb_pre_tmp_12 = xcb_input_button_press_valuator_mask(R);
+ for (xcb_pre_tmp_10 = 0; xcb_pre_tmp_10 < xcb_pre_tmp_9; xcb_pre_tmp_10++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_12;
+ xcb_pre_tmp_11 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_12++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_11 */
+ i.data = (xcb_input_fp3232_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_input_fp3232_t, prev.index));
+ i.rem = xcb_pre_tmp_11;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+int
+xcb_input_button_release_sizeof (const void *_buffer /**< */)
+{
+ return xcb_input_button_press_sizeof(_buffer);
+}
+
+int
+xcb_input_motion_sizeof (const void *_buffer /**< */)
+{
+ return xcb_input_button_press_sizeof(_buffer);
+}
+
+int
+xcb_input_enter_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_enter_event_t *_aux = (xcb_input_enter_event_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_enter_event_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* buttons */
+ xcb_block_len += _aux->buttons_len * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+}
+
+uint32_t *
+xcb_input_enter_buttons (const xcb_input_enter_event_t *R)
+{
+ return (uint32_t *) (R + 1);
+}
+
+int
+xcb_input_enter_buttons_length (const xcb_input_enter_event_t *R)
+{
+ return R->buttons_len;
+}
+
+xcb_generic_iterator_t
+xcb_input_enter_buttons_end (const xcb_input_enter_event_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((uint32_t *) (R + 1)) + (R->buttons_len);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+int
+xcb_input_leave_sizeof (const void *_buffer /**< */)
+{
+ return xcb_input_enter_sizeof(_buffer);
+}
+
+int
+xcb_input_focus_in_sizeof (const void *_buffer /**< */)
+{
+ return xcb_input_enter_sizeof(_buffer);
+}
+
+int
+xcb_input_focus_out_sizeof (const void *_buffer /**< */)
+{
+ return xcb_input_enter_sizeof(_buffer);
+}
+
+void
+xcb_input_hierarchy_info_next (xcb_input_hierarchy_info_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_hierarchy_info_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_hierarchy_info_end (xcb_input_hierarchy_info_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_input_hierarchy_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_hierarchy_event_t *_aux = (xcb_input_hierarchy_event_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+
+ xcb_block_len += sizeof(xcb_input_hierarchy_event_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* infos */
+ xcb_block_len += _aux->num_infos * sizeof(xcb_input_hierarchy_info_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_hierarchy_info_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+xcb_input_hierarchy_info_t *
+xcb_input_hierarchy_infos (const xcb_input_hierarchy_event_t *R)
+{
+ return (xcb_input_hierarchy_info_t *) (R + 1);
+}
+
+int
+xcb_input_hierarchy_infos_length (const xcb_input_hierarchy_event_t *R)
+{
+ return R->num_infos;
+}
+
+xcb_input_hierarchy_info_iterator_t
+xcb_input_hierarchy_infos_iterator (const xcb_input_hierarchy_event_t *R)
+{
+ xcb_input_hierarchy_info_iterator_t i;
+ i.data = (xcb_input_hierarchy_info_t *) (R + 1);
+ i.rem = R->num_infos;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+int
+xcb_input_raw_key_press_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_raw_key_press_event_t *_aux = (xcb_input_raw_key_press_event_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+ int xcb_pre_tmp_1; /* sumof length */
+ int xcb_pre_tmp_2; /* sumof loop counter */
+ int64_t xcb_pre_tmp_3; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_4; /* sumof list ptr */
+ int xcb_pre_tmp_5; /* sumof length */
+ int xcb_pre_tmp_6; /* sumof loop counter */
+ int64_t xcb_pre_tmp_7; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_8; /* sumof list ptr */
+
+ xcb_block_len += sizeof(xcb_input_raw_key_press_event_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* valuator_mask */
+ xcb_block_len += _aux->valuators_len * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+ /* axisvalues */
+ /* sumof start */
+ xcb_pre_tmp_1 = _aux->valuators_len;
+ xcb_pre_tmp_3 = 0;
+ xcb_pre_tmp_4 = xcb_input_raw_key_press_valuator_mask(_aux);
+ for (xcb_pre_tmp_2 = 0; xcb_pre_tmp_2 < xcb_pre_tmp_1; xcb_pre_tmp_2++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_4;
+ xcb_pre_tmp_3 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_4++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_3 */
+ xcb_block_len += xcb_pre_tmp_3 * sizeof(xcb_input_fp3232_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_fp3232_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;
+ /* axisvalues_raw */
+ /* sumof start */
+ xcb_pre_tmp_5 = _aux->valuators_len;
+ xcb_pre_tmp_7 = 0;
+ xcb_pre_tmp_8 = xcb_input_raw_key_press_valuator_mask(_aux);
+ for (xcb_pre_tmp_6 = 0; xcb_pre_tmp_6 < xcb_pre_tmp_5; xcb_pre_tmp_6++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_8;
+ xcb_pre_tmp_7 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_8++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_7 */
+ xcb_block_len += xcb_pre_tmp_7 * sizeof(xcb_input_fp3232_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_fp3232_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;
+}
+
+uint32_t *
+xcb_input_raw_key_press_valuator_mask (const xcb_input_raw_key_press_event_t *R)
+{
+ return (uint32_t *) (R + 1);
+}
+
+int
+xcb_input_raw_key_press_valuator_mask_length (const xcb_input_raw_key_press_event_t *R)
+{
+ return R->valuators_len;
+}
+
+xcb_generic_iterator_t
+xcb_input_raw_key_press_valuator_mask_end (const xcb_input_raw_key_press_event_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((uint32_t *) (R + 1)) + (R->valuators_len);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_fp3232_t *
+xcb_input_raw_key_press_axisvalues (const xcb_input_raw_key_press_event_t *R)
+{
+ xcb_generic_iterator_t prev = xcb_input_raw_key_press_valuator_mask_end(R);
+ return (xcb_input_fp3232_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_input_fp3232_t, prev.index) + 0);
+}
+
+int
+xcb_input_raw_key_press_axisvalues_length (const xcb_input_raw_key_press_event_t *R)
+{
+ int xcb_pre_tmp_9; /* sumof length */
+ int xcb_pre_tmp_10; /* sumof loop counter */
+ int64_t xcb_pre_tmp_11; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_12; /* sumof list ptr */
+ /* sumof start */
+ xcb_pre_tmp_9 = R->valuators_len;
+ xcb_pre_tmp_11 = 0;
+ xcb_pre_tmp_12 = xcb_input_raw_key_press_valuator_mask(R);
+ for (xcb_pre_tmp_10 = 0; xcb_pre_tmp_10 < xcb_pre_tmp_9; xcb_pre_tmp_10++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_12;
+ xcb_pre_tmp_11 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_12++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_11 */
+ return xcb_pre_tmp_11;
+}
+
+xcb_input_fp3232_iterator_t
+xcb_input_raw_key_press_axisvalues_iterator (const xcb_input_raw_key_press_event_t *R)
+{
+ xcb_input_fp3232_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_input_raw_key_press_valuator_mask_end(R);
+ int xcb_pre_tmp_13; /* sumof length */
+ int xcb_pre_tmp_14; /* sumof loop counter */
+ int64_t xcb_pre_tmp_15; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_16; /* sumof list ptr */
+ /* sumof start */
+ xcb_pre_tmp_13 = R->valuators_len;
+ xcb_pre_tmp_15 = 0;
+ xcb_pre_tmp_16 = xcb_input_raw_key_press_valuator_mask(R);
+ for (xcb_pre_tmp_14 = 0; xcb_pre_tmp_14 < xcb_pre_tmp_13; xcb_pre_tmp_14++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_16;
+ xcb_pre_tmp_15 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_16++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_15 */
+ i.data = (xcb_input_fp3232_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_input_fp3232_t, prev.index));
+ i.rem = xcb_pre_tmp_15;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_fp3232_t *
+xcb_input_raw_key_press_axisvalues_raw (const xcb_input_raw_key_press_event_t *R)
+{
+ xcb_generic_iterator_t prev = xcb_input_fp3232_end(xcb_input_raw_key_press_axisvalues_iterator(R));
+ return (xcb_input_fp3232_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_input_fp3232_t, prev.index) + 0);
+}
+
+int
+xcb_input_raw_key_press_axisvalues_raw_length (const xcb_input_raw_key_press_event_t *R)
+{
+ int xcb_pre_tmp_17; /* sumof length */
+ int xcb_pre_tmp_18; /* sumof loop counter */
+ int64_t xcb_pre_tmp_19; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_20; /* sumof list ptr */
+ /* sumof start */
+ xcb_pre_tmp_17 = R->valuators_len;
+ xcb_pre_tmp_19 = 0;
+ xcb_pre_tmp_20 = xcb_input_raw_key_press_valuator_mask(R);
+ for (xcb_pre_tmp_18 = 0; xcb_pre_tmp_18 < xcb_pre_tmp_17; xcb_pre_tmp_18++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_20;
+ xcb_pre_tmp_19 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_20++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_19 */
+ return xcb_pre_tmp_19;
+}
+
+xcb_input_fp3232_iterator_t
+xcb_input_raw_key_press_axisvalues_raw_iterator (const xcb_input_raw_key_press_event_t *R)
+{
+ xcb_input_fp3232_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_input_fp3232_end(xcb_input_raw_key_press_axisvalues_iterator(R));
+ int xcb_pre_tmp_21; /* sumof length */
+ int xcb_pre_tmp_22; /* sumof loop counter */
+ int64_t xcb_pre_tmp_23; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_24; /* sumof list ptr */
+ /* sumof start */
+ xcb_pre_tmp_21 = R->valuators_len;
+ xcb_pre_tmp_23 = 0;
+ xcb_pre_tmp_24 = xcb_input_raw_key_press_valuator_mask(R);
+ for (xcb_pre_tmp_22 = 0; xcb_pre_tmp_22 < xcb_pre_tmp_21; xcb_pre_tmp_22++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_24;
+ xcb_pre_tmp_23 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_24++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_23 */
+ i.data = (xcb_input_fp3232_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_input_fp3232_t, prev.index));
+ i.rem = xcb_pre_tmp_23;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+int
+xcb_input_raw_key_release_sizeof (const void *_buffer /**< */)
+{
+ return xcb_input_raw_key_press_sizeof(_buffer);
+}
+
+int
+xcb_input_raw_button_press_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_raw_button_press_event_t *_aux = (xcb_input_raw_button_press_event_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+ int xcb_pre_tmp_1; /* sumof length */
+ int xcb_pre_tmp_2; /* sumof loop counter */
+ int64_t xcb_pre_tmp_3; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_4; /* sumof list ptr */
+ int xcb_pre_tmp_5; /* sumof length */
+ int xcb_pre_tmp_6; /* sumof loop counter */
+ int64_t xcb_pre_tmp_7; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_8; /* sumof list ptr */
+
+ xcb_block_len += sizeof(xcb_input_raw_button_press_event_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* valuator_mask */
+ xcb_block_len += _aux->valuators_len * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+ /* axisvalues */
+ /* sumof start */
+ xcb_pre_tmp_1 = _aux->valuators_len;
+ xcb_pre_tmp_3 = 0;
+ xcb_pre_tmp_4 = xcb_input_raw_button_press_valuator_mask(_aux);
+ for (xcb_pre_tmp_2 = 0; xcb_pre_tmp_2 < xcb_pre_tmp_1; xcb_pre_tmp_2++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_4;
+ xcb_pre_tmp_3 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_4++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_3 */
+ xcb_block_len += xcb_pre_tmp_3 * sizeof(xcb_input_fp3232_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_fp3232_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;
+ /* axisvalues_raw */
+ /* sumof start */
+ xcb_pre_tmp_5 = _aux->valuators_len;
+ xcb_pre_tmp_7 = 0;
+ xcb_pre_tmp_8 = xcb_input_raw_button_press_valuator_mask(_aux);
+ for (xcb_pre_tmp_6 = 0; xcb_pre_tmp_6 < xcb_pre_tmp_5; xcb_pre_tmp_6++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_8;
+ xcb_pre_tmp_7 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_8++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_7 */
+ xcb_block_len += xcb_pre_tmp_7 * sizeof(xcb_input_fp3232_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_fp3232_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;
+}
+
+uint32_t *
+xcb_input_raw_button_press_valuator_mask (const xcb_input_raw_button_press_event_t *R)
+{
+ return (uint32_t *) (R + 1);
+}
+
+int
+xcb_input_raw_button_press_valuator_mask_length (const xcb_input_raw_button_press_event_t *R)
+{
+ return R->valuators_len;
+}
+
+xcb_generic_iterator_t
+xcb_input_raw_button_press_valuator_mask_end (const xcb_input_raw_button_press_event_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((uint32_t *) (R + 1)) + (R->valuators_len);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_fp3232_t *
+xcb_input_raw_button_press_axisvalues (const xcb_input_raw_button_press_event_t *R)
+{
+ xcb_generic_iterator_t prev = xcb_input_raw_button_press_valuator_mask_end(R);
+ return (xcb_input_fp3232_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_input_fp3232_t, prev.index) + 0);
+}
+
+int
+xcb_input_raw_button_press_axisvalues_length (const xcb_input_raw_button_press_event_t *R)
+{
+ int xcb_pre_tmp_9; /* sumof length */
+ int xcb_pre_tmp_10; /* sumof loop counter */
+ int64_t xcb_pre_tmp_11; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_12; /* sumof list ptr */
+ /* sumof start */
+ xcb_pre_tmp_9 = R->valuators_len;
+ xcb_pre_tmp_11 = 0;
+ xcb_pre_tmp_12 = xcb_input_raw_button_press_valuator_mask(R);
+ for (xcb_pre_tmp_10 = 0; xcb_pre_tmp_10 < xcb_pre_tmp_9; xcb_pre_tmp_10++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_12;
+ xcb_pre_tmp_11 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_12++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_11 */
+ return xcb_pre_tmp_11;
+}
+
+xcb_input_fp3232_iterator_t
+xcb_input_raw_button_press_axisvalues_iterator (const xcb_input_raw_button_press_event_t *R)
+{
+ xcb_input_fp3232_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_input_raw_button_press_valuator_mask_end(R);
+ int xcb_pre_tmp_13; /* sumof length */
+ int xcb_pre_tmp_14; /* sumof loop counter */
+ int64_t xcb_pre_tmp_15; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_16; /* sumof list ptr */
+ /* sumof start */
+ xcb_pre_tmp_13 = R->valuators_len;
+ xcb_pre_tmp_15 = 0;
+ xcb_pre_tmp_16 = xcb_input_raw_button_press_valuator_mask(R);
+ for (xcb_pre_tmp_14 = 0; xcb_pre_tmp_14 < xcb_pre_tmp_13; xcb_pre_tmp_14++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_16;
+ xcb_pre_tmp_15 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_16++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_15 */
+ i.data = (xcb_input_fp3232_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_input_fp3232_t, prev.index));
+ i.rem = xcb_pre_tmp_15;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_fp3232_t *
+xcb_input_raw_button_press_axisvalues_raw (const xcb_input_raw_button_press_event_t *R)
+{
+ xcb_generic_iterator_t prev = xcb_input_fp3232_end(xcb_input_raw_button_press_axisvalues_iterator(R));
+ return (xcb_input_fp3232_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_input_fp3232_t, prev.index) + 0);
+}
+
+int
+xcb_input_raw_button_press_axisvalues_raw_length (const xcb_input_raw_button_press_event_t *R)
+{
+ int xcb_pre_tmp_17; /* sumof length */
+ int xcb_pre_tmp_18; /* sumof loop counter */
+ int64_t xcb_pre_tmp_19; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_20; /* sumof list ptr */
+ /* sumof start */
+ xcb_pre_tmp_17 = R->valuators_len;
+ xcb_pre_tmp_19 = 0;
+ xcb_pre_tmp_20 = xcb_input_raw_button_press_valuator_mask(R);
+ for (xcb_pre_tmp_18 = 0; xcb_pre_tmp_18 < xcb_pre_tmp_17; xcb_pre_tmp_18++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_20;
+ xcb_pre_tmp_19 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_20++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_19 */
+ return xcb_pre_tmp_19;
+}
+
+xcb_input_fp3232_iterator_t
+xcb_input_raw_button_press_axisvalues_raw_iterator (const xcb_input_raw_button_press_event_t *R)
+{
+ xcb_input_fp3232_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_input_fp3232_end(xcb_input_raw_button_press_axisvalues_iterator(R));
+ int xcb_pre_tmp_21; /* sumof length */
+ int xcb_pre_tmp_22; /* sumof loop counter */
+ int64_t xcb_pre_tmp_23; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_24; /* sumof list ptr */
+ /* sumof start */
+ xcb_pre_tmp_21 = R->valuators_len;
+ xcb_pre_tmp_23 = 0;
+ xcb_pre_tmp_24 = xcb_input_raw_button_press_valuator_mask(R);
+ for (xcb_pre_tmp_22 = 0; xcb_pre_tmp_22 < xcb_pre_tmp_21; xcb_pre_tmp_22++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_24;
+ xcb_pre_tmp_23 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_24++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_23 */
+ i.data = (xcb_input_fp3232_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_input_fp3232_t, prev.index));
+ i.rem = xcb_pre_tmp_23;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+int
+xcb_input_raw_button_release_sizeof (const void *_buffer /**< */)
+{
+ return xcb_input_raw_button_press_sizeof(_buffer);
+}
+
+int
+xcb_input_raw_motion_sizeof (const void *_buffer /**< */)
+{
+ return xcb_input_raw_button_press_sizeof(_buffer);
+}
+
+int
+xcb_input_touch_begin_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_touch_begin_event_t *_aux = (xcb_input_touch_begin_event_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+ int xcb_pre_tmp_1; /* sumof length */
+ int xcb_pre_tmp_2; /* sumof loop counter */
+ int64_t xcb_pre_tmp_3; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_4; /* sumof list ptr */
+
+ xcb_block_len += sizeof(xcb_input_touch_begin_event_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* button_mask */
+ xcb_block_len += _aux->buttons_len * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+ /* valuator_mask */
+ xcb_block_len += _aux->valuators_len * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+ /* axisvalues */
+ /* sumof start */
+ xcb_pre_tmp_1 = _aux->valuators_len;
+ xcb_pre_tmp_3 = 0;
+ xcb_pre_tmp_4 = xcb_input_touch_begin_valuator_mask(_aux);
+ for (xcb_pre_tmp_2 = 0; xcb_pre_tmp_2 < xcb_pre_tmp_1; xcb_pre_tmp_2++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_4;
+ xcb_pre_tmp_3 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_4++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_3 */
+ xcb_block_len += xcb_pre_tmp_3 * sizeof(xcb_input_fp3232_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_fp3232_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;
+}
+
+uint32_t *
+xcb_input_touch_begin_button_mask (const xcb_input_touch_begin_event_t *R)
+{
+ return (uint32_t *) (R + 1);
+}
+
+int
+xcb_input_touch_begin_button_mask_length (const xcb_input_touch_begin_event_t *R)
+{
+ return R->buttons_len;
+}
+
+xcb_generic_iterator_t
+xcb_input_touch_begin_button_mask_end (const xcb_input_touch_begin_event_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((uint32_t *) (R + 1)) + (R->buttons_len);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+uint32_t *
+xcb_input_touch_begin_valuator_mask (const xcb_input_touch_begin_event_t *R)
+{
+ xcb_generic_iterator_t prev = xcb_input_touch_begin_button_mask_end(R);
+ return (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0);
+}
+
+int
+xcb_input_touch_begin_valuator_mask_length (const xcb_input_touch_begin_event_t *R)
+{
+ return R->valuators_len;
+}
+
+xcb_generic_iterator_t
+xcb_input_touch_begin_valuator_mask_end (const xcb_input_touch_begin_event_t *R)
+{
+ xcb_generic_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_input_touch_begin_button_mask_end(R);
+ i.data = ((uint32_t *) ((char*) prev.data + XCB_TYPE_PAD(uint32_t, prev.index))) + (R->valuators_len);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_fp3232_t *
+xcb_input_touch_begin_axisvalues (const xcb_input_touch_begin_event_t *R)
+{
+ xcb_generic_iterator_t prev = xcb_input_touch_begin_valuator_mask_end(R);
+ return (xcb_input_fp3232_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_input_fp3232_t, prev.index) + 0);
+}
+
+int
+xcb_input_touch_begin_axisvalues_length (const xcb_input_touch_begin_event_t *R)
+{
+ int xcb_pre_tmp_5; /* sumof length */
+ int xcb_pre_tmp_6; /* sumof loop counter */
+ int64_t xcb_pre_tmp_7; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_8; /* sumof list ptr */
+ /* sumof start */
+ xcb_pre_tmp_5 = R->valuators_len;
+ xcb_pre_tmp_7 = 0;
+ xcb_pre_tmp_8 = xcb_input_touch_begin_valuator_mask(R);
+ for (xcb_pre_tmp_6 = 0; xcb_pre_tmp_6 < xcb_pre_tmp_5; xcb_pre_tmp_6++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_8;
+ xcb_pre_tmp_7 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_8++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_7 */
+ return xcb_pre_tmp_7;
+}
+
+xcb_input_fp3232_iterator_t
+xcb_input_touch_begin_axisvalues_iterator (const xcb_input_touch_begin_event_t *R)
+{
+ xcb_input_fp3232_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_input_touch_begin_valuator_mask_end(R);
+ int xcb_pre_tmp_9; /* sumof length */
+ int xcb_pre_tmp_10; /* sumof loop counter */
+ int64_t xcb_pre_tmp_11; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_12; /* sumof list ptr */
+ /* sumof start */
+ xcb_pre_tmp_9 = R->valuators_len;
+ xcb_pre_tmp_11 = 0;
+ xcb_pre_tmp_12 = xcb_input_touch_begin_valuator_mask(R);
+ for (xcb_pre_tmp_10 = 0; xcb_pre_tmp_10 < xcb_pre_tmp_9; xcb_pre_tmp_10++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_12;
+ xcb_pre_tmp_11 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_12++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_11 */
+ i.data = (xcb_input_fp3232_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_input_fp3232_t, prev.index));
+ i.rem = xcb_pre_tmp_11;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+int
+xcb_input_touch_update_sizeof (const void *_buffer /**< */)
+{
+ return xcb_input_touch_begin_sizeof(_buffer);
+}
+
+int
+xcb_input_touch_end_sizeof (const void *_buffer /**< */)
+{
+ return xcb_input_touch_begin_sizeof(_buffer);
+}
+
+int
+xcb_input_raw_touch_begin_sizeof (const void *_buffer)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_input_raw_touch_begin_event_t *_aux = (xcb_input_raw_touch_begin_event_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
+ int xcb_pre_tmp_1; /* sumof length */
+ int xcb_pre_tmp_2; /* sumof loop counter */
+ int64_t xcb_pre_tmp_3; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_4; /* sumof list ptr */
+ int xcb_pre_tmp_5; /* sumof length */
+ int xcb_pre_tmp_6; /* sumof loop counter */
+ int64_t xcb_pre_tmp_7; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_8; /* sumof list ptr */
+
+ xcb_block_len += sizeof(xcb_input_raw_touch_begin_event_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* valuator_mask */
+ xcb_block_len += _aux->valuators_len * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint32_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;
+ /* axisvalues */
+ /* sumof start */
+ xcb_pre_tmp_1 = _aux->valuators_len;
+ xcb_pre_tmp_3 = 0;
+ xcb_pre_tmp_4 = xcb_input_raw_touch_begin_valuator_mask(_aux);
+ for (xcb_pre_tmp_2 = 0; xcb_pre_tmp_2 < xcb_pre_tmp_1; xcb_pre_tmp_2++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_4;
+ xcb_pre_tmp_3 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_4++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_3 */
+ xcb_block_len += xcb_pre_tmp_3 * sizeof(xcb_input_fp3232_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_fp3232_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;
+ /* axisvalues_raw */
+ /* sumof start */
+ xcb_pre_tmp_5 = _aux->valuators_len;
+ xcb_pre_tmp_7 = 0;
+ xcb_pre_tmp_8 = xcb_input_raw_touch_begin_valuator_mask(_aux);
+ for (xcb_pre_tmp_6 = 0; xcb_pre_tmp_6 < xcb_pre_tmp_5; xcb_pre_tmp_6++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_8;
+ xcb_pre_tmp_7 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_8++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_7 */
+ xcb_block_len += xcb_pre_tmp_7 * sizeof(xcb_input_fp3232_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_input_fp3232_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;
+}
+
+uint32_t *
+xcb_input_raw_touch_begin_valuator_mask (const xcb_input_raw_touch_begin_event_t *R)
+{
+ return (uint32_t *) (R + 1);
+}
+
+int
+xcb_input_raw_touch_begin_valuator_mask_length (const xcb_input_raw_touch_begin_event_t *R)
+{
+ return R->valuators_len;
+}
+
+xcb_generic_iterator_t
+xcb_input_raw_touch_begin_valuator_mask_end (const xcb_input_raw_touch_begin_event_t *R)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((uint32_t *) (R + 1)) + (R->valuators_len);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_fp3232_t *
+xcb_input_raw_touch_begin_axisvalues (const xcb_input_raw_touch_begin_event_t *R)
+{
+ xcb_generic_iterator_t prev = xcb_input_raw_touch_begin_valuator_mask_end(R);
+ return (xcb_input_fp3232_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_input_fp3232_t, prev.index) + 0);
+}
+
+int
+xcb_input_raw_touch_begin_axisvalues_length (const xcb_input_raw_touch_begin_event_t *R)
+{
+ int xcb_pre_tmp_9; /* sumof length */
+ int xcb_pre_tmp_10; /* sumof loop counter */
+ int64_t xcb_pre_tmp_11; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_12; /* sumof list ptr */
+ /* sumof start */
+ xcb_pre_tmp_9 = R->valuators_len;
+ xcb_pre_tmp_11 = 0;
+ xcb_pre_tmp_12 = xcb_input_raw_touch_begin_valuator_mask(R);
+ for (xcb_pre_tmp_10 = 0; xcb_pre_tmp_10 < xcb_pre_tmp_9; xcb_pre_tmp_10++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_12;
+ xcb_pre_tmp_11 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_12++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_11 */
+ return xcb_pre_tmp_11;
+}
+
+xcb_input_fp3232_iterator_t
+xcb_input_raw_touch_begin_axisvalues_iterator (const xcb_input_raw_touch_begin_event_t *R)
+{
+ xcb_input_fp3232_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_input_raw_touch_begin_valuator_mask_end(R);
+ int xcb_pre_tmp_13; /* sumof length */
+ int xcb_pre_tmp_14; /* sumof loop counter */
+ int64_t xcb_pre_tmp_15; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_16; /* sumof list ptr */
+ /* sumof start */
+ xcb_pre_tmp_13 = R->valuators_len;
+ xcb_pre_tmp_15 = 0;
+ xcb_pre_tmp_16 = xcb_input_raw_touch_begin_valuator_mask(R);
+ for (xcb_pre_tmp_14 = 0; xcb_pre_tmp_14 < xcb_pre_tmp_13; xcb_pre_tmp_14++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_16;
+ xcb_pre_tmp_15 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_16++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_15 */
+ i.data = (xcb_input_fp3232_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_input_fp3232_t, prev.index));
+ i.rem = xcb_pre_tmp_15;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+xcb_input_fp3232_t *
+xcb_input_raw_touch_begin_axisvalues_raw (const xcb_input_raw_touch_begin_event_t *R)
+{
+ xcb_generic_iterator_t prev = xcb_input_fp3232_end(xcb_input_raw_touch_begin_axisvalues_iterator(R));
+ return (xcb_input_fp3232_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_input_fp3232_t, prev.index) + 0);
+}
+
+int
+xcb_input_raw_touch_begin_axisvalues_raw_length (const xcb_input_raw_touch_begin_event_t *R)
+{
+ int xcb_pre_tmp_17; /* sumof length */
+ int xcb_pre_tmp_18; /* sumof loop counter */
+ int64_t xcb_pre_tmp_19; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_20; /* sumof list ptr */
+ /* sumof start */
+ xcb_pre_tmp_17 = R->valuators_len;
+ xcb_pre_tmp_19 = 0;
+ xcb_pre_tmp_20 = xcb_input_raw_touch_begin_valuator_mask(R);
+ for (xcb_pre_tmp_18 = 0; xcb_pre_tmp_18 < xcb_pre_tmp_17; xcb_pre_tmp_18++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_20;
+ xcb_pre_tmp_19 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_20++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_19 */
+ return xcb_pre_tmp_19;
+}
+
+xcb_input_fp3232_iterator_t
+xcb_input_raw_touch_begin_axisvalues_raw_iterator (const xcb_input_raw_touch_begin_event_t *R)
+{
+ xcb_input_fp3232_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_input_fp3232_end(xcb_input_raw_touch_begin_axisvalues_iterator(R));
+ int xcb_pre_tmp_21; /* sumof length */
+ int xcb_pre_tmp_22; /* sumof loop counter */
+ int64_t xcb_pre_tmp_23; /* sumof sum */
+ const uint32_t* xcb_pre_tmp_24; /* sumof list ptr */
+ /* sumof start */
+ xcb_pre_tmp_21 = R->valuators_len;
+ xcb_pre_tmp_23 = 0;
+ xcb_pre_tmp_24 = xcb_input_raw_touch_begin_valuator_mask(R);
+ for (xcb_pre_tmp_22 = 0; xcb_pre_tmp_22 < xcb_pre_tmp_21; xcb_pre_tmp_22++) {
+ const uint32_t *xcb_listelement = xcb_pre_tmp_24;
+ xcb_pre_tmp_23 += xcb_popcount((*xcb_listelement));
+ xcb_pre_tmp_24++;
+ }
+ /* sumof end. Result is in xcb_pre_tmp_23 */
+ i.data = (xcb_input_fp3232_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_input_fp3232_t, prev.index));
+ i.rem = xcb_pre_tmp_23;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+int
+xcb_input_raw_touch_update_sizeof (const void *_buffer /**< */)
+{
+ return xcb_input_raw_touch_begin_sizeof(_buffer);
+}
+
+int
+xcb_input_raw_touch_end_sizeof (const void *_buffer /**< */)
+{
+ return xcb_input_raw_touch_begin_sizeof(_buffer);
+}
diff --git a/src/3rdparty/xcb/libxcb/xkb.c b/src/3rdparty/xcb/libxcb/xkb.c
index ff025f6b60..d55bd76f10 100644
--- a/src/3rdparty/xcb/libxcb/xkb.c
+++ b/src/3rdparty/xcb/libxcb/xkb.c
@@ -18,15 +18,6 @@
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;
-}
/*****************************************************************************
**
@@ -9034,7 +9025,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 qt_xcb_sumof(/* valueList */ S->nLevelsPerType, R->nTypes);
+ return xcb_sumof(/* valueList */ S->nLevelsPerType, R->nTypes);
}
@@ -9052,7 +9043,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 + qt_xcb_sumof(/* valueList */ S->nLevelsPerType, R->nTypes);
+ i.data = /* valueList */ S->ktLevelNames + xcb_sumof(/* valueList */ S->nLevelsPerType, R->nTypes);
i.rem = 0;
i.index = (char *) i.data - (char *) S;
return i;
@@ -9517,8 +9508,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 += 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_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_parts_idx++;
xcb_align_to = ALIGNOF(xcb_atom_t);
}
@@ -9771,7 +9762,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 += qt_xcb_sumof(_aux->nLevelsPerType, nTypes) * sizeof(xcb_atom_t);
+ xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nTypes) * sizeof(xcb_atom_t);
xcb_tmp += xcb_block_len;
xcb_align_to = ALIGNOF(xcb_atom_t);
}
@@ -10148,7 +10139,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 qt_xcb_sumof(/* values */ S->nLevelsPerType, R->nKTLevels);
+ return xcb_sumof(/* values */ S->nLevelsPerType, R->nKTLevels);
}
@@ -10166,7 +10157,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 + qt_xcb_sumof(/* values */ S->nLevelsPerType, R->nKTLevels);
+ i.data = /* values */ S->ktLevelNames + xcb_sumof(/* values */ S->nLevelsPerType, R->nKTLevels);
i.rem = 0;
i.index = (char *) i.data - (char *) S;
return i;
@@ -10616,8 +10607,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 += 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_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_parts_idx++;
xcb_align_to = ALIGNOF(xcb_atom_t);
}
@@ -10858,7 +10849,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 += qt_xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
+ xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
xcb_tmp += xcb_block_len;
xcb_align_to = ALIGNOF(xcb_atom_t);
}
@@ -12881,7 +12872,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 qt_xcb_sumof(/* replies */ S->key_names.valueList.nLevelsPerType, /* replies */ S->key_names.nKTLevels);
+ return xcb_sumof(/* replies */ S->key_names.valueList.nLevelsPerType, /* replies */ S->key_names.nKTLevels);
}
@@ -12899,7 +12890,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 + qt_xcb_sumof(/* replies */ S->key_names.valueList.nLevelsPerType, /* replies */ S->key_names.nKTLevels);
+ i.data = /* replies */ S->key_names.valueList.ktLevelNames + 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;
@@ -13349,8 +13340,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 += 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_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_parts_idx++;
xcb_align_to = ALIGNOF(xcb_atom_t);
}
@@ -13591,7 +13582,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 += qt_xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
+ xcb_block_len += 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 1d953d8372..8259a8b8bd 100644
--- a/src/3rdparty/xkbcommon.pri
+++ b/src/3rdparty/xkbcommon.pri
@@ -1,4 +1,6 @@
-QMAKE_CFLAGS += -std=gnu99 -w
+# Requires GNU C extensions
+CONFIG -= strict_c
+
INCLUDEPATH += $$PWD/xkbcommon \
$$PWD/xkbcommon/xkbcommon \
$$PWD/xkbcommon/src \
diff --git a/src/android/jar/jar.pro b/src/android/jar/jar.pro
index 683866a345..bda15a0a00 100644
--- a/src/android/jar/jar.pro
+++ b/src/android/jar/jar.pro
@@ -19,7 +19,7 @@ JAVASOURCES += \
$$PATHPREFIX/QtNativeLibrariesDir.java \
$$PATHPREFIX/QtSurface.java \
$$PATHPREFIX/ExtractStyle.java \
- $$PATHPREFIX/EditMenu.java \
+ $$PATHPREFIX/EditContextView.java \
$$PATHPREFIX/EditPopupMenu.java \
$$PATHPREFIX/CursorHandle.java \
$$PATHPREFIX/QtThread.java
diff --git a/src/android/jar/src/org/qtproject/qt5/android/CursorHandle.java b/src/android/jar/src/org/qtproject/qt5/android/CursorHandle.java
index 4f2c06644d..788a5c2b3d 100644
--- a/src/android/jar/src/org/qtproject/qt5/android/CursorHandle.java
+++ b/src/android/jar/src/org/qtproject/qt5/android/CursorHandle.java
@@ -142,7 +142,6 @@ public class CursorHandle implements ViewTreeObserver.OnPreDrawListener
m_cursorView = new CursorView(context, this);
m_cursorView.setImageDrawable(drawable);
- // m_layout.addView(m_cursorView);
m_popup = new PopupWindow(context, null, android.R.attr.textSelectHandleWindowStyle);
m_popup.setSplitTouchEnabled(true);
@@ -185,6 +184,14 @@ public class CursorHandle implements ViewTreeObserver.OnPreDrawListener
m_posY = y;
}
+ public int bottom()
+ {
+ initOverlay();
+ final int[] location = new int[2];
+ m_cursorView.getLocationOnScreen(location);
+ return location[1] + m_cursorView.getHeight();
+ }
+
public void hide() {
if (m_popup != null) {
m_popup.dismiss();
diff --git a/src/android/jar/src/org/qtproject/qt5/android/EditContextView.java b/src/android/jar/src/org/qtproject/qt5/android/EditContextView.java
new file mode 100644
index 0000000000..6d9987ca2a
--- /dev/null
+++ b/src/android/jar/src/org/qtproject/qt5/android/EditContextView.java
@@ -0,0 +1,120 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 BogDan Vatra <bogdan@kde.org>
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Android port 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+package org.qtproject.qt5.android;
+
+
+import android.content.Context;
+import android.view.Gravity;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+import android.R;
+
+import java.util.HashMap;
+
+public class EditContextView extends LinearLayout implements View.OnClickListener
+{
+ public static final int CUT_BUTTON = 1 << 0;
+ public static final int COPY_BUTTON = 1 << 1;
+ public static final int PASTE_BUTTON = 1 << 2;
+ public static final int SALL_BUTTON = 1 << 3;
+
+ HashMap<Integer, ContextButton> m_buttons = new HashMap<Integer, ContextButton>(4);
+ OnClickListener m_onClickListener;
+
+ public interface OnClickListener
+ {
+ void contextButtonClicked(int buttonId);
+ }
+
+ private class ContextButton extends TextView
+ {
+ public int m_buttonId;
+ public ContextButton(Context context, int stringId) {
+ super(context);
+ m_buttonId = stringId;
+ setText(stringId);
+ setLayoutParams(new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
+ ViewGroup.LayoutParams.WRAP_CONTENT));
+ setGravity(Gravity.CENTER);
+ setTextColor(getResources().getColor(R.color.widget_edittext_dark));
+ EditContextView.this.setBackground(getResources().getDrawable(R.drawable.editbox_background_normal));
+ float scale = getResources().getDisplayMetrics().density;
+ int hPadding = (int)(16 * scale + 0.5f);
+ int vPadding = (int)(8 * scale + 0.5f);
+ setPadding(hPadding, vPadding, hPadding, vPadding);
+ setOnClickListener(EditContextView.this);
+ }
+ }
+
+ @Override
+ public void onClick(View v)
+ {
+ ContextButton button = (ContextButton)v;
+ m_onClickListener.contextButtonClicked(button.m_buttonId);
+ }
+
+ void addButton(int id)
+ {
+ ContextButton button = new ContextButton(getContext(), id);
+ m_buttons.put(id, button);
+ addView(button);
+ }
+
+ public void updateButtons(int buttonsLayout)
+ {
+ m_buttons.get(R.string.cut).setVisibility((buttonsLayout & CUT_BUTTON) != 0 ? View.VISIBLE : View.GONE);
+ m_buttons.get(R.string.copy).setVisibility((buttonsLayout & COPY_BUTTON) != 0 ? View.VISIBLE : View.GONE);
+ m_buttons.get(R.string.paste).setVisibility((buttonsLayout & PASTE_BUTTON) != 0 ? View.VISIBLE : View.GONE);
+ m_buttons.get(R.string.selectAll).setVisibility((buttonsLayout & SALL_BUTTON) != 0 ? View.VISIBLE : View.GONE);
+ }
+
+ public EditContextView(Context context, OnClickListener onClickListener) {
+ super(context);
+ m_onClickListener = onClickListener;
+ setLayoutParams(new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
+
+ addButton(R.string.cut);
+ addButton(R.string.copy);
+ addButton(R.string.paste);
+ addButton(R.string.selectAll);
+ }
+}
diff --git a/src/android/jar/src/org/qtproject/qt5/android/EditMenu.java b/src/android/jar/src/org/qtproject/qt5/android/EditMenu.java
deleted file mode 100644
index afe7797914..0000000000
--- a/src/android/jar/src/org/qtproject/qt5/android/EditMenu.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Olivier Goffart <ogoffart@woboq.com>
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Android port 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 The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-package org.qtproject.qt5.android;
-
-import android.view.ActionMode;
-import android.view.ActionMode.Callback;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.app.Activity;
-import android.content.Context;
-import android.content.res.TypedArray;
-
-/**
- * The edit menu actions (when there is selection)
- */
-class EditMenu implements ActionMode.Callback {
-
- private final Activity m_activity;
- private ActionMode m_actionMode;
-
- public EditMenu(Activity activity) {
- m_activity = activity;
- }
-
- @Override
- public boolean onCreateActionMode(ActionMode mode, Menu menu) {
- mode.setTitle(null);
- mode.setSubtitle(null);
- mode.setTitleOptionalHint(true);
-
- Context context = m_activity;
- int[] attrs = {
- android.R.attr.actionModeSelectAllDrawable, android.R.attr.actionModeCutDrawable,
- android.R.attr.actionModeCopyDrawable, android.R.attr.actionModePasteDrawable
- };
- TypedArray a = context.getTheme().obtainStyledAttributes(attrs);
-
- menu.add(Menu.NONE, android.R.id.selectAll, Menu.NONE, android.R.string.selectAll)
- .setIcon(a.getResourceId(0, 0))
- .setAlphabeticShortcut('a')
- .setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
-
- menu.add(Menu.NONE, android.R.id.cut, Menu.NONE, android.R.string.cut)
- .setIcon(a.getResourceId(1, 0))
- .setAlphabeticShortcut('x')
- .setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
-
- menu.add(Menu.NONE, android.R.id.copy, Menu.NONE, android.R.string.copy)
- .setIcon(a.getResourceId(2, 0))
- .setAlphabeticShortcut('c')
- .setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
-
- menu.add(Menu.NONE, android.R.id.paste, Menu.NONE, android.R.string.paste)
- .setIcon(a.getResourceId(3, 0))
- .setAlphabeticShortcut('v')
- .setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
-
- return true;
- }
-
- @Override
- public boolean onPrepareActionMode(ActionMode mode, Menu menu) {
- return true;
- }
-
- @Override
- public void onDestroyActionMode(ActionMode mode) {
- m_actionMode = null;
- }
-
- @Override
- public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
-
- switch (item.getItemId()) {
- case android.R.id.cut:
- return QtNativeInputConnection.cut();
- case android.R.id.copy:
- return QtNativeInputConnection.copy();
- case android.R.id.paste:
- return QtNativeInputConnection.paste();
- case android.R.id.selectAll:
- return QtNativeInputConnection.selectAll();
- }
- return false;
- }
-
- public void hide()
- {
- if (m_actionMode != null) {
- m_actionMode.finish();
- }
- }
-
- public void show()
- {
- if (m_actionMode == null) {
- m_actionMode = m_activity.startActionMode(this);
- }
- }
-
- public boolean isShown()
- {
- return m_actionMode != null;
- }
-}
diff --git a/src/android/jar/src/org/qtproject/qt5/android/EditPopupMenu.java b/src/android/jar/src/org/qtproject/qt5/android/EditPopupMenu.java
index 246be1aeb2..d065cd8549 100644
--- a/src/android/jar/src/org/qtproject/qt5/android/EditPopupMenu.java
+++ b/src/android/jar/src/org/qtproject/qt5/android/EditPopupMenu.java
@@ -1,5 +1,6 @@
/****************************************************************************
**
+** Copyright (C) 2018 BogDan Vatra <bogdan@kde.org>
** Copyright (C) 2016 Olivier Goffart <ogoffart@woboq.com>
** Contact: http://www.qt.io/licensing/
**
@@ -55,59 +56,51 @@ import android.view.ViewTreeObserver;
import android.view.View.OnClickListener;
import android.view.ViewGroup.LayoutParams;
import android.view.ViewGroup;
+import android.R;
// Helper class that manages a cursor or selection handle
-public class EditPopupMenu implements ViewTreeObserver.OnPreDrawListener, OnClickListener
+public class EditPopupMenu implements ViewTreeObserver.OnPreDrawListener, EditContextView.OnClickListener
{
private View m_layout = null;
- private View m_view = null;
+ private EditContextView m_view = null;
private PopupWindow m_popup = null;
- private Activity m_activity;
private int m_posX;
private int m_posY;
+ private int m_buttons;
- public EditPopupMenu(Activity activity, View layout) {
- m_activity = activity;
+ public EditPopupMenu(Activity activity, View layout)
+ {
+ m_view = new EditContextView(activity, this);
m_layout = layout;
}
- private boolean initOverlay(){
- if (m_popup == null){
- Context context = m_layout.getContext();
- int[] attrs = { android.R.attr.textEditPasteWindowLayout };
- TypedArray a = context.getTheme().obtainStyledAttributes(attrs);
- final int layout = a.getResourceId(0, 0);
- LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- m_view = inflater.inflate(layout, null);
-
- final int size = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
- m_view.setLayoutParams(new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
- ViewGroup.LayoutParams.WRAP_CONTENT));
- m_view.measure(size, size);
- m_view.setOnClickListener(this);
-
- m_popup = new PopupWindow(context, null, android.R.attr.textSelectHandleWindowStyle);
- m_popup.setSplitTouchEnabled(true);
- m_popup.setClippingEnabled(false);
- m_popup.setContentView(m_view);
- m_popup.setWidth(ViewGroup.LayoutParams.WRAP_CONTENT);
- m_popup.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
-
- m_layout.getViewTreeObserver().addOnPreDrawListener(this);
- }
- return true;
+ private void initOverlay()
+ {
+ if (m_popup != null)
+ return;
+
+ Context context = m_layout.getContext();
+ m_popup = new PopupWindow(context, null, android.R.attr.textSelectHandleWindowStyle);
+ m_popup.setSplitTouchEnabled(true);
+ m_popup.setClippingEnabled(false);
+ m_popup.setContentView(m_view);
+ m_popup.setWidth(ViewGroup.LayoutParams.WRAP_CONTENT);
+ m_popup.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
+
+ m_layout.getViewTreeObserver().addOnPreDrawListener(this);
}
public int getHeight()
{
- initOverlay();
return m_view.getHeight();
}
// Show the handle at a given position (or move it if it is already shown)
- public void setPosition(final int x, final int y){
+ public void setPosition(final int x, final int y, final int buttons)
+ {
initOverlay();
+ m_view.updateButtons(buttons);
final int[] location = new int[2];
m_layout.getLocationOnScreen(location);
@@ -115,9 +108,12 @@ public class EditPopupMenu implements ViewTreeObserver.OnPreDrawListener, OnClic
int y2 = y + location[1];
x2 -= m_view.getWidth() / 2 ;
+
+ if (m_layout.getWidth() < x + m_view.getWidth() / 2)
+ x2 = m_layout.getWidth() - m_view.getWidth();
+
if (x2 < 0)
x2 = 0;
- y2 -= m_view.getHeight();
if (m_popup.isShowing())
m_popup.update(x2, y2, -1, -1);
@@ -126,12 +122,13 @@ public class EditPopupMenu implements ViewTreeObserver.OnPreDrawListener, OnClic
m_posX = x;
m_posY = y;
-
+ m_buttons = buttons;
}
public void hide() {
if (m_popup != null) {
m_popup.dismiss();
+ m_popup = null;
}
}
@@ -141,15 +138,27 @@ public class EditPopupMenu implements ViewTreeObserver.OnPreDrawListener, OnClic
// For example if the keyboard appears.
// Adjust the position of the handle accordingly
if (m_popup != null && m_popup.isShowing())
- setPosition(m_posX, m_posY);
+ setPosition(m_posX, m_posY, m_buttons);
return true;
}
@Override
- public void onClick(View v) {
- QtNativeInputConnection.paste();
+ public void contextButtonClicked(int buttonId) {
+ switch (buttonId) {
+ case R.string.cut:
+ QtNativeInputConnection.cut();
+ break;
+ case R.string.copy:
+ QtNativeInputConnection.copy();
+ break;
+ case R.string.paste:
+ QtNativeInputConnection.paste();
+ break;
+ case R.string.selectAll:
+ QtNativeInputConnection.selectAll();
+ break;
+ }
hide();
}
}
-
diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java b/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
index fa7508921d..8f218d34f0 100644
--- a/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
+++ b/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
@@ -140,7 +140,6 @@ public class QtActivityDelegate
private QtEditText m_editText = null;
private InputMethodManager m_imm = null;
private boolean m_quitApp = true;
- private Process m_debuggerProcess = null; // debugger process
private View m_dummyView = null;
private boolean m_keyboardIsVisible = false;
public boolean m_backKeyPressedSent = false;
@@ -151,7 +150,6 @@ public class QtActivityDelegate
private CursorHandle m_cursorHandle;
private CursorHandle m_leftSelectionHandle;
private CursorHandle m_rightSelectionHandle;
- private EditMenu m_editMenu;
private EditPopupMenu m_editPopupMenu;
public void setFullScreen(boolean enterFullScreen)
@@ -484,77 +482,87 @@ public class QtActivityDelegate
}
// Values coming from QAndroidInputContext::CursorHandleShowMode
- private static final int CursorHandleNotShown = 0;
- private static final int CursorHandleShowNormal = 1;
- private static final int CursorHandleShowSelection = 2;
- private static final int CursorHandleShowPopup = 3;
+ private static final int CursorHandleNotShown = 0;
+ private static final int CursorHandleShowNormal = 1;
+ private static final int CursorHandleShowSelection = 2;
+ private static final int CursorHandleShowEdit = 0x100;
/* called from the C++ code when the position of the cursor or selection handles needs to
be adjusted.
mode is one of QAndroidInputContext::CursorHandleShowMode
*/
- public void updateHandles(int mode, int x1, int y1, int x2, int y2, boolean rtl)
+ public void updateHandles(int mode, int editX, int editY, int editButtons, int x1, int y1, int x2, int y2, boolean rtl)
{
- if (mode == CursorHandleNotShown) {
- if (m_cursorHandle != null)
- m_cursorHandle.hide();
- if (m_rightSelectionHandle != null) {
- m_rightSelectionHandle.hide();
- m_leftSelectionHandle.hide();
- m_rightSelectionHandle = null;
- m_leftSelectionHandle = null;
- }
- if (m_editMenu != null)
- m_editMenu.hide();
- if (m_editPopupMenu != null)
+ switch (mode & 0xff)
+ {
+ case CursorHandleNotShown:
+ if (m_cursorHandle != null) {
+ m_cursorHandle.hide();
+ m_cursorHandle = null;
+ }
+ if (m_rightSelectionHandle != null) {
+ m_rightSelectionHandle.hide();
+ m_leftSelectionHandle.hide();
+ m_rightSelectionHandle = null;
+ m_leftSelectionHandle = null;
+ }
m_editPopupMenu.hide();
- } else if (mode == CursorHandleShowNormal || mode == CursorHandleShowPopup) {
- if (m_cursorHandle == null) {
- m_cursorHandle = new CursorHandle(m_activity, m_layout, QtNative.IdCursorHandle,
- android.R.attr.textSelectHandle, false);
- }
- m_cursorHandle.setPosition(x1, y1);
- if (m_rightSelectionHandle != null) {
- m_rightSelectionHandle.hide();
- m_leftSelectionHandle.hide();
- m_rightSelectionHandle = null;
- m_leftSelectionHandle = null;
- }
- } else if (mode == CursorHandleShowSelection) {
- if (m_rightSelectionHandle == null) {
- m_leftSelectionHandle = new CursorHandle(m_activity, m_layout, QtNative.IdLeftHandle,
- !rtl ? android.R.attr.textSelectHandleLeft :
- android.R.attr.textSelectHandleRight,
- rtl);
- m_rightSelectionHandle = new CursorHandle(m_activity, m_layout, QtNative.IdRightHandle,
- !rtl ? android.R.attr.textSelectHandleRight :
- android.R.attr.textSelectHandleLeft,
- rtl);
- }
- m_leftSelectionHandle.setPosition(x1,y1);
- m_rightSelectionHandle.setPosition(x2,y2);
- if (m_cursorHandle != null)
- m_cursorHandle.hide();
-
- if (m_editMenu == null)
- m_editMenu = new EditMenu(m_activity);
- m_editMenu.show();
+ break;
+
+ case CursorHandleShowNormal:
+ if (m_cursorHandle == null) {
+ m_cursorHandle = new CursorHandle(m_activity, m_layout, QtNative.IdCursorHandle,
+ android.R.attr.textSelectHandle, false);
+ }
+ m_cursorHandle.setPosition(x1, y1);
+ if (m_rightSelectionHandle != null) {
+ m_rightSelectionHandle.hide();
+ m_leftSelectionHandle.hide();
+ m_rightSelectionHandle = null;
+ m_leftSelectionHandle = null;
+ }
+ break;
+
+ case CursorHandleShowSelection:
+ if (m_rightSelectionHandle == null) {
+ m_leftSelectionHandle = new CursorHandle(m_activity, m_layout, QtNative.IdLeftHandle,
+ !rtl ? android.R.attr.textSelectHandleLeft :
+ android.R.attr.textSelectHandleRight,
+ rtl);
+ m_rightSelectionHandle = new CursorHandle(m_activity, m_layout, QtNative.IdRightHandle,
+ !rtl ? android.R.attr.textSelectHandleRight :
+ android.R.attr.textSelectHandleLeft,
+ rtl);
+ }
+ m_leftSelectionHandle.setPosition(x1,y1);
+ m_rightSelectionHandle.setPosition(x2,y2);
+ if (m_cursorHandle != null) {
+ m_cursorHandle.hide();
+ m_cursorHandle = null;
+ }
+ mode |= CursorHandleShowEdit;
+ break;
}
- // show the edit popup menu
- if (mode == CursorHandleShowPopup && (m_editMenu == null || !m_editMenu.isShown())
- && QtNative.hasClipboardText()) {
- if (m_editPopupMenu == null)
- m_editPopupMenu = new EditPopupMenu(m_activity, m_layout);
- if (y2 < m_editPopupMenu.getHeight()) {
- // If the popup cannot be shown over the text, it must be shown under the anchors
- y2 = y1 + 2 * m_editPopupMenu.getHeight();
+ if (QtNative.hasClipboardText())
+ editButtons |= EditContextView.PASTE_BUTTON;
+ else
+ editButtons &= ~EditContextView.PASTE_BUTTON;
+
+ if ((mode & CursorHandleShowEdit) == CursorHandleShowEdit && editButtons != 0) {
+ editY -= m_editPopupMenu.getHeight();
+ if (editY < 0) {
+ if (m_cursorHandle != null)
+ editY = m_cursorHandle.bottom();
+ else if (m_leftSelectionHandle != null && m_rightSelectionHandle != null)
+ editY = Math.max(m_leftSelectionHandle.bottom(), m_rightSelectionHandle.bottom());
+ else
+ return;
}
- m_editPopupMenu.setPosition(x2, y2);
- } else if (m_editPopupMenu != null) {
+ m_editPopupMenu.setPosition(editX, editY, editButtons);
+ } else {
m_editPopupMenu.hide();
}
-
}
public boolean loadApplication(Activity activity, ClassLoader classLoader, Bundle loaderParams)
@@ -658,70 +666,6 @@ public class QtActivityDelegate
return true;
}
- public static void debugLog(String msg)
- {
- Log.i(QtNative.QtTAG, "DEBUGGER: " + msg);
- }
-
- private class DebugWaitRunnable implements Runnable {
-
- public DebugWaitRunnable(String pingPongSocket) throws IOException {
- socket = new LocalServerSocket(pingPongSocket);
- }
-
- public boolean wasFailure;
- private LocalServerSocket socket;
-
- public void run() {
- final int napTime = 200; // milliseconds between file accesses
- final int timeOut = 30000; // ms until we give up on ping and pong
- final int maxAttempts = timeOut / napTime;
-
- DataOutputStream outToClient = null;
- try {
- LocalSocket connectionFromClient = socket.accept();
- debugLog("Debug socket accepted");
- BufferedReader inFromClient =
- new BufferedReader(new InputStreamReader(connectionFromClient.getInputStream()));
- outToClient = new DataOutputStream(connectionFromClient.getOutputStream());
- outToClient.writeBytes("" + android.os.Process.myPid());
-
- for (int i = 0; i < maxAttempts; i++) {
- String clientData = inFromClient.readLine();
- debugLog("Incoming socket " + clientData);
- if (!clientData.isEmpty())
- break;
-
- if (connectionFromClient.isClosed()) {
- wasFailure = true;
- break;
- }
- Thread.sleep(napTime);
- }
- } catch (IOException ioEx) {
- ioEx.printStackTrace();
- wasFailure = true;
- Log.e(QtNative.QtTAG,"Can't start debugger" + ioEx.getMessage());
- } catch (InterruptedException interruptEx) {
- wasFailure = true;
- Log.e(QtNative.QtTAG,"Can't start debugger" + interruptEx.getMessage());
- } finally {
- try {
- if (outToClient != null)
- outToClient.close();
- } catch (IOException ignored) { }
- }
- }
-
- public void shutdown() throws IOException
- {
- wasFailure = true;
- try {
- socket.close();
- } catch (IOException ignored) { }
- }
- };
-
public boolean startApplication()
{
// start application
@@ -730,170 +674,6 @@ public class QtActivityDelegate
Bundle extras = m_activity.getIntent().getExtras();
if (extras != null) {
try {
- final String dc = "--Added-by-androiddeployqt--/debugger.command";
- String debuggerCommand =
- new BufferedReader(new InputStreamReader(m_activity.getAssets().open(dc))).readLine();
- if ( /*(ai.flags&ApplicationInfo.FLAG_DEBUGGABLE) != 0
- &&*/ extras.containsKey("debug_ping")
- && extras.getString("debug_ping").equals("true")) {
- try {
- String packagePath =
- m_activity.getPackageManager().getApplicationInfo(m_activity.getPackageName(),
- PackageManager.GET_CONFIGURATIONS).dataDir + "/";
-
- debugLog("extra parameters: " + extras);
- String packageName = m_activity.getPackageName();
- String pingFile = extras.getString("ping_file");
- String pongFile = extras.getString("pong_file");
- String gdbserverSocket = extras.getString("gdbserver_socket");
- String gdbserverCommand = packagePath + debuggerCommand + gdbserverSocket;
- String pingSocket = extras.getString("ping_socket");
- boolean usePing = pingFile != null;
- boolean usePong = pongFile != null;
- boolean useSocket = gdbserverSocket != null;
- boolean usePingSocket = pingSocket != null;
- int napTime = 200; // milliseconds between file accesses
- int timeOut = 30000; // ms until we give up on ping and pong
- int maxAttempts = timeOut / napTime;
-
- if (gdbserverSocket != null) {
- debugLog("removing gdb socket " + gdbserverSocket);
- new File(gdbserverSocket).delete();
- }
-
- if (usePing) {
- debugLog("removing ping file " + pingFile);
- File ping = new File(pingFile);
- if (ping.exists()) {
- if (!ping.delete())
- debugLog("ping file cannot be deleted");
- }
- }
-
- if (usePong) {
- debugLog("removing pong file " + pongFile);
- File pong = new File(pongFile);
- if (pong.exists()) {
- if (!pong.delete())
- debugLog("pong file cannot be deleted");
- }
- }
-
- debugLog("starting " + gdbserverCommand);
- m_debuggerProcess = Runtime.getRuntime().exec(gdbserverCommand);
- debugLog("gdbserver started");
-
- if (useSocket) {
- int i;
- for (i = 0; i < maxAttempts; ++i) {
- debugLog("waiting for socket at " + gdbserverSocket + ", attempt " + i);
- File file = new File(gdbserverSocket);
- if (file.exists()) {
- file.setReadable(true, false);
- file.setWritable(true, false);
- file.setExecutable(true, false);
- break;
- }
- Thread.sleep(napTime);
- }
-
- if (i == maxAttempts) {
- debugLog("time out when waiting for debug socket");
- return false;
- }
-
- debugLog("socket ok");
- } else {
- debugLog("socket not used");
- }
-
- if (usePingSocket) {
- DebugWaitRunnable runnable = new DebugWaitRunnable(pingSocket);
- Thread waitThread = new Thread(runnable);
- waitThread.start();
-
- int i;
- for (i = 0; i < maxAttempts && waitThread.isAlive(); ++i) {
- debugLog("Waiting for debug socket connect");
- debugLog("go to sleep");
- Thread.sleep(napTime);
- }
-
- if (i == maxAttempts) {
- debugLog("time out when waiting for ping socket");
- runnable.shutdown();
- return false;
- }
-
- if (runnable.wasFailure) {
- debugLog("Could not connect to debug client");
- return false;
- } else {
- debugLog("Got pid acknowledgment");
- }
- }
-
- if (usePing) {
- // Tell we are ready.
- debugLog("writing ping at " + pingFile);
- FileWriter writer = new FileWriter(pingFile);
- writer.write("" + android.os.Process.myPid());
- writer.close();
- File file = new File(pingFile);
- file.setReadable(true, false);
- file.setWritable(true, false);
- file.setExecutable(true, false);
- debugLog("wrote ping");
- } else {
- debugLog("ping not requested");
- }
-
- // Wait until other side is ready.
- if (usePong) {
- int i;
- for (i = 0; i < maxAttempts; ++i) {
- debugLog("waiting for pong at " + pongFile + ", attempt " + i);
- File file = new File(pongFile);
- if (file.exists()) {
- file.delete();
- break;
- }
- debugLog("go to sleep");
- Thread.sleep(napTime);
- }
- debugLog("Removing pingFile " + pingFile);
- new File(pingFile).delete();
-
- if (i == maxAttempts) {
- debugLog("time out when waiting for pong file");
- return false;
- }
-
- debugLog("got pong " + pongFile);
- } else {
- debugLog("pong not requested");
- }
-
- } catch (IOException ioe) {
- ioe.printStackTrace();
- } catch (SecurityException se) {
- se.printStackTrace();
- }
- }
-
- if (/*(ai.flags&ApplicationInfo.FLAG_DEBUGGABLE) != 0
- &&*/ extras.containsKey("qml_debug")
- && extras.getString("qml_debug").equals("true")) {
- String qmljsdebugger;
- if (extras.containsKey("qmljsdebugger")) {
- qmljsdebugger = extras.getString("qmljsdebugger");
- qmljsdebugger.replaceAll("\\s", ""); // remove whitespace for security
- } else {
- qmljsdebugger = "port:3768";
- }
- m_applicationParameters += "\t-qmljsdebugger=" + qmljsdebugger;
- }
-
if (extras.containsKey("extraenvvars")) {
try {
m_environmentVariables += "\t" + new String(Base64.decode(extras.getString("extraenvvars"), Base64.DEFAULT), "UTF-8");
@@ -1008,6 +788,7 @@ public class QtActivityDelegate
return true;
}
});
+ m_editPopupMenu = new EditPopupMenu(m_activity, m_layout);
}
public void hideSplashScreen()
@@ -1081,8 +862,6 @@ public class QtActivityDelegate
if (m_quitApp) {
QtNative.terminateQt();
QtNative.setActivity(null, null);
- if (m_debuggerProcess != null)
- m_debuggerProcess.destroy();
QtNative.m_qtThread.exit();
System.exit(0);
}
diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java
index 3db3453263..61f6afe85d 100644
--- a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java
+++ b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java
@@ -469,10 +469,11 @@ public class QtNative
case MotionEvent.TOOL_TYPE_ERASER:
pointerType = 3; // QTabletEvent::Eraser
break;
- // TODO TOOL_TYPE_MOUSE
}
- if (m_tabletEventSupported && pointerType != 0) {
+ if (event.getToolType(0) == MotionEvent.TOOL_TYPE_MOUSE) {
+ sendMouseEvent(event, id);
+ } else if (m_tabletEventSupported && pointerType != 0) {
tabletEvent(id, event.getDeviceId(), event.getEventTime(), event.getAction(), pointerType,
event.getButtonState(), event.getX(), event.getY(), event.getPressure());
} else {
@@ -507,7 +508,22 @@ public class QtNative
static public void sendTrackballEvent(MotionEvent event, int id)
{
- switch (event.getAction()) {
+ sendMouseEvent(event,id);
+ }
+
+ static public boolean sendGenericMotionEvent(MotionEvent event, int id)
+ {
+ if (((event.getAction() & (MotionEvent.ACTION_SCROLL | MotionEvent.ACTION_HOVER_MOVE)) == 0)
+ || (event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != InputDevice.SOURCE_CLASS_POINTER) {
+ return false;
+ }
+
+ return sendMouseEvent(event, id);
+ }
+
+ static public boolean sendMouseEvent(MotionEvent event, int id)
+ {
+ switch (event.getActionMasked()) {
case MotionEvent.ACTION_UP:
mouseUp(id, (int) event.getX(), (int) event.getY());
break;
@@ -517,28 +533,27 @@ public class QtNative
m_oldx = (int) event.getX();
m_oldy = (int) event.getY();
break;
-
+ case MotionEvent.ACTION_HOVER_MOVE:
case MotionEvent.ACTION_MOVE:
- int dx = (int) (event.getX() - m_oldx);
- int dy = (int) (event.getY() - m_oldy);
- if (Math.abs(dx) > 5 || Math.abs(dy) > 5) {
+ if (event.getToolType(0) == MotionEvent.TOOL_TYPE_MOUSE) {
+ mouseMove(id, (int) event.getX(), (int) event.getY());
+ } else {
+ int dx = (int) (event.getX() - m_oldx);
+ int dy = (int) (event.getY() - m_oldy);
+ if (Math.abs(dx) > 5 || Math.abs(dy) > 5) {
mouseMove(id, (int) event.getX(), (int) event.getY());
m_oldx = (int) event.getX();
m_oldy = (int) event.getY();
+ }
}
break;
+ case MotionEvent.ACTION_SCROLL:
+ mouseWheel(id, (int) event.getX(), (int) event.getY(),
+ event.getAxisValue(MotionEvent.AXIS_HSCROLL), event.getAxisValue(MotionEvent.AXIS_VSCROLL));
+ break;
+ default:
+ return false;
}
- }
-
- static public boolean sendGenericMotionEvent(MotionEvent event, int id)
- {
- if (event.getActionMasked() != MotionEvent.ACTION_SCROLL
- || (event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != InputDevice.SOURCE_CLASS_POINTER) {
- return false;
- }
-
- mouseWheel(id, (int) event.getX(), (int) event.getY(),
- event.getAxisValue(MotionEvent.AXIS_HSCROLL), event.getAxisValue(MotionEvent.AXIS_VSCROLL));
return true;
}
@@ -585,6 +600,9 @@ public class QtNative
}
private static void updateHandles(final int mode,
+ final int editX,
+ final int editY,
+ final int editButtons,
final int x1,
final int y1,
final int x2,
@@ -594,7 +612,7 @@ public class QtNative
runAction(new Runnable() {
@Override
public void run() {
- m_activityDelegate.updateHandles(mode, x1, y1, x2, y2, rtl);
+ m_activityDelegate.updateHandles(mode, editX, editY, editButtons, x1, y1, x2, y2, rtl);
}
});
}
diff --git a/src/android/templates/AndroidManifest.xml b/src/android/templates/AndroidManifest.xml
index 62e9d0f11c..c9eff264c4 100644
--- a/src/android/templates/AndroidManifest.xml
+++ b/src/android/templates/AndroidManifest.xml
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<manifest package="org.qtproject.example" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0" android:versionCode="1" android:installLocation="auto">
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="-- %%INSERT_APP_NAME%% --">
- <activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation"
+ <activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density"
android:name="org.qtproject.qt5.android.bindings.QtActivity"
android:label="-- %%INSERT_APP_NAME%% --"
android:screenOrientation="unspecified"
diff --git a/src/android/templates/build.gradle b/src/android/templates/build.gradle
index 3a3e0cd165..8affd3c0b4 100644
--- a/src/android/templates/build.gradle
+++ b/src/android/templates/build.gradle
@@ -1,17 +1,17 @@
buildscript {
repositories {
+ google()
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:2.2.3'
+ classpath 'com.android.tools.build:gradle:3.0.1'
}
}
-allprojects {
- repositories {
- jcenter()
- }
+repositories {
+ google()
+ jcenter()
}
apply plugin: 'com.android.application'
diff --git a/src/angle/src/common/common.pri b/src/angle/src/common/common.pri
index c1fad14951..8abdc24186 100644
--- a/src/angle/src/common/common.pri
+++ b/src/angle/src/common/common.pri
@@ -37,4 +37,9 @@ winrt|msvc {
}
}
+win32 {
+ VERSION = $$MODULE_VERSION
+ CONFIG += skip_target_version_ext
+}
+
static: DEFINES *= LIBGLESV2_EXPORT_H_ ANGLE_EXPORT=
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp
index 1541c498e6..7951e95db5 100644
--- a/src/corelib/codecs/qtextcodec.cpp
+++ b/src/corelib/codecs/qtextcodec.cpp
@@ -492,6 +492,24 @@ QTextCodec::QTextCodec()
*/
QTextCodec::~QTextCodec()
{
+ QCoreGlobalData *globalData = QCoreGlobalData::instance();
+ if (!globalData)
+ return;
+
+ globalData->codecForLocale.testAndSetRelaxed(this, nullptr);
+
+ QMutexLocker locker(textCodecsMutex());
+
+ globalData->allCodecs.removeOne(this);
+
+ auto it = globalData->codecCache.cbegin();
+
+ while (it != globalData->codecCache.cend()) {
+ if (it.value() == this)
+ it = globalData->codecCache.erase(it);
+ else
+ ++it;
+ }
}
/*!
diff --git a/src/corelib/codecs/qutfcodec.cpp b/src/corelib/codecs/qutfcodec.cpp
index ce1b092a54..26c68cdee5 100644
--- a/src/corelib/codecs/qutfcodec.cpp
+++ b/src/corelib/codecs/qutfcodec.cpp
@@ -102,6 +102,26 @@ static inline bool simdEncodeAscii(uchar *&dst, const ushort *&nextAscii, const
return false;
}
}
+
+ if (end - src >= 8) {
+ // do eight characters at a time
+ __m128i data = _mm_loadu_si128(reinterpret_cast<const __m128i *>(src));
+ __m128i packed = _mm_packus_epi16(data, data);
+ __m128i nonAscii = _mm_cmpgt_epi8(packed, _mm_setzero_si128());
+
+ // store even non-ASCII
+ _mm_storel_epi64(reinterpret_cast<__m128i *>(dst), packed);
+
+ uchar n = ~_mm_movemask_epi8(nonAscii);
+ if (n) {
+ nextAscii = src + qBitScanReverse(n) + 1;
+ n = qCountTrailingZeroBits(n);
+ dst += n;
+ src += n;
+ return false;
+ }
+ }
+
return src == end;
}
@@ -150,11 +170,52 @@ static inline bool simdDecodeAscii(ushort *&dst, const uchar *&nextAscii, const
return false;
}
+
+ if (end - src >= 8) {
+ __m128i data = _mm_loadl_epi64(reinterpret_cast<const __m128i *>(src));
+ uint n = _mm_movemask_epi8(data) & 0xff;
+ if (!n) {
+ // unpack and store
+ _mm_storeu_si128(reinterpret_cast<__m128i *>(dst), _mm_unpacklo_epi8(data, _mm_setzero_si128()));
+ } else {
+ while (!(n & 1)) {
+ *dst++ = *src++;
+ n >>= 1;
+ }
+
+ n = qBitScanReverse(n);
+ nextAscii = src + n + 1;
+ return false;
+ }
+ }
+
return src == end;
}
static inline const uchar *simdFindNonAscii(const uchar *src, const uchar *end, const uchar *&nextAscii)
{
+#ifdef __AVX2__
+ // do 32 characters at a time
+ // (this is similar to simdTestMask in qstring.cpp)
+ const __m256i mask = _mm256_set1_epi8(0x80);
+ for ( ; end - src >= 32; src += 32) {
+ __m256i data = _mm256_loadu_si256(reinterpret_cast<const __m256i *>(src));
+ if (_mm256_testz_si256(mask, data))
+ continue;
+
+ uint n = _mm256_movemask_epi8(data);
+ Q_ASSUME(n);
+
+ // find the next probable ASCII character
+ // we don't want to load 32 bytes again in this loop if we know there are non-ASCII
+ // characters still coming
+ nextAscii = src + qBitScanReverse(n) + 1;
+
+ // return the non-ASCII character
+ return src + qCountTrailingZeroBits(n);
+ }
+#endif
+
// do sixteen characters at a time
for ( ; end - src >= 16; src += 16) {
__m128i data = _mm_loadu_si128(reinterpret_cast<const __m128i*>(src));
@@ -695,26 +756,16 @@ QByteArray QUtf16::convertFromUnicode(const QChar *uc, int len, QTextCodec::Conv
char *data = d.data();
if (!state || !(state->flags & QTextCodec::IgnoreHeader)) {
QChar bom(QChar::ByteOrderMark);
- if (endian == BigEndianness) {
- data[0] = bom.row();
- data[1] = bom.cell();
- } else {
- data[0] = bom.cell();
- data[1] = bom.row();
- }
+ if (endian == BigEndianness)
+ qToBigEndian(bom.unicode(), data);
+ else
+ qToLittleEndian(bom.unicode(), data);
data += 2;
}
- if (endian == BigEndianness) {
- for (int i = 0; i < len; ++i) {
- *(data++) = uc[i].row();
- *(data++) = uc[i].cell();
- }
- } else {
- for (int i = 0; i < len; ++i) {
- *(data++) = uc[i].cell();
- *(data++) = uc[i].row();
- }
- }
+ if (endian == BigEndianness)
+ qToBigEndian<ushort>(uc, len, data);
+ else
+ qToLittleEndian<ushort>(uc, len, data);
if (state) {
state->remainingChars = 0;
@@ -830,20 +881,14 @@ QByteArray QUtf32::convertFromUnicode(const QChar *uc, int len, QTextCodec::Conv
if (endian == BigEndianness) {
while (i.hasNext()) {
uint cp = i.next();
-
- *(data++) = cp >> 24;
- *(data++) = (cp >> 16) & 0xff;
- *(data++) = (cp >> 8) & 0xff;
- *(data++) = cp & 0xff;
+ qToBigEndian(cp, data);
+ data += 4;
}
} else {
while (i.hasNext()) {
uint cp = i.next();
-
- *(data++) = cp & 0xff;
- *(data++) = (cp >> 8) & 0xff;
- *(data++) = (cp >> 16) & 0xff;
- *(data++) = cp >> 24;
+ qToLittleEndian(cp, data);
+ data += 4;
}
}
diff --git a/src/corelib/configure.json b/src/corelib/configure.json
index dfb575da0d..18fc22f18f 100644
--- a/src/corelib/configure.json
+++ b/src/corelib/configure.json
@@ -64,13 +64,6 @@
"UCollator *collator = ucol_open(\"ru_RU\", &status);",
"if (!U_FAILURE(status))",
" ucol_close(collator);"
- ],
- "qmake": [
- "CONFIG += build_all",
- "CONFIG(debug, debug|release): \\",
- " LIBS += $$LIBS_DEBUG",
- "else: \\",
- " LIBS += $$LIBS_RELEASE"
]
},
"sources": [
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro
index 7f62a6f1b0..2244020795 100644
--- a/src/corelib/corelib.pro
+++ b/src/corelib/corelib.pro
@@ -4,6 +4,7 @@ CONFIG += exceptions
MODULE = core # not corelib, as per project file
MODULE_CONFIG = moc resources
+qtConfig(gc_binaries): MODULE_CONFIG += gc_binaries
!isEmpty(QT_NAMESPACE): MODULE_DEFINES = QT_NAMESPACE=$$QT_NAMESPACE
TRACEPOINT_PROVIDER = $$PWD/qtcore.tracepoints
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 2d7b9a9ac8..9d029e5d4d 100644
--- a/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp
@@ -440,6 +440,54 @@ QString global_greeting(int type)
//! [36]
+//! [qttrnnoop]
+static const char * const StatusClass::status_strings[] = {
+ QT_TR_N_NOOP("There are %n new message(s)"),
+ QT_TR_N_NOOP("There are %n total message(s)")
+};
+
+QString StatusClass::status(int type, int count)
+{
+ return tr(status_strings[type], nullptr, count);
+}
+//! [qttrnnoop]
+
+//! [qttranslatennoop]
+static const char * const greeting_strings[] = {
+ QT_TRANSLATE_N_NOOP("Welcome Msg", "Hello, you have %n message(s)"),
+ QT_TRANSLATE_N_NOOP("Welcome Msg", "Hi, you have %n message(s)")
+};
+
+QString global_greeting(int type, int msgcnt)
+{
+ return translate("Welcome Msg", greeting_strings[type], nullptr, msgcnt);
+}
+//! [qttranslatennoop]
+
+//! [qttranslatennoop3]
+static { const char * const source; const char * const comment; } status_strings[] = {
+ QT_TRANSLATE_N_NOOP3("Message Status", "Hello, you have %n message(s)",
+ "A login message status"),
+ QT_TRANSLATE_N_NOOP3("Message status", "You have %n new message(s)",
+ "A new message query status")
+};
+
+QString FriendlyConversation::greeting(int type, int count)
+{
+ return tr(status_strings[type].source,
+ status_strings[type].comment, count);
+}
+
+QString global_greeting(int type, int count)
+{
+ return qApp->translate("Message Status",
+ status_strings[type].source,
+ status_strings[type].comment,
+ count);
+}
+//! [qttranslatennoop3]
+
+
//! [qttrid]
//% "%n fooish bar(s) found.\n"
//% "Do you want to continue?"
diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp
index d163129d54..3394358003 100644
--- a/src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp
@@ -353,9 +353,21 @@ long dec = str.toLong(&ok, 10); // dec == 0, ok == false
//! [38]
QByteArray string("1234.56");
-double a = string.toDouble(); // a == 1234.56
+bool ok;
+double a = string.toDouble(&ok); // a == 1234.56, ok == true
+
+string = "1234.56 Volt";
+a = str.toDouble(&ok); // a == 0, ok == false
//! [38]
+//! [38float]
+QByteArray string("1234.56");
+bool ok;
+double a = string.toFloat(&ok); // a == 1234.56, ok == true
+
+string = "1234.56 Volt";
+a = str.toFloat(&ok); // a == 0, ok == false
+//! [38float]
//! [39]
QByteArray text("Qt is great!");
diff --git a/src/corelib/doc/snippets/qstring/main.cpp b/src/corelib/doc/snippets/qstring/main.cpp
index b936f0c057..5b640f3fdc 100644
--- a/src/corelib/doc/snippets/qstring/main.cpp
+++ b/src/corelib/doc/snippets/qstring/main.cpp
@@ -853,6 +853,8 @@ void Widget::toDoubleFunction()
double d;
d = QString( "1234.56e-02" ).toDouble(&ok); // ok == true, d == 12.3456
+
+ d = QString( "1234.56e-02 Volt" ).toDouble(&ok); // ok == false, d == 0
//! [67]
//! [68]
@@ -875,6 +877,9 @@ void Widget::toFloatFunction()
bool ok;
QString str2 = "R2D2";
str2.toFloat(&ok); // returns 0.0, sets ok to false
+
+ QString str3 = "1234.56 Volt";
+ str3.toFloat(&ok); // returns 0.0, sets ok to false
//! [71]
}
diff --git a/src/corelib/doc/src/objectmodel/signalsandslots.qdoc b/src/corelib/doc/src/objectmodel/signalsandslots.qdoc
index 6d3064d217..0cbbef0502 100644
--- a/src/corelib/doc/src/objectmodel/signalsandslots.qdoc
+++ b/src/corelib/doc/src/objectmodel/signalsandslots.qdoc
@@ -361,9 +361,11 @@
You can also connect to functors or C++11 lambdas:
\code
- connect(sender, &QObject::destroyed, [=](){ this->m_objects.remove(sender); });
+ connect(sender, &QObject::destroyed, context, [=](){ this->m_objects.remove(sender); });
\endcode
+ The lambda will be disconnected when the context is destroyed.
+
The other way to connect a signal to a slot is to use QObject::connect()
and the \c{SIGNAL} and \c{SLOT} macros.
The rule about whether to
diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri
index 2b4fd6d661..a4d132a4f4 100644
--- a/src/corelib/global/global.pri
+++ b/src/corelib/global/global.pri
@@ -29,6 +29,7 @@ HEADERS += \
SOURCES += \
global/archdetect.cpp \
+ global/qendian.cpp \
global/qglobal.cpp \
global/qlibraryinfo.cpp \
global/qmalloc.cpp \
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index f46ff73527..9906425f5b 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -898,7 +898,7 @@
/* C11 features supported in GCC 4.7: */
# define Q_COMPILER_STATIC_ASSERT
# endif
-# if Q_CC_GNU >= 409
+# if Q_CC_GNU >= 409 && defined(__has_include)
/* C11 features supported in GCC 4.9: */
# if __has_include(<threads.h>)
# define Q_COMPILER_THREAD_LOCAL
@@ -1152,6 +1152,11 @@
# define Q_REQUIRED_RESULT [[nodiscard]]
#endif
+#if defined(__cpp_enumerator_attributes) && __cpp_enumerator_attributes >= 201411
+# define Q_DECL_ENUMERATOR_DEPRECATED Q_DECL_DEPRECATED
+# define Q_DECL_ENUMERATOR_DEPRECATED_X(x) Q_DECL_DEPRECATED_X(x)
+#endif
+
/*
* Fallback macros to certain compiler features
*/
@@ -1186,6 +1191,12 @@
#ifndef Q_DECL_DEPRECATED_X
# define Q_DECL_DEPRECATED_X(text) Q_DECL_DEPRECATED
#endif
+#ifndef Q_DECL_ENUMERATOR_DEPRECATED
+# define Q_DECL_ENUMERATOR_DEPRECATED
+#endif
+#ifndef Q_DECL_ENUMERATOR_DEPRECATED_X
+# define Q_DECL_ENUMERATOR_DEPRECATED_X(x)
+#endif
#ifndef Q_DECL_EXPORT
# define Q_DECL_EXPORT
#endif
diff --git a/src/corelib/global/qendian.qdoc b/src/corelib/global/qendian.cpp
index 65df25a205..5bc5507dd5 100644
--- a/src/corelib/global/qendian.qdoc
+++ b/src/corelib/global/qendian.cpp
@@ -1,11 +1,12 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
-** This file is part of the documentation of the Qt Toolkit.
+** This file is part of the QtCore module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:FDL$
+** $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
@@ -14,17 +15,36 @@
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
** $QT_END_LICENSE$
**
****************************************************************************/
+#include "qendian.h"
+
+#include "qalgorithms.h"
+#include <private/qsimd_p.h>
+
+QT_BEGIN_NAMESPACE
+
/*!
\headerfile <QtEndian>
\title Endian Conversion Functions
@@ -66,8 +86,9 @@
On CPU architectures where the host byte order is little-endian (such as x86) this
will swap the byte order; otherwise it will just read from \a src.
- \note Template type \c{T} can either be a qint16, qint32 or qint64. Other types of
- integers, e.g., qlong, are not applicable.
+ \note Template type \c{T} can either be a quint16, qint16, quint32, qint32,
+ quint64, or qint64. Other types of integers, e.g., qlong, are not
+ applicable.
\note Since Qt 5.7, the type of the \a src parameter is a void pointer.
@@ -90,6 +111,32 @@
unmodified.
*/
/*!
+ \fn template <typename T> T qFromBigEndian(const void *src, qsizetype count, void *dest)
+ \since 5.12
+ \relates <QtEndian>
+
+ Reads \a count big-endian numbers from memory location \a src and stores
+ them in the host byte order representation at \a dest. On CPU architectures
+ where the host byte order is little-endian (such as x86) this will swap the
+ byte order; otherwise it will just perform a \c memcpy from \a src to \a
+ dest.
+
+ \note Template type \c{T} can either be a quint16, qint16, quint32, qint32,
+ quint64, or qint64. Other types of integers, e.g., qlong, are not
+ applicable.
+
+ There are no data alignment constraints for \a src. However, \a dest is
+ expected to be naturally aligned for type \c{T}.
+
+ If \a src and \a dest can be the same pointer, this function will perform
+ an in-place swap (if necessary). If they are not the same, the memory
+ regions must not overlap.
+
+ \sa qFromLittleEndian()
+ \sa qToBigEndian()
+ \sa qToLittleEndian()
+*/
+/*!
\fn template <typename T> T qFromLittleEndian(const void *src)
\since 4.3
\relates <QtEndian>
@@ -99,8 +146,9 @@
On CPU architectures where the host byte order is big-endian (such as PowerPC) this
will swap the byte order; otherwise it will just read from \a src.
- \note Template type \c{T} can either be a qint16, qint32 or qint64. Other types of
- integers, e.g., qlong, are not applicable.
+ \note Template type \c{T} can either be a quint16, qint16, quint32, qint32,
+ quint64, or qint64. Other types of integers, e.g., qlong, are not
+ applicable.
\note Since Qt 5.7, the type of the \a src parameter is a void pointer.
@@ -123,6 +171,32 @@
unmodified.
*/
/*!
+ \fn template <typename T> T qFromLittleEndian(const void *src, qsizetype count, void *dest)
+ \since 5.12
+ \relates <QtEndian>
+
+ Reads \a count little-endian numbers from memory location \a src and stores
+ them in the host byte order representation at \a dest. On CPU architectures
+ where the host byte order is big-endian (such as PowerPC) this will swap the
+ byte order; otherwise it will just perform a \c memcpy from \a src to \a
+ dest.
+
+ \note Template type \c{T} can either be a quint16, qint16, quint32, qint32,
+ quint64, or qint64. Other types of integers, e.g., qlong, are not
+ applicable.
+
+ There are no data alignment constraints for \a src. However, \a dest is
+ expected to be naturally aligned for type \c{T}.
+
+ If \a src and \a dest can be the same pointer, this function will perform
+ an in-place swap (if necessary). If they are not the same, the memory
+ regions must not overlap.
+
+ \sa qFromLittleEndian()
+ \sa qToBigEndian()
+ \sa qToLittleEndian()
+*/
+/*!
\fn template <typename T> void qToBigEndian(T src, void *dest)
\since 4.3
\relates <QtEndian>
@@ -130,7 +204,9 @@
Writes the number \a src with template type \c{T} to the memory location at \a dest
in big-endian byte order.
- Note that template type \c{T} can only be an integer data type (signed or unsigned).
+ \note Template type \c{T} can either be a quint16, qint16, quint32, qint32,
+ quint64, or qint64. Other types of integers, e.g., qlong, are not
+ applicable.
There are no data alignment constraints for \a dest.
@@ -153,6 +229,32 @@
unmodified.
*/
/*!
+ \fn template <typename T> T qToBigEndian(const void *src, qsizetype count, void *dest)
+ \since 5.12
+ \relates <QtEndian>
+
+ Reads \a count numbers from memory location \a src in the host byte order
+ and stores them in big-endian representation at \a dest. On CPU
+ architectures where the host byte order is little-endian (such as x86) this
+ will swap the byte order; otherwise it will just perform a \c memcpy from
+ \a src to \a dest.
+
+ \note Template type \c{T} can either be a quint16, qint16, quint32, qint32,
+ quint64, or qint64. Other types of integers, e.g., qlong, are not
+ applicable.
+
+ There are no data alignment constraints for \a dest. However, \a src is
+ expected to be naturally aligned for type \c{T}.
+
+ If \a src and \a dest can be the same pointer, this function will perform
+ an in-place swap (if necessary). If they are not the same, the memory
+ regions must not overlap.
+
+ \sa qFromLittleEndian()
+ \sa qToBigEndian()
+ \sa qToLittleEndian()
+*/
+/*!
\fn template <typename T> void qToLittleEndian(T src, void *dest)
\since 4.3
\relates <QtEndian>
@@ -160,7 +262,9 @@
Writes the number \a src with template type \c{T} to the memory location at \a dest
in little-endian byte order.
- Note that template type \c{T} can only be an integer data type (signed or unsigned).
+ \note Template type \c{T} can either be a quint16, qint16, quint32, qint32,
+ quint64, or qint64. Other types of integers, e.g., qlong, are not
+ applicable.
There are no data alignment constraints for \a dest.
@@ -182,6 +286,32 @@
will return \a src with the byte order swapped; otherwise it will return \a src
unmodified.
*/
+/*!
+ \fn template <typename T> T qToLittleEndian(const void *src, qsizetype count, void *dest)
+ \since 5.12
+ \relates <QtEndian>
+
+ Reads \a count numbers from memory location \a src in the host byte order
+ and stores them in little-endian representation at \a dest. On CPU
+ architectures where the host byte order is big-endian (such as PowerPC)
+ this will swap the byte order; otherwise it will just perform a \c memcpy
+ from \a src to \a dest.
+
+ \note Template type \c{T} can either be a quint16, qint16, quint32, qint32,
+ quint64, or qint64. Other types of integers, e.g., qlong, are not
+ applicable.
+
+ There are no data alignment constraints for \a dest. However, \a src is
+ expected to be naturally aligned for type \c{T}.
+
+ If \a src and \a dest can be the same pointer, this function will perform
+ an in-place swap (if necessary). If they are not the same, the memory
+ regions must not overlap.
+
+ \sa qFromLittleEndian()
+ \sa qToBigEndian()
+ \sa qToLittleEndian()
+*/
/*!
\class QLEInteger
@@ -200,7 +330,7 @@
\endlist
\note Using this class may be slower than using native integers, so only use it when
- an exact endian is needed.
+ an exact endianness is needed.
*/
/*! \fn template <typename T> QLEInteger<T>::QLEInteger(T value)
@@ -319,7 +449,7 @@
\endlist
\note Using this class may be slower than using native integers, so only use it when
- an exact endian is needed.
+ an exact endianness is needed.
*/
/*! \fn template <typename T> QBEInteger<T>::QBEInteger(T value)
@@ -552,3 +682,158 @@
\sa qint64
*/
+
+#if defined(__SSSE3__)
+using ShuffleMask = uchar[16];
+Q_DECL_ALIGN(16) static const ShuffleMask shuffleMasks[3] = {
+ // 16-bit
+ {1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14},
+ // 32-bit
+ {3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12},
+ // 64-bit
+ {7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8}
+};
+
+static size_t sseSwapLoop(const uchar *src, size_t bytes, uchar *dst,
+ const __m128i *shuffleMaskPtr) noexcept
+{
+ size_t i = 0;
+ const __m128i shuffleMask = _mm_load_si128(shuffleMaskPtr);
+
+# ifdef __AVX2__
+ const __m256i shuffleMask256 = _mm256_inserti128_si256(_mm256_castsi128_si256(shuffleMask), shuffleMask, 1);
+ for ( ; i + sizeof(__m256i) <= bytes; i += sizeof(__m256i)) {
+ __m256i data = _mm256_loadu_si256(reinterpret_cast<const __m256i *>(src + i));
+ data = _mm256_shuffle_epi8(data, shuffleMask256);
+ _mm256_storeu_si256(reinterpret_cast<__m256i *>(dst + i), data);
+ }
+# else
+ for ( ; i + 2 * sizeof(__m128i) <= bytes; i += 2 * sizeof(__m128i)) {
+ __m128i data1 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(src + i));
+ __m128i data2 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(src + i) + 1);
+ data1 = _mm_shuffle_epi8(data1, shuffleMask);
+ data2 = _mm_shuffle_epi8(data2, shuffleMask);
+ _mm_storeu_si128(reinterpret_cast<__m128i *>(dst + i), data1);
+ _mm_storeu_si128(reinterpret_cast<__m128i *>(dst + i) + 1, data2);
+ }
+# endif
+
+ if (i + sizeof(__m128i) <= bytes) {
+ __m128i data = _mm_loadu_si128(reinterpret_cast<const __m128i *>(src + i));
+ data = _mm_shuffle_epi8(data, shuffleMask);
+ _mm_storeu_si128(reinterpret_cast<__m128i *>(dst + i), data);
+ i += sizeof(__m128i);
+ }
+
+ return i;
+}
+
+template <typename T> static Q_ALWAYS_INLINE
+size_t simdSwapLoop(const uchar *src, size_t bytes, uchar *dst) noexcept
+{
+ auto shuffleMaskPtr = reinterpret_cast<const __m128i *>(shuffleMasks[0]);
+ shuffleMaskPtr += qCountTrailingZeroBits(sizeof(T)) - 1;
+ size_t i = sseSwapLoop(src, bytes, dst, shuffleMaskPtr);
+
+ // epilogue
+ for (size_t _i = 0 ; i < bytes && _i < sizeof(__m128i); i += sizeof(T), _i += sizeof(T))
+ qbswap(qFromUnaligned<T>(src + i), dst + i);
+
+ // return the total, so the bswapLoop below does nothing
+ return bytes;
+}
+#elif defined(__SSE2__)
+template <typename T> static
+size_t simdSwapLoop(const uchar *, size_t, uchar *) noexcept
+{
+ // no generic version: we can't do 32- and 64-bit swaps easily,
+ // so we won't try
+ return 0;
+}
+
+template <> size_t simdSwapLoop<quint16>(const uchar *src, size_t bytes, uchar *dst) noexcept
+{
+ auto swapEndian = [](__m128i &data) {
+ __m128i lows = _mm_srli_epi16(data, 8);
+ __m128i highs = _mm_slli_epi16(data, 8);
+ data = _mm_xor_si128(lows, highs);
+ };
+
+ size_t i = 0;
+ for ( ; i + 2 * sizeof(__m128i) <= bytes; i += 2 * sizeof(__m128i)) {
+ __m128i data1 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(src + i));
+ __m128i data2 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(src + i) + 1);
+ swapEndian(data1);
+ swapEndian(data2);
+ _mm_storeu_si128(reinterpret_cast<__m128i *>(dst + i), data1);
+ _mm_storeu_si128(reinterpret_cast<__m128i *>(dst + i) + 1, data2);
+ }
+
+ if (i + sizeof(__m128i) <= bytes) {
+ __m128i data = _mm_loadu_si128(reinterpret_cast<const __m128i *>(src + i));
+ swapEndian(data);
+ _mm_storeu_si128(reinterpret_cast<__m128i *>(dst + i), data);
+ i += sizeof(__m128i);
+ }
+
+ // epilogue
+ for (size_t _i = 0 ; i < bytes && _i < sizeof(__m128i); i += sizeof(quint16), _i += sizeof(quint16))
+ qbswap(qFromUnaligned<quint16>(src + i), dst + i);
+
+ // return the total, so the bswapLoop below does nothing
+ return bytes;
+}
+#else
+template <typename T> static Q_ALWAYS_INLINE
+size_t simdSwapLoop(const uchar *, size_t, uchar *) noexcept
+{
+ return 0;
+}
+#endif
+
+template <typename T> static Q_ALWAYS_INLINE
+void *bswapLoop(const uchar *src, size_t n, uchar *dst) noexcept
+{
+ // Buffers cannot partially overlap: either they're identical or totally
+ // disjoint (note: they can be adjacent).
+ if (src != dst) {
+ quintptr s = quintptr(src);
+ quintptr d = quintptr(dst);
+ if (s < d)
+ Q_ASSERT(s + n <= d);
+ else
+ Q_ASSERT(d + n <= s);
+ }
+
+ size_t i = simdSwapLoop<T>(src, n, dst);
+
+ for ( ; i < n; i += sizeof(T))
+ qbswap(qFromUnaligned<T>(src + i), dst + i);
+ return dst + i;
+}
+
+template <> void *qbswap<2>(const void *source, qsizetype n, void *dest) noexcept
+{
+ const uchar *src = reinterpret_cast<const uchar *>(source);
+ uchar *dst = reinterpret_cast<uchar *>(dest);
+
+ return bswapLoop<quint16>(src, n << 1, dst);
+}
+
+template <> void *qbswap<4>(const void *source, qsizetype n, void *dest) noexcept
+{
+ const uchar *src = reinterpret_cast<const uchar *>(source);
+ uchar *dst = reinterpret_cast<uchar *>(dest);
+
+ return bswapLoop<quint32>(src, n << 2, dst);
+}
+
+template <> void *qbswap<8>(const void *source, qsizetype n, void *dest) noexcept
+{
+ const uchar *src = reinterpret_cast<const uchar *>(source);
+ uchar *dst = reinterpret_cast<uchar *>(dest);
+
+ return bswapLoop<quint64>(src, n << 3, dst);
+}
+
+QT_END_NAMESPACE
diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h
index a14fce23f8..135bc4460b 100644
--- a/src/corelib/global/qendian.h
+++ b/src/corelib/global/qendian.h
@@ -157,6 +157,14 @@ template <typename T> inline void qbswap(const T src, void *dest)
qToUnaligned<T>(qbswap<T>(src), dest);
}
+template <int Size> void *qbswap(const void *source, qsizetype count, void *dest) noexcept;
+template<> inline void *qbswap<1>(const void *source, qsizetype count, void *dest) noexcept
+{
+ return source != dest ? memcpy(dest, source, size_t(count)) : dest;
+}
+template<> Q_CORE_EXPORT void *qbswap<2>(const void *source, qsizetype count, void *dest) noexcept;
+template<> Q_CORE_EXPORT void *qbswap<4>(const void *source, qsizetype count, void *dest) noexcept;
+template<> Q_CORE_EXPORT void *qbswap<8>(const void *source, qsizetype count, void *dest) noexcept;
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
@@ -172,6 +180,15 @@ template <typename T> inline void qToBigEndian(T src, void *dest)
{ qToUnaligned<T>(src, dest); }
template <typename T> inline void qToLittleEndian(T src, void *dest)
{ qbswap<T>(src, dest); }
+
+template <typename T> inline void qToBigEndian(const void *source, qsizetype count, void *dest)
+{ if (source != dest) memcpy(dest, source, count * sizeof(T)); }
+template <typename T> inline void qToLittleEndian(const void *source, qsizetype count, void *dest)
+{ qbswap<sizeof(T)>(source, count, dest); }
+template <typename T> inline void qFromBigEndian(const void *source, qsizetype count, void *dest)
+{ if (source != dest) memcpy(dest, source, count * sizeof(T)); }
+template <typename T> inline void qFromLittleEndian(const void *source, qsizetype count, void *dest)
+{ qbswap<sizeof(T)>(source, count, dest); }
#else // Q_LITTLE_ENDIAN
template <typename T> inline Q_DECL_CONSTEXPR T qToBigEndian(T source)
@@ -187,6 +204,14 @@ template <typename T> inline void qToBigEndian(T src, void *dest)
template <typename T> inline void qToLittleEndian(T src, void *dest)
{ qToUnaligned<T>(src, dest); }
+template <typename T> inline void qToBigEndian(const void *source, qsizetype count, void *dest)
+{ qbswap<sizeof(T)>(source, count, dest); }
+template <typename T> inline void qToLittleEndian(const void *source, qsizetype count, void *dest)
+{ if (source != dest) memcpy(dest, source, count * sizeof(T)); }
+template <typename T> inline void qFromBigEndian(const void *source, qsizetype count, void *dest)
+{ qbswap<sizeof(T)>(source, count, dest); }
+template <typename T> inline void qFromLittleEndian(const void *source, qsizetype count, void *dest)
+{ if (source != dest) memcpy(dest, source, count * sizeof(T)); }
#endif // Q_BYTE_ORDER == Q_BIG_ENDIAN
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index f60e47928c..b52139d5a6 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -650,7 +650,8 @@ Q_STATIC_ASSERT((std::is_same<qsizetype, qptrdiff>::value));
The remaining macros are convenience macros for larger operations:
The QT_TR_NOOP(), QT_TRANSLATE_NOOP(), and QT_TRANSLATE_NOOP3()
macros provide the possibility of marking strings for delayed
- translation.
+ translation. QT_TR_N_NOOP(), QT_TRANSLATE_N_NOOP(), and
+ QT_TRANSLATE_N_NOOP3() are numerator dependent variants of these.
The Q_ASSERT() and Q_ASSERT_X() enables warning messages of various
level of refinement. The Q_FOREACH() and foreach() macros
implement Qt's foreach loop.
@@ -3441,7 +3442,27 @@ int qEnvironmentVariableIntValue(const char *varName, bool *ok) Q_DECL_NOEXCEPT
bool ok_ = true;
const char *endptr;
const qlonglong value = qstrtoll(buffer, &endptr, 0, &ok_);
- if (int(value) != value || *endptr != '\0') { // this is the check in QByteArray::toInt(), keep it in sync
+
+ // Keep the following checks in sync with QByteArray::toInt()
+ if (!ok_) {
+ if (ok)
+ *ok = false;
+ return 0;
+ }
+
+ if (*endptr != '\0') {
+ while (ascii_isspace(*endptr))
+ ++endptr;
+ }
+
+ if (*endptr != '\0') {
+ // we stopped at a non-digit character after converting some digits
+ if (ok)
+ *ok = false;
+ return 0;
+ }
+
+ if (int(value) != value) {
if (ok)
*ok = false;
return 0;
@@ -3746,6 +3767,71 @@ bool qunsetenv(const char *varName)
*/
/*!
+ \macro QT_TR_N_NOOP(sourceText)
+ \relates <QtGlobal>
+ \since 5.12
+
+ Marks the UTF-8 encoded string literal \a sourceText for numerator
+ dependent delayed translation in the current context (class).
+
+ The macro tells lupdate to collect the string, and expands to
+ \a sourceText itself.
+
+ The macro expands to \a sourceText.
+
+ Example:
+
+ \snippet code/src_corelib_global_qglobal.cpp qttrnnoop
+
+ \sa QT_TR_NOOP, {Internationalization with Qt}
+*/
+
+/*!
+ \macro QT_TRANSLATE_N_NOOP(context, sourceText)
+ \relates <QtGlobal>
+ \since 5.12
+
+ Marks the UTF-8 encoded string literal \a sourceText for numerator
+ dependent delayed translation in the given \a context.
+ The \a context is typically a class name and also needs to be
+ specified as a string literal.
+
+ The macro tells lupdate to collect the string, and expands to
+ \a sourceText itself.
+
+ Example:
+
+ \snippet code/src_corelib_global_qglobal.cpp qttranslatennoop
+
+ \sa QT_TRANSLATE_NOOP(), QT_TRANSLATE_N_NOOP3(),
+ {Internationalization with Qt}
+*/
+
+/*!
+ \macro QT_TRANSLATE_N_NOOP3(context, sourceText, comment)
+ \relates <QtGlobal>
+ \since 5.12
+
+ Marks the UTF-8 encoded string literal \a sourceText for numerator
+ dependent delayed translation in the given \a context with the given
+ \a disambiguation.
+ The \a context is typically a class and also needs to be specified
+ as a string literal. The string literal \a disambiguation should be
+ a short semantic tag to tell apart otherwise identical strings.
+
+ The macro tells lupdate to collect the string, and expands to an
+ anonymous struct of the two string literals passed as \a sourceText
+ and \a disambiguation.
+
+ Example:
+
+ \snippet code/src_corelib_global_qglobal.cpp qttranslatennoop3
+
+ \sa QT_TR_NOOP(), QT_TRANSLATE_NOOP(), QT_TRANSLATE_NOOP3(),
+ {Internationalization with Qt}
+*/
+
+/*!
\fn QString qtTrId(const char *id, int n = -1)
\relates <QtGlobal>
\reentrant
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 3684c6b5de..b608489576 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -1034,8 +1034,8 @@ for (auto _container_ = QtPrivate::qMakeForeachContainer(container); \
# endif
#endif
-template <typename T> static inline T *qGetPtrHelper(T *ptr) { return ptr; }
-template <typename Wrapper> static inline typename Wrapper::pointer qGetPtrHelper(const Wrapper &p) { return p.data(); }
+template <typename T> inline T *qGetPtrHelper(T *ptr) { return ptr; }
+template <typename Ptr> inline auto qGetPtrHelper(const Ptr &ptr) -> decltype(ptr.operator->()) { return ptr.operator->(); }
#define Q_DECLARE_PRIVATE(Class) \
inline Class##Private* d_func() { return reinterpret_cast<Class##Private *>(qGetPtrHelper(d_ptr)); } \
@@ -1064,6 +1064,10 @@ template <typename Wrapper> static inline typename Wrapper::pointer qGetPtrHelpe
#ifndef QT_NO_TRANSLATION // ### Qt6: This should enclose the NOOPs above
+#define QT_TR_N_NOOP(x) x
+#define QT_TRANSLATE_N_NOOP(scope, x) x
+#define QT_TRANSLATE_N_NOOP3(scope, x, comment) {x, comment}
+
// Defined in qcoreapplication.cpp
// The better name qTrId() is reserved for an upcoming function which would
// return a much more powerful QStringFormatter instead of a QString.
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index 7444145e82..583364a146 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2016 Olivier Goffart <ogoffart@woboq.com>
-** Copyright (C) 2016 Intel Corporation.
+** Copyright (C) 2018 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -61,6 +61,9 @@
#ifdef Q_OS_WIN
#include <qt_windows.h>
#endif
+#ifdef Q_CC_MSVC
+#include <intrin.h>
+#endif
#if QT_CONFIG(slog2)
#include <sys/slog2.h>
#endif
@@ -1839,7 +1842,31 @@ static void qt_message_fatal(QtMsgType, const QMessageLogContext &context, const
Q_UNUSED(message);
#endif
+#ifdef Q_OS_WIN
+ // std::abort() in the MSVC runtime will call _exit(3) if the abort
+ // behavior is _WRITE_ABORT_MSG - see also _set_abort_behavior(). This is
+ // the default for a debug-mode build of the runtime. Worse, MinGW's
+ // std::abort() implementation (in msvcrt.dll) is basically a call to
+ // _exit(3) too. Unfortunately, _exit() and _Exit() *do* run the static
+ // destructors of objects in DLLs, a violation of the C++ standard (see
+ // [support.start.term]). So we bypass std::abort() and directly
+ // terminate the application.
+
+# ifdef Q_CC_MSVC
+ if (IsProcessorFeaturePresent(PF_FASTFAIL_AVAILABLE))
+ __fastfail(FAST_FAIL_FATAL_APP_EXIT);
+# else
+ RaiseFailFastException(nullptr, nullptr, 0);
+# endif
+
+ // Fallback
+ TerminateProcess(GetCurrentProcess(), STATUS_FATAL_APP_EXIT);
+
+ // Tell the compiler the application has stopped.
+ Q_UNREACHABLE_IMPL();
+#else // !Q_OS_WIN
std::abort();
+#endif
}
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index 31b1823690..288c966eec 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -107,6 +107,7 @@ public:
KeyboardModifierMask = 0xfe000000
};
Q_DECLARE_FLAGS(KeyboardModifiers, KeyboardModifier)
+ Q_DECLARE_OPERATORS_FOR_FLAGS(KeyboardModifiers)
//shorter names for shortcuts
// The use of all-caps identifiers has the potential for clashing with
@@ -163,6 +164,7 @@ public:
MouseButtonMask = 0xffffffff
};
Q_DECLARE_FLAGS(MouseButtons, MouseButton)
+ Q_DECLARE_OPERATORS_FOR_FLAGS(MouseButtons)
enum Orientation {
Horizontal = 0x1,
@@ -170,6 +172,7 @@ public:
};
Q_DECLARE_FLAGS(Orientations, Orientation)
+ Q_DECLARE_OPERATORS_FOR_FLAGS(Orientations)
enum FocusPolicy {
NoFocus = 0,
@@ -225,6 +228,7 @@ public:
};
Q_DECLARE_FLAGS(Alignment, AlignmentFlag)
+ Q_DECLARE_OPERATORS_FOR_FLAGS(Alignment)
enum TextFlag {
TextSingleLine = 0x0100,
@@ -308,6 +312,7 @@ public:
};
Q_DECLARE_FLAGS(WindowFlags, WindowType)
+ Q_DECLARE_OPERATORS_FOR_FLAGS(WindowFlags)
enum WindowState {
WindowNoState = 0x00000000,
@@ -318,6 +323,7 @@ public:
};
Q_DECLARE_FLAGS(WindowStates, WindowState)
+ Q_DECLARE_OPERATORS_FOR_FLAGS(WindowStates)
enum ApplicationState {
ApplicationSuspended = 0x00000000,
@@ -337,6 +343,7 @@ public:
};
Q_DECLARE_FLAGS(ScreenOrientations, ScreenOrientation)
+ Q_DECLARE_OPERATORS_FOR_FLAGS(ScreenOrientations)
enum WidgetAttribute {
WA_Disabled = 0,
@@ -479,6 +486,8 @@ public:
WA_ContentsMarginsRespectsSafeArea = 130,
+ WA_StyleSheetTarget = 131,
+
// Add new attributes before this line
WA_AttributeCount
};
@@ -553,6 +562,7 @@ public:
NoFormatConversion = 0x00000200
};
Q_DECLARE_FLAGS(ImageConversionFlags, ImageConversionFlag)
+ Q_DECLARE_OPERATORS_FOR_FLAGS(ImageConversionFlags)
enum BGMode {
TransparentMode,
@@ -1210,6 +1220,7 @@ public:
};
Q_DECLARE_FLAGS(DockWidgetAreas, DockWidgetArea)
+ Q_DECLARE_OPERATORS_FOR_FLAGS(DockWidgetAreas)
enum ToolBarArea {
LeftToolBarArea = 0x1,
@@ -1227,6 +1238,7 @@ public:
};
Q_DECLARE_FLAGS(ToolBarAreas, ToolBarArea)
+ Q_DECLARE_OPERATORS_FOR_FLAGS(ToolBarAreas)
enum DateFormat {
TextDate, // default Qt
@@ -1285,6 +1297,7 @@ public:
};
Q_DECLARE_FLAGS(Edges, Edge)
+ Q_DECLARE_OPERATORS_FOR_FLAGS(Edges)
enum ConnectionType {
AutoConnection,
@@ -1387,6 +1400,7 @@ public:
ImQueryAll = 0xffffffff
};
Q_DECLARE_FLAGS(InputMethodQueries, InputMethodQuery)
+ Q_DECLARE_OPERATORS_FOR_FLAGS(InputMethodQueries)
enum InputMethodHint {
ImhNone = 0x0,
@@ -1421,6 +1435,7 @@ public:
ImhExclusiveInputMask = 0xffff0000
};
Q_DECLARE_FLAGS(InputMethodHints, InputMethodHint)
+ Q_DECLARE_OPERATORS_FOR_FLAGS(InputMethodHints)
enum EnterKeyType {
EnterKeyDefault,
@@ -1471,6 +1486,7 @@ public:
IgnoreAction = 0x0
};
Q_DECLARE_FLAGS(DropActions, DropAction)
+ Q_DECLARE_OPERATORS_FOR_FLAGS(DropActions)
enum CheckState {
Unchecked,
@@ -1525,6 +1541,7 @@ public:
ItemIsUserTristate = 256
};
Q_DECLARE_FLAGS(ItemFlags, ItemFlag)
+ Q_DECLARE_OPERATORS_FOR_FLAGS(ItemFlags)
enum MatchFlag {
MatchExactly = 0,
@@ -1539,6 +1556,7 @@ public:
MatchRecursive = 64
};
Q_DECLARE_FLAGS(MatchFlags, MatchFlag)
+ Q_DECLARE_OPERATORS_FOR_FLAGS(MatchFlags)
typedef void * HANDLE;
#if QT_DEPRECATED_SINCE(5, 0)
@@ -1563,6 +1581,7 @@ public:
TextBrowserInteraction = TextSelectableByMouse | LinksAccessibleByMouse | LinksAccessibleByKeyboard
};
Q_DECLARE_FLAGS(TextInteractionFlags, TextInteractionFlag)
+ Q_DECLARE_OPERATORS_FOR_FLAGS(TextInteractionFlags)
enum EventPriority {
HighEventPriority = 1,
@@ -1614,6 +1633,7 @@ public:
TouchPointReleased = 0x08
};
Q_DECLARE_FLAGS(TouchPointStates, TouchPointState)
+ Q_DECLARE_OPERATORS_FOR_FLAGS(TouchPointStates)
#ifndef QT_NO_GESTURES
enum GestureState
@@ -1645,6 +1665,7 @@ public:
IgnoredGesturesPropagateToParent = 0x04
};
Q_DECLARE_FLAGS(GestureFlags, GestureFlag)
+ Q_DECLARE_OPERATORS_FOR_FLAGS(GestureFlags)
enum NativeGestureType
{
@@ -1698,6 +1719,7 @@ public:
MouseEventFlagMask = 0xFF
};
Q_DECLARE_FLAGS(MouseEventFlags, MouseEventFlag)
+ Q_DECLARE_OPERATORS_FOR_FLAGS(MouseEventFlags)
enum ChecksumType {
ChecksumIso3309,
@@ -1800,29 +1822,6 @@ public:
#undef QT_Q_ENUM
#undef QT_Q_FLAG
-Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::MouseButtons)
-Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::Orientations)
-Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::KeyboardModifiers)
-Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::WindowFlags)
-Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::Alignment)
-Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::Edges)
-Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::ImageConversionFlags)
-Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::DockWidgetAreas)
-Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::ToolBarAreas)
-Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::WindowStates)
-Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::ScreenOrientations)
-Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::DropActions)
-Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::ItemFlags)
-Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::MatchFlags)
-Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::TextInteractionFlags)
-Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::InputMethodQueries)
-Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::InputMethodHints)
-Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::TouchPointStates)
-Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::MouseEventFlags)
-#ifndef QT_NO_GESTURES
-Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::GestureFlags)
-#endif
-
typedef bool (*qInternalCallback)(void **);
class Q_CORE_EXPORT QInternal {
@@ -1864,16 +1863,6 @@ public:
static bool activateCallbacks(Callback, void **);
};
-#if defined(Q_CLANG_QDOC)
-// Declared here for qdoc; actual declarations in qtextdocument.h
-namespace Qt
-{
- bool mightBeRichText(const QString&);
- QString convertFromPlainText(const QString &plain, WhiteSpaceMode mode = WhiteSpacePre);
- QTextCodec *codecForHtml(const QByteArray &ba);
-}
-#endif // Q_CLANG_QDOC
-
QT_END_NAMESPACE
#endif // QNAMESPACE_H
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 36f2aaee72..6bd72ff059 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -1153,7 +1153,12 @@
the widget's author.
\value WA_StyleSheet Indicates that the widget is styled using a
- \l{Qt Style Sheets}{style sheet}.
+ \l{Qt Style Sheets}{style sheet}. WA_StyleSheet is set whenever a widget
+ is subject to a style sheet, even if the style sheet did not affect the
+ widget appearance.
+
+ \value WA_StyleSheetTarget Indicates that the widget appearance was modified
+ by a \l{Qt Style Sheets}{style sheet}. WA_StyleSheet will also be set.
\value WA_TabletTracking Indicates that the widget has tablet
tracking enabled. See QWidget::tabletTracking.
@@ -3226,37 +3231,3 @@
\value ChecksumItuV41 Checksum calculation based on ITU-V.41.
*/
-
-/*!
- \fn bool Qt::mightBeRichText(const QString& text)
-
- Returns \c true if the string \a text is likely to be rich text;
- otherwise returns \c false.
-
- This function uses a fast and therefore simple heuristic. It
- mainly checks whether there is something that looks like a tag
- before the first line break. Although the result may be correct
- for common cases, there is no guarantee.
-
- This function is defined in the \c <QTextDocument> header file.
-*/
-
-/*!
- \fn QString Qt::convertFromPlainText(const QString &plain, Qt::WhiteSpaceMode mode)
-
- Converts the plain text string \a plain to an HTML-formatted
- paragraph while preserving most of its look.
-
- \a mode defines how whitespace is handled.
-
- This function is defined in the \c <QTextDocument> header file.
-
- \sa escape(), mightBeRichText()
-*/
-
-/*!
- \fn QTextCodec *Qt::codecForHtml(const QByteArray &ba)
- \internal
-
- This function is defined in the \c <QTextDocument> header file.
-*/
diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h
index 0b260d01e3..9a3dfd776d 100644
--- a/src/corelib/global/qprocessordetection.h
+++ b/src/corelib/global/qprocessordetection.h
@@ -57,7 +57,7 @@
optional and usually dependent on how the compiler was invoked. Variants
that are a superset of another should have a define for the superset.
- In addition to the procesor family, variants, and revisions, we also set
+ In addition to the processor family, variants, and revisions, we also set
Q_BYTE_ORDER appropriately for the target processor. For bi-endian
processors, we try to auto-detect the byte order using the __BIG_ENDIAN__,
__LITTLE_ENDIAN__, or __BYTE_ORDER__ preprocessor macros.
diff --git a/src/corelib/global/qtrace_p.h b/src/corelib/global/qtrace_p.h
index ab8fc14af5..3d04a7311d 100644
--- a/src/corelib/global/qtrace_p.h
+++ b/src/corelib/global/qtrace_p.h
@@ -109,6 +109,8 @@
* qcoreapplication_baz above.
*/
+#include <QtCore/qglobal.h>
+
QT_BEGIN_NAMESPACE
#if defined(Q_TRACEPOINT) && !defined(QT_BOOTSTRAPPED)
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index e4d384e4ca..06eacf5455 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -2035,7 +2035,7 @@ QString QDir::homePath()
Returns the system's temporary directory.
- The directory is constructed using the absolute path of the temporary directory,
+ The directory is constructed using the absolute canonical path of the temporary directory,
ensuring that its path() will be the same as its absolutePath().
See tempPath() for details.
@@ -2044,7 +2044,7 @@ QString QDir::homePath()
*/
/*!
- Returns the absolute path of the system's temporary directory.
+ Returns the absolute canonical path of the system's temporary directory.
On Unix/Linux systems this is the path in the \c TMPDIR environment
variable or \c{/tmp} if \c TMPDIR is not defined. On Windows this is
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index 0c9cdb8667..7975ac1d96 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -1524,7 +1524,7 @@ QString QFileSystemEngine::tempPath()
temp = QLatin1String(_PATH_TMP);
}
}
- return QDir::cleanPath(temp);
+ return QDir(QDir::cleanPath(temp)).canonicalPath();
#endif
}
diff --git a/src/corelib/io/qfilesystemwatcher_fsevents.mm b/src/corelib/io/qfilesystemwatcher_fsevents.mm
index 0254d0f7a1..f68fb67d79 100644
--- a/src/corelib/io/qfilesystemwatcher_fsevents.mm
+++ b/src/corelib/io/qfilesystemwatcher_fsevents.mm
@@ -499,7 +499,7 @@ bool QFseventsFileSystemWatcherEngine::startStream()
DEBUG() << "Starting stream with paths" << watchingState.watchedPaths.keys();
- NSMutableArray *pathsToWatch = [NSMutableArray arrayWithCapacity:watchingState.watchedPaths.size()];
+ NSMutableArray<NSString *> *pathsToWatch = [NSMutableArray<NSString *> arrayWithCapacity:watchingState.watchedPaths.size()];
for (PathRefCounts::const_iterator i = watchingState.watchedPaths.begin(), ei = watchingState.watchedPaths.end(); i != ei; ++i)
[pathsToWatch addObject:i.key().toNSString()];
diff --git a/src/corelib/io/qfilesystemwatcher_win.cpp b/src/corelib/io/qfilesystemwatcher_win.cpp
index 9e43d11e71..3a49f4346b 100644
--- a/src/corelib/io/qfilesystemwatcher_win.cpp
+++ b/src/corelib/io/qfilesystemwatcher_win.cpp
@@ -57,6 +57,7 @@
# include <qcoreapplication.h>
# include <qdir.h>
# include <private/qeventdispatcher_win_p.h>
+# include <private/qthread_p.h>
# include <dbt.h>
# include <algorithm>
# include <vector>
@@ -308,7 +309,8 @@ void QWindowsRemovableDriveListener::addPath(const QString &p)
notify.dbch_size = sizeof(notify);
notify.dbch_devicetype = DBT_DEVTYP_HANDLE;
notify.dbch_handle = volumeHandle;
- QEventDispatcherWin32 *winEventDispatcher = static_cast<QEventDispatcherWin32 *>(QAbstractEventDispatcher::instance());
+ QThreadData *currentData = QThreadData::current();
+ QEventDispatcherWin32 *winEventDispatcher = static_cast<QEventDispatcherWin32 *>(currentData->ensureEventDispatcher());
re.devNotify = RegisterDeviceNotification(winEventDispatcher->internalHwnd(),
&notify, DEVICE_NOTIFY_WINDOW_HANDLE);
// Empirically found: The notifications also work when the handle is immediately
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index 8199f6a846..93cfd93d7e 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -591,7 +591,6 @@ bool QFSFileEnginePrivate::doStat(QFileSystemMetaData::MetaDataFlags flags) cons
bool QFSFileEngine::link(const QString &newName)
{
#if !defined(Q_OS_WINRT)
-# if QT_CONFIG(library)
bool ret = false;
QString linkName = newName;
@@ -600,23 +599,27 @@ bool QFSFileEngine::link(const QString &newName)
IShellLink *psl;
bool neededCoInit = false;
- HRESULT hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (void **)&psl);
+ HRESULT hres = CoCreateInstance(CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER, IID_IShellLink,
+ reinterpret_cast<void **>(&psl));
if (hres == CO_E_NOTINITIALIZED) { // COM was not initialized
neededCoInit = true;
- CoInitialize(NULL);
- hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (void **)&psl);
+ CoInitialize(nullptr);
+ hres = CoCreateInstance(CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER, IID_IShellLink,
+ reinterpret_cast<void **>(&psl));
}
if (SUCCEEDED(hres)) {
- hres = psl->SetPath((wchar_t *)fileName(AbsoluteName).replace(QLatin1Char('/'), QLatin1Char('\\')).utf16());
+ const QString nativeAbsoluteName = fileName(AbsoluteName).replace(QLatin1Char('/'), QLatin1Char('\\'));
+ hres = psl->SetPath(reinterpret_cast<const wchar_t *>(nativeAbsoluteName.utf16()));
if (SUCCEEDED(hres)) {
- hres = psl->SetWorkingDirectory((wchar_t *)fileName(AbsolutePathName).replace(QLatin1Char('/'), QLatin1Char('\\')).utf16());
+ const QString nativeAbsolutePathName = fileName(AbsolutePathName).replace(QLatin1Char('/'), QLatin1Char('\\'));
+ hres = psl->SetWorkingDirectory(reinterpret_cast<const wchar_t *>(nativeAbsolutePathName.utf16()));
if (SUCCEEDED(hres)) {
IPersistFile *ppf;
- hres = psl->QueryInterface(IID_IPersistFile, (void **)&ppf);
+ hres = psl->QueryInterface(IID_IPersistFile, reinterpret_cast<void **>(&ppf));
if (SUCCEEDED(hres)) {
- hres = ppf->Save((wchar_t*)linkName.utf16(), TRUE);
+ hres = ppf->Save(reinterpret_cast<const wchar_t *>(linkName.utf16()), TRUE);
if (SUCCEEDED(hres))
ret = true;
ppf->Release();
@@ -632,10 +635,6 @@ bool QFSFileEngine::link(const QString &newName)
CoUninitialize();
return ret;
-# else // QT_CONFIG(library)
- Q_UNUSED(newName);
- return false;
-# endif // QT_CONFIG(library)
#else // !Q_OS_WINRT
Q_UNUSED(newName);
Q_UNIMPLEMENTED();
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp
index b1ec2c560c..2e4b5d9cef 100644
--- a/src/corelib/io/qprocess_win.cpp
+++ b/src/corelib/io/qprocess_win.cpp
@@ -149,7 +149,26 @@ static void qt_create_pipe(Q_PIPE *pipe, bool isInputPipe)
}
// Wait until connection is in place.
- ConnectNamedPipe(hServer, NULL);
+ OVERLAPPED overlapped;
+ ZeroMemory(&overlapped, sizeof(overlapped));
+ overlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
+ if (ConnectNamedPipe(hServer, &overlapped) == 0) {
+ DWORD dwError = GetLastError();
+ switch (dwError) {
+ case ERROR_PIPE_CONNECTED:
+ break;
+ case ERROR_IO_PENDING:
+ WaitForSingleObject(overlapped.hEvent, INFINITE);
+ break;
+ default:
+ qErrnoWarning(dwError, "QProcess: ConnectNamedPipe failed.");
+ CloseHandle(overlapped.hEvent);
+ CloseHandle(hClient);
+ CloseHandle(hServer);
+ return;
+ }
+ }
+ CloseHandle(overlapped.hEvent);
if (isInputPipe) {
pipe[0] = hClient;
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp
index 7502fb57a3..367cd78d65 100644
--- a/src/corelib/io/qresource.cpp
+++ b/src/corelib/io/qresource.cpp
@@ -52,7 +52,9 @@
#include "qendian.h"
#include <qshareddata.h>
#include <qplatformdefs.h>
+#include <qendian.h>
#include "private/qabstractfileengine_p.h"
+#include "private/qsimd_p.h"
#include "private/qsystemerror_p.h"
#ifdef Q_OS_UNIX
@@ -629,17 +631,13 @@ inline QString QResourceRoot::name(int node) const
QString ret;
qint32 name_offset = qFromBigEndian<qint32>(tree + offset);
- const qint16 name_length = qFromBigEndian<qint16>(names + name_offset);
+ quint16 name_length = qFromBigEndian<qint16>(names + name_offset);
name_offset += 2;
name_offset += 4; //jump past hash
ret.resize(name_length);
QChar *strData = ret.data();
- for(int i = 0; i < name_length*2; i+=2) {
- QChar c(names[name_offset+i+1], names[name_offset+i]);
- *strData = c;
- ++strData;
- }
+ qFromBigEndian<ushort>(names + name_offset, name_length, strData);
return ret;
}
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp
index 4b1b9888d8..1134c6bb85 100644
--- a/src/corelib/io/qsettings.cpp
+++ b/src/corelib/io/qsettings.cpp
@@ -1694,10 +1694,10 @@ bool QConfFileSettingsPrivate::readIniFile(const QByteArray &data,
iniSection = iniSection.trimmed();
- if (qstricmp(iniSection.constData(), "general") == 0) {
+ if (iniSection.compare("general", Qt::CaseInsensitive) == 0) {
currentSection.clear();
} else {
- if (qstricmp(iniSection.constData(), "%general") == 0) {
+ if (iniSection.compare("%general", Qt::CaseInsensitive) == 0) {
currentSection = QLatin1String(iniSection.constData() + 1);
} else {
currentSection.clear();
@@ -1857,7 +1857,7 @@ bool QConfFileSettingsPrivate::writeIniFile(QIODevice &device, const ParsedSetti
if (realSection.isEmpty()) {
realSection = "[General]";
- } else if (qstricmp(realSection.constData(), "general") == 0) {
+ } else if (realSection.compare("general", Qt::CaseInsensitive) == 0) {
realSection = "[%General]";
} else {
realSection.prepend('[');
diff --git a/src/corelib/io/qurlrecode.cpp b/src/corelib/io/qurlrecode.cpp
index a9b23babc0..0c7b1df716 100644
--- a/src/corelib/io/qurlrecode.cpp
+++ b/src/corelib/io/qurlrecode.cpp
@@ -40,6 +40,7 @@
#include "qurl.h"
#include "private/qutfcodec_p.h"
#include "private/qtools_p.h"
+#include "private/qsimd_p.h"
QT_BEGIN_NAMESPACE
@@ -474,6 +475,100 @@ non_trivial:
return 0;
}
+/*
+ * Returns true if the input it checked (if it checked anything) is not
+ * encoded. A return of false indicates there's a percent at \a input that
+ * needs to be decoded.
+ */
+#ifdef __SSE2__
+static bool simdCheckNonEncoded(ushort *&output, const ushort *&input, const ushort *end)
+{
+# ifdef __AVX2__
+ const __m256i percents256 = _mm256_broadcastw_epi16(_mm_cvtsi32_si128('%'));
+ const __m128i percents = _mm256_castsi256_si128(percents256);
+# else
+ const __m128i percents = _mm_set1_epi16('%');
+# endif
+
+ uint idx = 0;
+ quint32 mask = 0;
+ if (input + 16 <= end) {
+ qptrdiff offset = 0;
+ for ( ; input + offset + 16 <= end; offset += 16) {
+# ifdef __AVX2__
+ // do 32 bytes at a time using AVX2
+ __m256i data = _mm256_loadu_si256(reinterpret_cast<const __m256i *>(input + offset));
+ __m256i comparison = _mm256_cmpeq_epi16(data, percents256);
+ mask = _mm256_movemask_epi8(comparison);
+
+ if (output)
+ _mm256_storeu_si256(reinterpret_cast<__m256i *>(output + offset), data);
+# else
+ // do 32 bytes at a time using unrolled SSE2
+ __m128i data1 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(input + offset));
+ __m128i data2 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(input + offset + 8));
+ __m128i comparison1 = _mm_cmpeq_epi16(data1, percents);
+ __m128i comparison2 = _mm_cmpeq_epi16(data2, percents);
+ uint mask1 = _mm_movemask_epi8(comparison1);
+ uint mask2 = _mm_movemask_epi8(comparison2);
+
+ if (output) {
+ _mm_storeu_si128(reinterpret_cast<__m128i *>(output + offset), data1);
+ if (!mask1)
+ _mm_storeu_si128(reinterpret_cast<__m128i *>(output + offset + 8), data2);
+ }
+ mask = mask1 | (mask2 << 16);
+# endif
+
+ if (mask) {
+ idx = qCountTrailingZeroBits(mask) / 2;
+ break;
+ }
+ }
+
+ input += offset;
+ if (output)
+ output += offset;
+ } else if (input + 8 <= end) {
+ // do 16 bytes at a time
+ __m128i data = _mm_loadu_si128(reinterpret_cast<const __m128i *>(input));
+ __m128i comparison = _mm_cmpeq_epi16(data, percents);
+ mask = _mm_movemask_epi8(comparison);
+
+ // speculatively store everything
+ if (output)
+ _mm_storeu_si128(reinterpret_cast<__m128i *>(output), data);
+
+ idx = qCountTrailingZeroBits(quint16(mask)) / 2;
+ } else if (input + 4 <= end) {
+ // do 8 bytes only
+ __m128i data = _mm_loadl_epi64(reinterpret_cast<const __m128i *>(input));
+ __m128i comparison = _mm_cmpeq_epi16(data, percents);
+ mask = _mm_movemask_epi8(comparison) & 0xffu;
+
+ if (output)
+ _mm_storel_epi64(reinterpret_cast<__m128i *>(output), data);
+
+ idx = qCountTrailingZeroBits(quint8(mask)) / 2;
+ } else {
+ // no percents found (because we didn't check)
+ return true;
+ }
+
+ // advance to the next non-encoded
+ input += idx;
+ if (output)
+ output += idx;
+
+ return !mask;
+}
+#else
+static bool simdCheckNonEncoded(...)
+{
+ return true;
+}
+#endif
+
/*!
\since 5.0
\internal
@@ -501,13 +596,22 @@ static int decode(QString &appendTo, const ushort *begin, const ushort *end)
const ushort *input = begin;
ushort *output = 0;
while (input != end) {
- if (*input != '%') {
- if (output)
- *output++ = *input;
- ++input;
- continue;
+ if (simdCheckNonEncoded(output, input, end)) {
+ ushort uc = 0;
+ while (input != end) {
+ uc = *input;
+ if (uc == '%')
+ break;
+ if (output)
+ *output++ = uc;
+ ++input;
+ }
+
+ if (uc != '%')
+ break; // we're done
}
+ // something was encoded
if (Q_UNLIKELY(end - input < 3 || !isHex(input[1]) || !isHex(input[2]))) {
// badly-encoded data
appendTo.resize(origSize + (end - begin));
@@ -603,6 +707,9 @@ qt_urlRecode(QString &appendTo, const QChar *begin, const QChar *end,
encoding, actionTable, false);
}
+// qstring.cpp
+bool qt_is_ascii(const char *&ptr, const char *end) Q_DECL_NOTHROW;
+
/*!
\internal
\since 5.0
@@ -623,12 +730,7 @@ QString qt_urlRecodeByteArray(const QByteArray &ba)
// control points below 0x20 are fine in QString
const char *in = ba.constData();
const char *const end = ba.constEnd();
- for ( ; in < end; ++in) {
- if (*in & 0x80)
- break;
- }
-
- if (in == end) {
+ if (qt_is_ascii(in, end)) {
// no non-ASCII found, we're safe to convert to QString
return QString::fromLatin1(ba, ba.size());
}
diff --git a/src/corelib/itemmodels/qsortfilterproxymodel.cpp b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
index 08279cb244..8312318e4c 100644
--- a/src/corelib/itemmodels/qsortfilterproxymodel.cpp
+++ b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
@@ -574,6 +574,19 @@ QVector<QPair<int, int > > QSortFilterProxyModelPrivate::proxy_intervals_for_sou
proxy_intervals.append(QPair<int, int>(first_proxy_item, last_proxy_item));
}
std::stable_sort(proxy_intervals.begin(), proxy_intervals.end());
+ // Consolidate adjacent intervals
+ for (int i = proxy_intervals.size()-1; i > 0; --i) {
+ QPair<int, int> &interval = proxy_intervals[i];
+ QPair<int, int> &preceeding_interval = proxy_intervals[i - 1];
+ if (interval.first == preceeding_interval.second + 1) {
+ preceeding_interval.second = interval.second;
+ interval.first = interval.second = -1;
+ }
+ }
+ proxy_intervals.erase(
+ std::remove_if(proxy_intervals.begin(), proxy_intervals.end(),
+ [](QPair<int, int> &interval) { return interval.first < 0; }),
+ proxy_intervals.end());
return proxy_intervals;
}
diff --git a/src/corelib/kernel/kernel.pri b/src/corelib/kernel/kernel.pri
index c528b16f9c..3f7bf3cd47 100644
--- a/src/corelib/kernel/kernel.pri
+++ b/src/corelib/kernel/kernel.pri
@@ -43,6 +43,7 @@ HEADERS += \
kernel/qsystemerror_p.h \
kernel/qmetatype_p.h \
kernel/qmetatypeswitcher_p.h \
+ kernel/qtestsupport_core.h
SOURCES += \
kernel/qabstracteventdispatcher.cpp \
@@ -69,7 +70,8 @@ SOURCES += \
kernel/qsystemsemaphore.cpp \
kernel/qpointer.cpp \
kernel/qmath.cpp \
- kernel/qsystemerror.cpp
+ kernel/qsystemerror.cpp \
+ kernel/qtestsupport_core.cpp
win32 {
SOURCES += \
diff --git a/src/corelib/kernel/qcore_mac_objc.mm b/src/corelib/kernel/qcore_mac_objc.mm
index 6b11e90a4e..0d7bfad943 100644
--- a/src/corelib/kernel/qcore_mac_objc.mm
+++ b/src/corelib/kernel/qcore_mac_objc.mm
@@ -91,19 +91,20 @@ QT_FOR_EACH_MUTABLE_CORE_GRAPHICS_TYPE(QT_DECLARE_WEAK_QDEBUG_OPERATOR_FOR_CF_TY
QT_END_NAMESPACE
QT_USE_NAMESPACE
@interface QT_MANGLE_NAMESPACE(QMacAutoReleasePoolTracker) : NSObject
-{
+@end
+
+@implementation QT_MANGLE_NAMESPACE(QMacAutoReleasePoolTracker) {
NSAutoreleasePool **m_pool;
}
--(id)initWithPool:(NSAutoreleasePool**)pool;
-@end
-@implementation QT_MANGLE_NAMESPACE(QMacAutoReleasePoolTracker)
--(id)initWithPool:(NSAutoreleasePool**)pool
+
+- (instancetype)initWithPool:(NSAutoreleasePool **)pool
{
- if (self = [super init])
+ if ((self = [self init]))
m_pool = pool;
return self;
}
--(void)dealloc
+
+- (void)dealloc
{
if (*m_pool) {
// The pool is still valid, which means we're not being drained from
diff --git a/src/corelib/kernel/qcore_mac_p.h b/src/corelib/kernel/qcore_mac_p.h
index af939abaac..1161e363b7 100644
--- a/src/corelib/kernel/qcore_mac_p.h
+++ b/src/corelib/kernel/qcore_mac_p.h
@@ -51,18 +51,50 @@
// We mean it.
//
+#include "private/qglobal_p.h"
+
#ifndef __IMAGECAPTURE__
# define __IMAGECAPTURE__
#endif
+// --------------------------------------------------------------------------
+
+#if !defined(QT_BOOTSTRAPPED) && (QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_12) || !defined(Q_OS_MACOS))
+#define QT_USE_APPLE_ACTIVITIES
+
+#if defined(OS_ACTIVITY_OBJECT_API)
+#error The file <os/activity.h> has already been included
+#endif
+
+// We runtime-check all use of the activity APIs, so we can safely build
+// with them included, even if the deployment target is macOS 10.11
+#if QT_MACOS_DEPLOYMENT_TARGET_BELOW(__MAC_10_12)
+#undef __MAC_OS_X_VERSION_MIN_REQUIRED
+#define __MAC_OS_X_VERSION_MIN_REQUIRED __MAC_10_12
+#define DID_OVERRIDE_DEPLOYMENT_TARGET
+#endif
+
+#include <os/activity.h>
+#if !OS_ACTIVITY_OBJECT_API
+#error "Expected activity API to be available"
+#endif
+
+#if defined(DID_OVERRIDE_DEPLOYMENT_TARGET)
+#undef __MAC_OS_X_VERSION_MIN_REQUIRED
+#define __MAC_OS_X_VERSION_MIN_REQUIRED __MAC_10_11
+#undef DID_OVERRIDE_DEPLOYMENT_TARGET
+#endif
+
+#endif
+
+// --------------------------------------------------------------------------
+
#if defined(QT_BOOTSTRAPPED)
#include <ApplicationServices/ApplicationServices.h>
#else
#include <CoreFoundation/CoreFoundation.h>
#endif
-#include "private/qglobal_p.h"
-
#ifdef __OBJC__
#include <Foundation/Foundation.h>
#endif
@@ -215,6 +247,100 @@ private:
// --------------------------------------------------------------------------
+#if defined(QT_USE_APPLE_ACTIVITIES)
+
+QT_END_NAMESPACE
+#include <os/availability.h>
+#define OS_ACTIVITY_AVAILABILITY API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0), watchos(3.0))
+#define OS_ACTIVITY_AVAILABILITY_CHECK __builtin_available(macOS 10.12, iOS 10, tvOS 10, watchOS 3, *)
+QT_BEGIN_NAMESPACE
+
+template <typename T> using QAppleOsType = QAppleRefCounted<T, void *, os_retain, os_release>;
+
+class Q_CORE_EXPORT QAppleLogActivity
+{
+public:
+ QAppleLogActivity() : activity(nullptr) {}
+ QAppleLogActivity(os_activity_t activity) OS_ACTIVITY_AVAILABILITY : activity(activity) {}
+ ~QAppleLogActivity() { if (activity) leave(); }
+
+ QAppleLogActivity(const QAppleLogActivity &) = delete;
+ QAppleLogActivity& operator=(const QAppleLogActivity &) = delete;
+
+ QAppleLogActivity(QAppleLogActivity&& other)
+ : activity(other.activity), state(other.state) { other.activity = nullptr; }
+
+ QAppleLogActivity& operator=(QAppleLogActivity &&other)
+ {
+ if (this != &other) {
+ activity = other.activity;
+ state = other.state;
+ other.activity = nullptr;
+ }
+ return *this;
+ }
+
+ QAppleLogActivity&& enter()
+ {
+ if (activity) {
+ if (OS_ACTIVITY_AVAILABILITY_CHECK)
+ os_activity_scope_enter(static_cast<os_activity_t>(*this), &state);
+ }
+ return std::move(*this);
+ }
+
+ void leave() {
+ if (activity) {
+ if (OS_ACTIVITY_AVAILABILITY_CHECK)
+ os_activity_scope_leave(&state);
+ }
+ }
+
+ operator os_activity_t() OS_ACTIVITY_AVAILABILITY
+ {
+ return reinterpret_cast<os_activity_t>(static_cast<void *>(activity));
+ }
+
+private:
+ // Work around API_AVAILABLE not working for templates by using void*
+ QAppleOsType<void *> activity;
+ os_activity_scope_state_s state;
+};
+
+#define QT_APPLE_LOG_ACTIVITY_CREATE(condition, description, parent) []() { \
+ if (!(condition)) \
+ return QAppleLogActivity(); \
+ if (OS_ACTIVITY_AVAILABILITY_CHECK) \
+ return QAppleLogActivity(os_activity_create(description, parent, OS_ACTIVITY_FLAG_DEFAULT)); \
+ return QAppleLogActivity(); \
+ }()
+
+#define QT_VA_ARGS_CHOOSE(_1, _2, _3, _4, _5, _6, _7, _8, _9, N, ...) N
+#define QT_VA_ARGS_COUNT(...) QT_VA_ARGS_CHOOSE(__VA_ARGS__, 9, 8, 7, 6, 5, 4, 3, 2, 1)
+
+#define QT_OVERLOADED_MACRO(MACRO, ...) _QT_OVERLOADED_MACRO(MACRO, QT_VA_ARGS_COUNT(__VA_ARGS__))(__VA_ARGS__)
+#define _QT_OVERLOADED_MACRO(MACRO, ARGC) _QT_OVERLOADED_MACRO_EXPAND(MACRO, ARGC)
+#define _QT_OVERLOADED_MACRO_EXPAND(MACRO, ARGC) MACRO##ARGC
+
+#define QT_APPLE_LOG_ACTIVITY_WITH_PARENT3(condition, description, parent) QT_APPLE_LOG_ACTIVITY_CREATE(condition, description, parent)
+#define QT_APPLE_LOG_ACTIVITY_WITH_PARENT2(description, parent) QT_APPLE_LOG_ACTIVITY_WITH_PARENT3(true, description, parent)
+#define QT_APPLE_LOG_ACTIVITY_WITH_PARENT(...) QT_OVERLOADED_MACRO(QT_APPLE_LOG_ACTIVITY_WITH_PARENT, __VA_ARGS__)
+
+#define QT_APPLE_LOG_ACTIVITY2(condition, description) QT_APPLE_LOG_ACTIVITY_CREATE(condition, description, OS_ACTIVITY_CURRENT)
+#define QT_APPLE_LOG_ACTIVITY1(description) QT_APPLE_LOG_ACTIVITY2(true, description)
+#define QT_APPLE_LOG_ACTIVITY(...) QT_OVERLOADED_MACRO(QT_APPLE_LOG_ACTIVITY, __VA_ARGS__)
+
+#define QT_APPLE_SCOPED_LOG_ACTIVITY(...) QAppleLogActivity scopedLogActivity = QT_APPLE_LOG_ACTIVITY(__VA_ARGS__).enter();
+
+#else
+// No-ops for macOS 10.11. We don't need to provide QT_APPLE_SCOPED_LOG_ACTIVITY,
+// as all the call sites for that are in code that's only built on 10.12 and above.
+#define QT_APPLE_LOG_ACTIVITY_WITH_PARENT(...)
+#define QT_APPLE_LOG_ACTIVITY(...)
+#endif // QT_DARWIN_PLATFORM_SDK_EQUAL_OR_ABOVE
+
+// -------------------------------------------------------------------------
+
QT_END_NAMESPACE
#endif // QCORE_MAC_P_H
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 4e32f90964..aea8fe6658 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -540,7 +540,7 @@ void QCoreApplicationPrivate::createEventDispatcher()
Q_Q(QCoreApplication);
QThreadData *data = QThreadData::current();
Q_ASSERT(!data->hasEventDispatcher());
- eventDispatcher = QThreadPrivate::createEventDispatcher(data);
+ eventDispatcher = data->createEventDispatcher();
eventDispatcher->setParent(q);
}
@@ -777,7 +777,7 @@ QCoreApplication::QCoreApplication(int &argc, char **argv
void QCoreApplicationPrivate::init()
{
- Q_TRACE(qcoreapplicationprivate_init_entry);
+ Q_TRACE(QCoreApplicationPrivate_init_entry);
#if defined(Q_OS_MACOS)
QMacAutoReleasePool pool;
@@ -872,7 +872,7 @@ void QCoreApplicationPrivate::init()
is_app_running = true; // No longer starting up.
#endif
- Q_TRACE(qcoreapplicationprivate_init_exit);
+ Q_TRACE(QCoreApplicationPrivate_init_exit);
}
/*!
@@ -1185,16 +1185,31 @@ bool QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject *receiver, Q
*/
bool QCoreApplicationPrivate::notify_helper(QObject *receiver, QEvent * event)
{
+ // Note: when adjusting the tracepoints in here
+ // consider adjusting QApplicationPrivate::notify_helper too.
+ Q_TRACE(QCoreApplication_notify_entry, receiver, event, event->type());
+
// send to all application event filters (only does anything in the main thread)
if (QCoreApplication::self
&& receiver->d_func()->threadData->thread == mainThread()
- && QCoreApplication::self->d_func()->sendThroughApplicationEventFilters(receiver, event))
+ && QCoreApplication::self->d_func()->sendThroughApplicationEventFilters(receiver, event)) {
+ Q_TRACE(QCoreApplication_notify_event_filtered, receiver, event, event->type());
return true;
+ }
// send to all receiver event filters
- if (sendThroughObjectEventFilters(receiver, event))
+ if (sendThroughObjectEventFilters(receiver, event)) {
+ Q_TRACE(QCoreApplication_notify_event_filtered, receiver, event, event->type());
return true;
+ }
+
+ Q_TRACE(QCoreApplication_notify_before_delivery, receiver, event, event->type());
+
// deliver the event
- return receiver->event(event);
+ const bool consumed = receiver->event(event);
+
+ Q_TRACE(QCoreApplication_notify_after_delivery, receiver, event, event->type(), consumed);
+
+ return consumed;
}
/*!
@@ -1399,6 +1414,7 @@ void QCoreApplication::exit(int returnCode)
QCoreApplication management of posted events
*****************************************************************************/
+#ifndef QT_NO_QOBJECT
/*!
\fn bool QCoreApplication::sendEvent(QObject *receiver, QEvent *event)
@@ -1413,6 +1429,28 @@ void QCoreApplication::exit(int returnCode)
\sa postEvent(), notify()
*/
+bool QCoreApplication::sendEvent(QObject *receiver, QEvent *event)
+{
+ Q_TRACE(QCoreApplication_sendEvent, receiver, event, event->type());
+
+ if (event)
+ event->spont = false;
+ return notifyInternal2(receiver, event);
+}
+
+/*!
+ \internal
+*/
+bool QCoreApplication::sendSpontaneousEvent(QObject *receiver, QEvent *event)
+{
+ Q_TRACE(QCoreApplication_sendSpontaneousEvent, receiver, event, event->type());
+
+ if (event)
+ event->spont = true;
+ return notifyInternal2(receiver, event);
+}
+
+#endif // QT_NO_QOBJECT
/*!
\since 4.3
@@ -1441,6 +1479,8 @@ void QCoreApplication::exit(int returnCode)
*/
void QCoreApplication::postEvent(QObject *receiver, QEvent *event, int priority)
{
+ Q_TRACE(QCoreApplication_postEvent_entry, receiver, event, event->type());
+
if (receiver == 0) {
qWarning("QCoreApplication::postEvent: Unexpected null receiver");
delete event;
@@ -1477,6 +1517,7 @@ void QCoreApplication::postEvent(QObject *receiver, QEvent *event, int priority)
// if this is one of the compressible events, do compression
if (receiver->d_func()->postedEvents
&& self && self->compressEvent(event, receiver, &data->postEventList)) {
+ Q_TRACE(QCoreApplication_postEvent_event_compressed, receiver, event);
return;
}
@@ -1508,6 +1549,7 @@ void QCoreApplication::postEvent(QObject *receiver, QEvent *event, int priority)
// delete the event on exceptions to protect against memory leaks till the event is
// properly owned in the postEventList
QScopedPointer<QEvent> eventDeleter(event);
+ Q_TRACE(QCoreApplication_postEvent_event_posted, receiver, event, event->type());
data->postEventList.addEvent(QPostEvent(receiver, event, priority));
eventDeleter.take();
event->posted = true;
@@ -1766,8 +1808,7 @@ void QCoreApplicationPrivate::sendPostedEvents(QObject *receiver, int event_type
If \a receiver is null, the events of \a eventType are removed for
all objects. If \a eventType is 0, all the events are removed for
\a receiver. You should never call this function with \a eventType
- of 0. If you do call it in this way, be aware that killing events
- may cause \a receiver to break one or more invariants.
+ of 0.
\threadsafe
*/
@@ -1818,9 +1859,7 @@ void QCoreApplication::removePostedEvents(QObject *receiver, int eventType)
}
locker.unlock();
- for (int i = 0; i < events.count(); ++i) {
- delete events[i];
- }
+ qDeleteAll(events);
}
/*!
@@ -1889,7 +1928,7 @@ bool QCoreApplication::event(QEvent *e)
\value UnicodeUTF8 UTF-8.
\omitvalue Latin1
- \omitvalue DefaultCodec UTF-8.
+ \omitvalue DefaultCodec \omit UTF-8. \endomit
\omitvalue CodecForTr
\sa QObject::tr(), QString::fromUtf8()
diff --git a/src/corelib/kernel/qcoreapplication.h b/src/corelib/kernel/qcoreapplication.h
index a886c9d1d2..3581970765 100644
--- a/src/corelib/kernel/qcoreapplication.h
+++ b/src/corelib/kernel/qcoreapplication.h
@@ -229,14 +229,6 @@ private:
friend class QClassFactory;
};
-#ifndef QT_NO_QOBJECT
-inline bool QCoreApplication::sendEvent(QObject *receiver, QEvent *event)
-{ if (event) event->spont = false; return notifyInternal2(receiver, event); }
-
-inline bool QCoreApplication::sendSpontaneousEvent(QObject *receiver, QEvent *event)
-{ if (event) event->spont = true; return notifyInternal2(receiver, event); }
-#endif
-
#ifdef QT_NO_DEPRECATED
# define QT_DECLARE_DEPRECATED_TR_FUNCTIONS(context)
#else
diff --git a/src/corelib/kernel/qcoreevent.cpp b/src/corelib/kernel/qcoreevent.cpp
index 58ca8279ea..e34fe3f955 100644
--- a/src/corelib/kernel/qcoreevent.cpp
+++ b/src/corelib/kernel/qcoreevent.cpp
@@ -44,6 +44,8 @@
#include "qbasicatomic.h"
+#include <qtcore_tracepoints_p.h>
+
#include <limits>
QT_BEGIN_NAMESPACE
@@ -288,7 +290,9 @@ QT_BEGIN_NAMESPACE
*/
QEvent::QEvent(Type type)
: d(0), t(type), posted(false), spont(false), m_accept(true)
-{}
+{
+ Q_TRACE(QEvent_ctor, this, t);
+}
/*!
\internal
@@ -301,6 +305,7 @@ QEvent::QEvent(const QEvent &other)
: d(other.d), t(other.t), posted(other.posted), spont(other.spont),
m_accept(other.m_accept)
{
+ Q_TRACE(QEvent_ctor, this, t);
// if QEventPrivate becomes available, make sure to implement a
// virtual QEventPrivate *clone() const; function so we can copy here
Q_ASSERT_X(!d, "QEvent", "Impossible, this can't happen: QEventPrivate isn't defined anywhere");
@@ -333,6 +338,7 @@ QEvent &QEvent::operator=(const QEvent &other)
QEvent::~QEvent()
{
+ Q_TRACE(QEvent_dtor, this, t);
if (posted && QCoreApplication::instance())
QCoreApplicationPrivate::removePostedEvent(this);
Q_ASSERT_X(!d, "QEvent", "Impossible, this can't happen: QEventPrivate isn't defined anywhere");
diff --git a/src/corelib/kernel/qcoreglobaldata.cpp b/src/corelib/kernel/qcoreglobaldata.cpp
index e2087b9e64..88a45ef4ee 100644
--- a/src/corelib/kernel/qcoreglobaldata.cpp
+++ b/src/corelib/kernel/qcoreglobaldata.cpp
@@ -55,7 +55,10 @@ QCoreGlobalData::~QCoreGlobalData()
{
#if QT_CONFIG(textcodec)
codecForLocale = 0;
- for (QList<QTextCodec *>::const_iterator it = allCodecs.constBegin(); it != allCodecs.constEnd(); ++it)
+ QList<QTextCodec *> tmp = allCodecs;
+ allCodecs.clear();
+ codecCache.clear();
+ for (QList<QTextCodec *>::const_iterator it = tmp.constBegin(); it != tmp.constEnd(); ++it)
delete *it;
#endif
}
diff --git a/src/corelib/kernel/qdeadlinetimer.cpp b/src/corelib/kernel/qdeadlinetimer.cpp
index 4b9a946dd8..4fba30050d 100644
--- a/src/corelib/kernel/qdeadlinetimer.cpp
+++ b/src/corelib/kernel/qdeadlinetimer.cpp
@@ -39,7 +39,6 @@
#include "qdeadlinetimer.h"
#include "qdeadlinetimer_p.h"
-#include <qpair.h>
QT_BEGIN_NAMESPACE
diff --git a/src/corelib/kernel/qdeadlinetimer.h b/src/corelib/kernel/qdeadlinetimer.h
index 6c10e1025e..1a4ee04a96 100644
--- a/src/corelib/kernel/qdeadlinetimer.h
+++ b/src/corelib/kernel/qdeadlinetimer.h
@@ -43,6 +43,7 @@
#include <QtCore/qelapsedtimer.h>
#include <QtCore/qmetatype.h>
#include <QtCore/qnamespace.h>
+#include <QtCore/qpair.h>
#ifdef max
// un-pollute the namespace. We need std::numeric_limits::max() and std::chrono::duration::max()
@@ -186,6 +187,10 @@ private:
unsigned type;
qint64 rawRemainingTimeNSecs() const Q_DECL_NOTHROW;
+
+public:
+ // This is not a public function, it's here only for Qt's internal convenience...
+ QPair<qint64, unsigned> _q_data() const { return qMakePair(t1, t2); }
};
Q_DECLARE_SHARED(QDeadlineTimer)
diff --git a/src/corelib/kernel/qeventdispatcher_cf.mm b/src/corelib/kernel/qeventdispatcher_cf.mm
index 503836d071..73eeaba03f 100644
--- a/src/corelib/kernel/qeventdispatcher_cf.mm
+++ b/src/corelib/kernel/qeventdispatcher_cf.mm
@@ -58,18 +58,36 @@
QT_USE_NAMESPACE
-@interface QT_MANGLE_NAMESPACE(RunLoopModeTracker) : NSObject {
- QStack<CFStringRef> m_runLoopModes;
-}
+/*!
+ During scroll view panning, and possibly other gestures, UIKit will
+ request a switch to UITrackingRunLoopMode via GSEventPushRunLoopMode,
+ which records the new runloop mode and stops the current runloop.
+
+ Unfortunately the runloop mode is just stored on an internal stack, used
+ when UIKit itself is running the runloop, and is not available through e.g.
+ CFRunLoopCopyCurrentMode, which only knows about the current running
+ runloop mode, not the requested future runloop mode.
+
+ To ensure that we pick up this new runloop mode and use it when calling
+ CFRunLoopRunInMode from processEvents, we listen for the notification
+ emitted by [UIApplication pushRunLoopMode:requester:].
+
+ Without this workaround we end up always running in the default runloop
+ mode, resulting in missing momentum-phases in UIScrollViews such as the
+ emoji keyboard.
+*/
+@interface QT_MANGLE_NAMESPACE(RunLoopModeTracker) : NSObject
@end
QT_NAMESPACE_ALIAS_OBJC_CLASS(RunLoopModeTracker);
-@implementation RunLoopModeTracker
+@implementation RunLoopModeTracker {
+ QStack<CFStringRef> m_runLoopModes;
+}
-- (id) init
+- (instancetype)init
{
- if (self = [super init]) {
+ if ((self = [super init])) {
m_runLoopModes.push(kCFRunLoopDefaultMode);
#if !defined(Q_OS_WATCHOS)
@@ -84,9 +102,9 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(RunLoopModeTracker);
return self;
}
-- (void) dealloc
+- (void)dealloc
{
- [[NSNotificationCenter defaultCenter] removeObserver:self];
+ [NSNotificationCenter.defaultCenter removeObserver:self];
[super dealloc];
}
@@ -95,13 +113,13 @@ static CFStringRef runLoopMode(NSDictionary *dictionary)
{
for (NSString *key in dictionary) {
if (CFStringHasSuffix((CFStringRef)key, CFSTR("RunLoopMode")))
- return (CFStringRef)[dictionary objectForKey: key];
+ return (CFStringRef)dictionary[key];
}
return nil;
}
-- (void) receivedNotification:(NSNotification *) notification
+- (void)receivedNotification:(NSNotification *)notification
{
if (CFStringHasSuffix((CFStringRef)notification.name, CFSTR("RunLoopModePushNotification"))) {
if (CFStringRef mode = runLoopMode(notification.userInfo))
@@ -111,7 +129,7 @@ static CFStringRef runLoopMode(NSDictionary *dictionary)
} else if (CFStringHasSuffix((CFStringRef)notification.name, CFSTR("RunLoopModePopNotification"))) {
CFStringRef mode = runLoopMode(notification.userInfo);
- if (CFStringCompare(mode, [self currentMode], 0) == kCFCompareEqualTo)
+ if (CFStringCompare(mode, self.currentMode, 0) == kCFCompareEqualTo)
m_runLoopModes.pop();
else
qCWarning(lcEventDispatcher) << "Tried to pop run loop mode"
@@ -121,7 +139,7 @@ static CFStringRef runLoopMode(NSDictionary *dictionary)
}
}
-- (CFStringRef) currentMode
+- (CFStringRef)currentMode
{
return m_runLoopModes.top();
}
@@ -233,6 +251,7 @@ QEventLoop *QEventDispatcherCoreFoundation::currentEventLoop() const
*/
bool QEventDispatcherCoreFoundation::processEvents(QEventLoop::ProcessEventsFlags flags)
{
+ QT_APPLE_SCOPED_LOG_ACTIVITY(lcEventDispatcher().isDebugEnabled(), "processEvents");
bool eventsProcessed = false;
if (flags & (QEventLoop::ExcludeUserInputEvents | QEventLoop::ExcludeSocketNotifiers))
@@ -385,6 +404,8 @@ bool QEventDispatcherCoreFoundation::processEvents(QEventLoop::ProcessEventsFlag
bool QEventDispatcherCoreFoundation::processPostedEvents()
{
+ QT_APPLE_SCOPED_LOG_ACTIVITY(lcEventDispatcher().isDebugEnabled(), "processPostedEvents");
+
if (m_processEvents.processedPostedEvents && !(m_processEvents.flags & QEventLoop::EventLoopExec)) {
qCDebug(lcEventDispatcher) << "Already processed events this pass";
return false;
@@ -400,6 +421,8 @@ bool QEventDispatcherCoreFoundation::processPostedEvents()
void QEventDispatcherCoreFoundation::processTimers(CFRunLoopTimerRef timer)
{
+ QT_APPLE_SCOPED_LOG_ACTIVITY(lcEventDispatcher().isDebugEnabled(), "processTimers");
+
if (m_processEvents.processedTimers && !(m_processEvents.flags & QEventLoop::EventLoopExec)) {
qCDebug(lcEventDispatcher) << "Already processed timers this pass";
m_processEvents.deferredUpdateTimers = true;
diff --git a/src/corelib/kernel/qeventdispatcher_winrt.cpp b/src/corelib/kernel/qeventdispatcher_winrt.cpp
index 33753ed507..600c6c38fd 100644
--- a/src/corelib/kernel/qeventdispatcher_winrt.cpp
+++ b/src/corelib/kernel/qeventdispatcher_winrt.cpp
@@ -43,6 +43,8 @@
#include <QtCore/QThread>
#include <QtCore/QHash>
#include <QtCore/QMutex>
+#include <QtCore/QSemaphore>
+#include <QtCore/QSharedPointer>
#include <QtCore/qfunctions_winrt.h>
#include <private/qabstracteventdispatcher_p.h>
#include <private/qcoreapplication_p.h>
@@ -293,6 +295,26 @@ HRESULT QEventDispatcherWinRT::runOnXamlThread(const std::function<HRESULT ()> &
return QWinRTFunctions::await(op);
}
+HRESULT QEventDispatcherWinRT::runOnMainThread(const std::function<HRESULT()> &delegate, int timeout)
+{
+ if (QThread::currentThread() == QCoreApplication::instance()->thread())
+ return delegate();
+
+ auto semaphore = QSharedPointer<QSemaphore>(new QSemaphore);
+ auto ptrSemaphore = new QSharedPointer<QSemaphore>(semaphore);
+ auto result = QSharedPointer<HRESULT>(new HRESULT);
+ auto ptrResult = new QSharedPointer<HRESULT>(result);
+
+ QMetaObject::invokeMethod(QCoreApplication::instance(), [delegate, ptrSemaphore, ptrResult]() {
+ **ptrResult = delegate();
+ delete ptrResult;
+ (*ptrSemaphore)->release();
+ delete ptrSemaphore;
+ }, nullptr);
+
+ return semaphore->tryAcquire(1, timeout) ? *result : E_FAIL;
+}
+
bool QEventDispatcherWinRT::processEvents(QEventLoop::ProcessEventsFlags flags)
{
Q_D(QEventDispatcherWinRT);
diff --git a/src/corelib/kernel/qeventdispatcher_winrt_p.h b/src/corelib/kernel/qeventdispatcher_winrt_p.h
index f69bb9cf3f..8b998a7958 100644
--- a/src/corelib/kernel/qeventdispatcher_winrt_p.h
+++ b/src/corelib/kernel/qeventdispatcher_winrt_p.h
@@ -75,6 +75,7 @@ public:
~QEventDispatcherWinRT();
static HRESULT runOnXamlThread(const std::function<HRESULT()> &delegate, bool waitForRun = true);
+ static HRESULT runOnMainThread(const std::function<HRESULT()> &delegate, int timeout = 100);
bool processEvents(QEventLoop::ProcessEventsFlags flags);
bool hasPendingEvents();
diff --git a/src/corelib/kernel/qeventloop.cpp b/src/corelib/kernel/qeventloop.cpp
index 6034698349..f1d32b15d1 100644
--- a/src/corelib/kernel/qeventloop.cpp
+++ b/src/corelib/kernel/qeventloop.cpp
@@ -101,10 +101,8 @@ QEventLoop::QEventLoop(QObject *parent)
Q_D(QEventLoop);
if (!QCoreApplication::instance() && QCoreApplicationPrivate::threadRequiresCoreApplication()) {
qWarning("QEventLoop: Cannot be used without QApplication");
- } else if (!d->threadData->hasEventDispatcher()) {
- QAbstractEventDispatcher *eventDispatcher = QThreadPrivate::createEventDispatcher(d->threadData);
- d->threadData->eventDispatcher.storeRelease(eventDispatcher);
- eventDispatcher->startingUp();
+ } else {
+ d->threadData->ensureEventDispatcher();
}
}
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp
index fc40668c9a..76e3d0d014 100644
--- a/src/corelib/kernel/qmetatype.cpp
+++ b/src/corelib/kernel/qmetatype.cpp
@@ -65,6 +65,9 @@
# include "qjsonobject.h"
# include "qjsonarray.h"
# include "qjsondocument.h"
+# include "qcborvalue.h"
+# include "qcborarray.h"
+# include "qcbormap.h"
# include "qbytearraylist.h"
#endif
@@ -316,7 +319,7 @@ struct DefinedTypesFilter {
\omitvalue WeakPointerToQObject
\omitvalue TrackingPointerToQObject
\omitvalue WasDeclaredAsMetaType
- \omitvalue IsGadget This type is a Q_GADGET and it's corresponding QMetaObject can be accessed with QMetaType::metaObject Since 5.5.
+ \omitvalue IsGadget \omit This type is a Q_GADGET and it's corresponding QMetaObject can be accessed with QMetaType::metaObject Since 5.5. \endomit
\omitvalue PointerToGadget
*/
@@ -835,15 +838,14 @@ void QMetaType::registerStreamOperators(int idx, SaveOperator saveOp,
}
#endif // QT_NO_DATASTREAM
-#if defined(Q_COMPILER_CONSTEXPR) || (defined(Q_CC_MSVC) && Q_CC_MSVC >= 1900)
// We don't officially support constexpr in MSVC 2015, but the limited support it
// has is enough for the code below.
-# define STRINGIFY_TYPE_NAME(MetaTypeName, TypeId, RealName) \
+#define STRINGIFY_TYPE_NAME(MetaTypeName, TypeId, RealName) \
#RealName "\0"
-# define CALCULATE_TYPE_LEN(MetaTypeName, TypeId, RealName) \
+#define CALCULATE_TYPE_LEN(MetaTypeName, TypeId, RealName) \
short(sizeof(#RealName)),
-# define MAP_TYPE_ID_TO_IDX(MetaTypeName, TypeId, RealName) \
+#define MAP_TYPE_ID_TO_IDX(MetaTypeName, TypeId, RealName) \
TypeId,
namespace {
@@ -911,10 +913,9 @@ template <int... TypeIds> struct MetaTypeOffsets<QtPrivate::IndexesList<TypeIds.
} // anonymous namespace
constexpr MetaTypeOffsets<QtPrivate::Indexes<QMetaType::HighestInternalId + 1>::Value> metaTypeNames {};
-# undef STRINGIFY_TYPE_NAME
-# undef CALCULATE_TYPE_LEN
-# undef MAP_TYPE_ID_TO_IDX
-#endif
+#undef STRINGIFY_TYPE_NAME
+#undef CALCULATE_TYPE_LEN
+#undef MAP_TYPE_ID_TO_IDX
/*!
Returns the type name associated with the given \a typeId, or a null
@@ -926,20 +927,8 @@ constexpr MetaTypeOffsets<QtPrivate::Indexes<QMetaType::HighestInternalId + 1>::
const char *QMetaType::typeName(int typeId)
{
const uint type = typeId;
-#define QT_METATYPE_TYPEID_TYPENAME_CONVERTER(MetaTypeName, TypeId, RealName) \
- case QMetaType::MetaTypeName: return #RealName; break;
-
if (Q_LIKELY(type <= QMetaType::HighestInternalId)) {
-#if defined(Q_COMPILER_CONSTEXPR) || (defined(Q_CC_MSVC) && Q_CC_MSVC >= 1900)
return metaTypeNames[typeId];
-#else
- switch (QMetaType::Type(type)) {
- QT_FOR_EACH_STATIC_TYPE(QT_METATYPE_TYPEID_TYPENAME_CONVERTER)
- case QMetaType::UnknownType:
- case QMetaType::User:
- break;
- }
-#endif
} else if (Q_UNLIKELY(type < QMetaType::User)) {
return nullptr; // It can happen when someone cast int to QVariant::Type, we should not crash...
}
@@ -1360,6 +1349,9 @@ bool QMetaType::save(QDataStream &stream, int type, const void *data)
case QMetaType::QJsonObject:
case QMetaType::QJsonArray:
case QMetaType::QJsonDocument:
+ case QMetaType::QCborValue:
+ case QMetaType::QCborArray:
+ case QMetaType::QCborMap:
return false;
case QMetaType::Nullptr:
stream << *static_cast<const std::nullptr_t *>(data);
@@ -1498,6 +1490,9 @@ bool QMetaType::save(QDataStream &stream, int type, const void *data)
case QMetaType::QEasingCurve:
stream << *static_cast<const NS(QEasingCurve)*>(data);
break;
+ case QMetaType::QCborSimpleType:
+ stream << *static_cast<const quint8 *>(data);
+ break;
#endif // QT_BOOTSTRAPPED
case QMetaType::QFont:
case QMetaType::QPixmap:
@@ -1586,6 +1581,9 @@ bool QMetaType::load(QDataStream &stream, int type, void *data)
case QMetaType::QJsonObject:
case QMetaType::QJsonArray:
case QMetaType::QJsonDocument:
+ case QMetaType::QCborValue:
+ case QMetaType::QCborArray:
+ case QMetaType::QCborMap:
return false;
case QMetaType::Nullptr:
stream >> *static_cast<std::nullptr_t *>(data);
@@ -1730,6 +1728,9 @@ bool QMetaType::load(QDataStream &stream, int type, void *data)
case QMetaType::QEasingCurve:
stream >> *static_cast< NS(QEasingCurve)*>(data);
break;
+ case QMetaType::QCborSimpleType:
+ stream >> *static_cast<quint8 *>(data);
+ break;
#endif // QT_BOOTSTRAPPED
case QMetaType::QFont:
case QMetaType::QPixmap:
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index cf68752f85..48cbe7f00b 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 Intel Corporation.
** Copyright (C) 2014 Olivier Goffart <ogoffart@woboq.com>
** Contact: https://www.qt.io/licensing/
**
@@ -60,6 +61,9 @@
QT_BEGIN_NAMESPACE
+// from qcborcommon.h
+enum class QCborSimpleType : quint8;
+
template <typename T>
struct QMetaTypeId2;
@@ -85,6 +89,7 @@ inline Q_DECL_CONSTEXPR int qMetaTypeId();
F(Float, 38, float) \
F(SChar, 40, signed char) \
F(Nullptr, 51, std::nullptr_t) \
+ F(QCborSimpleType, 52, QCborSimpleType) \
#define QT_FOR_EACH_STATIC_PRIMITIVE_POINTER(F)\
F(VoidStar, 31, void*) \
@@ -125,6 +130,9 @@ inline Q_DECL_CONSTEXPR int qMetaTypeId();
F(QJsonObject, 46, QJsonObject) \
F(QJsonArray, 47, QJsonArray) \
F(QJsonDocument, 48, QJsonDocument) \
+ F(QCborValue, 53, QCborValue) \
+ F(QCborArray, 54, QCborArray) \
+ F(QCborMap, 55, QCborMap) \
QT_FOR_EACH_STATIC_ITEMMODEL_CLASS(F)
#define QT_FOR_EACH_STATIC_CORE_POINTER(F)\
@@ -420,7 +428,7 @@ public:
QT_FOR_EACH_STATIC_TYPE(QT_DEFINE_METATYPE_ID)
FirstCoreType = Bool,
- LastCoreType = Nullptr,
+ LastCoreType = QCborMap,
FirstGuiType = QFont,
LastGuiType = QPolygonF,
FirstWidgetsType = QSizePolicy,
@@ -450,13 +458,18 @@ public:
Void = 43,
Nullptr = 51,
QVariantMap = 8, QVariantList = 9, QVariantHash = 28,
+ QCborSimpleType = 52, QCborValue = 53, QCborArray = 54, QCborMap = 55,
+
+ // Gui types
QFont = 64, QPixmap = 65, QBrush = 66, QColor = 67, QPalette = 68,
QIcon = 69, QImage = 70, QPolygon = 71, QRegion = 72, QBitmap = 73,
QCursor = 74, QKeySequence = 75, QPen = 76, QTextLength = 77, QTextFormat = 78,
QMatrix = 79, QTransform = 80, QMatrix4x4 = 81, QVector2D = 82,
QVector3D = 83, QVector4D = 84, QQuaternion = 85, QPolygonF = 86,
+
+ // Widget types
QSizePolicy = 121,
- LastCoreType = Nullptr,
+ LastCoreType = QCborMap,
LastGuiType = QPolygonF,
User = 1024
};
diff --git a/src/corelib/kernel/qmetatype_p.h b/src/corelib/kernel/qmetatype_p.h
index cef20a5d12..76f43db8d7 100644
--- a/src/corelib/kernel/qmetatype_p.h
+++ b/src/corelib/kernel/qmetatype_p.h
@@ -196,6 +196,10 @@ struct TypeDefinition {
// Ignore these types, as incomplete
#ifdef QT_BOOTSTRAPPED
template<> struct TypeDefinition<QBitArray> { static const bool IsAvailable = false; };
+template<> struct TypeDefinition<QCborArray> { static const bool IsAvailable = false; };
+template<> struct TypeDefinition<QCborMap> { static const bool IsAvailable = false; };
+template<> struct TypeDefinition<QCborSimpleType> { static const bool IsAvailable = false; };
+template<> struct TypeDefinition<QCborValue> { static const bool IsAvailable = false; };
template<> struct TypeDefinition<QEasingCurve> { static const bool IsAvailable = false; };
template<> struct TypeDefinition<QJsonArray> { static const bool IsAvailable = false; };
template<> struct TypeDefinition<QJsonDocument> { static const bool IsAvailable = false; };
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 566f75a6c3..2dcfa33629 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -64,6 +64,7 @@
#include <private/qorderedmutexlocker_p.h>
#include <private/qhooks_p.h>
+#include <qtcore_tracepoints_p.h>
#include <new>
@@ -820,6 +821,7 @@ QObject::QObject(QObject *parent)
#endif
if (Q_UNLIKELY(qtHookData[QHooks::AddQObject]))
reinterpret_cast<QHooks::AddQObjectCallback>(qtHookData[QHooks::AddQObject])(this);
+ Q_TRACE(QObject_ctor, this);
}
/*!
@@ -855,6 +857,7 @@ QObject::QObject(QObjectPrivate &dd, QObject *parent)
#endif
if (Q_UNLIKELY(qtHookData[QHooks::AddQObject]))
reinterpret_cast<QHooks::AddQObjectCallback>(qtHookData[QHooks::AddQObject])(this);
+ Q_TRACE(QObject_ctor, this);
}
/*!
@@ -1030,6 +1033,8 @@ QObject::~QObject()
if (Q_UNLIKELY(qtHookData[QHooks::RemoveQObject]))
reinterpret_cast<QHooks::RemoveQObjectCallback>(qtHookData[QHooks::RemoveQObject])(this);
+ Q_TRACE(QObject_dtor, this);
+
if (d->parent) // remove it from parent object
d->setParent_helper(0);
}
@@ -4533,6 +4538,11 @@ QDebug operator<<(QDebug dbg, const QObject *o)
invoked using QMetaObject::invokeMethod().
Since \c normalMethod() function is not registered in this way, it cannot
be invoked using QMetaObject::invokeMethod().
+
+ If an invokable member function returns a pointer to a QObject or a
+ subclass of QObject and it is invoked from QML, special ownership rules
+ apply. See \l{qtqml-cppintegration-data.html}{Data Type Conversion Between QML and C++}
+ for more information.
*/
/*!
@@ -4803,7 +4813,12 @@ QMetaObject::Connection QObjectPrivate::connectImpl(const QObject *sender, int s
const int *types, const QMetaObject *senderMetaObject)
{
if (!sender || !receiver || !slotObj || !senderMetaObject) {
- qWarning("QObject::connect: invalid null parameter");
+ const char *senderString = sender ? sender->metaObject()->className()
+ : senderMetaObject ? senderMetaObject->className()
+ : "Unknown";
+ const char *receiverString = receiver ? receiver->metaObject()->className()
+ : "Unknown";
+ qWarning("QObject::connect(%s, %s): invalid null parameter", senderString, receiverString);
if (slotObj)
slotObj->destroyIfLastRef();
return QMetaObject::Connection();
diff --git a/src/corelib/kernel/qtestsupport_core.cpp b/src/corelib/kernel/qtestsupport_core.cpp
new file mode 100644
index 0000000000..240e5795db
--- /dev/null
+++ b/src/corelib/kernel/qtestsupport_core.cpp
@@ -0,0 +1,126 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtTest 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qtestsupport_core.h"
+
+#ifdef Q_OS_WIN
+#include <qt_windows.h>
+#endif
+
+QT_BEGIN_NAMESPACE
+
+Q_CORE_EXPORT void QTestPrivate::qSleep(int ms)
+{
+ Q_ASSERT(ms > 0);
+
+#if defined(Q_OS_WINRT)
+ WaitForSingleObjectEx(GetCurrentThread(), ms, true);
+#elif defined(Q_OS_WIN)
+ Sleep(uint(ms));
+#else
+ struct timespec ts = { time_t(ms / 1000), (ms % 1000) * 1000 * 1000 };
+ nanosleep(&ts, NULL);
+#endif
+}
+
+/*! \fn template <typename Functor> bool qWaitFor(Functor predicate, int timeout)
+ \relates QTest
+
+ Waits for \a timeout milliseconds or until the \a predicate returns true.
+
+ Returns \c true if the \a predicate returned true at any point, otherwise returns \c false.
+
+ Example:
+
+ \code
+ MyObject obj;
+ obj.startup();
+ QTest::qWaitFor([&]() {
+ return obj.isReady();
+ }, 3000);
+ \endcode
+
+ The code above will wait for the object to become ready, for a
+ maximum of three seconds.
+
+ \since 5.10
+*/
+
+
+/*! \fn void qWait(int ms)
+ \relates QTest
+
+ Waits for \a ms milliseconds. While waiting, events will be processed and
+ your test will stay responsive to user interface events or network communication.
+
+ Example:
+
+ \code
+ int i = 0;
+ while (myNetworkServerNotResponding() && i++ < 50)
+ QTest::qWait(250);
+ \endcode
+
+ The code above will wait until the network server is responding for a
+ maximum of about 12.5 seconds.
+
+ \sa QTest::qSleep(), QSignalSpy::wait()
+*/
+Q_CORE_EXPORT void QTest::qWait(int ms)
+{
+ // Ideally this method would be implemented in terms of qWaitFor, with
+ // a predicate that always returns false, but due to a compiler bug in
+ // GCC 6 we can't do that.
+
+ Q_ASSERT(QCoreApplication::instance());
+
+ QDeadlineTimer timer(ms, Qt::PreciseTimer);
+ int remaining = ms;
+ do {
+ QCoreApplication::processEvents(QEventLoop::AllEvents, remaining);
+ QCoreApplication::sendPostedEvents(Q_NULLPTR, QEvent::DeferredDelete);
+ remaining = timer.remainingTime();
+ if (remaining <= 0)
+ break;
+ QTestPrivate::qSleep(qMin(10, remaining));
+ remaining = timer.remainingTime();
+ } while (remaining > 0);
+}
+
+QT_END_NAMESPACE
diff --git a/src/corelib/kernel/qtestsupport_core.h b/src/corelib/kernel/qtestsupport_core.h
new file mode 100644
index 0000000000..7fc0054580
--- /dev/null
+++ b/src/corelib/kernel/qtestsupport_core.h
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtTest 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QTESTSUPPORT_CORE_H
+#define QTESTSUPPORT_CORE_H
+
+#include <QtCore/qcoreapplication.h>
+#include <QtCore/qdeadlinetimer.h>
+
+QT_BEGIN_NAMESPACE
+
+namespace QTestPrivate {
+Q_CORE_EXPORT void qSleep(int ms);
+}
+
+namespace QTest {
+
+template <typename Functor>
+Q_REQUIRED_RESULT static bool qWaitFor(Functor predicate, int timeout = 5000)
+{
+ // We should not spin the event loop in case the predicate is already true,
+ // otherwise we might send new events that invalidate the predicate.
+ if (predicate())
+ return true;
+
+ // qWait() is expected to spin the event loop, even when called with a small
+ // timeout like 1ms, so we we can't use a simple while-loop here based on
+ // the deadline timer not having timed out. Use do-while instead.
+
+ int remaining = timeout;
+ QDeadlineTimer deadline(remaining, Qt::PreciseTimer);
+
+ do {
+ QCoreApplication::processEvents(QEventLoop::AllEvents, remaining);
+ QCoreApplication::sendPostedEvents(nullptr, QEvent::DeferredDelete);
+
+ remaining = deadline.remainingTime();
+ if (remaining > 0)
+ QTestPrivate::qSleep(qMin(10, remaining));
+
+ if (predicate())
+ return true;
+
+ remaining = deadline.remainingTime();
+ } while (remaining > 0);
+
+ return predicate(); // Last chance
+}
+
+Q_CORE_EXPORT void qWait(int ms);
+
+} // namespace QTest
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp
index 3edd1f056e..d8d520ff58 100644
--- a/src/corelib/kernel/qtimer.cpp
+++ b/src/corelib/kernel/qtimer.cpp
@@ -571,6 +571,48 @@ void QTimer::singleShot(int msec, Qt::TimerType timerType, const QObject *receiv
*/
/*!
+ \fn template<typename Functor> QMetaObject::Connection connectTo(Functor functor, Qt::ConnectionType connectionType = Qt::AutoConnection)
+ \since 5.12
+ \overload
+
+ Creates a connection from the timeout() signal to \a functor, and returns a
+ handle to the connection.
+
+ This method is provided for convenience.
+ It's equivalent to calling \c {QObject::connect(timer, &QTimer::timeout, timer, functor, connectionType)}.
+
+ \sa QObject::connect(), timeout()
+*/
+
+/*!
+ \fn template<typename Functor> QMetaObject::Connection connectTo(QObject *context, Functor functor, Qt::ConnectionType connectionType = Qt::AutoConnection)
+ \since 5.12
+ \overload connectTo()
+
+ Creates a connection from the timeout() signal to \a functor to be placed in a specific
+ event loop of \a context, and returns a handle to the connection.
+
+ This method is provided for convenience. It's equivalent to calling
+ \c {QObject::connect(timer, &QTimer::timeout, context, functor, connectionType)}.
+
+ \sa QObject::connect(), timeout()
+*/
+
+/*!
+ \fn template<typename PointerToMemberFunction> QMetaObject::Connection connectTo(QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType connectionType = Qt::AutoConnection)
+ \since 5.12
+ \overload connectTo()
+
+ Creates a connection from the timeout() signal to the \a method in the \a receiver object. Returns
+ a handle to the connection.
+
+ This method is provided for convenience. It's equivalent to calling
+ \c {QObject::connect(timer, &QTimer::timeout, receiver, method, connectionType)}.
+
+ \sa QObject::connect(), timeout()
+*/
+
+/*!
\fn void QTimer::start(std::chrono::milliseconds msec)
\since 5.8
\overload
diff --git a/src/corelib/kernel/qtimer.h b/src/corelib/kernel/qtimer.h
index e6db586aa0..7825bb0798 100644
--- a/src/corelib/kernel/qtimer.h
+++ b/src/corelib/kernel/qtimer.h
@@ -96,6 +96,12 @@ public:
static void singleShot(int msec, const QObject *context, Functor functor);
template<typename Functor, int>
static void singleShot(int msec, Qt::TimerType timerType, const QObject *context, Functor functor);
+ template <typename Functor>
+ QMetaObject::Connection connectTo(Functor slot, Qt::ConnectionType connectionType = Qt::AutoConnection);
+ template <typename Functor>
+ QMetaObject::Connection connectTo(const QObject *context, Functor slot, Qt::ConnectionType connectionType = Qt::AutoConnection);
+ template <typename PointerToMemberFunction>
+ QMetaObject::Connection connectTo(const QObject *receiver, PointerToMemberFunction slot, Qt::ConnectionType connectionType = Qt::AutoConnection);
#else
// singleShot to a QObject slot
template <typename Duration, typename Func1>
@@ -152,6 +158,13 @@ public:
new QtPrivate::QFunctorSlotObject<Func1, 0,
typename QtPrivate::List_Left<void, 0>::Value, void>(std::move(slot)));
}
+
+ template <typename ... Args>
+ QMetaObject::Connection connectTo(Args && ...args)
+ {
+ return QObject::connect(this, &QTimer::timeout, std::forward<Args>(args)... );
+ }
+
#endif
public Q_SLOTS:
diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp
index c868f6d266..744bbfbff5 100644
--- a/src/corelib/kernel/qtranslator.cpp
+++ b/src/corelib/kernel/qtranslator.cpp
@@ -49,6 +49,7 @@
#include "qcoreapplication.h"
#include "qcoreapplication_p.h"
#include "qdatastream.h"
+#include "qendian.h"
#include "qfile.h"
#include "qmap.h"
#include "qalgorithms.h"
@@ -532,7 +533,7 @@ bool QTranslatorPrivate::do_load(const QString &realname, const QString &directo
// memory, so no need to use QFile to copy it again.
Q_ASSERT(!d->resource);
d->resource = new QResource(realname);
- if (resource->isValid() && !resource->isCompressed() && resource->size() > MagicLength
+ if (resource->isValid() && !resource->isCompressed() && resource->size() >= MagicLength
&& !memcmp(resource->data(), magic, MagicLength)) {
d->unmapLength = resource->size();
d->unmapPointer = reinterpret_cast<char *>(const_cast<uchar *>(resource->data()));
@@ -552,7 +553,7 @@ bool QTranslatorPrivate::do_load(const QString &realname, const QString &directo
return false;
qint64 fileSize = file.size();
- if (fileSize <= MagicLength || quint32(-1) <= fileSize)
+ if (fileSize < MagicLength || quint32(-1) <= fileSize)
return false;
{
@@ -857,8 +858,6 @@ bool QTranslatorPrivate::do_load(const uchar *data, int len, const QString &dire
data += blockLen;
}
- if (dependencies.isEmpty() && (!offsetArray || !messageArray))
- ok = false;
if (ok && !isValidNumerusRules(numerusRulesArray, numerusRulesLength))
ok = false;
if (ok) {
@@ -957,8 +956,8 @@ end:
return QString();
QString str = QString((const QChar *)tn, tn_length/2);
if (QSysInfo::ByteOrder == QSysInfo::LittleEndian) {
- for (int i = 0; i < str.length(); ++i)
- str[i] = QChar((str.at(i).unicode() >> 8) + ((str.at(i).unicode() << 8) & 0xff00));
+ QChar *data = str.data();
+ qbswap<sizeof(QChar)>(data, str.length(), data);
}
return str;
}
@@ -1137,8 +1136,8 @@ QString QTranslator::translate(const char *context, const char *sourceText, cons
bool QTranslator::isEmpty() const
{
Q_D(const QTranslator);
- return !d->unmapPointer && !d->unmapLength && !d->messageArray &&
- !d->offsetArray && !d->contextArray && d->subTranslators.isEmpty();
+ return !d->messageArray && !d->offsetArray && !d->contextArray
+ && d->subTranslators.isEmpty();
}
QT_END_NAMESPACE
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index 6192b66487..c2faca4220 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
-** Copyright (C) 2016 Intel Corporation.
+** Copyright (C) 2018 Intel Corporation.
** Copyright (C) 2015 Olivier Goffart <ogoffart@woboq.com>
** Contact: https://www.qt.io/licensing/
**
@@ -60,6 +60,9 @@
#include "qabstractitemmodel.h"
#endif
#ifndef QT_BOOTSTRAPPED
+#include "qcborarray.h"
+#include "qcborcommon.h"
+#include "qcbormap.h"
#include "qjsonvalue.h"
#include "qjsonobject.h"
#include "qjsonarray.h"
@@ -167,6 +170,8 @@ static qlonglong qMetaTypeNumber(const QVariant::Private *d)
#ifndef QT_BOOTSTRAPPED
case QMetaType::QJsonValue:
return v_cast<QJsonValue>(d)->toDouble();
+ case QMetaType::QCborValue:
+ return v_cast<QCborValue>(d)->toInteger();
#endif
}
Q_ASSERT(false);
@@ -205,6 +210,10 @@ static qlonglong qConvertToNumber(const QVariant::Private *d, bool *ok)
case QVariant::Bool:
return qlonglong(d->data.b);
#ifndef QT_BOOTSTRAPPED
+ case QMetaType::QCborValue:
+ if (!v_cast<QCborValue>(d)->isInteger() && !v_cast<QCborValue>(d)->isDouble())
+ break;
+ return qMetaTypeNumber(d);
case QMetaType::QJsonValue:
if (!v_cast<QJsonValue>(d)->isDouble())
break;
@@ -229,7 +238,7 @@ static qlonglong qConvertToNumber(const QVariant::Private *d, bool *ok)
}
QMetaType typeInfo(d->type);
- if (typeInfo.flags() & QMetaType::IsEnumeration) {
+ if (typeInfo.flags() & QMetaType::IsEnumeration || d->type == QMetaType::QCborSimpleType) {
switch (typeInfo.sizeOf()) {
case 1:
return d->is_shared ? *reinterpret_cast<signed char *>(d->data.shared->ptr) : d->data.sc;
@@ -261,6 +270,8 @@ static qreal qConvertToRealNumber(const QVariant::Private *d, bool *ok)
case QMetaType::ULong:
return qreal(qMetaTypeUNumber(d));
#ifndef QT_BOOTSTRAPPED
+ case QMetaType::QCborValue:
+ return v_cast<QCborValue>(d)->toDouble();
case QMetaType::QJsonValue:
return v_cast<QJsonValue>(d)->toDouble();
#endif
@@ -284,6 +295,12 @@ static qulonglong qConvertToUnsignedNumber(const QVariant::Private *d, bool *ok)
case QVariant::Bool:
return qulonglong(d->data.b);
#ifndef QT_BOOTSTRAPPED
+ case QMetaType::QCborValue:
+ if (v_cast<QCborValue>(d)->isDouble())
+ return qulonglong(qConvertToRealNumber(d, ok));
+ if (!v_cast<QCborValue>(d)->isInteger())
+ return false;
+ return qulonglong(qMetaTypeNumber(d));
case QMetaType::QJsonValue:
if (!v_cast<QJsonValue>(d)->isDouble())
break;
@@ -391,6 +408,12 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
case QVariant::String:
*static_cast<QUrl *>(result) = QUrl(*v_cast<QString>(d));
break;
+ case QMetaType::QCborValue:
+ if (v_cast<QCborValue>(d)->isUrl()) {
+ *static_cast<QUrl *>(result) = v_cast<QCborValue>(d)->toUrl();
+ break;
+ }
+ return false;
default:
return false;
}
@@ -476,6 +499,11 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
else if (!v_cast<QJsonValue>(d)->isNull())
return false;
break;
+ case QMetaType::QCborValue:
+ if (v_cast<QCborValue>(d)->isContainer() || v_cast<QCborValue>(d)->isTag())
+ return false;
+ *str = v_cast<QCborValue>(d)->toVariant().toString();
+ break;
#endif
case QVariant::Uuid:
*str = v_cast<QUuid>(d)->toString();
@@ -621,6 +649,14 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
case QVariant::String:
*dt = QDateTime::fromString(*v_cast<QString>(d), Qt::ISODate);
break;
+# ifndef QT_BOOTSTRAPPED
+ case QMetaType::QCborValue:
+ if (v_cast<QCborValue>(d)->isDateTime())
+ *dt = v_cast<QCborValue>(d)->toDateTime();
+ else
+ return false;
+ break;
+# endif
#endif
case QVariant::Date:
*dt = QDateTime(*v_cast<QDate>(d));
@@ -668,6 +704,14 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
case QMetaType::Nullptr:
*ba = QByteArray();
break;
+#ifndef QT_BOOTSTRAPPED
+ case QMetaType::QCborValue:
+ if (v_cast<QCborValue>(d)->isByteArray())
+ *ba = v_cast<QCborValue>(d)->toByteArray();
+ else
+ return false;
+ break;
+#endif
default:
#ifndef QT_NO_QOBJECT
{
@@ -746,6 +790,11 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
*b = qMetaTypeUNumber(d) != Q_UINT64_C(0);
break;
#ifndef QT_BOOTSTRAPPED
+ case QMetaType::QCborValue:
+ *b = v_cast<QCborValue>(d)->toBool();
+ if (!v_cast<QCborValue>(d)->isBool())
+ return false;
+ break;
case QMetaType::QJsonValue:
*b = v_cast<QJsonValue>(d)->toBool(false);
if (!v_cast<QJsonValue>(d)->isBool())
@@ -789,6 +838,11 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
*f = double(qMetaTypeUNumber(d));
break;
#ifndef QT_BOOTSTRAPPED
+ case QMetaType::QCborValue:
+ *f = v_cast<QCborValue>(d)->toDouble();
+ if (!v_cast<QCborValue>(d)->isDouble())
+ return false;
+ break;
case QMetaType::QJsonValue:
*f = v_cast<QJsonValue>(d)->toDouble(0.0);
if (!v_cast<QJsonValue>(d)->isDouble())
@@ -832,6 +886,11 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
*f = float(qMetaTypeUNumber(d));
break;
#ifndef QT_BOOTSTRAPPED
+ case QMetaType::QCborValue:
+ *f = v_cast<QCborValue>(d)->toDouble();
+ if (!v_cast<QCborValue>(d)->isDouble())
+ return false;
+ break;
case QMetaType::QJsonValue:
*f = v_cast<QJsonValue>(d)->toDouble(0.0);
if (!v_cast<QJsonValue>(d)->isDouble())
@@ -856,6 +915,12 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
*static_cast<QVariantList *>(result) =
*static_cast<QList<QVariant> *>(d->data.shared->ptr);
#ifndef QT_BOOTSTRAPPED
+ } else if (d->type == QMetaType::QCborValue) {
+ if (!v_cast<QCborValue>(d)->isArray())
+ return false;
+ *static_cast<QVariantList *>(result) = v_cast<QCborValue>(d)->toArray().toVariantList();
+ } else if (d->type == QMetaType::QCborArray) {
+ *static_cast<QVariantList *>(result) = v_cast<QCborArray>(d)->toVariantList();
} else if (d->type == QMetaType::QJsonValue) {
if (!v_cast<QJsonValue>(d)->isArray())
return false;
@@ -878,6 +943,12 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
for (auto it = hash->begin(); it != end; ++it)
map->insertMulti(it.key(), it.value());
#ifndef QT_BOOTSTRAPPED
+ } else if (d->type == QMetaType::QCborValue) {
+ if (!v_cast<QCborValue>(d)->isMap())
+ return false;
+ *static_cast<QVariantMap *>(result) = v_cast<QCborValue>(d)->toMap().toVariantMap();
+ } else if (d->type == QMetaType::QCborMap) {
+ *static_cast<QVariantMap *>(result) = v_cast<QCborMap>(d)->toVariantMap();
} else if (d->type == QMetaType::QJsonValue) {
if (!v_cast<QJsonValue>(d)->isObject())
return false;
@@ -900,6 +971,12 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
for (auto it = map->begin(); it != end; ++it)
hash->insertMulti(it.key(), it.value());
#ifndef QT_BOOTSTRAPPED
+ } else if (d->type == QMetaType::QCborValue) {
+ if (!v_cast<QCborValue>(d)->isMap())
+ return false;
+ *static_cast<QVariantHash *>(result) = v_cast<QCborValue>(d)->toMap().toVariantHash();
+ } else if (d->type == QMetaType::QCborMap) {
+ *static_cast<QVariantHash *>(result) = v_cast<QCborMap>(d)->toVariantHash();
} else if (d->type == QMetaType::QJsonValue) {
if (!v_cast<QJsonValue>(d)->isObject())
return false;
@@ -950,11 +1027,36 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
case QVariant::ByteArray:
*static_cast<QUuid *>(result) = QUuid(*v_cast<QByteArray>(d));
break;
+#ifndef QT_BOOTSTRAPPED
+ case QMetaType::QCborValue:
+ if (!v_cast<QCborValue>(d)->isUuid())
+ return false;
+ *static_cast<QUuid *>(result) = v_cast<QCborValue>(d)->toUuid();
+ break;
+#endif
default:
return false;
}
break;
+ case QMetaType::Nullptr:
+ *static_cast<std::nullptr_t *>(result) = nullptr;
+ if (QMetaType::typeFlags(t) & (QMetaType::PointerToGadget | QMetaType::PointerToQObject)
+ || d->type == QMetaType::VoidStar) {
+ if (v_cast<const void *>(d) == nullptr)
+ break;
+ }
#ifndef QT_BOOTSTRAPPED
+ if (d->type == QMetaType::QCborValue && v_cast<QCborValue>(d)->isNull())
+ break;
+#endif
+ return false;
+
+#ifndef QT_BOOTSTRAPPED
+ case QMetaType::QRegularExpression:
+ if (d->type != QMetaType::QCborValue || !v_cast<QCborValue>(d)->isRegularExpression())
+ return false;
+ *static_cast<QRegularExpression *>(result) = v_cast<QCborValue>(d)->toRegularExpression();
+ break;
case QMetaType::QJsonValue:
switch (d->type) {
case QMetaType::Nullptr:
@@ -1005,6 +1107,15 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
*static_cast<QJsonValue *>(result) = doc.isArray() ? QJsonValue(doc.array()) : QJsonValue(doc.object());
break;
}
+ case QMetaType::QCborValue:
+ *static_cast<QJsonValue *>(result) = v_cast<QCborValue>(d)->toJsonValue();
+ break;
+ case QMetaType::QCborMap:
+ *static_cast<QJsonValue *>(result) = v_cast<QCborMap>(d)->toJsonObject();
+ break;
+ case QMetaType::QCborArray:
+ *static_cast<QJsonValue *>(result) = v_cast<QCborArray>(d)->toJsonArray();
+ break;
default:
*static_cast<QJsonValue *>(result) = QJsonValue(QJsonValue::Undefined);
return false;
@@ -1028,6 +1139,14 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
return false;
*static_cast<QJsonArray *>(result) = v_cast<QJsonDocument>(d)->array();
break;
+ case QMetaType::QCborValue:
+ if (!v_cast<QCborValue>(d)->isArray())
+ return false;
+ *static_cast<QJsonArray *>(result) = v_cast<QCborValue>(d)->toArray().toJsonArray();
+ break;
+ case QMetaType::QCborArray:
+ *static_cast<QJsonArray *>(result) = v_cast<QCborArray>(d)->toJsonArray();
+ break;
default:
return false;
}
@@ -1050,11 +1169,177 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
return false;
*static_cast<QJsonObject *>(result) = v_cast<QJsonDocument>(d)->object();
break;
+ case QMetaType::QCborValue:
+ if (!v_cast<QCborValue>(d)->isMap())
+ return false;
+ *static_cast<QJsonObject *>(result) = v_cast<QCborValue>(d)->toMap().toJsonObject();
+ break;
+ case QMetaType::QCborMap:
+ *static_cast<QJsonObject *>(result) = v_cast<QCborMap>(d)->toJsonObject();
+ break;
+ default:
+ return false;
+ }
+ break;
+ case QMetaType::QCborSimpleType:
+ if (d->type == QMetaType::QCborValue && v_cast<QCborValue>(d)->isSimpleType()) {
+ *static_cast<QCborSimpleType *>(result) = v_cast<QCborValue>(d)->toSimpleType();
+ break;
+ }
+ return false;
+ case QMetaType::QCborValue:
+ switch (d->type) {
+ case QMetaType::Nullptr:
+ *static_cast<QCborValue *>(result) = QCborValue(QCborValue::Null);
+ break;
+ case QVariant::Bool:
+ *static_cast<QCborValue *>(result) = QCborValue(d->data.b);
+ break;
+ case QMetaType::Int:
+ case QMetaType::UInt:
+ case QMetaType::ULong:
+ case QMetaType::Long:
+ case QMetaType::LongLong:
+ case QMetaType::ULongLong:
+ case QMetaType::UShort:
+ case QMetaType::UChar:
+ case QMetaType::Char:
+ case QMetaType::SChar:
+ case QMetaType::Short:
+ *static_cast<QCborValue *>(result) = QCborValue(qConvertToNumber(d, ok));
+ Q_ASSERT(ok);
+ break;
+ case QMetaType::Double:
+ case QMetaType::Float:
+ *static_cast<QCborValue *>(result) = QCborValue(qConvertToRealNumber(d, ok));
+ Q_ASSERT(ok);
+ break;
+ case QVariant::String:
+ *static_cast<QCborValue *>(result) = *v_cast<QString>(d);
+ break;
+ case QVariant::StringList:
+ *static_cast<QCborValue *>(result) = QCborArray::fromStringList(*v_cast<QStringList>(d));
+ break;
+ case QVariant::ByteArray:
+ *static_cast<QCborValue *>(result) = *v_cast<QByteArray>(d);
+ break;
+ case QVariant::Date:
+ *static_cast<QCborValue *>(result) = QCborValue(QDateTime(*v_cast<QDate>(d)));
+ break;
+ case QVariant::DateTime:
+ *static_cast<QCborValue *>(result) = QCborValue(*v_cast<QDateTime>(d));
+ break;
+ case QVariant::Url:
+ *static_cast<QCborValue *>(result) = QCborValue(*v_cast<QUrl>(d));
+ break;
+ case QVariant::RegularExpression:
+ *static_cast<QCborValue *>(result) = QCborValue(*v_cast<QRegularExpression>(d));
+ break;
+ case QVariant::Uuid:
+ *static_cast<QCborValue *>(result) = QCborValue(*v_cast<QUuid>(d));
+ break;
+ case QVariant::List:
+ *static_cast<QCborValue *>(result) = QCborArray::fromVariantList(*v_cast<QVariantList>(d));
+ break;
+ case QVariant::Map:
+ *static_cast<QCborValue *>(result) = QCborMap::fromVariantMap(*v_cast<QVariantMap>(d));
+ break;
+ case QVariant::Hash:
+ *static_cast<QCborValue *>(result) = QCborMap::fromVariantHash(*v_cast<QVariantHash>(d));
+ break;
+ case QMetaType::QJsonValue:
+ *static_cast<QCborValue *>(result) = QCborValue::fromJsonValue(*v_cast<QJsonValue>(d));
+ break;
+ case QMetaType::QJsonObject:
+ *static_cast<QCborValue *>(result) = QCborMap::fromJsonObject(*v_cast<QJsonObject>(d));
+ break;
+ case QMetaType::QJsonArray:
+ *static_cast<QCborValue *>(result) = QCborArray::fromJsonArray(*v_cast<QJsonArray>(d));
+ break;
+ case QMetaType::QJsonDocument: {
+ QJsonDocument doc = *v_cast<QJsonDocument>(d);
+ if (doc.isArray())
+ *static_cast<QCborValue *>(result) = QCborArray::fromJsonArray(doc.array());
+ else
+ *static_cast<QCborValue *>(result) = QCborMap::fromJsonObject(doc.object());
+ break;
+ }
+ case QMetaType::QCborSimpleType:
+ *static_cast<QCborValue *>(result) = *v_cast<QCborSimpleType>(d);
+ break;
+ case QMetaType::QCborMap:
+ *static_cast<QCborValue *>(result) = *v_cast<QCborMap>(d);
+ break;
+ case QMetaType::QCborArray:
+ *static_cast<QCborValue *>(result) = *v_cast<QCborArray>(d);
+ break;
+ default:
+ *static_cast<QCborValue *>(result) = {};
+ return false;
+ }
+ break;
+ case QMetaType::QCborArray:
+ switch (d->type) {
+ case QVariant::StringList:
+ *static_cast<QCborArray *>(result) = QCborArray::fromStringList(*v_cast<QStringList>(d));
+ break;
+ case QVariant::List:
+ *static_cast<QCborArray *>(result) = QCborArray::fromVariantList(*v_cast<QVariantList>(d));
+ break;
+ case QMetaType::QCborValue:
+ if (!v_cast<QCborValue>(d)->isArray())
+ return false;
+ *static_cast<QCborArray *>(result) = v_cast<QCborValue>(d)->toArray();
+ break;
+ case QMetaType::QJsonDocument:
+ if (!v_cast<QJsonDocument>(d)->isArray())
+ return false;
+ *static_cast<QCborArray *>(result) = QCborArray::fromJsonArray(v_cast<QJsonDocument>(d)->array());
+ break;
+ case QMetaType::QJsonValue:
+ if (!v_cast<QJsonValue>(d)->isArray())
+ return false;
+ *static_cast<QCborArray *>(result) = QCborArray::fromJsonArray(v_cast<QJsonValue>(d)->toArray());
+ break;
+ case QMetaType::QJsonArray:
+ *static_cast<QCborArray *>(result) = QCborArray::fromJsonArray(*v_cast<QJsonArray>(d));
+ break;
+ default:
+ return false;
+ }
+ break;
+ case QMetaType::QCborMap:
+ switch (d->type) {
+ case QVariant::Map:
+ *static_cast<QCborMap *>(result) = QCborMap::fromVariantMap(*v_cast<QVariantMap>(d));
+ break;
+ case QVariant::Hash:
+ *static_cast<QCborMap *>(result) = QCborMap::fromVariantHash(*v_cast<QVariantHash>(d));
+ break;
+ case QMetaType::QCborValue:
+ if (!v_cast<QCborValue>(d)->isMap())
+ return false;
+ *static_cast<QCborMap *>(result) = v_cast<QCborValue>(d)->toMap();
+ break;
+ case QMetaType::QJsonDocument:
+ if (v_cast<QJsonDocument>(d)->isArray())
+ return false;
+ *static_cast<QCborMap *>(result) = QCborMap::fromJsonObject(v_cast<QJsonDocument>(d)->object());
+ break;
+ case QMetaType::QJsonValue:
+ if (!v_cast<QJsonValue>(d)->isObject())
+ return false;
+ *static_cast<QCborMap *>(result) = QCborMap::fromJsonObject(v_cast<QJsonValue>(d)->toObject());
+ break;
+ case QMetaType::QJsonObject:
+ *static_cast<QCborMap *>(result) = QCborMap::fromJsonObject(*v_cast<QJsonObject>(d));
+ break;
default:
return false;
}
break;
#endif
+
default:
#ifndef QT_NO_QOBJECT
if (d->type == QVariant::String || d->type == QVariant::ByteArray) {
@@ -1081,7 +1366,7 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
}
}
#endif
- if (QMetaType::typeFlags(t) & QMetaType::IsEnumeration) {
+ if (QMetaType::typeFlags(t) & QMetaType::IsEnumeration || d->type == QMetaType::QCborSimpleType) {
qlonglong value = qConvertToNumber(d, ok);
if (*ok) {
switch (QMetaType::sizeOf(t)) {
@@ -1175,9 +1460,16 @@ static void customConstruct(QVariant::Private *d, const void *copy)
type.construct(&d->data.ptr, copy);
d->is_shared = false;
} else {
- void *ptr = type.create(copy);
+ // Private::Data contains long long, and long double is the biggest standard type.
+ const size_t maxAlignment =
+ qMax(Q_ALIGNOF(QVariant::Private::Data), Q_ALIGNOF(long double));
+ const size_t s = sizeof(QVariant::PrivateShared);
+ const size_t offset = s + ((s * maxAlignment - s) % maxAlignment);
+ void *data = operator new(offset + size);
+ void *ptr = static_cast<char *>(data) + offset;
+ type.construct(ptr, copy);
d->is_shared = true;
- d->data.shared = new QVariant::PrivateShared(ptr);
+ d->data.shared = new (data) QVariant::PrivateShared(ptr);
}
}
@@ -1186,7 +1478,7 @@ static void customClear(QVariant::Private *d)
if (!d->is_shared) {
QMetaType::destruct(d->type, &d->data.ptr);
} else {
- QMetaType::destroy(d->type, d->data.shared->ptr);
+ QMetaType::destruct(d->type, d->data.shared->ptr);
delete d->data.shared;
}
}
@@ -3272,15 +3564,66 @@ bool QVariant::canConvert(int targetTypeId) const
case QMetaType::QVariantList:
case QMetaType::QVariantMap:
case QMetaType::QVariantHash:
+ case QMetaType::QCborValue:
+ case QMetaType::QCborArray:
+ case QMetaType::QCborMap:
return true;
default:
return false;
}
}
if (currentType == QMetaType::QJsonArray)
- return targetTypeId == QMetaType::QVariantList;
+ return targetTypeId == QMetaType::QVariantList || targetTypeId == QMetaType::QCborValue
+ || targetTypeId == QMetaType::QCborArray;
if (currentType == QMetaType::QJsonObject)
- return targetTypeId == QMetaType::QVariantMap || targetTypeId == QMetaType::QVariantHash;
+ return targetTypeId == QMetaType::QVariantMap || targetTypeId == QMetaType::QVariantHash
+ || targetTypeId == QMetaType::QCborValue || targetTypeId == QMetaType::QCborMap;
+
+ if (currentType == QMetaType::QCborValue || targetTypeId == QMetaType::QCborValue) {
+ switch (currentType == QMetaType::QCborValue ? targetTypeId : currentType) {
+ case QMetaType::UnknownType:
+ case QMetaType::Nullptr:
+ case QMetaType::Bool:
+ case QMetaType::Int:
+ case QMetaType::UInt:
+ case QMetaType::Double:
+ case QMetaType::Float:
+ case QMetaType::ULong:
+ case QMetaType::Long:
+ case QMetaType::LongLong:
+ case QMetaType::ULongLong:
+ case QMetaType::UShort:
+ case QMetaType::UChar:
+ case QMetaType::Char:
+ case QMetaType::SChar:
+ case QMetaType::Short:
+ case QMetaType::QString:
+ case QMetaType::QByteArray:
+ case QMetaType::QDateTime:
+ case QMetaType::QUrl:
+ case QMetaType::QRegularExpression:
+ case QMetaType::QUuid:
+ case QMetaType::QVariantList:
+ case QMetaType::QVariantMap:
+ case QMetaType::QVariantHash:
+ case QMetaType::QJsonValue:
+ case QMetaType::QJsonArray:
+ case QMetaType::QJsonObject:
+ case QMetaType::QJsonDocument:
+ case QMetaType::QCborArray:
+ case QMetaType::QCborMap:
+ case QMetaType::QCborSimpleType:
+ return true;
+ default:
+ return false;
+ }
+ }
+ if (currentType == QMetaType::QCborArray)
+ return targetTypeId == QMetaType::QVariantList || targetTypeId == QMetaType::QCborValue
+ || targetTypeId == QMetaType::QJsonArray;
+ if (currentType == QMetaType::QCborMap)
+ return targetTypeId == QMetaType::QVariantMap || targetTypeId == QMetaType::QVariantHash
+ || targetTypeId == QMetaType::QCborValue || targetTypeId == QMetaType::QJsonObject;
// FIXME It should be LastCoreType intead of Uuid
if (currentType > int(QMetaType::QUuid) || targetTypeId > int(QMetaType::QUuid)) {
@@ -3380,7 +3723,7 @@ bool QVariant::convert(int targetTypeId)
create(targetTypeId, 0);
// Fail if the value is not initialized or was forced null by a previous failed convert.
- if (oldValue.d.is_null)
+ if (oldValue.d.is_null && oldValue.d.type != QMetaType::Nullptr)
return false;
if ((QMetaType::typeFlags(oldValue.userType()) & QMetaType::PointerToQObject) && (QMetaType::typeFlags(targetTypeId) & QMetaType::PointerToQObject)) {
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h
index 9a5fc63d03..ff73c27b6e 100644
--- a/src/corelib/kernel/qvariant.h
+++ b/src/corelib/kernel/qvariant.h
@@ -633,6 +633,7 @@ public:
const_iterator &operator-=(int j);
const_iterator operator+(int j) const;
const_iterator operator-(int j) const;
+ friend inline const_iterator operator+(int j, const_iterator k) { return k + j; }
};
friend struct const_iterator;
@@ -690,6 +691,7 @@ public:
const_iterator &operator-=(int j);
const_iterator operator+(int j) const;
const_iterator operator-(int j) const;
+ friend inline const_iterator operator+(int j, const_iterator k) { return k + j; }
};
friend struct const_iterator;
diff --git a/src/corelib/kernel/qwineventnotifier.cpp b/src/corelib/kernel/qwineventnotifier.cpp
index 24de491326..85d4ad4fa9 100644
--- a/src/corelib/kernel/qwineventnotifier.cpp
+++ b/src/corelib/kernel/qwineventnotifier.cpp
@@ -157,7 +157,6 @@ void QWinEventNotifier::setHandle(HANDLE hEvent)
Q_D(QWinEventNotifier);
setEnabled(false);
d->handleToEvent = hEvent;
- d->signaledCount = 0;
}
/*!
@@ -209,10 +208,12 @@ void QWinEventNotifier::setEnabled(bool enable)
return;
}
- if (enable)
+ if (enable) {
+ d->signaledCount = 0;
eventDispatcher->registerEventNotifier(this);
- else
+ } else {
eventDispatcher->unregisterEventNotifier(this);
+ }
}
/*!
diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp
index a4be18a67f..ec6d98cc3c 100644
--- a/src/corelib/plugin/qfactoryloader.cpp
+++ b/src/corelib/plugin/qfactoryloader.cpp
@@ -117,35 +117,33 @@ void QFactoryLoader::update()
QDir::Files);
QLibraryPrivate *library = 0;
-#ifdef Q_OS_MAC
- // Loading both the debug and release version of the cocoa plugins causes the objective-c runtime
- // to print "duplicate class definitions" warnings. Detect if QFactoryLoader is about to load both,
- // skip one of them (below).
- //
- // ### FIXME find a proper solution
- //
- const bool isLoadingDebugAndReleaseCocoa = plugins.contains(QLatin1String("libqcocoa_debug.dylib"))
- && plugins.contains(QLatin1String("libqcocoa.dylib"));
-#endif
for (int j = 0; j < plugins.count(); ++j) {
QString fileName = QDir::cleanPath(path + QLatin1Char('/') + plugins.at(j));
#ifdef Q_OS_MAC
- if (isLoadingDebugAndReleaseCocoa) {
-#ifdef QT_DEBUG
- if (fileName.contains(QLatin1String("libqcocoa.dylib")))
- continue; // Skip release plugin in debug mode
-#else
- if (fileName.contains(QLatin1String("libqcocoa_debug.dylib")))
- continue; // Skip debug plugin in release mode
-#endif
+ const bool isDebugPlugin = fileName.endsWith(QLatin1String("_debug.dylib"));
+ const bool isDebugLibrary =
+ #ifdef QT_DEBUG
+ true;
+ #else
+ false;
+ #endif
+
+ // Skip mismatching plugins so that we don't end up loading both debug and release
+ // versions of the same Qt libraries (due to the plugin's dependencies).
+ if (isDebugPlugin != isDebugLibrary)
+ continue;
+#elif defined(Q_PROCESSOR_X86)
+ if (fileName.endsWith(QLatin1String(".avx2")) || fileName.endsWith(QLatin1String(".avx512"))) {
+ // ignore AVX2-optimized file, we'll do a bait-and-switch to it later
+ continue;
}
#endif
if (qt_debug_component()) {
qDebug() << "QFactoryLoader::QFactoryLoader() looking at" << fileName;
}
- Q_TRACE(qfactoryloader_update, fileName);
+ Q_TRACE(QFactoryLoader_update, fileName);
library = QLibraryPrivate::findOrCreate(QFileInfo(fileName).canonicalFilePath());
if (!library->isPlugin()) {
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index 31abeaffe4..4b55ead668 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -544,7 +544,7 @@ bool QLibraryPrivate::load()
if (fileName.isEmpty())
return false;
- Q_TRACE(qlibraryprivate_load_entry, fileName);
+ Q_TRACE(QLibraryPrivate_load_entry, fileName);
bool ret = load_sys();
if (qt_debug_component()) {
@@ -562,7 +562,7 @@ bool QLibraryPrivate::load()
installCoverageTool(this);
}
- Q_TRACE(qlibraryprivate_load_exit, ret);
+ Q_TRACE(QLibraryPrivate_load_exit, ret);
return ret;
}
diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp
index 23b9ad6434..7ffd1369b9 100644
--- a/src/corelib/plugin/qlibrary_unix.cpp
+++ b/src/corelib/plugin/qlibrary_unix.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 Intel Corporation
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -43,6 +44,7 @@
#include "qlibrary_p.h"
#include <qcoreapplication.h>
#include <private/qfilesystementry_p.h>
+#include <private/qsimd_p.h>
#include <dlfcn.h>
@@ -178,6 +180,27 @@ bool QLibraryPrivate::load_sys()
prefixes.append(QString());
}
+#if defined(Q_PROCESSOR_X86) && !defined(Q_OS_DARWIN)
+ if (qCpuHasFeature(ArchHaswell)) {
+ auto transform = [](QStringList &list, QString (*f)(QString)) {
+ QStringList tmp;
+ qSwap(tmp, list);
+ list.reserve(tmp.size() * 2);
+ for (const QString &s : qAsConst(tmp)) {
+ list.append(f(s));
+ list.append(s);
+ }
+ };
+ if (pluginState == IsAPlugin) {
+ // add ".avx2" to each suffix in the list
+ transform(suffixes, [](QString s) { return s.append(QLatin1String(".avx2")); });
+ } else {
+ // prepend "haswell/" to each prefix in the list
+ transform(prefixes, [](QString s) { return s.prepend(QLatin1String("haswell/")); });
+ }
+ }
+#endif
+
bool retry = true;
for(int prefix = 0; retry && !pHnd && prefix < prefixes.size(); prefix++) {
for(int suffix = 0; retry && !pHnd && suffix < suffixes.size(); suffix++) {
diff --git a/src/corelib/plugin/qplugin.h b/src/corelib/plugin/qplugin.h
index b644d47856..9922026f97 100644
--- a/src/corelib/plugin/qplugin.h
+++ b/src/corelib/plugin/qplugin.h
@@ -90,7 +90,6 @@ void Q_CORE_EXPORT qRegisterStaticPluginFunction(QStaticPlugin staticPlugin);
# define QT_PLUGIN_METADATA_SECTION \
__declspec(allocate(".qtmetadata"))
#else
-# define QT_PLUGIN_VERIFICATION_SECTION
# define QT_PLUGIN_METADATA_SECTION
#endif
@@ -105,11 +104,21 @@ void Q_CORE_EXPORT qRegisterStaticPluginFunction(QStaticPlugin staticPlugin);
}; \
static Static##PLUGIN##PluginInstance static##PLUGIN##Instance;
+#if defined(QT_PLUGIN_RESOURCE_INIT_FUNCTION)
+# define QT_PLUGIN_RESOURCE_INIT \
+ extern void QT_PLUGIN_RESOURCE_INIT_FUNCTION(); \
+ QT_PLUGIN_RESOURCE_INIT_FUNCTION();
+#else
+# define QT_PLUGIN_RESOURCE_INIT
+#endif
+
#define Q_PLUGIN_INSTANCE(IMPLEMENTATION) \
{ \
static QT_PREPEND_NAMESPACE(QPointer)<QT_PREPEND_NAMESPACE(QObject)> _instance; \
- if (!_instance) \
+ if (!_instance) { \
+ QT_PLUGIN_RESOURCE_INIT \
_instance = new IMPLEMENTATION; \
+ } \
return _instance; \
}
diff --git a/src/corelib/qtcore.tracepoints b/src/corelib/qtcore.tracepoints
index e6b666ac74..2e78490ab5 100644
--- a/src/corelib/qtcore.tracepoints
+++ b/src/corelib/qtcore.tracepoints
@@ -1,5 +1,25 @@
-qcoreapplicationprivate_init_entry()
-qcoreapplicationprivate_init_exit()
-qfactoryloader_update(const QString &fileName)
-qlibraryprivate_load_entry(const QString &fileName)
-qlibraryprivate_load_exit(bool success)
+QCoreApplicationPrivate_init_entry()
+QCoreApplicationPrivate_init_exit()
+
+QFactoryLoader_update(const QString &fileName)
+
+QLibraryPrivate_load_entry(const QString &fileName)
+QLibraryPrivate_load_exit(bool success)
+
+QEvent_ctor(QEvent *event, int type)
+QEvent_dtor(QEvent *event, int type)
+
+QCoreApplication_postEvent_entry(QObject *receiver, QEvent *event, int type)
+QCoreApplication_postEvent_event_compressed(QObject *receiver, QEvent *event)
+QCoreApplication_postEvent_event_posted(QObject *receiver, QEvent *event, int type)
+
+QCoreApplication_sendEvent(QObject *receiver, QEvent *event, int type)
+QCoreApplication_sendSpontaneousEvent(QObject *receiver, QEvent *event, int type)
+
+QCoreApplication_notify_entry(QObject *receiver, QEvent *event, int type)
+QCoreApplication_notify_event_filtered(QObject *receiver, QEvent *event, int type)
+QCoreApplication_notify_before_delivery(QObject *receiver, QEvent *event, int type)
+QCoreApplication_notify_after_delivery(QObject *receiver, QEvent *event, int type, bool consumed)
+
+QObject_ctor(QObject *object)
+QObject_dtor(QObject *object)
diff --git a/src/corelib/serialization/qcborarray.cpp b/src/corelib/serialization/qcborarray.cpp
new file mode 100644
index 0000000000..0280aab8d3
--- /dev/null
+++ b/src/corelib/serialization/qcborarray.cpp
@@ -0,0 +1,1192 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qcborarray.h"
+#include "qcborvalue_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QtCbor;
+
+/*!
+ \class QCborArray
+ \inmodule QtCore
+ \ingroup cbor
+ \reentrant
+ \since 5.12
+
+ \brief The QCborArray class is used to hold an array of CBOR elements.
+
+ This class can be used to hold one sequential container in CBOR (an array).
+ CBOR is the Concise Binary Object Representation, a very compact form of
+ binary data encoding that is a superset of JSON. It was created by the IETF
+ Constrained RESTful Environments (CoRE) WG, which has used it in many new
+ RFCs. It is meant to be used alongside the
+ \l{https://tools.ietf.org/html/rfc7252}{CoAP protocol}.
+
+ QCborArray is very similar to \l QVariantList and \l QJsonArray and its API
+ is almost identical to those two classes. It can also be converted to and
+ from those two, though there may be loss of information in some
+ conversions.
+
+ \sa QCborValue, QCborMap, QJsonArray, QList, QVector
+ */
+
+/*!
+ \typedef QCborArray::size_type
+
+ A typedef to qsizetype.
+ */
+
+/*!
+ \typedef QCborArray::difference_type
+
+ A typedef to qsizetype.
+ */
+
+/*!
+ \typedef QCborArray::value_type
+
+ The type of values that can be held in a QCborArray: that is, QCborValue.
+ */
+
+/*!
+ \typedef QCborArray::pointer
+
+ A typedef to \c{QCborValue *}, for compatibility with generic algorithms.
+ */
+
+/*!
+ \typedef QCborArray::const_pointer
+
+ A typedef to \c{const QCborValue *}, for compatibility with generic algorithms.
+ */
+
+/*!
+ \typedef QCborArray::reference
+
+ A typedef to \c{QCborValue &}, for compatibility with generic algorithms.
+ */
+
+/*!
+ \typedef QCborArray::const_reference
+
+ A typedef to \c{const QCborValue &}, for compatibility with generic algorithms.
+ */
+
+/*!
+ Constructs an empty QCborArray.
+ */
+QCborArray::QCborArray() noexcept
+ : d(nullptr)
+{
+}
+
+/*!
+ Copies the contents of \a other into this object.
+ */
+QCborArray::QCborArray(const QCborArray &other) noexcept
+ : d(other.d)
+{
+}
+
+/*!
+ \fn QCborArray::QCborArray(std::initializer_list<QCborValue> args)
+
+ Initializes this QCborArray from the C++ brace-enclosed list found in \a
+ args, as in the following example:
+
+ \code
+ QCborArray a = { null, 0, 1, 1.5, 2, "Hello", QByteArray("World") };
+ \endcode
+ */
+
+/*!
+ Destroys this QCborArray and frees any associated resources.
+ */
+QCborArray::~QCborArray()
+{
+}
+
+/*!
+ Replaces the contents of this array with that found in \a other, then
+ returns a reference to this object.
+ */
+QCborArray &QCborArray::operator=(const QCborArray &other) noexcept
+{
+ d = other.d;
+ return *this;
+}
+
+/*!
+ \fn void QCborArray::swap(QCborArray &other)
+
+ Swaps the contents of this object and \a other.
+ */
+
+/*!
+ \fn QCborValue QCborArray::toCborValue() const
+
+ Explicitly construcuts a \l QCborValue object that represents this array.
+ This function is usually not necessary since QCborValue has a constructor
+ for QCborArray, so the conversion is implicit.
+
+ Converting QCborArray to QCborValue allows it to be used in any context
+ where QCborValues can be used, including as items in QCborArrays and as keys
+ and mapped types in QCborMap. Converting an array to QCborValue allows
+ access to QCborValue::toCbor().
+
+ \sa QCborValue::QCborValue(const QCborArray &)
+ */
+
+/*!
+ Returns the size of this array.
+
+ \sa isEmpty()
+ */
+qsizetype QCborArray::size() const noexcept
+{
+ return d ? d->elements.size() : 0;
+}
+
+/*!
+ \fn bool QCborArray::isEmpty() const
+
+ Returns true if this QCborArray is empty (that is if size() is 0).
+
+ \sa size()
+ */
+
+/*!
+ Returns the QCborValue element at position \a i in the array.
+
+ If the array is smaller than \a i elements, this function returns a
+ QCborValue containing an undefined value. For that reason, it is not
+ possible with this function to tell apart the situation where the array is
+ not large enough from the case where the array starts with an undefined
+ value.
+
+ \sa operator[](), first(), last(), insert(), prepend(), append(),
+ removeAt(), takeAt()
+ */
+QCborValue QCborArray::at(qsizetype i) const
+{
+ if (!d || size_t(i) >= size_t(size()))
+ return QCborValue();
+ return d->valueAt(i);
+}
+
+/*!
+ \fn QCborValue QCborArray::first() const
+
+ Returns the first QCborValue of this array.
+
+ If the array is empty, this function returns a QCborValue containing an
+ undefined value. For that reason, it is not possible with this function to
+ tell apart the situation where the array is not large enough from the case
+ where the array ends with an undefined value.
+
+ \sa operator[](), at(), last(), insert(), prepend(), append(),
+ removeAt(), takeAt()
+ */
+
+/*!
+ \fn QCborValue QCborArray::last() const
+
+ Returns the last QCborValue of this array.
+
+ If the array is empty, this function returns a QCborValue containing an
+ undefined value. For that reason, it is not possible with this function to
+ tell apart the situation where the array is not large enough from the case
+ where the array ends with an undefined value.
+
+ \sa operator[](), at(), first(), insert(), prepend(), append(),
+ removeAt(), takeAt()
+ */
+
+/*!
+ \fn QCborValue QCborArray::operator[](qsizetype i) const
+
+ Returns the QCborValue element at position \a i in the array.
+
+ If the array is smaller than \a i elements, this function returns a
+ QCborValue containing an undefined value. For that reason, it is not
+ possible with this function to tell apart the situation where the array is
+ not large enough from the case where the array contains an undefined value
+ at position \a i.
+
+ \sa at(), first(), last(), insert(), prepend(), append(),
+ removeAt(), takeAt()
+ */
+
+/*!
+ \fn QCborValueRef QCborArray::first()
+
+ Returns a reference to the first QCborValue of this array. The array must
+ not be empty.
+
+ QCborValueRef has the exact same API as \l QCborValue, with one important
+ difference: if you assign new values to it, this map will be updated with
+ that new value.
+
+ \sa operator[](), at(), last(), insert(), prepend(), append(),
+ removeAt(), takeAt()
+ */
+
+/*!
+ \fn QCborValueRef QCborArray::last()
+
+ Returns a reference to the last QCborValue of this array. The array must
+ not be empty.
+
+ QCborValueRef has the exact same API as \l QCborValue, with one important
+ difference: if you assign new values to it, this map will be updated with
+ that new value.
+
+ \sa operator[](), at(), first(), insert(), prepend(), append(),
+ removeAt(), takeAt()
+ */
+
+/*!
+ \fn QCborValueRef QCborArray::operator[](qsizetype i)
+
+ Returns a reference to the QCborValue element at position \a i in the
+ array. The array must have at least \a i elements.
+
+ QCborValueRef has the exact same API as \l QCborValue, with one important
+ difference: if you assign new values to it, this map will be updated with
+ that new value.
+
+ \sa at(), first(), last(), insert(), prepend(), append(),
+ removeAt(), takeAt()
+ */
+
+/*!
+ \fn void QCborArray::insert(qsizetype i, const QCborValue &value)
+ \fn void QCborArray::insert(qsizetype i, QCborValue &&value)
+
+ Inserts \a value into the array at position \a i in this array. The array
+ must have at least \a i elements before the insertion.
+
+ \sa at(), operator[](), first(), last(), prepend(), append(),
+ removeAt(), takeAt(), extract()
+ */
+void QCborArray::insert(qsizetype i, const QCborValue &value)
+{
+ Q_ASSERT(size_t(i) <= size_t(size()) || i == -1);
+ if (i < 0)
+ i = size();
+ detach(qMax(i + 1, size()));
+ d->insertAt(i, value);
+}
+
+void QCborArray::insert(qsizetype i, QCborValue &&value)
+{
+ Q_ASSERT(size_t(i) <= size_t(size()) || i == -1);
+ if (i < 0)
+ i = size();
+ detach(qMax(i + 1, size()));
+ d->insertAt(i, value, QCborContainerPrivate::MoveContainer);
+ QCborContainerPrivate::resetValue(value);
+}
+
+/*!
+ \fn QCborValue QCborArray::extract(iterator it)
+ \fn QCborValue QCborArray::extract(const_iterator it)
+
+ Extracts a value from the array at the position indicated by iterator \a it
+ and returns the value so extracted.
+
+ \sa insert(), erase(), takeAt(), removeAt()
+ */
+QCborValue QCborArray::extract(iterator it)
+{
+ detach();
+
+ QCborValue v = d->extractAt(it.item.i);
+ d->removeAt(it.item.i);
+ return v;
+}
+
+/*!
+ \fn void QCborArray::prepend(const QCborValue &value)
+ \fn void QCborArray::prepend(QCborValue &&value)
+
+ Prepends \a value into the array before any other elements it may already
+ contain.
+
+ \sa at(), operator[](), first(), last(), insert(), append(),
+ removeAt(), takeAt()
+ */
+
+/*!
+ \fn void QCborArray::append(const QCborValue &value)
+ \fn void QCborArray::append(QCborValue &&value)
+
+ Appends \a value into the array after all other elements it may already
+ contain.
+
+ \sa at(), operator[](), first(), last(), insert(), prepend(),
+ removeAt(), takeAt()
+ */
+
+/*!
+ Removes the item at position \a i from the array. The array must have more
+ than \a i elements before the removal.
+
+ \sa takeAt(), removeFirst(), removeLast(), at(), operator[](), insert(),
+ prepend(), append()
+ */
+void QCborArray::removeAt(qsizetype i)
+{
+ detach(size());
+ d->removeAt(i);
+}
+
+/*!
+ \fn QCborValue QCborArray::takeAt(qsizetype i)
+
+ Removes the item at position \a i from the array and returns it. The array
+ must have more than \a i elements before the removal.
+
+ \sa removeAt(), removeFirst(), removeLast(), at(), operator[](), insert(),
+ prepend(), append()
+ */
+
+/*!
+ \fn void QCborArray::removeFirst()
+
+ Removes the first item in the array, making the second element become the
+ first. The array must not be empty before this call.
+
+ \sa removeAt(), takeFirst(), removeLast(), at(), operator[](), insert(),
+ prepend(), append()
+ */
+
+/*!
+ \fn void QCborArray::removeLast()
+
+ Removes the last item in the array. The array must not be empty before this
+ call.
+
+ \sa removeAt(), takeLast(), removeFirst(), at(), operator[](), insert(),
+ prepend(), append()
+ */
+
+/*!
+ \fn void QCborArray::takeFirst()
+
+ Removes the first item in the array and returns it, making the second
+ element become the first. The array must not be empty before this call.
+
+ \sa takeAt(), removeFirst(), removeLast(), at(), operator[](), insert(),
+ prepend(), append()
+ */
+
+/*!
+ \fn void QCborArray::takeLast()
+
+ Removes the last item in the array and returns it. The array must not be
+ empty before this call.
+
+ \sa takeAt(), removeLast(), removeFirst(), at(), operator[](), insert(),
+ prepend(), append()
+ */
+
+/*!
+ Returns true if this array contains an element that is equal to \a value.
+ */
+bool QCborArray::contains(const QCborValue &value) const
+{
+ for (qsizetype i = 0; i < size(); ++i) {
+ int cmp = d->compareElement(i, value);
+ if (cmp == 0)
+ return true;
+ }
+ return false;
+}
+
+/*!
+ \fn int QCborArray::compare(const QCborArray &other) const
+
+ Compares this array and \a other, comparing each element in sequence, and
+ returns an integer that indicates whether this array should be sorted
+ before (if the result is negative) or after \a other (if the result is
+ positive). If this function returns 0, the two arrays are equal and contain
+ the same elements.
+
+ For more information on CBOR sorting order, see QCborValue::compare().
+
+ \sa QCborValue::compare(), QCborMap::compare(), operator==()
+ */
+
+/*!
+ \fn bool QCborArray::operator==(const QCborArray &other) const
+
+ Compares this array and \a other, comparing each element in sequence, and
+ returns true if both arrays contains the same elements, false otherwise.
+
+ For more information on CBOR equality in Qt, see, QCborValue::compare().
+
+ \sa compare(), QCborValue::operator==(), QCborMap::operator==(),
+ operator!=(), operator<()
+ */
+
+/*!
+ \fn bool QCborArray::operator!=(const QCborArray &other) const
+
+ Compares this array and \a other, comparing each element in sequence, and
+ returns true if the two arrays' contents are different, false otherwise.
+
+ For more information on CBOR equality in Qt, see, QCborValue::compare().
+
+ \sa compare(), QCborValue::operator==(), QCborMap::operator==(),
+ operator==(), operator<()
+ */
+
+/*!
+ \fn bool QCborArray::operator<(const QCborArray &other) const
+
+ Compares this array and \a other, comparing each element in sequence, and
+ returns true if this array should be sorted before \a other, false
+ otherwise.
+
+ For more information on CBOR sorting order, see QCborValue::compare().
+
+ \sa compare(), QCborValue::operator==(), QCborMap::operator==(),
+ operator==(), operator!=()
+ */
+
+/*!
+ \typedef QCborArray::iterator
+
+ A synonym to QCborArray::Iterator.
+ */
+
+/*!
+ \typedef QCborArray::const_iterator
+
+ A synonym to QCborArray::ConstIterator.
+ */
+
+/*!
+ \fn QCborArray::iterator QCborArray::begin()
+
+ Returns an array iterator pointing to the first item in this array. If the
+ array is empty, then this function returns the same as end().
+
+ \sa constBegin(), end()
+ */
+
+/*!
+ \fn QCborArray::const_iterator QCborArray::begin() const
+
+ Returns an array iterator pointing to the first item in this array. If the
+ array is empty, then this function returns the same as end().
+
+ \sa constBegin(), constEnd()
+ */
+
+/*!
+ \fn QCborArray::const_iterator QCborArray::cbegin() const
+
+ Returns an array iterator pointing to the first item in this array. If the
+ array is empty, then this function returns the same as end().
+
+ \sa constBegin(), constEnd()
+ */
+
+/*!
+ \fn QCborArray::const_iterator QCborArray::constBegin() const
+
+ Returns an array iterator pointing to the first item in this array. If the
+ array is empty, then this function returns the same as end().
+
+ \sa begin(), constEnd()
+ */
+
+/*!
+ \fn QCborArray::iterator QCborArray::end()
+
+ Returns an array iterator pointing to just after the last element in this
+ array.
+
+ \sa begin(), constEnd()
+ */
+
+/*!
+ \fn QCborArray::const_iterator QCborArray::end() const
+
+ Returns an array iterator pointing to just after the last element in this
+ array.
+
+ \sa constBegin(), constEnd()
+ */
+
+/*!
+ \fn QCborArray::const_iterator QCborArray::cend() const
+
+ Returns an array iterator pointing to just after the last element in this
+ array.
+
+ \sa constBegin(), constEnd()
+ */
+
+/*!
+ \fn QCborArray::const_iterator QCborArray::constEnd() const
+
+ Returns an array iterator pointing to just after the last element in this
+ array.
+
+ \sa constBegin(), end()
+ */
+
+/*!
+ \fn QCborArray::iterator QCborArray::insert(iterator before, const QCborValue &value)
+ \fn QCborArray::iterator QCborArray::insert(const_iterator before, const QCborValue &value)
+ \overload
+
+ Inserts \a value into this array before element \a before and returns an
+ array iterator pointing to the just-inserted element.
+
+ \sa erase(), removeAt(), prepend(), append()
+ */
+
+/*!
+ \fn QCborArray::iterator QCborArray::erase(iterator it)
+ \fn QCborArray::iterator QCborArray::erase(const_iterator it)
+
+ Removes the element pointed to by the array iterator \a it from this array,
+ then returns an iterator to the next element (the one that took the same
+ position in the array that \a it used to occupy).
+
+ \sa insert(), removeAt(), takeAt(), takeFirst(), takeLast()
+ */
+
+/*!
+ \fn void QCborArray::push_back(const QCborValue &t)
+
+ Synonym for append(). This function is provided for compatibility with
+ generic code that uses the Standard Library API.
+
+ Appends the element \a t to this array.
+
+ \sa append(), push_front(), pop_back(), prepend(), insert()
+ */
+
+/*!
+ \fn void QCborArray::push_front(const QCborValue &t)
+
+ Synonym for prepend(). This function is provided for compatibility with
+ generic code that uses the Standard Library API.
+
+ Prepends the element \a t to this array.
+
+ \sa prepend(), push_back(), pop_front(), append(), insert()
+ */
+
+/*!
+ \fn void QCborArray::pop_front()
+
+ Synonym for removeFirst(). This function is provided for compatibility with
+ generic code that uses the Standard Library API.
+
+ Removes the first element of this array. The array must not be empty before
+ the removal
+
+ \sa removeFirst(), takeFirst(), pop_back(), push_front(), prepend(), insert()
+ */
+
+/*!
+ \fn void QCborArray::pop_back()
+
+ Synonym for removeLast(). This function is provided for compatibility with
+ generic code that uses the Standard Library API.
+
+ Removes the last element of this array. The array must not be empty before
+ the removal
+
+ \sa removeLast(), takeLast(), pop_front(), push_back(), append(), insert()
+ */
+
+/*!
+ \fn bool QCborArray::empty() const
+
+ Synonym for isEmpty(). This function is provided for compatibility with
+ generic code that uses the Standard Library API.
+
+ Returns true if this array is empty (size() == 0).
+
+ \sa isEmpty(), size()
+ */
+
+/*!
+ \fn QCborArray QCborArray::operator+(const QCborValue &v) const
+
+ Returns a new QCborArray containing the same elements as this array, plus
+ \a v appended as the last element.
+
+ \sa operator+=(), operator<<(), append()
+ */
+
+/*!
+ \fn QCborArray &QCborArray::operator+=(const QCborValue &v)
+
+ Appends \a v to this array and returns a reference to this array.
+
+ \sa append(), insert(), operator+(), operator<<()
+ */
+
+/*!
+ \fn QCborArray &QCborArray::operator<<(const QCborValue &v)
+
+ Appends \a v to this array and returns a reference to this array.
+
+ \sa append(), insert(), operator+(), operator+=()
+ */
+
+void QCborArray::detach(qsizetype reserved)
+{
+ d = QCborContainerPrivate::detach(d.data(), reserved ? reserved : size());
+}
+
+/*!
+ \class QCborArray::Iterator
+ \inmodule QtCore
+ \ingroup cbor
+ \since 5.12
+
+ \brief The QCborArray::Iterator class provides an STL-style non-const iterator for QCborArray.
+
+ QCborArray::Iterator allows you to iterate over a QCborArray and to modify
+ the array item associated with the iterator. If you want to iterate over a
+ const QCborArray, use QCborArray::ConstIterator instead. It is generally a
+ good practice to use QCborArray::ConstIterator on a non-const QCborArray as
+ well, unless you need to change the QCborArray through the iterator. Const
+ iterators are slightly faster and improve code readability.
+
+ Iterators are initialized by using a QCborArray function like
+ QCborArray::begin(), QCborArray::end(), or QCborArray::insert(). Iteration
+ is only possible after that.
+
+ Most QCborArray functions accept an integer index rather than an iterator.
+ For that reason, iterators are rarely useful in connection with QCborArray.
+ One place where STL-style iterators do make sense is as arguments to
+ \l{generic algorithms}.
+
+ Multiple iterators can be used on the same array. However, be aware that
+ any non-const function call performed on the QCborArray will render all
+ existing iterators undefined.
+
+ \sa QCborArray::ConstIterator
+*/
+
+/*!
+ \typedef QCborArray::Iterator::iterator_category
+
+ A synonym for \e {std::random_access_iterator_tag} indicating this iterator
+ is a random access iterator.
+ */
+
+/*!
+ \typedef QCborArray::Iterator::difference_type
+ \internal
+*/
+
+/*!
+ \typedef QCborArray::Iterator::value_type
+ \internal
+*/
+
+/*!
+ \typedef QCborArray::Iterator::reference
+ \internal
+*/
+
+/*!
+ \typedef QCborArray::Iterator::pointer
+ \internal
+*/
+
+/*!
+ \fn QCborArray::Iterator::Iterator()
+
+ Constructs an uninitialized iterator.
+
+ Functions like operator*() and operator++() should not be called on an
+ uninitialized iterator. Use operator=() to assign a value to it before
+ using it.
+
+ \sa QCborArray::begin(), QCborArray::end()
+*/
+
+/*!
+ \fn QCborArray::Iterator::Iterator(const Iterator &other)
+
+ Makes a copy of \a other.
+ */
+
+/*!
+ \fn QCborArray::Iterator &QCborArray::Iterator::operator=(const Iterator &other)
+
+ Makes this iterator a copy of \a other and returns a reference to this iterator.
+ */
+
+/*!
+ \fn QCborValueRef QCborArray::Iterator::operator*() const
+
+ Returns a modifiable reference to the current item.
+
+ You can change the value of an item by using operator*() on the left side
+ of an assignment.
+
+ The return value is of type QCborValueRef, a helper class for QCborArray
+ and QCborMap. When you get an object of type QCborValueRef, you can use it
+ as if it were a reference to a QCborValue. If you assign to it, the
+ assignment will apply to the element in the QCborArray or QCborMap from
+ which you got the reference.
+*/
+
+/*!
+ \fn QCborValueRef *QCborArray::Iterator::operator->() const
+
+ Returns a pointer to a modifiable reference to the current item.
+*/
+
+/*!
+ \fn QCborValueRef QCborArray::Iterator::operator[](qsizetype j) const
+
+ Returns a modifiable reference to the item at a position \a j steps forward
+ from the item pointed to by this iterator.
+
+ This function is provided to make QCborArray iterators behave like C++
+ pointers.
+
+ The return value is of type QCborValueRef, a helper class for QCborArray
+ and QCborMap. When you get an object of type QCborValueRef, you can use it
+ as if it were a reference to a QCborValue. If you assign to it, the
+ assignment will apply to the element in the QCborArray or QCborMap from
+ which you got the reference.
+
+ \sa operator+()
+*/
+
+/*!
+ \fn bool QCborArray::Iterator::operator==(const Iterator &other) const
+ \fn bool QCborArray::Iterator::operator==(const ConstIterator &other) const
+
+ Returns \c true if \a other points to the same entry in the array as this
+ iterator; otherwise returns \c false.
+
+ \sa operator!=()
+*/
+
+/*!
+ \fn bool QCborArray::Iterator::operator!=(const Iterator &other) const
+ \fn bool QCborArray::Iterator::operator!=(const ConstIterator &other) const
+
+ Returns \c true if \a other points to a different entry in the array than
+ this iterator; otherwise returns \c false.
+
+ \sa operator==()
+*/
+
+/*!
+ \fn bool QCborArray::Iterator::operator<(const Iterator& other) const
+ \fn bool QCborArray::Iterator::operator<(const ConstIterator& other) const
+
+ Returns \c true if the entry in the array pointed to by this iterator
+ occurs before the entry pointed to by the \a other iterator.
+*/
+
+/*!
+ \fn bool QCborArray::Iterator::operator<=(const Iterator& other) const
+ \fn bool QCborArray::Iterator::operator<=(const ConstIterator& other) const
+
+ Returns \c true if the entry in the array pointed to by this iterator
+ occurs before or is the same entry as is pointed to by the \a other
+ iterator.
+*/
+
+/*!
+ \fn bool QCborArray::Iterator::operator>(const Iterator& other) const
+ \fn bool QCborArray::Iterator::operator>(const ConstIterator& other) const
+
+ Returns \c true if the entry in the array pointed to by this iterator
+ occurs after the entry pointed to by the \a other iterator.
+ */
+
+/*!
+ \fn bool QCborArray::Iterator::operator>=(const Iterator& other) const
+ \fn bool QCborArray::Iterator::operator>=(const ConstIterator& other) const
+
+ Returns \c true if the entry in the array pointed to by this iterator
+ occurs after or is the same entry as is pointed to by the \a other
+ iterator.
+*/
+
+/*!
+ \fn QCborArray::Iterator &QCborArray::Iterator::operator++()
+
+ The prefix ++ operator, \c{++it}, advances the iterator to the next item in
+ the array and returns this iterator.
+
+ Calling this function on QCborArray::end() leads to undefined results.
+
+ \sa operator--()
+*/
+
+/*!
+ \fn QCborArray::Iterator QCborArray::Iterator::operator++(int)
+ \overload
+
+ The postfix ++ operator, \c{it++}, advances the iterator to the next item
+ in the array and returns an iterator to the previously current item.
+*/
+
+/*!
+ \fn QCborArray::Iterator &QCborArray::Iterator::operator--()
+
+ The prefix -- operator, \c{--it}, makes the preceding item current and
+ returns this iterator.
+
+ Calling this function on QCborArray::begin() leads to undefined results.
+
+ \sa operator++()
+*/
+
+/*!
+ \fn QCborArray::Iterator QCborArray::Iterator::operator--(int)
+ \overload
+
+ The postfix -- operator, \c{it--}, makes the preceding item current and
+ returns an iterator to the previously current item.
+*/
+
+/*!
+ \fn QCborArray::Iterator &QCborArray::Iterator::operator+=(qsizetype j)
+
+ Advances the iterator by \a j positions. If \a j is negative, the iterator
+ goes backward. Returns a reference to this iterator.
+
+ \sa operator-=(), operator+()
+*/
+
+/*!
+ \fn QCborArray::Iterator &QCborArray::Iterator::operator-=(qsizetype j)
+
+ Makes the iterator go back by \a j positions. If \a j is negative, the
+ iterator goes forward. Returns a reference to this iterator.
+
+ \sa operator+=(), operator-()
+*/
+
+/*!
+ \fn QCborArray::Iterator QCborArray::Iterator::operator+(qsizetype j) const
+
+ Returns an iterator to the item at position \a j steps forward from this
+ iterator. If \a j is negative, the iterator goes backward.
+
+ \sa operator-(), operator+=()
+*/
+
+/*!
+ \fn QCborArray::Iterator QCborArray::Iterator::operator-(qsizetype j) const
+
+ Returns an iterator to the item at position \a j steps backward from this
+ iterator. If \a j is negative, the iterator goes forward.
+
+ \sa operator+(), operator-=()
+*/
+
+/*!
+ \fn qsizetype QCborArray::Iterator::operator-(Iterator other) const
+
+ Returns the offset of this iterator relative to \a other.
+*/
+
+/*!
+ \class QCborArray::ConstIterator
+ \inmodule QtCore
+ \ingroup cbor
+ \since 5.12
+
+ \brief The QCborArray::ConstIterator class provides an STL-style const iterator for QCborArray.
+
+ QCborArray::ConstIterator allows you to iterate over a QCborArray. If you
+ want to modify the QCborArray as you iterate over it, use
+ QCborArray::Iterator instead. It is generally good practice to use
+ QCborArray::ConstIterator, even on a non-const QCborArray, when you don't
+ need to change the QCborArray through the iterator. Const iterators are
+ slightly faster and improves code readability.
+
+ Iterators are initialized by using a QCborArray function like
+ QCborArray::begin() or QCborArray::end(). Iteration is only possible after
+ that.
+
+ Most QCborArray functions accept an integer index rather than an iterator.
+ For that reason, iterators are rarely useful in connection with QCborArray.
+ One place where STL-style iterators do make sense is as arguments to
+ \l{generic algorithms}.
+
+ Multiple iterators can be used on the same array. However, be aware that
+ any non-const function call performed on the QCborArray will render all
+ existing iterators undefined.
+
+ \sa QCborArray::Iterator
+*/
+
+/*!
+ \fn QCborArray::ConstIterator::ConstIterator()
+
+ Constructs an uninitialized iterator.
+
+ Functions like operator*() and operator++() should not be called on an
+ uninitialized iterator. Use operator=() to assign a value to it before
+ using it.
+
+ \sa QCborArray::constBegin(), QCborArray::constEnd()
+*/
+
+/*!
+ \fn QCborArray::ConstIterator &QCborArray::ConstIterator::operator=(const ConstIterator &other)
+
+ Makes this iterator a copy of \a other and returns a reference to this iterator.
+*/
+
+/*!
+ \typedef QCborArray::ConstIterator::iterator_category
+
+ A synonym for \e {std::random_access_iterator_tag} indicating this iterator
+ is a random access iterator.
+*/
+
+/*!
+ \typedef QCborArray::ConstIterator::difference_type
+ \internal
+*/
+
+/*!
+ \typedef QCborArray::ConstIterator::value_type
+ \internal
+*/
+
+/*!
+ \typedef QCborArray::ConstIterator::reference
+ \internal
+*/
+
+/*!
+ \typedef QCborArray::ConstIterator::pointer
+ \internal
+*/
+
+/*!
+ \fn QCborArray::ConstIterator::ConstIterator(const ConstIterator &other)
+
+ Constructs a copy of \a other.
+*/
+
+/*!
+ \fn QCborValue QCborArray::ConstIterator::operator*() const
+
+ Returns the current item.
+*/
+
+/*!
+ \fn const QCborValue *QCborArray::ConstIterator::operator->() const
+
+ Returns a pointer to the current item.
+*/
+
+/*!
+ \fn QCborValue QCborArray::ConstIterator::operator[](qsizetype j) const
+
+ Returns the item at a position \a j steps forward from the item pointed to
+ by this iterator.
+
+ This function is provided to make QCborArray iterators behave like C++
+ pointers.
+
+ \sa operator+()
+*/
+
+/*!
+ \fn bool QCborArray::ConstIterator::operator==(const ConstIterator &other) const
+
+ Returns \c true if \a other points to the same entry in the array as this
+ iterator; otherwise returns \c false.
+
+ \sa operator!=()
+*/
+
+/*!
+ \fn bool QCborArray::ConstIterator::operator!=(const ConstIterator &other) const
+
+ Returns \c true if \a other points to a different entry in the array than
+ this iterator; otherwise returns \c false.
+
+ \sa operator==()
+*/
+
+/*!
+ \fn bool QCborArray::ConstIterator::operator<(const ConstIterator &other) const
+
+ Returns \c true if the entry in the array pointed to by this iterator
+ occurs before the entry pointed to by the \a other iterator.
+*/
+
+/*!
+ \fn bool QCborArray::ConstIterator::operator<=(const ConstIterator &other) const
+
+ Returns \c true if the entry in the array pointed to by this iterator
+ occurs before or is the same entry as is pointed to by the \a other
+ iterator.
+*/
+
+/*!
+ \fn bool QCborArray::ConstIterator::operator>(const ConstIterator &other) const
+
+ Returns \c true if the entry in the array pointed to by this iterator
+ occurs after the entry pointed to by the \a other iterator.
+*/
+
+/*!
+ \fn bool QCborArray::ConstIterator::operator>=(const ConstIterator &other) const
+
+ Returns \c true if the entry in the array pointed to by this iterator
+ occurs after or is the same entry as is pointed to by the \a other
+ iterator.
+*/
+
+/*!
+ \fn QCborArray::ConstIterator &QCborArray::ConstIterator::operator++()
+
+ The prefix ++ operator, \c{++it}, advances the iterator to the next item in
+ the array and returns this iterator.
+
+ Calling this function on QCborArray::end() leads to undefined results.
+
+ \sa operator--()
+*/
+
+/*!
+ \fn QCborArray::ConstIterator QCborArray::ConstIterator::operator++(int)
+ \overload
+
+ The postfix ++ operator, \c{it++}, advances the iterator to the next item
+ in the array and returns an iterator to the previously current item.
+*/
+
+/*!
+ \fn QCborArray::ConstIterator &QCborArray::ConstIterator::operator--()
+
+ The prefix -- operator, \c{--it}, makes the preceding item current and
+ returns this iterator.
+
+ Calling this function on QCborArray::begin() leads to undefined results.
+
+ \sa operator++()
+*/
+
+/*!
+ \fn QCborArray::ConstIterator QCborArray::ConstIterator::operator--(int)
+ \overload
+
+ The postfix -- operator, \c{it--}, makes the preceding item current and
+ returns an iterator to the previously current item.
+*/
+
+/*!
+ \fn QCborArray::ConstIterator &QCborArray::ConstIterator::operator+=(qsizetype j)
+
+ Advances the iterator by \a j positions. If \a j is negative, the iterator
+ goes backward. Returns a reference to this iterator.
+
+ \sa operator-=(), operator+()
+*/
+
+/*!
+ \fn QCborArray::ConstIterator &QCborArray::ConstIterator::operator-=(qsizetype j)
+
+ Makes the iterator go back by \a j positions. If \a j is negative, the
+ iterator goes forward. Returns a reference to this iterator.
+
+ \sa operator+=(), operator-()
+*/
+
+/*!
+ \fn QCborArray::ConstIterator QCborArray::ConstIterator::operator+(qsizetype j) const
+
+ Returns an iterator to the item at a position \a j steps forward from this
+ iterator. If \a j is negative, the iterator goes backward.
+
+ \sa operator-(), operator+=()
+*/
+
+/*!
+ \fn QCborArray::ConstIterator QCborArray::ConstIterator::operator-(qsizetype j) const
+
+ Returns an iterator to the item at a position \a j steps backward from this
+ iterator. If \a j is negative, the iterator goes forward.
+
+ \sa operator+(), operator-=()
+*/
+
+/*!
+ \fn qsizetype QCborArray::ConstIterator::operator-(ConstIterator other) const
+
+ Returns the offset of this iterator relative to \a other.
+*/
+
+#if !defined(QT_NO_DEBUG_STREAM)
+QDebug operator<<(QDebug dbg, const QCborArray &a)
+{
+ QDebugStateSaver saver(dbg);
+ dbg.nospace() << "QCborArray{";
+ const char *comma = "";
+ for (auto v : a) {
+ dbg << comma << v;
+ comma = ", ";
+ }
+ return dbg << '}';
+}
+#endif
+
+QT_END_NAMESPACE
diff --git a/src/corelib/serialization/qcborarray.h b/src/corelib/serialization/qcborarray.h
new file mode 100644
index 0000000000..98f409958a
--- /dev/null
+++ b/src/corelib/serialization/qcborarray.h
@@ -0,0 +1,295 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QCBORARRAY_H
+#define QCBORARRAY_H
+
+#include <QtCore/qcborvalue.h>
+
+#include <initializer_list>
+
+QT_BEGIN_NAMESPACE
+
+class QJsonArray;
+
+class QCborContainerPrivate;
+class Q_CORE_EXPORT QCborArray
+{
+public:
+ class ConstIterator;
+ class Iterator {
+ mutable QCborValueRef item;
+ friend class ConstIterator;
+ friend class QCborArray;
+ Iterator(QCborContainerPrivate *dd, qsizetype ii) : item(dd, ii) {}
+ public:
+ typedef std::random_access_iterator_tag iterator_category;
+ typedef qsizetype difference_type;
+ typedef QCborValue value_type;
+ typedef QCborValueRef reference;
+ typedef QCborValueRef *pointer;
+
+ Q_DECL_CONSTEXPR Iterator() = default;
+ Q_DECL_CONSTEXPR Iterator(const Iterator &) = default;
+ Iterator &operator=(const Iterator &other)
+ {
+ // rebind the reference
+ item.d = other.item.d;
+ item.i = other.item.i;
+ return *this;
+ }
+
+ QCborValueRef operator*() const { return item; }
+ QCborValueRef *operator->() const { return &item; }
+ QCborValueRef operator[](qsizetype j) { return { item.d, item.i + j }; }
+
+ bool operator==(const Iterator &o) const { return item.d == o.item.d && item.i == o.item.i; }
+ bool operator!=(const Iterator &o) const { return !(*this == o); }
+ bool operator<(const Iterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i < other.item.i; }
+ bool operator<=(const Iterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i <= other.item.i; }
+ bool operator>(const Iterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i > other.item.i; }
+ bool operator>=(const Iterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i >= other.item.i; }
+ bool operator==(const ConstIterator &o) const { return item.d == o.item.d && item.i == o.item.i; }
+ bool operator!=(const ConstIterator &o) const { return !(*this == o); }
+ bool operator<(const ConstIterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i < other.item.i; }
+ bool operator<=(const ConstIterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i <= other.item.i; }
+ bool operator>(const ConstIterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i > other.item.i; }
+ bool operator>=(const ConstIterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i >= other.item.i; }
+ Iterator &operator++() { ++item.i; return *this; }
+ Iterator operator++(int) { Iterator n = *this; ++item.i; return n; }
+ Iterator &operator--() { item.i--; return *this; }
+ Iterator operator--(int) { Iterator n = *this; item.i--; return n; }
+ Iterator &operator+=(qsizetype j) { item.i += j; return *this; }
+ Iterator &operator-=(qsizetype j) { item.i -= j; return *this; }
+ Iterator operator+(qsizetype j) const { return Iterator({ item.d, item.i + j }); }
+ Iterator operator-(qsizetype j) const { return Iterator({ item.d, item.i - j }); }
+ qsizetype operator-(Iterator j) const { return item.i - j.item.i; }
+ };
+
+ class ConstIterator {
+ QCborValueRef item;
+ friend class Iterator;
+ friend class QCborArray;
+ ConstIterator(QCborContainerPrivate *dd, qsizetype ii) : item(dd, ii) {}
+ public:
+ typedef std::random_access_iterator_tag iterator_category;
+ typedef qsizetype difference_type;
+ typedef const QCborValue value_type;
+ typedef const QCborValueRef reference;
+ typedef const QCborValueRef *pointer;
+
+ Q_DECL_CONSTEXPR ConstIterator() = default;
+ Q_DECL_CONSTEXPR ConstIterator(const ConstIterator &) = default;
+ ConstIterator &operator=(const ConstIterator &other)
+ {
+ // rebind the reference
+ item.d = other.item.d;
+ item.i = other.item.i;
+ return *this;
+ }
+
+ const QCborValueRef operator*() const { return item; }
+ const QCborValueRef *operator->() const { return &item; }
+ const QCborValueRef operator[](qsizetype j) { return { item.d, item.i + j }; }
+
+ bool operator==(const Iterator &o) const { return item.d == o.item.d && item.i == o.item.i; }
+ bool operator!=(const Iterator &o) const { return !(*this == o); }
+ bool operator<(const Iterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i < other.item.i; }
+ bool operator<=(const Iterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i <= other.item.i; }
+ bool operator>(const Iterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i > other.item.i; }
+ bool operator>=(const Iterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i >= other.item.i; }
+ bool operator==(const ConstIterator &o) const { return item.d == o.item.d && item.i == o.item.i; }
+ bool operator!=(const ConstIterator &o) const { return !(*this == o); }
+ bool operator<(const ConstIterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i < other.item.i; }
+ bool operator<=(const ConstIterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i <= other.item.i; }
+ bool operator>(const ConstIterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i > other.item.i; }
+ bool operator>=(const ConstIterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i >= other.item.i; }
+ ConstIterator &operator++() { ++item.i; return *this; }
+ ConstIterator operator++(int) { ConstIterator n = *this; ++item.i; return n; }
+ ConstIterator &operator--() { item.i--; return *this; }
+ ConstIterator operator--(int) { ConstIterator n = *this; item.i--; return n; }
+ ConstIterator &operator+=(qsizetype j) { item.i += j; return *this; }
+ ConstIterator &operator-=(qsizetype j) { item.i -= j; return *this; }
+ ConstIterator operator+(qsizetype j) const { return ConstIterator({ item.d, item.i + j }); }
+ ConstIterator operator-(qsizetype j) const { return ConstIterator({ item.d, item.i - j }); }
+ qsizetype operator-(ConstIterator j) const { return item.i - j.item.i; }
+ };
+
+ typedef qsizetype size_type;
+ typedef QCborValue value_type;
+ typedef value_type *pointer;
+ typedef const value_type *const_pointer;
+ typedef QCborValue &reference;
+ typedef const QCborValue &const_reference;
+ typedef qsizetype difference_type;
+
+ QCborArray() noexcept;
+ QCborArray(const QCborArray &other) noexcept;
+ QCborArray &operator=(const QCborArray &other) noexcept;
+ QCborArray(std::initializer_list<QCborValue> args)
+ : QCborArray()
+ {
+ detach(qsizetype(args.size()));
+ for (const QCborValue &v : args)
+ append(v);
+ }
+ ~QCborArray();
+
+ void swap(QCborArray &other) noexcept
+ {
+ qSwap(d, other.d);
+ }
+
+ QCborValue toCborValue() const { return *this; }
+
+ qsizetype size() const noexcept;
+ bool isEmpty() const { return size() == 0; }
+
+ QCborValue at(qsizetype i) const;
+ QCborValue first() const { return at(0); }
+ QCborValue last() const { return at(size() - 1); }
+ QCborValue operator[](qsizetype i) const { return at(i); }
+ QCborValueRef first() { Q_ASSERT(!isEmpty()); return begin()[0]; }
+ QCborValueRef last() { Q_ASSERT(!isEmpty()); return begin()[size() - 1]; }
+ QCborValueRef operator[](qsizetype i) { Q_ASSERT(i < size()); return begin()[i]; }
+
+ void insert(qsizetype i, const QCborValue &value);
+ void insert(qsizetype i, QCborValue &&value);
+ void prepend(const QCborValue &value) { insert(0, value); }
+ void prepend(QCborValue &&value) { insert(0, std::move(value)); }
+ void append(const QCborValue &value) { insert(-1, value); }
+ void append(QCborValue &&value) { insert(-1, std::move(value)); }
+ QCborValue extract(ConstIterator it) { return extract(Iterator{ it.item.d, it.item.i }); }
+ QCborValue extract(Iterator it);
+ void removeAt(qsizetype i);
+ QCborValue takeAt(qsizetype i) { Q_ASSERT(i < size()); return extract(begin() + i); }
+ void removeFirst() { removeAt(0); }
+ void removeLast() { removeAt(size() - 1); }
+ QCborValue takeFirst() { return takeAt(0); }
+ QCborValue takeLast() { return takeAt(size() - 1); }
+
+ bool contains(const QCborValue &value) const;
+
+ int compare(const QCborArray &other) const noexcept Q_DECL_PURE_FUNCTION;
+#if QT_HAS_INCLUDE(<compare>)
+ std::strong_ordering operator<=>(const QCborArray &other) const
+ {
+ int c = compare(other);
+ if (c > 0) return std::strong_ordering::greater;
+ if (c == 0) return std::strong_ordering::equivalent;
+ return std::strong_ordering::less;
+ }
+#else
+ bool operator==(const QCborArray &other) const noexcept
+ { return compare(other) == 0; }
+ bool operator!=(const QCborArray &other) const noexcept
+ { return !(*this == other); }
+ bool operator<(const QCborArray &other) const
+ { return compare(other) < 0; }
+#endif
+
+ typedef Iterator iterator;
+ typedef ConstIterator const_iterator;
+ iterator begin() { detach(); return iterator{d.data(), 0}; }
+ const_iterator constBegin() const { return const_iterator{d.data(), 0}; }
+ const_iterator begin() const { return constBegin(); }
+ const_iterator cbegin() const { return constBegin(); }
+ iterator end() { detach(); return iterator{d.data(), size()}; }
+ const_iterator constEnd() const { return const_iterator{d.data(), size()}; }
+ const_iterator end() const { return constEnd(); }
+ const_iterator cend() const { return constEnd(); }
+ iterator insert(iterator before, const QCborValue &value)
+ { insert(before.item.i, value); return iterator{d.data(), before.item.i}; }
+ iterator insert(const_iterator before, const QCborValue &value)
+ { insert(before.item.i, value); return iterator{d.data(), before.item.i}; }
+ iterator erase(iterator it) { removeAt(it.item.i); return iterator{d.data(), it.item.i}; }
+ iterator erase(const_iterator it) { removeAt(it.item.i); return iterator{d.data(), it.item.i}; }
+
+ void push_back(const QCborValue &t) { append(t); }
+ void push_front(const QCborValue &t) { prepend(t); }
+ void pop_front() { removeFirst(); }
+ void pop_back() { removeLast(); }
+ bool empty() const { return isEmpty(); }
+
+ // convenience
+ QCborArray operator+(const QCborValue &v) const
+ { QCborArray n = *this; n += v; return n; }
+ QCborArray &operator+=(const QCborValue &v)
+ { append(v); return *this; }
+ QCborArray &operator<<(const QCborValue &v)
+ { append(v); return *this; }
+
+ static QCborArray fromStringList(const QStringList &list);
+ static QCborArray fromVariantList(const QVariantList &list);
+ static QCborArray fromJsonArray(const QJsonArray &array);
+ QVariantList toVariantList() const;
+ QJsonArray toJsonArray() const;
+
+private:
+ void detach(qsizetype reserve = 0);
+
+ friend QCborValue;
+ explicit QCborArray(QCborContainerPrivate &dd) noexcept;
+ QExplicitlySharedDataPointer<QCborContainerPrivate> d;
+};
+
+Q_DECLARE_SHARED(QCborArray)
+
+inline QCborValue::QCborValue(QCborArray &&a)
+ : n(-1), container(a.d.take()), t(Array)
+{
+}
+
+inline QCborArray QCborValueRef::toArray() const
+{
+ return concrete().toArray();
+}
+
+inline QCborArray QCborValueRef::toArray(const QCborArray &a) const
+{
+ return concrete().toArray(a);
+}
+
+#if !defined(QT_NO_DEBUG_STREAM)
+Q_CORE_EXPORT QDebug operator<<(QDebug, const QCborArray &a);
+#endif
+
+QT_END_NAMESPACE
+
+#endif // QCBORARRAY_H
diff --git a/src/corelib/serialization/qcborcommon.h b/src/corelib/serialization/qcborcommon.h
new file mode 100644
index 0000000000..9661cd70bb
--- /dev/null
+++ b/src/corelib/serialization/qcborcommon.h
@@ -0,0 +1,147 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QCBORCOMMON_H
+#define QCBORCOMMON_H
+
+#include <QtCore/qobjectdefs.h>
+#include <QtCore/qmetatype.h>
+#include <QtCore/qdebug.h>
+
+#if 0
+#pragma qt_class(QtCborCommon)
+#endif
+
+/* X11 headers use these values too, but as defines */
+#if defined(False) && defined(True)
+# define QT_X11_DEFINES_FOUND 1
+# undef True
+# undef False
+#endif
+
+QT_BEGIN_NAMESPACE
+
+enum class QCborSimpleType : quint8 {
+ False = 20,
+ True = 21,
+ Null = 22,
+ Undefined = 23
+};
+
+enum class QCborTag : quint64 {};
+enum class QCborKnownTags {
+ DateTimeString = 0,
+ UnixTime_t = 1,
+ PositiveBignum = 2,
+ NegativeBignum = 3,
+ Decimal = 4,
+ Bigfloat = 5,
+ COSE_Encrypt0 = 16,
+ COSE_Mac0 = 17,
+ COSE_Sign1 = 18,
+ ExpectedBase64url = 21,
+ ExpectedBase64 = 22,
+ ExpectedBase16 = 23,
+ EncodedCbor = 24,
+ Url = 32,
+ Base64url = 33,
+ Base64 = 34,
+ RegularExpression = 35,
+ MimeMessage = 36,
+ Uuid = 37,
+ COSE_Encrypt = 96,
+ COSE_Mac = 97,
+ COSE_Sign = 98,
+ Signature = 55799
+};
+
+inline bool operator==(QCborTag t, QCborKnownTags kt) { return quint64(t) == quint64(kt); }
+inline bool operator==(QCborKnownTags kt, QCborTag t) { return quint64(t) == quint64(kt); }
+inline bool operator!=(QCborTag t, QCborKnownTags kt) { return quint64(t) != quint64(kt); }
+inline bool operator!=(QCborKnownTags kt, QCborTag t) { return quint64(t) != quint64(kt); }
+
+struct Q_CORE_EXPORT QCborError
+{
+ Q_GADGET
+public:
+ enum Code : int {
+ UnknownError = 1,
+ AdvancePastEnd = 3,
+ InputOutputError = 4,
+ GarbageAtEnd = 256,
+ EndOfFile,
+ UnexpectedBreak,
+ UnknownType,
+ IllegalType,
+ IllegalNumber,
+ IllegalSimpleType,
+
+ InvalidUtf8String = 516,
+
+ DataTooLarge = 1024,
+ NestingTooDeep,
+ UnsupportedType,
+
+ NoError = 0
+ };
+ Q_ENUM(Code)
+
+ Code c;
+ operator Code() const { return c; }
+ QString toString() const;
+};
+
+#if !defined(QT_NO_DEBUG_STREAM)
+Q_CORE_EXPORT QDebug operator<<(QDebug, QCborSimpleType st);
+Q_CORE_EXPORT QDebug operator<<(QDebug, QCborKnownTags tg);
+Q_CORE_EXPORT QDebug operator<<(QDebug, QCborTag tg);
+#endif
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(QCborTag)
+
+// To avoid changing namespace we need to reinstate defines, even though our .cpp
+// will then have to remove them again.
+#if defined(QT_X11_DEFINES_FOUND)
+# define True 1
+# define False 0
+#endif
+
+#endif // QCBORSTREAM_H
diff --git a/src/corelib/serialization/qcbormap.cpp b/src/corelib/serialization/qcbormap.cpp
new file mode 100644
index 0000000000..f6760050bb
--- /dev/null
+++ b/src/corelib/serialization/qcbormap.cpp
@@ -0,0 +1,1651 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qcbormap.h"
+#include "qcborvalue_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QtCbor;
+
+/*!
+ \class QCborMap
+ \inmodule QtCore
+ \ingroup cbor
+ \reentrant
+ \since 5.12
+
+ \brief The QCborMap class is used to hold an associative container representable in CBOR.
+
+ This class can be used to hold an associative container in CBOR, a map
+ between a key and a value type. CBOR is the Concise Binary Object
+ Representation, a very compact form of binary data encoding that is a
+ superset of JSON. It was created by the IETF Constrained RESTful
+ Environments (CoRE) WG, which has used it in many new RFCs. It is meant to
+ be used alongside the \l{https://tools.ietf.org/html/rfc7252}{CoAP
+ protocol}.
+
+ Unlike JSON and \l QVariantMap, CBOR map keys can be of any type, not just
+ strings. For that reason, QCborMap is effectively a map between QCborValue
+ keys to QCborValue value elements.
+
+ However, for all member functions that take a key parameter, QCborMap
+ provides overloads that will work efficiently with integers and strings. In
+ fact, the use of integer keys is encouraged, since they occupy fewer bytes
+ to transmit and are simpler to encode and decode. Newer protocols designed
+ by the IETF CoRE WG to work specifically with CBOR are known to use them.
+
+ QCborMap is not sorted, because of that, searching for keys has linear
+ complexity (O(n)). QCborMap actually keeps the elements in the order that
+ they were inserted, which means that it is possible to make sorted
+ QCborMaps by carefully inserting elements in sorted order. CBOR does not
+ require sorting, but recommends it.
+
+ QCborMap can also be converted to and from QVariantMap and QJsonObject.
+ However, when performing the conversion, any non-string keys will be
+ stringified using a one-way method that the conversion back to QCborMap
+ will not undo.
+
+ \sa QCborArray, QCborValue, QJsonDocument, QVariantMap
+ */
+
+/*!
+ \typedef QCborMap::value_type
+
+ The value that is stored in this container: a pair of QCborValues
+ */
+
+/*!
+ \typedef QCborMap::key_type
+
+ The key type for this map. Since QCborMap keys can be any CBOR type, this
+ is a QCborValue.
+ */
+
+/*!
+ \typedef QCborMap::mapped_type
+
+ The type that is mapped to (the value), that is, a QCborValue.
+ */
+
+/*!
+ \typedef QCborMap::size_type
+
+ The type that QCborMap uses for sizes.
+ */
+
+/*!
+ \typedef QCborMap::iterator
+
+ A synonym for QCborMap::Iterator.
+ */
+
+/*!
+ \typedef QCborMap::const_iterator
+
+ A synonym for QCborMap::ConstIterator
+ */
+
+/*!
+ \fn QCborMap::iterator QCborMap::begin()
+
+ Returns a map iterator pointing to the first key-value pair of this map. If
+ this map is empty, the returned iterator will be the same as end().
+
+ \sa constBegin(), end()
+ */
+
+/*!
+ \fn QCborMap::const_iterator QCborMap::constBegin() const
+
+ Returns a map iterator pointing to the first key-value pair of this map. If
+ this map is empty, the returned iterator will be the same as constEnd().
+
+ \sa begin(), constEnd()
+ */
+
+/*!
+ \fn QCborMap::const_iterator QCborMap::begin() const
+
+ Returns a map iterator pointing to the first key-value pair of this map. If
+ this map is empty, the returned iterator will be the same as constEnd().
+
+ \sa begin(), constEnd()
+ */
+
+/*!
+ \fn QCborMap::const_iterator QCborMap::cbegin() const
+
+ Returns a map iterator pointing to the first key-value pair of this map. If
+ this map is empty, the returned iterator will be the same as constEnd().
+
+ \sa begin(), constEnd()
+ */
+
+/*!
+ \fn QCborMap::iterator QCborMap::end()
+
+ Returns a map iterator representing an element just past the last element
+ in the map.
+
+ \sa begin(), constBegin(), find(), constFind()
+ */
+
+/*!
+ \fn QCborMap::iterator QCborMap::constEnd() const
+
+ Returns a map iterator representing an element just past the last element
+ in the map.
+
+ \sa begin(), constBegin(), find(), constFind()
+ */
+
+/*!
+ \fn QCborMap::iterator QCborMap::end() const
+
+ Returns a map iterator representing an element just past the last element
+ in the map.
+
+ \sa begin(), constBegin(), find(), constFind()
+ */
+
+/*!
+ \fn QCborMap::iterator QCborMap::cend() const
+
+ Returns a map iterator representing an element just past the last element
+ in the map.
+
+ \sa begin(), constBegin(), find(), constFind()
+ */
+
+/*!
+ Constructs an empty CBOR Map object.
+
+ \sa isEmpty()
+ */
+QCborMap::QCborMap() noexcept
+ : d(nullptr)
+{
+}
+
+/*!
+ Creates a QCborMap object that is a copy of \a other.
+ */
+QCborMap::QCborMap(const QCborMap &other) noexcept
+ : d(other.d)
+{
+}
+
+/*!
+ \fn QCborMap::QCborMap(std::initializer_list<value_type> args)
+
+ Constructs a QCborMap with items from a brace-initialization list found in
+ \a args, as in the following example:
+
+ \code
+ QCborMap map = {
+ {0, "Hello"},
+ {1, "World"},
+ {"foo", nullptr},
+ {"bar", QCborArray{0, 1, 2, 3, 4}}
+ };
+ \endcode
+ */
+
+/*!
+ Destroys this QCborMap object and frees any associated resources it owns.
+ */
+QCborMap::~QCborMap()
+{
+}
+
+/*!
+ Replaces the contents of this object with a copy of \a other, then returns
+ a reference to this object.
+ */
+QCborMap &QCborMap::operator=(const QCborMap &other) noexcept
+{
+ d = other.d;
+ return *this;
+}
+
+/*!
+ \fn void QCborMap::swap(QCborMap &other)
+
+ Swaps the contents of this map and \a other.
+ */
+
+/*!
+ \fn QCborValue QCborMap::toCborValue() const
+
+ Explicitly constructs a \l QCborValue object that represents this map.
+ This function is usually not necessary since QCborValue has a constructor
+ for QCborMap, so the conversion is implicit.
+
+ Converting QCborMap to QCborValue allows it to be used in any context where
+ QCborValues can be used, including as keys and mapped types in QCborMap, as
+ well as QCborValue::toCbor().
+
+ \sa QCborValue::QCborValue(const QCborMap &)
+ */
+
+/*!
+ \fn bool QCborMap::isEmpty() const
+
+ Returns true if this map is empty (that is, size() is 0).
+
+ \sa size()
+ */
+
+/*!
+ Returns the number of elements in this map.
+
+ \sa isEmpty()
+ */
+qsizetype QCborMap::size() const noexcept
+{
+ return d ? d->elements.size() / 2 : 0;
+}
+
+/*!
+ Returns a list of all keys in this map.
+
+ \sa QMap::keys(), QHash::keys()
+ */
+QVector<QCborValue> QCborMap::keys() const
+{
+ QVector<QCborValue> result;
+ if (d) {
+ result.reserve(size());
+ for (qsizetype i = 0; i < d->elements.size(); i += 2)
+ result << d->valueAt(i);
+ }
+ return result;
+}
+
+/*!
+ \fn QCborValue QCborMap::value(qint64 key) const
+
+ Returns the QCborValue element in this map that corresponds to key \a key,
+ if there is one. CBOR recommends using integer keys, since they occupy less
+ space and are simpler to encode and decode.
+
+ If the map does not contain key \a key, this function returns a QCborValue
+ containing an undefined value. For that reason, it is not possible with
+ this function to tell apart the situation where the key was not present
+ from the situation where the key was mapped to an undefined value.
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one the return from function will reference. QCborMap does not allow
+ inserting duplicate keys, but it is possible to create such a map by
+ decoding a CBOR stream with them. They are usually not permitted and having
+ duplicate keys is usually an indication of a problem in the sender.
+
+ \sa operator[](qint64), find(qint64), constFind(qint64), remove(qint64), contains(qint64)
+ value(QLatin1String), value(const QString &), value(const QCborValue &)
+ */
+
+/*!
+ \fn QCborValue QCborMap::operator[](qint64 key) const
+
+ Returns the QCborValue element in this map that corresponds to key \a key,
+ if there is one. CBOR recommends using integer keys, since they occupy less
+ space and are simpler to encode and decode.
+
+ If the map does not contain key \a key, this function returns a QCborValue
+ containing an undefined value. For that reason, it is not possible with
+ this function to tell apart the situation where the key was not present
+ from the situation where the key was mapped to an undefined value.
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one this function will return. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa value(qint64), find(qint64), constFind(qint64), remove(qint64), contains(qint64)
+ operator[](QLatin1String), operator[](const QString &), operator[](const QCborOperator[] &)
+ */
+
+/*!
+ \fn QCborValue QCborArray::take(qint64 key)
+
+ Removes the key \a key and the corresponding value from the map and returns
+ the value, if it is found. If the map contains no such key, this function does nothing.
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one this function will remove. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa value(qint64), operator[](qint64), find(qint64), contains(qint64),
+ take(QLatin1String), take(const QString &), take(const QCborValue &), insert()
+ */
+
+/*!
+ \fn void QCborMap::remove(qint64 key)
+
+ Removes the key \a key and the corresponding value from the map, if it is
+ found. If the map contains no such key, this function does nothing.
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one this function will remove. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa value(qint64), operator[](qint64), find(qint64), contains(qint64)
+ remove(QLatin1String), remove(const QString &), remove(const QCborValue &)
+ */
+
+/*!
+ \fn bool QCborMap::contains(qint64 key)
+
+ Returns true if this map contains a key-value pair identified by key \a
+ key. CBOR recommends using integer keys, since they occupy less space and
+ are simpler to encode and decode.
+
+ \sa value(qint64), operator[](qint64), find(qint64), remove(qint64),
+ contains(QLatin1String), remove(const QString &), remove(const QCborValue &)
+ */
+
+/*!
+ Returns a QCborValueRef to the value in this map that corresponds to key \a
+ key. CBOR recommends using integer keys, since they occupy less space and
+ are simpler to encode and decode.
+
+ QCborValueRef has the exact same API as \l QCborValue, with one important
+ difference: if you assign new values to it, this map will be updated with
+ that new value.
+
+ If the map did not have a key equal to \a key, one is inserted and this
+ function returns a reference to the new value, which will be a QCborValue
+ with an undefined value. For that reason, it is not possible with this
+ function to tell apart the situation where the key was not present from the
+ situation where the key was mapped to an undefined value.
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one the return will reference. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa value(qint64), find(qint64), contains(qint64), remove(qint64),
+ operator[](QLatin1String), operator[](const QString &), operator[](const QCborValue &)
+ */
+QCborValueRef QCborMap::operator[](qint64 key)
+{
+ auto it = find(key);
+ if (it == constEnd()) {
+ // insert element
+ detach(it.item.i + 2);
+ d->append(key);
+ d->append(Undefined{});
+ }
+ return { d.data(), it.item.i };
+}
+
+/*!
+ \fn QCborValue QCborMap::value(QLatin1String key) const
+ \overload
+
+ Returns the QCborValue element in this map that corresponds to key \a key,
+ if there is one.
+
+ If the map does not contain key \a key, this function returns a QCborValue
+ containing an undefined value. For that reason, it is not possible with
+ this function to tell apart the situation where the key was not present
+ from the situation where the key was mapped to an undefined value.
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one this function will return. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa operator[](QLatin1String), find(QLatin1String), constFind(QLatin1String),
+ remove(QLatin1String), contains(QLatin1String)
+ value(qint64), value(const QString &), value(const QCborValue &)
+ */
+
+/*!
+ \fn QCborValue QCborMap::operator[](QLatin1String key) const
+ \overload
+
+ Returns the QCborValue element in this map that corresponds to key \a key,
+ if there is one.
+
+ If the map does not contain key \a key, this function returns a QCborValue
+ containing an undefined value. For that reason, it is not possible with
+ this function to tell apart the situation where the key was not present
+ from the situation where the key was mapped to an undefined value.
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one this function will return. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa value(QLatin1String), find(QLatin1String), constFind(QLatin1String),
+ remove(QLatin1String), contains(QLatin1String)
+ operator[](qint64), operator[](const QString &), operator[](const QCborOperator[] &)
+ */
+
+/*!
+ \fn QCborValue QCborArray::take(QLatin1String key)
+
+ Removes the key \a key and the corresponding value from the map and returns
+ the value, if it is found. If the map contains no such key, this function does nothing.
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one this function will remove. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa value(QLatin1String), operator[](QLatin1String), find(QLatin1String), contains(QLatin1String),
+ take(qint64), take(const QString &), take(const QCborValue &), insert()
+ */
+
+/*!
+ \fn void QCborMap::remove(QLatin1String key)
+ \overload
+
+ Removes the key \a key and the corresponding value from the map, if it is
+ found. If the map contains no such key, this function does nothing.
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one this function will remove. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa value(QLatin1String), operator[](QLatin1String), find(QLatin1String), contains(QLatin1String)
+ remove(qint64), remove(const QString &), remove(const QCborValue &)
+ */
+
+/*!
+ \fn bool QCborMap::contains(QLatin1String key)
+ \overload
+
+ Returns true if this map contains a key-value pair identified by key \a
+ key.
+
+ \sa value(QLatin1String), operator[](QLatin1String), find(QLatin1String), remove(QLatin1String),
+ contains(qint64), remove(const QString &), remove(const QCborValue &)
+ */
+
+/*!
+ \overload
+
+ Returns a QCborValueRef to the value in this map that corresponds to key \a
+ key.
+
+ QCborValueRef has the exact same API as \l QCborValue, with one important
+ difference: if you assign new values to it, this map will be updated with
+ that new value.
+
+ If the map did not have a key equal to \a key, one is inserted and this
+ function returns a reference to the new value, which will be a QCborValue
+ with an undefined value. For that reason, it is not possible with this
+ function to tell apart the situation where the key was not present from the
+ situation where the key was mapped to an undefined value.
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one the return will reference. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa value(QLatin1String), find(QLatin1String), contains(QLatin1String), remove(QLatin1String),
+ operator[](qint64), operator[](const QString &), operator[](const QCborValue &)
+ */
+QCborValueRef QCborMap::operator[](QLatin1String key)
+{
+ auto it = find(key);
+ if (it == constEnd()) {
+ // insert element
+ detach(it.item.i + 2);
+ d->append(key);
+ d->append(Undefined{});
+ }
+ return { d.data(), it.item.i };
+}
+
+/*!
+ \fn QCborValue QCborMap::value(const QString &key) const
+ \overload
+
+ Returns the QCborValue element in this map that corresponds to key \a key,
+ if there is one.
+
+ If the map does not contain key \a key, this function returns a QCborValue
+ containing an undefined value. For that reason, it is not possible with
+ this function to tell apart the situation where the key was not present
+ from the situation where the key was mapped to an undefined value.
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one this function will return. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa operator[](const QString &), find(const QString &), constFind(const QString &),
+ remove(const QString &), contains(const QString &)
+ value(qint64), value(QLatin1String), value(const QCborValue &)
+ */
+
+/*!
+ \fn QCborValue QCborMap::operator[](const QString &key) const
+ \overload
+
+ Returns the QCborValue element in this map that corresponds to key \a key,
+ if there is one.
+
+ If the map does not contain key \a key, this function returns a QCborValue
+ containing an undefined value. For that reason, it is not possible with
+ this function to tell apart the situation where the key was not present
+ from the situation where the key was mapped to an undefined value.
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one this function will return. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa value(const QString &), find(const QString &), constFind(const QString &),
+ remove(const QString &), contains(const QString &)
+ operator[](qint64), operator[](QLatin1String), operator[](const QCborOperator[] &)
+ */
+
+/*!
+ \fn QCborValue QCborArray::take(const QString &key)
+
+ Removes the key \a key and the corresponding value from the map and returns
+ the value, if it is found. If the map contains no such key, this function does nothing.
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one this function will remove. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa value(const QString &), operator[](const QString &), find(const QString &), contains(const QString &),
+ take(QLatin1String), take(qint64), take(const QCborValue &), insert()
+ */
+
+/*!
+ \fn void QCborMap::remove(const QString &key)
+ \overload
+
+ Removes the key \a key and the corresponding value from the map, if it is
+ found. If the map contains no such key, this function does nothing.
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one this function will remove. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa value(const QString &), operator[](const QString &), find(const QString &),
+ contains(const QString &)
+ remove(qint64), remove(QLatin1String), remove(const QCborValue &)
+ */
+
+/*!
+ \fn bool QCborMap::contains(const QString &key)
+ \overload
+
+ Returns true if this map contains a key-value pair identified by key \a
+ key.
+
+ \sa value(const QString &), operator[](const QString &), find(const QString &),
+ remove(const QString &),
+ contains(qint64), remove(QLatin1String), remove(const QCborValue &)
+ */
+
+/*!
+ \overload
+
+ Returns a QCborValueRef to the value in this map that corresponds to key \a
+ key.
+
+ QCborValueRef has the exact same API as \l QCborValue, with one important
+ difference: if you assign new values to it, this map will be updated with
+ that new value.
+
+ If the map did not have a key equal to \a key, one is inserted and this
+ function returns a reference to the new value, which will be a QCborValue
+ with an undefined value. For that reason, it is not possible with this
+ function to tell apart the situation where the key was not present from the
+ situation where the key was mapped to an undefined value.
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one the return will reference. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa value(const QString &), find(const QString &), contains(const QString &), remove(const QString &),
+ operator[](qint64), operator[](QLatin1String), operator[](const QCborValue &)
+ */
+QCborValueRef QCborMap::operator[](const QString & key)
+{
+ auto it = find(key);
+ if (it == constEnd()) {
+ // insert element
+ detach(it.item.i + 2);
+ d->append(key);
+ d->append(Undefined{});
+ }
+ return { d.data(), it.item.i };
+}
+
+/*!
+ \fn QCborValue QCborMap::value(const QCborValue &key) const
+
+ Returns the QCborValue element in this map that corresponds to key \a key,
+ if there is one.
+
+ If the map does not contain key \a key, this function returns a QCborValue
+ containing an undefined value. For that reason, it is not possible with
+ this function to tell apart the situation where the key was not present
+ from the situation where the key was mapped to an undefined value.
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one this function will return. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa operator[](const QCborValue &), find(const QCborValue &), constFind(const QCborValue &),
+ remove(const QCborValue &), contains(const QCborValue &)
+ value(qint64), value(QLatin1String), value(const QString &)
+ */
+
+/*!
+ \fn QCborValue QCborMap::operator[](const QCborValue &key) const
+
+ Returns the QCborValue element in this map that corresponds to key \a key,
+ if there is one.
+
+ If the map does not contain key \a key, this function returns a QCborValue
+ containing an undefined value. For that reason, it is not possible with
+ this function to tell apart the situation where the key was not present
+ from the situation where the key was mapped to an undefined value.
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one this function will return. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa value(const QCborValue &), find(const QCborValue &), constFind(const QCborValue &),
+ remove(const QCborValue &), contains(const QCborValue &)
+ operator[](qint64), operator[](QLatin1String), operator[](const QCborOperator[] &)
+ */
+
+/*!
+ \fn QCborValue QCborArray::take(const QCborValue &key)
+
+ Removes the key \a key and the corresponding value from the map and returns
+ the value, if it is found. If the map contains no such key, this function does nothing.
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one this function will remove. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa value(const QCborValue &), operator[](const QCborValue &), find(const QCborValue &), contains(const QCborValue &),
+ take(QLatin1String), take(const QString &), take(qint64), insert()
+ */
+
+/*!
+ \fn void QCborMap::remove(const QCborValue &key)
+
+ Removes the key \a key and the corresponding value from the map, if it is
+ found. If the map contains no such key, this function does nothing.
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one this function will remove. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa value(const QCborValue &), operator[](const QCborValue &), find(const QCborValue &),
+ contains(const QCborValue &)
+ remove(qint64), remove(QLatin1String), remove(const QString &)
+ */
+
+/*!
+ \fn bool QCborMap::contains(const QCborValue &key)
+
+ Returns true if this map contains a key-value pair identified by key \a
+ key.
+
+ \sa value(const QCborValue &), operator[](const QCborValue &), find(const QCborValue &),
+ remove(const QCborValue &),
+ contains(qint64), remove(QLatin1String), remove(const QString &)
+ */
+
+/*!
+ \overload
+
+ Returns a QCborValueRef to the value in this map that corresponds to key \a
+ key.
+
+ QCborValueRef has the exact same API as \l QCborValue, with one important
+ difference: if you assign new values to it, this map will be updated with
+ that new value.
+
+ If the map did not have a key equal to \a key, one is inserted and this
+ function returns a reference to the new value, which will be a QCborValue
+ with an undefined value. For that reason, it is not possible with this
+ function to tell apart the situation where the key was not present from the
+ situation where the key was mapped to an undefined value.
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one the return will reference. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa value(const QCborValue &), find(const QCborValue &), contains(const QCborValue &), remove(const QCborValue &),
+ operator[](qint64), operator[](QLatin1String), operator[](const QString &)
+ */
+QCborValueRef QCborMap::operator[](const QCborValue &key)
+{
+ auto it = find(key);
+ if (it == constEnd()) {
+ // insert element
+ detach(it.item.i + 2);
+ d->append(key);
+ d->append(Undefined{});
+ }
+ return { d.data(), it.item.i };
+}
+
+/*!
+ Returns a map iterator to the key-value pair whose key is \a key, if the
+ map contains such a pair. If it doesn't, this function returns end().
+
+ CBOR recommends using integer keys, since they occupy less
+ space and are simpler to encode and decode.
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one this function will find. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa value(qint64), operator[](qint64), constFind(qint64), remove(qint64), contains(qint64)
+ value(QLatin1String), value(const QString &), value(const QCborValue &)
+ */
+QCborMap::iterator QCborMap::find(qint64 key)
+{
+ auto it = constFind(key);
+ if (it != constEnd())
+ detach();
+ return { d.data(), it.item.i };
+}
+
+/*!
+ \overload
+
+ Returns a map iterator to the key-value pair whose key is \a key, if the
+ map contains such a pair. If it doesn't, this function returns end().
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one this function will find. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa value(QLatin1String), operator[](QLatin1String), constFind(QLatin1String),
+ remove(QLatin1String), contains(QLatin1String)
+ value(qint64), value(const QString &), value(const QCborValue &)
+ */
+QCborMap::iterator QCborMap::find(QLatin1String key)
+{
+ auto it = constFind(key);
+ if (it != constEnd())
+ detach();
+ return { d.data(), it.item.i };
+}
+
+/*!
+ \overload
+
+ Returns a map iterator to the key-value pair whose key is \a key, if the
+ map contains such a pair. If it doesn't, this function returns end().
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one this function will find. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa value(const QString &), operator[](const QString &), constFind(const QString &),
+ remove(const QString &), contains(const QString &)
+ value(qint64), value(QLatin1String), value(const QCborValue &)
+ */
+QCborMap::iterator QCborMap::find(const QString & key)
+{
+ auto it = constFind(key);
+ if (it != constEnd())
+ detach();
+ return { d.data(), it.item.i };
+}
+
+/*!
+ \overload
+
+ Returns a map iterator to the key-value pair whose key is \a key, if the
+ map contains such a pair. If it doesn't, this function returns end().
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one this function will find. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa value(const QCborValue &), operator[](const QCborValue &), constFind(const QCborValue &),
+ remove(const QCborValue &), contains(const QCborValue &)
+ value(qint64), value(QLatin1String), value(const QString &)
+ */
+QCborMap::iterator QCborMap::find(const QCborValue &key)
+{
+ auto it = constFind(key);
+ if (it != constEnd())
+ detach();
+ return { d.data(), it.item.i };
+}
+
+/*!
+ Returns a map iterator to the key-value pair whose key is \a key, if the
+ map contains such a pair. If it doesn't, this function returns constEnd().
+
+ CBOR recommends using integer keys, since they occupy less
+ space and are simpler to encode and decode.
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one this function will find. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa value(qint64), operator[](qint64), find(qint64), remove(qint64), contains(qint64)
+ value(QLatin1String), value(const QString &), value(const QCborValue &)
+ */
+QCborMap::const_iterator QCborMap::constFind(qint64 key) const
+{
+ for (qsizetype i = 0; i < 2 * size(); i += 2) {
+ const auto &e = d->elements.at(i);
+ if (e.type == QCborValue::Integer && e.value == key)
+ return { d.data(), i + 1 };
+ }
+ return constEnd();
+}
+
+/*!
+ \overload
+
+ Returns a map iterator to the key-value pair whose key is \a key, if the
+ map contains such a pair. If it doesn't, this function returns constEnd().
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one this function will find. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa value(QLatin1String), operator[](QLatin1String), find(QLatin1String),
+ remove(QLatin1String), contains(QLatin1String)
+ value(qint64), value(const QString &), value(const QCborValue &)
+ */
+QCborMap::const_iterator QCborMap::constFind(QLatin1String key) const
+{
+ for (qsizetype i = 0; i < 2 * size(); i += 2) {
+ if (d->stringEqualsElement(i, key))
+ return { d.data(), i + 1 };
+ }
+ return constEnd();
+}
+
+/*!
+ \overload
+
+ Returns a map iterator to the key-value pair whose key is \a key, if the
+ map contains such a pair. If it doesn't, this function returns constEnd().
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one this function will find. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa value(const QString &), operator[](const QString &), find(const QString &),
+ remove(const QString &), contains(const QString &)
+ value(qint64), value(QLatin1String), value(const QCborValue &)
+ */
+QCborMap::const_iterator QCborMap::constFind(const QString & key) const
+{
+ for (qsizetype i = 0; i < 2 * size(); i += 2) {
+ if (d->stringEqualsElement(i, key))
+ return { d.data(), i + 1 };
+ }
+ return constEnd();
+}
+
+/*!
+ \overload
+
+ Returns a map iterator to the key-value pair whose key is \a key, if the
+ map contains such a pair. If it doesn't, this function returns constEnd().
+
+ If the map contains more than one key equal to \a key, it is undefined
+ which one this function will find. QCborMap does not allow inserting
+ duplicate keys, but it is possible to create such a map by decoding a CBOR
+ stream with them. They are usually not permitted and having duplicate keys
+ is usually an indication of a problem in the sender.
+
+ \sa value(const QCborValue &), operator[](const QCborValue &), find(const QCborValue &),
+ remove(const QCborValue &), contains(const QCborValue &),
+ value(qint64), value(QLatin1String), value(const QString &)
+ */
+QCborMap::const_iterator QCborMap::constFind(const QCborValue &key) const
+{
+ for (qsizetype i = 0; i < 2 * size(); i += 2) {
+ int cmp = d->compareElement(i, key);
+ if (cmp == 0)
+ return { d.data(), i + 1 };
+ }
+ return constEnd();
+}
+
+/*!
+ \fn QCborMap::iterator QCborMap::insert(qint64 key, const QCborValue &value)
+ \overload
+
+ Inserts the key \a key and value \a value into this map and returns a map
+ iterator pointing to the newly inserted pair.
+
+ If the map already had a key equal to \a key, its value will be overwritten
+ by \a value.
+
+ \sa erase(), remove(qint64), value(qint64), operator[](qint64), find(qint64),
+ contains(qint64), take(qint64), extract()
+ */
+
+/*!
+ \fn QCborMap::iterator QCborMap::insert(QLatin1String key, const QCborValue &value)
+ \overload
+
+ Inserts the key \a key and value \a value into this map and returns a map
+ iterator pointing to the newly inserted pair.
+
+ If the map already had a key equal to \a key, its value will be overwritten
+ by \a value.
+
+ \sa erase(), remove(QLatin1String), value(QLatin1String), operator[](QLatin1String),
+ find(QLatin1String), contains(QLatin1String), take(QLatin1String), extract()
+ */
+
+/*!
+ \fn QCborMap::iterator QCborMap::insert(const QString &key, const QCborValue &value)
+ \overload
+
+ Inserts the key \a key and value \a value into this map and returns a map
+ iterator pointing to the newly inserted pair.
+
+ If the map already had a key equal to \a key, its value will be overwritten
+ by \a value.
+
+ \sa erase(), remove(const QString &), value(const QString &), operator[](const QString &),
+ find(const QString &), contains(const QString &), take(const QString &), extract()
+ */
+
+/*!
+ \fn QCborMap::iterator QCborMap::insert(const QCborValue &key, const QCborValue &value)
+ \overload
+
+ Inserts the key \a key and value \a value into this map and returns a map
+ iterator pointing to the newly inserted pair.
+
+ If the map already had a key equal to \a key, its value will be overwritten
+ by \a value.
+
+ \sa erase(), remove(const QCborValue &), value(const QCborValue &), operator[](const QCborValue &),
+ find(const QCborValue &), contains(const QCborValue &), take(const QCborValue &), extract()
+ */
+
+/*!
+ \fn QCborMap::iterator QCborMap::insert(value_type v)
+ \overload
+
+ Inserts the key-value pair in \a v into this map and returns a map iterator
+ pointing to the newly inserted pair.
+
+ If the map already had a key equal to \c{v.first}, its value will be
+ overwritten by \c{v.second}.
+
+ \sa operator[], erase(), extract()
+ */
+
+
+/*!
+ \fn QCborMap::iterator QCborMap::erase(const_iterator it)
+
+ Removes the key-value pair pointed to by the map iterator \a it and returns a
+ pointer to the next element, after removal.
+
+ \sa remove(), begin(), end(), insert(), extract()
+ */
+
+/*!
+ \overload
+
+ Removes the key-value pair pointed to by the map iterator \a it and returns a
+ pointer to the next element, after removal.
+
+ \sa remove(), begin(), end(), insert()
+ */
+QCborMap::iterator QCborMap::erase(QCborMap::iterator it)
+{
+ detach();
+
+ // remove both key and value
+ // ### optimize?
+ d->removeAt(it.item.i - 1);
+ d->removeAt(it.item.i - 1);
+ return it;
+}
+
+/*!
+ Extracts a value from the map at the position indicated by iterator \a it
+ and returns the value so extracted.
+
+ \sa insert(), erase(), take(), remove()
+ */
+QCborValue QCborMap::extract(iterator it)
+{
+ detach();
+ QCborValue v = d->extractAt(it.item.i);
+ // remove both key and value
+ // ### optimize?
+ d->removeAt(it.item.i - 1);
+ d->removeAt(it.item.i - 1);
+
+ return v;
+}
+
+/*!
+ \fn bool QCborMap::empty() const
+
+ Synonym for isEmpty(). This function is provided for compatibility with
+ generic code that uses the Standard Library API.
+
+ Returns true if this map is empty (size() == 0).
+
+ \sa isEmpty(), size()
+ */
+
+/*!
+ \fn int QCborMap::compare(const QCborMap &other) const
+
+ Compares this map and \a other, comparing each element in sequence, and
+ returns an integer that indicates whether this map should be sorted prior
+ to (if the result is negative) or after \a other (if the result is
+ positive). If this function returns 0, the two maps are equal and contain
+ the same elements.
+
+ Note that CBOR maps are unordered, which means that two maps containing the
+ very same pairs but in different order will still compare differently. To
+ avoid this, it is recommended to insert elements into the map in a
+ predictable order, such as by ascending key value. In fact, maps with keys
+ in sorted order are required for Canonical CBOR representation.
+
+ For more information on CBOR sorting order, see QCborValue::compare().
+
+ \sa QCborValue::compare(), QCborArray::compare(), operator==()
+ */
+
+/*!
+ \fn bool QCborMap::operator==(const QCborMap &other) const
+
+ Compares this map and \a other, comparing each element in sequence, and
+ returns true if the two maps contains the same elements in the same order,
+ false otherwise.
+
+ Note that CBOR maps are unordered, which means that two maps containing the
+ very same pairs but in different order will still compare differently. To
+ avoid this, it is recommended to insert elements into the map in a
+ predictable order, such as by ascending key value. In fact, maps with keys
+ in sorted order are required for Canonical CBOR representation.
+
+ For more information on CBOR equality in Qt, see, QCborValue::compare().
+
+ \sa compare(), QCborValue::operator==(), QCborMap::operator==(),
+ operator!=(), operator<()
+ */
+
+/*!
+ \fn bool QCborMap::operator!=(const QCborMap &other) const
+
+ Compares this map and \a other, comparing each element in sequence, and
+ returns true if the two maps contains any different elements or elements in
+ different orders, false otherwise.
+
+ Note that CBOR maps are unordered, which means that two maps containing the
+ very same pairs but in different order will still compare differently. To
+ avoid this, it is recommended to insert elements into the map in a
+ predictable order, such as by ascending key value. In fact, maps with keys
+ in sorted order are required for Canonical CBOR representation.
+
+ For more information on CBOR equality in Qt, see, QCborValue::compare().
+
+ \sa compare(), QCborValue::operator==(), QCborMap::operator==(),
+ operator==(), operator<()
+ */
+
+/*!
+ \fn bool QCborMap::operator<(const QCborMap &other) const
+
+ Compares this map and \a other, comparing each element in sequence, and
+ returns true if this map should be sorted before \a other, false
+ otherwise.
+
+ Note that CBOR maps are unordered, which means that two maps containing the
+ very same pairs but in different order will still compare differently. To
+ avoid this, it is recommended to insert elements into the map in a
+ predictable order, such as by ascending key value. In fact, maps with keys
+ in sorted order are required for Canonical CBOR representation.
+
+ For more information on CBOR sorting order, see QCborValue::compare().
+
+ \sa compare(), QCborValue::operator==(), QCborMap::operator==(),
+ operator==(), operator!=()
+ */
+
+void QCborMap::detach(qsizetype reserved)
+{
+ d = QCborContainerPrivate::detach(d.data(), reserved ? reserved : size() * 2);
+}
+
+/*!
+ \class QCborMap::Iterator
+ \inmodule QtCore
+ \ingroup cbor
+ \reentrant
+ \since 5.12
+
+ \brief The QCborMap::Iterator class provides an STL-style non-const iterator for QCborMap.
+
+ QCborMap::Iterator allows you to iterate over a QCborMap and to modify the
+ value (but not the key) stored under a particular key. If you want to
+ iterate over a const QCborMap, you should use QCborMap::ConstIterator. It
+ is generally good practice to use QCborMap::ConstIterator on a non-const
+ QCborMap as well, unless you need to change the QCborMap through the
+ iterator. Const iterators are slightly faster, and improve code
+ readability.
+
+ You must initialize the iterator using a QCborMap function like
+ QCborMap::begin(), QCborMap::end(), or QCborMap::find() before you can
+ start iterating..
+
+ Multiple iterators can be used on the same object. Existing iterators will however
+ become dangling once the object gets modified.
+
+ \sa QCborMap::ConstIterator
+*/
+
+/*!
+ \typedef QCborMap::Iterator::difference_type
+ \internal
+*/
+
+/*!
+ \typedef QCborMap::Iterator::iterator_category
+
+ A synonym for \e {std::random_access_iterator_tag} indicating
+ this iterator is a random-access iterator.
+*/
+
+/*!
+ \typedef QCborMap::Iterator::reference
+ \internal
+*/
+
+/*!
+ \typedef QCborMap::Iterator::value_type
+ \internal
+*/
+
+/*!
+ \typedef QCborMap::Iterator::pointer
+ \internal
+*/
+
+/*!
+ \fn QCborMap::Iterator::Iterator()
+
+ Constructs an uninitialized iterator.
+
+ Functions like key(), value(), and operator++() must not be
+ called on an uninitialized iterator. Use operator=() to assign a
+ value to it before using it.
+
+ \sa QCborMap::begin(), QCborMap::end()
+*/
+
+/*!
+ \fn QCborMap::Iterator::Iterator(const Iterator &other)
+
+ Constructs an iterator as a copy of \a other.
+ */
+
+/*!
+ \fn QCborMap::Iterator &QCborMap::Iterator::operator=(const Iterator &other)
+
+ Makes this iterator a copy of \a other and returns a reference to this
+ iterator.
+ */
+
+/*!
+ \fn QCborValue QCborMap::Iterator::key() const
+
+ Returns the current item's key.
+
+ There is no direct way of changing an item's key through an iterator,
+ although it can be done by calling QCborMap::erase() followed by
+ QCborMap::insert().
+
+ \sa value()
+*/
+
+/*!
+ \fn QCborValueRef QCborMap::Iterator::value() const
+
+ Returns a modifiable reference to the current item's value.
+
+ You can change the value for a key by using value() on the left side of an
+ assignment.
+
+ The return value is of type QCborValueRef, a helper class for QCborArray
+ and QCborMap. When you get an object of type QCborValueRef, you can use it
+ as if it were a reference to a QCborValue. If you assign to it, the
+ assignment will apply to the element in the QCborArray or QCborMap from
+ which you got the reference.
+
+ \sa key(), operator*()
+*/
+
+/*!
+ \fn QCborMap::Iterator::value_type QCborMap::Iterator::operator*() const
+
+ Returns a pair containing the current item's key and a modifiable reference
+ to the current item's value.
+
+ The second element of the pair is of type QCborValueRef, a helper class for
+ QCborArray and QCborMap. When you get an object of type QCborValueRef, you
+ can use it as if it were a reference to a QCborValue. If you assign to it,
+ the assignment will apply to the element in the QCborArray or QCborMap from
+ which you got the reference.
+
+ \sa key(), value()
+*/
+
+/*!
+ \fn QCborValueRef *QCborMap::Iterator::operator->() const
+
+ Returns a pointer to a modifiable reference to the current pair's value.
+*/
+
+/*!
+ \fn bool QCborMap::Iterator::operator==(const Iterator &other) const
+ \fn bool QCborMap::Iterator::operator==(const ConstIterator &other) const
+
+ Returns \c true if \a other points to the same entry in the map as this
+ iterator; otherwise returns \c false.
+
+ \sa operator!=()
+*/
+
+/*!
+ \fn bool QCborMap::Iterator::operator!=(const Iterator &other) const
+ \fn bool QCborMap::Iterator::operator!=(const ConstIterator &other) const
+
+ Returns \c true if \a other points to a different entry in the map than
+ this iterator; otherwise returns \c false.
+
+ \sa operator==()
+*/
+
+/*!
+ \fn QCborMap::Iterator &QCborMap::Iterator::operator++()
+
+ The prefix ++ operator, \c{++i}, advances the iterator to the next item in
+ the map and returns this iterator.
+
+ Calling this function on QCborMap::end() leads to undefined results.
+
+ \sa operator--()
+*/
+
+/*!
+ \fn QCborMap::Iterator QCborMap::Iterator::operator++(int)
+ \overload
+
+ The postfix ++ operator, \c{i++}, advances the iterator to the next item in
+ the map and returns an iterator to the previously current item.
+*/
+
+/*!
+ \fn QCborMap::Iterator QCborMap::Iterator::operator--()
+
+ The prefix -- operator, \c{--i}, makes the preceding item current and
+ returns this iterator.
+
+ Calling this function on QCborMap::begin() leads to undefined results.
+
+ \sa operator++()
+*/
+
+/*!
+ \fn QCborMap::Iterator QCborMap::Iterator::operator--(int)
+ \overload
+
+ The postfix -- operator, \c{i--}, makes the preceding item current and
+ returns an iterator pointing to the previously current item.
+*/
+
+/*!
+ \fn QCborMap::Iterator QCborMap::Iterator::operator+(qsizetype j) const
+
+ Returns an iterator to the item at \a j positions forward from this
+ iterator. If \a j is negative, the iterator goes backward.
+
+ \sa operator-()
+*/
+
+/*!
+ \fn QCborMap::Iterator QCborMap::Iterator::operator-(qsizetype j) const
+
+ Returns an iterator to the item at \a j positions backward from this
+ iterator. If \a j is negative, the iterator goes forward.
+
+ \sa operator+()
+*/
+
+/*!
+ \fn QCborMap::Iterator &QCborMap::Iterator::operator+=(qsizetype j)
+
+ Advances the iterator by \a j items. If \a j is negative, the iterator goes
+ backward. Returns a reference to this iterator.
+
+ \sa operator-=(), operator+()
+*/
+
+/*!
+ \fn QCborMap::Iterator &QCborMap::Iterator::operator-=(qsizetype j)
+
+ Makes the iterator go back by \a j items. If \a j is negative, the iterator
+ goes forward. Returns a reference to this iterator.
+
+ \sa operator+=(), operator-()
+*/
+
+/*!
+ \class QCborMap::ConstIterator
+ \inmodule QtCore
+ \ingroup cbor
+ \since 5.12
+
+ \brief The QCborMap::ConstIterator class provides an STL-style const iterator for QCborMap.
+
+ QCborMap::ConstIterator allows you to iterate over a QCborMap. If you want
+ to modify the QCborMap as you iterate over it, you must use
+ QCborMap::Iterator instead. It is generally good practice to use
+ QCborMap::ConstIterator, even on a non-const QCborMap, when you don't need
+ to change the QCborMap through the iterator. Const iterators are slightly
+ faster and improve code readability.
+
+ You must initialize the iterator using a QCborMap function like
+ QCborMap::begin(), QCborMap::end(), or QCborMap::find() before you can
+ start iterating..
+
+ Multiple iterators can be used on the same object. Existing iterators
+ will however become dangling if the object gets modified.
+
+ \sa QCborMap::Iterator
+*/
+
+/*!
+ \typedef QCborMap::ConstIterator::difference_type
+ \internal
+*/
+
+/*!
+ \typedef QCborMap::ConstIterator::iterator_category
+
+ A synonym for \e {std::random_access_iterator_tag} indicating
+ this iterator is a random-access iterator.
+*/
+
+/*!
+ \typedef QCborMap::ConstIterator::reference
+ \internal
+*/
+
+/*!
+ \typedef QCborMap::ConstIterator::value_type
+ \internal
+*/
+
+/*!
+ \typedef QCborMap::ConstIterator::pointer
+ \internal
+*/
+
+/*!
+ \fn QCborMap::ConstIterator::ConstIterator()
+
+ Constructs an uninitialized iterator.
+
+ Functions like key(), value(), and operator++() must not be
+ called on an uninitialized iterator. Use operator=() to assign a
+ value to it before using it.
+
+ \sa QCborMap::constBegin(), QCborMap::constEnd()
+*/
+
+/*!
+ \fn QCborMap::ConstIterator::ConstIterator(const ConstIterator &other)
+
+ Constructs an iterator as a copy of \a other.
+ */
+
+/*!
+ \fn QCborMap::ConstIterator &QCborMap::ConstIterator::operator=(const ConstIterator &other)
+
+ Makes this iterator a copy of \a other and returns a reference to this
+ iterator.
+ */
+
+/*!
+ \fn QString QCborMap::ConstIterator::key() const
+
+ Returns the current item's key.
+
+ \sa value()
+*/
+
+/*!
+ \fn QCborValue QCborMap::ConstIterator::value() const
+
+ Returns the current item's value.
+
+ \sa key(), operator*()
+*/
+
+/*!
+ \fn QCborMap::ConstIterator::value_type QCborMap::ConstIterator::operator*() const
+
+ Returns a pair containing the curent item's key and value.
+
+ \sa key(), value()
+ */
+
+/*!
+ \fn const QCborValueRef *QCborMap::ConstIterator::operator->() const
+
+ Returns a pointer to the current pair's value.
+ */
+
+/*!
+ \fn bool QCborMap::ConstIterator::operator==(const ConstIterator &other) const
+ \fn bool QCborMap::ConstIterator::operator==(const Iterator &other) const
+
+ Returns \c true if \a other points to the same entry in the map as this
+ iterator; otherwise returns \c false.
+
+ \sa operator!=()
+*/
+
+/*!
+ \fn bool QCborMap::ConstIterator::operator!=(const ConstIterator &other) const
+ \fn bool QCborMap::ConstIterator::operator!=(const Iterator &other) const
+
+ Returns \c true if \a other points to a different entry in the map than
+ this iterator; otherwise returns \c false.
+
+ \sa operator==()
+ */
+
+/*!
+ \fn QCborMap::ConstIterator &QCborMap::ConstIterator::operator++()
+
+ The prefix ++ operator, \c{++i}, advances the iterator to the next item in
+ the map and returns this iterator.
+
+ Calling this function on QCborMap::end() leads to undefined results.
+
+ \sa operator--()
+*/
+
+/*!
+ \fn QCborMap::ConstIterator QCborMap::ConstIterator::operator++(int)
+ \overload
+
+ The postfix ++ operator, \c{i++}, advances the iterator to the next item in
+ the map and returns an iterator to the previously current item.
+ */
+
+/*!
+ \fn QCborMap::ConstIterator &QCborMap::ConstIterator::operator--()
+
+ The prefix -- operator, \c{--i}, makes the preceding item current and
+ returns this iterator.
+
+ Calling this function on QCborMap::begin() leads to undefined results.
+
+ \sa operator++()
+*/
+
+/*!
+ \fn QCborMap::ConstIterator QCborMap::ConstIterator::operator--(int)
+ \overload
+
+ The postfix -- operator, \c{i--}, makes the preceding item current and
+ returns an iterator pointing to the previously current item.
+ */
+
+/*!
+ \fn QCborMap::ConstIterator QCborMap::ConstIterator::operator+(qsizetype j) const
+
+ Returns an iterator to the item at \a j positions forward from this
+ iterator. If \a j is negative, the iterator goes backward.
+
+ \sa operator-()
+*/
+
+/*!
+ \fn QCborMap::ConstIterator QCborMap::ConstIterator::operator-(qsizetype j) const
+
+ Returns an iterator to the item at \a j positions backward from this
+ iterator. If \a j is negative, the iterator goes forward.
+
+ \sa operator+()
+*/
+
+/*!
+ \fn QCborMap::ConstIterator &QCborMap::ConstIterator::operator+=(qsizetype j)
+
+ Advances the iterator by \a j items. If \a j is negative, the iterator goes
+ backward. Returns a reference to this iterator.
+
+ \sa operator-=(), operator+()
+*/
+
+/*!
+ \fn QCborMap::ConstIterator &QCborMap::ConstIterator::operator-=(qsizetype j)
+
+ Makes the iterator go back by \a j items. If \a j is negative, the iterator
+ goes forward. Returns a reference to this iterator.
+
+ \sa operator+=(), operator-()
+*/
+
+#if !defined(QT_NO_DEBUG_STREAM)
+QDebug operator<<(QDebug dbg, const QCborMap &m)
+{
+ QDebugStateSaver saver(dbg);
+ dbg.nospace() << "QCborMap{";
+ const char *open = "{";
+ for (auto pair : m) {
+ dbg << open << pair.first << ", " << pair.second << '}';
+ open = ", {";
+ }
+ return dbg << '}';
+}
+#endif
+
+QT_END_NAMESPACE
diff --git a/src/corelib/serialization/qcbormap.h b/src/corelib/serialization/qcbormap.h
new file mode 100644
index 0000000000..02c2ec086d
--- /dev/null
+++ b/src/corelib/serialization/qcbormap.h
@@ -0,0 +1,346 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QCBORMAP_H
+#define QCBORMAP_H
+
+#include <QtCore/qcborvalue.h>
+#include <QtCore/qpair.h>
+
+#include <initializer_list>
+
+QT_BEGIN_NAMESPACE
+
+template <class Key, class T> class QMap;
+typedef QMap<QString, QVariant> QVariantMap;
+template <class Key, class T> class QHash;
+typedef QHash<QString, QVariant> QVariantHash;
+class QJsonObject;
+
+class QCborContainerPrivate;
+class Q_CORE_EXPORT QCborMap
+{
+public:
+ typedef QPair<QCborValue, QCborValue> value_type;
+ typedef QCborValue key_type;
+ typedef QCborValue mapped_type;
+ typedef qsizetype size_type;
+
+ class ConstIterator;
+ class Iterator {
+ mutable QCborValueRef item; // points to the value
+ friend class ConstIterator;
+ friend class QCborMap;
+ Iterator(QCborContainerPrivate *dd, qsizetype ii) : item(dd, ii) {}
+ public:
+ typedef std::random_access_iterator_tag iterator_category;
+ typedef qsizetype difference_type;
+ typedef QPair<const QCborValueRef, QCborValueRef> value_type;
+ typedef QPair<const QCborValueRef, QCborValueRef> reference;
+ typedef QPair<const QCborValueRef, QCborValueRef> pointer;
+
+ Q_DECL_CONSTEXPR Iterator() = default;
+ Q_DECL_CONSTEXPR Iterator(const Iterator &) = default;
+ Iterator &operator=(const Iterator &other)
+ {
+ // rebind the reference
+ item.d = other.item.d;
+ item.i = other.item.i;
+ return *this;
+ }
+
+ value_type operator*() const { return { {item.d, item.i - 1}, item }; }
+ QCborValueRef *operator->() const { return &item; }
+ QCborValue key() const { return QCborValueRef(item.d, item.i - 1); }
+ QCborValueRef value() const { return item; }
+
+ bool operator==(const Iterator &o) const { return item.d == o.item.d && item.i == o.item.i; }
+ bool operator!=(const Iterator &o) const { return !(*this == o); }
+ bool operator<(const Iterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i < other.item.i; }
+ bool operator<=(const Iterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i <= other.item.i; }
+ bool operator>(const Iterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i > other.item.i; }
+ bool operator>=(const Iterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i >= other.item.i; }
+ bool operator==(const ConstIterator &o) const { return item.d == o.item.d && item.i == o.item.i; }
+ bool operator!=(const ConstIterator &o) const { return !(*this == o); }
+ bool operator<(const ConstIterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i < other.item.i; }
+ bool operator<=(const ConstIterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i <= other.item.i; }
+ bool operator>(const ConstIterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i > other.item.i; }
+ bool operator>=(const ConstIterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i >= other.item.i; }
+ Iterator &operator++() { item.i += 2; return *this; }
+ Iterator operator++(int) { Iterator n = *this; item.i += 2; return n; }
+ Iterator &operator--() { item.i -= 2; return *this; }
+ Iterator operator--(int) { Iterator n = *this; item.i -= 2; return n; }
+ Iterator &operator+=(qsizetype j) { item.i += 2 * j; return *this; }
+ Iterator &operator-=(qsizetype j) { item.i -= 2 * j; return *this; }
+ Iterator operator+(qsizetype j) const { return Iterator({ item.d, item.i + 2 * j }); }
+ Iterator operator-(qsizetype j) const { return Iterator({ item.d, item.i - 2 * j }); }
+ qsizetype operator-(Iterator j) const { return (item.i - j.item.i) / 2; }
+ };
+
+ class ConstIterator {
+ QCborValueRef item; // points to the value
+ friend class Iterator;
+ friend class QCborMap;
+ ConstIterator(QCborContainerPrivate *dd, qsizetype ii) : item(dd, ii) {}
+ public:
+ typedef std::random_access_iterator_tag iterator_category;
+ typedef qsizetype difference_type;
+ typedef QPair<const QCborValueRef, const QCborValueRef> value_type;
+ typedef QPair<const QCborValueRef, const QCborValueRef> reference;
+ typedef QPair<const QCborValueRef, const QCborValueRef> pointer;
+
+ Q_DECL_CONSTEXPR ConstIterator() = default;
+ Q_DECL_CONSTEXPR ConstIterator(const ConstIterator &) = default;
+ ConstIterator &operator=(const ConstIterator &other)
+ {
+ // rebind the reference
+ item.d = other.item.d;
+ item.i = other.item.i;
+ return *this;
+ }
+
+ value_type operator*() const { return { {item.d, item.i - 1}, item }; }
+ const QCborValueRef *operator->() const { return &item; }
+ QCborValue key() const { return QCborValueRef(item.d, item.i - 1); }
+ QCborValueRef value() const { return item; }
+
+ bool operator==(const Iterator &o) const { return item.d == o.item.d && item.i == o.item.i; }
+ bool operator!=(const Iterator &o) const { return !(*this == o); }
+ bool operator<(const Iterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i < other.item.i; }
+ bool operator<=(const Iterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i <= other.item.i; }
+ bool operator>(const Iterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i > other.item.i; }
+ bool operator>=(const Iterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i >= other.item.i; }
+ bool operator==(const ConstIterator &o) const { return item.d == o.item.d && item.i == o.item.i; }
+ bool operator!=(const ConstIterator &o) const { return !(*this == o); }
+ bool operator<(const ConstIterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i < other.item.i; }
+ bool operator<=(const ConstIterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i <= other.item.i; }
+ bool operator>(const ConstIterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i > other.item.i; }
+ bool operator>=(const ConstIterator& other) const { Q_ASSERT(item.d == other.item.d); return item.i >= other.item.i; }
+ ConstIterator &operator++() { item.i += 2; return *this; }
+ ConstIterator operator++(int) { ConstIterator n = *this; item.i += 2; return n; }
+ ConstIterator &operator--() { item.i -= 2; return *this; }
+ ConstIterator operator--(int) { ConstIterator n = *this; item.i -= 2; return n; }
+ ConstIterator &operator+=(qsizetype j) { item.i += 2 * j; return *this; }
+ ConstIterator &operator-=(qsizetype j) { item.i -= 2 * j; return *this; }
+ ConstIterator operator+(qsizetype j) const { return ConstIterator({ item.d, item.i + 2 * j }); }
+ ConstIterator operator-(qsizetype j) const { return ConstIterator({ item.d, item.i - 2 * j }); }
+ qsizetype operator-(ConstIterator j) const { return (item.i - j.item.i) / 2; }
+ };
+
+ QCborMap() noexcept;
+ QCborMap(const QCborMap &other) noexcept;
+ QCborMap &operator=(const QCborMap &other) noexcept;
+ QCborMap(std::initializer_list<value_type> args)
+ : QCborMap()
+ {
+ detach(args.size());
+ for (auto pair : args)
+ insert(pair.first, pair.second);
+ }
+ ~QCborMap();
+
+ void swap(QCborMap &other) noexcept
+ {
+ qSwap(d, other.d);
+ }
+
+ QCborValue toCborValue() const { return *this; }
+
+ qsizetype size() const noexcept Q_DECL_PURE_FUNCTION;
+ bool isEmpty() const { return size() == 0; }
+ QVector<QCborValue> keys() const;
+
+ QCborValue value(qint64 key) const
+ { const_iterator it = find(key); return it == end() ? QCborValue() : it.value(); }
+ QCborValue value(QLatin1String key) const
+ { const_iterator it = find(key); return it == end() ? QCborValue() : it.value(); }
+ QCborValue value(const QString & key) const
+ { const_iterator it = find(key); return it == end() ? QCborValue() : it.value(); }
+ QCborValue value(const QCborValue &key) const
+ { const_iterator it = find(key); return it == end() ? QCborValue() : it.value(); }
+ QCborValue operator[](qint64 key) const
+ { const_iterator it = find(key); return it == end() ? QCborValue() : it.value(); }
+ QCborValue operator[](QLatin1String key) const
+ { const_iterator it = find(key); return it == end() ? QCborValue() : it.value(); }
+ QCborValue operator[](const QString & key) const
+ { const_iterator it = find(key); return it == end() ? QCborValue() : it.value(); }
+ QCborValue operator[](const QCborValue &key) const
+ { const_iterator it = find(key); return it == end() ? QCborValue() : it.value(); }
+ QCborValueRef operator[](qint64 key);
+ QCborValueRef operator[](QLatin1String key);
+ QCborValueRef operator[](const QString & key);
+ QCborValueRef operator[](const QCborValue &key);
+
+ QCborValue take(qint64 key)
+ { const_iterator it = constFind(key); if (it != constEnd()) return extract(it); return QCborValue(); }
+ QCborValue take(QLatin1String key)
+ { const_iterator it = constFind(key); if (it != constEnd()) return extract(it); return QCborValue(); }
+ QCborValue take(const QString &key)
+ { const_iterator it = constFind(key); if (it != constEnd()) return extract(it); return QCborValue(); }
+ QCborValue take(const QCborValue &key)
+ { const_iterator it = constFind(key); if (it != constEnd()) return extract(it); return QCborValue(); }
+ void remove(qint64 key)
+ { const_iterator it = constFind(key); if (it != constEnd()) erase(it); }
+ void remove(QLatin1String key)
+ { const_iterator it = constFind(key); if (it != constEnd()) erase(it); }
+ void remove(const QString & key)
+ { const_iterator it = constFind(key); if (it != constEnd()) erase(it); }
+ void remove(const QCborValue &key)
+ { const_iterator it = constFind(key); if (it != constEnd()) erase(it); }
+ bool contains(qint64 key) const
+ { const_iterator it = find(key); return it != end(); }
+ bool contains(QLatin1String key) const
+ { const_iterator it = find(key); return it != end(); }
+ bool contains(const QString & key) const
+ { const_iterator it = find(key); return it != end(); }
+ bool contains(const QCborValue &key) const
+ { const_iterator it = find(key); return it != end(); }
+
+ int compare(const QCborMap &other) const noexcept Q_DECL_PURE_FUNCTION;
+#if QT_HAS_INCLUDE(<compare>)
+ std::strong_ordering operator<=>(const QCborMap &other) const
+ {
+ int c = compare(other);
+ if (c > 0) return std::strong_ordering::greater;
+ if (c == 0) return std::strong_ordering::equivalent;
+ return std::strong_ordering::less;
+ }
+#else
+ bool operator==(const QCborMap &other) const noexcept
+ { return compare(other) == 0; }
+ bool operator!=(const QCborMap &other) const noexcept
+ { return !(*this == other); }
+ bool operator<(const QCborMap &other) const
+ { return compare(other) < 0; }
+#endif
+
+ typedef Iterator iterator;
+ typedef ConstIterator const_iterator;
+ iterator begin() { detach(); return iterator{d.data(), 1}; }
+ const_iterator constBegin() const { return const_iterator{d.data(), 1}; }
+ const_iterator begin() const { return constBegin(); }
+ const_iterator cbegin() const { return constBegin(); }
+ iterator end() { detach(); return iterator{d.data(), 2 * size() + 1}; }
+ const_iterator constEnd() const { return const_iterator{d.data(), 2 * size() + 1}; }
+ const_iterator end() const { return constEnd(); }
+ const_iterator cend() const { return constEnd(); }
+ iterator erase(iterator it);
+ iterator erase(const_iterator it) { return erase(iterator{ it.item.d, it.item.i }); }
+ QCborValue extract(iterator it);
+ QCborValue extract(const_iterator it) { return extract(iterator{ it.item.d, it.item.i }); }
+ bool empty() const { return isEmpty(); }
+
+ iterator find(qint64 key);
+ iterator find(QLatin1String key);
+ iterator find(const QString & key);
+ iterator find(const QCborValue &key);
+ const_iterator constFind(qint64 key) const;
+ const_iterator constFind(QLatin1String key) const;
+ const_iterator constFind(const QString & key) const;
+ const_iterator constFind(const QCborValue &key) const;
+ const_iterator find(qint64 key) const { return constFind(key); }
+ const_iterator find(QLatin1String key) const { return constFind(key); }
+ const_iterator find(const QString & key) const { return constFind(key); }
+ const_iterator find(const QCborValue &key) const { return constFind(key); }
+
+ iterator insert(qint64 key, const QCborValue &value_)
+ {
+ QCborValueRef v = operator[](key); // detaches
+ v = value_;
+ return { d.data(), v.i };
+ }
+ iterator insert(QLatin1String key, const QCborValue &value_)
+ {
+ QCborValueRef v = operator[](key); // detaches
+ v = value_;
+ return { d.data(), v.i };
+ }
+ iterator insert(const QString &key, const QCborValue &value_)
+ {
+ QCborValueRef v = operator[](key); // detaches
+ v = value_;
+ return { d.data(), v.i };
+ }
+ iterator insert(const QCborValue &key, const QCborValue &value_)
+ {
+ QCborValueRef v = operator[](key); // detaches
+ v = value_;
+ return { d.data(), v.i };
+ }
+ iterator insert(value_type v) { return insert(v.first, v.second); }
+
+ static QCborMap fromVariantMap(const QVariantMap &map);
+ static QCborMap fromVariantHash(const QVariantHash &hash);
+ static QCborMap fromJsonObject(const QJsonObject &o);
+ QVariantMap toVariantMap() const;
+ QVariantHash toVariantHash() const;
+ QJsonObject toJsonObject() const;
+
+private:
+ void detach(qsizetype reserve = 0);
+
+ friend QCborValue;
+ explicit QCborMap(QCborContainerPrivate &dd) noexcept;
+ QExplicitlySharedDataPointer<QCborContainerPrivate> d;
+};
+
+Q_DECLARE_SHARED(QCborMap)
+
+inline QCborValue::QCborValue(QCborMap &&m)
+ : n(-1), container(m.d.take()), t(Map)
+{
+}
+
+inline QCborMap QCborValueRef::toMap() const
+{
+ return concrete().toMap();
+}
+
+inline QCborMap QCborValueRef::toMap(const QCborMap &m) const
+{
+ return concrete().toMap(m);
+}
+
+#if !defined(QT_NO_DEBUG_STREAM)
+Q_CORE_EXPORT QDebug operator<<(QDebug, const QCborMap &m);
+#endif
+
+QT_END_NAMESPACE
+
+#endif // QCBORMAP_H
diff --git a/src/corelib/serialization/qcborstream.cpp b/src/corelib/serialization/qcborstream.cpp
new file mode 100644
index 0000000000..8b7a1ee0c3
--- /dev/null
+++ b/src/corelib/serialization/qcborstream.cpp
@@ -0,0 +1,2971 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qcborstream.h"
+
+#include <private/qnumeric_p.h>
+#include <private/qutfcodec_p.h>
+#include <qbuffer.h>
+#include <qdebug.h>
+#include <qstack.h>
+
+QT_BEGIN_NAMESPACE
+
+#ifdef QT_NO_DEBUG
+# define NDEBUG 1
+#endif
+#undef assert
+#define assert Q_ASSERT
+
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_GCC("-Wunused-function")
+QT_WARNING_DISABLE_CLANG("-Wunused-function")
+QT_WARNING_DISABLE_CLANG("-Wundefined-internal")
+QT_WARNING_DISABLE_MSVC(4334) // '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
+#define CBOR_API static inline
+#define CBOR_PRIVATE_API static inline
+#define CBOR_INLINE_API static inline
+
+#define CBOR_ENCODER_NO_CHECK_USER
+
+#include <cbor.h>
+
+static CborError qt_cbor_encoder_write_callback(void *token, const void *data, size_t len, CborEncoderAppendType);
+static bool qt_cbor_decoder_can_read(void *token, size_t len);
+static void qt_cbor_decoder_advance(void *token, size_t len);
+static void *qt_cbor_decoder_read(void *token, void *userptr, size_t offset, size_t len);
+static CborError qt_cbor_decoder_transfer_string(void *token, const void **userptr, size_t offset, size_t len);
+
+#define CBOR_ENCODER_WRITER_CONTROL 1
+#define CBOR_ENCODER_WRITE_FUNCTION qt_cbor_encoder_write_callback
+
+#define CBOR_PARSER_READER_CONTROL 1
+#define CBOR_PARSER_CAN_READ_BYTES_FUNCTION qt_cbor_decoder_can_read
+#define CBOR_PARSER_ADVANCE_BYTES_FUNCTION qt_cbor_decoder_advance
+#define CBOR_PARSER_TRANSFER_STRING_FUNCTION qt_cbor_decoder_transfer_string
+#define CBOR_PARSER_READ_BYTES_FUNCTION qt_cbor_decoder_read
+
+#include "../3rdparty/tinycbor/src/cborencoder.c"
+#include "../3rdparty/tinycbor/src/cborerrorstrings.c"
+#include "../3rdparty/tinycbor/src/cborparser.c"
+
+// silence compilers that complain about this being a static function declared
+// but never defined
+static CborError cbor_encoder_close_container_checked(CborEncoder*, const CborEncoder*)
+{
+ Q_UNREACHABLE();
+ return CborErrorInternalError;
+}
+static CborError _cbor_value_dup_string(const CborValue *, void **, size_t *, CborValue *)
+{
+ Q_UNREACHABLE();
+ return CborErrorInternalError;
+}
+static CborError cbor_value_to_pretty_stream(CborStreamFunction, void*, CborValue*, int)
+{
+ Q_UNREACHABLE();
+ return CborErrorInternalError;
+}
+static CborError cbor_value_to_pretty_advance(FILE*, CborValue*)
+{
+ Q_UNREACHABLE();
+ return CborErrorInternalError;
+}
+static CborError cbor_value_to_pretty_advance_flags(FILE *, CborValue *, int)
+{
+ Q_UNREACHABLE();
+ return CborErrorInternalError;
+}
+static CborError cbor_value_validate(const CborValue *, int)
+{
+ Q_UNREACHABLE();
+ return CborErrorInternalError;
+}
+QT_WARNING_POP
+
+Q_DECLARE_TYPEINFO(CborEncoder, Q_PRIMITIVE_TYPE);
+Q_DECLARE_TYPEINFO(CborValue, Q_PRIMITIVE_TYPE);
+
+// confirm our constants match TinyCBOR's
+Q_STATIC_ASSERT(int(QCborStreamReader::UnsignedInteger) == CborIntegerType);
+Q_STATIC_ASSERT(int(QCborStreamReader::ByteString) == CborByteStringType);
+Q_STATIC_ASSERT(int(QCborStreamReader::TextString) == CborTextStringType);
+Q_STATIC_ASSERT(int(QCborStreamReader::Array) == CborArrayType);
+Q_STATIC_ASSERT(int(QCborStreamReader::Map) == CborMapType);
+Q_STATIC_ASSERT(int(QCborStreamReader::Tag) == CborTagType);
+Q_STATIC_ASSERT(int(QCborStreamReader::SimpleType) == CborSimpleType);
+Q_STATIC_ASSERT(int(QCborStreamReader::HalfFloat) == CborHalfFloatType);
+Q_STATIC_ASSERT(int(QCborStreamReader::Float) == CborFloatType);
+Q_STATIC_ASSERT(int(QCborStreamReader::Double) == CborDoubleType);
+Q_STATIC_ASSERT(int(QCborStreamReader::Invalid) == CborInvalidType);
+
+/*!
+ \headerfile <QtCborCommon>
+
+ \brief The <QtCborCommon> header contains definitions common to both the
+ streaming classes (QCborStreamReader and QCborStreamWriter) and to
+ QCborValue.
+ */
+
+/*!
+ \enum QCborSimpleType
+ \relates <QtCborCommon>
+
+ This enum contains the possible "Simple Types" for CBOR. Simple Types range
+ from 0 to 255 and are types that carry no further value.
+
+ The following values are currently known:
+
+ \value False A "false" boolean.
+ \value True A "true" boolean.
+ \value Null Absence of value (null).
+ \value Undefined Missing or deleted value, usually an error.
+
+ Qt CBOR API supports encoding and decoding any Simple Type, whether one of
+ those above or any other value.
+
+ Applications should only use further values if a corresponding specification
+ has been published, otherwise interpretation and validation by the remote
+ may fail. Values 24 to 31 are reserved and must not be used.
+
+ The current authoritative list is maintained by IANA in the
+ \l{https://www.iana.org/assignments/cbor-simple-values/cbor-simple-values.xml}{Simple
+ Values registry}.
+
+ \sa QCborStreamWriter::append(QCborSimpleType), QCborStreamReader::isSimpleType(),
+ QCborStreamReader::toSimpleType(), QCborValue::isSimpleType(), QCborValue::toSimpleType()
+ */
+
+Q_CORE_EXPORT const char *qt_cbor_simpletype_id(QCborSimpleType st)
+{
+ switch (st) {
+ case QCborSimpleType::False:
+ return "False";
+ case QCborSimpleType::True:
+ return "True";
+ case QCborSimpleType::Null:
+ return "Null";
+ case QCborSimpleType::Undefined:
+ return "Undefined";
+ }
+ return nullptr;
+}
+
+#if !defined(QT_NO_DEBUG_STREAM)
+QDebug operator<<(QDebug dbg, QCborSimpleType st)
+{
+ QDebugStateSaver saver(dbg);
+ const char *id = qt_cbor_simpletype_id(st);
+ if (id)
+ return dbg.nospace() << "QCborSimpleType::" << id;
+
+ return dbg.nospace() << "QCborSimpleType(" << uint(st) << ')';
+}
+#endif
+
+/*!
+ \enum QCborTag
+ \relates <QtCborCommon>
+
+ This enum contains no enumeration and is used only to provide type-safe
+ access to a CBOR tag.
+
+ CBOR tags are 64-bit numbers that are attached to generic CBOR types to
+ provide further semantic meaning. QCborTag may be constructed from an
+ enumeration found in QCborKnownTags or directly by providing the numeric
+ representation.
+
+ For example, the following creates a QCborValue containing a byte array
+ tagged with a tag 2.
+
+ \code
+ QCborValue(QCborTag(2), QByteArray("\x01\0\0\0\0\0\0\0\0", 9));
+ \endcode
+
+ \sa QCborKnownTags, QCborStreamWriter::append(QCborTag),
+ QCborStreamReader::isTag(), QCborStreamReader::toTag(),
+ QCborValue::isTag(), QCborValue::tag()
+ */
+
+Q_CORE_EXPORT const char *qt_cbor_tag_id(QCborTag tag)
+{
+ // Casting to QCborKnownTags's underlying type will make the comparison
+ // below fail if the tag value is out of range.
+ auto n = std::underlying_type<QCborKnownTags>::type(tag);
+ if (QCborTag(n) == tag) {
+ switch (QCborKnownTags(n)) {
+ case QCborKnownTags::DateTimeString:
+ return "DateTimeString";
+ case QCborKnownTags::UnixTime_t:
+ return "UnixTime_t";
+ case QCborKnownTags::PositiveBignum:
+ return "PositiveBignum";
+ case QCborKnownTags::NegativeBignum:
+ return "NegativeBignum";
+ case QCborKnownTags::Decimal:
+ return "Decimal";
+ case QCborKnownTags::Bigfloat:
+ return "Bigfloat";
+ case QCborKnownTags::COSE_Encrypt0:
+ return "COSE_Encrypt0";
+ case QCborKnownTags::COSE_Mac0:
+ return "COSE_Mac0";
+ case QCborKnownTags::COSE_Sign1:
+ return "COSE_Sign1";
+ case QCborKnownTags::ExpectedBase64url:
+ return "ExpectedBase64url";
+ case QCborKnownTags::ExpectedBase64:
+ return "ExpectedBase64";
+ case QCborKnownTags::ExpectedBase16:
+ return "ExpectedBase16";
+ case QCborKnownTags::EncodedCbor:
+ return "EncodedCbor";
+ case QCborKnownTags::Url:
+ return "Url";
+ case QCborKnownTags::Base64url:
+ return "Base64url";
+ case QCborKnownTags::Base64:
+ return "Base64";
+ case QCborKnownTags::RegularExpression:
+ return "RegularExpression";
+ case QCborKnownTags::MimeMessage:
+ return "MimeMessage";
+ case QCborKnownTags::Uuid:
+ return "Uuid";
+ case QCborKnownTags::COSE_Encrypt:
+ return "COSE_Encrypt";
+ case QCborKnownTags::COSE_Mac:
+ return "COSE_Mac";
+ case QCborKnownTags::COSE_Sign:
+ return "COSE_Sign";
+ case QCborKnownTags::Signature:
+ return "Signature";
+ }
+ }
+ return nullptr;
+}
+
+#if !defined(QT_NO_DEBUG_STREAM)
+QDebug operator<<(QDebug dbg, QCborTag tag)
+{
+ QDebugStateSaver saver(dbg);
+ const char *id = qt_cbor_tag_id(tag);
+ dbg.nospace() << "QCborTag(";
+ if (id)
+ dbg.nospace() << "QCborKnownTags::" << id;
+ else
+ dbg.nospace() << quint64(tag);
+
+ return dbg << ')';
+}
+#endif
+
+/*!
+ \enum QCborKnownTags
+ \relates <QtCborCommon>
+
+ This enum contains a list of CBOR tags, known at the time of the Qt
+ implementation. This list is not meant to be complete and contains only
+ tags that are either backed by an RFC or specifically used by the Qt
+ implementation.
+
+ The authoritative list is maintained by IANA in the
+ \l{https://www.iana.org/assignments/cbor-tags/cbor-tags.xhtml}{CBOR tag
+ registry}.
+
+ \value DateTimeString A date and time string, formatted according to RFC 3339, as refined
+ by RFC 4287. It is the same format as Qt::ISODate and
+ Qt::ISODateWithMs.
+ \value UnixTime_t A numerical representation of seconds elapsed since
+ 1970-01-01T00:00Z.
+ \value PositiveBignum A positive number of arbitrary length, encoded as a byte array in
+ network byte order. For example, the number 2\sup{64} is represented by
+ a byte array containing the byte value 0x01 followed by 8 zero bytes.
+ \value NegativeBignum A negative number of arbirary length, encoded as the absolute value
+ of that number, minus one. For example, a byte array containing
+ byte value 0x02 followed by 8 zero bytes represents the number
+ -2\sup{65} - 1.
+ \value Decimal A decimal fraction, encoded as an array of two integers: the first
+ is the exponent of the power of 10, the second the integral
+ mantissa. The value 273.15 would be encoded as array \c{[-2, 27315]}.
+ \value Bigfloat Similar to Decimal, but the exponent is a power of 2 instead.
+ \value COSE_Encrypt0 An \c Encrypt0 map as specified by \l{https://tools.ietf.org/html/rfc8152}{RFC 8152}
+ (CBOR Object Signing and Encryption).
+ \value COSE_Mac0 A \c Mac0 map as specified by \l{https://tools.ietf.org/html/rfc8152}{RFC 8152}
+ (CBOR Object Signing and Encryption).
+ \value COSE_Sign1 A \c Sign1 map as specified by \l{https://tools.ietf.org/html/rfc8152}{RFC 8152}
+ (CBOR Object Signing and Encryption).
+ \value ExpectedBase64url Indicates that the byte array should be encoded using Base64url
+ if the stream is converted to JSON.
+ \value ExpectedBase64 Indicates that the byte array should be encoded using Base64
+ if the stream is converted to JSON.
+ \value ExpectedBase16 Indicates that the byte array should be encoded using Base16 (hex)
+ if the stream is converted to JSON.
+ \value EncodedCbor Indicates that the byte array contains a CBOR stream.
+ \value Url Indicates that the string contains a URL.
+ \value Base64url Indicates that the string contains data encoded using Base64url.
+ \value Base64 Indicates that the string contains data encoded using Base64.
+ \value RegularExpression Indicates that the string contains a Perl-Compatible Regular
+ Expression pattern.
+ \value MimeMessage Indicates that the string contains a MIME message (according to
+ \l{https://tools.ietf.org/html/rfc2045}){RFC 2045}.
+ \value Uuid Indicates that the byte array contains a UUID.
+ \value COSE_Encrypt An \c Encrypt map as specified by \l{https://tools.ietf.org/html/rfc8152}{RFC 8152}
+ (CBOR Object Signing and Encryption).
+ \value COSE_Mac A \c Mac map as specified by \l{https://tools.ietf.org/html/rfc8152}{RFC 8152}
+ (CBOR Object Signing and Encryption).
+ \value COSE_Sign A \c Sign map as specified by \l{https://tools.ietf.org/html/rfc8152}{RFC 8152}
+ (CBOR Object Signing and Encryption).
+ \value Signature No change in interpretation; this tag can be used as the outermost
+ tag in a CBOR stream as the file header.
+
+ The following tags are interpreted by QCborValue during decoding and will
+ produce objects with extended Qt types, and it will use those tags when
+ encoding the same extended types.
+
+ \value DateTimeString \l QDateTime
+ \value UnixTime_t \l QDateTime (only in decoding)
+ \value Url \l QUrl
+ \value Uuid \l QUuid
+
+ Additionally, if a QCborValue containing a QByteArray is tagged using one of
+ \c ExpectedBase64url, \c ExpectedBase64 or \c ExpectedBase16, QCborValue
+ will use the expected encoding when converting to JSON (see
+ QCborValue::toJsonValue).
+
+ \sa QCborTag, QCborStreamWriter::append(QCborTag),
+ QCborStreamReader::isTag(), QCborStreamReader::toTag(),
+ QCborValue::isTag(), QCborValue::tag()
+ */
+
+#if !defined(QT_NO_DEBUG_STREAM)
+QDebug operator<<(QDebug dbg, QCborKnownTags tag)
+{
+ QDebugStateSaver saver(dbg);
+ const char *id = qt_cbor_tag_id(QCborTag(int(tag)));
+ if (id)
+ return dbg.nospace() << "QCborKnownTags::" << id;
+
+ return dbg.nospace() << "QCborKnownTags(" << int(tag) << ')';
+}
+#endif
+
+/*!
+ \class QCborError
+ \inmodule QtCore
+ \relates <QtCborCommon>
+ \reentrant
+ \since 5.12
+
+ \brief The QCborError class holds the error condition found while parsing or
+ validating a CBOR stream.
+
+ \sa QCborStreamReader, QCborValue, QCborParserError
+ */
+
+/*!
+ \enum QCborError::Code
+
+ This enum contains the possible error condition codes.
+
+ \value NoError No error was detected.
+ \value UnknownError An unknown error occurred and no further details are available.
+ \value AdvancePastEnd QCborStreamReader::next() was called but there are no more elements in
+ the current context.
+ \value InputOutputError An I/O error with the QIODevice occurred.
+ \value GarbageAtEnd Data was found in the input stream after the last element.
+ \value EndOfFile The end of the input stream was unexpectedly reached while processing an
+ element.
+ \value UnexpectedBreak The CBOR stream contains a Break where it is not allowed (data is
+ corrupt and the error is not recoverable).
+ \value UnknownType The CBOR stream contains an unknown/unparseable Type (data is corrupt
+ and the and the error is not recoverable).
+ \value IllegalType The CBOR stream contains a known type in a position it is not allowed
+ to exist (data is corrupt and the error is not recoverable).
+ \value IllegalNumber The CBOR stream appears to be encoding a number larger than 64-bit
+ (data is corrupt and the error is not recoverable).
+ \value IllegalSimpleType The CBOR stream contains a Simple Type encoded incorrectly (data is
+ corrupt and the error is not recoverable).
+ \value InvalidUtf8String The CBOR stream contains a text string that does not decode properly
+ as UTF (data is corrupt and the error is not recoverable).
+ \value DataTooLarge CBOR string, map or array is too big and cannot be parsed by Qt
+ (internal limitation, but the error is not recoverable).
+ \value NestingTooDeep Too many levels of arrays or maps encountered while processing the
+ input (internal limitation, but the error is not recoverable).
+ \value UnsupportedType The CBOR stream contains a known type that the implementation does not
+ support (internal limitation, but the error is not recoverable).
+ */
+
+/*!
+ \variable QCborError::c
+ \internal
+ */
+
+/*!
+ \fn QCborError::operator Code() const
+
+ Returns the error code that this QCborError object stores.
+ */
+
+/*!
+ Returns a text string that matches the error code in this QCborError object.
+
+ Note: the string is not translated. Applications whose interface allow users
+ to parse CBOR streams need to provide their own, translated strings.
+
+ \sa QCborError::Code
+ */
+QString QCborError::toString() const
+{
+ switch (c) {
+ case NoError:
+ Q_STATIC_ASSERT(int(NoError) == int(CborNoError));
+ return QString();
+
+ case UnknownError:
+ Q_STATIC_ASSERT(int(UnknownError) == int(CborUnknownError));
+ return QStringLiteral("Unknown error");
+ case AdvancePastEnd:
+ Q_STATIC_ASSERT(int(AdvancePastEnd) == int(CborErrorAdvancePastEOF));
+ return QStringLiteral("Read past end of buffer (more bytes needed)");
+ case InputOutputError:
+ Q_STATIC_ASSERT(int(InputOutputError) == int(CborErrorIO));
+ return QStringLiteral("Input/Output error");
+ case GarbageAtEnd:
+ Q_STATIC_ASSERT(int(GarbageAtEnd) == int(CborErrorGarbageAtEnd));
+ return QStringLiteral("Data found after the end of the stream");
+ case EndOfFile:
+ Q_STATIC_ASSERT(int(EndOfFile) == int(CborErrorUnexpectedEOF));
+ return QStringLiteral("Unexpected end of input data (more bytes needed)");
+ case UnexpectedBreak:
+ Q_STATIC_ASSERT(int(UnexpectedBreak) == int(CborErrorUnexpectedBreak));
+ return QStringLiteral("Invalid CBOR stream: unexpected 'break' byte");
+ case UnknownType:
+ Q_STATIC_ASSERT(int(UnknownType) == int(CborErrorUnknownType));
+ return QStringLiteral("Invalid CBOR stream: unknown type");
+ case IllegalType:
+ Q_STATIC_ASSERT(int(IllegalType) == int(CborErrorIllegalType));
+ return QStringLiteral("Invalid CBOR stream: illegal type found");
+ case IllegalNumber:
+ Q_STATIC_ASSERT(int(IllegalNumber) == int(CborErrorIllegalNumber));
+ return QStringLiteral("Invalid CBOR stream: illegal number encoding (future extension)");
+ case IllegalSimpleType:
+ Q_STATIC_ASSERT(int(IllegalSimpleType) == int(CborErrorIllegalSimpleType));
+ return QStringLiteral("Invalid CBOR stream: illegal simple type");
+ case InvalidUtf8String:
+ Q_STATIC_ASSERT(int(InvalidUtf8String) == int(CborErrorInvalidUtf8TextString));
+ return QStringLiteral("Invalid CBOR stream: invalid UTF-8 text string");
+ case DataTooLarge:
+ Q_STATIC_ASSERT(int(DataTooLarge) == int(CborErrorDataTooLarge));
+ return QStringLiteral("Internal limitation: data set too large");
+ case NestingTooDeep:
+ Q_STATIC_ASSERT(int(NestingTooDeep) == int(CborErrorNestingTooDeep));
+ return QStringLiteral("Internal limitation: data nesting too deep");
+ case UnsupportedType:
+ Q_STATIC_ASSERT(int(UnsupportedType) == int(CborErrorUnsupportedType));
+ return QStringLiteral("Internal limitation: unsupported type");
+ }
+
+ // get the error from TinyCBOR
+ CborError err = CborError(int(c));
+ return QString::fromLatin1(cbor_error_string(err));
+}
+
+/*!
+ \class QCborStreamWriter
+ \inmodule QtCore
+ \ingroup cbor
+ \reentrant
+ \since 5.12
+
+ \brief The QCborStreamWriter class is a simple CBOR encoder operating on a
+ one-way stream.
+
+ This class can be used to quickly encode a stream of CBOR content directly
+ to either a QByteArray or QIODevice. CBOR is the Concise Binary Object
+ Representation, a very compact form of binary data encoding that is
+ compatible with JSON. It was created by the IETF Constrained RESTful
+ Environments (CoRE) WG, which has used it in many new RFCs. It is meant to
+ be used alongside the \l{https://tools.ietf.org/html/rfc7252}{CoAP
+ protocol}.
+
+ QCborStreamWriter provides a StAX-like API, similar to that of
+ \l{QXmlStreamWriter}. It is rather low-level and requires a bit of knowledge
+ of CBOR encoding. For a simpler API, see \l{QCborValue} and especially the
+ encoding function QCborValue::toCbor().
+
+ The typical use of QCborStreamWriter is to create the object on the target
+ QByteArray or QIODevice, then call one of the append() overloads with the
+ desired type to be encoded. To create arrays and maps, QCborStreamWriter
+ provides startArray() and startMap() overloads, which must be terminated by
+ the corresponding endArray() and endMap() functions.
+
+ The following example encodes the equivalent of this JSON content:
+
+ \div{class="pre"}
+ {
+ "label": "journald",
+ "autoDetect": false,
+ "condition": "libs.journald",
+ "output": [ "privateFeature" ]
+ }
+ \enddiv
+
+ \code
+ writer.startMap(4); // 4 elements in the map
+
+ writer.append(QLatin1String("label"));
+ writer.append(QLatin1String("journald"));
+
+ writer.append(QLatin1String("autoDetect"));
+ writer.append(false);
+
+ writer.append(QLatin1String("condition"));
+ writer.append(QLatin1String("libs.journald"));
+
+ writer.append(QLatin1String("output"));
+ writer.startArray(1);
+ writer.append(QLatin1String("privateFeature"));
+ writer.endArray();
+
+ writer.endMap();
+ \endcode
+
+ \section1 CBOR support
+
+ QCborStreamWriter supports all CBOR features required to create canonical
+ and strict streams. It implements almost all of the features specified in
+ \l {https://tools.ietf.org/html/rfc7049}{RFC 7049}.
+
+ The following table lists the CBOR features that QCborStreamWriter supports.
+
+ \table
+ \header \li Feature \li Support
+ \row \li Unsigned numbers \li Yes (full range)
+ \row \li Negative numbers \li Yes (full range)
+ \row \li Byte strings \li Yes
+ \row \li Text strings \li Yes
+ \row \li Chunked strings \li No
+ \row \li Tags \li Yes (arbitrary)
+ \row \li Booleans \li Yes
+ \row \li Null \li Yes
+ \row \li Undefined \li Yes
+ \row \li Arbitrary simple values \li Yes
+ \row \li Half-precision float (16-bit) \li Yes
+ \row \li Single-precision float (32-bit) \li Yes
+ \row \li Double-precision float (64-bit) \li Yes
+ \row \li Infinities and NaN floating point \li Yes
+ \row \li Determinate-length arrays and maps \li Yes
+ \row \li Indeterminate-length arrays and maps \li Yes
+ \row \li Map key types other than strings and integers \li Yes (arbitrary)
+ \endtable
+
+ \section2 Canonical CBOR encoding
+
+ Canonical CBOR encoding is defined by
+ \l{https://tools.ietf.org/html/rfc7049#section-3.9}{Section 3.9 of RFC
+ 7049}. Canonical encoding is not a requirement for Qt's CBOR decoding
+ functionality, but it may be required for some protocols. In particular,
+ protocols that require the ability to reproduce the same stream identically
+ may require this.
+
+ In order to be considered "canonical", a CBOR stream must meet the
+ following requirements:
+
+ \list
+ \li Integers must be as small as possible. QCborStreamWriter always
+ does this (no user action is required and it is not possible
+ to write overlong integers).
+ \li Array, map and string lengths must be as short as possible. As
+ above, QCborStreamWriter automatically does this.
+ \li Arrays, maps and strings must use explicit length. QCborStreamWriter
+ always does this for strings; for arrays and maps, be sure to call
+ startArray() and startMap() overloads with explicit length.
+ \li Keys in every map must be sorted in ascending order. QCborStreamWriter
+ offers no help in this item: the developer must ensure that before
+ calling append() for the map pairs.
+ \li Floating point values should be as small as possible. QCborStreamWriter
+ will not convert floating point values; it is up to the developer
+ to perform this check prior to calling append() (see those functions'
+ examples).
+ \endlist
+
+ \section2 Strict CBOR mode
+
+ Strict mode is defined by
+ \l{https://tools.ietf.org/html/rfc7049#section-3.10}{Section 3.10 of RFC
+ 7049}. As for Canonical encoding above, QCborStreamWriter makes it possible
+ to create strict CBOR streams, but does not require them or validate that
+ the output is so.
+
+ \list
+ \li Keys in a map must be unique. QCborStreamWriter performs no validation
+ of map keys.
+ \li Tags may be required to be paired only with the correct types,
+ according to their specification. QCborStreamWriter performs no
+ validation of tag usage.
+ \li Text Strings must be properly-encoded UTF-8. QCborStreamWriter always
+ writes proper UTF-8 for strings added with append(), but performs no
+ validation for strings added with appendTextString().
+ \endlist
+
+ \section2 Invalid CBOR stream
+
+ It is also possible to misuse QCborStreamWriter and produce invalid CBOR
+ streams that will fail to be decoded by a receiver. The following actions
+ will produce invalid streams:
+
+ \list
+ \li Append a tag and not append the corresponding tagged value
+ (QCborStreamWriter produces no diagnostic).
+ \li Append too many or too few items to an array or map with explicit
+ length (endMap() and endArray() will return false and
+ QCborStreamWriter will log with qWarning()).
+ \endlist
+
+ \sa QCborStreamReader, QCborValue, QXmlStreamWriter
+ */
+
+class QCborStreamWriterPrivate
+{
+public:
+ static Q_CONSTEXPR quint64 IndefiniteLength = (std::numeric_limits<quint64>::max)();
+
+ QIODevice *device;
+ CborEncoder encoder;
+ QStack<CborEncoder> containerStack;
+ bool deleteDevice = false;
+
+ QCborStreamWriterPrivate(QIODevice *device)
+ : device(device)
+ {
+ cbor_encoder_init_writer(&encoder, qt_cbor_encoder_write_callback, this);
+ }
+
+ ~QCborStreamWriterPrivate()
+ {
+ if (deleteDevice)
+ delete device;
+ }
+
+ template <typename... Args> void executeAppend(CborError (*f)(CborEncoder *, Args...), Args... args)
+ {
+ f(&encoder, std::forward<Args>(args)...);
+ }
+
+ void createContainer(CborError (*f)(CborEncoder *, CborEncoder *, size_t), quint64 len = IndefiniteLength)
+ {
+ Q_STATIC_ASSERT(size_t(IndefiniteLength) == CborIndefiniteLength);
+ if (sizeof(len) != sizeof(size_t) && len != IndefiniteLength) {
+ if (Q_UNLIKELY(len >= CborIndefiniteLength)) {
+ // TinyCBOR can't do this in 32-bit mode
+ qWarning("QCborStreamWriter: container of size %llu is too big for a 32-bit build; "
+ "will use indeterminate length instead", len);
+ len = CborIndefiniteLength;
+ }
+ }
+
+ containerStack.push(encoder);
+ f(&containerStack.top(), &encoder, len);
+ }
+
+ bool closeContainer()
+ {
+ if (containerStack.isEmpty()) {
+ qWarning("QCborStreamWriter: closing map or array that wasn't open");
+ return false;
+ }
+
+ CborEncoder container = containerStack.pop();
+ CborError err = cbor_encoder_close_container(&container, &encoder);
+ encoder = container;
+
+ if (Q_UNLIKELY(err)) {
+ if (err == CborErrorTooFewItems)
+ qWarning("QCborStreamWriter: not enough items added to array or map");
+ else if (err == CborErrorTooManyItems)
+ qWarning("QCborStreamWriter: too many items added to array or map");
+ return false;
+ }
+
+ return true;
+ }
+};
+
+static CborError qt_cbor_encoder_write_callback(void *self, const void *data, size_t len, CborEncoderAppendType)
+{
+ auto that = static_cast<QCborStreamWriterPrivate *>(self);
+ if (!that->device)
+ return CborNoError;
+ qint64 written = that->device->write(static_cast<const char *>(data), len);
+ return (written == qsizetype(len) ? CborNoError : CborErrorIO);
+}
+
+/*!
+ Creates a QCborStreamWriter object that will write the stream to \a device.
+ The device must be opened before the first append() call is made. This
+ constructor can be used with any class that derives from QIODevice, such as
+ QFile, QProcess or QTcpSocket.
+
+ QCborStreamWriter has no buffering, so every append() call will result in
+ one or more calls to the device's \l {QIODevice::}{write()} method.
+
+ The following example writes an empty map to a file:
+
+ \code
+ QFile f("output", QIODevice::WriteOnly);
+ QCborStreamWriter writer(&f);
+ writer.startMap(0);
+ writer.endMap();
+ \endcode
+
+ QCborStreamWriter does not take ownership of \a device.
+
+ \sa device(), setDevice()
+ */
+QCborStreamWriter::QCborStreamWriter(QIODevice *device)
+ : d(new QCborStreamWriterPrivate(device))
+{
+}
+
+/*!
+ Creates a QCborStreamWriter object that will append the stream to \a data.
+ All streaming is done immediately to the byte array, without the need for
+ flushing any buffers.
+
+ The following example writes a number to a byte array then returns
+ it.
+
+ \code
+ QByteArray encodedNumber(qint64 value)
+ {
+ QByteArray ba;
+ QCborStreamWriter writer(&ba);
+ writer.append(value);
+ return ba;
+ }
+ \endcode
+
+ QCborStreamWriter does not take ownership of \a data.
+ */
+QCborStreamWriter::QCborStreamWriter(QByteArray *data)
+ : d(new QCborStreamWriterPrivate(new QBuffer(data)))
+{
+ d->deleteDevice = true;
+ d->device->open(QIODevice::WriteOnly | QIODevice::Unbuffered);
+}
+
+/*!
+ Destroys this QCborStreamWriter object and frees any resources associated.
+
+ QCborStreamWriter does not perform error checking to see if all required
+ items were written to the stream prior to the object being destroyed. It is
+ the programmer's responsibility to ensure that it was done.
+ */
+QCborStreamWriter::~QCborStreamWriter()
+{
+}
+
+/*!
+ Replaces the device or byte array that this QCborStreamWriter object is
+ writing to with \a device.
+
+ \sa device()
+ */
+void QCborStreamWriter::setDevice(QIODevice *device)
+{
+ if (d->deleteDevice)
+ delete d->device;
+ d->device = device;
+ d->deleteDevice = false;
+}
+
+/*!
+ Returns the QIODevice that this QCborStreamWriter object is writing to. The
+ device must have previously been set with either the constructor or with
+ setDevice().
+
+ If this object was created by writing to a QByteArray, this function will
+ return an internal instance of QBuffer, which is owned by QCborStreamWriter.
+
+ \sa setDevice()
+ */
+QIODevice *QCborStreamWriter::device() const
+{
+ return d->device;
+}
+
+/*!
+ \overload
+
+ Appends the 64-bit unsigned value \a u to the CBOR stream, creating a CBOR
+ Unsigned Integer value. In the following example, we write the values 0,
+ 2\sup{32} and \c UINT64_MAX:
+
+ \code
+ writer.append(0U);
+ writer.append(Q_UINT64_C(4294967296));
+ writer.append(std::numeric_limits<quint64>::max());
+ \endcode
+
+ \sa QCborStreamReader::isUnsignedInteger(), QCborStreamReader::toUnsignedInteger()
+ */
+void QCborStreamWriter::append(quint64 u)
+{
+ d->executeAppend(cbor_encode_uint, uint64_t(u));
+}
+
+/*!
+ \overload
+
+ Appends the 64-bit signed value \a i to the CBOR stream. This will create
+ either a CBOR Unsigned Integer or CBOR NegativeInteger value based on the
+ sign of the parameter. In the following example, we write the values 0, -1,
+ 2\sup{32} and \c INT64_MAX:
+
+ \code
+ writer.append(0);
+ writer.append(-1);
+ writer.append(Q_INT64_C(4294967296));
+ writer.append(std::numeric_limits<qint64>::max());
+ \endcode
+
+ \sa QCborStreamReader::isInteger(), QCborStreamReader::toInteger()
+ */
+void QCborStreamWriter::append(qint64 i)
+{
+ d->executeAppend(cbor_encode_int, int64_t(i));
+}
+
+/*!
+ \overload
+
+ Appends the 64-bit negative value \a n to the CBOR stream.
+ QCborNegativeInteger is a 64-bit enum that holds the absolute value of the
+ negative number we want to write. If n is zero, the value written will be
+ equivalent to 2\sup{64} (that is, -18,446,744,073,709,551,616).
+
+ In the following example, we write the values -1, -2\sup{32} and INT64_MIN:
+ \code
+ writer.append(QCborNegativeInteger(1));
+ writer.append(QCborNegativeInteger(Q_INT64_C(4294967296)));
+ writer.append(QCborNegativeInteger(-quint64(std::numeric_limits<qint64>::min())));
+ \endcode
+
+ Note how this function can be used to encode numbers that cannot fit a
+ standard computer's 64-bit signed integer like \l qint64. That is, if \a n
+ is larger than \c{std::numeric_limits<qint64>::max()} or is 0, this will
+ represent a negative number smaller than
+ \c{std::numeric_limits<qint64>::min()}.
+
+ \sa QCborStreamReader::isNegativeInteger(), QCborStreamReader::toNegativeInteger()
+ */
+void QCborStreamWriter::append(QCborNegativeInteger n)
+{
+ d->executeAppend(cbor_encode_negative_int, uint64_t(n));
+}
+
+/*!
+ \fn void QCborStreamWriter::append(const QByteArray &ba)
+ \overload
+
+ Appends the byte array \a ba to the stream, creating a CBOR Byte String
+ value. QCborStreamWriter will attempt to write the entire string in one
+ chunk.
+
+ The following example will load and append the contents of a file to the
+ stream:
+
+ \code
+ void writeFile(QCborStreamWriter &writer, const QString &fileName)
+ {
+ QFile f(fileName);
+ if (f.open(QIODevice::ReadOnly))
+ writer.append(f.readAll());
+ }
+ \endcode
+
+ As the example shows, unlike JSON, CBOR requires no escaping for binary
+ content.
+
+ \sa appendByteString(), QCborStreamReader::isByteArray(),
+ QCborStreamReader::readByteArray()
+ */
+
+/*!
+ \overload
+
+ Appends the text string \a str to the stream, creating a CBOR Text String
+ value. QCborStreamWriter will attempt to write the entire string in one
+ chunk.
+
+ The following example appends a simple string to the stream:
+
+ \code
+ writer.append(QLatin1String("Hello, World"));
+ \endcode
+
+ \b{Performance note}: CBOR requires that all Text Strings be encoded in
+ UTF-8, so this function will iterate over the characters in the string to
+ determine whether the contents are US-ASCII or not. If the string is found
+ to contain characters outside of US-ASCII, it will allocate memory and
+ convert to UTF-8. If this check is unnecessary, use appendTextString()
+ instead.
+
+ \sa QCborStreamReader::isString(), QCborStreamReader::readString()
+ */
+void QCborStreamWriter::append(QLatin1String str)
+{
+ // We've got Latin-1 but CBOR wants UTF-8, so check if the string is the
+ // common subset (US-ASCII).
+ if (QtPrivate::isAscii(str)) {
+ // it is plain US-ASCII
+ appendTextString(str.latin1(), str.size());
+ } else {
+ // non-ASCII, so we need a pass-through UTF-16
+ append(QString(str));
+ }
+}
+
+/*!
+ \overload
+
+ Appends the text string \a str to the stream, creating a CBOR Text String
+ value. QCborStreamWriter will attempt to write the entire string in one
+ chunk.
+
+ The following example writes an arbitrary QString to the stream:
+
+ \code
+ void writeString(QCborStreamWriter &writer, const QString &str)
+ {
+ writer.append(str);
+ }
+ \endcode
+
+ \sa QCborStreamReader::isString(), QCborStreamReader::readString()
+ */
+void QCborStreamWriter::append(QStringView str)
+{
+ QByteArray utf8 = str.toUtf8();
+ appendTextString(utf8.constData(), utf8.size());
+}
+
+/*!
+ \overload
+
+ Appends the CBOR tag \a tag to the stream, creating a CBOR Tag value. All
+ tags must be followed by another type which they provide meaning for.
+
+ In the following example, we append a CBOR Tag 36 (Regular Expression) and a
+ QRegularExpression's pattern to the stream:
+
+ \code
+ void writeRxPattern(QCborStreamWriter &writer, const QRegularExpression &rx)
+ {
+ writer.append(QCborTag(36));
+ writer.append(rx.pattern());
+ }
+ \endcode
+
+ \sa QCborStreamReader::isTag(), QCborStreamReader::toTag()
+ */
+void QCborStreamWriter::append(QCborTag tag)
+{
+ d->executeAppend(cbor_encode_tag, CborTag(tag));
+}
+
+/*!
+ \fn void QCborStreamWriter::append(QCborKnownTags tag)
+ \overload
+
+ Appends the CBOR tag \a tag to the stream, creating a CBOR Tag value. All
+ tags must be followed by another type which they provide meaning for.
+
+ In the following example, we append a CBOR Tag 1 (Unix \c time_t) and an
+ integer representing the current time to the stream, obtained using the \c
+ time() function:
+
+ \code
+ void writeCurrentTime(QCborStreamWriter &writer)
+ {
+ writer.append(QCborKnownTags::UnixTime_t);
+ writer.append(time(nullptr));
+ }
+ \endcode
+
+ \sa QCborStreamReader::isTag(), QCborStreamReader::toTag()
+ */
+
+/*!
+ \overload
+
+ Appends the CBOR simple type \a st to the stream, creating a CBOR Simple
+ Type value. In the following example, we write the simple type for Null as
+ well as for type 32, which Qt has no support for.
+
+ \code
+ writer.append(QCborSimpleType::Null);
+ writer.append(QCborSimpleType(32));
+ \endcode
+
+ \note Using Simple Types for which there is no specification can lead to
+ validation errors by the remote receiver. In addition, simple type values 24
+ through 31 (inclusive) are reserved and must not be used.
+
+ \sa QCborStreamReader::isSimpleType(), QCborStreamReader::toSimpleType()
+ */
+void QCborStreamWriter::append(QCborSimpleType st)
+{
+ d->executeAppend(cbor_encode_simple_value, uint8_t(st));
+}
+
+/*!
+ \overload
+
+ Appends the floating point number \a f to the stream, creating a CBOR 16-bit
+ Half-Precision Floating Point value. The following code can be used to convert
+ a C++ \tt float to \l qfloat16 if there's no loss of precision and append it, or
+ instead append the \tt float.
+
+ \code
+ void writeFloat(QCborStreamWriter &writer, float f)
+ {
+ qfloat16 f16 = f;
+ if (qIsNaN(f) || f16 == f)
+ writer.append(f16);
+ else
+ writer.append(f);
+ }
+ \endcode
+
+ \sa QCborStreamReader::isFloat16(), QCborStreamReader::toFloat16()
+ */
+void QCborStreamWriter::append(qfloat16 f)
+{
+ d->executeAppend(cbor_encode_half_float, static_cast<const void *>(&f));
+}
+
+/*!
+ \overload
+
+ Appends the floating point number \a f to the stream, creating a CBOR 32-bit
+ Single-Precision Floating Point value. The following code can be used to convert
+ a C++ \tt double to \tt float if there's no loss of precision and append it, or
+ instead append the \tt double.
+
+ \code
+ void writeFloat(QCborStreamWriter &writer, double d)
+ {
+ float f = d;
+ if (qIsNaN(d) || d == f)
+ writer.append(f);
+ else
+ writer.append(d);
+ }
+ \endcode
+
+ \sa QCborStreamReader::isFloat(), QCborStreamReader::toFloat()
+ */
+void QCborStreamWriter::append(float f)
+{
+ d->executeAppend(cbor_encode_float, f);
+}
+
+/*!
+ \overload
+
+ Appends the floating point number \a d to the stream, creating a CBOR 64-bit
+ Double-Precision Floating Point value. QCborStreamWriter always appends the
+ number as-is, performing no check for whether the number is the canonical
+ form for NaN, an infinite, whether it is denormal or if it could be written
+ with a shorter format.
+
+ The following code performs all those checks, except for the denormal one,
+ which is expected to be taken into account by the system FPU or floating
+ point emulation directly.
+
+ \code
+ void writeDouble(QCborStreamWriter &writer, double d)
+ {
+ float f;
+ if (qIsNaN(d)) {
+ writer.append(qfloat16(qQNaN()));
+ } else if (qIsInf(d)) {
+ writer.append(d < 0 ? -qInf() : qInf());
+ } else if ((f = d) == d) {
+ qfloat16 f16 = f;
+ if (f16 == f)
+ writer.append(f16);
+ else
+ writer.append(f);
+ } else {
+ writer.append(d);
+ }
+ }
+ \endcode
+
+ Determining if a double can be converted to an integral with no loss of
+ precision is left as an exercise to the reader.
+
+ \sa QCborStreamReader::isDouble(), QCborStreamReader::toDouble()
+ */
+void QCborStreamWriter::append(double d)
+{
+ this->d->executeAppend(cbor_encode_double, d);
+}
+
+/*!
+ Appends \a len bytes of data starting from \a data to the stream, creating a
+ CBOR Byte String value. QCborStreamWriter will attempt to write the entire
+ string in one chunk.
+
+ Unlike the QByteArray overload of append(), this function is not limited by
+ QByteArray's size limits. However, note that neither
+ QCborStreamReader::readByteArray() nor QCborValue support reading CBOR
+ streams with byte arrays larger than 2 GB.
+
+ \sa append(QByteArray), appendTextString(),
+ QCborStreamReader::isByteArray(), QCborStreamReader::readByteArray()
+ */
+void QCborStreamWriter::appendByteString(const char *data, qsizetype len)
+{
+ d->executeAppend(cbor_encode_byte_string, reinterpret_cast<const uint8_t *>(data), size_t(len));
+}
+
+/*!
+ Appends \a len bytes of text starting from \a utf8 to the stream, creating a
+ CBOR Text String value. QCborStreamWriter will attempt to write the entire
+ string in one chunk.
+
+ The string pointed to by \a utf8 is expected to be properly encoded UTF-8.
+ QCborStreamWriter performs no validation that this is the case.
+
+ Unlike the QLatin1String overload of append(), this function is not limited
+ to 2 GB. However, note that neither QCborStreamReader::readString() nor
+ QCborValue support reading CBOR streams with text strings larger than 2 GB.
+
+ \sa append(QLatin1String), append(QStringView),
+ QCborStreamReader::isString(), QCborStreamReader::readString()
+ */
+void QCborStreamWriter::appendTextString(const char *utf8, qsizetype len)
+{
+ d->executeAppend(cbor_encode_text_string, utf8, size_t(len));
+}
+
+/*!
+ \fn void QCborStreamWriter::append(const char *str, qsizetype size)
+ \overload
+
+ Appends \a size bytes of text starting from \a str to the stream, creating a
+ CBOR Text String value. QCborStreamWriter will attempt to write the entire
+ string in one chunk. If \a size is -1, this function will write \c strlen(\a
+ str) bytes.
+
+ The string pointed to by \a str is expected to be properly encoded UTF-8.
+ QCborStreamWriter performs no validation that this is the case.
+
+ Unlike the QLatin1String overload of append(), this function is not limited
+ to 2 GB. However, note that neither QCborStreamReader nor QCborValue support
+ reading CBOR streams with text strings larger than 2 GB.
+
+ \sa append(QLatin1String), append(QStringView),
+ QCborStreamReader::isString(), QCborStreamReader::readString()
+ */
+
+/*!
+ \fn void QCborStreamWriter::append(bool b)
+ \overload
+
+ Appends the boolean value \a b to the stream, creating either a CBOR False
+ value or a CBOR True value. This function is equivalent to (and implemented
+ as):
+
+ \code
+ writer.append(b ? QCborSimpleType::True : QCborSimpleType::False);
+ \endcode
+
+ \sa appendNull(), appendUndefined(),
+ QCborStreamReader::isBool(), QCborStreamReader::toBool()
+ */
+
+/*!
+ \fn void QCborStreamWriter::append(std::nullptr_t)
+ \overload
+
+ Appends a CBOR Null value to the stream. This function is equivalent to (and
+ implemented as): The parameter is ignored.
+
+ \code
+ writer.append(QCborSimpleType::Null);
+ \endcode
+
+ \sa appendNull(), append(QCborSimpleType), QCborStreamReader::isNull()
+ */
+
+/*!
+ \fn void QCborStreamWriter::appendNull()
+
+ Appends a CBOR Null value to the stream. This function is equivalent to (and
+ implemented as):
+
+ \code
+ writer.append(QCborSimpleType::Null);
+ \endcode
+
+ \sa append(std::nullptr_t), append(QCborSimpleType), QCborStreamReader::isNull()
+ */
+
+/*!
+ \fn void QCborStreamWriter::appendUndefined()
+
+ Appends a CBOR Undefined value to the stream. This function is equivalent to (and
+ implemented as):
+
+ \code
+ writer.append(QCborSimpleType::Undefined);
+ \endcode
+
+ \sa append(QCborSimpleType), QCborStreamReader::isUndefined()
+ */
+
+/*!
+ Starts a CBOR Array with indeterminate length in the CBOR stream. Each
+ startArray() call must be paired with one endArray() call and the current
+ CBOR element extends until the end of the array.
+
+ The array created by this function has no explicit length. Instead, its
+ length is implied by the elements contained in it. Note, however, that use
+ of indeterminate-length arrays is not compliant with canonical CBOR encoding.
+
+ The following example appends elements from the linked list of strings
+ passed as input:
+
+ \code
+ void appendList(QCborStreamWriter &writer, const QLinkedList<QString> &list)
+ {
+ writer.startArray();
+ for (const QString &s : list)
+ writer.append(s);
+ writer.endArray();
+ }
+ \endcode
+
+ \sa startArray(quint64), endArray(), startMap(), QCborStreamReader::isArray(),
+ QCborStreamReader::isLengthKnown()
+ */
+void QCborStreamWriter::startArray()
+{
+ d->createContainer(cbor_encoder_create_array);
+}
+
+/*!
+ \overload
+
+ Starts a CBOR Array with explicit length of \a count items in the CBOR
+ stream. Each startArray call must be paired with one endArray() call and the
+ current CBOR element extends until the end of the array.
+
+ The array created by this function has an explicit length and therefore
+ exactly \a count items must be added to the CBOR stream. Adding fewer or
+ more items will result in failure during endArray() and the CBOR stream will
+ be corrupt. However, explicit-length arrays are required by canonical CBOR
+ encoding.
+
+ The following example appends all strings found in the \l QStringList passed as input:
+
+ \code
+ void appendList(QCborStreamWriter &writer, const QStringList &list)
+ {
+ writer.startArray(list.size());
+ for (const QString &s : list)
+ writer.append(s);
+ writer.endArray();
+ }
+ \endcode
+
+ \b{Size limitations}: The parameter to this function is quint64, which would
+ seem to allow up to 2\sup{64}-1 elements in the array. However, both
+ QCborStreamWriter and QCborStreamReader are currently limited to 2\sup{32}-2
+ items on 32-bit systems and 2\sup{64}-2 items on 64-bit ones. Also note that
+ QCborArray is currently limited to 2\sup{27} elements in any platform.
+
+ \sa startArray(), endArray(), startMap(), QCborStreamReader::isArray(),
+ QCborStreamReader::isLengthKnown()
+ */
+void QCborStreamWriter::startArray(quint64 count)
+{
+ d->createContainer(cbor_encoder_create_array, count);
+}
+
+/*!
+ Terminates the array started by either overload of startArray() and returns
+ true if the correct number of elements was added to the array. This function
+ must be called for every startArray() used.
+
+ A return of false indicates error in the application and an unrecoverable
+ error in this stream. QCborStreamWriter also writes a warning using
+ qWarning() if that happens.
+
+ Calling this function when the current container is not an array is also an
+ error, though QCborStreamWriter cannot currently detect this condition.
+
+ \sa startArray(), startArray(quint64), endMap()
+ */
+bool QCborStreamWriter::endArray()
+{
+ return d->closeContainer();
+}
+
+/*!
+ Starts a CBOR Map with indeterminate length in the CBOR stream. Each
+ startMap() call must be paired with one endMap() call and the current CBOR
+ element extends until the end of the map.
+
+ The map created by this function has no explicit length. Instead, its length
+ is implied by the elements contained in it. Note, however, that use of
+ indeterminate-length maps is not compliant with canonical CBOR encoding
+ (canonical encoding also requires keys to be unique and in sorted order).
+
+ The following example appends elements from the linked list of int and
+ string pairs passed as input:
+
+ \code
+ void appendMap(QCborStreamWriter &writer, const QLinkedList<QPair<int, QString>> &list)
+ {
+ writer.startMap();
+ for (const auto pair : list) {
+ writer.append(pair.first)
+ writer.append(pair.second);
+ }
+ writer.endMap();
+ }
+ \endcode
+
+ \sa startMap(quint64), endMap(), startArray(), QCborStreamReader::isMap(),
+ QCborStreamReader::isLengthKnown()
+ */
+void QCborStreamWriter::startMap()
+{
+ d->createContainer(cbor_encoder_create_map);
+}
+
+/*!
+ \overload
+
+ Starts a CBOR Map with explicit length of \a count items in the CBOR
+ stream. Each startMap call must be paired with one endMap() call and the
+ current CBOR element extends until the end of the map.
+
+ The map created by this function has an explicit length and therefore
+ exactly \a count pairs of items must be added to the CBOR stream. Adding
+ fewer or more items will result in failure during endMap() and the CBOR
+ stream will be corrupt. However, explicit-length map are required by
+ canonical CBOR encoding.
+
+ The following example appends all strings found in the \l QMap passed as input:
+
+ \code
+ void appendMap(QCborStreamWriter &writer, const QMap<int, QString> &map)
+ {
+ writer.startMap(map.size());
+ for (auto it = map.begin(); it != map.end(); ++it) {
+ writer.append(it.key());
+ writer.append(it.value());
+ }
+ writer.endMap();
+ }
+ \endcode
+
+ \b{Size limitations}: The parameter to this function is quint64, which would
+ seem to allow up to 2\sup{64}-1 pairs in the map. However, both
+ QCborStreamWriter and QCborStreamReader are currently limited to 2\sup{31}-1
+ items on 32-bit systems and 2\sup{63}-1 items on 64-bit ones. Also note that
+ QCborMap is currently limited to 2\sup{26} elements in any platform.
+
+ \sa startMap(), endMap(), startArray(), QCborStreamReader::isMap(),
+ QCborStreamReader::isLengthKnown()
+ */
+void QCborStreamWriter::startMap(quint64 count)
+{
+ d->createContainer(cbor_encoder_create_map, count);
+}
+
+/*!
+ Terminates the map started by either overload of startMap() and returns
+ true if the correct number of elements was added to the array. This function
+ must be called for every startMap() used.
+
+ A return of false indicates error in the application and an unrecoverable
+ error in this stream. QCborStreamWriter also writes a warning using
+ qWarning() if that happens.
+
+ Calling this function when the current container is not a map is also an
+ error, though QCborStreamWriter cannot currently detect this condition.
+
+ \sa startMap(), startMap(quint64), endArray()
+ */
+bool QCborStreamWriter::endMap()
+{
+ return d->closeContainer();
+}
+
+/*!
+ \class QCborStreamReader
+ \inmodule QtCore
+ \ingroup cbor
+ \reentrant
+ \since 5.12
+
+ \brief The QCborStreamReader class is a simple CBOR stream decoder, operating
+ on either a QByteArray or QIODevice.
+
+ This class can be used to decode a stream of CBOR content directly from
+ either a QByteArray or a QIODevice. CBOR is the Concise Binary Object
+ Representation, a very compact form of binary data encoding that is
+ compatible with JSON. It was created by the IETF Constrained RESTful
+ Environments (CoRE) WG, which has used it in many new RFCs. It is meant to
+ be used alongside the \l{https://tools.ietf.org/html/rfc7252}{CoAP
+ protocol}.
+
+ QCborStreamReader provides a StAX-like API, similar to that of
+ \l{QXmlStreamReader}. Using it requires a bit of knowledge of CBOR encoding.
+ For a simpler API, see \l{QCborValue} and especially the decoding function
+ QCborValue::fromCbor().
+
+ Typically, one creates a QCborStreamReader by passing the source QByteArray
+ or QIODevice as a parameter to the constructor, then pop elements off the
+ stream if there were no errors in decoding. There are three kinds of CBOR
+ types:
+
+ \table
+ \header \li Kind \li Types \li Behavior
+ \row \li Fixed-width \li Integers, Tags, Simple types, Floating point
+ \li Value is pre-parsed by QCborStreamReader, so accessor functions
+ are \c const. Must call next() to advance.
+ \row \li Strings \li Byte arrays, Text strings
+ \li Length (if known) is pre-parsed, but the string itself is not.
+ The accessor functions are not const and may allocate memory.
+ Once called, the accessor functions automatically advance to
+ the next element.
+ \row \li Containers \li Arrays, Maps
+ \li Length (if known) is pre-parsed. To access the elements, you
+ must call enterContainer(), read all elements, then call
+ leaveContainer(). That function advances to the next element.
+ \endtable
+
+ So a processor function typically looks like this:
+
+ \code
+ void handleStream(QCborStreamReader &reader)
+ {
+ switch (reader.type())
+ case QCborStreamReader::UnsignedInteger:
+ case QCborStreamReader::NegativeInteger:
+ case QCborStreamReader::SimpleType:
+ case QCborStreamReader::Float16:
+ case QCborStreamReader::Float:
+ case QCborStreamReader::Double:
+ handleFixedWidth(reader);
+ reader.next();
+ break;
+ case QCborStreamReader::ByteArray:
+ case QCborStreamReader::String:
+ handleString(reader);
+ break;
+ case QCborStreamReader::Array:
+ case QCborStreamReader::Map:
+ reader.enterContainer();
+ while (reader.lastError() == QCborError::NoError)
+ handleStream(reader);
+ if (reader.lastError() == QCborError::NoError)
+ reader.leaveContainer();
+ }
+ }
+ \endcode
+
+ \section1 CBOR support
+
+ The following table lists the CBOR features that QCborStreamReader supports.
+
+ \table
+ \header \li Feature \li Support
+ \row \li Unsigned numbers \li Yes (full range)
+ \row \li Negative numbers \li Yes (full range)
+ \row \li Byte strings \li Yes
+ \row \li Text strings \li Yes
+ \row \li Chunked strings \li Yes
+ \row \li Tags \li Yes (arbitrary)
+ \row \li Booleans \li Yes
+ \row \li Null \li Yes
+ \row \li Undefined \li Yes
+ \row \li Arbitrary simple values \li Yes
+ \row \li Half-precision float (16-bit) \li Yes
+ \row \li Single-precision float (32-bit) \li Yes
+ \row \li Double-precision float (64-bit) \li Yes
+ \row \li Infinities and NaN floating point \li Yes
+ \row \li Determinate-length arrays and maps \li Yes
+ \row \li Indeterminate-length arrays and maps \li Yes
+ \row \li Map key types other than strings and integers \li Yes (arbitrary)
+ \endtable
+
+ \section1 Dealing with invalid or incomplete CBOR streams
+
+ QCborStreamReader is capable of detecting corrupt input on its own. The
+ library it uses has been extensively tested against invalid input of any
+ kind and is quite able to report errors. If any is detected,
+ QCborStreamReader will set lastError() to a value besides
+ QCborError::NoError, indicating which situation was detected.
+
+ Most errors detected by QCborStreamReader during normal item parsing are not
+ recoverable. The code using QCborStreamReader may opt to handle the data
+ that was properly decoded or it can opt to discard the entire data.
+
+ The only recoverable error is QCborError::EndOfFile, which indicates that
+ more data is required in order to complete the parsing. This situation is
+ useful when data is being read from an asynchronous source, such as a pipe
+ (QProcess) or a socket (QTcpSocket, QUdpSocket, QNetworkReply, etc.). When
+ more data arrives, the surrounding code needs to call either addData(), if
+ parsing from a QByteArray, or reparse(), if it is instead reading directly
+ a the QIDOevice that now has more data available (see setDevice()).
+
+ \sa QCborStreamWriter, QCborValue, QXmlStreamReader
+ */
+
+/*!
+ \enum QCborStreamReader::Type
+
+ This enumeration contains all possible CBOR types as decoded by
+ QCborStreamReader. CBOR has 7 major types, plus a number of simple types
+ carrying no value, and floating point values.
+
+ \value UnsignedInteger (Major type 0) Ranges from 0 to 2\sup{64} - 1
+ (18,446,744,073,709,551,616)
+ \value NegativeInteger (Major type 1) Ranges from -1 to -2\sup{64}
+ (-18,446,744,073,709,551,616)
+ \value ByteArray (Major type 2) Arbitrary binary data.
+ \value ByteString An alias to ByteArray.
+ \value String (Major type 3) Unicode text, possibly containing NULs.
+ \value TextString An alias to String
+ \value Array (Major type 4) Array of heterogeneous items.
+ \value Map (Major type 5) Map/dictionary of heterogeneous items.
+ \value Tag (Major type 6) Numbers giving further semantic value
+ to generic CBOR items. See \l QCborTag for more information.
+ \value SimpleType (Major type 7) Types carrying no further value. Includes
+ booleans (true and false), null, undefined.
+ \value Float16 IEEE 754 half-precision floating point (\c qfloat16).
+ \value HalfFloat An alias to Float16.
+ \value Float IEEE 754 single-precision floating point (\tt float).
+ \value Double IEEE 754 double-precision floating point (\tt double).
+ \value Invalid Not a valid type, either due to parsing error or due to
+ reaching the end of an array or map.
+ */
+
+/*!
+ \enum QCborStreamReader::StringResultCode
+
+ This enum is returned by readString() and readByteArray() and is used to
+ indicate what the status of the parsing is.
+
+ \value EndOfString The parsing for the string is complete, with no error.
+ \value Ok The function returned data; there was no error.
+ \value Error Parsing failed with an error.
+ */
+
+/*!
+ \class QCborStreamReader::StringResult
+
+ This class is returned by readString() and readByteArray(), with either the
+ contents of the string that was read or an indication that the parsing is
+ done or found an error.
+
+ The contents of \l data are valid only if \l status is
+ \l{StringResultCode}{Ok}. Otherwise, it should be null.
+ */
+
+/*!
+ \variable Container QCborStreamReader::StringResult::data
+ Contains the actual data from the string if \l status is \c Ok.
+ */
+
+/*!
+ \variable QCborStreamReader::StringResultCode QCborStreamReader::StringResult::status
+ Contains the status of the attempt of reading the string from the stream.
+ */
+
+/*!
+ \fn QCborStreamReader::Type QCborStreamReader::type() const
+
+ Returns the type of the current element. It is one of the valid types or
+ Invalid.
+
+ \sa isValid(), isUnsignedInteger(), isNegativeInteger(), isInteger(),
+ isByteArray(), isString(), isArray(), isMap(), isTag(), isSimpleType(),
+ isBool(), isFalse(), isTrue(), isNull(), isUndefined(), isFloat16(),
+ isFloat(), isDouble()
+ */
+
+/*!
+ \fn bool QCborStreamReader::isValid() const
+
+ Returns true if the current element is valid, false otherwise. The current
+ element may be invalid if there was a decoding error or we've just parsed
+ the last element in an array or map.
+
+ \note This function is not the opposite of isNull(). Null is a normal CBOR
+ type that must be handled by the application.
+
+ \sa type(), isInvalid()
+ */
+
+/*!
+ \fn bool QCborStreamReader::isInvalid() const
+
+ Returns true if the current element is invalid, false otherwise. The current
+ element may be invalid if there was a decoding error or we've just parsed
+ the last element in an array or map.
+
+ \note This function is not to be confused with isNull(). Null is a normal
+ CBOR type that must be handled by the application.
+
+ \sa type(), isValid()
+ */
+
+/*!
+ \fn bool QCborStreamReader::isUnsignedInteger() const
+
+ Returns true if the type of the current element is an unsigned integer (that
+ is if type() returns QCborStreamReader::UnsignedInteger). If this function
+ returns true, you may call toUnsignedInteger() or toInteger() to read that value.
+
+ \sa type(), toUnsignedInteger(), toInteger(), isInteger(), isNegativeInteger()
+ */
+
+/*!
+ \fn bool QCborStreamReader::isNegativeInteger() const
+
+ Returns true if the type of the current element is a negative integer (that
+ is if type() returns QCborStreamReader::NegativeInteger). If this function
+ returns true, you may call toNegativeInteger() or toInteger() to read that value.
+
+ \sa type(), toNegativeInteger(), toInteger(), isInteger(), isUnsignedInteger()
+ */
+
+/*!
+ \fn bool QCborStreamReader::isInteger() const
+
+ Returns true if the type of the current element is either an unsigned
+ integer or a negative one (that is, if type() returns
+ QCborStreamReader::UnsignedInteger or QCborStreamReader::NegativeInteger).
+ If this function returns true, you may call toInteger() to read that
+ value.
+
+ \sa type(), toInteger(), toUnsignedInteger(), toNegativeInteger(),
+ isUnsignedInteger(), isNegativeInteger()
+ */
+
+/*!
+ \fn bool QCborStreamReader::isByteArray() const
+
+ Returns true if the type of the current element is a byte array (that is,
+ if type() returns QCborStreamReader::ByteArray). If this function returns
+ true, you may call readByteArray() to read that data.
+
+ \sa type(), readByteArray(), isString()
+ */
+
+/*!
+ \fn bool QCborStreamReader::isString() const
+
+ Returns true if the type of the current element is a text string (that is,
+ if type() returns QCborStreamReader::String). If this function returns
+ true, you may call readString() to read that data.
+
+ \sa type(), readString(), isByteArray()
+ */
+
+/*!
+ \fn bool QCborStreamReader::isArray() const
+
+ Returns true if the type of the current element is an array (that is,
+ if type() returns QCborStreamReader::Array). If this function returns
+ true, you may call enterContainer() to begin parsing that container.
+
+ When the current element is an array, you may also call isLengthKnown() to
+ find out if the array's size is explicit in the CBOR stream. If it is, that
+ size can be obtained by calling length().
+
+ The following example pre-allocates a QVariantList given the array's size
+ for more efficient decoding:
+
+ \code
+ QVariantList populateFromCbor(QCborStreamReader &reader)
+ {
+ QVariantList list;
+ if (reader.isLengthKnown())
+ list.reserve(reader.length());
+
+ reader.enterContainer();
+ while (reader.lastError() == QCborError::NoError && reader.hasNext())
+ list.append(readOneElement(reader));
+ if (reader.lastError() == QCborError::NoError)
+ reader.leaveContainer();
+ }
+ \endcode
+
+ \note The code above does not validate that the length is a sensible value.
+ If the input stream reports that the length is 1 billion elements, the above
+ function will try to allocate some 16 GB or more of RAM, which can lead to a
+ crash.
+
+ \sa type(), isMap(), isLengthKnown(), length(), enterContainer(), leaveContainer()
+ */
+
+/*!
+ \fn bool QCborStreamReader::isMap() const
+
+ Returns true if the type of the current element is a map (that is, if type()
+ returns QCborStreamReader::Map). If this function returns true, you may call
+ enterContainer() to begin parsing that container.
+
+ When the current element is a map, you may also call isLengthKnown() to
+ find out if the map's size is explicit in the CBOR stream. If it is, that
+ size can be obtained by calling length().
+
+ The following example pre-allocates a QVariantMap given the map's size
+ for more efficient decoding:
+
+ \code
+ QVariantMap populateFromCbor(QCborStreamReader &reader)
+ {
+ QVariantMap map;
+ if (reader.isLengthKnown())
+ map.reserve(reader.length());
+
+ reader.enterContainer();
+ while (reader.lastError() == QCborError::NoError && reader.hasNext()) {
+ QString key = readElementAsString(reader);
+ map.insert(key, readOneElement(reader));
+ }
+ if (reader.lastError() == QCborError::NoError)
+ reader.leaveContainer();
+ }
+ \endcode
+
+ The example above uses a function called \c readElementAsString to read the
+ map's keys and obtain a string. That is because CBOR maps may contain any
+ type as keys, not just strings. User code needs to either perform this
+ conversion, reject non-string keys, or instead use a different container
+ besides \l QVariantMap and \l QVariantHash. For example, if the map is
+ expected to contain integer keys, which is recommended as it reduces stream
+ size and parsing, the correct container would be \c{\l{QMap}<int, QVariant>}
+ or \c{\l{QHash}<int, QVariant>}.
+
+ \note The code above does not validate that the length is a sensible value.
+ If the input stream reports that the length is 1 billion elements, the above
+ function will try to allocate some 24 GB or more of RAM, which can lead to a
+ crash.
+
+ \sa type(), isArray(), isLengthKnown(), length(), enterContainer(), leaveContainer()
+ */
+
+/*!
+ \fn bool QCborStreamReader::isTag() const
+
+ Returns true if the type of the current element is a CBOR tag (that is,
+ if type() returns QCborStreamReader::Tag). If this function returns
+ true, you may call toTag() to read that data.
+
+ \sa type(), toTag()
+ */
+
+/*!
+ \fn bool QCborStreamReader::isFloat16() const
+
+ Returns true if the type of the current element is an IEEE 754
+ half-precision floating point (that is, if type() returns
+ QCborStreamReader::Float16). If this function returns true, you may call
+ toFloat16() to read that data.
+
+ \sa type(), toFloat16(), isFloat(), isDouble()
+ */
+
+/*!
+ \fn bool QCborStreamReader::isFloat() const
+
+ Returns true if the type of the current element is an IEEE 754
+ single-precision floating point (that is, if type() returns
+ QCborStreamReader::Float). If this function returns true, you may call
+ toFloat() to read that data.
+
+ \sa type(), toFloat(), isFloat16(), isDouble()
+ */
+
+/*!
+ \fn bool QCborStreamReader::isDouble() const
+
+ Returns true if the type of the current element is an IEEE 754
+ double-precision floating point (that is, if type() returns
+ QCborStreamReader::Double). If this function returns true, you may call
+ toDouble() to read that data.
+
+ \sa type(), toDouble(), isFloat16(), isFloat()
+ */
+
+/*!
+ \fn bool QCborStreamReader::isSimpleType() const
+
+ Returns true if the type of the current element is any CBOR simple type,
+ including a boolean value (true and false) as well as null and undefined. To
+ find out which simple type this is, call toSimpleType(). Alternatively, to
+ test for one specific simple type, call the overload that takes a
+ QCborSimpleType parameter.
+
+ CBOR simple types are types that do not carry extra value. There are 255
+ possibilities, but there are currently only four values that have defined
+ meaning. Code is not expected to cope with unknown simple types and may
+ simply discard the stream as invalid if it finds an unknown one.
+
+ \sa QCborSimpleType, type(), isSimpleType(QCborSimpleType), toSimpleType()
+ */
+
+/*!
+ \fn bool QCborStreamReader::isSimpleType(QCborSimpleType st) const
+
+ Returns true if the type of the current element is the simple type \a st,
+ false otherwise. If this function returns true, then toSimpleType() will
+ return \a st.
+
+ CBOR simple types are types that do not carry extra value. There are 255
+ possibilities, but there are currently only four values that have defined
+ meaning. Code is not expected to cope with unknown simple types and may
+ simply discard the stream as invalid if it finds an unknown one.
+
+ \sa QCborSimpleType, type(), isSimpleType(), toSimpleType()
+ */
+
+/*!
+ \fn bool QCborStreamReader::isFalse() const
+
+ Returns true if the current element is the \c false value, false if it is
+ anything else.
+
+ \sa type(), isTrue(), isBool(), toBool(), isSimpleType(), toSimpleType()
+ */
+
+/*!
+ \fn bool QCborStreamReader::isTrue() const
+
+ Returns true if the current element is the \c true value, false if it is
+ anything else.
+
+ \sa type(), isFalse(), isBool(), toBool(), isSimpleType(), toSimpleType()
+ */
+
+/*!
+ \fn bool QCborStreamReader::isBool() const
+
+ Returns true if the current element is a boolean value (\c true or \c
+ false), false if it is anything else. If this function returns true, you may
+ call toBool() to retrieve the value of the boolean. You may also call
+ toSimpleType() and compare to either QCborSimpleValue::True or
+ QCborSimpleValue::False.
+
+ \sa type(), isFalse(), isTrue(), toBool(), isSimpleType(), toSimpleType()
+ */
+
+/*!
+ \fn bool QCborStreamReader::isNull() const
+
+ Returns true if the current element is the \c null value, false if it is
+ anything else. Null values may be used to indicate the absence of some
+ optional data.
+
+ \note This function is not the opposite of isValid(). A Null value is a
+ valid CBOR value.
+
+ \sa type(), isSimpleType(), toSimpleType()
+ */
+
+/*!
+ \fn bool QCborStreamReader::isUndefined() const
+
+ Returns true if the current element is the \c undefined value, false if it
+ is anything else. Undefined values may be encoded to indicate that some
+ conversion failed or was not possible when creating the stream.
+ QCborStreamReader never performs any replacement and this function will only
+ return true if the stream contains an explicit undefined value.
+
+ \sa type(), isSimpleType(), toSimpleType()
+ */
+
+/*!
+ \fn bool QCborStreamReader::isContainer() const
+
+ Returns true if the current element is a container (that is, an array or a
+ map), false if it is anything else. If the current element is a container,
+ the isLengthKnown() function may be used to find out if the container's size
+ is explicit in the stream and, if so, length() can be used to get that size.
+
+ More importantly, for a container, the enterContainer() function is
+ available to begin iterating through the elements contained therein.
+
+ \sa type(), isArray(), isMap(), isLengthKnown(), length(), enterContainer(),
+ leaveContainer(), containerDepth()
+ */
+
+class QCborStreamReaderPrivate
+{
+public:
+ enum {
+ // 9 bytes is the maximum size for any integer, floating point or
+ // length in CBOR.
+ MaxCborIndividualSize = 9,
+ IdealIoBufferSize = 256
+ };
+
+ QIODevice *device;
+ QByteArray buffer;
+ QStack<CborValue> containerStack;
+
+ CborParser parser;
+ CborValue currentElement;
+ QCborError lastError = {};
+
+ QByteArray::size_type bufferStart;
+ bool corrupt = false;
+
+ QCborStreamReaderPrivate(const QByteArray &data)
+ : device(nullptr), buffer(data)
+ {
+ initDecoder();
+ }
+
+ QCborStreamReaderPrivate(QIODevice *device)
+ {
+ setDevice(device);
+ }
+
+ ~QCborStreamReaderPrivate()
+ {
+ }
+
+ void setDevice(QIODevice *dev)
+ {
+ buffer.clear();
+ device = dev;
+ initDecoder();
+ }
+
+ void initDecoder()
+ {
+ containerStack.clear();
+ bufferStart = 0;
+ if (device) {
+ buffer.clear();
+ buffer.reserve(IdealIoBufferSize); // sets the CapacityReserved flag
+ }
+
+ preread();
+ if (CborError err = cbor_parser_init_reader(nullptr, &parser, &currentElement, this))
+ handleError(err);
+ }
+
+ char *bufferPtr()
+ {
+ Q_ASSERT(buffer.isDetached());
+ return const_cast<char *>(buffer.constData()) + bufferStart;
+ }
+
+ void preread()
+ {
+ if (device && buffer.size() - bufferStart < MaxCborIndividualSize) {
+ // load more, but only if there's more to be read
+ qint64 avail = device->bytesAvailable();
+ Q_ASSERT(avail >= buffer.size());
+ if (avail == buffer.size())
+ return;
+
+ if (bufferStart)
+ device->skip(bufferStart); // skip what we've already parsed
+
+ if (buffer.size() != IdealIoBufferSize)
+ buffer.resize(IdealIoBufferSize);
+
+ bufferStart = 0;
+ qint64 read = device->peek(bufferPtr(), IdealIoBufferSize);
+ if (read < 0)
+ buffer.clear();
+ else if (read != IdealIoBufferSize)
+ buffer.truncate(read);
+ }
+ }
+
+ void handleError(CborError err) noexcept
+ {
+ Q_ASSERT(err);
+
+ // is the error fatal?
+ if (err != CborErrorUnexpectedEOF)
+ corrupt = true;
+
+ // our error codes are the same (for now)
+ lastError = { QCborError::Code(err) };
+ }
+
+ void updateBufferAfterString(qsizetype offset, qsizetype size)
+ {
+ Q_ASSERT(device);
+
+ bufferStart += offset;
+ qsizetype newStart = bufferStart + size;
+ qsizetype remainingInBuffer = buffer.size() - newStart;
+
+ if (remainingInBuffer <= 0) {
+ // We've read from the QIODevice more than what was in the buffer.
+ buffer.truncate(0);
+ } else {
+ // There's still data buffered, but we need to move it around.
+ char *ptr = buffer.data();
+ memmove(ptr, ptr + newStart, remainingInBuffer);
+ buffer.truncate(remainingInBuffer);
+ }
+
+ bufferStart = 0;
+ }
+
+ bool ensureStringIteration();
+};
+
+void qt_cbor_stream_set_error(QCborStreamReaderPrivate *d, QCborError error)
+{
+ d->handleError(CborError(error.c));
+}
+
+static inline bool qt_cbor_decoder_can_read(void *token, size_t len)
+{
+ Q_ASSERT(len <= QCborStreamReaderPrivate::MaxCborIndividualSize);
+ auto self = static_cast<QCborStreamReaderPrivate *>(token);
+
+ qint64 avail = self->buffer.size() - self->bufferStart;
+ return len <= quint64(avail);
+}
+
+static void qt_cbor_decoder_advance(void *token, size_t len)
+{
+ Q_ASSERT(len <= QCborStreamReaderPrivate::MaxCborIndividualSize);
+ auto self = static_cast<QCborStreamReaderPrivate *>(token);
+ Q_ASSERT(len <= size_t(self->buffer.size() - self->bufferStart));
+
+ self->bufferStart += int(len);
+ self->preread();
+}
+
+static void *qt_cbor_decoder_read(void *token, void *userptr, size_t offset, size_t len)
+{
+ Q_ASSERT(len == 1 || len == 2 || len == 4 || len == 8);
+ Q_ASSERT(offset == 0 || offset == 1);
+ auto self = static_cast<const QCborStreamReaderPrivate *>(token);
+
+ // we must have pre-read the data
+ Q_ASSERT(len + offset <= size_t(self->buffer.size() - self->bufferStart));
+ return memcpy(userptr, self->buffer.constData() + self->bufferStart + offset, len);
+}
+
+static CborError qt_cbor_decoder_transfer_string(void *token, const void **userptr, size_t offset, size_t len)
+{
+ auto self = static_cast<QCborStreamReaderPrivate *>(token);
+ Q_ASSERT(offset <= size_t(self->buffer.size()));
+ Q_STATIC_ASSERT(sizeof(size_t) >= sizeof(QByteArray::size_type));
+ Q_STATIC_ASSERT(sizeof(size_t) == sizeof(qsizetype));
+
+ // check that we will have enough data from the QIODevice before we advance
+ // (otherwise, we'd lose the length information)
+ qsizetype total;
+ if (len > size_t(std::numeric_limits<QByteArray::size_type>::max())
+ || add_overflow<qsizetype>(offset, len, &total))
+ return CborErrorDataTooLarge;
+
+ // our string transfer is just saving the offset to the userptr
+ *userptr = reinterpret_cast<void *>(offset);
+
+ qint64 avail = (self->device ? self->device->bytesAvailable() : self->buffer.size()) -
+ self->bufferStart;
+ return total > avail ? CborErrorUnexpectedEOF : CborNoError;
+}
+
+bool QCborStreamReaderPrivate::ensureStringIteration()
+{
+ if (currentElement.flags & CborIteratorFlag_IteratingStringChunks)
+ return true;
+
+ CborError err = cbor_value_begin_string_iteration(&currentElement);
+ if (!err)
+ return true;
+ handleError(err);
+ return false;
+}
+
+/*!
+ \internal
+ */
+inline void QCborStreamReader::preparse()
+{
+ if (lastError() == QCborError::NoError) {
+ type_ = cbor_value_get_type(&d->currentElement);
+
+ if (type_ != CborInvalidType) {
+ d->lastError = {};
+ // Undo the type mapping that TinyCBOR does (we have an explicit type
+ // for negative integer and we don't have separate types for Boolean,
+ // Null and Undefined).
+ if (type_ == CborBooleanType || type_ == CborNullType || type_ == CborUndefinedType) {
+ type_ = SimpleType;
+ value64 = quint8(d->buffer.at(d->bufferStart)) - CborSimpleType;
+ } else {
+ // Using internal TinyCBOR API!
+ value64 = _cbor_value_extract_int64_helper(&d->currentElement);
+
+ if (cbor_value_is_negative_integer(&d->currentElement))
+ type_ = quint8(QCborStreamReader::NegativeInteger);
+ }
+ }
+ } else {
+ type_ = Invalid;
+ }
+}
+
+/*!
+ Creates a QCborStreamReader object with no source data. After construction,
+ QCborStreamReader will report an error parsing.
+
+ You can add more data by calling addData() or by setting a different source
+ device using setDevice().
+
+ \sa addData(), isValid()
+ */
+QCborStreamReader::QCborStreamReader()
+ : QCborStreamReader(QByteArray())
+{
+}
+
+/*!
+ \overload
+
+ Creates a QCborStreamReader object with \a len bytes of data starting at \a
+ data. The pointer must remain valid until QCborStreamReader is destroyed.
+ */
+QCborStreamReader::QCborStreamReader(const char *data, qsizetype len)
+ : QCborStreamReader(QByteArray::fromRawData(data, len))
+{
+}
+
+/*!
+ \overload
+
+ Creates a QCborStreamReader object with \a len bytes of data starting at \a
+ data. The pointer must remain valid until QCborStreamReader is destroyed.
+ */
+QCborStreamReader::QCborStreamReader(const quint8 *data, qsizetype len)
+ : QCborStreamReader(QByteArray::fromRawData(reinterpret_cast<const char *>(data), len))
+{
+}
+
+/*!
+ \overload
+
+ Creates a QCborStreamReader object that will parse the CBOR stream found in
+ \a data.
+ */
+QCborStreamReader::QCborStreamReader(const QByteArray &data)
+ : d(new QCborStreamReaderPrivate(data))
+{
+ preparse();
+}
+
+/*!
+ \overload
+
+ Creates a QCborStreamReader object that will parse the CBOR stream found by
+ reading from \a device. QCborStreamReader does not take ownership of \a
+ device, so it must remain valid until this oject is destroyed.
+ */
+QCborStreamReader::QCborStreamReader(QIODevice *device)
+ : d(new QCborStreamReaderPrivate(device))
+{
+ preparse();
+}
+
+/*!
+ Destroys this QCborStreamReader object and frees any associated resources.
+ */
+QCborStreamReader::~QCborStreamReader()
+{
+}
+
+/*!
+ Sets the source of data to \a device, resetting the decoder to its initial
+ state.
+ */
+void QCborStreamReader::setDevice(QIODevice *device)
+{
+ d->setDevice(device);
+ preparse();
+}
+
+/*!
+ Returns the QIODevice that was set with either setDevice() or the
+ QCborStreamReader constructor. If this object was reading from a QByteArray,
+ this function returns nullptr instead.
+ */
+QIODevice *QCborStreamReader::device() const
+{
+ return d->device;
+}
+
+/*!
+ Adds \a data to the CBOR stream and reparses the current element. This
+ function is useful if the end of the data was previously reached while
+ processing the stream, but now more data is available.
+ */
+void QCborStreamReader::addData(const QByteArray &data)
+{
+ addData(data.constData(), data.size());
+}
+
+/*!
+ \fn void QCborStreamReader::addData(const quint8 *data, qsizetype len)
+ \overload
+
+ Adds \a len bytes of data starting at \a data to the CBOR stream and
+ reparses the current element. This function is useful if the end of the data
+ was previously reached while processing the stream, but now more data is
+ available.
+ */
+
+/*!
+ \overload
+
+ Adds \a len bytes of data starting at \a data to the CBOR stream and
+ reparses the current element. This function is useful if the end of the data
+ was previously reached while processing the stream, but now more data is
+ available.
+ */
+void QCborStreamReader::addData(const char *data, qsizetype len)
+{
+ if (!d->device) {
+ if (len > 0)
+ d->buffer.append(data, len);
+ reparse();
+ } else {
+ qWarning("QCborStreamReader: addData() with device()");
+ }
+}
+
+/*!
+ Reparses the current element. This function must be called when more data
+ becomes available in the source QIODevice after parsing failed due to
+ reaching the end of the input data before the end of the CBOR stream.
+
+ When reading from QByteArray(), the addData() function automatically calls
+ this function. Calling it when the reading had not failed is a no-op.
+ */
+void QCborStreamReader::reparse()
+{
+ d->lastError = {};
+ d->preread();
+ if (CborError err = cbor_value_reparse(&d->currentElement))
+ d->handleError(err);
+ else
+ preparse();
+}
+
+/*!
+ Clears the decoder state and resets the input source data to an empty byte
+ array. After this function is called, QCborStreamReader will be indicating
+ an error parsing.
+
+ Call addData() to add more data to be parsed.
+
+ \sa reset(), setDevice()
+ */
+void QCborStreamReader::clear()
+{
+ setDevice(nullptr);
+}
+
+/*!
+ Resets the source back to the beginning and clears the decoder state. If the
+ source data was a QByteArray, QCborStreamReader will restart from the
+ beginning of the array.
+
+ If the source data is a QIODevice, this function will call
+ QIODevice::reset(), which will seek to byte position 0. If the CBOR stream
+ is not found at the beginning of the device (e.g., beginning of a file),
+ then this function will likely do the wrong thing. Instead, position the
+ QIODevice to the right offset and call setDevice().
+
+ \sa clear(), setDevice()
+ */
+void QCborStreamReader::reset()
+{
+ if (d->device)
+ d->device->reset();
+ d->lastError = {};
+ d->initDecoder();
+ preparse();
+}
+
+/*!
+ Returns the last error in decoding the stream, if any. If no error
+ was encountered, this returns an QCborError::NoError.
+
+ \sa isValid()
+ */
+QCborError QCborStreamReader::lastError()
+{
+ return d->lastError;
+}
+
+/*!
+ Returns the offset in the input stream of the item currently being decoded.
+ The current offset is the number of decoded bytes so far only if the source
+ data is a QByteArray or it is a QIODevice that was positioned at its
+ beginning when decoding started.
+
+ \sa reset(), clear(), device()
+ */
+qint64 QCborStreamReader::currentOffset() const
+{
+ return (d->device ? d->device->pos() : 0) + d->bufferStart;
+}
+
+/*!
+ Returns the number of containers that this stream has entered with
+ enterContainer() but not yet left.
+
+ \sa enterContainer(), leaveContainer()
+ */
+int QCborStreamReader::containerDepth() const
+{
+ return d->containerStack.size();
+}
+
+/*!
+ Returns either QCborStreamReader::Array or QCborStreamReader::Map,
+ indicating whether the container that contains the current item was an array
+ or map, respectively. If we're currently parsing the root element, this
+ function returns QCborStreamReader::Invalid.
+
+ \sa containerDepth(), enterContainer()
+ */
+QCborStreamReader::Type QCborStreamReader::parentContainerType() const
+{
+ if (d->containerStack.isEmpty())
+ return Invalid;
+ return Type(cbor_value_get_type(&qAsConst(d->containerStack).top()));
+}
+
+/*!
+ Returns true if there are more items to be decoded in the current container
+ or false of we've reached its end. If we're parsing the root element,
+ hasNext() returning false indicates the parsing is complete; otherwise, if
+ the container depth is non-zero, then the outer code needs to call
+ leaveContainer().
+
+ \sa parentContainerType(), containerDepth(), leaveContainer()
+ */
+bool QCborStreamReader::hasNext() const noexcept
+{
+ return cbor_value_is_valid(&d->currentElement) &&
+ !cbor_value_at_end(&d->currentElement);
+}
+
+/*!
+ Advance the CBOR stream decoding one element. You should usually call this
+ function when parsing fixed-width basic elements (that is, integers, simple
+ values, tags and floating point values). But this function can be called
+ when the current item is a string, array or map too and it will skip over
+ that entire element, including all contained elements.
+
+ This function returns true if advancing was successful, false otherwise. It
+ may fail if the stream is corrupt, incomplete or if the nesting level of
+ arrays and maps exceeds \a maxRecursion. Calling this function when
+ hasNext() has returned false is also an error. If this function returns
+ false, lastError() will return the error code detailing what the failure
+ was.
+
+ \sa lastError(), isValid(), hasNext()
+ */
+bool QCborStreamReader::next(int maxRecursion)
+{
+ if (lastError() != QCborError::NoError)
+ return false;
+
+ if (!hasNext()) {
+ d->handleError(CborErrorAdvancePastEOF);
+ } else if (maxRecursion < 0) {
+ d->handleError(CborErrorNestingTooDeep);
+ } else if (isContainer()) {
+ // iterate over each element
+ enterContainer();
+ while (lastError() == QCborError::NoError && hasNext())
+ next(maxRecursion - 1);
+ if (lastError() == QCborError::NoError)
+ leaveContainer();
+ } else if (isString() || isByteArray()) {
+ auto r = _readByteArray_helper();
+ while (r.status == Ok) {
+ if (isString() && !QUtf8::isValidUtf8(r.data, r.data.size()).isValidUtf8) {
+ d->handleError(CborErrorInvalidUtf8TextString);
+ break;
+ }
+ r = _readByteArray_helper();
+ }
+ } else {
+ // fixed types
+ CborError err = cbor_value_advance_fixed(&d->currentElement);
+ if (err)
+ d->handleError(err);
+ }
+
+ preparse();
+ return d->lastError == QCborError::NoError;
+}
+
+/*!
+ Returns true if the length of the current array, map, byte array or string
+ is known (explicit in the CBOR stream), false otherwise. This function
+ should only be called if the element is one of those.
+
+ If the length is known, it may be obtained by calling length().
+
+ If the length of a map or an array is not known, it is implied by the number
+ of elements present in the stream. QCborStreamReader has no API to calculate
+ the length in that condition.
+
+ Strings and byte arrays may also have indeterminate length (that is, they
+ may be transmitted in multiple chunks). Those cannot currently be created
+ with QCborStreamWriter, but they could be with other encoders, so
+ QCborStreamReader supports them.
+
+ \sa length(), QCborStreamWriter::startArray(), QCborStreamWriter::startMap()
+ */
+bool QCborStreamReader::isLengthKnown() const noexcept
+{
+ return cbor_value_is_length_known(&d->currentElement);
+}
+
+/*!
+ Returns the length of the string or byte array, or the number of items in an
+ array or the number, of item pairs in a map, if known. This function must
+ not be called if the length is unknown (that is, if isLengthKnown() returned
+ false). It is an error to do that and it will cause QCborStreamReader to
+ stop parsing the input stream.
+
+ \sa isLengthKnown(), QCborStreamWriter::startArray(), QCborStreamWriter::startMap()
+ */
+quint64 QCborStreamReader::length() const
+{
+ CborError err;
+ switch (type()) {
+ case String:
+ case ByteArray:
+ case Map:
+ case Array:
+ if (isLengthKnown())
+ return value64;
+ err = CborErrorUnknownLength;
+ break;
+
+ default:
+ err = CborErrorIllegalType;
+ break;
+ }
+
+ d->handleError(err);
+ return quint64(-1);
+}
+
+/*!
+ \fn bool QCborStreamReader::enterContainer()
+
+ Enters the array or map that is the current item and prepares for iterating
+ the elements contained in the container. Returns true if entering the
+ container succeeded, false otherwise (usually, a parsing error). Each call
+ to enterContainer() must be paired with a call to leaveContainer().
+
+ This function may only be called if the current item is an array or a map
+ (that is, if isArray(), isMap() or isContainer() is true). Calling it in any
+ other condition is an error.
+
+ \sa leaveContainer(), isContainer(), isArray(), isMap()
+ */
+bool QCborStreamReader::_enterContainer_helper()
+{
+ d->containerStack.push(d->currentElement);
+ CborError err = cbor_value_enter_container(&d->containerStack.top(), &d->currentElement);
+ if (!err) {
+ preparse();
+ return true;
+ }
+ d->handleError(err);
+ return false;
+}
+
+/*!
+ Leaves the array or map whose items were being processed and positions the
+ decoder at the next item after the end of the container. Returns true if
+ leaving the container succeeded, false otherwise (usually, a parsing error).
+ Each call to enterContainer() must be paired with a call to
+ leaveContainer().
+
+ This function may only be called if hasNext() has returned false and
+ containerDepth() is not zero. Calling it in any other condition is an error.
+
+ \sa enterContainer(), parentContainerType(), containerDepth()
+ */
+bool QCborStreamReader::leaveContainer()
+{
+ if (d->containerStack.isEmpty()) {
+ qWarning("QCborStreamReader::leaveContainer: trying to leave top-level element");
+ return false;
+ }
+ if (d->corrupt)
+ return false;
+
+ CborValue container = d->containerStack.pop();
+ CborError err = cbor_value_leave_container(&container, &d->currentElement);
+ d->currentElement = container;
+ if (err) {
+ d->handleError(err);
+ return false;
+ }
+
+ preparse();
+ return true;
+}
+
+/*!
+ \fn bool QCborStreamReader::toBool() const
+
+ Returns the boolean value of the current element.
+
+ This function does not perform any type conversions, including from integer.
+ Therefore, it may only be called if isTrue(), isFalse() or isBool() returned
+ true; calling it in any other condition is an error.
+
+ \sa isBool(), isTrue(), isFalse(), toInteger()
+ */
+
+/*!
+ \fn QCborTag QCborStreamReader::toTag() const
+
+ Returns the tag value of the current element.
+
+ This function does not perform any type conversions, including from integer.
+ Therefore, it may only be called if isTag() is true; calling it in any other
+ condition is an error.
+
+ Tags are 64-bit numbers attached to generic CBOR types that give them
+ further meaning. For a list of known tags, see the \l QCborKnownTags
+ enumeration.
+
+ \sa isTag(), toInteger(), QCborKnownTags
+ */
+
+/*!
+ \fn quint64 QCborStreamReader::toUnsignedInteger() const
+
+ Returns the unsigned integer value of the current element.
+
+ This function does not perform any type conversions, including from boolean
+ or CBOR tag. Therefore, it may only be called if isUnsignedInteger() is
+ true; calling it in any other condition is an error.
+
+ This function may be used to obtain numbers beyond the range of the return
+ type of toInteger().
+
+ \sa type(), toInteger(), isUnsignedInteger(), isNegativeInteger()
+ */
+
+/*!
+ \fn QCborNegativeValue QCborStreamReader::toNegativeInteger() const
+
+ Returns the negative integer value of the current element.
+ QCborNegativeValue is a 64-bit unsigned integer containing the absolute
+ value of the negative number that was stored in the CBOR stream.
+ Additionally, QCborNegativeValue(0) represents the number -2\sup{64}.
+
+ This function does not perform any type conversions, including from boolean
+ or CBOR tag. Therefore, it may only be called if isNegativeInteger() is
+ true; calling it in any other condition is an error.
+
+ This function may be used to obtain numbers beyond the range of the return
+ type of toInteger(). However, use of negative numbers smaller than -2\sup{63}
+ is extremely discouraged.
+
+ \sa type(), toInteger(), isNegativeInteger(), isUnsignedInteger()
+ */
+
+/*!
+ \fn qint64 QCborStreamReader::toInteger() const
+
+ Returns the integer value of the current element, be it negative, positive
+ or zero. If the value is larger than 2\sup{63} - 1 or smaller than
+ -2\sup{63}, the returned value will overflow and will have an incorrect
+ sign. If handling those values is required, use toUnsignedInteger() or
+ toNegativeInteger() instead.
+
+ This function does not perform any type conversions, including from boolean
+ or CBOR tag. Therefore, it may only be called if isInteger() is true;
+ calling it in any other condition is an error.
+
+ \sa isInteger(), toUnsignedInteger(), toNegativeInteger()
+ */
+
+/*!
+ \fn QCborSimpleType QCborStreamReader::toSimpleType() const
+
+ Returns value of the current simple type.
+
+ This function does not perform any type conversions, including from integer.
+ Therefore, it may only be called if isSimpleType() is true; calling it in
+ any other condition is an error.
+
+ \sa isSimpleType(), isTrue(), isFalse(), isBool(), isNull(), isUndefined()
+ */
+
+/*!
+ \fn qfloat16 QCborStreamReader::toFloat16() const
+
+ Returns the 16-bit half-precision floating point value of the current element.
+
+ This function does not perform any type conversions, including from other
+ floating point types or from integer values. Therefore, it may only be
+ called if isFloat16() is true; calling it in any other condition is an
+ error.
+
+ \sa isFloat16(), toFloat(), toDouble()
+ */
+
+/*!
+ \fn float QCborStreamReader::toFloat() const
+
+ Returns the 32-bit single-precision floating point value of the current
+ element.
+
+ This function does not perform any type conversions, including from other
+ floating point types or from integer values. Therefore, it may only be
+ called if isFloat() is true; calling it in any other condition is an error.
+
+ \sa isFloat(), toFloat16(), toDouble()
+ */
+
+/*!
+ \fn double QCborStreamReader::toDouble() const
+
+ Returns the 64-bit double-precision floating point value of the current
+ element.
+
+ This function does not perform any type conversions, including from other
+ floating point types or from integer values. Therefore, it may only be
+ called if isDouble() is true; calling it in any other condition is an error.
+
+ \sa isDouble(), toFloat16(), toFloat()
+ */
+
+/*!
+ \fn QCborStreamReader::StringResult<QString> QCborStreamReader::readString()
+
+ Decodes one string chunk from the CBOR string and returns it. This function
+ is used for both regular and chunked string contents, so the caller must
+ always loop around calling this function, even if isLengthKnown() has
+ is true. The typical use of this function is as follows:
+
+ \code
+ QString decodeString(QCborStreamReader &reader)
+ {
+ QString result;
+ auto r = reader.readString();
+ while (r.code == QCborStreamReader::Ok) {
+ result += r.data;
+ r = reader.readString();
+ }
+
+ if (r.code == QCborStreamReader::Error) {
+ // handle error condition
+ result.clear();
+ }
+ return result;
+ }
+ \endcode
+
+ This function does not perform any type conversions, including from integers
+ or from byte arrays. Therefore, it may only be called if isString() returned
+ true; calling it in any other condition is an error.
+
+ \sa readByteArray(), isString(), readStringChunk()
+ */
+QCborStreamReader::StringResult<QString> QCborStreamReader::_readString_helper()
+{
+ auto r = _readByteArray_helper();
+ QCborStreamReader::StringResult<QString> result;
+ result.status = r.status;
+
+ if (r.status == Ok) {
+ QTextCodec::ConverterState cs;
+ result.data = QUtf8::convertToUnicode(r.data, r.data.size(), &cs);
+ if (cs.invalidChars == 0 && cs.remainingChars == 0)
+ return result;
+
+ d->handleError(CborErrorInvalidUtf8TextString);
+ result.data.clear();
+ result.status = Error;
+ return result;
+ }
+ return result;
+}
+
+/*!
+ \fn QCborStreamReader::StringResult<QString> QCborStreamReader::readByteArray()
+
+ Decodes one byte array chunk from the CBOR string and returns it. This
+ function is used for both regular and chunked contents, so the caller must
+ always loop around calling this function, even if isLengthKnown() has
+ is true. The typical use of this function is as follows:
+
+ \code
+ QBytearray decodeBytearray(QCborStreamReader &reader)
+ {
+ QBytearray result;
+ auto r = reader.readBytearray();
+ while (r.code == QCborStreamReader::Ok) {
+ result += r.data;
+ r = reader.readByteArray();
+ }
+
+ if (r.code == QCborStreamReader::Error) {
+ // handle error condition
+ result.clear();
+ }
+ return result;
+ }
+ \endcode
+
+ This function does not perform any type conversions, including from integers
+ or from strings. Therefore, it may only be called if isByteArray() is true;
+ calling it in any other condition is an error.
+
+ \sa readString(), isByteArray(), readStringChunk()
+ */
+QCborStreamReader::StringResult<QByteArray> QCborStreamReader::_readByteArray_helper()
+{
+ QCborStreamReader::StringResult<QByteArray> result;
+ result.status = Error;
+ qsizetype len = _currentStringChunkSize();
+ if (len < 0)
+ return result;
+
+ result.data.resize(len);
+ auto r = readStringChunk(result.data.data(), len);
+ Q_ASSERT(r.status != Ok || r.data == len);
+ result.status = r.status;
+ return result;
+}
+
+/*!
+ \fn qsizetype QCborStreamReader::currentStringChunkSize() const
+
+ Returns the size of the current text or byte string chunk. If the CBOR
+ stream contains a non-chunked string (that is, if isLengthKnown() returns
+ \c true), this function returns the size of the entire string, the same as
+ length().
+
+ This function is useful to pre-allocate the buffer whose pointer can be passed
+ to readStringChunk() later.
+
+ \sa readString(), readByteArray(), readStringChunk()
+ */
+qsizetype QCborStreamReader::_currentStringChunkSize() const
+{
+ if (!d->ensureStringIteration())
+ return -1;
+
+ size_t len;
+ CborError err = cbor_value_get_string_chunk_size(&d->currentElement, &len);
+ if (err == CborErrorNoMoreStringChunks)
+ return 0; // not a real error
+ else if (err)
+ d->handleError(err);
+ else if (qsizetype(len) < 0)
+ d->handleError(CborErrorDataTooLarge);
+ else
+ return qsizetype(len);
+ return -1;
+}
+
+/*!
+ Reads the current string chunk into the buffer pointed to by \a ptr, whose
+ size is \a maxlen. This function returns a \l StringResult object, with the
+ number of bytes copied into \a ptr saved in the \c \l StringResult::data
+ member. The \c \l StringResult::status member indicates whether there was
+ an error reading the string, whether data was copied or whether this was
+ the last chunk.
+
+ This function can be called for both \l String and \l ByteArray types.
+ For the latter, this function will read the same data that readByteArray()
+ would have returned. For strings, it returns the UTF-8 equivalent of the \l
+ QString that would have been returned.
+
+ This function is usually used alongside currentStringChunkSize() in a loop.
+ For example:
+
+ \code
+ QCborStreamReader<qsizetype> result;
+ do {
+ qsizetype size = reader.currentStringChunkSize();
+ qsizetype oldsize = buffer.size();
+ buffer.resize(oldsize + size);
+ result = reader.readStringChunk(buffer.data() + oldsize, size);
+ } while (result.status() == QCborStreamReader::Ok);
+ \endcode
+
+ Unlike readByteArray() and readString(), this function is not limited by
+ implementation limits of QByteArray and QString.
+
+ \note This function does not perform verification that the UTF-8 contents
+ are properly formatted. That means this function does not produce the
+ QCborError::InvalidUtf8String error, even when readString() does.
+
+ \sa currentStringChunkSize(), readString(), readByteArray(),
+ isString(), isByteArray()
+ */
+QCborStreamReader::StringResult<qsizetype>
+QCborStreamReader::readStringChunk(char *ptr, qsizetype maxlen)
+{
+ CborError err;
+ size_t len;
+ const void *content = nullptr;
+ QCborStreamReader::StringResult<qsizetype> result;
+ result.data = 0;
+ result.status = Error;
+
+ d->lastError = {};
+ if (!d->ensureStringIteration())
+ return result;
+
+#if 1
+ // Using internal TinyCBOR API!
+ err = _cbor_value_get_string_chunk(&d->currentElement, &content, &len, &d->currentElement);
+#else
+ // the above is effectively the same as:
+ if (cbor_value_is_byte_string(&currentElement))
+ err = cbor_value_get_byte_string_chunk(&d->currentElement, reinterpret_cast<const uint8_t **>(&content),
+ &len, &d->currentElement);
+ else
+ err = cbor_value_get_text_string_chunk(&d->currentElement, reinterpret_cast<const char **>(&content),
+ &len, &d->currentElement);
+#endif
+
+ // Range check: using implementation-defined behavior in converting an
+ // unsigned value out of range of the destination signed type (same as
+ // "len > size_t(std::numeric_limits<qsizetype>::max())", but generates
+ // better code with ICC and MSVC).
+ if (!err && qsizetype(len) < 0)
+ err = CborErrorDataTooLarge;
+
+ if (err) {
+ if (err == CborErrorNoMoreStringChunks) {
+ d->preread();
+ err = cbor_value_finish_string_iteration(&d->currentElement);
+ result.status = EndOfString;
+ }
+ if (err)
+ d->handleError(err);
+ else
+ preparse();
+ return result;
+ }
+
+ // Read the chunk into the user's buffer.
+ qint64 actuallyRead;
+ qptrdiff offset = qptrdiff(content);
+ qsizetype toRead = qsizetype(len);
+ qsizetype left = toRead - maxlen;
+ if (left < 0)
+ left = 0; // buffer bigger than string
+ else
+ toRead = maxlen; // buffer smaller than string
+
+ if (d->device) {
+ // This first skip can't fail because we've already read this many bytes.
+ d->device->skip(d->bufferStart + qptrdiff(content));
+ actuallyRead = d->device->read(ptr, toRead);
+
+ if (actuallyRead != toRead) {
+ actuallyRead = -1;
+ } else if (left) {
+ qint64 skipped = d->device->skip(left);
+ if (skipped != left)
+ actuallyRead = -1;
+ }
+
+ if (actuallyRead < 0) {
+ d->handleError(CborErrorIO);
+ return result;
+ }
+
+ d->updateBufferAfterString(offset, len);
+ } else {
+ actuallyRead = toRead;
+ memcpy(ptr, d->buffer.constData() + d->bufferStart + offset, toRead);
+ d->bufferStart += QByteArray::size_type(offset + len);
+ }
+
+ d->preread();
+ result.data = actuallyRead;
+ result.status = Ok;
+ return result;
+}
+
+QT_END_NAMESPACE
+
+#include "moc_qcborcommon.cpp"
+#include "moc_qcborstream.cpp"
diff --git a/src/corelib/serialization/qcborstream.h b/src/corelib/serialization/qcborstream.h
new file mode 100644
index 0000000000..3b13a309ab
--- /dev/null
+++ b/src/corelib/serialization/qcborstream.h
@@ -0,0 +1,267 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QCBORSTREAM_H
+#define QCBORSTREAM_H
+
+#include <QtCore/qbytearray.h>
+#include <QtCore/qcborcommon.h>
+#include <QtCore/qfloat16.h>
+#include <QtCore/qscopedpointer.h>
+#include <QtCore/qstring.h>
+#include <QtCore/qstringview.h>
+
+// See qcborcommon.h for why we check
+#if defined(QT_X11_DEFINES_FOUND)
+# undef True
+# undef False
+#endif
+
+QT_BEGIN_NAMESPACE
+
+class QIODevice;
+
+enum class QCborNegativeInteger : quint64 {};
+
+class QCborStreamWriterPrivate;
+class Q_CORE_EXPORT QCborStreamWriter
+{
+public:
+ explicit QCborStreamWriter(QIODevice *device);
+ explicit QCborStreamWriter(QByteArray *data);
+ ~QCborStreamWriter();
+ Q_DISABLE_COPY(QCborStreamWriter)
+
+ void setDevice(QIODevice *device);
+ QIODevice *device() const;
+
+ void append(quint64 u);
+ void append(qint64 i);
+ void append(QCborNegativeInteger n);
+ void append(const QByteArray &ba) { appendByteString(ba.constData(), ba.size()); }
+ void append(QLatin1String str);
+ void append(QStringView str);
+ void append(QCborTag tag);
+ void append(QCborKnownTags tag) { append(QCborTag(tag)); }
+ void append(QCborSimpleType st);
+ void append(std::nullptr_t) { append(QCborSimpleType::Null); }
+ void append(qfloat16 f);
+ void append(float f);
+ void append(double d);
+
+ void appendByteString(const char *data, qsizetype len);
+ void appendTextString(const char *utf8, qsizetype len);
+
+ // convenience
+ void append(bool b) { append(b ? QCborSimpleType::True : QCborSimpleType::False); }
+ void appendNull() { append(QCborSimpleType::Null); }
+ void appendUndefined() { append(QCborSimpleType::Undefined); }
+
+#ifndef Q_QDOC
+ // overloads to make normal code not complain
+ void append(int i) { append(qint64(i)); }
+ void append(uint u) { append(quint64(u)); }
+#endif
+#ifndef QT_NO_CAST_FROM_ASCII
+ void append(const char *str, qsizetype size = -1)
+ { appendTextString(str, (str && size == -1) ? int(strlen(str)) : size); }
+#endif
+
+ void startArray();
+ void startArray(quint64 count);
+ bool endArray();
+ void startMap();
+ void startMap(quint64 count);
+ bool endMap();
+
+ // no API for encoding chunked strings
+
+private:
+ QScopedPointer<QCborStreamWriterPrivate> d;
+};
+
+class QCborStreamReaderPrivate;
+class Q_CORE_EXPORT QCborStreamReader
+{
+ Q_GADGET
+public:
+ enum Type : quint8 {
+ UnsignedInteger = 0x00,
+ NegativeInteger = 0x20,
+ ByteString = 0x40,
+ ByteArray = ByteString,
+ TextString = 0x60,
+ String = TextString,
+ Array = 0x80,
+ Map = 0xa0,
+ Tag = 0xc0,
+ SimpleType = 0xe0,
+ HalfFloat = 0xf9,
+ Float16 = HalfFloat,
+ Float = 0xfa,
+ Double = 0xfb,
+
+ Invalid = 0xff
+ };
+ Q_ENUM(Type)
+
+ enum StringResultCode {
+ EndOfString = 0,
+ Ok = 1,
+ Error = -1
+ };
+ template <typename Container> struct StringResult {
+ Container data;
+ StringResultCode status = Error;
+ };
+ Q_ENUM(StringResultCode)
+
+ QCborStreamReader();
+ QCborStreamReader(const char *data, qsizetype len);
+ QCborStreamReader(const quint8 *data, qsizetype len);
+ explicit QCborStreamReader(const QByteArray &data);
+ explicit QCborStreamReader(QIODevice *device);
+ ~QCborStreamReader();
+ Q_DISABLE_COPY(QCborStreamReader)
+
+ void setDevice(QIODevice *device);
+ QIODevice *device() const;
+ void addData(const QByteArray &data);
+ void addData(const char *data, qsizetype len);
+ void addData(const quint8 *data, qsizetype len)
+ { addData(reinterpret_cast<const char *>(data), len); }
+ void reparse();
+ void clear();
+ void reset();
+
+ QCborError lastError();
+
+ qint64 currentOffset() const;
+
+ bool isValid() const { return !isInvalid(); }
+
+ int containerDepth() const;
+ QCborStreamReader::Type parentContainerType() const;
+ bool hasNext() const noexcept Q_DECL_PURE_FUNCTION;
+ bool next(int maxRecursion = 10000);
+
+ Type type() const { return QCborStreamReader::Type(type_); }
+ bool isUnsignedInteger() const { return type() == UnsignedInteger; }
+ bool isNegativeInteger() const { return type() == NegativeInteger; }
+ bool isInteger() const { return quint8(type()) <= quint8(NegativeInteger); }
+ bool isByteArray() const { return type() == ByteArray; }
+ bool isString() const { return type() == String; }
+ bool isArray() const { return type() == Array; }
+ bool isMap() const { return type() == Map; }
+ bool isTag() const { return type() == Tag; }
+ bool isSimpleType() const { return type() == SimpleType; }
+ bool isFloat16() const { return type() == Float16; }
+ bool isFloat() const { return type() == Float; }
+ bool isDouble() const { return type() == Double; }
+ bool isInvalid() const { return type() == Invalid; }
+
+ bool isSimpleType(QCborSimpleType st) const { return isSimpleType() && toSimpleType() == st; }
+ bool isFalse() const { return isSimpleType(QCborSimpleType::False); }
+ bool isTrue() const { return isSimpleType(QCborSimpleType::True); }
+ bool isBool() const { return isFalse() || isTrue(); }
+ bool isNull() const { return isSimpleType(QCborSimpleType::Null); }
+ bool isUndefined() const { return isSimpleType(QCborSimpleType::Undefined); }
+
+ bool isLengthKnown() const noexcept Q_DECL_PURE_FUNCTION;
+ quint64 length() const;
+
+ bool isContainer() const { return isMap() || isArray(); }
+ bool enterContainer() { Q_ASSERT(isContainer()); return _enterContainer_helper(); }
+ bool leaveContainer();
+
+ StringResult<QString> readString() { Q_ASSERT(isString()); return _readString_helper(); }
+ StringResult<QByteArray> readByteArray(){ Q_ASSERT(isByteArray()); return _readByteArray_helper(); }
+ qsizetype currentStringChunkSize() const{ Q_ASSERT(isString() || isByteArray()); return _currentStringChunkSize(); }
+ StringResult<qsizetype> readStringChunk(char *ptr, qsizetype maxlen);
+
+ bool toBool() const { Q_ASSERT(isBool()); return value64 - int(QCborSimpleType::False); }
+ QCborTag toTag() const { Q_ASSERT(isTag()); return QCborTag(value64); }
+ quint64 toUnsignedInteger() const { Q_ASSERT(isUnsignedInteger()); return value64; }
+ QCborNegativeInteger toNegativeInteger() const { Q_ASSERT(isNegativeInteger()); return QCborNegativeInteger(value64 + 1); }
+ QCborSimpleType toSimpleType() const{ Q_ASSERT(isSimpleType()); return QCborSimpleType(value64); }
+ qfloat16 toFloat16() const { Q_ASSERT(isFloat16()); return _toFloatingPoint<qfloat16>(); }
+ float toFloat() const { Q_ASSERT(isFloat()); return _toFloatingPoint<float>(); }
+ double toDouble() const { Q_ASSERT(isDouble()); return _toFloatingPoint<double>(); }
+
+ qint64 toInteger() const
+ {
+ Q_ASSERT(isInteger());
+ qint64 v = qint64(value64);
+ if (isNegativeInteger())
+ return -v - 1;
+ return v;
+ }
+
+private:
+ void preparse();
+ bool _enterContainer_helper();
+ StringResult<QString> _readString_helper();
+ StringResult<QByteArray> _readByteArray_helper();
+ qsizetype _currentStringChunkSize() const;
+
+ template <typename FP> FP _toFloatingPoint() const noexcept
+ {
+ using UInt = typename QIntegerForSizeof<FP>::Unsigned;
+ UInt u = UInt(value64);
+ FP f;
+ memcpy(static_cast<void *>(&f), &u, sizeof(f));
+ return f;
+ }
+
+ friend QCborStreamReaderPrivate;
+ friend class QCborContainerPrivate;
+ quint64 value64;
+ QScopedPointer<QCborStreamReaderPrivate> d;
+ quint8 type_;
+ quint8 reserved[3] = {};
+};
+
+QT_END_NAMESPACE
+
+#if defined(QT_X11_DEFINES_FOUND)
+# define True 1
+# define False 0
+#endif
+
+#endif // QCBORSTREAM_H
diff --git a/src/corelib/serialization/qcborvalue.cpp b/src/corelib/serialization/qcborvalue.cpp
new file mode 100644
index 0000000000..0ec84c12d1
--- /dev/null
+++ b/src/corelib/serialization/qcborvalue.cpp
@@ -0,0 +1,2645 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qcborvalue.h"
+#include "qcborvalue_p.h"
+
+#include "qcborarray.h"
+#include "qcbormap.h"
+#include "qcborstream.h"
+
+#include <qendian.h>
+#include <qlocale.h>
+#include <private/qnumeric_p.h>
+#include <qscopedvaluerollback.h>
+#include <private/qsimd_p.h>
+#include <qstack.h>
+
+#include <new>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QCborValue
+ \inmodule QtCore
+ \ingroup cbor
+ \reentrant
+ \since 5.12
+
+ \brief The QCborValue class encapsulates a value in CBOR.
+
+ This class can be used to hold one of the many types available in CBOR.
+ CBOR is the Concise Binary Object Representation, a very compact form of
+ binary data encoding that is a superset of JSON. It was created by the IETF
+ Constrained RESTful Environments (CoRE) WG, which has used it in many
+ new RFCs. It is meant to be used alongside the
+ \l{https://tools.ietf.org/html/rfc7252}{CoAP protocol}.
+
+ CBOR has three groups of built-in types:
+
+ \list
+ \li Basic types: integers, floating point (double), boolean, null, etc.
+ \li String-like types: strings and byte arrays
+ \li Containers: arrays and maps
+ \endlist
+
+ Additionally, CBOR supports a form of type extensibility by associating a
+ "tag" to one of the above types to convey more information. For example, a
+ UUID is represented by a tag and a byte array containing the 16 bytes of
+ the UUID content. QCborValue supports creating and decoding several of those
+ extended types directly with Qt classes (like QUuid).
+
+ For the complete list, see \l QCborValue::Type. The type of a QCborValue can
+ be queried using type() or one of the "isXxxx" functions.
+
+ \section1 Extended types and tagged values
+
+ A tagged value is a normal QCborValue that is paired with a number that
+ is its tag. See \l QCborKnownTags for more information on what tags are in
+ the API as well as the full, official list. Such combinations form extended
+ types.
+
+ QCborValue has support for certain extended types in the API, like URL
+ (with \l QUrl) and UUID (with \l QUuid). Other extended types not supported
+ in the API are represented by a QCborValue of \l {Type}{Tag} type. The tag
+ can later be retrieved by tag() and the tagged value using taggedValue().
+
+ In order to support future compatibility, QCborValues containing extended
+ Qt types compare equal to the tag type of the same contents. In other
+ words, the following expression is true:
+
+ \code
+ QCborValue(uuid) == QCborValue(QCborKnownTags::Uuid, uuid.toRfc4122());
+ \endcode
+
+ \section1 Undefined and null values
+
+ QCborValue can contain a value of "null", which is not of any specific type.
+ It resembles the C++ \c {std::nullptr_t} type, whose only possible value is
+ \c nullptr. QCborValue has a constructor taking such a type and creates a
+ null QCborValue.
+
+ Null values are used to indicate that an optional value is not present. In
+ that aspect, it is similar to the C++ Standard Library type \c
+ {std::optional} when that is disengaged. Unlike the C++ type, CBOR nulls
+ are simply of type "Null" and it is not possible to determine what concrete
+ type it is replacing.
+
+ QCborValue can also be of the undefined type, which represents a value of
+ "undefined". In fact, that is what the QCborValue default constructor
+ creates.
+
+ Undefined values are different from null values. While nulls are used to
+ indicate an optional value that is not provided, Undefined is usually
+ used to indicate that an expected value could not be provided, usually due
+ to an error or a precondition that could not be satisfied.
+
+ Such values are completely valid and may appear in CBOR streams, unlike
+ JSON content and QJsonValue's undefined bit. But like QJsonValue's
+ Undefined, it is returned by QCborArray::value() when out of range or
+ QCborMap::operator[] when the key is not found in the container. It is not
+ possible to tell such a case apart from the value of Undefined, so if that
+ is required, check the QCborArray size and use the QCborMap iterator API.
+
+ \section1 Simple types
+
+ CBOR supports additional simple types that, like Null and Undefined, carry
+ no other value. They are called interchangeably "Simple Types" and "Simple
+ Values". CBOR encodes booleans as two distinct types (one for \c true and
+ one for \c false), but QCborValue has a convenience API for them.
+
+ There are currently no other defined CBOR simple types. QCborValue supports
+ them simply by their number with API like isSimpleType() and
+ toSimpleType(), available for compatibility with future specifications
+ before the Qt API can be updated. Their use before such a specification is
+ discouraged, as other CBOR implementations may not support them fully.
+
+ \section1 CBOR support
+
+ QCborValue supports all CBOR features required to create canonical and
+ strict streams. It implements almost all of the features specified in \l
+ {https://tools.ietf.org/html/rfc7049}{RFC 7049}.
+
+ The following table lists the CBOR features that QCborValue supports.
+
+ \table
+ \header \li Feature \li Support
+ \row \li Unsigned numbers \li Yes (\l qint64 range)
+ \row \li Negative numbers \li Yes (\l qint64 range)
+ \row \li Byte strings \li Yes
+ \row \li Text strings \li Yes
+ \row \li Chunked strings \li See below
+ \row \li Tags \li Yes (arbitrary)
+ \row \li Booleans \li Yes
+ \row \li Null \li Yes
+ \row \li Undefined \li Yes
+ \row \li Arbitrary simple values \li Yes
+ \row \li Half-precision float (16-bit) \li Yes
+ \row \li Single-precision float (32-bit) \li Yes
+ \row \li Double-precision float (64-bit) \li Yes
+ \row \li Infinities and NaN floating point \li Yes
+ \row \li Determinate-length arrays and maps \li Yes
+ \row \li Indeterminate-length arrays and maps \li Yes
+ \row \li Map key types other than strings and integers \li Yes (arbitrary)
+ \endtable
+
+ Integers in QCborValue are limited to the range of the \l qint64 type. That
+ is, from -9,223,372,036,854,775,808 (-2\sup{63}) to
+ 9,223,372,036,854,775,807 (2\sup{63} - 1). CBOR itself can represent integer
+ values outside of this range, which QCborValue does not support. When
+ decoding a stream using fromCbor() containing one of those values,
+ QCborValue will convert automatically to \l {Type}{Double}, but that may
+ lose up to 11 bits of precision.
+
+ fromCbor() is able to decode chunked strings, but will always merge the
+ chunks together into a single QCborValue. For that reason, it always writes
+ non-chunked strings when using toCbor() (which is required by the Canonical
+ format anyway).
+
+ QCborValue will always convert half- and single-precision floating point
+ values in the CBOR stream to double-precision. The toCbor() function can
+ take a parameter indicating to recreate them.
+
+ \section1 QCborValueRef
+
+ QCborValueRef is a helper class for QCborArray and QCborMap. It is the type
+ you get when using one of the mutating APIs in those classes. Unlike
+ QCborValue, new values can be assigned to that class. When that is done, the
+ array or map it refers to will be modified with the new value. In all other
+ aspects, its API is identical to QCborValue.
+
+ \sa QCborArray, QCborMap, QCborStreamReader, QCborStreamWriter
+ QJsonValue, QJsonDocument
+ */
+
+/*!
+ \class QCborParserError
+ \inmodule QtCore
+ \ingroup cbor
+ \reentrant
+ \since 5.12
+
+ \brief The QCborParserError is used by QCborValue to report a parsing error.
+
+ This class is used by \l {QCborValue::fromCbor(const QByteArray &ba,
+ QCborParserError *error)} to report a parser error and the byte offset
+ where the error was detected.
+
+ \sa QCborValue, QCborError
+ */
+
+/*!
+ \variable qint64 QCborParserError::offset
+
+ This field contains the offset from the beginning of the data where the
+ error was detected. The offset should point to the beginning of the item
+ that contained the error, even if the error itself was elsewhere (for
+ example, for UTF-8 decoding issues).
+
+ \sa QCborValue::fromCbor()
+ */
+
+/*!
+ \variable QCborError QCborParserError::error
+
+ This field contains the error code that indicates what decoding problem was
+ found.
+
+ \sa QCborValue::fromCbor()
+ */
+
+/*!
+ \fn QString QCborParserError::errorString() const
+
+ Returns a string representation of the error code. This string is not
+ translated.
+
+ \sa QCborError::toString(), QCborValue::fromCbor()
+ */
+
+/*!
+ \enum QCborValue::EncodingOption
+
+ This enum is used in the options argument to toCbor(), modifying the
+ behavior of the encoder.
+
+ \omitvalue SortKeysInMaps
+ \value NoTransformation (Default) Performs no transformations.
+ \value UseFloat Tells the encoder to use IEEE 754 single-precision floating point
+ (that is, \c float) whenever possible.
+ \value UseFloat16 Tells the encoder to use IEEE 754 half-precision floating point
+ (that is, \c qfloat16), whenever possible. Implies \c UseFloat.
+ \value UseIntegers Tells the encoder to use integers whenever a value of type \l
+ {Type}{Double} contains an integer.
+
+ The use of \c UseFloat16 is required to encode the stream in Canonical
+ Format, but is not otherwise necessary.
+
+ \sa toCbor()
+ */
+
+/*!
+ \enum QCborValue::DiagnosticNotationOption
+
+ This enum is used in the option argument to toDiagnosticNotation(), to
+ modify the output format.
+
+ \value Compact Does not use any line-breaks, producing a compact representation.
+ \value LineWrapped Uses line-breaks, one QCborValue per line.
+ \value ExtendedFormat Uses some different options to represent values, not found in
+ RFC 7049. Those options are subject to change.
+
+ Currently, \c ExtendedFormat will change how byte arrays are represented.
+ Without it, they are always hex-encoded and without spaces. With it,
+ QCborValue::toCbor() will either use hex with spaces, base64 or base64url
+ encoding, depending on the context.
+
+ \sa toDiagnosticNotation()
+ */
+
+/*!
+ \enum QCborValue::Type
+
+ This enum represents the QCborValue type. It is returned by the type()
+ function.
+
+ The CBOR built-in types are:
+
+ \value Integer \c qint64: An integer value
+ \value ByteArray \l QByteArray: a byte array ("byte string")
+ \value String \l QString: a Unicode string ("text string")
+ \value Array \l QCborArray: an array of QCborValues
+ \value Map \l QCborMap: an associative container of QCborValues
+ \value SimpleType \l QCborSimpleType: one of several simple types/values
+ \value False \c bool: the simple type for value \c false
+ \value True \c bool: the simple type for value \c true
+ \value Null \c std::nullptr_t: the simple type for the null value
+ \value Undefined (no type) the simple type for the undefined value
+ \value Double \c double: a double-precision floating point
+ \value Invalid Not a valid value, this usually indicates a CBOR decoding error
+
+ Additionally, QCborValue can represent extended types:
+
+ \value Tag An unknown or unrecognized extended type, represented by its
+ tag (a \l QCborTag) and the tagged value (a QCborValue)
+ \value DateTime \l QDateTime: a date and time stamp
+ \value Url \l QUrl: a URL or URI
+ \value RegularExpression \l QRegularExpression: the pattern of a regular expression
+ \value Uuid \l QUuid: a UUID
+
+ \sa type()
+ */
+
+/*!
+ \fn QCborValue::QCborValue()
+
+ Creates a QCborValue of the \l {Type}{Undefined} type.
+
+ CBOR undefined values are used to indicate missing information, usually as
+ a result of a previous operation that did not complete as expected. They
+ are also used by the QCborArray and QCborMap API to indicate the searched
+ item was not found.
+
+ Undefined values are represented by the \l {QCborSimpleType}{Undefined
+ simple type}. Because of that, QCborValues with undefined values will also
+ return true for isSimpleType() and
+ \c{isSimpleType(QCborSimpleType::Undefined)}.
+
+ Undefined values are different from null values.
+
+ QCborValue objects with undefined values are also different from invalid
+ QCborValue objects. The API will not create invalid QCborValues, but they
+ may exist as a result of a parsing error.
+
+ \sa isUndefined(), isNull(), isSimpleType()
+ */
+
+/*!
+ \fn QCborValue::QCborValue(Type t_)
+
+ Creates a QCborValue of type \a t_. The value associated with such a type
+ (if any) will be default constructed.
+
+ \sa type()
+ */
+
+/*!
+ \fn QCborValue::QCborValue(std::nullptr_t)
+
+ Creates a QCborValue of the \l {Type}{Null} type.
+
+ CBOR null values are used to indicate optional values that were not
+ provided. They are distinct from undefined values, in that null values are
+ usually not the result of an earlier error or problem.
+
+ \sa isNull(), isUndefined(), isSimpleType()
+ */
+
+/*!
+ \fn QCborValue::QCborValue(bool b)
+
+ Creates a QCborValue with boolean value \a b. The value can later be
+ retrieved using toBool().
+
+ Internally, CBOR booleans are represented by a pair of types, one for true
+ and one for false. For that reason, boolean QCborValues will return true
+ for isSimpleType() and one of \c{isSimpleType(QCborSimpleType::False)} or
+ \c{isSimpleType(QCborSimpleType::True)}.
+
+ \sa toBool(), isBool(), isTrue(), isFalse(), isSimpleType()
+ */
+
+/*!
+ \fn QCborValue::QCborValue(qint64 i)
+
+ Creates a QCborValue with integer value \a i. The value can later be
+ retrieved using toInteger().
+
+ CBOR integer values are distinct from floating point values. Therefore,
+ QCborValue objects with integers will compare differently to QCborValue
+ objects containing floating-point, even if the values contained in the
+ objects are equivalent.
+
+ \sa toInteger(), isInteger(), isDouble()
+ */
+
+/*!
+ \fn QCborValue::QCborValue(double d)
+
+ Creates a QCborValue with floating point value \a d. The value can later be
+ retrieved using toDouble().
+
+ CBOR floating point values are distinct from integer values. Therefore,
+ QCborValue objects with integers will compare differently to QCborValue
+ objects containing floating-point, even if the values contained in the
+ objects are equivalent.
+
+ \sa toDouble(), isDouble(), isInteger()
+ */
+
+/*!
+ \fn QCborValue::QCborValue(QCborSimpleType st)
+
+ Creates a QCborValue of simple type \a st. The type can later later be retrieved
+ using toSimpleType() as well as isSimpleType(st).
+
+ CBOR simple types are types that do not have any associated value, like
+ C++'s \c{std::nullptr_t} type, whose only possible value is \c nullptr.
+
+ If \a st is \c{QCborSimpleType::Null}, the resulting QCborValue will be of
+ the \l{Type}{Null} type and similarly for \c{QCborSimpleType::Undefined}.
+ If \a st is \c{QCborSimpleType::False} or \c{QCborSimpleType::True}, the
+ created QCborValue will be a boolean containing a value of false or true,
+ respectively.
+
+ This function can be used with simple types not defined in the API. For
+ example, to create a QCborValue with simple type 12, one could write:
+
+ \code
+ QCborValue value(QCborSimpleType(12));
+ \endcode
+
+ Simple types should not be used until a specification for them has been
+ published, since other implementations may not support them properly.
+ Simple type values 24 to 31 are reserved and must not be used.
+
+ isSimpleType(), isNull(), isUndefined(), isTrue(), isFalse()
+ */
+
+/*!
+ \fn QCborValue::QCborValue(QCborKnownTags tag, const QCborValue &taggedValue)
+ \overload
+
+ Creates a QCborValue for the extended type represented by the tag value \a
+ tag, tagging value \a taggedValue. The tag can later be retrieved using
+ tag() and the tagged value using taggedValue().
+
+ \sa isTag(), tag(), taggedValue(), QCborKnownTags
+ */
+
+/*!
+ \fn QCborValue::~QCborValue()
+
+ Disposes of the current QCborValue object and frees any associated resources.
+ */
+
+/*!
+ \fn QCborValue::QCborValue(QCborValue &&other)
+ \overload
+
+ Moves the contents of the \a other CBorValue object into this one and frees
+ the resources of this one.
+ */
+
+/*!
+ \fn QCborValue &&QCborValue::operator=(QCborValue &&other)
+ \overload
+
+ Moves the contents of the \a other CBorValue object into this one and frees
+ the resources of this one. Returns a reference to this object.
+ */
+
+/*!
+ \fn void QCborValue::swap(QCborValue &other)
+
+ Swaps the contents of this QCborValue object and \a other.
+ */
+
+/*!
+ \fn QCborValue::Type QCborValue::type() const
+
+ Returns the type of this QCborValue. The type can also later be retrieved by one
+ of the "isXxx" functions.
+
+ \sa isInteger(), isByteArray(), isString(), isArray(), isMap(),
+ isTag(), isFalse(), isTrue(), isBool(), isNull(), isUndefined, isDouble(),
+ isDateTime(), isUrl(), isRegularExpression(), isUuid()
+ */
+
+/*!
+ \fn bool QCborValue::isInteger() const
+
+ Returns true if this QCborValue is of the integer type. The integer value
+ can be retrieved using toInteger().
+
+ \sa type(), toInteger()
+ */
+
+/*!
+ \fn bool QCborValue::isByteArray() const
+
+ Returns true if this QCborValue is of the byte array type. The byte array
+ value can be retrieved using toByteArray().
+
+ \sa type(), toByteArray()
+ */
+
+/*!
+ \fn bool QCborValue::isString() const
+
+ Returns true if this QCborValue is of the string type. The string value
+ can be retrieved using toString().
+
+ \sa type(), toString()
+ */
+
+/*!
+ \fn bool QCborValue::isArray() const
+
+ Returns true if this QCborValue is of the array type. The array value can
+ be retrieved using toArray().
+
+ \sa type(), toArray()
+ */
+
+/*!
+ \fn bool QCborValue::isMap() const
+
+ Returns true if this QCborValue is of the map type. The map value can be
+ retrieved using toMap().
+
+ \sa type(), toMap()
+ */
+
+/*!
+ \fn bool QCborValue::isTag() const
+
+ Returns true if this QCborValue is of the tag type. The tag value can be
+ retrieved using tag() and the tagged value using taggedValue().
+
+ This function also returns true for extended types that the API
+ recognizes. For code that handles extended types directly before the Qt API
+ is updated to support them, it is possible to recreate the tag + tagged
+ value pair by using taggedValue().
+
+ \sa type(), tag(), taggedValue(), taggedValue()
+ */
+
+/*!
+ \fn bool QCborValue::isFalse() const
+
+ Returns true if this QCborValue is a boolean with false value. This
+ function exists because, internally, CBOR booleans are stored as two
+ separate types, one for true and one for false.
+
+ \sa type(), isBool(), isTrue(), toBool()
+ */
+
+/*!
+ \fn bool QCborValue::isTrue() const
+
+ Returns true if this QCborValue is a boolean with true value. This
+ function exists because, internally, CBOR booleans are stored as two
+ separate types, one for false and one for true.
+
+ \sa type(), isBool(), isFalse(), toBool()
+ */
+
+/*!
+ \fn bool QCborValue::isBool() const
+
+ Returns true if this QCborValue is a boolean. The value can be retrieved
+ using toBool().
+
+ \sa type(), toBool(), isTrue(), isFalse()
+ */
+
+/*!
+ \fn bool QCborValue::isUndefined() const
+
+ Returns true if this QCborValue is of the undefined type.
+
+ CBOR undefined values are used to indicate missing information, usually as
+ a result of a previous operation that did not complete as expected. They
+ are also used by the QCborArray and QCborMap API to indicate the searched
+ item was not found.
+
+ Undefined values are distinct from null values.
+
+ QCborValue objects with undefined values are also different from invalid
+ QCborValue objects. The API will not create invalid QCborValues, but they
+ may exist as a result of a parsing error.
+
+ \sa type(), isNull(), isInvalid()
+ */
+
+/*!
+ \fn bool QCborValue::isNull() const
+
+ Returns true if this QCborValue is of the null type.
+
+ CBOR null values are used to indicate optional values that were not
+ provided. They are distinct from undefined values, in that null values are
+ usually not the result of an earlier error or problem.
+
+ Null values are distinct from undefined values and from invalid QCborValue
+ objects. The API will not create invalid QCborValues, but they may exist as
+ a result of a parsing error.
+
+ \sa type(), isUndefined(), isInvalid()
+ */
+
+/*!
+ \fn bool QCborValue::isDouble() const
+
+ Returns true if this QCborValue is of the floating-point type. The value
+ can be retrieved using toDouble().
+
+ \sa type(), toDouble()
+ */
+
+/*!
+ \fn bool QCborValue::isDateTime() const
+
+ Returns true if this QCborValue is of the date/time type. The value can be
+ retrieved using toDateTime(). Date/times are extended types that use the
+ tag \l{QCborKnownTags}{DateTime}.
+
+ Additionally, when decoding from a CBOR stream, QCborValue will interpret
+ tags of value \l{QCborKnownTags}{UnixTime_t} and convert them to the
+ equivalent date/time.
+
+ \sa type(), toDateTime()
+ */
+
+/*!
+ \fn bool QCborValue::isUrl() const
+
+ Returns true if this QCborValue is of the URL type. The URL value
+ can be retrieved using toUrl().
+
+ \sa type(), toUrl()
+ */
+
+/*!
+ \fn bool QCborValue::isRegularExpression() const
+
+ Returns true if this QCborValue contains a regular expression's pattern.
+ The pattern can be retrieved using toRegularExpression().
+
+ \sa type(), toRegularExpression()
+ */
+
+/*!
+ \fn bool QCborValue::isUuid() const
+
+ Returns true if this QCborValue contains a UUID. The value can be retrieved
+ using toUuid().
+
+ \sa type(), toUuid()
+ */
+
+/*!
+ \fn bool QCborValue::isInvalid() const
+
+ Returns true if this QCborValue is not of any valid type. Invalid
+ QCborValues are distinct from those with undefined values and they usually
+ represent a decoding error.
+
+ \sa isUndefined(), isNull()
+ */
+
+/*!
+ \fn bool QCborValue::isContainer() const
+
+ This convenience function returns true if the QCborValue is either an array
+ or a map.
+
+ \sa isArray(), isMap()
+ */
+
+/*!
+ \fn bool QCborValue::isSimpleType() const
+
+ Returns true if this QCborValue is of one of the CBOR simple types. The
+ type itself can later be retrieved using type(), even for types that don't have an
+ enumeration in the API. They can also be checked with the
+ \l{isSimpleType(QCborSimpleType)} overload.
+
+ \sa QCborSimpleType, isSimpleType(QCborSimpleType), toSimpleType()
+ */
+
+/*!
+ \fn bool QCborValue::isSimpleType(QCborSimpleType st) const
+ \overload
+
+ Returns true if this QCborValue is of a simple type and toSimpleType()
+ would return \a st, false otherwise. This function can be used to check for
+ any CBOR simple type, even those for which there is no enumeration in the
+ API. For example, for the simple type of value 12, you could write:
+
+ \code
+ value.isSimpleType(QCborSimpleType(12));
+ \endcode
+
+ \sa QCborValue::QCborValue(QCborSimpleType), isSimpleType(), isFalse(),
+ isTrue(), isNull, isUndefined(), toSimpleType()
+ */
+
+/*!
+ \fn QCborSimpleType QCborValue::toSimpleType(QCborSimpleType defaultValue) const
+
+ Returns the simple type this QCborValue is of, if it is a simple type. If
+ it is not a simple type, it returns \a defaultValue.
+
+ The following types are simple types and this function will return the
+ listed values:
+
+ \table
+ \row \li QCborValue::False \li QCborSimpleType::False
+ \row \li QCborValue::True \li QCborSimpleType::True
+ \row \li QCborValue::Null \li QCborSimpleType::Null
+ \row \li QCborValue::Undefined \li QCborSimpleType::Undefined
+ \endtable
+
+ \sa type(), isSimpleType(), isBool(), isTrue(), isFalse(), isTrue(),
+ isNull(), isUndefined()
+ */
+
+/*!
+ \fn qint64 QCborValue::toInteger(qint64 defaultValue) const
+
+ Returns the integer value stored in this QCborValue, if it is of the
+ integer type. If it is of the Double type, this function returns the
+ floating point value converted to integer. In any other case, it returns \a
+ defaultValue.
+
+ \sa isInteger(), isDouble(), toDouble()
+ */
+
+/*!
+ \fn bool QCborValue::toBool(bool defaultValue) const
+
+ Returns the boolean value stored in this QCborValue, if it is of a boolean
+ type. Otherwise, it returns \a defaultValue.
+
+ \sa isBool(), isTrue(), isFalse()
+ */
+
+/*!
+ \fn double QCborValue::toDouble(double defaultValue) const
+
+ Returns the floating point value stored in this QCborValue, if it is of the
+ Double type. If it is of the Integer type, this function returns the
+ integer value converted to double. In any other case, it returns \a
+ defaultValue.
+
+ \sa isDouble(), isInteger(), toInteger()
+ */
+
+using namespace QtCbor;
+
+// in qcborstream.cpp
+extern void qt_cbor_stream_set_error(QCborStreamReaderPrivate *d, QCborError error);
+
+/*!
+ Returns true if the double \a v can be converted to type \c T, false if
+ it's out of range. If the conversion is successful, the converted value is
+ stored in \a value; if it was not successful, \a value will contain the
+ minimum or maximum of T, depending on the sign of \a d. If \c T is
+ unsigned, then \a value contains the absolute value of \a v.
+
+ This function works for v containing infinities, but not NaN. It's the
+ caller's responsibility to exclude that possibility before calling it.
+*/
+template <typename T> static inline bool convertDoubleTo(double v, T *value)
+{
+ Q_STATIC_ASSERT(std::numeric_limits<T>::is_integer);
+
+ // The [conv.fpint] (7.10 Floating-integral conversions) section of the C++
+ // standard says only exact conversions are guaranteed. Converting
+ // integrals to floating-point with loss of precision has implementation-
+ // defined behavior whether the next higher or next lower is returned;
+ // converting FP to integral is UB if it can't be represented.
+ //
+ // That means we can't write UINT64_MAX+1. Writing ldexp(1, 64) would be
+ // correct, but only Clang, ICC and MSVC don't realize that it's a constant
+ // and the math call stays in the compiled code.
+
+ double supremum;
+ if (std::numeric_limits<T>::is_signed) {
+ supremum = -1.0 * std::numeric_limits<T>::min(); // -1 * (-2^63) = 2^63, exact (for T = qint64)
+ *value = std::numeric_limits<T>::min();
+ if (v < std::numeric_limits<T>::min())
+ return false;
+ } else {
+ using ST = typename std::make_signed<T>::type;
+ supremum = -2.0 * std::numeric_limits<ST>::min(); // -2 * (-2^63) = 2^64, exact (for T = quint64)
+ v = fabs(v);
+ }
+
+ *value = std::numeric_limits<T>::max();
+ if (v >= supremum)
+ return false;
+
+ // Now we can convert, these two conversions cannot be UB
+ *value = T(v);
+
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_GCC("-Wfloat-equal")
+QT_WARNING_DISABLE_CLANG("-Wfloat-equal")
+
+ return *value == v;
+
+QT_WARNING_POP
+}
+
+static void writeDoubleToCbor(QCborStreamWriter &writer, double d, QCborValue::EncodingOptions opt)
+{
+ if (qt_is_nan(d)) {
+ if (opt & QCborValue::UseFloat16) {
+ if ((opt & QCborValue::UseFloat16) == QCborValue::UseFloat16)
+ return writer.append(qfloat16(qt_qnan()));
+ return writer.append(float(qt_qnan()));
+ }
+ return writer.append(qt_qnan());
+ }
+
+ if (qt_is_inf(d)) {
+ d = d > 0 ? qt_inf() : -qt_inf();
+ } else if (opt & QCborValue::UseIntegers) {
+ quint64 i;
+ if (convertDoubleTo(d, &i)) {
+ if (d < 0)
+ return writer.append(QCborNegativeInteger(i));
+ return writer.append(i);
+ }
+ }
+
+ if (opt & QCborValue::UseFloat16) {
+ float f = float(d);
+ if (f == d) {
+ // no data loss, we could use float
+ if ((opt & QCborValue::UseFloat16) == QCborValue::UseFloat16) {
+ qfloat16 f16 = f;
+ if (f16 == f)
+ return writer.append(f16);
+ }
+
+ return writer.append(f);
+ }
+ }
+
+ writer.append(d);
+}
+
+static inline int typeOrder(Element e1, Element e2)
+{
+ auto comparable = [](Element e) {
+ if (e.type >= 0x10000) // see QCborValue::isTag_helper()
+ return QCborValue::Tag;
+ return e.type;
+ };
+ return comparable(e1) - comparable(e2);
+}
+
+namespace {
+class DiagnosticNotation
+{
+public:
+ static QString create(const QCborValue &v, QCborValue::DiagnosticNotationOptions opts)
+ {
+ DiagnosticNotation dn(opts);
+ return dn.createFromValue(v);
+ }
+
+private:
+ QStack<int> byteArrayFormatStack;
+ QCborValue::DiagnosticNotationOptions opts;
+ int nestingLevel = 0;
+
+ DiagnosticNotation(QCborValue::DiagnosticNotationOptions opts_)
+ : opts(opts_)
+ {
+ byteArrayFormatStack.push(int(QCborKnownTags::ExpectedBase16));
+ }
+
+ QString createFromValue(const QCborValue &v);
+};
+}
+
+QString DiagnosticNotation::createFromValue(const QCborValue &v)
+{
+ QString indent(1, QLatin1Char(' '));
+ QString indented = indent;
+ if (opts & QCborValue::LineWrapped) {
+ indent = QLatin1Char('\n') + QString(4 * nestingLevel, QLatin1Char(' '));
+ indented = indent + QLatin1String(" ");
+ }
+ QScopedValueRollback<int> rollback(nestingLevel);
+ ++nestingLevel;
+
+ auto createFromArray = [=](const QCborArray &a) {
+ QString result;
+ QLatin1String comma;
+ for (auto v : a) {
+ result += comma + indented + createFromValue(v);
+ comma = QLatin1String(",");
+ }
+ return result;
+ };
+ auto createFromMap = [=](const QCborMap &m) {
+ QString result;
+ QLatin1String comma;
+ for (auto v : m) {
+ result += comma + indented + createFromValue(v.first) +
+ QLatin1String(": ") + createFromValue(v.second);
+ comma = QLatin1String(",");
+ }
+ return result;
+ };
+ auto makeFpString = [](double d) {
+ QString s;
+ quint64 v;
+ if (qt_is_inf(d)) {
+ s = (d < 0) ? QStringLiteral("-inf") : QStringLiteral("inf");
+ } else if (qt_is_nan(d)) {
+ s = QStringLiteral("nan");
+ } else if (convertDoubleTo(d, &v)) {
+ s = QString::fromLatin1("%1.0").arg(v);
+ if (d < 0)
+ s.prepend(QLatin1Char('-'));
+ } else {
+ s = QString::number(d, 'g', QLocale::FloatingPointShortest);
+ if (!s.contains(QLatin1Char('.')) && !s.contains('e'))
+ s += QLatin1Char('.');
+ }
+ return s;
+ };
+ auto isByteArrayEncodingTag = [](QCborTag tag) {
+ switch (quint64(tag)) {
+ case quint64(QCborKnownTags::ExpectedBase16):
+ case quint64(QCborKnownTags::ExpectedBase64):
+ case quint64(QCborKnownTags::ExpectedBase64url):
+ return true;
+ }
+ return false;
+ };
+
+ switch (v.type()) {
+ case QCborValue::Integer:
+ return QString::number(v.toInteger());
+ case QCborValue::ByteArray:
+ switch (byteArrayFormatStack.top()) {
+ case int(QCborKnownTags::ExpectedBase16):
+ return QString::fromLatin1("h'" +
+ v.toByteArray().toHex(opts & QCborValue::ExtendedFormat ? ' ' : '\0') +
+ '\'');
+ case int(QCborKnownTags::ExpectedBase64):
+ return QString::fromLatin1("b64'" + v.toByteArray().toBase64() + '\'');
+ default:
+ case int(QCborKnownTags::ExpectedBase64url):
+ return QString::fromLatin1("b64'" +
+ v.toByteArray().toBase64(QByteArray::Base64UrlEncoding | QByteArray::OmitTrailingEquals) +
+ '\'');
+ }
+ case QCborValue::String:
+ // ### TODO: Needs escaping!
+ return QLatin1Char('"') + v.toString() + QLatin1Char('"');
+ case QCborValue::Array:
+ return QLatin1Char('[') + createFromArray(v.toArray()) + indent + QLatin1Char(']');
+ case QCborValue::Map:
+ return QLatin1Char('{') + createFromMap(v.toMap()) + indent + QLatin1Char('}');
+ case QCborValue::False:
+ return QStringLiteral("false");
+ case QCborValue::True:
+ return QStringLiteral("true");
+ case QCborValue::Null:
+ return QStringLiteral("null");
+ case QCborValue::Undefined:
+ return QStringLiteral("undefined");
+ case QCborValue::Double:
+ return makeFpString(v.toDouble());
+ case QCborValue::Invalid:
+ return QStringLiteral("<invalid>");
+
+ case QCborValue::Tag:
+ case QCborValue::SimpleType:
+ default: // tags and other simple types that are recognized
+ break; // are all handled below
+ }
+
+ if (v.isTag()) {
+ bool byteArrayFormat = opts & QCborValue::ExtendedFormat && isByteArrayEncodingTag(v.tag());
+ if (byteArrayFormat)
+ byteArrayFormatStack.push(int(v.tag()));
+ QString result = QString::fromLatin1("%1(%2)").arg(quint64(v.tag())).arg(createFromValue(v.taggedValue()));
+ if (byteArrayFormat)
+ byteArrayFormatStack.pop();
+ return result;
+ }
+
+ // must be a simple type
+ return QString::fromLatin1("simple(%1)").arg(quint8(v.toSimpleType()));
+}
+
+QCborContainerPrivate::~QCborContainerPrivate()
+{
+ // delete our elements
+ for (Element &e : elements) {
+ if (e.flags & Element::IsContainer)
+ e.container->deref();
+ }
+}
+
+void QCborContainerPrivate::compact(qsizetype reserved)
+{
+ if (usedData > data.size() / 2)
+ return;
+
+ // 50% savings if we recreate the byte data
+ // ### TBD
+ Q_UNUSED(reserved);
+}
+
+QCborContainerPrivate *QCborContainerPrivate::clone(QCborContainerPrivate *d, qsizetype reserved)
+{
+ if (!d) {
+ d = new QCborContainerPrivate;
+ } else {
+ d = new QCborContainerPrivate(*d);
+ if (reserved >= 0) {
+ d->elements.reserve(reserved);
+ d->compact(reserved);
+ }
+ for (auto &e : qAsConst(d->elements)) {
+ if (e.flags & Element::IsContainer)
+ e.container->ref.ref();
+ }
+ }
+ return d;
+}
+
+QCborContainerPrivate *QCborContainerPrivate::detach(QCborContainerPrivate *d, qsizetype reserved)
+{
+ if (!d || d->ref.load() != 1)
+ return clone(d, reserved);
+ return d;
+}
+
+// Copies or moves \a value into element at position \a e. If \a disp is
+// CopyContainer, then this function increases the reference count of the
+// container, but otherwise leaves it unmodified. If \a disp is MoveContainer,
+// then it transfers ownership (move semantics) and the caller must set
+// value.container back to nullptr.
+void QCborContainerPrivate::replaceAt_complex(Element &e, const QCborValue &value, ContainerDisposition disp)
+{
+ if (value.n < 0) {
+ // This QCborValue is an array, map, or tagged value (container points
+ // to itself).
+
+ // detect self-assignment
+ if (Q_UNLIKELY(this == value.container)) {
+ Q_ASSERT(ref.load() >= 2);
+ if (disp == MoveContainer)
+ ref.deref(); // not deref() because it can't drop to 0
+ QCborContainerPrivate *d = QCborContainerPrivate::clone(this);
+ d->elements.detach();
+ d->ref.store(1);
+ e.container = d;
+ } else {
+ e.container = value.container;
+ if (disp == CopyContainer)
+ e.container->ref.ref();
+ }
+
+ e.type = value.type();
+ e.flags = Element::IsContainer;
+ } else {
+ // String data, copy contents
+ e = value.container->elements.at(value.n);
+
+ // Copy string data, if any
+ if (const ByteData *b = value.container->byteData(value.n))
+ e.value = addByteData(b->byte(), b->len);
+
+ if (disp == MoveContainer)
+ value.container->deref();
+ }
+}
+
+// in qstring.cpp
+void qt_to_latin1_unchecked(uchar *dst, const ushort *uc, qsizetype len);
+
+Q_NEVER_INLINE void QCborContainerPrivate::appendAsciiString(const QString &s)
+{
+ qsizetype len = s.size();
+ QtCbor::Element e;
+ e.value = addByteData(nullptr, len);
+ e.type = QCborValue::String;
+ e.flags = Element::HasByteData | Element::StringIsAscii;
+ elements.append(e);
+
+ char *ptr = data.data() + e.value + sizeof(ByteData);
+ uchar *l = reinterpret_cast<uchar *>(ptr);
+ const ushort *uc = (const ushort *)s.unicode();
+ qt_to_latin1_unchecked(l, uc, len);
+}
+
+QCborValue QCborContainerPrivate::extractAt_complex(Element e)
+{
+ // create a new container for the returned value, containing the byte data
+ // from this element, if it's worth it
+ Q_ASSERT(e.flags & Element::HasByteData);
+ auto b = byteData(e);
+ auto container = new QCborContainerPrivate;
+
+ if (b->len + qsizetype(sizeof(*b)) < data.size() / 4) {
+ // make a shallow copy of the byte data
+ container->appendByteData(b->byte(), b->len, e.type, e.flags);
+ usedData -= b->len + qsizetype(sizeof(*b));
+ compact(elements.size());
+ } else {
+ // just share with the original byte data
+ container->data = data;
+ container->elements.reserve(1);
+ container->elements.append(e);
+ }
+
+ return makeValue(e.type, 0, container);
+}
+
+QT_WARNING_DISABLE_MSVC(4146) // unary minus operator applied to unsigned type, result still unsigned
+static int compareContainer(const QCborContainerPrivate *c1, const QCborContainerPrivate *c2);
+static int compareElementNoData(const Element &e1, const Element &e2)
+{
+ Q_ASSERT(e1.type == e2.type);
+
+ if (e1.type == QCborValue::Integer) {
+ // CBOR sorting order is 0, 1, 2, ..., INT64_MAX, -1, -2, -3, ... INT64_MIN
+ // So we transform:
+ // 0 -> 0
+ // 1 -> 1
+ // INT64_MAX -> INT64_MAX
+ // -1 -> INT64_MAX + 1 = INT64_MAX - (-1)
+ // -2 -> INT64_MAX + 2 = INT64_MAX - (-2)
+ // INT64_MIN -> UINT64_MAX = INT64_MAX - INT64_MIN
+ // Note how the unsigned arithmethic is well defined in C++ (it's
+ // always performed modulo 2^64).
+ auto makeSortable = [](qint64 v) {
+ quint64 u = quint64(v);
+ if (v < 0)
+ return quint64(std::numeric_limits<qint64>::max()) + (-u);
+ return u;
+ };
+ quint64 u1 = makeSortable(e1.value);
+ quint64 u2 = makeSortable(e2.value);
+ if (u1 < u2)
+ return -1;
+ if (u1 > u2)
+ return 1;
+ }
+
+ if (e1.type == QCborValue::Tag || e1.type == QCborValue::Double) {
+ // Perform unsigned comparisons for the tag value and floating point
+ quint64 u1 = quint64(e1.value);
+ quint64 u2 = quint64(e2.value);
+ if (u1 != u2)
+ return u1 < u2 ? -1 : 1;
+ }
+
+ // Any other type is equal at this point:
+ // - simple types carry no value
+ // - empty strings, arrays and maps
+ return 0;
+}
+
+static int compareElementRecursive(const QCborContainerPrivate *c1, const Element &e1,
+ const QCborContainerPrivate *c2, const Element &e2)
+{
+ int cmp = typeOrder(e1, e2);
+ if (cmp != 0)
+ return cmp;
+
+ if ((e1.flags & Element::IsContainer) || (e2.flags & Element::IsContainer))
+ return compareContainer(e1.flags & Element::IsContainer ? e1.container : nullptr,
+ e2.flags & Element::IsContainer ? e2.container : nullptr);
+
+ // string data?
+ const ByteData *b1 = c1 ? c1->byteData(e1) : nullptr;
+ const ByteData *b2 = c2 ? c2->byteData(e2) : nullptr;
+ if (b1 || b2) {
+ auto len1 = b1 ? b1->len : 0;
+ auto len2 = b2 ? b2->len : 0;
+
+ if (e1.flags & Element::StringIsUtf16)
+ len1 /= 2;
+ if (e2.flags & Element::StringIsUtf16)
+ len2 /= 2;
+ if (len1 == 0 || len2 == 0)
+ return len1 < len2 ? -1 : len1 == len2 ? 0 : 1;
+
+ // we definitely have data from this point forward
+ Q_ASSERT(b1);
+ Q_ASSERT(b2);
+
+ // Officially with CBOR, we sort first the string with the shortest
+ // UTF-8 length. The length of an ASCII string is the same as its UTF-8
+ // and UTF-16 ones, but the UTF-8 length of a string is bigger than the
+ // UTF-16 equivalent. Combinations are:
+ // 1) UTF-16 and UTF-16
+ // 2) UTF-16 and UTF-8 <=== this is the problem case
+ // 3) UTF-16 and US-ASCII
+ // 4) UTF-8 and UTF-8
+ // 5) UTF-8 and US-ASCII
+ // 6) US-ASCII and US-ASCII
+ if ((e1.flags & Element::StringIsUtf16) && (e2.flags & Element::StringIsUtf16)) {
+ // Case 1: both UTF-16, so lengths are comparable.
+ // (we can't use memcmp in little-endian machines)
+ if (len1 == len2)
+ return QtPrivate::compareStrings(b1->asStringView(), b2->asStringView());
+ return len1 < len2 ? -1 : 1;
+ }
+
+ if (!(e1.flags & Element::StringIsUtf16) && !(e2.flags & Element::StringIsUtf16)) {
+ // Cases 4, 5 and 6: neither is UTF-16, so lengths are comparable too
+ // (this case includes byte arrays too)
+ if (len1 == len2)
+ return memcmp(b1->byte(), b2->byte(), size_t(len1));
+ return len1 < len2 ? -1 : 1;
+ }
+
+ if (!(e1.flags & Element::StringIsAscii) || !(e2.flags & Element::StringIsAscii)) {
+ // Case 2: one of them is UTF-8 and the other is UTF-16, so lengths
+ // are NOT comparable. We need to convert to UTF-16 first...
+ auto string = [](const Element &e, const ByteData *b) {
+ return e.flags & Element::StringIsUtf16 ? b->asQStringRaw() : b->toUtf8String();
+ };
+
+ QString s1 = string(e1, b1);
+ QString s2 = string(e2, b2);
+ if (s1.size() == s2.size())
+ return s1.compare(s2);
+ return s1.size() < s2.size() ? -1 : 1;
+ }
+
+ // Case 3 (UTF-16 and US-ASCII) remains, so lengths are comparable again
+ if (len1 != len2)
+ return len1 < len2 ? -1 : 1;
+ if (e1.flags & Element::StringIsUtf16)
+ return QtPrivate::compareStrings(b1->asStringView(), b2->asLatin1());
+ return QtPrivate::compareStrings(b1->asLatin1(), b2->asStringView());
+ }
+
+ return compareElementNoData(e1, e2);
+}
+
+static int compareContainer(const QCborContainerPrivate *c1, const QCborContainerPrivate *c2)
+{
+ auto len1 = c1 ? c1->elements.size() : 0;
+ auto len2 = c2 ? c2->elements.size() : 0;
+ if (len1 != len2) {
+ // sort the shorter container first
+ return len1 < len2 ? -1 : 1;
+ }
+
+ for (qsizetype i = 0; i < len1; ++i) {
+ const Element &e1 = c1->elements.at(i);
+ const Element &e2 = c2->elements.at(i);
+ int cmp = QCborContainerPrivate::compareElement_helper(c1, e1, c2, e2);
+ if (cmp)
+ return cmp;
+ }
+
+ return 0;
+}
+
+inline int QCborContainerPrivate::compareElement_helper(const QCborContainerPrivate *c1, Element e1,
+ const QCborContainerPrivate *c2, Element e2)
+{
+ return compareElementRecursive(c1, e1, c2, e2);
+}
+
+/*!
+ \fn bool QCborValue::operator==(const QCborValue &other) const
+
+ Compares this value and \a other, and returns true if they hold the same
+ contents, false otherwise. If each QCborValue contains an array or map, the
+ comparison is recursive to elements contained in them.
+
+ For more information on CBOR equality in Qt, see, compare().
+
+ \sa compare(), QCborValue::operator==(), QCborMap::operator==(),
+ operator!=(), operator<()
+ */
+
+/*!
+ \fn bool QCborValue::operator!=(const QCborValue &other) const
+
+ Compares this value and \a other, and returns true if contents differ,
+ false otherwise. If each QCborValue contains an array or map, the comparison
+ is recursive to elements contained in them.
+
+ For more information on CBOR equality in Qt, see, QCborValue::compare().
+
+ \sa compare(), QCborValue::operator==(), QCborMap::operator==(),
+ operator==(), operator<()
+ */
+
+/*!
+ \fn bool QCborValue::operator<(const QCborValue &other) const
+
+ Compares this value and \a other, and returns true if this value should be
+ sorted before \a other, false otherwise. If each QCborValue contains an
+ array or map, the comparison is recursive to elements contained in them.
+
+ For more information on CBOR sorting order, see QCborValue::compare().
+
+ \sa compare(), QCborValue::operator==(), QCborMap::operator==(),
+ operator==(), operator!=()
+ */
+
+/*!
+ Compares this value and \a other, and returns an integer that indicates
+ whether this value should be sorted prior to (if the result is negative) or
+ after \a other (if the result is positive). If this function returns 0, the
+ two values are equal and hold the same contents.
+
+ If each QCborValue contains an array or map, the comparison is recursive to
+ elements contained in them.
+
+ \section3 Extended types
+
+ QCborValue compares equal a QCborValue containing an extended type, like
+ \l{Type}{Url} and \l{Type}{Url} and its equivalent tagged representation.
+ So, for example, the following expression is true:
+
+ \code
+ QCborValue(QUrl("https://example.com")) == QCborValue(QCborKnownTags::Url, "https://example.com");
+ \endcode
+
+ Do note that Qt types like \l QUrl and \l QDateTime will normalize and
+ otherwise modify their arguments. The expression above is true only because
+ the string on the right side is the normalized value that the QCborValue on
+ the left would take. If, for example, the "https" part were uppercase in
+ both sides, the comparison would fail. For information on normalizations
+ performed by QCborValue, please consult the documentation of the
+ constructor taking the Qt type in question.
+
+ \section3 Sorting order
+
+ Sorting order in CBOR is defined in RFC 7049
+ {https://tools.ietf.org/html/rfc7049#section-3.9}{section 3.9}, which
+ discusses the sorting of keys in a map when following the Canonical
+ encoding. According to the specification, "sorting is performed on the
+ bytes of the representation of the key data items" and lists as
+ consequences that:
+
+ \list
+ \li "If two keys have different lengths, the shorter one sorts earlier;"
+ \li "If two keys have the same length, the one with the lower value in
+ (byte-wise) lexical order sorts earlier."
+ \endlist
+
+ This results in surprising sorting of QCborValues, where the result of this
+ function is different from that which would later be retrieved by comparing the
+ contained elements. For example, the QCborValue containing string "zzz"
+ sorts before the QCborValue with string "foobar", even though when
+ comparing as \l{QString::compare()}{QStrings} or
+ \l{QByteArray}{QByteArrays} the "zzz" sorts after "foobar"
+ (dictionary order).
+
+ The specification does not clearly indicate what sorting order should be
+ done for values of different types (it says sorting should not pay
+ "attention to the 3/5 bit splitting for major types"). QCborValue makes the
+ assumption that types should be sorted too. The numeric values of the
+ QCborValue::Type enumeration are in that order, with the exception of the
+ extended types, which compare as their tagged equivalents.
+
+ \note Sorting order is preliminary and is subject to change. Applications
+ should not depend on the order returned by this function for the time
+ being.
+
+ \sa QCborArray::compare(), QCborMap::compare(), operator==()
+ */
+int QCborValue::compare(const QCborValue &other) const
+{
+ Element e1 = QCborContainerPrivate::elementFromValue(*this);
+ Element e2 = QCborContainerPrivate::elementFromValue(other);
+ return compareElementRecursive(container, e1, other.container, e2);
+}
+
+int QCborArray::compare(const QCborArray &other) const noexcept
+{
+ return compareContainer(d.data(), other.d.data());
+}
+
+int QCborMap::compare(const QCborMap &other) const noexcept
+{
+ return compareContainer(d.data(), other.d.data());
+}
+
+static void encodeToCbor(QCborStreamWriter &writer, const QCborContainerPrivate *d, qsizetype idx,
+ QCborValue::EncodingOptions opt)
+{
+ if (idx == -QCborValue::Array || idx == -QCborValue::Map) {
+ bool isArray = (idx == -QCborValue::Array);
+ qsizetype len = d ? d->elements.size() : 0;
+ if (isArray)
+ writer.startArray(quint64(len));
+ else
+ writer.startMap(quint64(len) / 2);
+
+ for (idx = 0; idx < len; ++idx)
+ encodeToCbor(writer, d, idx, opt);
+
+ if (isArray)
+ writer.endArray();
+ else
+ writer.endMap();
+ } else if (idx < 0) {
+ if (d->elements.size() != 2) {
+ // invalid state!
+ qWarning("QCborValue: invalid tag state; are you encoding something that was improperly decoded?");
+ return;
+ }
+
+ // write the tag and the tagged element
+ writer.append(QCborTag(d->elements.at(0).value));
+ encodeToCbor(writer, d, 1, opt);
+ } else {
+ // just one element
+ auto e = d->elements.at(idx);
+ const ByteData *b = d->byteData(idx);
+ switch (e.type) {
+ case QCborValue::Integer:
+ return writer.append(qint64(e.value));
+
+ case QCborValue::ByteArray:
+ if (b)
+ return writer.appendByteString(b->byte(), b->len);
+ return writer.appendByteString("", 0);
+
+ case QCborValue::String:
+ if (b) {
+ if (e.flags & Element::StringIsUtf16)
+ return writer.append(b->asStringView());
+ return writer.appendTextString(b->byte(), b->len);
+ }
+ return writer.append(QLatin1String());
+
+ case QCborValue::Array:
+ case QCborValue::Map:
+ case QCborValue::Tag:
+ // recurse
+ return encodeToCbor(writer,
+ e.flags & Element::IsContainer ? e.container : nullptr,
+ -qsizetype(e.type), opt);
+
+ case QCborValue::SimpleType:
+ case QCborValue::False:
+ case QCborValue::True:
+ case QCborValue::Null:
+ case QCborValue::Undefined:
+ break;
+
+ case QCborValue::Double:
+ return writeDoubleToCbor(writer, e.fpvalue(), opt);
+
+ case QCborValue::Invalid:
+ return;
+
+ case QCborValue::DateTime:
+ case QCborValue::Url:
+ case QCborValue::RegularExpression:
+ case QCborValue::Uuid:
+ // recurse as tag
+ return encodeToCbor(writer, e.container, -QCborValue::Tag, opt);
+ }
+
+ // maybe it's a simple type
+ int simpleType = e.type - QCborValue::SimpleType;
+ if (unsigned(simpleType) < 0x100)
+ return writer.append(QCborSimpleType(simpleType));
+
+ // if we got here, we've got an unknown type
+ qWarning("QCborValue: found unknown type 0x%x", e.type);
+ }
+}
+
+static inline double integerOutOfRange(const QCborStreamReader &reader)
+{
+ Q_ASSERT(reader.isInteger());
+ if (reader.isUnsignedInteger()) {
+ quint64 v = reader.toUnsignedInteger();
+ if (qint64(v) < 0)
+ return double(v);
+ } else {
+ quint64 v = quint64(reader.toNegativeInteger());
+ if (qint64(v - 1) < 0)
+ return -double(v);
+ }
+
+ // result is in range
+ return 0;
+}
+
+static Element decodeBasicValueFromCbor(QCborStreamReader &reader)
+{
+ Element e = {};
+
+ switch (reader.type()) {
+ case QCborStreamReader::UnsignedInteger:
+ case QCborStreamReader::NegativeInteger:
+ if (double d = integerOutOfRange(reader)) {
+ e.type = QCborValue::Double;
+ qToUnaligned(d, &e.value);
+ } else {
+ e.type = QCborValue::Integer;
+ e.value = reader.toInteger();
+ }
+ break;
+ case QCborStreamReader::SimpleType:
+ e.type = QCborValue::Type(quint8(reader.toSimpleType()) + 0x100);
+ break;
+ case QCborStreamReader::Float16:
+ e.type = QCborValue::Double;
+ qToUnaligned(double(reader.toFloat16()), &e.value);
+ break;
+ case QCborStreamReader::Float:
+ e.type = QCborValue::Double;
+ qToUnaligned(double(reader.toFloat()), &e.value);
+ break;
+ case QCborStreamReader::Double:
+ e.type = QCborValue::Double;
+ qToUnaligned(reader.toDouble(), &e.value);
+ break;
+
+ default:
+ Q_UNREACHABLE();
+ }
+
+ reader.next();
+ return e;
+}
+
+static inline QCborContainerPrivate *createContainerFromCbor(QCborStreamReader &reader)
+{
+ auto d = new QCborContainerPrivate;
+ d->ref.store(1);
+ d->decodeFromCbor(reader);
+ return d;
+}
+
+static QCborValue taggedValueFromCbor(QCborStreamReader &reader)
+{
+ auto d = new QCborContainerPrivate;
+ d->append(reader.toTag());
+ reader.next();
+
+ if (reader.lastError() == QCborError::NoError) {
+ // decode tagged value
+ d->decodeValueFromCbor(reader);
+ }
+
+ QCborValue::Type type = QCborValue::Tag;
+ if (reader.lastError() == QCborError::NoError) {
+ // post-process to create our extended types
+ qint64 tag = d->elements.at(0).value;
+ auto &e = d->elements[1];
+ const ByteData *b = d->byteData(e);
+
+ auto replaceByteData = [&](const char *buf, qsizetype len) {
+ d->data.clear();
+ d->usedData = 0;
+ e.flags = Element::HasByteData | Element::StringIsAscii;
+ e.value = d->addByteData(buf, len);
+ };
+
+ switch (tag) {
+ case qint64(QCborKnownTags::DateTimeString):
+ case qint64(QCborKnownTags::UnixTime_t): {
+ QDateTime dt;
+ if (tag == qint64(QCborKnownTags::DateTimeString) && b &&
+ e.type == QCborValue::String && (e.flags & Element::StringIsUtf16) == 0) {
+ // The data is supposed to be US-ASCII. If it isn't,
+ // QDateTime::fromString will fail anyway.
+ dt = QDateTime::fromString(b->asLatin1(), Qt::ISODateWithMs);
+ } else if (tag == qint64(QCborKnownTags::UnixTime_t) && e.type == QCborValue::Integer) {
+ dt = QDateTime::fromSecsSinceEpoch(e.value, Qt::UTC);
+ } else if (tag == qint64(QCborKnownTags::UnixTime_t) && e.type == QCborValue::Double) {
+ dt = QDateTime::fromMSecsSinceEpoch(qint64(e.fpvalue() * 1000), Qt::UTC);
+ }
+ if (dt.isValid()) {
+ QByteArray text = dt.toString(Qt::ISODateWithMs).toLatin1();
+ replaceByteData(text, text.size());
+ e.type = QCborValue::String;
+ d->elements[0].value = qint64(QCborKnownTags::DateTimeString);
+ type = QCborValue::DateTime;
+ }
+ break;
+ }
+
+ case qint64(QCborKnownTags::Url):
+ if (e.type == QCborValue::String) {
+ if (b) {
+ // normalize to a short (decoded) form, so as to save space
+ QUrl url(e.flags & Element::StringIsUtf16 ?
+ b->asQStringRaw() :
+ b->toUtf8String());
+ QByteArray encoded = url.toString(QUrl::DecodeReserved).toUtf8();
+ replaceByteData(encoded, encoded.size());
+ }
+ type = QCborValue::Url;
+ }
+ break;
+
+ case quint64(QCborKnownTags::RegularExpression):
+ if (e.type == QCborValue::String) {
+ // no normalization is necessary
+ type = QCborValue::RegularExpression;
+ }
+ break;
+
+ case qint64(QCborKnownTags::Uuid):
+ if (e.type == QCborValue::ByteArray) {
+ // force the size to 16
+ char buf[sizeof(QUuid)] = {};
+ if (b)
+ memcpy(buf, b->byte(), qMin(sizeof(buf), size_t(b->len)));
+ replaceByteData(buf, sizeof(buf));
+
+ type = QCborValue::Uuid;
+ }
+ break;
+ }
+ } else {
+ // decoding error
+ type = QCborValue::Invalid;
+ }
+
+ // note: may return invalid state!
+ return QCborContainerPrivate::makeValue(type, -1, d);
+}
+
+void QCborContainerPrivate::decodeStringFromCbor(QCborStreamReader &reader)
+{
+ auto addByteData_local = [this](QByteArray::size_type len) -> qint64 {
+ // this duplicates a lot of addByteData, but with overflow checking
+ QByteArray::size_type newSize;
+ QByteArray::size_type increment = sizeof(QtCbor::ByteData);
+ QByteArray::size_type alignment = alignof(QtCbor::ByteData);
+ QByteArray::size_type offset = data.size();
+
+ // calculate the increment we want
+ if (add_overflow(increment, len, &increment))
+ return -1;
+
+ // align offset
+ if (add_overflow(offset, alignment - 1, &offset))
+ return -1;
+ offset &= ~(alignment - 1);
+
+ // and calculate the final size
+ if (add_overflow(offset, increment, &newSize))
+ return -1;
+
+ // since usedData <= data.size(), this can't overflow
+ usedData += increment;
+ data.resize(newSize);
+ return offset;
+ };
+ auto dataPtr = [this]() {
+ // Null happens when we're reading zero bytes.
+ Q_ASSERT(data.isNull() || data.isDetached());
+ return const_cast<char *>(data.constData());
+ };
+
+ Element e = {};
+ e.type = (reader.isByteArray() ? QCborValue::ByteArray : QCborValue::String);
+ if (reader.lastError() != QCborError::NoError)
+ return;
+
+ qsizetype rawlen = reader.currentStringChunkSize();
+ QByteArray::size_type len = rawlen;
+ if (rawlen < 0)
+ return; // error
+ if (len != rawlen) {
+ // truncation
+ qt_cbor_stream_set_error(reader.d.data(), { QCborError::DataTooLarge });
+ return;
+ }
+
+ // allocate space, but only if there will be data
+ if (len != 0 || !reader.isLengthKnown()) {
+ e.flags = Element::HasByteData;
+ e.value = addByteData_local(len);
+ if (e.value < 0) {
+ // overflow
+ qt_cbor_stream_set_error(reader.d.data(), { QCborError::DataTooLarge });
+ return;
+ }
+ }
+
+ // read chunks
+ bool isAscii = (e.type == QCborValue::String);
+ auto r = reader.readStringChunk(dataPtr() + e.value + sizeof(ByteData), len);
+ while (r.status == QCborStreamReader::Ok) {
+ if (e.type == QCborValue::String && len) {
+ // verify UTF-8 string validity
+ auto utf8result = QUtf8::isValidUtf8(dataPtr() + data.size() - len, len);
+ if (!utf8result.isValidUtf8) {
+ r.status = QCborStreamReader::Error;
+ qt_cbor_stream_set_error(reader.d.data(), { QCborError::InvalidUtf8String });
+ break;
+ }
+ isAscii = isAscii && utf8result.isValidAscii;
+ }
+
+ // allocate space for the next chunk
+ rawlen = reader.currentStringChunkSize();
+ len = rawlen;
+ if (len == rawlen) {
+ auto oldSize = data.size();
+ auto newSize = oldSize;
+ if (!add_overflow(newSize, len, &newSize)) {
+ if (newSize != oldSize)
+ data.resize(newSize);
+
+ // read the chunk
+ r = reader.readStringChunk(dataPtr() + oldSize, len);
+ continue;
+ }
+ }
+
+ // error
+ r.status = QCborStreamReader::Error;
+ qt_cbor_stream_set_error(reader.d.data(), { QCborError::DataTooLarge });
+ }
+
+ if (r.status == QCborStreamReader::Error) {
+ // There can only be errors if there was data to be read.
+ Q_ASSERT(e.flags & Element::HasByteData);
+ data.truncate(e.value);
+ return;
+ }
+
+ // update size
+ if (e.flags & Element::HasByteData) {
+ auto b = new (dataPtr() + e.value) ByteData;
+ b->len = data.size() - e.value - int(sizeof(*b));
+ usedData += b->len;
+
+ if (isAscii) {
+ // set the flag if it is US-ASCII only (as it often is)
+ Q_ASSERT(e.type == QCborValue::String);
+ e.flags |= Element::StringIsAscii;
+ }
+ }
+
+ elements.append(e);
+}
+
+void QCborContainerPrivate::decodeValueFromCbor(QCborStreamReader &reader)
+{
+ switch (reader.type()) {
+ case QCborStreamReader::UnsignedInteger:
+ case QCborStreamReader::NegativeInteger:
+ case QCborStreamReader::SimpleType:
+ case QCborStreamReader::Float16:
+ case QCborStreamReader::Float:
+ case QCborStreamReader::Double:
+ elements.append(decodeBasicValueFromCbor(reader));
+ break;
+
+ case QCborStreamReader::ByteArray:
+ case QCborStreamReader::String:
+ decodeStringFromCbor(reader);
+ break;
+
+ case QCborStreamReader::Array:
+ case QCborStreamReader::Map:
+ case QCborStreamReader::Tag:
+ return append(QCborValue::fromCbor(reader));
+
+ case QCborStreamReader::Invalid:
+ return; // probably a decode error
+ }
+}
+
+void QCborContainerPrivate::decodeFromCbor(QCborStreamReader &reader)
+{
+ int mapShift = reader.isMap() ? 1 : 0;
+ if (reader.isLengthKnown()) {
+ quint64 len = reader.length();
+
+ // Clamp allocation to 1M elements (avoids crashing due to corrupt
+ // stream or loss of precision when converting from quint64 to
+ // QVector::size_type).
+ len = qMin(len, quint64(1024 * 1024 - 1));
+ elements.reserve(qsizetype(len) << mapShift);
+ }
+
+ reader.enterContainer();
+ if (reader.lastError() != QCborError::NoError)
+ return;
+
+ while (reader.hasNext() && reader.lastError() == QCborError::NoError)
+ decodeValueFromCbor(reader);
+
+ if (reader.lastError() == QCborError::NoError)
+ reader.leaveContainer();
+}
+
+/*!
+ Creates a QCborValue with byte array value \a ba. The value can later be
+ retrieved using toByteArray().
+
+ \sa toByteArray(), isByteArray(), isString()
+ */
+QCborValue::QCborValue(const QByteArray &ba)
+ : n(0), container(new QCborContainerPrivate), t(ByteArray)
+{
+ container->appendByteData(ba.constData(), ba.size(), t);
+ container->ref.store(1);
+}
+
+/*!
+ Creates a QCborValue with string value \a s. The value can later be
+ retrieved using toString().
+
+ \sa toString(), isString(), isByteArray()
+ */
+QCborValue::QCborValue(const QString &s)
+ : n(0), container(new QCborContainerPrivate), t(String)
+{
+ container->append(s);
+ container->ref.store(1);
+}
+
+/*!
+ \overload
+
+ Creates a QCborValue with string value \a s. The value can later be
+ retrieved using toString().
+
+ \sa toString(), isString(), isByteArray()
+ */
+QCborValue::QCborValue(QLatin1String s)
+ : n(0), container(new QCborContainerPrivate), t(String)
+{
+ container->append(s);
+ container->ref.store(1);
+}
+
+/*!
+ \fn QCborValue::QCborValue(const QCborArray &a)
+ \fn QCborValue::QCborValue(QCborArray &&a)
+
+ Creates a QCborValue with the array \a a. The array can later be retrieved
+ using toArray().
+
+ \sa toArray(), isArray(), isMap()
+ */
+QCborValue::QCborValue(const QCborArray &a)
+ : n(-1), container(a.d.data()), t(Array)
+{
+ if (container)
+ container->ref.ref();
+}
+
+/*!
+ \fn QCborValue::QCborValue(const QCborMap &m)
+ \fn QCborValue::QCborValue(QCborMap &&m)
+
+ Creates a QCborValue with the map \a m. The map can later be retrieved
+ using toMap().
+
+ \sa toMap(), isMap(), isArray()
+ */
+QCborValue::QCborValue(const QCborMap &m)
+ : n(-1), container(m.d.data()), t(Map)
+{
+ if (container)
+ container->ref.ref();
+}
+
+/*!
+ \fn QCborValue::QCborValue(QCborTag t, const QCborValue &tv)
+ \fn QCborValue::QCborValue(QCborKnownTags t, const QCborValue &tv)
+
+ Creates a QCborValue for the extended type represented by the tag value \a
+ t, tagging value \a tv. The tag can later be retrieved using tag() and
+ the tagged value using taggedValue().
+
+ \sa isTag(), tag(), taggedValue(), QCborKnownTags
+ */
+QCborValue::QCborValue(QCborTag t, const QCborValue &tv)
+ : n(-1), container(new QCborContainerPrivate), t(Tag)
+{
+ container->ref.store(1);
+ container->append(t);
+ container->append(tv);
+}
+
+/*!
+ Copies the contents of \a other into this object.
+ */
+QCborValue::QCborValue(const QCborValue &other)
+ : n(other.n), container(other.container), t(other.t)
+{
+ if (container)
+ container->ref.ref();
+}
+
+/*!
+ Creates a QCborValue object of the date/time extended type and containing
+ the value represented by \a dt. The value can later be retrieved using
+ toDateTime().
+
+ The CBOR date/time types are extension types using tags: either a string
+ (in ISO date format) tagged as a \l{QCborKnownTags}{DateTime} or a number
+ (of seconds since the start of 1970, UTC) tagged as a
+ \l{QCborKnownTags}{UnixTime_t}. When parsing CBOR streams, QCborValue will
+ convert \l{QCborKnownTags}{UnixTime_t} to the string-based type.
+
+ \sa toDateTime(), isDateTime(), taggedValue()
+ */
+QCborValue::QCborValue(const QDateTime &dt)
+ : QCborValue(QCborKnownTags::DateTimeString, dt.toString(Qt::ISODateWithMs).toLatin1())
+{
+ // change types
+ t = DateTime;
+ container->elements[1].type = String;
+}
+
+/*!
+ Creates a QCborValue object of the URL extended type and containing the
+ value represented by \a url. The value can later be retrieved using toUrl().
+
+ The CBOR URL type is an extended type represented by a string tagged as an
+ \l{QCborKnownTags}{Url}.
+
+ \sa toUrl(), isUrl(), taggedValue()
+ */
+QCborValue::QCborValue(const QUrl &url)
+ : QCborValue(QCborKnownTags::Url, url.toString(QUrl::DecodeReserved).toUtf8())
+{
+ // change types
+ t = Url;
+ container->elements[1].type = String;
+}
+
+/*!
+ Creates a QCborValue object of the regular expression pattern extended type
+ and containing the value represented by \a rx. The value can later be retrieved
+ using toRegularExpression().
+
+ The CBOR regular expression type is an extended type represented by a
+ string tagged as an \l{QCborKnownTags}{RegularExpression}. Note that CBOR
+ regular expressions only store the patterns, so any flags that the
+ QRegularExpression object may carry will be lost.
+
+ \sa toRegularExpression(), isRegularExpression(), taggedValue()
+ */
+QCborValue::QCborValue(const QRegularExpression &rx)
+ : QCborValue(QCborKnownTags::RegularExpression, rx.pattern())
+{
+ // change type
+ t = RegularExpression;
+}
+
+/*!
+ Creates a QCborValue object of the UUID extended type and containing the
+ value represented by \a uuid. The value can later be retrieved using
+ toUuid().
+
+ The CBOR UUID type is an extended type represented by a byte array tagged
+ as an \l{QCborKnownTags}{Uuid}.
+
+ \sa toUuid(), isUuid(), taggedValue()
+ */
+QCborValue::QCborValue(const QUuid &uuid)
+ : QCborValue(QCborKnownTags::Uuid, uuid.toRfc4122())
+{
+ // change our type
+ t = Uuid;
+}
+
+// destructor
+void QCborValue::dispose()
+{
+ container->deref();
+}
+
+/*!
+ Replaces the contents of this QCborObject with a copy of \a other.
+ */
+QCborValue &QCborValue::operator=(const QCborValue &other)
+{
+ if (other.container)
+ other.container->ref.ref();
+ if (container)
+ container->deref();
+
+ n = other.n;
+ container = other.container;
+ t = other.t;
+ return *this;
+}
+
+/*!
+ Returns the tag of this extended QCborValue object, if it is of the tag
+ type, \a defaultValue otherwise.
+
+ CBOR represents extended types by associating a number (the tag) with a
+ stored representation. This function returns that number. To retrieve the
+ representation, use taggedValue().
+
+ \sa isTag(), taggedValue(), isDateTime(), isUrl(), isRegularExpression(), isUuid()
+ */
+QCborTag QCborValue::tag(QCborTag defaultValue) const
+{
+ return isTag() && container && container->elements.size() == 2 ?
+ QCborTag(container->elements.at(0).value) : defaultValue;
+}
+
+/*!
+ Returns the tagged value of this extended QCborValue object, if it is of
+ the tag type, \a defaultValue otherwise.
+
+ CBOR represents extended types by associating a number (the tag) with a
+ stored representation. This function returns that representation. To
+ retrieve the tag, use tag().
+
+ \sa isTag(), tag(), isDateTime(), isUrl(), isRegularExpression(), isUuid()
+ */
+QCborValue QCborValue::taggedValue(const QCborValue &defaultValue) const
+{
+ return isTag() && container && container->elements.size() == 2 ?
+ container->valueAt(1) : defaultValue;
+}
+
+/*!
+ Returns the byte array value stored in this QCborValue, if it is of the byte
+ array type. Otherwise, it returns \a defaultValue.
+
+ Note that this function performs no conversion from other types to
+ QByteArray.
+
+ \sa isByteArray(), isString(), toString()
+ */
+QByteArray QCborValue::toByteArray(const QByteArray &defaultValue) const
+{
+ if (!container || !isByteArray())
+ return defaultValue;
+
+ Q_ASSERT(n >= 0);
+ return container->byteArrayAt(n);
+}
+
+/*!
+ Returns the string value stored in this QCborValue, if it is of the string
+ type. Otherwise, it returns \a defaultValue.
+
+ Note that this function performs no conversion from other types to
+ QString.
+
+ \sa isString(), isByteArray(), toByteArray()
+ */
+QString QCborValue::toString(const QString &defaultValue) const
+{
+ if (!container || !isString())
+ return defaultValue;
+
+ Q_ASSERT(n >= 0);
+ return container->stringAt(n);
+}
+
+/*!
+ Returns the date/time value stored in this QCborValue, if it is of the
+ date/time extended type. Otherwise, it returns \a defaultValue.
+
+ Note that this function performs no conversion from other types to
+ QDateTime.
+
+ \sa isDateTime(), isTag(), taggedValue()
+ */
+QDateTime QCborValue::toDateTime(const QDateTime &defaultValue) const
+{
+ if (!container || !isDateTime() || container->elements.size() != 2)
+ return defaultValue;
+
+ Q_ASSERT(n == -1);
+ const ByteData *byteData = container->byteData(1);
+ if (!byteData)
+ return defaultValue; // date/times are never empty, so this must be invalid
+
+ // Our data must be US-ASCII.
+ Q_ASSERT((container->elements.at(1).flags & Element::StringIsUtf16) == 0);
+ return QDateTime::fromString(byteData->asLatin1(), Qt::ISODateWithMs);
+}
+
+/*!
+ Returns the URL value stored in this QCborValue, if it is of the URL
+ extended type. Otherwise, it returns \a defaultValue.
+
+ Note that this function performs no conversion from other types to QUrl.
+
+ \sa isUrl(), isTag(), taggedValue()
+ */
+QUrl QCborValue::toUrl(const QUrl &defaultValue) const
+{
+ if (!container || !isUrl() || container->elements.size() != 2)
+ return defaultValue;
+
+ Q_ASSERT(n == -1);
+ const ByteData *byteData = container->byteData(1);
+ if (!byteData)
+ return QUrl(); // valid, empty URL
+
+ return QUrl::fromEncoded(byteData->asByteArrayView());
+}
+
+/*!
+ Returns the regular expression value stored in this QCborValue, if it is of
+ the regular expression pattern extended type. Otherwise, it returns \a
+ defaultValue.
+
+ Note that this function performs no conversion from other types to
+ QRegularExpression.
+
+ \sa isRegularExpression(), isTag(), taggedValue()
+ */
+QRegularExpression QCborValue::toRegularExpression(const QRegularExpression &defaultValue) const
+{
+ if (!container || !isRegularExpression() || container->elements.size() != 2)
+ return defaultValue;
+
+ Q_ASSERT(n == -1);
+ return QRegularExpression(container->stringAt(1));
+}
+
+/*!
+ Returns the UUID value stored in this QCborValue, if it is of the UUID
+ extended type. Otherwise, it returns \a defaultValue.
+
+ Note that this function performs no conversion from other types to QUuid.
+
+ \sa isUuid(), isTag(), taggedValue()
+ */
+QUuid QCborValue::toUuid(const QUuid &defaultValue) const
+{
+ if (!container || !isUuid() || container->elements.size() != 2)
+ return defaultValue;
+
+ Q_ASSERT(n == -1);
+ const ByteData *byteData = container->byteData(1);
+ if (!byteData)
+ return defaultValue; // UUIDs must always be 16 bytes, so this must be invalid
+
+ return QUuid::fromRfc4122(byteData->asByteArrayView());
+}
+
+QCborArray QCborValue::toArray() const
+{
+ return toArray(QCborArray());
+}
+
+/*!
+ Returns the array value stored in this QCborValue, if it is of the array
+ type. Otherwise, it returns \a defaultValue.
+
+ Note that this function performs no conversion from other types to
+ QCborArray.
+
+ \sa isArray(), isByteArray(), isMap(), isContainer(), toMap()
+ */
+QCborArray QCborValue::toArray(const QCborArray &defaultValue) const
+{
+ if (!isArray())
+ return defaultValue;
+ QCborContainerPrivate *dd = nullptr;
+ Q_ASSERT(n == -1 || container == nullptr);
+ if (n < 0)
+ dd = container;
+ return dd ? QCborArray(*dd) : defaultValue;
+}
+
+QCborMap QCborValue::toMap() const
+{
+ return toMap(QCborMap());
+}
+
+/*!
+ Returns the map value stored in this QCborValue, if it is of the map type.
+ Otherwise, it returns \a defaultValue.
+
+ Note that this function performs no conversion from other types to
+ QCborMap.
+
+ \sa isMap(), isArray(), isContainer(), toArray()
+ */
+QCborMap QCborValue::toMap(const QCborMap &defaultValue) const
+{
+ if (!isMap())
+ return defaultValue;
+ QCborContainerPrivate *dd = nullptr;
+ Q_ASSERT(n == -1 || container == nullptr);
+ if (n < 0)
+ dd = container;
+ return dd ? QCborMap(*dd) : defaultValue;
+}
+
+/*!
+ If this QCborValue is a QCborMap, searches elements for the value whose key
+ matches \a key. If there's no key matching \a key in the map or if this
+ QCborValue object is not a map, returns the undefined value.
+
+ This function is equivalent to:
+
+ \code
+ value.toMap().value(key);
+ \endcode
+
+ \sa operator[](qint64), QCborMap::operator[], QCborMap::value(),
+ QCborMap::find()
+ */
+const QCborValue QCborValue::operator[](const QString &key) const
+{
+ if (isMap())
+ return toMap().value(key);
+ return QCborValue();
+}
+
+/*!
+ \overload
+
+ If this QCborValue is a QCborMap, searches elements for the value whose key
+ matches \a key. If there's no key matching \a key in the map or if this
+ QCborValue object is not a map, returns the undefined value.
+
+ This function is equivalent to:
+
+ \code
+ value.toMap().value(key);
+ \endcode
+
+ \sa operator[](qint64), QCborMap::operator[], QCborMap::value(),
+ QCborMap::find()
+ */
+const QCborValue QCborValue::operator[](QLatin1String key) const
+{
+ if (isMap())
+ return toMap().value(key);
+ return QCborValue();
+}
+
+/*!
+ If this QCborValue is a QCborMap, searches elements for the value whose key
+ matches \a key. If this is an array, returns the element whose index is \a
+ key. If there's no matching value in the array or map, or if this
+ QCborValue object is not an array or map, returns the undefined value.
+
+ \sa operator[], QCborMap::operator[], QCborMap::value(),
+ QCborMap::find(), QCborArray::operator[], QCborArray::at()
+ */
+
+const QCborValue QCborValue::operator[](qint64 key) const
+{
+ if (isMap())
+ return toMap().value(key);
+ if (isArray())
+ return toArray().at(key);
+ return QCborValue();
+}
+
+/*!
+ Decodes one item from the CBOR stream found in \a reader and returns the
+ equivalent representation. This function is recursive: if the item is a map
+ or array, it will decode all items found in that map or array, until the
+ outermost object is finished.
+
+ This function need not be used on the root element of a \l
+ QCborStreamReader. For example, the following code illustrates how to skip
+ the CBOR signature tag from the beginning of a file:
+
+ \code
+ if (reader.isTag() && reader.toTag() == QCborKnownTags::Signature)
+ reader.next();
+
+ QCborValue contents = QCborValue::fromCbor(reader);
+ \endcode
+
+ The returned value may be partially complete and indistinguishable from a
+ valid QCborValue even if the decoding failed. To determine if there was an
+ error, check if \l{QCborStreamReader::lastError()}{reader.lastError()} is
+ indicating an error condition. This function stops decoding immediately
+ after the first error.
+
+ \sa toCbor(), toDiagnosticNotation(), toVariant(), toJsonValue()
+ */
+QCborValue QCborValue::fromCbor(QCborStreamReader &reader)
+{
+ QCborValue result;
+ auto t = reader.type();
+ if (reader.lastError() != QCborError::NoError)
+ t = QCborStreamReader::Invalid;
+
+ switch (t) {
+ // basic types, no container needed:
+ case QCborStreamReader::UnsignedInteger:
+ case QCborStreamReader::NegativeInteger:
+ case QCborStreamReader::SimpleType:
+ case QCborStreamReader::Float16:
+ case QCborStreamReader::Float:
+ case QCborStreamReader::Double: {
+ Element e = decodeBasicValueFromCbor(reader);
+ result.n = e.value;
+ result.t = e.type;
+ break;
+ }
+
+ case QCborStreamReader::Invalid:
+ result.t = QCborValue::Invalid;
+ break; // probably a decode error
+
+ // strings
+ case QCborStreamReader::ByteArray:
+ case QCborStreamReader::String:
+ result.n = 0;
+ result.t = reader.isString() ? String : ByteArray;
+ result.container = new QCborContainerPrivate;
+ result.container->ref.ref();
+ result.container->decodeStringFromCbor(reader);
+ break;
+
+ // containers
+ case QCborStreamReader::Array:
+ case QCborStreamReader::Map:
+ result.n = -1;
+ result.t = reader.isArray() ? Array : Map;
+ result.container = createContainerFromCbor(reader);
+ break;
+
+ // tag
+ case QCborStreamReader::Tag:
+ result = taggedValueFromCbor(reader);
+ break;
+ }
+
+ return result;
+}
+
+/*!
+ \overload
+
+ Decodes one item from the CBOR stream found in the byte array \a ba and
+ returns the equivalent representation. This function is recursive: if the
+ item is a map or array, it will decode all items found in that map or
+ array, until the outermost object is finished.
+
+ This function stores the error state, if any, in the object pointed to by
+ \a error, along with the offset of where the error occurred. If no error
+ happened, it stores \l{QCborError}{NoError} in the error state and the
+ number of bytes that it consumed (that is, it stores the offset for the
+ first unused byte). Using that information makes it possible to parse
+ further data that may exist in the same byte array.
+
+ The returned value may be partially complete and indistinguishable from a
+ valid QCborValue even if the decoding failed. To determine if there was an
+ error, check if there was an error stored in \a error. This function stops
+ decoding immediately after the first error.
+
+ \sa toCbor(), toDiagnosticNotation(), toVariant(), toJsonValue()
+ */
+QCborValue QCborValue::fromCbor(const QByteArray &ba, QCborParserError *error)
+{
+ QCborStreamReader reader(ba);
+ QCborValue result = fromCbor(reader);
+ if (error) {
+ error->error = reader.lastError();
+ error->offset = reader.currentOffset();
+ }
+ return result;
+}
+
+/*!
+ Encodes this QCborValue object to its CBOR representation, using the
+ options specified in \a opt, and return the byte array containing that
+ representation.
+
+ This function will not fail, except if this QCborValue or any of the
+ contained items, if this is a map or array, are invalid. Invalid types are
+ not produced normally by the API, but can result from decoding errors.
+
+ By default, this function performs no transformation on the values in the
+ QCborValue, writing all floating point directly as double-precision (\c
+ double) types. If the \l{EncodingOption}{UseFloat} option is specified, it
+ will use single precision (\c float) for any floating point value for which
+ there's no loss of precision in using that representation. That includes
+ infinities and NaN values.
+
+ Similarly, if \l{EncodingOption}{UseFloat16} is specified, this function
+ will try to use half-precision (\l qfloat16) floating point if the
+ conversion to that results in no loss of precision. This is always true for
+ infinities and NaN.
+
+ If \l{EncodingOption}{UseIntegers} is specified, it will use integers for
+ any floating point value that contains an actual integer.
+
+ \sa fromCbor(), fromVariant(), fromJsonValue()
+ */
+QByteArray QCborValue::toCbor(EncodingOptions opt)
+{
+ QByteArray result;
+ QCborStreamWriter writer(&result);
+ toCbor(writer, opt);
+ return result;
+}
+
+/*!
+ \overload
+
+ Encodes this QCborValue object to its CBOR representation, using the
+ options specified in \a opt, to the writer specified by \a writer. The same
+ writer can be used by multiple QCborValues, for example, in order to encode
+ different elements in a larger array.
+
+ This function will not fail, except if this QCborValue or any of the
+ contained items, if this is a map or array, are invalid. Invalid types are
+ not produced normally by the API, but can result from decoding errors.
+
+ By default, this function performs no transformation on the values in the
+ QCborValue, writing all floating point directly as double-precision
+ (binary64) types. If the \l{EncodingOption}{UseFloat} option is
+ specified, it will use single precision (binary32) for any floating point
+ value for which there's no loss of precision in using that representation.
+ That includes infinities and NaN values.
+
+ Similarly, if \l{EncodingOption}{UseFloat16} is specified, this function
+ will try to use half-precision (binary16) floating point if the conversion
+ to that results in no loss of precision. This is always true for infinities
+ and NaN.
+
+ If \l{EncodingOption}{UseIntegers} is specified, it will use integers
+ for any floating point value that contains an actual integer.
+
+ \sa fromCbor(), fromVariant(), fromJsonValue()
+ */
+Q_NEVER_INLINE void QCborValue::toCbor(QCborStreamWriter &writer, EncodingOptions opt)
+{
+ if (isContainer() || isTag())
+ return encodeToCbor(writer, container, -type(), opt);
+ if (container)
+ return encodeToCbor(writer, container, n, opt);
+
+ // very simple types
+ if (isSimpleType())
+ return writer.append(toSimpleType());
+
+ switch (type()) {
+ case Integer:
+ return writer.append(n);
+
+ case Double:
+ return writeDoubleToCbor(writer, fp_helper(), opt);
+
+ case Invalid:
+ return;
+
+ case SimpleType:
+ case False:
+ case True:
+ case Null:
+ case Undefined:
+ // handled by "if (isSimpleType())"
+ Q_UNREACHABLE();
+ break;
+
+ case ByteArray:
+ // Byte array with no container is empty
+ return writer.appendByteString("", 0);
+
+ case String:
+ // String with no container is empty
+ return writer.appendTextString("", 0);
+
+ case Array:
+ case Map:
+ case Tag:
+ // handled by "if (isContainer() || isTag())"
+ Q_UNREACHABLE();
+ break;
+
+ case DateTime:
+ case Url:
+ case RegularExpression:
+ case Uuid:
+ // not possible
+ Q_UNREACHABLE();
+ break;
+ }
+}
+
+/*!
+ Creates the diagnostic notation equivalent of this CBOR object and return
+ it. The \a opts parameter controls the dialect of the notation. Diagnostic
+ notation is useful in debugging, to aid the developer in understanding what
+ value is stored in the QCborValue or in a CBOR stream. For that reason, the
+ Qt API provides no support for parsing the diagnostic back into the
+ in-memory format or CBOR stream, though the representation is unique and it
+ would be possible.
+
+ CBOR diagnostic notation is specified by
+ \l{https://tools.ietf.org/html/rfc7049#section-6}{section 6} of RFC 7049.
+ It is a text representation of the CBOR stream and it is very similar to
+ JSON, but it supports the CBOR types not found in JSON. The extended format
+ enabled by the \l{DiagnosticNotationOption}{ExtendedFormat} flag is
+ currently in some IETF drafts and its format is subject to change.
+
+ This function produces the equivalent representation of the stream that
+ toCbor() would produce, without any transformation option provided there.
+ This also implies this function may not produce a representation of the
+ stream that was used to create the object, if it was created using
+ fromCbor(), as that function may have applied transformations. For a
+ high-fidelity notation of a stream, without transformation, see the \c
+ cbordump example.
+
+ \sa toCbor(), toJsonDocument(), QJsonDocument::toJson()
+ */
+QString QCborValue::toDiagnosticNotation(DiagnosticNotationOptions opts) const
+{
+ return DiagnosticNotation::create(*this, opts);
+}
+
+void QCborValueRef::toCbor(QCborStreamWriter &writer, QCborValue::EncodingOptions opt)
+{
+ concrete().toCbor(writer, opt);
+}
+
+void QCborValueRef::assign(QCborValueRef that, const QCborValue &other)
+{
+ that.d->replaceAt(that.i, other);
+}
+
+void QCborValueRef::assign(QCborValueRef that, QCborValue &&other)
+{
+ that.d->replaceAt(that.i, other, QCborContainerPrivate::MoveContainer);
+}
+
+void QCborValueRef::assign(QCborValueRef that, const QCborValueRef other)
+{
+ // ### optimize?
+ assign(that, other.concrete());
+}
+
+QCborValue QCborValueRef::concrete(QCborValueRef self) noexcept
+{
+ return self.d->valueAt(self.i);
+}
+
+QCborValue::Type QCborValueRef::concreteType(QCborValueRef self) noexcept
+{
+ return self.d->elements.at(self.i).type;
+}
+
+inline QCborArray::QCborArray(QCborContainerPrivate &dd) noexcept
+ : d(&dd)
+{
+}
+
+inline QCborMap::QCborMap(QCborContainerPrivate &dd) noexcept
+ : d(&dd)
+{
+}
+
+#if !defined(QT_NO_DEBUG_STREAM)
+static QDebug debugContents(QDebug &dbg, const QCborValue &v)
+{
+ switch (v.type()) {
+ case QCborValue::Integer:
+ return dbg << v.toInteger();
+ case QCborValue::ByteArray:
+ return dbg << "QByteArray(" << v.toByteArray() << ')';
+ case QCborValue::String:
+ return dbg << v.toString();
+ case QCborValue::Array:
+ return dbg << v.toArray();
+ case QCborValue::Map:
+ return dbg << v.toMap();
+ case QCborValue::Tag:
+ dbg << v.tag() << ", ";
+ return debugContents(dbg, v.taggedValue());
+ case QCborValue::SimpleType:
+ break;
+ case QCborValue::True:
+ return dbg << true;
+ case QCborValue::False:
+ return dbg << false;
+ case QCborValue::Null:
+ return dbg << "nullptr";
+ case QCborValue::Undefined:
+ return dbg;
+ case QCborValue::Double: {
+ qint64 i = qint64(v.toDouble());
+ if (i == v.toDouble())
+ return dbg << i << ".0";
+ else
+ return dbg << v.toDouble();
+ }
+ case QCborValue::DateTime:
+ return dbg << v.toDateTime();
+ case QCborValue::Url:
+ return dbg << v.toUrl();
+ case QCborValue::RegularExpression:
+ return dbg << v.toRegularExpression();
+ case QCborValue::Uuid:
+ return dbg << v.toUuid();
+ case QCborValue::Invalid:
+ return dbg << "<invalid>";
+ }
+ if (v.isSimpleType())
+ return dbg << v.toSimpleType();
+ return dbg << "<unknown type " << hex << int(v.type()) << dec << '>';
+}
+QDebug operator<<(QDebug dbg, const QCborValue &v)
+{
+ QDebugStateSaver saver(dbg);
+ dbg.nospace() << "QCborValue(";
+ return debugContents(dbg, v) << ')';
+}
+#endif
+
+QT_END_NAMESPACE
+
+#include "qcborarray.cpp"
+#include "qcbormap.cpp"
+
+#include "moc_qcborvalue.cpp"
diff --git a/src/corelib/serialization/qcborvalue.h b/src/corelib/serialization/qcborvalue.h
new file mode 100644
index 0000000000..d44c7fbae7
--- /dev/null
+++ b/src/corelib/serialization/qcborvalue.h
@@ -0,0 +1,465 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QCBORVALUE_H
+#define QCBORVALUE_H
+
+#include <QtCore/qbytearray.h>
+#include <QtCore/qdatetime.h>
+#include <QtCore/qcborcommon.h>
+#include <QtCore/qregularexpression.h>
+#include <QtCore/qstring.h>
+#include <QtCore/qstringview.h>
+#include <QtCore/qurl.h>
+#include <QtCore/quuid.h>
+#include <QtCore/qvariant.h>
+#include <QtCore/qvector.h>
+
+// See qcborcommon.h for why we check
+#if defined(QT_X11_DEFINES_FOUND)
+# undef True
+# undef False
+#endif
+
+#if QT_HAS_INCLUDE(<compare>)
+# include <compare>
+#endif
+
+QT_BEGIN_NAMESPACE
+
+class QCborArray;
+class QCborMap;
+class QCborStreamReader;
+class QCborStreamWriter;
+
+struct QCborParserError
+{
+ qint64 offset = 0;
+ QCborError error = {};
+
+ QString errorString() const { return error.toString(); }
+};
+
+class QCborContainerPrivate;
+class Q_CORE_EXPORT QCborValue
+{
+ Q_GADGET
+public:
+ enum EncodingOption {
+ SortKeysInMaps = 0x01,
+ UseFloat = 0x02,
+ UseFloat16 = UseFloat | 0x04,
+ UseIntegers = 0x08,
+
+ NoTransformation = 0
+ };
+ Q_DECLARE_FLAGS(EncodingOptions, EncodingOption)
+
+ enum DiagnosticNotationOption {
+ Compact = 0x00,
+ LineWrapped = 0x01,
+ ExtendedFormat = 0x02
+ };
+ Q_DECLARE_FLAGS(DiagnosticNotationOptions, DiagnosticNotationOption)
+
+ // different from QCborStreamReader::Type because we have more types
+ enum Type : int {
+ Integer = 0x00,
+ ByteArray = 0x40,
+ String = 0x60,
+ Array = 0x80,
+ Map = 0xa0,
+ Tag = 0xc0,
+
+ // range 0x100 - 0x1ff for Simple Types
+ SimpleType = 0x100,
+ False = SimpleType + int(QCborSimpleType::False),
+ True = SimpleType + int(QCborSimpleType::True),
+ Null = SimpleType + int(QCborSimpleType::Null),
+ Undefined = SimpleType + int(QCborSimpleType::Undefined),
+
+ Double = 0x202,
+
+ // extended (tagged) types
+ DateTime = 0x10000,
+ Url = 0x10020,
+ RegularExpression = 0x10023,
+ Uuid = 0x10025,
+
+ Invalid = -1
+ };
+ Q_ENUM(Type)
+
+ QCborValue() {}
+ QCborValue(Type t_) : t(t_) {}
+ QCborValue(std::nullptr_t) : t(Null) {}
+ QCborValue(bool b_) : t(b_ ? True : False) {}
+#ifndef Q_QDOC
+ QCborValue(int i) : QCborValue(qint64(i)) {}
+ QCborValue(unsigned u) : QCborValue(qint64(u)) {}
+#endif
+ QCborValue(qint64 i) : n(i), t(Integer) {}
+ QCborValue(double v) : t(Double) { memcpy(&n, &v, sizeof(n)); }
+ QCborValue(QCborSimpleType st) : t(type_helper(st)) {}
+
+ QCborValue(const QByteArray &ba);
+ QCborValue(const QString &s);
+ QCborValue(QLatin1String s);
+#ifndef QT_NO_CAST_FROM_ASCII
+ QT_ASCII_CAST_WARN QCborValue(const char *s) : QCborValue(QString::fromUtf8(s)) {}
+#endif
+ QCborValue(const QCborArray &a);
+ QCborValue(QCborArray &&a);
+ QCborValue(const QCborMap &m);
+ QCborValue(QCborMap &&m);
+ QCborValue(QCborTag tag, const QCborValue &taggedValue = QCborValue());
+ QCborValue(QCborKnownTags t_, const QCborValue &tv = QCborValue())
+ : QCborValue(QCborTag(t_), tv)
+ {}
+
+ explicit QCborValue(const QDateTime &dt);
+ explicit QCborValue(const QUrl &url);
+ explicit QCborValue(const QRegularExpression &rx);
+ explicit QCborValue(const QUuid &uuid);
+
+ ~QCborValue() { if (container) dispose(); }
+
+ // make sure const char* doesn't go call the bool constructor
+ QCborValue(const void *) = delete;
+
+ QCborValue(const QCborValue &other);
+ QCborValue(QCborValue &&other) noexcept
+ : n(other.n), container(other.container), t(other.t)
+ {
+ other.t = Undefined;
+ other.container = nullptr;
+ }
+ QCborValue &operator=(const QCborValue &other);
+ QCborValue &operator=(QCborValue &&other) noexcept
+ {
+ QCborValue tmp;
+ qSwap(*this, tmp);
+ qSwap(other, *this);
+ return *this;
+ }
+
+ void swap(QCborValue &other) noexcept
+ {
+ qSwap(n, other.n);
+ qSwap(container, other.container);
+ qSwap(t, other.t);
+ }
+
+ Type type() const { return t; }
+ bool isInteger() const { return type() == Integer; }
+ bool isByteArray() const { return type() == ByteArray; }
+ bool isString() const { return type() == String; }
+ bool isArray() const { return type() == Array; }
+ bool isMap() const { return type() == Map; }
+ bool isTag() const { return isTag_helper(type()); }
+ bool isFalse() const { return type() == False; }
+ bool isTrue() const { return type() == True; }
+ bool isBool() const { return isFalse() || isTrue(); }
+ bool isNull() const { return type() == Null; }
+ bool isUndefined() const { return type() == Undefined; }
+ bool isDouble() const { return type() == Double; }
+ bool isDateTime() const { return type() == DateTime; }
+ bool isUrl() const { return type() == Url; }
+ bool isRegularExpression() const { return type() == RegularExpression; }
+ bool isUuid() const { return type() == Uuid; }
+ bool isInvalid() const { return type() == Invalid; }
+ bool isContainer() const { return isMap() || isArray(); }
+
+ bool isSimpleType() const
+ {
+ return int(type()) >> 8 == int(SimpleType) >> 8;
+ }
+ bool isSimpleType(QCborSimpleType st) const
+ {
+ return type() == type_helper(st);
+ }
+ QCborSimpleType toSimpleType(QCborSimpleType defaultValue = QCborSimpleType::Undefined) const
+ {
+ return isSimpleType() ? QCborSimpleType(type() & 0xff) : defaultValue;
+ }
+
+ qint64 toInteger(qint64 defaultValue = 0) const
+ { return isInteger() ? value_helper() : isDouble() ? qint64(fp_helper()) : defaultValue; }
+ bool toBool(bool defaultValue = false) const
+ { return isBool() ? isTrue() : defaultValue; }
+ double toDouble(double defaultValue = 0) const
+ { return isDouble() ? fp_helper() : isInteger() ? double(value_helper()) : defaultValue; }
+
+ QCborTag tag(QCborTag defaultValue = QCborTag(-1)) const;
+ QCborValue taggedValue(const QCborValue &defaultValue = QCborValue()) const;
+
+ QByteArray toByteArray(const QByteArray &defaultValue = {}) const;
+ QString toString(const QString &defaultValue = {}) const;
+ QDateTime toDateTime(const QDateTime &defaultValue = {}) const;
+ QUrl toUrl(const QUrl &defaultValue = {}) const;
+ QRegularExpression toRegularExpression(const QRegularExpression &defaultValue = {}) const;
+ QUuid toUuid(const QUuid &defaultValue = {}) const;
+
+#ifdef Q_QDOC
+ QCborArray toArray(const QCborArray &a = {}) const;
+ QCborMap toMap(const QCborMap &m = {}) const;
+#else
+ // only forward-declared, need split functions
+ QCborArray toArray() const;
+ QCborArray toArray(const QCborArray &defaultValue) const;
+ QCborMap toMap() const;
+ QCborMap toMap(const QCborMap &defaultValue) const;
+#endif
+
+ const QCborValue operator[](const QString &key) const;
+ const QCborValue operator[](QLatin1String key) const;
+ const QCborValue operator[](qint64 key) const;
+
+ int compare(const QCborValue &other) const;
+#if QT_HAS_INCLUDE(<compare>)
+ std::strong_ordering operator<=>(const QCborValue &other) const
+ {
+ int c = compare(other);
+ if (c > 0) return std::partial_ordering::greater;
+ if (c == 0) return std::partial_ordering::equivalent;
+ return std::partial_ordering::less;
+ }
+#else
+ bool operator==(const QCborValue &other) const noexcept
+ { return compare(other) == 0; }
+ bool operator!=(const QCborValue &other) const noexcept
+ { return !(*this == other); }
+ bool operator<(const QCborValue &other) const
+ { return compare(other) < 0; }
+#endif
+
+ static QCborValue fromVariant(const QVariant &variant);
+ QVariant toVariant() const;
+ static QCborValue fromJsonValue(const QJsonValue &v);
+ QJsonValue toJsonValue() const;
+
+ static QCborValue fromCbor(QCborStreamReader &reader);
+ static QCborValue fromCbor(const QByteArray &ba, QCborParserError *error = nullptr);
+ static QCborValue fromCbor(const char *data, qsizetype len, QCborParserError *error = nullptr)
+ { return fromCbor(QByteArray(data, int(len)), error); }
+ static QCborValue fromCbor(const quint8 *data, qsizetype len, QCborParserError *error = nullptr)
+ { return fromCbor(QByteArray(reinterpret_cast<const char *>(data), int(len)), error); }
+ QByteArray toCbor(EncodingOptions opt = NoTransformation);
+ void toCbor(QCborStreamWriter &writer, EncodingOptions opt = NoTransformation);
+
+ QString toDiagnosticNotation(DiagnosticNotationOptions opts = Compact) const;
+
+private:
+ friend class QCborValueRef;
+ friend class QCborContainerPrivate;
+ qint64 n = 0;
+ QCborContainerPrivate *container = nullptr;
+ Type t = Undefined;
+
+ void dispose();
+ qint64 value_helper() const
+ {
+ return n;
+ }
+
+ double fp_helper() const
+ {
+ Q_STATIC_ASSERT(sizeof(double) == sizeof(n));
+ double d;
+ memcpy(&d, &n, sizeof(d));
+ return d;
+ }
+
+ Q_DECL_CONSTEXPR static Type type_helper(QCborSimpleType st)
+ {
+ return Type(quint8(st) | SimpleType);
+ }
+
+ Q_DECL_CONSTEXPR static bool isTag_helper(Type t)
+ {
+ return t == Tag || t >= 0x10000;
+ }
+};
+Q_DECLARE_SHARED(QCborValue)
+
+class Q_CORE_EXPORT QCborValueRef
+{
+public:
+ operator QCborValue() const { return concrete(); }
+
+ QCborValueRef(const QCborValueRef &) noexcept = default;
+ QCborValueRef(QCborValueRef &&) noexcept = default;
+ QCborValueRef &operator=(const QCborValue &other)
+ { assign(*this, other); return *this; }
+ QCborValueRef &operator=(QCborValue &&other)
+ { assign(*this, std::move(other)); other.container = nullptr; return *this; }
+ QCborValueRef &operator=(const QCborValueRef &other)
+ { assign(*this, other); return *this; }
+
+ QCborValue::Type type() const { return concreteType(); }
+ bool isInteger() const { return type() == QCborValue::Integer; }
+ bool isByteArray() const { return type() == QCborValue::ByteArray; }
+ bool isString() const { return type() == QCborValue::String; }
+ bool isArray() const { return type() == QCborValue::Array; }
+ bool isMap() const { return type() == QCborValue::Map; }
+ bool isTag() const { return QCborValue::isTag_helper(type()); }
+ bool isFalse() const { return type() == QCborValue::False; }
+ bool isTrue() const { return type() == QCborValue::True; }
+ bool isBool() const { return isFalse() || isTrue(); }
+ bool isNull() const { return type() == QCborValue::Null; }
+ bool isUndefined() const { return type() == QCborValue::Undefined; }
+ bool isDouble() const { return type() == QCborValue::Double; }
+ bool isDateTime() const { return type() == QCborValue::DateTime; }
+ bool isUrl() const { return type() == QCborValue::Url; }
+ bool isRegularExpression() const { return type() == QCborValue::RegularExpression; }
+ bool isUuid() const { return type() == QCborValue::Uuid; }
+ bool isInvalid() const { return type() == QCborValue::Invalid; }
+ bool isContainer() const { return isMap() || isArray(); }
+ bool isSimpleType() const
+ {
+ return type() >= QCborValue::SimpleType && type() < QCborValue::SimpleType + 0x100;
+ }
+ bool isSimpleType(QCborSimpleType st) const
+ {
+ return type() == QCborValue::type_helper(st);
+ }
+
+ QCborTag tag(QCborTag defaultValue = QCborTag(-1)) const
+ { return concrete().tag(defaultValue); }
+ QCborValue taggedValue(const QCborValue &defaultValue = QCborValue()) const
+ { return concrete().taggedValue(defaultValue); }
+
+ qint64 toInteger(qint64 defaultValue = 0) const
+ { return concrete().toInteger(defaultValue); }
+ bool toBool(bool defaultValue = false) const
+ { return concrete().toBool(defaultValue); }
+ double toDouble(double defaultValue = 0) const
+ { return concrete().toDouble(defaultValue); }
+
+ QByteArray toByteArray(const QByteArray &defaultValue = {}) const
+ { return concrete().toByteArray(defaultValue); }
+ QString toString(const QString &defaultValue = {}) const
+ { return concrete().toString(defaultValue); }
+ QDateTime toDateTime(const QDateTime &defaultValue = {}) const
+ { return concrete().toDateTime(defaultValue); }
+ QUrl toUrl(const QUrl &defaultValue = {}) const
+ { return concrete().toUrl(defaultValue); }
+ QRegularExpression toRegularExpression(const QRegularExpression &defaultValue = {}) const
+ { return concrete().toRegularExpression(defaultValue); }
+ QUuid toUuid(const QUuid &defaultValue = {}) const
+ { return concrete().toUuid(defaultValue); }
+
+#ifdef Q_QDOC
+ QCborArray toArray(const QCborArray &a = {}) const;
+ QCborMap toMap(const QCborMap &m = {}) const;
+#else
+ // only forward-declared, need split functions. Implemented in qcbor{array,map}.h
+ QCborArray toArray() const;
+ QCborArray toArray(const QCborArray &a) const;
+ QCborMap toMap() const;
+ QCborMap toMap(const QCborMap &m) const;
+#endif
+
+ int compare(const QCborValue &other) const
+ { return concrete().compare(other); }
+#if QT_HAS_INCLUDE(<compare>)
+ std::strong_ordering operator<=>(const QCborValue &other) const
+ {
+ int c = compare(other);
+ if (c > 0) return std::strong_ordering::greater;
+ if (c == 0) return std::strong_ordering::equivalent;
+ return std::strong_ordering::less;
+ }
+#else
+ bool operator==(const QCborValue &other) const
+ { return compare(other) == 0; }
+ bool operator!=(const QCborValue &other) const
+ { return !(*this == other); }
+ bool operator<(const QCborValue &other) const
+ { return compare(other) < 0; }
+#endif
+
+ QVariant toVariant() const { return concrete().toVariant(); }
+ QJsonValue toJsonValue() const;
+
+ QByteArray toCbor(QCborValue::EncodingOptions opt = QCborValue::NoTransformation)
+ { return concrete().toCbor(opt); }
+ void toCbor(QCborStreamWriter &writer, QCborValue::EncodingOptions opt = QCborValue::NoTransformation);
+
+ QString toDiagnosticNotation(QCborValue::DiagnosticNotationOptions opt = QCborValue::Compact)
+ { return concrete().toDiagnosticNotation(opt); }
+
+private:
+ friend class QCborArray;
+ friend class QCborMap;
+ friend class QCborContainerPrivate;
+ friend class QCborValueRefPtr;
+
+ // static so we can pass this by value
+ static void assign(QCborValueRef that, const QCborValue &other);
+ static void assign(QCborValueRef that, QCborValue &&other);
+ static void assign(QCborValueRef that, const QCborValueRef other);
+ static QCborValue concrete(QCborValueRef that) noexcept;
+ QCborValue concrete() const noexcept { return concrete(*this); }
+
+ static QCborValue::Type concreteType(QCborValueRef self) noexcept Q_DECL_PURE_FUNCTION;
+ QCborValue::Type concreteType() const noexcept { return concreteType(*this); }
+
+ // this will actually be invalid...
+ Q_DECL_CONSTEXPR QCborValueRef() : d(nullptr), i(0) {}
+
+ QCborValueRef(QCborContainerPrivate *dd, qsizetype ii)
+ : d(dd), i(ii)
+ {}
+ QCborContainerPrivate *d;
+ qsizetype i;
+};
+
+#if !defined(QT_NO_DEBUG_STREAM)
+Q_CORE_EXPORT QDebug operator<<(QDebug, const QCborValue &v);
+#endif
+
+QT_END_NAMESPACE
+
+#if defined(QT_X11_DEFINES_FOUND)
+# define True 1
+# define False 0
+#endif
+
+#endif // QCBORVALUE_H
diff --git a/src/corelib/serialization/qcborvalue_p.h b/src/corelib/serialization/qcborvalue_p.h
new file mode 100644
index 0000000000..02aa05bcdb
--- /dev/null
+++ b/src/corelib/serialization/qcborvalue_p.h
@@ -0,0 +1,396 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QCBORVALUE_P_H
+#define QCBORVALUE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API.
+// This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qcborvalue.h"
+
+#include <private/qglobal_p.h>
+#include <private/qutfcodec_p.h>
+
+QT_BEGIN_NAMESPACE
+
+namespace QtCbor {
+struct Undefined {};
+struct Element
+{
+ enum ValueFlag : quint32 {
+ IsContainer = 0x0001,
+ HasByteData = 0x0002,
+ StringIsUtf16 = 0x0004,
+ StringIsAscii = 0x0008
+ };
+ Q_DECLARE_FLAGS(ValueFlags, ValueFlag)
+
+ union {
+ qint64 value;
+ QCborContainerPrivate *container;
+ };
+ QCborValue::Type type;
+ ValueFlags flags = {};
+
+ Element(qint64 v = 0, QCborValue::Type t = QCborValue::Undefined, ValueFlags f = {})
+ : value(v), type(t), flags(f)
+ {}
+
+ Element(QCborContainerPrivate *d, QCborValue::Type t, ValueFlags f = {})
+ : container(d), type(t), flags(f | IsContainer)
+ {}
+
+ double fpvalue() const
+ {
+ double d;
+ memcpy(&d, &value, sizeof(d));
+ return d;
+ }
+};
+Q_DECLARE_OPERATORS_FOR_FLAGS(Element::ValueFlags)
+Q_STATIC_ASSERT(sizeof(Element) == 16);
+
+struct ByteData
+{
+ QByteArray::size_type len;
+
+ const char *byte() const { return reinterpret_cast<const char *>(this + 1); }
+ char *byte() { return reinterpret_cast<char *>(this + 1); }
+ const QChar *utf16() const { return reinterpret_cast<const QChar *>(this + 1); }
+ QChar *utf16() { return reinterpret_cast<QChar *>(this + 1); }
+
+ QByteArray toByteArray() const { return QByteArray(byte(), len); }
+ QString toString() const { return QString(utf16(), len / 2); }
+ QString toUtf8String() const { return QString::fromUtf8(byte(), len); }
+
+ QByteArray asByteArrayView() const { return QByteArray::fromRawData(byte(), len); }
+ QLatin1String asLatin1() const { return QLatin1String(byte(), len); }
+ QStringView asStringView() const{ return QStringView(utf16(), len / 2); }
+ QString asQStringRaw() const { return QString::fromRawData(utf16(), len / 2); }
+};
+Q_STATIC_ASSERT(std::is_pod<ByteData>::value);
+} // namespace QtCbor
+
+Q_DECLARE_TYPEINFO(QtCbor::Element, Q_PRIMITIVE_TYPE);
+
+class QCborContainerPrivate : public QSharedData
+{
+ friend class QExplicitlySharedDataPointer<QCborContainerPrivate>;
+ ~QCborContainerPrivate();
+
+public:
+ enum ContainerDisposition { CopyContainer, MoveContainer };
+
+ QByteArray::size_type usedData = 0;
+ QByteArray data;
+ QVector<QtCbor::Element> elements;
+
+ void deref() { if (!ref.deref()) delete this; }
+ void compact(qsizetype reserved);
+ static QCborContainerPrivate *clone(QCborContainerPrivate *d, qsizetype reserved = -1);
+ static QCborContainerPrivate *detach(QCborContainerPrivate *d, qsizetype reserved);
+
+ qptrdiff addByteData(const char *block, qsizetype len)
+ {
+ // This function does not do overflow checking, since the len parameter
+ // is expected to be trusted. There's another version of this function
+ // in decodeStringFromCbor(), which checks.
+
+ qptrdiff offset = data.size();
+
+ // align offset
+ offset += Q_ALIGNOF(QtCbor::ByteData) - 1;
+ offset &= ~(Q_ALIGNOF(QtCbor::ByteData) - 1);
+
+ qptrdiff increment = qptrdiff(sizeof(QtCbor::ByteData)) + len;
+
+ usedData += increment;
+ data.resize(offset + increment);
+
+ char *ptr = data.begin() + offset;
+ auto b = new (ptr) QtCbor::ByteData;
+ b->len = len;
+ if (block)
+ memcpy(b->byte(), block, len);
+
+ return offset;
+ }
+
+ const QtCbor::ByteData *byteData(QtCbor::Element e) const
+ {
+ if ((e.flags & QtCbor::Element::HasByteData) == 0)
+ return nullptr;
+
+ size_t offset = size_t(e.value);
+ Q_ASSERT((offset % Q_ALIGNOF(QtCbor::ByteData)) == 0);
+ Q_ASSERT(offset + sizeof(QtCbor::ByteData) <= size_t(data.size()));
+
+ auto b = reinterpret_cast<const QtCbor::ByteData *>(data.constData() + offset);
+ Q_ASSERT(offset + sizeof(*b) + size_t(b->len) <= size_t(data.size()));
+ return b;
+ }
+ const QtCbor::ByteData *byteData(qsizetype idx) const
+ {
+ return byteData(elements.at(idx));
+ }
+
+ QCborContainerPrivate *containerAt(qsizetype idx, QCborValue::Type type) const
+ {
+ const QtCbor::Element &e = elements.at(idx);
+ if (e.type != type || (e.flags & QtCbor::Element::IsContainer) == 0)
+ return nullptr;
+ return e.container;
+ }
+
+ void replaceAt_complex(QtCbor::Element &e, const QCborValue &value, ContainerDisposition disp);
+ void replaceAt_internal(QtCbor::Element &e, const QCborValue &value, ContainerDisposition disp)
+ {
+ if (value.container)
+ return replaceAt_complex(e, value, disp);
+
+ e.value = value.value_helper();
+ e.type = value.type();
+ if (value.isContainer())
+ e.container = nullptr;
+ }
+ void replaceAt(qsizetype idx, const QCborValue &value, ContainerDisposition disp = CopyContainer)
+ {
+ QtCbor::Element &e = elements[idx];
+ if (e.flags & QtCbor::Element::IsContainer) {
+ e.container->deref();
+ e.container = nullptr;
+ e.flags = {};
+ } else if (auto b = byteData(e)) {
+ usedData -= b->len + sizeof(QtCbor::ByteData);
+ }
+ replaceAt_internal(e, value, disp);
+ }
+ void insertAt(qsizetype idx, const QCborValue &value, ContainerDisposition disp = CopyContainer)
+ {
+ replaceAt_internal(*elements.insert(elements.begin() + idx, {}), value, disp);
+ }
+
+ void append(QtCbor::Undefined)
+ {
+ elements.append(QtCbor::Element());
+ }
+ void append(qint64 value)
+ {
+ elements.append(QtCbor::Element(value , QCborValue::Integer));
+ }
+ void append(QCborTag tag)
+ {
+ elements.append(QtCbor::Element(qint64(tag), QCborValue::Tag));
+ }
+ void appendByteData(const char *data, qsizetype len, QCborValue::Type type,
+ QtCbor::Element::ValueFlags extraFlags = {})
+ {
+ elements.append(QtCbor::Element(addByteData(data, len), type,
+ QtCbor::Element::HasByteData | extraFlags));
+ }
+ void append(QLatin1String s)
+ {
+ if (!QtPrivate::isAscii(s))
+ return append(QString(s));
+
+ // US-ASCII is a subset of UTF-8, so we can keep in 8-bit
+ appendByteData(s.latin1(), s.size(), QCborValue::String,
+ QtCbor::Element::StringIsAscii);
+ }
+ void appendAsciiString(const QString &s);
+ void append(const QString &s)
+ {
+ if (QtPrivate::isAscii(s))
+ appendAsciiString(s);
+ else
+ appendByteData(reinterpret_cast<const char *>(s.constData()), s.size() * 2,
+ QCborValue::String, QtCbor::Element::StringIsUtf16);
+ }
+ void append(const QCborValue &v)
+ {
+ insertAt(elements.size(), v);
+ }
+
+ QByteArray byteArrayAt(qsizetype idx) const
+ {
+ const auto &e = elements.at(idx);
+ const auto data = byteData(e);
+ if (!data)
+ return QByteArray();
+ return data->toByteArray();
+ }
+ QString stringAt(qsizetype idx) const
+ {
+ const auto &e = elements.at(idx);
+ const auto data = byteData(e);
+ if (!data)
+ return QString();
+ if (e.flags & QtCbor::Element::StringIsUtf16)
+ return data->toString();
+ if (e.flags & QtCbor::Element::StringIsAscii)
+ return data->asLatin1();
+ return data->toUtf8String();
+ }
+
+ static void resetValue(QCborValue &v)
+ {
+ v.container = nullptr;
+ }
+
+ static QCborValue makeValue(QCborValue::Type type, qint64 n, QCborContainerPrivate *d = nullptr,
+ ContainerDisposition disp = CopyContainer)
+ {
+ QCborValue result(type);
+ result.n = n;
+ result.container = d;
+ if (d && disp == CopyContainer)
+ d->ref.ref();
+ return result;
+ }
+
+ QCborValue valueAt(qsizetype idx) const
+ {
+ const auto &e = elements.at(idx);
+
+ if (e.flags & QtCbor::Element::IsContainer) {
+ if (e.type == QCborValue::Tag && e.container->elements.size() != 2) {
+ // invalid tags can be created due to incomplete parsing
+ return makeValue(QCborValue::Invalid, 0, nullptr);
+ }
+ return makeValue(e.type, -1, e.container);
+ } else if (e.flags & QtCbor::Element::HasByteData) {
+ return makeValue(e.type, idx, const_cast<QCborContainerPrivate *>(this));
+ }
+ return makeValue(e.type, e.value);
+ }
+ QCborValue extractAt_complex(QtCbor::Element e);
+ QCborValue extractAt(qsizetype idx)
+ {
+ QtCbor::Element e;
+ qSwap(e, elements[idx]);
+
+ if (e.flags & QtCbor::Element::IsContainer) {
+ if (e.type == QCborValue::Tag && e.container->elements.size() != 2) {
+ // invalid tags can be created due to incomplete parsing
+ e.container->deref();
+ return makeValue(QCborValue::Invalid, 0, nullptr);
+ }
+ return makeValue(e.type, -1, e.container, MoveContainer);
+ } else if (e.flags & QtCbor::Element::HasByteData) {
+ return extractAt_complex(e);
+ }
+ return makeValue(e.type, e.value);
+ }
+
+ static QtCbor::Element elementFromValue(const QCborValue &value)
+ {
+ if (value.n >= 0 && value.container)
+ return value.container->elements.at(value.n);
+
+ QtCbor::Element e;
+ e.value = value.n;
+ e.type = value.t;
+ if (value.container) {
+ e.container = value.container;
+ e.flags = QtCbor::Element::IsContainer;
+ }
+ return e;
+ }
+
+ bool stringEqualsElement(qsizetype idx, QLatin1String s) const
+ {
+ const auto &e = elements.at(idx);
+ if (e.type != QCborValue::String)
+ return false;
+
+ const QtCbor::ByteData *b = byteData(idx);
+ if (!b)
+ return s.isEmpty();
+
+ if (e.flags & QtCbor::Element::StringIsUtf16)
+ return QtPrivate::compareStrings(b->asStringView(), s) == 0;
+ return QUtf8::compareUtf8(b->byte(), b->len, s) == 0;
+ }
+ bool stringEqualsElement(qsizetype idx, const QString &s) const
+ {
+ const auto &e = elements.at(idx);
+ if (e.type != QCborValue::String)
+ return false;
+
+ const QtCbor::ByteData *b = byteData(idx);
+ if (!b)
+ return s.isEmpty();
+
+ if (e.flags & QtCbor::Element::StringIsUtf16)
+ return QtPrivate::compareStrings(b->asStringView(), s) == 0;
+ return QUtf8::compareUtf8(b->byte(), b->len, s.data(), s.size()) == 0;
+ }
+
+ static int compareElement_helper(const QCborContainerPrivate *c1, QtCbor::Element e1,
+ const QCborContainerPrivate *c2, QtCbor::Element e2);
+ int compareElement(qsizetype idx, const QCborValue &value) const
+ {
+ auto &e1 = elements.at(idx);
+ auto e2 = elementFromValue(value);
+ return compareElement_helper(this, e1, value.container, e2);
+ }
+
+ void removeAt(qsizetype idx)
+ {
+ replaceAt(idx, {});
+ elements.remove(idx);
+ }
+
+ void decodeValueFromCbor(QCborStreamReader &reader);
+ void decodeFromCbor(QCborStreamReader &reader);
+ void decodeStringFromCbor(QCborStreamReader &reader);
+};
+
+QT_END_NAMESPACE
+
+#endif // QCBORVALUE_P_H
diff --git a/src/corelib/serialization/qdatastream.cpp b/src/corelib/serialization/qdatastream.cpp
index 8f419a4a46..54d1ae816b 100644
--- a/src/corelib/serialization/qdatastream.cpp
+++ b/src/corelib/serialization/qdatastream.cpp
@@ -564,6 +564,7 @@ void QDataStream::setByteOrder(ByteOrder bo)
\value Qt_5_9 Same as Qt_5_6
\value Qt_5_10 Same as Qt_5_6
\value Qt_5_11 Same as Qt_5_6
+ \value Qt_5_12 Same as Qt_5_6
\omitvalue Qt_DefaultCompiledVersion
\sa setVersion(), version()
diff --git a/src/corelib/serialization/qdatastream.h b/src/corelib/serialization/qdatastream.h
index 1775022355..eae0146553 100644
--- a/src/corelib/serialization/qdatastream.h
+++ b/src/corelib/serialization/qdatastream.h
@@ -98,10 +98,11 @@ public:
Qt_5_9 = Qt_5_8,
Qt_5_10 = Qt_5_9,
Qt_5_11 = Qt_5_10,
-#if QT_VERSION >= 0x050c00
+ Qt_5_12 = 18,
+#if QT_VERSION >= 0x050d00
#error Add the datastream version for this Qt version and update Qt_DefaultCompiledVersion
#endif
- Qt_DefaultCompiledVersion = Qt_5_11
+ Qt_DefaultCompiledVersion = Qt_5_12
};
enum ByteOrder {
diff --git a/src/corelib/serialization/qjson_p.h b/src/corelib/serialization/qjson_p.h
index dc56a49084..feba1faac6 100644
--- a/src/corelib/serialization/qjson_p.h
+++ b/src/corelib/serialization/qjson_p.h
@@ -69,6 +69,9 @@
QT_BEGIN_NAMESPACE
+// in qstring.cpp
+void qt_to_latin1_unchecked(uchar *dst, const ushort *uc, qsizetype len);
+
/*
This defines a binary data structure for Json data. The data structure is optimised for fast reading
and minimum allocations. The whole data structure can be mmap'ed and used directly.
@@ -294,31 +297,10 @@ public:
int len = d->length = str.length();
uchar *l = (uchar *)d->latin1;
const ushort *uc = (const ushort *)str.unicode();
- int i = 0;
-#ifdef __SSE2__
- for ( ; i + 16 <= len; i += 16) {
- __m128i chunk1 = _mm_loadu_si128((__m128i*)&uc[i]); // load
- __m128i chunk2 = _mm_loadu_si128((__m128i*)&uc[i + 8]); // load
- // pack the two vector to 16 x 8bits elements
- const __m128i result = _mm_packus_epi16(chunk1, chunk2);
- _mm_storeu_si128((__m128i*)&l[i], result); // store
- }
-# ifdef Q_PROCESSOR_X86_64
- // we can do one more round, of 8 characters
- if (i + 8 <= len) {
- __m128i chunk = _mm_loadu_si128((__m128i*)&uc[i]); // load
- // pack with itself, we'll discard the high part anyway
- chunk = _mm_packus_epi16(chunk, chunk);
- // unaligned 64-bit store
- qToUnaligned(_mm_cvtsi128_si64(chunk), l + i);
- i += 8;
- }
-# endif
-#endif
- for ( ; i < len; ++i)
- l[i] = uc[i];
- for ( ; (quintptr)(l+i) & 0x3; ++i)
- l[i] = 0;
+ qt_to_latin1_unchecked(l, uc, len);
+
+ for ( ; (quintptr)(l+len) & 0x3; ++len)
+ l[len] = 0;
return *this;
}
diff --git a/src/corelib/serialization/qjsoncbor.cpp b/src/corelib/serialization/qjsoncbor.cpp
new file mode 100644
index 0000000000..158f1950d0
--- /dev/null
+++ b/src/corelib/serialization/qjsoncbor.cpp
@@ -0,0 +1,954 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qcborvalue.h"
+#include "qcborvalue_p.h"
+
+#include "qcborarray.h"
+#include "qcbormap.h"
+#include "qjson_p.h"
+
+#include <private/qnumeric_p.h>
+#include <quuid.h>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QtCbor;
+
+static QJsonValue fpToJson(double v)
+{
+ return qt_is_finite(v) ? QJsonValue(v) : QJsonValue();
+}
+
+static QString simpleTypeString(QCborValue::Type t)
+{
+ int simpleType = t - QCborValue::SimpleType;
+ if (unsigned(simpleType) < 0x100)
+ return QString::fromLatin1("simple(%1)").arg(simpleType);
+
+ // if we got here, we got an unknown type
+ qWarning("QCborValue: found unknown type 0x%x", t);
+ return QString();
+
+}
+
+static QString encodeByteArray(const QCborContainerPrivate *d, qsizetype idx, QCborTag encoding)
+{
+ const ByteData *b = d->byteData(idx);
+ if (!b)
+ return QString();
+
+ QByteArray data = QByteArray::fromRawData(b->byte(), b->len);
+ if (encoding == QCborKnownTags::ExpectedBase16)
+ data = data.toHex();
+ else if (encoding == QCborKnownTags::ExpectedBase64)
+ data = data.toBase64();
+ else
+ data = data.toBase64(QByteArray::Base64UrlEncoding | QByteArray::OmitTrailingEquals);
+
+ return QString::fromLatin1(data, data.size());
+}
+
+static QString makeString(const QCborContainerPrivate *d, qsizetype idx);
+
+static QString maybeEncodeTag(const QCborContainerPrivate *d)
+{
+ qint64 tag = d->elements.at(0).value;
+ const Element &e = d->elements.at(1);
+ const ByteData *b = d->byteData(e);
+
+ switch (tag) {
+ case qint64(QCborKnownTags::DateTimeString):
+ case qint64(QCborKnownTags::Url):
+ if (e.type == QCborValue::String)
+ return makeString(d, 1);
+ break;
+
+ case qint64(QCborKnownTags::ExpectedBase64url):
+ case qint64(QCborKnownTags::ExpectedBase64):
+ case qint64(QCborKnownTags::ExpectedBase16):
+ if (e.type == QCborValue::ByteArray)
+ return encodeByteArray(d, 1, QCborTag(tag));
+ break;
+
+ case qint64(QCborKnownTags::Uuid):
+ if (e.type == QCborValue::ByteArray && b->len == sizeof(QUuid))
+ return QUuid::fromRfc4122(b->asByteArrayView()).toString(QUuid::WithoutBraces);
+ }
+
+ // don't know what to do, bail out
+ return QString();
+}
+
+static QString encodeTag(const QCborContainerPrivate *d)
+{
+ QString s;
+ if (!d || d->elements.size() != 2)
+ return s; // invalid (incomplete?) tag state
+
+ s = maybeEncodeTag(d);
+ if (s.isNull()) {
+ // conversion failed, ignore the tag and convert the tagged value
+ s = makeString(d, 1);
+ }
+ return s;
+}
+
+static Q_NEVER_INLINE QString makeString(const QCborContainerPrivate *d, qsizetype idx)
+{
+ const auto &e = d->elements.at(idx);
+
+ switch (e.type) {
+ case QCborValue::Integer:
+ return QString::number(qint64(e.value));
+
+ case QCborValue::Double:
+ return QString::number(e.fpvalue());
+
+ case QCborValue::ByteArray:
+ return encodeByteArray(d, idx, QCborTag(QCborKnownTags::ExpectedBase64url));
+
+ case QCborValue::String:
+ return d->stringAt(idx);
+
+ case QCborValue::Array:
+ case QCborValue::Map:
+ return d->valueAt(idx).toDiagnosticNotation(QCborValue::Compact);
+
+ case QCborValue::SimpleType:
+ break;
+
+ case QCborValue::False:
+ return QStringLiteral("false");
+
+ case QCborValue::True:
+ return QStringLiteral("true");
+
+ case QCborValue::Null:
+ return QStringLiteral("null");
+
+ case QCborValue::Undefined:
+ return QStringLiteral("undefined");
+
+ case QCborValue::Invalid:
+ return QString();
+
+ case QCborValue::Tag:
+ case QCborValue::DateTime:
+ case QCborValue::Url:
+ case QCborValue::RegularExpression:
+ case QCborValue::Uuid:
+ return encodeTag(e.flags & Element::IsContainer ? e.container : nullptr);
+ }
+
+ // maybe it's a simple type
+ return simpleTypeString(e.type);
+}
+
+static QJsonValue convertToJson(const QCborContainerPrivate *d, qsizetype idx);
+
+static QJsonArray convertToJsonArray(const QCborContainerPrivate *d)
+{
+ QJsonArray a;
+ if (d) {
+ for (qsizetype idx = 0; idx < d->elements.size(); ++idx)
+ a.append(convertToJson(d, idx));
+ }
+ return a;
+}
+
+static QJsonObject convertToJsonObject(const QCborContainerPrivate *d)
+{
+ QJsonObject o;
+ if (d) {
+ for (qsizetype idx = 0; idx < d->elements.size(); idx += 2)
+ o.insert(makeString(d, idx), convertToJson(d, idx + 1));
+ }
+ return o;
+}
+
+static QJsonValue convertExtendedTypeToJson(const QCborContainerPrivate *d)
+{
+ qint64 tag = d->elements.at(0).value;
+
+ switch (tag) {
+ case qint64(QCborKnownTags::Url):
+ // use the fullly-encoded URL form
+ if (d->elements.at(1).type == QCborValue::String)
+ return QUrl::fromEncoded(d->byteData(1)->asByteArrayView()).toString(QUrl::FullyEncoded);
+ Q_FALLTHROUGH();
+
+ case qint64(QCborKnownTags::DateTimeString):
+ case qint64(QCborKnownTags::ExpectedBase64url):
+ case qint64(QCborKnownTags::ExpectedBase64):
+ case qint64(QCborKnownTags::ExpectedBase16):
+ case qint64(QCborKnownTags::Uuid): {
+ // use the string conversion
+ QString s = maybeEncodeTag(d);
+ if (!s.isNull())
+ return s;
+ }
+ }
+
+ // for all other tags, ignore it and return the converted tagged item
+ return convertToJson(d, 1);
+}
+
+static QJsonValue convertToJson(const QCborContainerPrivate *d, qsizetype idx)
+{
+ // encoding the container itself
+ if (idx == -QCborValue::Array)
+ return convertToJsonArray(d);
+ if (idx == -QCborValue::Map)
+ return convertToJsonObject(d);
+ if (idx < 0) {
+ // tag-like type
+ if (!d || d->elements.size() != 2)
+ return QJsonValue::Undefined; // invalid state
+ return convertExtendedTypeToJson(d);
+ }
+
+ // an element in the container
+ const auto &e = d->elements.at(idx);
+ switch (e.type) {
+ case QCborValue::Integer:
+ return qint64(e.value);
+
+ case QCborValue::ByteArray:
+ case QCborValue::String:
+ case QCborValue::SimpleType:
+ // make string
+ break;
+
+ case QCborValue::Array:
+ case QCborValue::Map:
+ case QCborValue::Tag:
+ case QCborValue::DateTime:
+ case QCborValue::Url:
+ case QCborValue::RegularExpression:
+ case QCborValue::Uuid:
+ // recurse
+ return convertToJson(e.flags & Element::IsContainer ? e.container : nullptr, -e.type);
+
+ case QCborValue::Null:
+ return QJsonValue();
+
+ case QCborValue::Undefined:
+ case QCborValue::Invalid:
+ return QJsonValue(QJsonValue::Undefined);
+
+ case QCborValue::False:
+ return false;
+
+ case QCborValue::True:
+ return true;
+
+ case QCborValue::Double:
+ return fpToJson(e.fpvalue());
+ }
+
+ return makeString(d, idx);
+}
+
+/*!
+ Converts this QCborValue object to an equivalent representation in JSON and
+ returns it as a QJsonValue.
+
+ Please note that CBOR contains a richer and wider type set than JSON, so
+ some information may be lost in this conversion. The following table
+ compares CBOR types to JSON types and indicates whether information may be
+ lost or not.
+
+ \table
+ \header \li CBOR Type \li JSON Type \li Comments
+ \row \li Bool \li Bool \li No data loss possible
+ \row \li Double \li Number \li Infinities and NaN will be converted to Null;
+ no data loss for other values
+ \row \li Integer \li Number \li Data loss possible in the conversion if the
+ integer is larger than 2\sup{53} or smaller
+ than -2\sup{53}.
+ \row \li Null \li Null \li No data loss possible
+ \row \li Undefined \li Null \li Type information lost
+ \row \li String \li String \li No data loss possible
+ \row \li Byte Array \li String \li Converted to a lossless encoding like Base64url,
+ but the distinction between strings and byte
+ arrays is lost
+ \row \li Other simple types \li String \li Type information lost
+ \row \li Array \li Array \li Conversion applies to each contained value
+ \row \li Map \li Object \li Keys are converted to string; values converted
+ according to this table
+ \row \li Tags and extended types \li Special \li The tag number itself is lost and the tagged
+ value is converted to JSON
+ \endtable
+
+ For information on the conversion of CBOR map keys to string, see
+ QCborMap::toJsonObject().
+
+ If this QCborValue contains the undefined value, this function will return
+ an undefined QJsonValue too. Note that JSON does not support undefined
+ values and undefined QJsonValues are an extension to the specification.
+ They cannot be held in a QJsonArray or QJsonObject, but can be returned
+ from functions to indicate a failure. For all other intents and purposes,
+ they are the same as null.
+
+ \section3 Special handling of tags and extended types
+
+ Some tags are handled specially and change the transformation of the tagged
+ value from CBOR to JSON. The following table lists those special cases:
+
+ \table
+ \header \li Tag \li CBOR type \li Transformation
+ \row \li ExpectedBase64url \li Byte array \li Encodes the byte array as Base64url
+ \row \li ExpectedBase64 \li Byte array \li Encodes the byte array as Base64
+ \row \li ExpectedBase16 \li Byte array \li Encodes the byte array as hex
+ \row \li Url \li Url and String \li Uses QUrl::toEncoded() to normalize the
+ encoding to the URL's fully encoded format
+ \row \li Uuid \li Uuid and Byte array \li Uses QUuid::toString() to create
+ the string representation
+ \endtable
+
+ \sa fromJsonValue(), toVariant(), QCborArray::toJsonArray(), QCborMap::toJsonObject()
+ */
+QJsonValue QCborValue::toJsonValue() const
+{
+ if (container)
+ return convertToJson(container, n < 0 ? -type() : n);
+
+ // simple values
+ switch (type()) {
+ case Integer:
+ return n;
+
+ case Null:
+ return QJsonValue();
+
+ case False:
+ return false;
+
+ case True:
+ return true;
+
+ case Double:
+ return fpToJson(fp_helper());
+
+ case SimpleType:
+ break;
+
+ case Undefined:
+ case Invalid:
+ return QJsonValue(QJsonValue::Undefined);
+
+ case ByteArray:
+ case String:
+ // empty strings
+ return QString();
+
+ case Array:
+ // empty array
+ return QJsonArray();
+
+ case Map:
+ // empty map
+ return QJsonObject();
+
+ case Tag:
+ case DateTime:
+ case Url:
+ case RegularExpression:
+ case Uuid:
+ Q_UNREACHABLE();
+ return QJsonValue::Undefined;
+ }
+
+ return simpleTypeString(type());
+}
+
+QJsonValue QCborValueRef::toJsonValue() const
+{
+ return convertToJson(d, i);
+}
+
+/*!
+ Recursively converts every \l QCborValue element in this array to JSON
+ using QCborValue::toJsonValue() and returns the corresponding QJsonArray
+ composed of those elements.
+
+ Please note that CBOR contains a richer and wider type set than JSON, so
+ some information may be lost in this conversion. For more details on what
+ conversions are applied, see QCborValue::toJsonValue().
+
+ \sa fromJsonArray(), QCborValue::toJsonValue(), QCborMap::toJsonObject(), toVariantList()
+ */
+QJsonArray QCborArray::toJsonArray() const
+{
+ return convertToJsonArray(d.data());
+}
+
+/*!
+ Recursively converts every \l QCborValue value in this array to JSON using
+ QCborValue::toJsonValue() and creates a string key for all keys that aren't
+ strings, then returns the corresponding QJsonObject composed of those
+ associations.
+
+ Please note that CBOR contains a richer and wider type set than JSON, so
+ some information may be lost in this conversion. For more details on what
+ conversions are applied, see QCborValue::toJsonValue().
+
+ \section3 Map key conversion to string
+
+ JSON objects are defined as having string keys, unlike CBOR, so the
+ conversion of a QCborMap to QJsonObject will imply a step of
+ "stringification" of the key values. The conversion will use the special
+ handling of tags and extended types from above and will also convert the
+ rest of the types as follows:
+
+ \table
+ \header \li Type \li Transformation
+ \row \li Bool \li "true" and "false"
+ \row \li Null \li "null"
+ \row \li Undefined \li "undefined"
+ \row \li Integer \li The decimal string form of the number
+ \row \li Double \li The decimal string form of the number
+ \row \li Byte array \li Unless tagged differently (see above), encoded as
+ Base64url
+ \row \li Array \li Replaced by the compact form of its
+ \l{QCborValue::toDiagnosticNotation()}{Diagnostic notation}
+ \row \li Map \li Replaced by the compact form of its
+ \l{QCborValue::toDiagnosticNotation()}{Diagnostic notation}
+ \row \li Tags and extended types \li Tag number is dropped and the tagged value is converted
+ to string
+ \endtable
+
+ \sa fromJsonObject(), QCborValue::toJsonValue(), QCborArray::toJsonArray(), toVariantMap()
+ */
+QJsonObject QCborMap::toJsonObject() const
+{
+ return convertToJsonObject(d.data());
+}
+
+/*!
+ Converts this value to a native Qt type and returns the corresponding QVariant.
+
+ The following table lists the mapping performed between \l{Type}{QCborValue
+ types} and \l{QMetaType::Type}{Qt meta types}.
+
+ \table
+ \header \li CBOR Type \li Qt or C++ type \li Notes
+ \row \li Integer \li \l qint64 \li
+ \row \li Double \li \c double \li
+ \row \li Bool \li \c bool \li
+ \row \li Null \li \c std::nullptr_t \li
+ \row \li Undefined \li no type (QVariant()) \li
+ \row \li Byte array \li \l QByteArray \li
+ \row \li String \li \l QString \li
+ \row \li Array \li \l QVariantList \li Recursively converts all values
+ \row \li Map \li \l QVariantMap \li Key types are "stringified"
+ \row \li Other simple types \li \l QCborSimpleType \li
+ \row \li DateTime \li \l QDateTime \li
+ \row \li Url \li \l QUrl \li
+ \row \li RegularExpression \li \l QRegularExpression \li
+ \row \li Uuid \li \l QUuid \li
+ \row \li Other tags \li Special \li The tag is ignored and the tagged
+ value is converted using this
+ function
+ \endtable
+
+ Note that values in both CBOR Maps and Arrays are converted recursively
+ using this function too and placed in QVariantMap and QVariantList instead.
+ You will not find QCborMap and QCborArray stored inside the QVariants.
+
+ QVariantMaps have string keys, unlike CBOR, so the conversion of a QCborMap
+ to QVariantMap will imply a step of "stringification" of the key values.
+ See QCborMap::toJsonObject() for details.
+
+ \sa fromVariant(), toJsonValue(), QCborArray::toVariantList(), QCborMap::toVariantMap()
+ */
+QVariant QCborValue::toVariant() const
+{
+ switch (type()) {
+ case Integer:
+ return toInteger();
+
+ case Double:
+ return toDouble();
+
+ case SimpleType:
+ break;
+
+ case False:
+ case True:
+ return isTrue();
+
+ case Null:
+ return QVariant::fromValue(nullptr);
+
+ case Undefined:
+ return QVariant();
+
+ case ByteArray:
+ return toByteArray();
+
+ case String:
+ return toString();
+
+ case Array:
+ return toArray().toVariantList();
+
+ case Map:
+ return toMap().toVariantMap();
+
+ case Tag:
+ // ignore tags
+ return taggedValue().toVariant();
+
+ case DateTime:
+ return toDateTime();
+
+ case Url:
+ return toUrl();
+
+ case RegularExpression:
+ return toRegularExpression();
+
+ case Uuid:
+ return toUuid();
+
+ case Invalid:
+ return QVariant();
+ }
+
+ if (isSimpleType())
+ return QVariant::fromValue(toSimpleType());
+
+ Q_UNREACHABLE();
+ return QVariant();
+}
+
+/*!
+ Converts the JSON value contained in \a v into its corresponding CBOR value
+ and returns it. There is no data loss in converting from JSON to CBOR, as
+ the CBOR type set is richer than JSON's. Additionally, values converted to
+ CBOR using this function can be converted back to JSON using toJsonValue()
+ with no data loss.
+
+ The following table lists the mapping of JSON types to CBOR types:
+
+ \table
+ \header \li JSON Type \li CBOR Type
+ \row \li Bool \li Bool
+ \row \li Number \li Integer (if the number has no fraction and is in the \l qint64
+ range) or Double
+ \row \li String \li String
+ \row \li Array \li Array
+ \row \li Object \li Map
+ \row \li Null \li Null
+ \endtable
+
+ \l QJsonValue can also be undefined, indicating a previous operation that
+ failed to complete (for example, searching for a key not present in an
+ object). Undefined values are not JSON types and may not appear in JSON
+ arrays and objects, but this function does return the QCborValue undefined
+ value if the corresponding QJsonValue is undefined.
+
+ \sa toJsonValue(), fromVariant(), QCborArray::fromJsonArray(), QCborMap::fromJsonObject()
+ */
+QCborValue QCborValue::fromJsonValue(const QJsonValue &v)
+{
+ switch (v.type()) {
+ case QJsonValue::Bool:
+ return v.b;
+ case QJsonValue::Double:
+ if (v.dbl == qint64(v.dbl))
+ return qint64(v.dbl);
+ return v.dbl;
+ case QJsonValue::String:
+ return v.toString();
+ case QJsonValue::Array:
+ return QCborArray::fromJsonArray(v.toArray());
+ case QJsonValue::Object:
+ return QCborMap::fromJsonObject(v.toObject());
+ case QJsonValue::Null:
+ return nullptr;
+ case QJsonValue::Undefined:
+ break;
+ }
+ return QCborValue();
+}
+
+static void appendVariant(QCborContainerPrivate *d, const QVariant &variant)
+{
+ // Handle strings and byte arrays directly, to avoid creating a temporary
+ // dummy container to hold their data.
+ int type = variant.userType();
+ if (type == QVariant::String) {
+ d->append(variant.toString());
+ } else if (type == QVariant::ByteArray) {
+ QByteArray ba = variant.toByteArray();
+ d->appendByteData(ba.constData(), ba.size(), QCborValue::ByteArray);
+ } else {
+ // For everything else, use the function below.
+ d->append(QCborValue::fromVariant(variant));
+ }
+}
+
+/*!
+ Converts the QVariant \a variant into QCborValue and returns it.
+
+ QVariants may contain a large list of different meta types, many of which
+ have no corresponding representation in CBOR. That includes all
+ user-defined meta types. When preparing transmission using CBOR, it is
+ suggested to encode carefully each value to prevent loss of representation.
+
+ The following table lists the conversion this function will apply:
+
+ \table
+ \header \li Qt (C++) type \li CBOR type
+ \row \li invalid (QVariant()) \li Undefined
+ \row \li \c bool \li Bool
+ \row \li \c std::nullptr_t \li Null
+ \row \li \c short, \c ushort, \c int, \c uint, \l qint64 \li Integer
+ \row \li \l quint64 \li Integer, but they are cast to \c qint64 first so
+ values higher than 2\sup{63}-1 (\c INT64_MAX) will
+ be wrapped to negative
+ \row \li \c float, \c double \li Double
+ \row \li \l QByteArray \li ByteArray
+ \row \li \l QDateTime \li DateTime
+ \row \li \l QCborSimpleType \li Simple type
+ \row \li \l QJsonArray \li Array, converted using QCborArray::formJsonArray()
+ \row \li \l QJsonDocument \li Array or Map
+ \row \li \l QJsonObject \li Map, converted using QCborMap::fromJsonObject()
+ \row \li \l QJsonValue \li converted using fromJsonValue()
+ \row \li \l QRegularExpression \li RegularExpression
+ \row \li \l QString \li String
+ \row \li \l QStringList \li Array
+ \row \li \l QVariantHash \li Map
+ \row \li \l QVariantList \li Array
+ \row \li \l QVariantMap \li Map
+ \row \li \l QUrl \li Url
+ \row \li \l QUuid \li Uuid
+ \endtable
+
+ For any other types, this function will return Null if the QVariant itself
+ is null, and otherwise will try to convert to string using
+ QVariant::toString(). If the conversion to string fails, this function
+ returns Undefined.
+
+ Please note that the conversions via QVariant::toString() are subject to
+ change at any time. QCborValue may be extended in the future to support
+ more types, which will result in a change in how this function performs
+ conversions.
+
+ \sa toVariant(), fromJsonValue(), QCborArray::toVariantList(), QCborMap::toVariantMap()
+ */
+QCborValue QCborValue::fromVariant(const QVariant &variant)
+{
+ switch (variant.userType()) {
+ case QVariant::Invalid:
+ return {};
+ case QMetaType::Nullptr:
+ return nullptr;
+ case QVariant::Bool:
+ return variant.toBool();
+ case QMetaType::Short:
+ case QMetaType::UShort:
+ case QVariant::Int:
+ case QVariant::LongLong:
+ case QVariant::ULongLong:
+ case QVariant::UInt:
+ return variant.toLongLong();
+ case QMetaType::Float:
+ case QVariant::Double:
+ return variant.toDouble();
+ case QVariant::String:
+ return variant.toString();
+ case QVariant::StringList:
+ return QCborArray::fromStringList(variant.toStringList());
+ case QVariant::ByteArray:
+ return variant.toByteArray();
+ case QVariant::DateTime:
+ return QCborValue(variant.toDateTime());
+ case QVariant::Url:
+ return QCborValue(variant.toUrl());
+ case QVariant::Uuid:
+ return QCborValue(variant.toUuid());
+ case QVariant::List:
+ return QCborArray::fromVariantList(variant.toList());
+ case QVariant::Map:
+ return QCborMap::fromVariantMap(variant.toMap());
+ case QVariant::Hash:
+ return QCborMap::fromVariantHash(variant.toHash());
+#ifndef QT_BOOTSTRAPPED
+ case QVariant::RegularExpression:
+ return QCborValue(variant.toRegularExpression());
+ case QMetaType::QJsonValue:
+ return fromJsonValue(variant.toJsonValue());
+ case QMetaType::QJsonObject:
+ return QCborMap::fromJsonObject(variant.toJsonObject());
+ case QMetaType::QJsonArray:
+ return QCborArray::fromJsonArray(variant.toJsonArray());
+ case QMetaType::QJsonDocument: {
+ QJsonDocument doc = variant.toJsonDocument();
+ if (doc.isArray())
+ return QCborArray::fromJsonArray(doc.array());
+ return QCborMap::fromJsonObject(doc.object());
+ }
+ case QMetaType::QCborValue:
+ return variant.value<QCborValue>();
+ case QMetaType::QCborArray:
+ return variant.value<QCborArray>();
+ case QMetaType::QCborMap:
+ return variant.value<QCborMap>();
+ case QMetaType::QCborSimpleType:
+ return variant.value<QCborSimpleType>();
+#endif
+ default:
+ break;
+ }
+
+ if (variant.isNull())
+ return QCborValue(nullptr);
+
+ QString string = variant.toString();
+ if (string.isNull())
+ return QCborValue(); // undefined
+ return string;
+}
+
+/*!
+ Recursively converts each \l QCborValue in this array using
+ QCborValue::toVariant() and returns the QVariantList composed of the
+ converted items.
+
+ Conversion to \l QVariant is not completely lossless. Please see the
+ documentation in QCborValue::toVariant() for more information.
+
+ \sa fromVariantList(), fromStringList(), toJsonArray(),
+ QCborValue::toVariant(), QCborMap::toVariantMap()
+ */
+QVariantList QCborArray::toVariantList() const
+{
+ QVariantList retval;
+ retval.reserve(size());
+ for (qsizetype i = 0; i < size(); ++i)
+ retval.append(d->valueAt(i).toVariant());
+ return retval;
+}
+
+/*!
+ Returns a QCborArray containing all the strings found in the \a list list.
+
+ \sa fromVariantList(), fromJsonArray()
+ */
+QCborArray QCborArray::fromStringList(const QStringList &list)
+{
+ QCborArray a;
+ a.detach(list.size());
+ for (const QString &s : list)
+ a.d->append(s);
+ return a;
+}
+
+/*!
+ Converts all the items in the \a list to CBOR using
+ QCborValue::fromVariant() and returns the array composed of those elements.
+
+ Conversion from \l QVariant is not completely lossless. Please see the
+ documentation in QCborValue::fromVariant() for more information.
+
+ \sa toVariantList(), fromStringList(), fromJsonArray(), QCborMap::fromVariantMap()
+ */
+QCborArray QCborArray::fromVariantList(const QVariantList &list)
+{
+ QCborArray a;
+ a.detach(list.size());
+ for (const QVariant &v : list)
+ appendVariant(a.d.data(), v);
+ return a;
+}
+
+/*!
+ Converts all JSON items found in the \a array array to CBOR using
+ QCborValue::fromJson(), and returns the CBOR array composed of those
+ elements.
+
+ This conversion is lossless, as the CBOR type system is a superset of
+ JSON's. Moreover, the array returned by this function can be converted back
+ to the original \a array by using toJsonArray().
+
+ \sa toJsonArray(), toVariantList(), QCborValue::fromJsonValue(), QCborMap::fromJsonObject()
+ */
+QCborArray QCborArray::fromJsonArray(const QJsonArray &array)
+{
+ QCborArray a;
+ a.detach(array.size());
+ for (const QJsonValue v : array) {
+ if (v.isString())
+ a.d->append(v.toString());
+ else
+ a.d->append(QCborValue::fromJsonValue(v));
+ }
+ return a;
+}
+
+/*!
+ Converts the CBOR values to QVariant using QCborValue::toVariant() and
+ "stringifies" all the CBOR keys in this map, returning the QVariantMap that
+ results from that association list.
+
+ QVariantMaps have string keys, unlike CBOR, so the conversion of a QCborMap
+ to QVariantMap will imply a step of "stringification" of the key values.
+ See QCborMap::toJsonObject() for details.
+
+ In addition, the conversion to \l QVariant is not completely lossless.
+ Please see the documentation in QCborValue::toVariant() for more
+ information.
+
+ \sa fromVariantMap(), toVariantHash(), toJsonObject(), QCborValue::toVariant(),
+ QCborArray::toVariantList()
+ */
+QVariantMap QCborMap::toVariantMap() const
+{
+ QVariantMap retval;
+ for (qsizetype i = 0; i < 2 * size(); i += 2)
+ retval.insert(makeString(d.data(), i), d->valueAt(i + 1).toVariant());
+ return retval;
+}
+
+/*!
+ Converts the CBOR values to QVariant using QCborValue::toVariant() and
+ "stringifies" all the CBOR keys in this map, returning the QVariantHash that
+ results from that association list.
+
+ QVariantMaps have string keys, unlike CBOR, so the conversion of a QCborMap
+ to QVariantMap will imply a step of "stringification" of the key values.
+ See QCborMap::toJsonObject() for details.
+
+ In addition, the conversion to \l QVariant is not completely lossless.
+ Please see the documentation in QCborValue::toVariant() for more
+ information.
+
+ \sa fromVariantHash(), toVariantMap(), toJsonObject(), QCborValue::toVariant(),
+ QCborArray::toVariantList()
+ */
+QVariantHash QCborMap::toVariantHash() const
+{
+ QVariantHash retval;
+ retval.reserve(size());
+ for (qsizetype i = 0; i < 2 * size(); i += 2)
+ retval.insert(makeString(d.data(), i), d->valueAt(i + 1).toVariant());
+ return retval;
+}
+
+/*!
+ Converts all the items in \a map to CBOR using QCborValue::fromVariant()
+ and returns the map composed of those elements.
+
+ Conversion from \l QVariant is not completely lossless. Please see the
+ documentation in QCborValue::fromVariant() for more information.
+
+ \sa toVariantMap(), fromVariantHash(), fromJsonObject(), QCborValue::fromVariant()
+ */
+QCborMap QCborMap::fromVariantMap(const QVariantMap &map)
+{
+ QCborMap m;
+ m.detach(map.size());
+ QCborContainerPrivate *d = m.d.data();
+
+ auto it = map.begin();
+ auto end = map.end();
+ for ( ; it != end; ++it) {
+ d->append(it.key());
+ appendVariant(d, it.value());
+ }
+ return m;
+}
+
+/*!
+ Converts all the items in \a hash to CBOR using QCborValue::fromVariant()
+ and returns the map composed of those elements.
+
+ Conversion from \l QVariant is not completely lossless. Please see the
+ documentation in QCborValue::fromVariant() for more information.
+
+ \sa toVariantHash(), fromVariantMap(), fromJsonObject(), QCborValue::fromVariant()
+ */
+QCborMap QCborMap::fromVariantHash(const QVariantHash &hash)
+{
+ QCborMap m;
+ m.detach(hash.size());
+ QCborContainerPrivate *d = m.d.data();
+
+ auto it = hash.begin();
+ auto end = hash.end();
+ for ( ; it != end; ++it) {
+ d->append(it.key());
+ appendVariant(d, it.value());
+ }
+ return m;
+}
+
+/*!
+ Converts all JSON items found in the \a obj object to CBOR using
+ QCborValue::fromJson(), and returns the map composed of those elements.
+
+ This conversion is lossless, as the CBOR type system is a superset of
+ JSON's. Moreover, the map returned by this function can be converted back
+ to the original \a obj by using toJsonObject().
+
+ \sa toJsonObject(), toVariantMap(), QCborValue::fromJsonValue(), QCborArray::fromJsonArray()
+ */
+QCborMap QCborMap::fromJsonObject(const QJsonObject &obj)
+{
+ QCborMap m;
+ m.detach(obj.size());
+ QCborContainerPrivate *d = m.d.data();
+
+ auto it = obj.begin();
+ auto end = obj.end();
+ for ( ; it != end; ++it) {
+ d->append(it.key());
+ if (it.value().isString())
+ d->append(it.value().toString());
+ else
+ d->append(QCborValue::fromJsonValue(it.value()));
+ }
+ return m;
+}
+
+QT_END_NAMESPACE
diff --git a/src/corelib/serialization/qjsonvalue.cpp b/src/corelib/serialization/qjsonvalue.cpp
index b8051d6228..3c5b0a0e02 100644
--- a/src/corelib/serialization/qjsonvalue.cpp
+++ b/src/corelib/serialization/qjsonvalue.cpp
@@ -46,6 +46,11 @@
#include <qstringlist.h>
#include <qdebug.h>
+#ifndef QT_BOOTSTRAPPED
+# include <qcborarray.h>
+# include <qcbormap.h>
+#endif
+
#include "qjson_p.h"
QT_BEGIN_NAMESPACE
@@ -423,6 +428,25 @@ QJsonValue &QJsonValue::operator =(const QJsonValue &other)
\li QMetaType::QUuid
\endlist
\li QJsonValue::String. Since Qt 5.11, the resulting string will not include braces
+ \row
+ \li
+ \list
+ \li QMetaType::QCborValue
+ \endlist
+ \li Whichever type QCborValue::toJsonValue() returns.
+ \row
+ \li
+ \list
+ \li QMetaType::QCborArray
+ \endlist
+ \li QJsonValue::Array. See QCborValue::toJsonValue() for conversion restrictions.
+ \row
+ \li
+ \list
+ \li QMetaType::QCborMap
+ \endlist
+ \li QJsonValue::Map. See QCborValue::toJsonValue() for conversion restrictions and the
+ "stringification" of map keys.
\endtable
For all other QVariant types a conversion to a QString will be attempted. If the returned string
@@ -469,6 +493,12 @@ QJsonValue QJsonValue::fromVariant(const QVariant &variant)
QJsonDocument doc = variant.toJsonDocument();
return doc.isArray() ? QJsonValue(doc.array()) : QJsonValue(doc.object());
}
+ case QMetaType::QCborValue:
+ return variant.value<QCborValue>().toJsonValue();
+ case QMetaType::QCborArray:
+ return variant.value<QCborArray>().toJsonArray();
+ case QMetaType::QCborMap:
+ return variant.value<QCborMap>().toJsonObject();
#endif
default:
break;
diff --git a/src/corelib/serialization/qjsonvalue.h b/src/corelib/serialization/qjsonvalue.h
index 96538ebbf9..316d3fdf45 100644
--- a/src/corelib/serialization/qjsonvalue.h
+++ b/src/corelib/serialization/qjsonvalue.h
@@ -150,6 +150,7 @@ private:
friend class QJsonPrivate::Value;
friend class QJsonArray;
friend class QJsonObject;
+ friend class QCborValue;
friend Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonValue &);
QJsonValue(QJsonPrivate::Data *d, QJsonPrivate::Base *b, const QJsonPrivate::Value& v);
diff --git a/src/corelib/serialization/serialization.pri b/src/corelib/serialization/serialization.pri
index 3d039dc30f..73b99b8e64 100644
--- a/src/corelib/serialization/serialization.pri
+++ b/src/corelib/serialization/serialization.pri
@@ -1,6 +1,12 @@
# Qt data formats core module
HEADERS += \
+ serialization/qcborarray.h \
+ serialization/qcborcommon.h \
+ serialization/qcbormap.h \
+ serialization/qcborvalue.h \
+ serialization/qcborvalue_p.h \
+ serialization/qcborstream.h \
serialization/qdatastream.h \
serialization/qdatastream_p.h \
serialization/qjson_p.h \
@@ -17,8 +23,11 @@ HEADERS += \
serialization/qxmlutils_p.h
SOURCES += \
+ serialization/qcborstream.cpp \
+ serialization/qcborvalue.cpp \
serialization/qdatastream.cpp \
serialization/qjson.cpp \
+ serialization/qjsoncbor.cpp \
serialization/qjsondocument.cpp \
serialization/qjsonobject.cpp \
serialization/qjsonarray.cpp \
@@ -28,3 +37,9 @@ SOURCES += \
serialization/qtextstream.cpp \
serialization/qxmlstream.cpp \
serialization/qxmlutils.cpp
+
+false: SOURCES += \
+ serialization/qcborarray.cpp \
+ serialization/qcbormap.cpp
+
+INCLUDEPATH += ../3rdparty/tinycbor/src
diff --git a/src/corelib/thread/qfuture.h b/src/corelib/thread/qfuture.h
index af599c26db..a456dd9139 100644
--- a/src/corelib/thread/qfuture.h
+++ b/src/corelib/thread/qfuture.h
@@ -136,6 +136,7 @@ public:
inline const_iterator operator-(int j) const { return const_iterator(future, index - j); }
inline const_iterator &operator+=(int j) { index += j; return *this; }
inline const_iterator &operator-=(int j) { index -= j; return *this; }
+ friend inline const_iterator operator+(int j, const_iterator k) { return k + j; }
private:
QFuture const * future;
int index;
diff --git a/src/corelib/thread/qfutureinterface.h b/src/corelib/thread/qfutureinterface.h
index 3dd236752c..d5e2401eee 100644
--- a/src/corelib/thread/qfutureinterface.h
+++ b/src/corelib/thread/qfutureinterface.h
@@ -178,7 +178,7 @@ public:
inline void reportResult(const T *result, int index = -1);
inline void reportResult(const T &result, int index = -1);
inline void reportResults(const QVector<T> &results, int beginIndex = -1, int count = -1);
- inline void reportFinished(const T *result = 0);
+ inline void reportFinished(const T *result = nullptr);
inline const T &resultReference(int index) const;
inline const T *resultPointer(int index) const;
diff --git a/src/corelib/thread/qmutex_p.h b/src/corelib/thread/qmutex_p.h
index 4e6f522a37..ec9bfc1152 100644
--- a/src/corelib/thread/qmutex_p.h
+++ b/src/corelib/thread/qmutex_p.h
@@ -58,6 +58,7 @@
#include <QtCore/qnamespace.h>
#include <QtCore/qmutex.h>
#include <QtCore/qatomic.h>
+#include <QtCore/qdeadlinetimer.h>
#if defined(Q_OS_MAC)
# include <mach/semaphore.h>
@@ -146,7 +147,7 @@ public:
// helper functions for qmutex_unix.cpp and qwaitcondition_unix.cpp
// they are in qwaitcondition_unix.cpp actually
void qt_initialize_pthread_cond(pthread_cond_t *cond, const char *where);
-void qt_abstime_for_timeout(struct timespec *ts, int timeout);
+void qt_abstime_for_timeout(struct timespec *ts, QDeadlineTimer deadline);
#endif
QT_END_NAMESPACE
diff --git a/src/corelib/thread/qmutex_unix.cpp b/src/corelib/thread/qmutex_unix.cpp
index 3e1e531be4..91f02ba3ec 100644
--- a/src/corelib/thread/qmutex_unix.cpp
+++ b/src/corelib/thread/qmutex_unix.cpp
@@ -130,7 +130,7 @@ bool QMutexPrivate::wait(int timeout)
errorCode = pthread_cond_wait(&cond, &mutex);
} else {
timespec ti;
- qt_abstime_for_timeout(&ti, timeout);
+ qt_abstime_for_timeout(&ti, QDeadlineTimer(timeout));
errorCode = pthread_cond_timedwait(&cond, &mutex, &ti);
}
if (errorCode) {
diff --git a/src/corelib/thread/qreadwritelock_p.h b/src/corelib/thread/qreadwritelock_p.h
index 04dd45a2e1..a01d010043 100644
--- a/src/corelib/thread/qreadwritelock_p.h
+++ b/src/corelib/thread/qreadwritelock_p.h
@@ -54,7 +54,7 @@
#include <QtCore/private/qglobal_p.h>
#include <QtCore/qhash.h>
-#include <QtCore/QWaitCondition>
+#include <QtCore/qwaitcondition.h>
#ifndef QT_NO_THREAD
diff --git a/src/corelib/thread/qsemaphore.cpp b/src/corelib/thread/qsemaphore.cpp
index 74e0746f43..82d439a728 100644
--- a/src/corelib/thread/qsemaphore.cpp
+++ b/src/corelib/thread/qsemaphore.cpp
@@ -487,11 +487,9 @@ bool QSemaphore::tryAcquire(int n, int timeout)
QDeadlineTimer timer(timeout);
QMutexLocker locker(&d->mutex);
- qint64 remainingTime = timer.remainingTime();
- while (n > d->avail && remainingTime != 0) {
- if (!d->cond.wait(locker.mutex(), remainingTime))
+ while (n > d->avail && !timer.hasExpired()) {
+ if (!d->cond.wait(locker.mutex(), timer))
return false;
- remainingTime = timer.remainingTime();
}
if (n > d->avail)
return false;
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp
index 23606411ff..472c6f6795 100644
--- a/src/corelib/thread/qthread.cpp
+++ b/src/corelib/thread/qthread.cpp
@@ -117,6 +117,14 @@ void QThreadData::deref()
#endif
}
+QAbstractEventDispatcher *QThreadData::createEventDispatcher()
+{
+ QAbstractEventDispatcher *ed = QThreadPrivate::createEventDispatcher(this);
+ eventDispatcher.storeRelease(ed);
+ ed->startingUp();
+ return ed;
+}
+
/*
QAdoptedThread
*/
@@ -140,12 +148,13 @@ QAdoptedThread::~QAdoptedThread()
// fprintf(stderr, "~QAdoptedThread = %p\n", this);
}
+#ifndef QT_NO_THREAD
void QAdoptedThread::run()
{
// this function should never be called
qFatal("QAdoptedThread::run(): Internal error, this implementation should never be called.");
}
-#ifndef QT_NO_THREAD
+
/*
QThreadPrivate
*/
@@ -750,7 +759,8 @@ int QThread::loopLevel() const
#else // QT_NO_THREAD
QThread::QThread(QObject *parent)
- : QObject(*(new QThreadPrivate), (QObject*)0){
+ : QObject(*(new QThreadPrivate), parent)
+{
Q_D(QThread);
d->data->thread = this;
}
@@ -760,18 +770,27 @@ QThread *QThread::currentThread()
return QThreadData::current()->thread;
}
-QThreadData* QThreadData::current()
+// No threads: so we can just use static variables
+static QThreadData *data = 0;
+
+QThreadData *QThreadData::current(bool createIfNecessary)
{
- static QThreadData *data = 0; // reinterpret_cast<QThreadData *>(pthread_getspecific(current_thread_data_key));
- if (!data) {
- QScopedPointer<QThreadData> newdata(new QThreadData);
- newdata->thread = new QAdoptedThread(newdata.data());
- data = newdata.take();
+ if (!data && createIfNecessary) {
+ data = new QThreadData;
+ data->thread = new QAdoptedThread(data);
data->deref();
+ if (!QCoreApplicationPrivate::theMainThread)
+ QCoreApplicationPrivate::theMainThread = data->thread.load();
}
return data;
}
+void QThreadData::clearCurrentThreadData()
+{
+ delete data;
+ data = 0;
+}
+
/*!
\internal
*/
@@ -783,6 +802,15 @@ QThread::QThread(QThreadPrivate &dd, QObject *parent)
d->data->thread = this;
}
+QThreadPrivate::QThreadPrivate(QThreadData *d) : data(d ? d : new QThreadData)
+{
+}
+
+QThreadPrivate::~QThreadPrivate()
+{
+ delete data;
+}
+
#endif // QT_NO_THREAD
/*!
@@ -820,6 +848,8 @@ void QThread::setEventDispatcher(QAbstractEventDispatcher *eventDispatcher)
}
}
+#ifndef QT_NO_THREAD
+
/*!
\reimp
*/
@@ -983,6 +1013,8 @@ QDaemonThread::~QDaemonThread()
{
}
+#endif // QT_NO_THREAD
+
QT_END_NAMESPACE
#include "moc_qthread.cpp"
diff --git a/src/corelib/thread/qthread.h b/src/corelib/thread/qthread.h
index 3df76077e1..83c3329cc0 100644
--- a/src/corelib/thread/qthread.h
+++ b/src/corelib/thread/qthread.h
@@ -247,6 +247,13 @@ public:
static Qt::HANDLE currentThreadId() { return Qt::HANDLE(currentThread()); }
static QThread* currentThread();
+ static void sleep(unsigned long);
+ static void msleep(unsigned long);
+ static void usleep(unsigned long);
+
+ QAbstractEventDispatcher *eventDispatcher() const;
+ void setEventDispatcher(QAbstractEventDispatcher *eventDispatcher);
+
protected:
QThread(QThreadPrivate &dd, QObject *parent = nullptr);
diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h
index 46294a5fc8..93f245ff6e 100644
--- a/src/corelib/thread/qthread_p.h
+++ b/src/corelib/thread/qthread_p.h
@@ -215,9 +215,10 @@ public:
class QThreadPrivate : public QObjectPrivate
{
public:
- QThreadPrivate(QThreadData *d = 0) : data(d ? d : new QThreadData) {}
- ~QThreadPrivate() { delete data; }
+ QThreadPrivate(QThreadData *d = 0);
+ ~QThreadPrivate();
+ mutable QMutex mutex;
QThreadData *data;
static void setCurrentThread(QThread*) {}
@@ -247,7 +248,15 @@ public:
void ref();
void deref();
inline bool hasEventDispatcher() const
- { return eventDispatcher.load() != 0; }
+ { return eventDispatcher.load() != nullptr; }
+ QAbstractEventDispatcher *createEventDispatcher();
+ QAbstractEventDispatcher *ensureEventDispatcher()
+ {
+ QAbstractEventDispatcher *ed = eventDispatcher.load();
+ if (Q_LIKELY(ed))
+ return ed;
+ return createEventDispatcher();
+ }
bool canWaitLocked()
{
@@ -318,7 +327,9 @@ public:
void init();
private:
+#ifndef QT_NO_THREAD
void run() override;
+#endif
};
QT_END_NAMESPACE
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index 9ad32b162d..0b3c7ddf10 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -339,13 +339,7 @@ void *QThreadPrivate::start(void *arg)
data->quitNow = thr->d_func()->exited;
}
- QAbstractEventDispatcher *eventDispatcher = data->eventDispatcher.load();
- if (!eventDispatcher) {
- eventDispatcher = createEventDispatcher(data);
- data->eventDispatcher.storeRelease(eventDispatcher);
- }
-
- eventDispatcher->startingUp();
+ data->ensureEventDispatcher();
#if (defined(Q_OS_LINUX) || defined(Q_OS_MAC) || defined(Q_OS_QNX))
{
@@ -519,6 +513,8 @@ void QThread::yieldCurrentThread()
sched_yield();
}
+#endif // QT_NO_THREAD
+
static timespec makeTimespec(time_t secs, long nsecs)
{
struct timespec ts;
@@ -542,6 +538,8 @@ void QThread::usleep(unsigned long usecs)
qt_nanosleep(makeTimespec(usecs / 1000 / 1000, usecs % (1000*1000) * 1000));
}
+#ifndef QT_NO_THREAD
+
#ifdef QT_HAS_THREAD_PRIORITY_SCHEDULING
#if defined(Q_OS_QNX)
static bool calculateUnixPriority(int priority, int *sched_policy, int *sched_priority)
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index 4459ae87af..83bcb7d751 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -61,9 +61,10 @@
# include <process.h>
#endif // Q_OS_WINRT
-#ifndef QT_NO_THREAD
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_THREAD
+
#ifdef Q_OS_WINRT
inline DWORD qWinRTTlsAlloc() {
return FlsAlloc(0);
@@ -359,13 +360,7 @@ unsigned int __stdcall QT_ENSURE_STACK_ALIGNED_FOR_SSE QThreadPrivate::start(voi
data->quitNow = thr->d_func()->exited;
}
- QAbstractEventDispatcher *eventDispatcher = data->eventDispatcher.load();
- if (!eventDispatcher) {
- eventDispatcher = createEventDispatcher(data);
- data->eventDispatcher.storeRelease(eventDispatcher);
- }
-
- eventDispatcher->startingUp();
+ data->ensureEventDispatcher();
#if !defined(QT_NO_DEBUG) && defined(Q_CC_MSVC) && !defined(Q_OS_WINRT)
// sets the name of the current thread.
@@ -449,6 +444,8 @@ void QThread::yieldCurrentThread()
#endif
}
+#endif // QT_NO_THREAD
+
void QThread::sleep(unsigned long secs)
{
::Sleep(secs * 1000);
@@ -464,6 +461,8 @@ void QThread::usleep(unsigned long usecs)
::Sleep((usecs / 1000) + 1);
}
+#ifndef QT_NO_THREAD
+
void QThread::start(Priority priority)
{
Q_D(QThread);
@@ -700,5 +699,6 @@ void QThreadPrivate::setPriority(QThread::Priority threadPriority)
}
}
-QT_END_NAMESPACE
#endif // QT_NO_THREAD
+
+QT_END_NAMESPACE
diff --git a/src/corelib/thread/qwaitcondition.h b/src/corelib/thread/qwaitcondition.h
index a0c6766833..e42efbdfca 100644
--- a/src/corelib/thread/qwaitcondition.h
+++ b/src/corelib/thread/qwaitcondition.h
@@ -49,6 +49,7 @@ QT_BEGIN_NAMESPACE
#ifndef QT_NO_THREAD
+class QDeadlineTimer;
class QWaitConditionPrivate;
class QMutex;
class QReadWriteLock;
@@ -59,8 +60,11 @@ public:
QWaitCondition();
~QWaitCondition();
+ // ### Qt 6: remove unsigned long overloads
bool wait(QMutex *lockedMutex, unsigned long time = ULONG_MAX);
+ bool wait(QMutex *lockedMutex, QDeadlineTimer deadline);
bool wait(QReadWriteLock *lockedReadWriteLock, unsigned long time = ULONG_MAX);
+ bool wait(QReadWriteLock *lockedReadWriteLock, QDeadlineTimer deadline);
void wakeOne();
void wakeAll();
diff --git a/src/corelib/thread/qwaitcondition_unix.cpp b/src/corelib/thread/qwaitcondition_unix.cpp
index 6adee5412e..9706be1504 100644
--- a/src/corelib/thread/qwaitcondition_unix.cpp
+++ b/src/corelib/thread/qwaitcondition_unix.cpp
@@ -44,6 +44,8 @@
#include "qreadwritelock.h"
#include "qatomic.h"
#include "qstring.h"
+#include "qdeadlinetimer.h"
+#include "private/qdeadlinetimer_p.h"
#include "qelapsedtimer.h"
#include "private/qcore_unix_p.h"
@@ -93,23 +95,25 @@ void qt_initialize_pthread_cond(pthread_cond_t *cond, const char *where)
pthread_condattr_destroy(&condattr);
}
-void qt_abstime_for_timeout(timespec *ts, int timeout)
+void qt_abstime_for_timeout(timespec *ts, QDeadlineTimer deadline)
{
#ifdef Q_OS_MAC
// on Mac, qt_gettime() (on qelapsedtimer_mac.cpp) returns ticks related to the Mach absolute time
// that doesn't work with pthread
// Mac also doesn't have clock_gettime
struct timeval tv;
+ qint64 nsec = deadline.remainingTimeNSecs();
gettimeofday(&tv, 0);
- ts->tv_sec = tv.tv_sec;
- ts->tv_nsec = tv.tv_usec * 1000;
-#else
- *ts = qt_gettime();
-#endif
+ ts->tv_sec = tv.tv_sec + nsec / (1000 * 1000 * 1000);
+ ts->tv_nsec = tv.tv_usec * 1000 + nsec % (1000 * 1000 * 1000);
- ts->tv_sec += timeout / 1000;
- ts->tv_nsec += timeout % 1000 * Q_UINT64_C(1000) * 1000;
normalizedTimespec(*ts);
+#else
+ // depends on QDeadlineTimer's internals!!
+ Q_STATIC_ASSERT(QDeadlineTimerNanosecondsInT2);
+ ts->tv_sec = deadline._q_data().first;
+ ts->tv_nsec = deadline._q_data().second;
+#endif
}
class QWaitConditionPrivate {
@@ -119,26 +123,27 @@ public:
int waiters;
int wakeups;
- int wait_relative(unsigned long time)
+ int wait_relative(QDeadlineTimer deadline)
{
timespec ti;
#ifdef Q_OS_ANDROID
- if (local_cond_timedwait_relative) {
- ti.tv_sec = time / 1000;
- ti.tv_nsec = time % 1000 * Q_UINT64_C(1000) * 1000;
+ if (!local_condattr_setclock && local_cond_timedwait_relative) {
+ qint64 nsec = deadline.remainingTimeNSecs();
+ ti.tv_sec = nsec / (1000 * 1000 * 1000);
+ ti.tv_nsec = nsec - ti.tv_sec * 1000 * 1000 * 1000;
return local_cond_timedwait_relative(&cond, &mutex, &ti);
}
#endif
- qt_abstime_for_timeout(&ti, time);
+ qt_abstime_for_timeout(&ti, deadline);
return pthread_cond_timedwait(&cond, &mutex, &ti);
}
- bool wait(unsigned long time)
+ bool wait(QDeadlineTimer deadline)
{
int code;
forever {
- if (time != ULONG_MAX) {
- code = wait_relative(time);
+ if (!deadline.isForever()) {
+ code = wait_relative(deadline);
} else {
code = pthread_cond_wait(&cond, &mutex);
}
@@ -201,6 +206,13 @@ void QWaitCondition::wakeAll()
bool QWaitCondition::wait(QMutex *mutex, unsigned long time)
{
+ if (quint64(time) > quint64(std::numeric_limits<qint64>::max()))
+ return wait(mutex, QDeadlineTimer(QDeadlineTimer::Forever));
+ return wait(mutex, QDeadlineTimer(time));
+}
+
+bool QWaitCondition::wait(QMutex *mutex, QDeadlineTimer deadline)
+{
if (! mutex)
return false;
if (mutex->isRecursive()) {
@@ -212,7 +224,7 @@ bool QWaitCondition::wait(QMutex *mutex, unsigned long time)
++d->waiters;
mutex->unlock();
- bool returnValue = d->wait(time);
+ bool returnValue = d->wait(deadline);
mutex->lock();
@@ -221,6 +233,11 @@ bool QWaitCondition::wait(QMutex *mutex, unsigned long time)
bool QWaitCondition::wait(QReadWriteLock *readWriteLock, unsigned long time)
{
+ return wait(readWriteLock, QDeadlineTimer(time));
+}
+
+bool QWaitCondition::wait(QReadWriteLock *readWriteLock, QDeadlineTimer deadline)
+{
if (!readWriteLock)
return false;
auto previousState = readWriteLock->stateForWaitCondition();
@@ -236,7 +253,7 @@ bool QWaitCondition::wait(QReadWriteLock *readWriteLock, unsigned long time)
readWriteLock->unlock();
- bool returnValue = d->wait(time);
+ bool returnValue = d->wait(deadline);
if (previousState == QReadWriteLock::LockedForWrite)
readWriteLock->lockForWrite();
diff --git a/src/corelib/thread/qwaitcondition_win.cpp b/src/corelib/thread/qwaitcondition_win.cpp
index e6610f18c8..61e4c2bcb1 100644
--- a/src/corelib/thread/qwaitcondition_win.cpp
+++ b/src/corelib/thread/qwaitcondition_win.cpp
@@ -38,6 +38,7 @@
****************************************************************************/
#include "qwaitcondition.h"
+#include "qdeadlinetimer.h"
#include "qnamespace.h"
#include "qmutex.h"
#include "qreadwritelock.h"
@@ -184,6 +185,11 @@ bool QWaitCondition::wait(QMutex *mutex, unsigned long time)
return returnValue;
}
+bool QWaitCondition::wait(QMutex *mutex, QDeadlineTimer deadline)
+{
+ return wait(mutex, deadline.remainingTime());
+}
+
bool QWaitCondition::wait(QReadWriteLock *readWriteLock, unsigned long time)
{
if (!readWriteLock)
@@ -210,6 +216,11 @@ bool QWaitCondition::wait(QReadWriteLock *readWriteLock, unsigned long time)
return returnValue;
}
+bool QWaitCondition::wait(QReadWriteLock *readWriteLock, QDeadlineTimer deadline)
+{
+ return wait(readWriteLock, deadline.remainingTime());
+}
+
void QWaitCondition::wakeOne()
{
// wake up the first waiting thread in the queue
diff --git a/src/corelib/tools/qarraydata.h b/src/corelib/tools/qarraydata.h
index f0cc56e899..a642fb9b39 100644
--- a/src/corelib/tools/qarraydata.h
+++ b/src/corelib/tools/qarraydata.h
@@ -159,6 +159,7 @@ struct QTypedArrayData
inline iterator &operator-=(int j) { i-=j; return *this; }
inline iterator operator+(int j) const { return iterator(i+j); }
inline iterator operator-(int j) const { return iterator(i-j); }
+ friend inline iterator operator+(int j, iterator k) { return k + j; }
inline int operator-(iterator j) const { return i - j.i; }
inline operator T*() const { return i; }
};
@@ -194,6 +195,7 @@ struct QTypedArrayData
inline const_iterator &operator-=(int j) { i-=j; return *this; }
inline const_iterator operator+(int j) const { return const_iterator(i+j); }
inline const_iterator operator-(int j) const { return const_iterator(i-j); }
+ friend inline const_iterator operator+(int j, const_iterator k) { return k + j; }
inline int operator-(const_iterator j) const { return i - j.i; }
inline operator const T*() const { return i; }
};
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 424420204a..eb360bcad7 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -47,6 +47,7 @@
#include "qlocale_p.h"
#include "qlocale_tools_p.h"
#include "private/qnumeric_p.h"
+#include "private/qsimd_p.h"
#include "qstringalgorithms_p.h"
#include "qscopedpointer.h"
#include "qbytearray_p.h"
@@ -356,7 +357,8 @@ char *qstrncpy(char *dst, const char *src, uint len)
Special case 2: Returns an arbitrary non-zero value if \a str1 is
nullptr or \a str2 is nullptr (but not both).
- \sa qstrncmp(), qstricmp(), qstrnicmp(), {8-bit Character Comparisons}
+ \sa qstrncmp(), qstricmp(), qstrnicmp(), {8-bit Character Comparisons},
+ QByteArray::compare()
*/
int qstrcmp(const char *str1, const char *str2)
{
@@ -381,7 +383,8 @@ int qstrcmp(const char *str1, const char *str2)
Special case 2: Returns a random non-zero value if \a str1 is nullptr
or \a str2 is nullptr (but not both).
- \sa qstrcmp(), qstricmp(), qstrnicmp(), {8-bit Character Comparisons}
+ \sa qstrcmp(), qstricmp(), qstrnicmp(), {8-bit Character Comparisons},
+ QByteArray::compare()
*/
/*! \relates QByteArray
@@ -400,21 +403,80 @@ int qstrcmp(const char *str1, const char *str2)
Special case 2: Returns a random non-zero value if \a str1 is nullptr
or \a str2 is nullptr (but not both).
- \sa qstrcmp(), qstrncmp(), qstrnicmp(), {8-bit Character Comparisons}
+ \sa qstrcmp(), qstrncmp(), qstrnicmp(), {8-bit Character Comparisons},
+ QByteArray::compare()
*/
int qstricmp(const char *str1, const char *str2)
{
const uchar *s1 = reinterpret_cast<const uchar *>(str1);
const uchar *s2 = reinterpret_cast<const uchar *>(str2);
- int res;
- uchar c;
- if (!s1 || !s2)
- return s1 ? 1 : (s2 ? -1 : 0);
- for (; !(res = (c = latin1_lowercased[*s1]) - latin1_lowercased[*s2]); s1++, s2++)
- if (!c) // strings are equal
- break;
- return res;
+ if (!s1)
+ return s2 ? -1 : 0;
+ if (!s2)
+ return 1;
+
+ enum { Incomplete = 256 };
+ qptrdiff offset = 0;
+ auto innerCompare = [=, &offset](qptrdiff max, bool unlimited) {
+ max += offset;
+ do {
+ uchar c = latin1_lowercased[s1[offset]];
+ int res = c - latin1_lowercased[s2[offset]];
+ if (Q_UNLIKELY(res))
+ return res;
+ if (Q_UNLIKELY(!c))
+ return 0;
+ ++offset;
+ } while (unlimited || offset < max);
+ return int(Incomplete);
+ };
+
+#ifdef __SSE4_1__
+ enum { PageSize = 4096, PageMask = PageSize - 1 };
+ const __m128i zero = _mm_setzero_si128();
+ forever {
+ // Calculate how many bytes we can load until we cross a page boundary
+ // for either source. This isn't an exact calculation, just something
+ // very quick.
+ quintptr u1 = quintptr(s1 + offset);
+ quintptr u2 = quintptr(s2 + offset);
+ uint n = PageSize - ((u1 | u2) & PageMask);
+
+ qptrdiff maxoffset = offset + n;
+ for ( ; offset + 16 <= maxoffset; offset += sizeof(__m128i)) {
+ // load 16 bytes from either source
+ __m128i a = _mm_loadu_si128(reinterpret_cast<const __m128i *>(s1 + offset));
+ __m128i b = _mm_loadu_si128(reinterpret_cast<const __m128i *>(s2 + offset));
+
+ // compare the two against each oher
+ __m128i cmp = _mm_cmpeq_epi8(a, b);
+
+ // find NUL terminators too
+ cmp = _mm_min_epu8(cmp, a);
+ cmp = _mm_cmpeq_epi8(cmp, zero);
+
+ // was there any difference or a NUL?
+ uint mask = _mm_movemask_epi8(cmp);
+ if (mask) {
+ // yes, find out where
+ uint start = qCountTrailingZeroBits(mask);
+ uint end = sizeof(mask) * 8 - qCountLeadingZeroBits(mask);
+ Q_ASSUME(end >= start);
+ offset += start;
+ n = end - start;
+ break;
+ }
+ }
+
+ // using SIMD could cause a page fault, so iterate byte by byte
+ int res = innerCompare(n, false);
+ if (res != Incomplete)
+ return res;
+ }
+#endif
+
+ return innerCompare(-1, true);
}
/*! \relates QByteArray
@@ -434,7 +496,8 @@ int qstricmp(const char *str1, const char *str2)
Special case 2: Returns a random non-zero value if \a str1 is nullptr
or \a str2 is nullptr (but not both).
- \sa qstrcmp(), qstrncmp(), qstricmp(), {8-bit Character Comparisons}
+ \sa qstrcmp(), qstrncmp(), qstricmp(), {8-bit Character Comparisons},
+ QByteArray::compare()
*/
int qstrnicmp(const char *str1, const char *str2, uint len)
@@ -456,6 +519,55 @@ int qstrnicmp(const char *str1, const char *str2, uint len)
/*!
\internal
+ \since 5.12
+
+ A helper for QByteArray::compare. Compares \a len1 bytes from \a str1 to \a
+ len2 bytes from \a str2. If \a len2 is -1, then \a str2 is expected to be
+ null-terminated.
+ */
+int qstrnicmp(const char *str1, qsizetype len1, const char *str2, qsizetype len2)
+{
+ Q_ASSERT(str1);
+ Q_ASSERT(len1 >= 0);
+ Q_ASSERT(len2 >= -1);
+ const uchar *s1 = reinterpret_cast<const uchar *>(str1);
+ const uchar *s2 = reinterpret_cast<const uchar *>(str2);
+ if (!s2)
+ return len1 == 0 ? 0 : 1;
+
+ int res;
+ uchar c;
+ if (len2 == -1) {
+ // null-terminated str2
+ qsizetype i;
+ for (i = 0; i < len1; ++i) {
+ c = latin1_lowercased[s2[i]];
+ if (!c)
+ return 1;
+
+ res = latin1_lowercased[s1[i]] - c;
+ if (res)
+ return res;
+ }
+ c = latin1_lowercased[s2[i]];
+ return c ? -1 : 0;
+ } else {
+ // not null-terminated
+ for (qsizetype i = 0; i < qMin(len1, len2); ++i) {
+ c = latin1_lowercased[s2[i]];
+ res = latin1_lowercased[s1[i]] - c;
+ if (res)
+ return res;
+ }
+ if (len1 == len2)
+ return 0;
+ return len1 < len2 ? -1 : 1;
+ }
+}
+
+/*!
+ \internal
+ ### Qt6: replace the QByteArray parameter with [pointer,len] pair
*/
int qstrcmp(const QByteArray &str1, const char *str2)
{
@@ -483,6 +595,7 @@ int qstrcmp(const QByteArray &str1, const char *str2)
/*!
\internal
+ ### Qt6: replace the QByteArray parameter with [pointer,len] pair
*/
int qstrcmp(const QByteArray &str1, const QByteArray &str2)
{
@@ -950,7 +1063,7 @@ QByteArray qUncompress(const uchar* data, int nbytes)
$LC_CTYPE is set, most Unix systems do "the right thing".)
Functions that this affects include contains(), indexOf(),
lastIndexOf(), operator<(), operator<=(), operator>(),
- operator>=(), toLower() and toUpper().
+ operator>=(), isLower(), isUpper(), toLower() and toUpper().
This issue does not apply to \l{QString}s since they represent
characters using Unicode.
@@ -2864,6 +2977,31 @@ int QByteArray::count(char ch) const
*/
/*!
+ \fn int QByteArray::compare(const char *c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
+ \since 5.12
+
+ Returns an integer less than, equal to, or greater than zero depending on
+ whether this QByteArray sorts before, at the same position, or after the
+ string pointed to by \a c. The comparison is performed according to case
+ sensitivity \a cs.
+
+ \sa operator==
+*/
+
+/*!
+ \fn int QByteArray::compare(const QByteArray &a, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
+ \overload
+ \since 5.12
+
+ Returns an integer less than, equal to, or greater than zero depending on
+ whether this QByteArray sorts before, at the same position, or after the
+ QByteArray \a a. The comparison is performed according to case sensitivity
+ \a cs.
+
+ \sa operator==
+*/
+
+/*!
Returns \c true if this byte array starts with byte array \a ba;
otherwise returns \c false.
@@ -2941,6 +3079,78 @@ bool QByteArray::endsWith(const char *str) const
return qstrncmp(d->data() + d->size - len, str, len) == 0;
}
+/*!
+ Returns true if \a c is an uppercase Latin1 letter.
+ \note The multiplication sign 0xD7 and the sz ligature 0xDF are not
+ treated as uppercase Latin1.
+ */
+static inline bool isUpperCaseLatin1(char c)
+{
+ if (c >= 'A' && c <= 'Z')
+ return true;
+
+ return (uchar(c) >= 0xC0 && uchar(c) <= 0xDE && uchar(c) != 0xD7);
+}
+
+/*!
+ Returns \c true if this byte array contains only uppercase letters,
+ otherwise returns \c false. The byte array is interpreted as a Latin-1
+ encoded string.
+ \since 5.12
+
+ \sa isLower(), toUpper()
+*/
+bool QByteArray::isUpper() const
+{
+ if (isEmpty())
+ return false;
+
+ const char *d = data();
+
+ for (int i = 0, max = size(); i < max; ++i) {
+ if (!isUpperCaseLatin1(d[i]))
+ return false;
+ }
+
+ return true;
+}
+
+/*!
+ Returns true if \a c is an lowercase Latin1 letter.
+ \note The division sign 0xF7 is not treated as lowercase Latin1,
+ but the small y dieresis 0xFF is.
+ */
+static inline bool isLowerCaseLatin1(char c)
+{
+ if (c >= 'a' && c <= 'z')
+ return true;
+
+ return (uchar(c) >= 0xD0 && uchar(c) != 0xF7);
+}
+
+/*!
+ Returns \c true if this byte array contains only lowercase letters,
+ otherwise returns \c false. The byte array is interpreted as a Latin-1
+ encoded string.
+ \since 5.12
+
+ \sa isUpper(), toLower()
+ */
+bool QByteArray::isLower() const
+{
+ if (isEmpty())
+ return false;
+
+ const char *d = data();
+
+ for (int i = 0, max = size(); i < max; ++i) {
+ if (!isLowerCaseLatin1(d[i]))
+ return false;
+ }
+
+ return true;
+}
+
/*! \overload
Returns \c true if this byte array ends with character \a ch;
@@ -3052,7 +3262,7 @@ QByteArray QByteArray::mid(int pos, int len) const
Example:
\snippet code/src_corelib_tools_qbytearray.cpp 30
- \sa toUpper(), {8-bit Character Comparisons}
+ \sa isLower(), toUpper(), {8-bit Character Comparisons}
*/
// prevent the compiler from inlining the function in each of
@@ -3106,7 +3316,7 @@ QByteArray QByteArray::toLower_helper(QByteArray &a)
Example:
\snippet code/src_corelib_tools_qbytearray.cpp 31
- \sa toLower(), {8-bit Character Comparisons}
+ \sa isUpper(), toLower(), {8-bit Character Comparisons}
*/
QByteArray QByteArray::toUpper_helper(const QByteArray &a)
@@ -3295,6 +3505,8 @@ QDataStream &operator>>(QDataStream &in, QByteArray &ba)
Returns \c true if byte array \a a1 is equal to byte array \a a2;
otherwise returns \c false.
+
+ \sa QByteArray::compare()
*/
/*! \fn bool operator==(const QByteArray &a1, const char *a2)
@@ -3304,6 +3516,8 @@ QDataStream &operator>>(QDataStream &in, QByteArray &ba)
Returns \c true if byte array \a a1 is equal to string \a a2;
otherwise returns \c false.
+
+ \sa QByteArray::compare()
*/
/*! \fn bool operator==(const char *a1, const QByteArray &a2)
@@ -3313,6 +3527,8 @@ QDataStream &operator>>(QDataStream &in, QByteArray &ba)
Returns \c true if string \a a1 is equal to byte array \a a2;
otherwise returns \c false.
+
+ \sa QByteArray::compare()
*/
/*! \fn bool operator!=(const QByteArray &a1, const QByteArray &a2)
@@ -3322,6 +3538,8 @@ QDataStream &operator>>(QDataStream &in, QByteArray &ba)
Returns \c true if byte array \a a1 is not equal to byte array \a a2;
otherwise returns \c false.
+
+ \sa QByteArray::compare()
*/
/*! \fn bool operator!=(const QByteArray &a1, const char *a2)
@@ -3331,6 +3549,8 @@ QDataStream &operator>>(QDataStream &in, QByteArray &ba)
Returns \c true if byte array \a a1 is not equal to string \a a2;
otherwise returns \c false.
+
+ \sa QByteArray::compare()
*/
/*! \fn bool operator!=(const char *a1, const QByteArray &a2)
@@ -3340,6 +3560,8 @@ QDataStream &operator>>(QDataStream &in, QByteArray &ba)
Returns \c true if string \a a1 is not equal to byte array \a a2;
otherwise returns \c false.
+
+ \sa QByteArray::compare()
*/
/*! \fn bool operator<(const QByteArray &a1, const QByteArray &a2)
@@ -3349,6 +3571,8 @@ QDataStream &operator>>(QDataStream &in, QByteArray &ba)
Returns \c true if byte array \a a1 is lexically less than byte array
\a a2; otherwise returns \c false.
+
+ \sa QByteArray::compare()
*/
/*! \fn inline bool operator<(const QByteArray &a1, const char *a2)
@@ -3358,6 +3582,8 @@ QDataStream &operator>>(QDataStream &in, QByteArray &ba)
Returns \c true if byte array \a a1 is lexically less than string
\a a2; otherwise returns \c false.
+
+ \sa QByteArray::compare()
*/
/*! \fn bool operator<(const char *a1, const QByteArray &a2)
@@ -3367,6 +3593,8 @@ QDataStream &operator>>(QDataStream &in, QByteArray &ba)
Returns \c true if string \a a1 is lexically less than byte array
\a a2; otherwise returns \c false.
+
+ \sa QByteArray::compare()
*/
/*! \fn bool operator<=(const QByteArray &a1, const QByteArray &a2)
@@ -3376,6 +3604,8 @@ QDataStream &operator>>(QDataStream &in, QByteArray &ba)
Returns \c true if byte array \a a1 is lexically less than or equal
to byte array \a a2; otherwise returns \c false.
+
+ \sa QByteArray::compare()
*/
/*! \fn bool operator<=(const QByteArray &a1, const char *a2)
@@ -3385,6 +3615,8 @@ QDataStream &operator>>(QDataStream &in, QByteArray &ba)
Returns \c true if byte array \a a1 is lexically less than or equal
to string \a a2; otherwise returns \c false.
+
+ \sa QByteArray::compare()
*/
/*! \fn bool operator<=(const char *a1, const QByteArray &a2)
@@ -3394,6 +3626,8 @@ QDataStream &operator>>(QDataStream &in, QByteArray &ba)
Returns \c true if string \a a1 is lexically less than or equal
to byte array \a a2; otherwise returns \c false.
+
+ \sa QByteArray::compare()
*/
/*! \fn bool operator>(const QByteArray &a1, const QByteArray &a2)
@@ -3403,6 +3637,8 @@ QDataStream &operator>>(QDataStream &in, QByteArray &ba)
Returns \c true if byte array \a a1 is lexically greater than byte
array \a a2; otherwise returns \c false.
+
+ \sa QByteArray::compare()
*/
/*! \fn bool operator>(const QByteArray &a1, const char *a2)
@@ -3412,6 +3648,8 @@ QDataStream &operator>>(QDataStream &in, QByteArray &ba)
Returns \c true if byte array \a a1 is lexically greater than string
\a a2; otherwise returns \c false.
+
+ \sa QByteArray::compare()
*/
/*! \fn bool operator>(const char *a1, const QByteArray &a2)
@@ -3421,6 +3659,8 @@ QDataStream &operator>>(QDataStream &in, QByteArray &ba)
Returns \c true if string \a a1 is lexically greater than byte array
\a a2; otherwise returns \c false.
+
+ \sa QByteArray::compare()
*/
/*! \fn bool operator>=(const QByteArray &a1, const QByteArray &a2)
@@ -3430,6 +3670,8 @@ QDataStream &operator>>(QDataStream &in, QByteArray &ba)
Returns \c true if byte array \a a1 is lexically greater than or
equal to byte array \a a2; otherwise returns \c false.
+
+ \sa QByteArray::compare()
*/
/*! \fn bool operator>=(const QByteArray &a1, const char *a2)
@@ -3439,6 +3681,8 @@ QDataStream &operator>>(QDataStream &in, QByteArray &ba)
Returns \c true if byte array \a a1 is lexically greater than or
equal to string \a a2; otherwise returns \c false.
+
+ \sa QByteArray::compare()
*/
/*! \fn bool operator>=(const char *a1, const QByteArray &a2)
@@ -3448,6 +3692,8 @@ QDataStream &operator>>(QDataStream &in, QByteArray &ba)
Returns \c true if string \a a1 is lexically greater than or
equal to byte array \a a2; otherwise returns \c false.
+
+ \sa QByteArray::compare()
*/
/*! \fn const QByteArray operator+(const QByteArray &a1, const QByteArray &a2)
@@ -3878,9 +4124,16 @@ ushort QByteArray::toUShort(bool *ok, int base) const
\snippet code/src_corelib_tools_qbytearray.cpp 38
+ \warning The QByteArray content may only contain valid numerical characters
+ which includes the plus/minus sign, the characters g and e used in scientific
+ notation, and the decimal point. Including the unit or additional characters
+ leads to a conversion error.
+
\note The conversion of the number is performed in the default C locale,
irrespective of the user's locale.
+ This function ignores leading and trailing whitespace.
+
\sa number()
*/
@@ -3889,7 +4142,8 @@ double QByteArray::toDouble(bool *ok) const
QByteArray nulled = nulTerminated();
bool nonNullOk = false;
int processed = 0;
- double d = asciiToDouble(nulled.constData(), nulled.length(), nonNullOk, processed);
+ double d = asciiToDouble(nulled.constData(), nulled.length(),
+ nonNullOk, processed, WhitespacesAllowed);
if (ok)
*ok = nonNullOk;
return d;
@@ -3903,9 +4157,18 @@ double QByteArray::toDouble(bool *ok) const
If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
to \c false, and success by setting *\a{ok} to \c true.
+ \snippet code/src_corelib_tools_qbytearray.cpp 38float
+
+ \warning The QByteArray content may only contain valid numerical characters
+ which includes the plus/minus sign, the characters g and e used in scientific
+ notation, and the decimal point. Including the unit or additional characters
+ leads to a conversion error.
+
\note The conversion of the number is performed in the default C locale,
irrespective of the user's locale.
+ This function ignores leading and trailing whitespace.
+
\sa number()
*/
diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h
index 300f795469..8ee3a29ecc 100644
--- a/src/corelib/tools/qbytearray.h
+++ b/src/corelib/tools/qbytearray.h
@@ -99,6 +99,7 @@ inline int qstrncmp(const char *str1, const char *str2, uint len)
}
Q_CORE_EXPORT int qstricmp(const char *, const char *);
Q_CORE_EXPORT int qstrnicmp(const char *, const char *, uint len);
+Q_CORE_EXPORT int qstrnicmp(const char *, qsizetype, const char *, qsizetype = -1);
// implemented in qvsnprintf.cpp
Q_CORE_EXPORT int qvsnprintf(char *str, size_t n, const char *fmt, va_list ap);
@@ -231,6 +232,9 @@ public:
int count(const char *a) const;
int count(const QByteArray &a) const;
+ inline int compare(const char *c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ inline int compare(const QByteArray &a, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+
Q_REQUIRED_RESULT QByteArray left(int len) const;
Q_REQUIRED_RESULT QByteArray right(int len) const;
Q_REQUIRED_RESULT QByteArray mid(int index, int len = -1) const;
@@ -245,6 +249,9 @@ public:
bool endsWith(char c) const;
bool endsWith(const char *c) const;
+ bool isUpper() const;
+ bool isLower() const;
+
void truncate(int pos);
void chop(int n);
@@ -600,6 +607,16 @@ inline bool QByteArray::contains(const QByteArray &a) const
{ return indexOf(a) != -1; }
inline bool QByteArray::contains(char c) const
{ return indexOf(c) != -1; }
+inline int QByteArray::compare(const char *c, Qt::CaseSensitivity cs) const
+{
+ return cs == Qt::CaseSensitive ? qstrcmp(*this, c) :
+ qstrnicmp(data(), size(), c, -1);
+}
+inline int QByteArray::compare(const QByteArray &a, Qt::CaseSensitivity cs) const
+{
+ return cs == Qt::CaseSensitive ? qstrcmp(*this, a) :
+ qstrnicmp(data(), size(), a.data(), a.size());
+}
inline bool operator==(const QByteArray &a1, const QByteArray &a2) Q_DECL_NOTHROW
{ return (a1.size() == a2.size()) && (memcmp(a1.constData(), a2.constData(), a1.size())==0); }
inline bool operator==(const QByteArray &a1, const char *a2) Q_DECL_NOTHROW
diff --git a/src/corelib/tools/qcontiguouscache.h b/src/corelib/tools/qcontiguouscache.h
index 18facf7e42..faa7263d6b 100644
--- a/src/corelib/tools/qcontiguouscache.h
+++ b/src/corelib/tools/qcontiguouscache.h
@@ -211,6 +211,7 @@ void QContiguousCache<T>::detach_helper()
template <typename T>
void QContiguousCache<T>::setCapacity(int asize)
{
+ Q_ASSERT(asize >= 0);
if (asize == d->alloc)
return;
detach();
@@ -285,6 +286,7 @@ inline QContiguousCacheData *QContiguousCache<T>::allocateData(int aalloc)
template <typename T>
QContiguousCache<T>::QContiguousCache(int cap)
{
+ Q_ASSERT(cap >= 0);
d = allocateData(cap);
d->ref.store(1);
d->alloc = cap;
diff --git a/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp
index a1b121f1ee..3c79bb797d 100644
--- a/src/corelib/tools/qcryptographichash.cpp
+++ b/src/corelib/tools/qcryptographichash.cpp
@@ -544,6 +544,46 @@ QByteArray QCryptographicHash::hash(const QByteArray &data, Algorithm method)
return hash.result();
}
+/*!
+ Returns the size of the output of the selected hash \a method in bytes.
+
+ \since 5.12
+*/
+int QCryptographicHash::hashLength(QCryptographicHash::Algorithm method)
+{
+ switch (method) {
+ case QCryptographicHash::Sha1:
+ return 20;
+#ifndef QT_CRYPTOGRAPHICHASH_ONLY_SHA1
+ case QCryptographicHash::Md4:
+ return 16;
+ case QCryptographicHash::Md5:
+ return 16;
+ case QCryptographicHash::Sha224:
+ return SHA224HashSize;
+ case QCryptographicHash::Sha256:
+ return SHA256HashSize;
+ case QCryptographicHash::Sha384:
+ return SHA384HashSize;
+ case QCryptographicHash::Sha512:
+ return SHA512HashSize;
+ case QCryptographicHash::RealSha3_224:
+ case QCryptographicHash::Keccak_224:
+ return 224 / 8;
+ case QCryptographicHash::RealSha3_256:
+ case QCryptographicHash::Keccak_256:
+ return 256 / 8;
+ case QCryptographicHash::RealSha3_384:
+ case QCryptographicHash::Keccak_384:
+ return 384 / 8;
+ case QCryptographicHash::RealSha3_512:
+ case QCryptographicHash::Keccak_512:
+ return 512 / 8;
+#endif
+ }
+ return 0;
+}
+
QT_END_NAMESPACE
#ifndef QT_NO_QOBJECT
diff --git a/src/corelib/tools/qcryptographichash.h b/src/corelib/tools/qcryptographichash.h
index 2f74d42405..ad1de7c756 100644
--- a/src/corelib/tools/qcryptographichash.h
+++ b/src/corelib/tools/qcryptographichash.h
@@ -101,6 +101,7 @@ public:
QByteArray result() const;
static QByteArray hash(const QByteArray &data, Algorithm method);
+ static int hashLength(Algorithm method);
private:
Q_DISABLE_COPY(QCryptographicHash)
QCryptographicHashPrivate *d;
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp
index 49e7173de0..288c7963d9 100644
--- a/src/corelib/tools/qdatetime.cpp
+++ b/src/corelib/tools/qdatetime.cpp
@@ -2979,18 +2979,18 @@ inline QDateTime::Data QDateTimePrivate::create(const QDate &toDate, const QTime
// DST transitions are disambiguated by hint.
inline qint64 QDateTimePrivate::zoneMSecsToEpochMSecs(qint64 zoneMSecs, const QTimeZone &zone,
DaylightStatus hint,
- QDate *localDate, QTime *localTime)
+ QDate *zoneDate, QTime *zoneTime)
{
// Get the effective data from QTimeZone
QTimeZonePrivate::Data data = zone.d->dataForLocalTime(zoneMSecs, int(hint));
- // Docs state any LocalTime before 1970-01-01 will *not* have any DST applied
+ // Docs state any time before 1970-01-01 will *not* have any DST applied
// but all affected times afterwards will have DST applied.
- if (data.atMSecsSinceEpoch >= 0) {
- msecsToTime(data.atMSecsSinceEpoch + (data.offsetFromUtc * 1000), localDate, localTime);
- return data.atMSecsSinceEpoch;
+ if (data.atMSecsSinceEpoch < 0) {
+ msecsToTime(zoneMSecs, zoneDate, zoneTime);
+ return zoneMSecs - data.standardTimeOffset * 1000;
} else {
- msecsToTime(zoneMSecs, localDate, localTime);
- return zoneMSecs - (data.standardTimeOffset * 1000);
+ msecsToTime(data.atMSecsSinceEpoch + data.offsetFromUtc * 1000, zoneDate, zoneTime);
+ return data.atMSecsSinceEpoch;
}
}
#endif // timezone
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h
index ce663ce2ca..a586ca5671 100644
--- a/src/corelib/tools/qhash.h
+++ b/src/corelib/tools/qhash.h
@@ -348,6 +348,7 @@ public:
inline iterator operator-(int j) const { return operator+(-j); }
inline iterator &operator+=(int j) { return *this = *this + j; }
inline iterator &operator-=(int j) { return *this = *this - j; }
+ friend inline iterator operator+(int j, iterator k) { return k + j; }
#ifndef QT_STRICT_ITERATORS
public:
@@ -413,6 +414,7 @@ public:
inline const_iterator operator-(int j) const { return operator+(-j); }
inline const_iterator &operator+=(int j) { return *this = *this + j; }
inline const_iterator &operator-=(int j) { return *this = *this - j; }
+ friend inline const_iterator operator+(int j, const_iterator k) { return k + j; }
// ### Qt 5: not sure this is necessary anymore
#ifdef QT_STRICT_ITERATORS
diff --git a/src/corelib/tools/qlinkedlist.h b/src/corelib/tools/qlinkedlist.h
index c8f3f4c8c3..1e6d4df474 100644
--- a/src/corelib/tools/qlinkedlist.h
+++ b/src/corelib/tools/qlinkedlist.h
@@ -159,6 +159,7 @@ public:
inline iterator operator-(int j) const { return operator+(-j); }
inline iterator &operator+=(int j) { return *this = *this + j; }
inline iterator &operator-=(int j) { return *this = *this - j; }
+ friend inline iterator operator+(int j, iterator k) { return k + j; }
};
friend class iterator;
@@ -193,6 +194,7 @@ public:
inline const_iterator operator-(int j) const { return operator+(-j); }
inline const_iterator &operator+=(int j) { return *this = *this + j; }
inline const_iterator &operator-=(int j) { return *this = *this - j; }
+ friend inline const_iterator operator+(int j, const_iterator k) { return k + j; }
};
friend class const_iterator;
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h
index af7659e995..c00220ad3a 100644
--- a/src/corelib/tools/qlist.h
+++ b/src/corelib/tools/qlist.h
@@ -269,6 +269,7 @@ public:
inline iterator &operator-=(difference_type j) { i-=j; return *this; }
inline iterator operator+(difference_type j) const { return iterator(i+j); }
inline iterator operator-(difference_type j) const { return iterator(i-j); }
+ friend inline iterator operator+(difference_type j, iterator k) { return k + j; }
inline int operator-(iterator j) const { return int(i - j.i); }
};
friend class iterator;
@@ -312,6 +313,7 @@ public:
inline const_iterator &operator-=(difference_type j) { i-=j; return *this; }
inline const_iterator operator+(difference_type j) const { return const_iterator(i+j); }
inline const_iterator operator-(difference_type j) const { return const_iterator(i-j); }
+ friend inline const_iterator operator+(difference_type j, const_iterator k) { return k + j; }
inline int operator-(const_iterator j) const { return int(i - j.i); }
};
friend class const_iterator;
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 00a2c05c35..d2254f5884 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -233,14 +233,6 @@ QLocaleId QLocaleId::withLikelySubtagsAdded() const
if (addLikelySubtags(id))
return id;
}
- // language_script
- if (country_id) {
- QLocaleId id = QLocaleId::fromIds(language_id, script_id, 0);
- if (addLikelySubtags(id)) {
- id.country_id = country_id;
- return id;
- }
- }
// language_region
if (script_id) {
QLocaleId id = QLocaleId::fromIds(language_id, 0, country_id);
@@ -249,6 +241,14 @@ QLocaleId QLocaleId::withLikelySubtagsAdded() const
return id;
}
}
+ // language_script
+ if (country_id) {
+ QLocaleId id = QLocaleId::fromIds(language_id, script_id, 0);
+ if (addLikelySubtags(id)) {
+ id.country_id = country_id;
+ return id;
+ }
+ }
// language
if (script_id && country_id) {
QLocaleId id = QLocaleId::fromIds(language_id, 0, 0);
@@ -258,6 +258,14 @@ QLocaleId QLocaleId::withLikelySubtagsAdded() const
return id;
}
}
+ // und_script
+ if (language_id) {
+ QLocaleId id = QLocaleId::fromIds(0, script_id, 0);
+ if (addLikelySubtags(id)) {
+ id.language_id = language_id;
+ return id;
+ }
+ }
return *this;
}
@@ -382,6 +390,13 @@ const QLocaleData *QLocaleData::findLocaleData(QLocale::Language language, QLoca
QList<QLocaleId> tried;
tried.push_back(likelyId);
+ // No match; try again with raw data:
+ if (!tried.contains(localeId)) {
+ if (const QLocaleData *const data = findLocaleDataById(localeId))
+ return data;
+ tried.push_back(localeId);
+ }
+
// No match; try again with likely country
if (country != QLocale::AnyCountry
&& (language != QLocale::AnyLanguage || script != QLocale::AnyScript)) {
@@ -1174,7 +1189,7 @@ T toIntegral_helper(const QLocalePrivate *d, QStringView str, bool *ok)
// we select the right overload by the last, unused parameter
Int64 val = toIntegral_helper(d->m_data, str, ok, d->m_numberOptions, Int64());
if (T(val) != val) {
- if (ok)
+ if (ok != nullptr)
*ok = false;
val = 0;
}
@@ -3561,14 +3576,14 @@ double QLocaleData::stringToDouble(QStringView str, bool *ok,
{
CharBuff buff;
if (!numberToCLocale(str, number_options, &buff)) {
- if (ok != 0)
+ if (ok != nullptr)
*ok = false;
return 0.0;
}
int processed = 0;
bool nonNullOk = false;
double d = asciiToDouble(buff.constData(), buff.length() - 1, nonNullOk, processed);
- if (ok)
+ if (ok != nullptr)
*ok = nonNullOk;
return d;
}
@@ -3578,7 +3593,7 @@ qlonglong QLocaleData::stringToLongLong(QStringView str, int base, bool *ok,
{
CharBuff buff;
if (!numberToCLocale(str, number_options, &buff)) {
- if (ok != 0)
+ if (ok != nullptr)
*ok = false;
return 0;
}
@@ -3591,7 +3606,7 @@ qulonglong QLocaleData::stringToUnsLongLong(QStringView str, int base, bool *ok,
{
CharBuff buff;
if (!numberToCLocale(str, number_options, &buff)) {
- if (ok != 0)
+ if (ok != nullptr)
*ok = false;
return 0;
}
@@ -3606,7 +3621,7 @@ double QLocaleData::bytearrayToDouble(const char *num, bool *ok)
Q_ASSERT(len >= 0);
int processed = 0;
double d = asciiToDouble(num, len, nonNullOk, processed);
- if (ok)
+ if (ok != nullptr)
*ok = nonNullOk;
return d;
}
@@ -3617,7 +3632,7 @@ qlonglong QLocaleData::bytearrayToLongLong(const char *num, int base, bool *ok)
const char *endptr;
if (*num == '\0') {
- if (ok != 0)
+ if (ok != nullptr)
*ok = false;
return 0;
}
@@ -3625,19 +3640,24 @@ qlonglong QLocaleData::bytearrayToLongLong(const char *num, int base, bool *ok)
qlonglong l = qstrtoll(num, &endptr, base, &_ok);
if (!_ok) {
- if (ok != 0)
+ if (ok != nullptr)
*ok = false;
return 0;
}
if (*endptr != '\0') {
+ while (ascii_isspace(*endptr))
+ ++endptr;
+ }
+
+ if (*endptr != '\0') {
// we stopped at a non-digit character after converting some digits
- if (ok != 0)
+ if (ok != nullptr)
*ok = false;
return 0;
}
- if (ok != 0)
+ if (ok != nullptr)
*ok = true;
return l;
}
@@ -3648,13 +3668,24 @@ qulonglong QLocaleData::bytearrayToUnsLongLong(const char *num, int base, bool *
const char *endptr;
qulonglong l = qstrtoull(num, &endptr, base, &_ok);
- if (!_ok || *endptr != '\0') {
- if (ok != 0)
+ if (!_ok) {
+ if (ok != nullptr)
+ *ok = false;
+ return 0;
+ }
+
+ if (*endptr != '\0') {
+ while (ascii_isspace(*endptr))
+ ++endptr;
+ }
+
+ if (*endptr != '\0') {
+ if (ok != nullptr)
*ok = false;
return 0;
}
- if (ok != 0)
+ if (ok != nullptr)
*ok = true;
return l;
}
diff --git a/src/corelib/tools/qlocale.qdoc b/src/corelib/tools/qlocale.qdoc
index ed3eb93313..131552b7b7 100644
--- a/src/corelib/tools/qlocale.qdoc
+++ b/src/corelib/tools/qlocale.qdoc
@@ -92,7 +92,7 @@
\note For the current keyboard input locale take a look at
QInputMethod::locale().
- QLocale's data is based on Common Locale Data Repository v31.0.1.
+ QLocale's data is based on Common Locale Data Repository v33.1.
\sa QString::arg(), QString::toInt(), QString::toDouble(),
QInputMethod::locale()
diff --git a/src/corelib/tools/qlocale_data_p.h b/src/corelib/tools/qlocale_data_p.h
index cf210454d4..a0804902af 100644
--- a/src/corelib/tools/qlocale_data_p.h
+++ b/src/corelib/tools/qlocale_data_p.h
@@ -77,8 +77,8 @@ static const int ImperialMeasurementSystemsCount =
// GENERATED PART STARTS HERE
/*
- This part of the file was generated on 2017-06-07 from the
- Common Locale Data Repository v31.0.1
+ This part of the file was generated on 2018-07-06 from the
+ Common Locale Data Repository v33.1
http://www.unicode.org/cldr/
@@ -258,6 +258,7 @@ static const QLocaleId likely_subtags[] = {
{ 66, 0, 0 }, { 66, 22, 114 }, // ko -> ko_Kore_KR
{ 147, 0, 0 }, { 147, 13, 100 }, // kok -> kok_Deva_IN
{ 169, 0, 0 }, { 169, 7, 121 }, // kpe -> kpe_Latn_LR
+ { 225, 0, 0 }, { 225, 7, 0 }, // kr -> kr_Latn
{ 62, 0, 0 }, { 62, 1, 100 }, // ks -> ks_Arab_IN
{ 214, 0, 0 }, { 214, 7, 210 }, // ksb -> ksb_Latn_TZ
{ 243, 0, 0 }, { 243, 7, 37 }, // ksf -> ksf_Latn_CM
@@ -653,7 +654,7 @@ static const QLocaleId likely_subtags[] = {
{ 0, 0, 164 }, { 350, 7, 164 }, // und_PW -> pau_Latn_PW
{ 0, 0, 168 }, { 45, 7, 168 }, // und_PY -> gn_Latn_PY
{ 0, 0, 175 }, { 8, 1, 175 }, // und_QA -> ar_Arab_QA
- { 0, 0, 259 }, { 31, 7, 31 }, // und_QO -> en_Latn_IO
+ { 0, 0, 259 }, { 31, 7, 249 }, // und_QO -> en_Latn_DG
{ 0, 0, 176 }, { 37, 7, 176 }, // und_RE -> fr_Latn_RE
{ 0, 0, 177 }, { 95, 7, 177 }, // und_RO -> ro_Latn_RO
{ 0, 0, 243 }, { 100, 2, 243 }, // und_RS -> sr_Cyrl_RS
@@ -766,7 +767,6 @@ static const QLocaleId likely_subtags[] = {
{ 0, 56, 0 }, { 280, 56, 170 }, // und_Hano -> hnn_Hano_PH
{ 0, 5, 0 }, { 25, 5, 44 }, // und_Hans -> zh_Hans_CN
{ 0, 6, 0 }, { 25, 6, 208 }, // und_Hant -> zh_Hant_TW
- { 0, 6, 44 }, { 357, 6, 44 }, // und_Hant_CN -> yue_Hant_CN
{ 0, 130, 0 }, { 356, 130, 103 }, // und_Hatr -> mis_Hatr_IQ
{ 0, 18, 0 }, { 48, 18, 105 }, // und_Hebr -> he_Hebr_IL
{ 0, 18, 38 }, { 137, 18, 38 }, // und_Hebr_CA -> yi_Hebr_CA
@@ -1159,7 +1159,7 @@ static const quint16 locale_index[] = {
0, // Buginese
0, // Buhid
0, // Carian
- 535, // Chakma
+ 0, // Chakma
0, // ClassicalMandaic
0, // Coptic
0, // Dogri
@@ -1177,7 +1177,7 @@ static const quint16 locale_index[] = {
0, // Lycian
0, // Lydian
0, // Mandingo
- 536, // Manipuri
+ 535, // Manipuri
0, // Meroitic
0, // NorthernThai
0, // OldIrish
@@ -1196,26 +1196,26 @@ static const quint16 locale_index[] = {
0, // Sora
0, // Sylheti
0, // Tagbanwa
- 537, // TaiDam
+ 536, // TaiDam
0, // TaiNua
0, // Ugaritic
- 538, // Akoose
- 539, // Lakota
- 540, // Standard Moroccan Tamazight
- 541, // Mapuche
- 542, // Central Kurdish
- 544, // LowerSorbian
- 545, // UpperSorbian
- 546, // Kenyang
- 547, // Mohawk
- 548, // Nko
+ 537, // Akoose
+ 538, // Lakota
+ 539, // Standard Moroccan Tamazight
+ 540, // Mapuche
+ 541, // Central Kurdish
+ 543, // LowerSorbian
+ 544, // UpperSorbian
+ 545, // Kenyang
+ 546, // Mohawk
+ 547, // Nko
0, // Prussian
- 549, // Kiche
- 550, // Southern Sami
- 551, // Lule Sami
- 552, // Inari Sami
- 553, // Skolt Sami
- 554, // Warlpiri
+ 548, // Kiche
+ 549, // Southern Sami
+ 550, // Lule Sami
+ 551, // Inari Sami
+ 552, // Skolt Sami
+ 553, // Warlpiri
0, // Manichaean Middle Persian
0, // Mende
0, // Ancient North Arabian
@@ -1233,10 +1233,10 @@ static const quint16 locale_index[] = {
0, // Bhojpuri
0, // Hieroglyphic Luwian
0, // Literary Chinese
- 555, // Mazanderani
+ 554, // Mazanderani
0, // Mru
0, // Newari
- 556, // Northern Luri
+ 555, // Northern Luri
0, // Palauan
0, // Papiamento
0, // Saraiki
@@ -1244,7 +1244,7 @@ static const quint16 locale_index[] = {
0, // Tok Pisin
0, // Tuvalu
0, // UncodedLanguages
- 558, // Cantonese
+ 557, // Cantonese
0, // Osage
0, // Tangut
0 // trailing 0
@@ -1258,559 +1258,559 @@ static const QLocaleData locale_data[] = {
{ 4, 7, 69, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,84,66}, 0,0 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 6, 7 }, // Afar/Latin/Ethiopia
{ 5, 7, 195, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 6,8 , 6,8 , 53,10 , 80,18 , 37,5 , 8,10 , 416,59 , 475,92 , 134,24 , 416,59 , 475,92 , 134,24 , 210,28 , 238,58 , 296,14 , 210,28 , 238,58 , 296,14 , 4,3 , 4,3 , 49,5 , 5,17 , 22,23 , {90,65,82}, 5,1 , 31,67 , 4,4 , 4,0 , 24,9 , 33,11 , 2, 1, 7, 6, 7 }, // Afrikaans/Latin/SouthAfrica
{ 5, 7, 148, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 6,8 , 6,8 , 53,10 , 98,16 , 37,5 , 8,10 , 416,59 , 475,92 , 134,24 , 416,59 , 475,92 , 134,24 , 210,28 , 238,58 , 296,14 , 210,28 , 238,58 , 296,14 , 4,3 , 4,3 , 49,5 , 5,17 , 22,23 , {78,65,68}, 6,1 , 98,55 , 4,4 , 4,0 , 24,9 , 44,7 , 2, 1, 1, 6, 7 }, // Afrikaans/Latin/Namibia
- { 6, 7, 2, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 14,9 , 14,9 , 114,6 , 10,17 , 18,7 , 42,13 , 567,48 , 615,78 , 693,24 , 717,48 , 765,78 , 843,24 , 310,28 , 338,58 , 396,14 , 310,28 , 410,58 , 396,14 , 7,11 , 7,10 , 54,4 , 5,17 , 22,23 , {65,76,76}, 7,4 , 153,45 , 13,5 , 4,0 , 51,5 , 56,8 , 0, 0, 1, 6, 7 }, // Albanian/Latin/Albania
- { 6, 7, 127, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 14,9 , 14,9 , 114,6 , 10,17 , 37,5 , 8,10 , 567,48 , 615,78 , 693,24 , 717,48 , 765,78 , 843,24 , 310,28 , 338,58 , 396,14 , 310,28 , 410,58 , 396,14 , 7,11 , 7,10 , 54,4 , 5,17 , 22,23 , {77,75,68}, 11,3 , 198,54 , 13,5 , 4,0 , 51,5 , 64,8 , 2, 1, 1, 6, 7 }, // Albanian/Latin/Macedonia
- { 6, 7, 257, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 14,9 , 14,9 , 114,6 , 10,17 , 37,5 , 8,10 , 567,48 , 615,78 , 693,24 , 717,48 , 765,78 , 843,24 , 310,28 , 338,58 , 396,14 , 310,28 , 410,58 , 396,14 , 7,11 , 7,10 , 54,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 252,21 , 13,5 , 4,0 , 51,5 , 72,6 , 2, 1, 1, 6, 7 }, // Albanian/Latin/Kosovo
- { 7, 14, 69, 46, 44, 59, 37, 48, 45, 43, 101, 171, 187, 8249, 8250, 23,6 , 23,6 , 29,9 , 38,8 , 120,10 , 130,17 , 18,7 , 25,12 , 867,46 , 913,61 , 974,24 , 867,46 , 913,61 , 974,24 , 468,27 , 495,28 , 523,14 , 468,27 , 495,28 , 523,14 , 18,3 , 17,4 , 58,3 , 61,23 , 22,23 , {69,84,66}, 15,2 , 273,34 , 4,4 , 4,0 , 78,4 , 82,5 , 2, 1, 7, 6, 7 }, // Amharic/Ethiopic/Ethiopia
- { 8, 1, 64, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 18,7 , 25,12 , 998,75 , 998,75 , 1073,24 , 998,75 , 998,75 , 1073,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {69,71,80}, 17,5 , 307,81 , 13,5 , 4,0 , 87,7 , 94,3 , 2, 1, 6, 5, 6 }, // Arabic/Arabic/Egypt
- { 8, 1, 3, 44, 46, 59, 37, 48, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 18,7 , 25,12 , 1097,71 , 1097,71 , 1168,24 , 1097,71 , 1097,71 , 1168,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {68,90,68}, 22,5 , 388,102 , 13,5 , 4,0 , 87,7 , 97,7 , 2, 1, 6, 5, 6 }, // Arabic/Arabic/Algeria
- { 8, 1, 17, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 18,7 , 25,12 , 998,75 , 998,75 , 1073,24 , 998,75 , 998,75 , 1073,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {66,72,68}, 27,5 , 490,91 , 13,5 , 4,0 , 87,7 , 104,7 , 3, 0, 6, 5, 6 }, // Arabic/Arabic/Bahrain
- { 8, 1, 42, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 18,7 , 25,12 , 998,75 , 998,75 , 1073,24 , 998,75 , 998,75 , 1073,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {88,65,70}, 32,4 , 581,112 , 13,5 , 4,0 , 87,7 , 111,4 , 0, 0, 1, 6, 7 }, // Arabic/Arabic/Chad
- { 8, 1, 48, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 37,5 , 8,10 , 998,75 , 998,75 , 1073,24 , 998,75 , 998,75 , 1073,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {75,77,70}, 36,7 , 693,105 , 13,5 , 4,0 , 87,7 , 115,9 , 0, 0, 1, 6, 7 }, // Arabic/Arabic/Comoros
- { 8, 1, 59, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 18,7 , 25,12 , 998,75 , 998,75 , 1073,24 , 998,75 , 998,75 , 1073,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {68,74,70}, 43,3 , 798,84 , 13,5 , 4,0 , 87,7 , 124,6 , 0, 0, 6, 6, 7 }, // Arabic/Arabic/Djibouti
- { 8, 1, 67, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 18,7 , 25,12 , 998,75 , 998,75 , 1073,24 , 998,75 , 998,75 , 1073,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {69,82,78}, 46,3 , 882,91 , 13,5 , 4,0 , 87,7 , 130,7 , 2, 1, 1, 6, 7 }, // Arabic/Arabic/Eritrea
- { 8, 1, 103, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 18,7 , 25,12 , 1192,92 , 1192,92 , 1284,24 , 1308,92 , 1192,92 , 1284,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {73,81,68}, 49,5 , 973,84 , 13,5 , 4,0 , 87,7 , 137,6 , 0, 0, 6, 5, 6 }, // Arabic/Arabic/Iraq
- { 8, 1, 105, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 55,4 , 59,9 , 998,75 , 998,75 , 1073,24 , 998,75 , 998,75 , 1073,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {73,76,83}, 54,1 , 1057,133 , 13,5 , 4,0 , 87,7 , 143,7 , 2, 1, 7, 5, 6 }, // Arabic/Arabic/Israel
- { 8, 1, 109, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 18,7 , 25,12 , 1192,92 , 1192,92 , 1284,24 , 1192,92 , 1192,92 , 1284,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {74,79,68}, 55,5 , 1190,84 , 13,5 , 4,0 , 87,7 , 150,6 , 3, 0, 6, 5, 6 }, // Arabic/Arabic/Jordan
- { 8, 1, 115, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 18,7 , 25,12 , 998,75 , 998,75 , 1073,24 , 998,75 , 998,75 , 1073,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {75,87,68}, 60,5 , 1274,84 , 13,5 , 4,0 , 87,7 , 156,6 , 3, 0, 6, 5, 6 }, // Arabic/Arabic/Kuwait
- { 8, 1, 119, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 18,7 , 25,12 , 1192,92 , 1192,92 , 1284,24 , 1192,92 , 1192,92 , 1284,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {76,66,80}, 65,5 , 1358,84 , 13,5 , 4,0 , 87,7 , 162,5 , 0, 0, 1, 6, 7 }, // Arabic/Arabic/Lebanon
- { 8, 1, 122, 44, 46, 59, 37, 48, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 18,7 , 25,12 , 998,75 , 998,75 , 1073,24 , 998,75 , 998,75 , 1073,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {76,89,68}, 70,5 , 1442,88 , 13,5 , 4,0 , 87,7 , 167,5 , 3, 0, 6, 5, 6 }, // Arabic/Arabic/Libya
- { 8, 1, 136, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 18,7 , 25,12 , 1400,72 , 1400,72 , 1472,24 , 1400,72 , 1400,72 , 1472,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {77,82,79}, 75,5 , 1530,112 , 13,5 , 4,0 , 87,7 , 172,9 , 0, 0, 1, 6, 7 }, // Arabic/Arabic/Mauritania
- { 8, 1, 145, 44, 46, 59, 37, 48, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 37,5 , 8,10 , 1496,70 , 1496,70 , 1566,24 , 1496,70 , 1496,70 , 1566,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {77,65,68}, 80,5 , 1642,87 , 13,5 , 4,0 , 87,7 , 181,6 , 2, 1, 6, 5, 6 }, // Arabic/Arabic/Morocco
- { 8, 1, 162, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 18,7 , 25,12 , 998,75 , 998,75 , 1073,24 , 998,75 , 998,75 , 1073,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {79,77,82}, 85,5 , 1729,77 , 13,5 , 4,0 , 87,7 , 187,5 , 3, 0, 6, 5, 6 }, // Arabic/Arabic/Oman
- { 8, 1, 165, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 18,7 , 25,12 , 1192,92 , 1192,92 , 1284,24 , 1192,92 , 1192,92 , 1284,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {73,76,83}, 54,1 , 1057,133 , 13,5 , 4,0 , 87,7 , 192,18 , 2, 1, 1, 6, 7 }, // Arabic/Arabic/PalestinianTerritories
- { 8, 1, 175, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 18,7 , 25,12 , 998,75 , 998,75 , 1073,24 , 998,75 , 998,75 , 1073,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {81,65,82}, 90,5 , 1806,70 , 13,5 , 4,0 , 87,7 , 210,3 , 2, 1, 6, 5, 6 }, // Arabic/Arabic/Qatar
- { 8, 1, 186, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 18,7 , 25,12 , 998,75 , 998,75 , 1073,24 , 998,75 , 998,75 , 1073,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {83,65,82}, 95,5 , 1876,77 , 13,5 , 4,0 , 87,7 , 213,24 , 2, 1, 7, 5, 6 }, // Arabic/Arabic/SaudiArabia
- { 8, 1, 194, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 18,7 , 25,12 , 998,75 , 998,75 , 1073,24 , 998,75 , 998,75 , 1073,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {83,79,83}, 100,1 , 1953,77 , 13,5 , 4,0 , 87,7 , 237,7 , 0, 0, 1, 6, 7 }, // Arabic/Arabic/Somalia
- { 8, 1, 201, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 18,7 , 25,12 , 998,75 , 998,75 , 1073,24 , 998,75 , 998,75 , 1073,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {83,68,71}, 101,4 , 2030,91 , 13,5 , 4,0 , 87,7 , 244,7 , 2, 1, 6, 5, 6 }, // Arabic/Arabic/Sudan
- { 8, 1, 207, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 18,7 , 25,12 , 1192,92 , 1192,92 , 1284,24 , 1192,92 , 1192,92 , 1284,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {83,89,80}, 105,5 , 2121,77 , 13,5 , 4,0 , 87,7 , 251,5 , 0, 0, 6, 5, 6 }, // Arabic/Arabic/Syria
- { 8, 1, 216, 44, 46, 59, 37, 48, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 18,7 , 25,12 , 1097,71 , 1097,71 , 1168,24 , 1097,71 , 1097,71 , 1168,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {84,78,68}, 110,5 , 2198,95 , 13,5 , 4,0 , 87,7 , 256,4 , 3, 0, 7, 5, 6 }, // Arabic/Arabic/Tunisia
- { 8, 1, 223, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 18,7 , 25,12 , 998,75 , 998,75 , 1073,24 , 998,75 , 998,75 , 1073,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {65,69,68}, 115,5 , 2293,91 , 13,5 , 4,0 , 87,7 , 260,24 , 2, 1, 6, 5, 6 }, // Arabic/Arabic/UnitedArabEmirates
- { 8, 1, 236, 46, 44, 59, 37, 48, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 18,7 , 25,12 , 998,75 , 998,75 , 1073,24 , 998,75 , 998,75 , 1073,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {77,65,68}, 80,5 , 1642,87 , 13,5 , 4,0 , 87,7 , 284,15 , 2, 1, 1, 6, 7 }, // Arabic/Arabic/WesternSahara
- { 8, 1, 237, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 18,7 , 25,12 , 998,75 , 998,75 , 1073,24 , 998,75 , 998,75 , 1073,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {89,69,82}, 120,5 , 2384,70 , 13,5 , 4,0 , 87,7 , 299,5 , 0, 0, 7, 5, 6 }, // Arabic/Arabic/Yemen
- { 8, 1, 254, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,18 , 18,7 , 25,12 , 998,75 , 998,75 , 1073,24 , 998,75 , 998,75 , 1073,24 , 537,52 , 537,52 , 589,14 , 537,52 , 537,52 , 589,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {83,83,80}, 125,1 , 2454,132 , 13,5 , 4,0 , 87,7 , 304,12 , 2, 1, 1, 6, 7 }, // Arabic/Arabic/SouthSudan
- { 9, 10, 11, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 65,7 , 65,7 , 175,8 , 183,20 , 37,5 , 8,10 , 1590,48 , 1638,94 , 1732,24 , 1590,48 , 1756,106 , 1732,24 , 603,28 , 631,62 , 693,14 , 603,28 , 631,62 , 693,14 , 0,2 , 0,2 , 129,6 , 135,17 , 22,23 , {65,77,68}, 126,1 , 2586,46 , 8,5 , 4,0 , 316,7 , 323,8 , 0, 0, 1, 6, 7 }, // Armenian/Armenian/Armenia
- { 10, 11, 100, 46, 44, 59, 37, 2534, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 203,8 , 211,18 , 68,8 , 76,12 , 1862,62 , 1924,88 , 158,27 , 1862,62 , 1924,88 , 158,27 , 707,37 , 744,58 , 85,14 , 707,37 , 744,58 , 85,14 , 22,9 , 22,7 , 45,4 , 5,17 , 22,23 , {73,78,82}, 127,1 , 0,7 , 8,5 , 4,0 , 331,7 , 338,4 , 2, 1, 7, 7, 7 }, // Assamese/Bengali/India
- { 12, 7, 15, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 72,8 , 72,8 , 175,8 , 229,17 , 37,5 , 8,10 , 2012,48 , 2060,77 , 158,27 , 2012,48 , 2137,77 , 158,27 , 802,27 , 829,67 , 99,14 , 802,27 , 829,67 , 99,14 , 0,2 , 0,2 , 152,4 , 5,17 , 22,23 , {65,90,78}, 128,1 , 2632,58 , 8,5 , 4,0 , 342,10 , 352,10 , 2, 1, 1, 6, 7 }, // Azerbaijani/Latin/Azerbaijan
+ { 6, 7, 2, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 14,9 , 14,9 , 114,6 , 10,17 , 18,7 , 42,13 , 567,50 , 617,78 , 695,27 , 722,50 , 772,78 , 850,27 , 310,28 , 338,58 , 396,15 , 310,28 , 411,58 , 396,15 , 7,11 , 7,10 , 54,4 , 5,17 , 22,23 , {65,76,76}, 7,4 , 153,45 , 13,5 , 4,0 , 51,5 , 56,8 , 0, 0, 1, 6, 7 }, // Albanian/Latin/Albania
+ { 6, 7, 127, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 14,9 , 14,9 , 114,6 , 10,17 , 37,5 , 8,10 , 567,50 , 617,78 , 695,27 , 722,50 , 772,78 , 850,27 , 310,28 , 338,58 , 396,15 , 310,28 , 411,58 , 396,15 , 7,11 , 7,10 , 54,4 , 5,17 , 22,23 , {77,75,68}, 11,3 , 198,54 , 13,5 , 4,0 , 51,5 , 64,8 , 2, 1, 1, 6, 7 }, // Albanian/Latin/Macedonia
+ { 6, 7, 257, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 14,9 , 14,9 , 114,6 , 10,17 , 37,5 , 8,10 , 567,50 , 617,78 , 695,27 , 722,50 , 772,78 , 850,27 , 310,28 , 338,58 , 396,15 , 310,28 , 411,58 , 396,15 , 7,11 , 7,10 , 54,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 252,21 , 13,5 , 4,0 , 51,5 , 72,6 , 2, 1, 1, 6, 7 }, // Albanian/Latin/Kosovo
+ { 7, 14, 69, 46, 44, 59, 37, 48, 45, 43, 101, 171, 187, 8249, 8250, 23,6 , 23,6 , 29,9 , 38,8 , 120,10 , 130,17 , 18,7 , 25,12 , 877,46 , 923,61 , 984,24 , 877,46 , 923,61 , 984,24 , 469,27 , 496,28 , 524,14 , 469,27 , 496,28 , 524,14 , 18,3 , 17,4 , 58,3 , 61,23 , 22,23 , {69,84,66}, 15,2 , 273,34 , 4,4 , 4,0 , 78,4 , 82,5 , 2, 1, 7, 6, 7 }, // Amharic/Ethiopic/Ethiopia
+ { 8, 1, 64, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 18,7 , 25,12 , 1008,75 , 1008,75 , 1083,24 , 1008,75 , 1008,75 , 1083,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {69,71,80}, 17,5 , 307,81 , 13,5 , 4,0 , 87,7 , 94,3 , 2, 1, 6, 5, 6 }, // Arabic/Arabic/Egypt
+ { 8, 1, 3, 44, 46, 59, 37, 48, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 18,7 , 25,12 , 1107,71 , 1107,71 , 1178,24 , 1107,71 , 1107,71 , 1178,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {68,90,68}, 22,5 , 388,102 , 13,5 , 4,0 , 87,7 , 97,7 , 2, 1, 6, 5, 6 }, // Arabic/Arabic/Algeria
+ { 8, 1, 17, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 18,7 , 25,12 , 1008,75 , 1008,75 , 1083,24 , 1008,75 , 1008,75 , 1083,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {66,72,68}, 27,5 , 490,91 , 13,5 , 4,0 , 87,7 , 104,7 , 3, 0, 6, 5, 6 }, // Arabic/Arabic/Bahrain
+ { 8, 1, 42, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 18,7 , 25,12 , 1008,75 , 1008,75 , 1083,24 , 1008,75 , 1008,75 , 1083,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {88,65,70}, 32,4 , 581,112 , 13,5 , 4,0 , 87,7 , 111,4 , 0, 0, 1, 6, 7 }, // Arabic/Arabic/Chad
+ { 8, 1, 48, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 37,5 , 8,10 , 1008,75 , 1008,75 , 1083,24 , 1008,75 , 1008,75 , 1083,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {75,77,70}, 36,2 , 693,105 , 13,5 , 4,0 , 87,7 , 115,9 , 0, 0, 1, 6, 7 }, // Arabic/Arabic/Comoros
+ { 8, 1, 59, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 18,7 , 25,12 , 1008,75 , 1008,75 , 1083,24 , 1008,75 , 1008,75 , 1083,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {68,74,70}, 38,3 , 798,84 , 13,5 , 4,0 , 87,7 , 124,6 , 0, 0, 6, 6, 7 }, // Arabic/Arabic/Djibouti
+ { 8, 1, 67, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 18,7 , 25,12 , 1008,75 , 1008,75 , 1083,24 , 1008,75 , 1008,75 , 1083,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {69,82,78}, 41,3 , 882,91 , 13,5 , 4,0 , 87,7 , 130,7 , 2, 1, 1, 6, 7 }, // Arabic/Arabic/Eritrea
+ { 8, 1, 103, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 18,7 , 25,12 , 1202,92 , 1202,92 , 1294,24 , 1318,92 , 1202,92 , 1294,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {73,81,68}, 44,5 , 973,84 , 13,5 , 4,0 , 87,7 , 137,6 , 0, 0, 6, 5, 6 }, // Arabic/Arabic/Iraq
+ { 8, 1, 105, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 55,4 , 59,9 , 1008,75 , 1008,75 , 1083,24 , 1008,75 , 1008,75 , 1083,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {73,76,83}, 49,1 , 1057,133 , 13,5 , 4,0 , 87,7 , 143,7 , 2, 1, 7, 5, 6 }, // Arabic/Arabic/Israel
+ { 8, 1, 109, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 18,7 , 25,12 , 1202,92 , 1202,92 , 1294,24 , 1202,92 , 1202,92 , 1294,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {74,79,68}, 50,5 , 1190,84 , 13,5 , 4,0 , 87,7 , 150,6 , 3, 0, 6, 5, 6 }, // Arabic/Arabic/Jordan
+ { 8, 1, 115, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 18,7 , 25,12 , 1008,75 , 1008,75 , 1083,24 , 1008,75 , 1008,75 , 1083,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {75,87,68}, 55,5 , 1274,84 , 13,5 , 4,0 , 87,7 , 156,6 , 3, 0, 6, 5, 6 }, // Arabic/Arabic/Kuwait
+ { 8, 1, 119, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 18,7 , 25,12 , 1202,92 , 1202,92 , 1294,24 , 1202,92 , 1202,92 , 1294,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {76,66,80}, 60,5 , 1358,84 , 13,5 , 4,0 , 87,7 , 162,5 , 0, 0, 1, 6, 7 }, // Arabic/Arabic/Lebanon
+ { 8, 1, 122, 44, 46, 59, 37, 48, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 18,7 , 25,12 , 1008,75 , 1008,75 , 1083,24 , 1008,75 , 1008,75 , 1083,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {76,89,68}, 65,5 , 1442,88 , 13,5 , 4,0 , 87,7 , 167,5 , 3, 0, 6, 5, 6 }, // Arabic/Arabic/Libya
+ { 8, 1, 136, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 18,7 , 25,12 , 1410,72 , 1410,72 , 1482,24 , 1410,72 , 1410,72 , 1482,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {77,82,85}, 0,0 , 1530,112 , 13,5 , 4,0 , 87,7 , 172,9 , 2, 1, 1, 6, 7 }, // Arabic/Arabic/Mauritania
+ { 8, 1, 145, 44, 46, 59, 37, 48, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 37,5 , 8,10 , 1506,70 , 1506,70 , 1576,24 , 1506,70 , 1506,70 , 1576,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {77,65,68}, 70,5 , 1642,87 , 13,5 , 4,0 , 87,7 , 181,6 , 2, 1, 6, 5, 6 }, // Arabic/Arabic/Morocco
+ { 8, 1, 162, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 18,7 , 25,12 , 1008,75 , 1008,75 , 1083,24 , 1008,75 , 1008,75 , 1083,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {79,77,82}, 75,5 , 1729,77 , 13,5 , 4,0 , 87,7 , 187,5 , 3, 0, 6, 5, 6 }, // Arabic/Arabic/Oman
+ { 8, 1, 165, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 18,7 , 25,12 , 1202,92 , 1202,92 , 1294,24 , 1202,92 , 1202,92 , 1294,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {73,76,83}, 49,1 , 1057,133 , 13,5 , 4,0 , 87,7 , 192,18 , 2, 1, 1, 6, 7 }, // Arabic/Arabic/PalestinianTerritories
+ { 8, 1, 175, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 18,7 , 25,12 , 1008,75 , 1008,75 , 1083,24 , 1008,75 , 1008,75 , 1083,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {81,65,82}, 80,5 , 1806,70 , 13,5 , 4,0 , 87,7 , 210,3 , 2, 1, 6, 5, 6 }, // Arabic/Arabic/Qatar
+ { 8, 1, 186, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 18,7 , 25,12 , 1008,75 , 1008,75 , 1083,24 , 1008,75 , 1008,75 , 1083,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {83,65,82}, 85,5 , 1876,77 , 13,5 , 4,0 , 87,7 , 213,24 , 2, 1, 7, 5, 6 }, // Arabic/Arabic/SaudiArabia
+ { 8, 1, 194, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 18,7 , 25,12 , 1008,75 , 1008,75 , 1083,24 , 1008,75 , 1008,75 , 1083,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {83,79,83}, 90,1 , 1953,77 , 13,5 , 4,0 , 87,7 , 237,7 , 0, 0, 1, 6, 7 }, // Arabic/Arabic/Somalia
+ { 8, 1, 201, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 18,7 , 25,12 , 1008,75 , 1008,75 , 1083,24 , 1008,75 , 1008,75 , 1083,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {83,68,71}, 91,4 , 2030,91 , 13,5 , 4,0 , 87,7 , 244,7 , 2, 1, 6, 5, 6 }, // Arabic/Arabic/Sudan
+ { 8, 1, 207, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 18,7 , 25,12 , 1202,92 , 1202,92 , 1294,24 , 1202,92 , 1202,92 , 1294,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {83,89,80}, 95,5 , 2121,77 , 13,5 , 4,0 , 87,7 , 251,5 , 0, 0, 6, 5, 6 }, // Arabic/Arabic/Syria
+ { 8, 1, 216, 44, 46, 59, 37, 48, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 18,7 , 25,12 , 1107,71 , 1107,71 , 1178,24 , 1107,71 , 1107,71 , 1178,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {84,78,68}, 100,5 , 2198,95 , 13,5 , 4,0 , 87,7 , 256,4 , 3, 0, 7, 5, 6 }, // Arabic/Arabic/Tunisia
+ { 8, 1, 223, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 18,7 , 25,12 , 1008,75 , 1008,75 , 1083,24 , 1008,75 , 1008,75 , 1083,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {65,69,68}, 105,5 , 2293,91 , 13,5 , 4,0 , 87,7 , 260,24 , 2, 1, 6, 5, 6 }, // Arabic/Arabic/UnitedArabEmirates
+ { 8, 1, 236, 46, 44, 59, 37, 48, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 18,7 , 25,12 , 1008,75 , 1008,75 , 1083,24 , 1008,75 , 1008,75 , 1083,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {77,65,68}, 70,5 , 1642,87 , 13,5 , 4,0 , 87,7 , 284,15 , 2, 1, 1, 6, 7 }, // Arabic/Arabic/WesternSahara
+ { 8, 1, 237, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 18,7 , 25,12 , 1008,75 , 1008,75 , 1083,24 , 1008,75 , 1008,75 , 1083,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {89,69,82}, 110,5 , 2384,70 , 13,5 , 4,0 , 87,7 , 299,5 , 0, 0, 7, 5, 6 }, // Arabic/Arabic/Yemen
+ { 8, 1, 254, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 52,7 , 59,6 , 147,10 , 157,17 , 18,7 , 25,12 , 1008,75 , 1008,75 , 1083,24 , 1008,75 , 1008,75 , 1083,24 , 538,52 , 538,52 , 590,14 , 538,52 , 538,52 , 590,14 , 21,1 , 21,1 , 84,4 , 88,41 , 22,23 , {83,83,80}, 115,1 , 2454,132 , 13,5 , 4,0 , 87,7 , 304,12 , 2, 1, 1, 6, 7 }, // Arabic/Arabic/SouthSudan
+ { 9, 10, 11, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 65,7 , 65,7 , 174,8 , 182,20 , 37,5 , 8,10 , 1600,48 , 1648,94 , 1742,24 , 1600,48 , 1766,106 , 1742,24 , 604,28 , 632,62 , 694,14 , 604,28 , 632,62 , 694,14 , 22,2 , 22,2 , 129,6 , 135,17 , 22,23 , {65,77,68}, 116,1 , 2586,46 , 13,5 , 4,0 , 316,7 , 323,8 , 0, 0, 1, 6, 7 }, // Armenian/Armenian/Armenia
+ { 10, 11, 100, 46, 44, 59, 37, 2534, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 72,9 , 72,9 , 202,8 , 210,18 , 68,7 , 75,12 , 1872,64 , 1936,89 , 2025,24 , 1872,64 , 1936,89 , 2025,24 , 708,32 , 740,58 , 798,14 , 708,32 , 740,58 , 798,14 , 24,9 , 24,7 , 152,4 , 156,37 , 22,23 , {73,78,82}, 117,1 , 2632,43 , 8,5 , 4,0 , 331,7 , 338,4 , 2, 1, 7, 7, 7 }, // Assamese/Bengali/India
+ { 12, 7, 15, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 81,8 , 81,8 , 174,8 , 228,17 , 37,5 , 8,10 , 2049,48 , 2097,77 , 158,27 , 2049,48 , 2174,77 , 158,27 , 812,27 , 839,67 , 99,14 , 812,27 , 839,67 , 99,14 , 0,2 , 0,2 , 193,4 , 5,17 , 22,23 , {65,90,78}, 118,1 , 2675,58 , 8,5 , 4,0 , 342,10 , 352,10 , 2, 1, 1, 6, 7 }, // Azerbaijani/Latin/Azerbaijan
{ 12, 1, 102, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {73,82,82}, 0,0 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 0, 0, 6, 5, 5 }, // Azerbaijani/Arabic/Iran
- { 12, 2, 15, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8249, 8250, 0,6 , 0,6 , 0,6 , 0,6 , 175,8 , 229,17 , 37,5 , 8,10 , 2214,48 , 2262,77 , 158,27 , 2214,48 , 2339,77 , 158,27 , 896,27 , 923,67 , 99,14 , 896,27 , 923,67 , 99,14 , 31,2 , 29,2 , 45,4 , 5,17 , 22,23 , {65,90,78}, 128,1 , 2690,12 , 8,5 , 4,0 , 362,10 , 372,10 , 2, 1, 1, 6, 7 }, // Azerbaijani/Cyrillic/Azerbaijan
- { 13, 2, 178, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {82,85,66}, 129,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Bashkir/Cyrillic/Russia
- { 14, 7, 197, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8220, 8221, 0,6 , 0,6 , 80,9 , 80,9 , 246,6 , 252,26 , 37,5 , 88,12 , 2416,60 , 2476,93 , 2569,24 , 2416,60 , 2593,93 , 2569,24 , 990,28 , 1018,68 , 1086,14 , 990,28 , 1100,68 , 1086,14 , 0,2 , 0,2 , 156,7 , 5,17 , 22,23 , {69,85,82}, 14,1 , 2702,20 , 13,5 , 4,0 , 382,7 , 389,8 , 2, 1, 1, 6, 7 }, // Basque/Latin/Spain
- { 15, 11, 18, 46, 44, 59, 37, 2534, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 89,9 , 89,9 , 278,6 , 211,18 , 18,7 , 25,12 , 2686,90 , 2686,90 , 2776,33 , 2809,77 , 2686,90 , 2776,33 , 1168,37 , 1205,58 , 1263,18 , 1168,37 , 1281,58 , 1263,18 , 0,2 , 0,2 , 163,4 , 5,17 , 22,23 , {66,68,84}, 130,1 , 2722,49 , 0,4 , 4,0 , 397,5 , 402,8 , 2, 1, 5, 6, 7 }, // Bengali/Bengali/Bangladesh
- { 15, 11, 100, 46, 44, 59, 37, 2534, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 89,9 , 89,9 , 278,6 , 211,18 , 18,7 , 25,12 , 2686,90 , 2686,90 , 2776,33 , 2809,77 , 2686,90 , 2776,33 , 1168,37 , 1205,58 , 1263,18 , 1168,37 , 1281,58 , 1263,18 , 0,2 , 0,2 , 163,4 , 5,17 , 22,23 , {73,78,82}, 127,1 , 2771,43 , 0,4 , 4,0 , 397,5 , 410,4 , 2, 1, 7, 7, 7 }, // Bengali/Bengali/India
- { 16, 31, 25, 46, 44, 59, 37, 3872, 45, 43, 101, 8220, 8221, 8216, 8217, 98,9 , 98,9 , 98,9 , 98,9 , 53,10 , 284,30 , 100,22 , 122,27 , 2886,63 , 2949,191 , 3140,27 , 3167,27 , 3194,132 , 3326,27 , 1339,34 , 1373,79 , 1452,27 , 1339,34 , 1373,79 , 1452,27 , 33,5 , 31,6 , 45,4 , 5,17 , 22,23 , {66,84,78}, 131,3 , 2814,15 , 4,4 , 4,0 , 414,6 , 420,5 , 2, 1, 7, 6, 7 }, // Dzongkha/Tibetan/Bhutan
- { 19, 7, 74, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 3353,63 , 3416,78 , 3494,36 , 3530,63 , 3416,78 , 3494,36 , 1479,33 , 1512,43 , 1555,18 , 1479,33 , 1512,43 , 1555,18 , 38,4 , 37,4 , 167,7 , 174,17 , 191,23 , {69,85,82}, 14,1 , 2829,36 , 13,5 , 4,0 , 425,9 , 434,5 , 2, 1, 1, 6, 7 }, // Breton/Latin/France
- { 20, 2, 33, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8220, 8222, 8220, 0,6 , 0,6 , 107,7 , 107,7 , 314,12 , 326,22 , 55,4 , 59,9 , 3593,49 , 3642,82 , 3724,24 , 3593,49 , 3642,82 , 3724,24 , 1573,21 , 1594,55 , 1649,14 , 1573,21 , 1594,55 , 1649,14 , 42,6 , 41,6 , 214,7 , 5,17 , 22,23 , {66,71,78}, 134,3 , 2865,47 , 13,5 , 4,0 , 439,9 , 448,8 , 2, 1, 1, 6, 7 }, // Bulgarian/Cyrillic/Bulgaria
- { 21, 25, 147, 46, 44, 4170, 37, 4160, 45, 43, 101, 8220, 8221, 8216, 8217, 114,5 , 114,5 , 119,10 , 119,10 , 348,8 , 98,16 , 37,5 , 149,10 , 3748,43 , 3791,88 , 3879,24 , 3748,43 , 3791,88 , 3879,24 , 1663,54 , 1663,54 , 1717,14 , 1663,54 , 1663,54 , 1717,14 , 48,5 , 47,3 , 221,5 , 5,17 , 22,23 , {77,77,75}, 137,1 , 2912,27 , 13,5 , 4,0 , 456,6 , 456,6 , 0, 0, 7, 6, 7 }, // Burmese/Myanmar/Myanmar
- { 22, 2, 20, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 129,7 , 129,7 , 356,7 , 326,22 , 37,5 , 159,11 , 3903,48 , 3951,95 , 4046,24 , 4070,48 , 4118,98 , 4046,24 , 1731,21 , 1752,56 , 1808,14 , 1731,21 , 1752,56 , 1808,14 , 0,2 , 0,2 , 226,5 , 231,17 , 22,23 , {66,89,78}, 0,2 , 2939,89 , 13,5 , 4,0 , 462,10 , 472,8 , 2, 0, 1, 6, 7 }, // Belarusian/Cyrillic/Belarus
- { 23, 20, 36, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 136,9 , 145,9 , 278,6 , 98,16 , 18,7 , 25,12 , 4216,71 , 4216,71 , 4287,24 , 4216,71 , 4216,71 , 4287,24 , 1822,47 , 1822,47 , 1869,14 , 1822,47 , 1822,47 , 1869,14 , 0,2 , 0,2 , 248,2 , 5,17 , 22,23 , {75,72,82}, 138,1 , 3028,29 , 0,4 , 4,0 , 480,5 , 485,7 , 2, 1, 7, 6, 7 }, // Khmer/Khmer/Cambodia
- { 24, 7, 197, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 154,7 , 154,7 , 278,6 , 363,22 , 55,4 , 59,9 , 4311,60 , 4371,82 , 4453,36 , 4489,93 , 4582,115 , 4453,36 , 1883,28 , 1911,60 , 1971,21 , 1883,28 , 1911,60 , 1971,21 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3057,20 , 13,5 , 4,0 , 492,6 , 498,7 , 2, 1, 1, 6, 7 }, // Catalan/Latin/Spain
- { 24, 7, 5, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 154,7 , 154,7 , 278,6 , 363,22 , 55,4 , 59,9 , 4311,60 , 4371,82 , 4453,36 , 4489,93 , 4582,115 , 4453,36 , 1883,28 , 1911,60 , 1971,21 , 1883,28 , 1911,60 , 1971,21 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3057,20 , 13,5 , 4,0 , 492,6 , 505,7 , 2, 1, 1, 6, 7 }, // Catalan/Latin/Andorra
- { 24, 7, 74, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 154,7 , 154,7 , 278,6 , 363,22 , 55,4 , 59,9 , 4311,60 , 4371,82 , 4453,36 , 4489,93 , 4582,115 , 4453,36 , 1883,28 , 1911,60 , 1971,21 , 1883,28 , 1911,60 , 1971,21 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3057,20 , 13,5 , 4,0 , 492,6 , 512,6 , 2, 1, 1, 6, 7 }, // Catalan/Latin/France
- { 24, 7, 106, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 154,7 , 154,7 , 278,6 , 363,22 , 55,4 , 59,9 , 4311,60 , 4371,82 , 4453,36 , 4489,93 , 4582,115 , 4453,36 , 1883,28 , 1911,60 , 1971,21 , 1883,28 , 1911,60 , 1971,21 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3057,20 , 13,5 , 4,0 , 492,6 , 518,6 , 2, 1, 1, 6, 7 }, // Catalan/Latin/Italy
- { 25, 5, 44, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 161,5 , 161,5 , 166,5 , 166,5 , 385,8 , 393,13 , 170,6 , 176,11 , 4697,39 , 4736,38 , 158,27 , 4697,39 , 4736,38 , 158,27 , 1992,21 , 2013,28 , 2041,14 , 1992,21 , 2013,28 , 2041,14 , 58,2 , 55,2 , 250,2 , 252,21 , 22,23 , {67,78,89}, 139,1 , 3077,13 , 4,4 , 4,0 , 524,4 , 528,2 , 2, 1, 7, 6, 7 }, // Chinese/Simplified Han/China
- { 25, 5, 97, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 161,5 , 161,5 , 166,5 , 166,5 , 278,6 , 393,13 , 170,6 , 176,11 , 4697,39 , 4736,38 , 158,27 , 4697,39 , 4736,38 , 158,27 , 1992,21 , 2013,28 , 2041,14 , 1992,21 , 2013,28 , 2041,14 , 58,2 , 55,2 , 250,2 , 252,21 , 22,23 , {72,75,68}, 140,3 , 3090,11 , 4,4 , 4,0 , 524,4 , 530,9 , 2, 1, 7, 6, 7 }, // Chinese/Simplified Han/HongKong
- { 25, 5, 126, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 161,5 , 161,5 , 166,5 , 166,5 , 278,6 , 393,13 , 170,6 , 176,11 , 4697,39 , 4736,38 , 158,27 , 4697,39 , 4736,38 , 158,27 , 1992,21 , 2013,28 , 2041,14 , 1992,21 , 2013,28 , 2041,14 , 58,2 , 55,2 , 250,2 , 252,21 , 22,23 , {77,79,80}, 143,4 , 3101,13 , 4,4 , 4,0 , 524,4 , 539,9 , 2, 1, 7, 6, 7 }, // Chinese/Simplified Han/Macau
- { 25, 5, 190, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 161,5 , 161,5 , 166,5 , 166,5 , 27,8 , 393,13 , 170,6 , 176,11 , 4697,39 , 4736,38 , 158,27 , 4697,39 , 4736,38 , 158,27 , 1992,21 , 2013,28 , 2041,14 , 1992,21 , 2013,28 , 2041,14 , 58,2 , 55,2 , 250,2 , 252,21 , 22,23 , {83,71,68}, 6,1 , 3114,15 , 4,4 , 4,0 , 524,4 , 548,3 , 2, 1, 7, 6, 7 }, // Chinese/Simplified Han/Singapore
- { 25, 6, 97, 46, 44, 59, 37, 48, 45, 43, 101, 12300, 12301, 12302, 12303, 161,5 , 161,5 , 171,5 , 171,5 , 406,8 , 393,13 , 170,6 , 187,13 , 4697,39 , 4697,39 , 158,27 , 4697,39 , 4697,39 , 158,27 , 2055,21 , 2013,28 , 2041,14 , 2055,21 , 2013,28 , 2041,14 , 58,2 , 55,2 , 273,3 , 5,17 , 22,23 , {72,75,68}, 140,3 , 3090,11 , 18,5 , 4,0 , 551,4 , 555,9 , 2, 1, 7, 6, 7 }, // Chinese/Traditional Han/HongKong
- { 25, 6, 126, 46, 44, 59, 37, 48, 45, 43, 101, 12300, 12301, 12302, 12303, 161,5 , 161,5 , 171,5 , 171,5 , 406,8 , 393,13 , 170,6 , 187,13 , 4697,39 , 4697,39 , 158,27 , 4697,39 , 4697,39 , 158,27 , 2055,21 , 2013,28 , 2041,14 , 2055,21 , 2013,28 , 2041,14 , 58,2 , 55,2 , 273,3 , 5,17 , 22,23 , {77,79,80}, 143,4 , 3129,13 , 18,5 , 4,0 , 551,4 , 564,9 , 2, 1, 7, 6, 7 }, // Chinese/Traditional Han/Macau
- { 25, 6, 208, 46, 44, 59, 37, 48, 45, 43, 101, 12300, 12301, 12302, 12303, 161,5 , 161,5 , 166,5 , 166,5 , 385,8 , 414,14 , 170,6 , 187,13 , 4697,39 , 4697,39 , 158,27 , 4697,39 , 4697,39 , 158,27 , 2055,21 , 2013,28 , 2041,14 , 2055,21 , 2013,28 , 2041,14 , 58,2 , 55,2 , 45,4 , 5,17 , 22,23 , {84,87,68}, 6,1 , 3142,13 , 4,4 , 4,0 , 551,4 , 573,2 , 2, 0, 7, 6, 7 }, // Chinese/Traditional Han/Taiwan
+ { 12, 2, 15, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8249, 8250, 0,6 , 0,6 , 0,6 , 0,6 , 174,8 , 228,17 , 37,5 , 8,10 , 2251,48 , 2299,77 , 158,27 , 2251,48 , 2376,77 , 158,27 , 906,27 , 933,67 , 99,14 , 906,27 , 933,67 , 99,14 , 33,2 , 31,2 , 45,4 , 5,17 , 22,23 , {65,90,78}, 118,1 , 2733,12 , 8,5 , 4,0 , 362,10 , 372,10 , 2, 1, 1, 6, 7 }, // Azerbaijani/Cyrillic/Azerbaijan
+ { 13, 2, 178, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {82,85,66}, 119,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Bashkir/Cyrillic/Russia
+ { 14, 7, 197, 44, 46, 59, 37, 48, 8722, 43, 101, 8220, 8221, 8220, 8221, 0,6 , 0,6 , 89,9 , 89,9 , 245,6 , 251,36 , 37,5 , 87,12 , 2453,60 , 2513,93 , 2606,24 , 2453,60 , 2630,93 , 2606,24 , 1000,28 , 1028,68 , 1096,14 , 1000,28 , 1110,68 , 1096,14 , 0,2 , 0,2 , 197,7 , 5,17 , 22,23 , {69,85,82}, 14,1 , 2745,20 , 13,5 , 4,0 , 382,7 , 389,8 , 2, 1, 1, 6, 7 }, // Basque/Latin/Spain
+ { 15, 11, 18, 46, 44, 59, 37, 2534, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 98,9 , 98,9 , 287,6 , 210,18 , 18,7 , 25,12 , 2723,90 , 2723,90 , 2813,33 , 2846,77 , 2723,90 , 2813,33 , 1178,37 , 1215,58 , 1273,18 , 1178,37 , 1291,58 , 1273,18 , 0,2 , 0,2 , 152,4 , 5,17 , 22,23 , {66,68,84}, 120,1 , 2765,49 , 0,4 , 4,0 , 397,5 , 402,8 , 2, 1, 7, 6, 7 }, // Bengali/Bengali/Bangladesh
+ { 15, 11, 100, 46, 44, 59, 37, 2534, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 98,9 , 98,9 , 287,6 , 210,18 , 18,7 , 25,12 , 2723,90 , 2723,90 , 2813,33 , 2846,77 , 2723,90 , 2813,33 , 1178,37 , 1215,58 , 1273,18 , 1178,37 , 1291,58 , 1273,18 , 0,2 , 0,2 , 152,4 , 5,17 , 22,23 , {73,78,82}, 117,1 , 2814,43 , 0,4 , 4,0 , 397,5 , 410,4 , 2, 1, 7, 7, 7 }, // Bengali/Bengali/India
+ { 16, 31, 25, 46, 44, 59, 37, 3872, 45, 43, 101, 8220, 8221, 8216, 8217, 107,9 , 107,9 , 107,9 , 107,9 , 53,10 , 293,30 , 99,22 , 121,27 , 2923,63 , 2986,191 , 3177,27 , 3204,27 , 3231,132 , 3363,27 , 1349,34 , 1383,79 , 1462,27 , 1349,34 , 1383,79 , 1462,27 , 35,5 , 33,6 , 45,4 , 5,17 , 22,23 , {66,84,78}, 121,3 , 2857,15 , 4,4 , 4,0 , 414,6 , 420,5 , 2, 1, 7, 6, 7 }, // Dzongkha/Tibetan/Bhutan
+ { 19, 7, 74, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 171, 187, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 98,16 , 37,5 , 8,10 , 3390,63 , 3453,78 , 3531,36 , 3390,63 , 3453,78 , 3531,36 , 1489,33 , 1522,43 , 1565,18 , 1489,33 , 1522,43 , 1565,18 , 40,4 , 39,4 , 204,7 , 211,17 , 228,23 , {69,85,82}, 14,1 , 2872,36 , 13,5 , 4,0 , 425,9 , 434,5 , 2, 1, 1, 6, 7 }, // Breton/Latin/France
+ { 20, 2, 33, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8220, 8222, 8220, 0,6 , 0,6 , 116,7 , 116,7 , 323,12 , 335,22 , 148,9 , 157,14 , 3567,49 , 3616,82 , 3698,24 , 3567,49 , 3616,82 , 3698,24 , 1583,21 , 1604,55 , 1659,14 , 1583,21 , 1604,55 , 1659,14 , 44,6 , 43,6 , 251,7 , 5,17 , 22,23 , {66,71,78}, 124,3 , 2908,47 , 13,5 , 4,0 , 439,9 , 448,8 , 2, 1, 1, 6, 7 }, // Bulgarian/Cyrillic/Bulgaria
+ { 21, 25, 147, 46, 44, 4170, 37, 4160, 45, 43, 101, 8220, 8221, 8216, 8217, 123,5 , 123,5 , 128,10 , 128,10 , 357,8 , 365,18 , 171,6 , 177,10 , 3722,43 , 3765,88 , 3853,24 , 3722,43 , 3765,88 , 3853,24 , 1673,54 , 1673,54 , 1727,14 , 1673,54 , 1673,54 , 1727,14 , 50,5 , 49,3 , 258,5 , 5,17 , 22,23 , {77,77,75}, 127,1 , 2955,29 , 13,5 , 4,0 , 456,6 , 456,6 , 0, 0, 7, 6, 7 }, // Burmese/Myanmar/Myanmar
+ { 22, 2, 20, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 138,7 , 138,7 , 383,7 , 335,22 , 37,5 , 187,11 , 3877,48 , 3925,95 , 4020,24 , 4044,48 , 4092,98 , 4020,24 , 1741,21 , 1762,56 , 1818,14 , 1741,21 , 1762,56 , 1818,14 , 0,2 , 0,2 , 263,5 , 268,17 , 22,23 , {66,89,78}, 0,2 , 2984,89 , 13,5 , 4,0 , 462,10 , 472,8 , 2, 0, 1, 6, 7 }, // Belarusian/Cyrillic/Belarus
+ { 23, 20, 36, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 145,9 , 154,9 , 287,6 , 98,16 , 18,7 , 25,12 , 4190,71 , 4190,71 , 4261,24 , 4190,71 , 4190,71 , 4261,24 , 1832,47 , 1832,47 , 1879,14 , 1832,47 , 1832,47 , 1879,14 , 0,2 , 0,2 , 285,2 , 5,17 , 22,23 , {75,72,82}, 128,1 , 3073,29 , 0,4 , 4,0 , 480,5 , 485,7 , 2, 1, 7, 6, 7 }, // Khmer/Khmer/Cambodia
+ { 24, 7, 197, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 163,7 , 163,7 , 287,6 , 390,22 , 55,4 , 59,9 , 4285,60 , 4345,82 , 4427,36 , 4463,93 , 4556,115 , 4427,36 , 1893,28 , 1921,60 , 1981,21 , 1893,28 , 1921,60 , 1981,21 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3102,20 , 13,5 , 4,0 , 492,6 , 498,7 , 2, 1, 1, 6, 7 }, // Catalan/Latin/Spain
+ { 24, 7, 5, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 163,7 , 163,7 , 287,6 , 390,22 , 55,4 , 59,9 , 4285,60 , 4345,82 , 4427,36 , 4463,93 , 4556,115 , 4427,36 , 1893,28 , 1921,60 , 1981,21 , 1893,28 , 1921,60 , 1981,21 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3102,20 , 13,5 , 4,0 , 492,6 , 505,7 , 2, 1, 1, 6, 7 }, // Catalan/Latin/Andorra
+ { 24, 7, 74, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 163,7 , 163,7 , 287,6 , 390,22 , 55,4 , 59,9 , 4285,60 , 4345,82 , 4427,36 , 4463,93 , 4556,115 , 4427,36 , 1893,28 , 1921,60 , 1981,21 , 1893,28 , 1921,60 , 1981,21 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3102,20 , 13,5 , 4,0 , 492,6 , 512,6 , 2, 1, 1, 6, 7 }, // Catalan/Latin/France
+ { 24, 7, 106, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 163,7 , 163,7 , 287,6 , 390,22 , 55,4 , 59,9 , 4285,60 , 4345,82 , 4427,36 , 4463,93 , 4556,115 , 4427,36 , 1893,28 , 1921,60 , 1981,21 , 1893,28 , 1921,60 , 1981,21 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3102,20 , 13,5 , 4,0 , 492,6 , 518,6 , 2, 1, 1, 6, 7 }, // Catalan/Latin/Italy
+ { 25, 5, 44, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 170,5 , 170,5 , 175,5 , 175,5 , 412,8 , 420,13 , 198,6 , 204,11 , 4671,39 , 4710,38 , 158,27 , 4671,39 , 4710,38 , 158,27 , 2002,21 , 2023,28 , 2051,14 , 2002,21 , 2023,28 , 2051,14 , 60,2 , 57,2 , 287,2 , 289,21 , 22,23 , {67,78,89}, 129,1 , 3122,13 , 4,4 , 4,0 , 524,4 , 528,2 , 2, 1, 7, 6, 7 }, // Chinese/Simplified Han/China
+ { 25, 5, 97, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 170,5 , 170,5 , 175,5 , 175,5 , 287,6 , 420,13 , 198,6 , 204,11 , 4671,39 , 4710,38 , 158,27 , 4671,39 , 4710,38 , 158,27 , 2002,21 , 2023,28 , 2051,14 , 2002,21 , 2023,28 , 2051,14 , 60,2 , 57,2 , 287,2 , 289,21 , 22,23 , {72,75,68}, 130,3 , 3135,11 , 4,4 , 4,0 , 524,4 , 530,9 , 2, 1, 7, 6, 7 }, // Chinese/Simplified Han/HongKong
+ { 25, 5, 126, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 170,5 , 170,5 , 175,5 , 175,5 , 287,6 , 420,13 , 198,6 , 204,11 , 4671,39 , 4710,38 , 158,27 , 4671,39 , 4710,38 , 158,27 , 2002,21 , 2023,28 , 2051,14 , 2002,21 , 2023,28 , 2051,14 , 60,2 , 57,2 , 287,2 , 289,21 , 22,23 , {77,79,80}, 133,4 , 3146,13 , 4,4 , 4,0 , 524,4 , 539,9 , 2, 1, 7, 6, 7 }, // Chinese/Simplified Han/Macau
+ { 25, 5, 190, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 170,5 , 170,5 , 175,5 , 175,5 , 27,8 , 420,13 , 198,6 , 204,11 , 4671,39 , 4710,38 , 158,27 , 4671,39 , 4710,38 , 158,27 , 2002,21 , 2023,28 , 2051,14 , 2002,21 , 2023,28 , 2051,14 , 60,2 , 57,2 , 287,2 , 289,21 , 22,23 , {83,71,68}, 6,1 , 3159,15 , 4,4 , 4,0 , 524,4 , 548,3 , 2, 1, 7, 6, 7 }, // Chinese/Simplified Han/Singapore
+ { 25, 6, 97, 46, 44, 59, 37, 48, 45, 43, 101, 12300, 12301, 12302, 12303, 170,5 , 170,5 , 180,5 , 180,5 , 433,8 , 420,13 , 198,6 , 215,13 , 4671,39 , 4671,39 , 158,27 , 4671,39 , 4671,39 , 158,27 , 2065,21 , 2023,28 , 2051,14 , 2065,21 , 2023,28 , 2051,14 , 60,2 , 57,2 , 310,3 , 5,17 , 22,23 , {72,75,68}, 130,3 , 3135,11 , 18,5 , 4,0 , 551,4 , 555,9 , 2, 1, 7, 6, 7 }, // Chinese/Traditional Han/HongKong
+ { 25, 6, 126, 46, 44, 59, 37, 48, 45, 43, 101, 12300, 12301, 12302, 12303, 170,5 , 170,5 , 180,5 , 180,5 , 433,8 , 420,13 , 198,6 , 215,13 , 4671,39 , 4671,39 , 158,27 , 4671,39 , 4671,39 , 158,27 , 2065,21 , 2023,28 , 2051,14 , 2065,21 , 2023,28 , 2051,14 , 60,2 , 57,2 , 310,3 , 5,17 , 22,23 , {77,79,80}, 133,4 , 3174,13 , 18,5 , 4,0 , 551,4 , 564,9 , 2, 1, 7, 6, 7 }, // Chinese/Traditional Han/Macau
+ { 25, 6, 208, 46, 44, 59, 37, 48, 45, 43, 101, 12300, 12301, 12302, 12303, 170,5 , 170,5 , 175,5 , 175,5 , 412,8 , 441,14 , 198,6 , 215,13 , 4671,39 , 4671,39 , 158,27 , 4671,39 , 4671,39 , 158,27 , 2065,21 , 2023,28 , 2051,14 , 2065,21 , 2023,28 , 2051,14 , 60,2 , 57,2 , 45,4 , 5,17 , 22,23 , {84,87,68}, 6,1 , 3187,13 , 4,4 , 4,0 , 551,4 , 573,2 , 2, 0, 7, 6, 7 }, // Chinese/Traditional Han/Taiwan
{ 26, 7, 74, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Corsican/Latin/France
- { 27, 7, 54, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 154,7 , 154,7 , 428,13 , 441,19 , 37,5 , 88,12 , 4774,49 , 4823,94 , 4917,39 , 4774,49 , 4956,98 , 4917,39 , 2076,28 , 2104,58 , 2162,14 , 2076,28 , 2104,58 , 2176,14 , 0,2 , 0,2 , 276,7 , 5,17 , 22,23 , {72,82,75}, 147,3 , 3155,60 , 13,5 , 4,0 , 575,8 , 583,8 , 2, 1, 1, 6, 7 }, // Croatian/Latin/Croatia
- { 27, 7, 27, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 154,7 , 154,7 , 460,9 , 441,19 , 37,5 , 88,12 , 4774,49 , 4823,94 , 4917,39 , 4774,49 , 4956,98 , 4917,39 , 2076,28 , 2104,58 , 2176,14 , 2076,28 , 2104,58 , 2176,14 , 0,2 , 0,2 , 276,7 , 5,17 , 22,23 , {66,65,77}, 150,2 , 3215,85 , 13,5 , 4,0 , 575,8 , 591,19 , 2, 1, 1, 6, 7 }, // Croatian/Latin/BosniaAndHerzegowina
- { 28, 7, 57, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 176,7 , 176,7 , 175,8 , 469,17 , 55,4 , 59,9 , 5054,48 , 5102,82 , 158,27 , 5054,48 , 5184,84 , 158,27 , 2190,21 , 2211,49 , 2260,14 , 2190,21 , 2211,49 , 2260,14 , 60,4 , 57,4 , 283,5 , 5,17 , 22,23 , {67,90,75}, 152,2 , 3300,68 , 13,5 , 4,0 , 610,7 , 617,5 , 2, 0, 1, 6, 7 }, // Czech/Latin/CzechRepublic
- { 29, 7, 58, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 183,8 , 183,8 , 120,10 , 486,23 , 200,5 , 205,10 , 5268,59 , 5327,84 , 134,24 , 5268,59 , 5327,84 , 134,24 , 2274,28 , 2302,51 , 2353,14 , 2367,35 , 2302,51 , 2353,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {68,75,75}, 154,3 , 3368,42 , 13,5 , 4,0 , 622,5 , 627,7 , 2, 1, 1, 6, 7 }, // Danish/Latin/Denmark
- { 29, 7, 86, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 183,8 , 183,8 , 120,10 , 486,23 , 215,7 , 76,12 , 5268,59 , 5327,84 , 134,24 , 5268,59 , 5327,84 , 134,24 , 2274,28 , 2302,51 , 2353,14 , 2367,35 , 2302,51 , 2353,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {68,75,75}, 154,3 , 3368,42 , 13,5 , 4,0 , 622,5 , 634,8 , 2, 1, 1, 6, 7 }, // Danish/Latin/Greenland
- { 30, 7, 151, 44, 46, 59, 37, 48, 45, 43, 101, 8216, 8217, 8220, 8221, 0,6 , 0,6 , 6,8 , 6,8 , 348,8 , 98,16 , 37,5 , 8,10 , 5411,59 , 5470,88 , 134,24 , 5411,59 , 5470,88 , 134,24 , 2402,21 , 2423,59 , 2482,14 , 2402,21 , 2423,59 , 2482,14 , 64,4 , 61,4 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3410,19 , 13,5 , 4,0 , 642,10 , 652,9 , 2, 1, 1, 6, 7 }, // Dutch/Latin/Netherlands
- { 30, 7, 12, 44, 46, 59, 37, 48, 45, 43, 101, 8216, 8217, 8220, 8221, 0,6 , 0,6 , 6,8 , 6,8 , 348,8 , 98,16 , 37,5 , 8,10 , 5411,59 , 5470,88 , 134,24 , 5411,59 , 5470,88 , 134,24 , 2402,21 , 2423,59 , 2482,14 , 2402,21 , 2423,59 , 2482,14 , 64,4 , 61,4 , 45,4 , 5,17 , 22,23 , {65,87,71}, 157,4 , 3429,55 , 13,5 , 4,0 , 642,10 , 661,5 , 2, 1, 1, 6, 7 }, // Dutch/Latin/Aruba
- { 30, 7, 21, 44, 46, 59, 37, 48, 45, 43, 101, 8216, 8217, 8220, 8221, 0,6 , 0,6 , 6,8 , 6,8 , 509,7 , 98,16 , 37,5 , 8,10 , 5411,59 , 5470,88 , 134,24 , 5411,59 , 5470,88 , 134,24 , 2402,21 , 2423,59 , 2482,14 , 2402,21 , 2423,59 , 2482,14 , 64,4 , 61,4 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3410,19 , 13,5 , 4,0 , 642,10 , 666,6 , 2, 1, 1, 6, 7 }, // Dutch/Latin/Belgium
- { 30, 7, 152, 44, 46, 59, 37, 48, 45, 43, 101, 8216, 8217, 8220, 8221, 0,6 , 0,6 , 6,8 , 6,8 , 348,8 , 98,16 , 37,5 , 8,10 , 5411,59 , 5470,88 , 134,24 , 5411,59 , 5470,88 , 134,24 , 2402,21 , 2423,59 , 2482,14 , 2402,21 , 2423,59 , 2482,14 , 64,4 , 61,4 , 45,4 , 5,17 , 22,23 , {65,78,71}, 161,4 , 3484,97 , 13,5 , 4,0 , 642,10 , 672,7 , 2, 1, 1, 6, 7 }, // Dutch/Latin/CuraSao
- { 30, 7, 202, 44, 46, 59, 37, 48, 45, 43, 101, 8216, 8217, 8220, 8221, 0,6 , 0,6 , 6,8 , 6,8 , 348,8 , 98,16 , 37,5 , 8,10 , 5411,59 , 5470,88 , 134,24 , 5411,59 , 5470,88 , 134,24 , 2402,21 , 2423,59 , 2482,14 , 2402,21 , 2423,59 , 2482,14 , 64,4 , 61,4 , 45,4 , 5,17 , 22,23 , {83,82,68}, 6,1 , 3581,58 , 13,5 , 4,0 , 642,10 , 679,8 , 2, 1, 1, 6, 7 }, // Dutch/Latin/Suriname
- { 30, 7, 255, 44, 46, 59, 37, 48, 45, 43, 101, 8216, 8217, 8220, 8221, 0,6 , 0,6 , 6,8 , 6,8 , 348,8 , 98,16 , 37,5 , 8,10 , 5411,59 , 5470,88 , 134,24 , 5411,59 , 5470,88 , 134,24 , 2402,21 , 2423,59 , 2482,14 , 2402,21 , 2423,59 , 2482,14 , 64,4 , 61,4 , 45,4 , 5,17 , 22,23 , {85,83,68}, 6,1 , 3639,61 , 13,5 , 4,0 , 642,10 , 687,19 , 2, 1, 1, 6, 7 }, // Dutch/Latin/Bonaire
- { 30, 7, 256, 44, 46, 59, 37, 48, 45, 43, 101, 8216, 8217, 8220, 8221, 0,6 , 0,6 , 6,8 , 6,8 , 348,8 , 98,16 , 37,5 , 8,10 , 5411,59 , 5470,88 , 134,24 , 5411,59 , 5470,88 , 134,24 , 2402,21 , 2423,59 , 2482,14 , 2402,21 , 2423,59 , 2482,14 , 64,4 , 61,4 , 45,4 , 5,17 , 22,23 , {65,78,71}, 161,4 , 3484,97 , 13,5 , 4,0 , 642,10 , 706,12 , 2, 1, 1, 6, 7 }, // Dutch/Latin/SintMaarten
- { 31, 7, 225, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 516,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 6,1 , 3700,35 , 4,4 , 4,0 , 718,16 , 734,13 , 2, 1, 7, 6, 7 }, // English/Latin/UnitedStates
- { 31, 3, 225, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {85,83,68}, 165,3 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 6, 7 }, // English/Deseret/UnitedStates
- { 31, 7, 4, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 516,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 6,1 , 3700,35 , 4,4 , 4,0 , 747,7 , 754,14 , 2, 1, 7, 6, 7 }, // English/Latin/AmericanSamoa
- { 31, 7, 7, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {88,67,68}, 6,1 , 3735,71 , 4,4 , 4,0 , 747,7 , 768,8 , 2, 1, 1, 6, 7 }, // English/Latin/Anguilla
- { 31, 7, 9, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {88,67,68}, 6,1 , 3735,71 , 4,4 , 4,0 , 747,7 , 776,17 , 2, 1, 7, 6, 7 }, // English/Latin/AntiguaAndBarbuda
- { 31, 7, 13, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 201,9 , 201,9 , 278,6 , 10,17 , 18,7 , 25,12 , 5558,59 , 48,86 , 134,24 , 5558,59 , 48,86 , 134,24 , 2496,35 , 28,57 , 2531,25 , 2496,35 , 28,57 , 2531,25 , 68,2 , 65,2 , 0,5 , 5,17 , 22,23 , {65,85,68}, 6,1 , 3806,59 , 4,4 , 4,0 , 793,18 , 811,9 , 2, 1, 7, 6, 7 }, // English/Latin/Australia
- { 31, 7, 14, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3865,20 , 8,5 , 4,0 , 747,7 , 820,7 , 2, 1, 1, 6, 7 }, // English/Latin/Austria
- { 31, 7, 16, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {66,83,68}, 6,1 , 3885,53 , 4,4 , 4,0 , 747,7 , 827,7 , 2, 1, 7, 6, 7 }, // English/Latin/Bahamas
- { 31, 7, 19, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {66,66,68}, 6,1 , 3938,56 , 4,4 , 4,0 , 747,7 , 834,8 , 2, 1, 1, 6, 7 }, // English/Latin/Barbados
- { 31, 7, 21, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 27,8 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3865,20 , 13,5 , 4,0 , 747,7 , 842,7 , 2, 1, 1, 6, 7 }, // English/Latin/Belgium
- { 31, 7, 22, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 27,8 , 80,18 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {66,90,68}, 6,1 , 3994,47 , 4,4 , 4,0 , 747,7 , 849,6 , 2, 1, 7, 6, 7 }, // English/Latin/Belize
- { 31, 7, 24, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {66,77,68}, 6,1 , 4041,53 , 4,4 , 4,0 , 747,7 , 855,7 , 2, 1, 1, 6, 7 }, // English/Latin/Bermuda
- { 31, 7, 28, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 27,8 , 80,18 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {66,87,80}, 168,1 , 4094,50 , 4,4 , 4,0 , 747,7 , 862,8 , 2, 1, 7, 6, 7 }, // English/Latin/Botswana
- { 31, 7, 31, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 165,3 , 3700,35 , 4,4 , 4,0 , 747,7 , 870,30 , 2, 1, 1, 6, 7 }, // English/Latin/BritishIndianOceanTerritory
- { 31, 7, 35, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 516,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {66,73,70}, 169,3 , 4144,53 , 4,4 , 4,0 , 747,7 , 900,7 , 0, 0, 1, 6, 7 }, // English/Latin/Burundi
- { 31, 7, 37, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {88,65,70}, 32,4 , 4197,83 , 4,4 , 4,0 , 747,7 , 907,8 , 0, 0, 1, 6, 7 }, // English/Latin/Cameroon
- { 31, 7, 38, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 53,10 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {67,65,68}, 6,1 , 4280,53 , 4,4 , 4,0 , 915,16 , 931,6 , 2, 0, 7, 6, 7 }, // English/Latin/Canada
- { 31, 7, 40, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {75,89,68}, 6,1 , 4333,71 , 4,4 , 4,0 , 747,7 , 937,14 , 2, 1, 1, 6, 7 }, // English/Latin/CaymanIslands
- { 31, 7, 45, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {65,85,68}, 6,1 , 3806,59 , 4,4 , 4,0 , 747,7 , 951,16 , 2, 1, 1, 6, 7 }, // English/Latin/ChristmasIsland
- { 31, 7, 46, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {65,85,68}, 6,1 , 3806,59 , 4,4 , 4,0 , 747,7 , 967,23 , 2, 1, 1, 6, 7 }, // English/Latin/CocosIslands
- { 31, 7, 51, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {78,90,68}, 6,1 , 4404,62 , 4,4 , 4,0 , 747,7 , 990,12 , 2, 1, 1, 6, 7 }, // English/Latin/CookIslands
- { 31, 7, 56, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3865,20 , 4,4 , 4,0 , 747,7 , 1002,6 , 2, 1, 1, 6, 7 }, // English/Latin/Cyprus
- { 31, 7, 58, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 200,5 , 205,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {68,75,75}, 154,3 , 4466,44 , 13,5 , 4,0 , 747,7 , 1008,7 , 2, 1, 1, 6, 7 }, // English/Latin/Denmark
- { 31, 7, 60, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {88,67,68}, 6,1 , 3735,71 , 4,4 , 4,0 , 747,7 , 1015,8 , 2, 1, 7, 6, 7 }, // English/Latin/Dominica
- { 31, 7, 67, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {69,82,78}, 46,3 , 4510,50 , 4,4 , 4,0 , 747,7 , 1023,7 , 2, 1, 1, 6, 7 }, // English/Latin/Eritrea
- { 31, 7, 70, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {70,75,80}, 125,1 , 4560,74 , 4,4 , 4,0 , 747,7 , 1030,16 , 2, 1, 1, 6, 7 }, // English/Latin/FalklandIslands
- { 31, 7, 72, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {70,74,68}, 6,1 , 4634,47 , 4,4 , 4,0 , 747,7 , 1046,4 , 2, 1, 1, 6, 7 }, // English/Latin/Fiji
- { 31, 7, 73, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 222,4 , 226,9 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3865,20 , 13,5 , 4,0 , 747,7 , 1050,7 , 2, 1, 1, 6, 7 }, // English/Latin/Finland
- { 31, 7, 75, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {71,66,80}, 125,1 , 4681,32 , 4,4 , 4,0 , 747,7 , 1057,8 , 2, 1, 1, 6, 7 }, // English/Latin/Guernsey
- { 31, 7, 80, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {71,77,68}, 172,1 , 4713,50 , 4,4 , 4,0 , 747,7 , 1065,6 , 2, 1, 1, 6, 7 }, // English/Latin/Gambia
- { 31, 7, 82, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3865,20 , 13,5 , 4,0 , 747,7 , 1071,7 , 2, 1, 1, 6, 7 }, // English/Latin/Germany
- { 31, 7, 83, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {71,72,83}, 173,3 , 4763,47 , 4,4 , 4,0 , 747,7 , 1078,5 , 2, 1, 1, 6, 7 }, // English/Latin/Ghana
- { 31, 7, 84, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {71,73,80}, 125,1 , 4810,53 , 4,4 , 4,0 , 747,7 , 1083,9 , 2, 1, 1, 6, 7 }, // English/Latin/Gibraltar
- { 31, 7, 87, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {88,67,68}, 6,1 , 3735,71 , 4,4 , 4,0 , 747,7 , 1092,7 , 2, 1, 1, 6, 7 }, // English/Latin/Grenada
- { 31, 7, 89, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 516,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 6,1 , 3700,35 , 4,4 , 4,0 , 747,7 , 1099,4 , 2, 1, 7, 6, 7 }, // English/Latin/Guam
- { 31, 7, 93, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {71,89,68}, 6,1 , 4863,56 , 4,4 , 4,0 , 747,7 , 1103,6 , 0, 0, 1, 6, 7 }, // English/Latin/Guyana
- { 31, 7, 97, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 406,8 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {72,75,68}, 140,3 , 4919,56 , 4,4 , 4,0 , 747,7 , 1109,19 , 2, 1, 7, 6, 7 }, // English/Latin/HongKong
- { 31, 7, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 27,8 , 98,16 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {73,78,82}, 127,1 , 4975,44 , 8,5 , 4,0 , 747,7 , 1128,5 , 2, 1, 7, 7, 7 }, // English/Latin/India
- { 31, 7, 104, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 98,16 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 64,4 , 61,4 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3865,20 , 4,4 , 4,0 , 747,7 , 1133,7 , 2, 1, 7, 6, 7 }, // English/Latin/Ireland
- { 31, 7, 105, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 55,4 , 59,9 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {73,76,83}, 54,1 , 5019,62 , 4,4 , 4,0 , 747,7 , 1140,6 , 2, 1, 7, 5, 6 }, // English/Latin/Israel
- { 31, 7, 107, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 278,6 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {74,77,68}, 6,1 , 5081,53 , 4,4 , 4,0 , 747,7 , 1146,7 , 2, 1, 7, 6, 7 }, // English/Latin/Jamaica
- { 31, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {75,69,83}, 2,3 , 5134,53 , 4,4 , 4,0 , 747,7 , 1153,5 , 2, 1, 7, 6, 7 }, // English/Latin/Kenya
- { 31, 7, 112, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {65,85,68}, 6,1 , 3806,59 , 4,4 , 4,0 , 747,7 , 1158,8 , 2, 1, 1, 6, 7 }, // English/Latin/Kiribati
- { 31, 7, 120, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {90,65,82}, 5,1 , 5187,61 , 4,4 , 4,0 , 747,7 , 1166,7 , 2, 1, 1, 6, 7 }, // English/Latin/Lesotho
- { 31, 7, 121, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {76,82,68}, 6,1 , 5248,53 , 4,4 , 4,0 , 747,7 , 1173,7 , 2, 1, 1, 6, 7 }, // English/Latin/Liberia
- { 31, 7, 126, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {77,79,80}, 143,4 , 5301,53 , 4,4 , 4,0 , 747,7 , 1180,15 , 2, 1, 7, 6, 7 }, // English/Latin/Macau
- { 31, 7, 128, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {77,71,65}, 176,2 , 5354,54 , 4,4 , 4,0 , 747,7 , 1195,10 , 0, 0, 1, 6, 7 }, // English/Latin/Madagascar
- { 31, 7, 129, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {77,87,75}, 178,2 , 5408,53 , 4,4 , 4,0 , 747,7 , 1205,6 , 2, 1, 1, 6, 7 }, // English/Latin/Malawi
- { 31, 7, 130, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {77,89,82}, 180,2 , 5461,59 , 4,4 , 4,0 , 747,7 , 1211,8 , 2, 1, 1, 6, 7 }, // English/Latin/Malaysia
- { 31, 7, 133, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3865,20 , 4,4 , 4,0 , 747,7 , 1219,5 , 2, 1, 7, 6, 7 }, // English/Latin/Malta
- { 31, 7, 134, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 516,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 6,1 , 3700,35 , 4,4 , 4,0 , 747,7 , 1224,16 , 2, 1, 7, 6, 7 }, // English/Latin/MarshallIslands
- { 31, 7, 137, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {77,85,82}, 182,2 , 5520,53 , 4,4 , 4,0 , 747,7 , 1240,9 , 0, 0, 1, 6, 7 }, // English/Latin/Mauritius
- { 31, 7, 140, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 165,3 , 3700,35 , 4,4 , 4,0 , 747,7 , 1249,10 , 2, 1, 1, 6, 7 }, // English/Latin/Micronesia
- { 31, 7, 144, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {88,67,68}, 6,1 , 3735,71 , 4,4 , 4,0 , 747,7 , 1259,10 , 2, 1, 1, 6, 7 }, // English/Latin/Montserrat
- { 31, 7, 148, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {78,65,68}, 6,1 , 5573,53 , 4,4 , 4,0 , 747,7 , 1269,7 , 2, 1, 1, 6, 7 }, // English/Latin/Namibia
- { 31, 7, 149, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {65,85,68}, 6,1 , 3806,59 , 4,4 , 4,0 , 747,7 , 1276,5 , 2, 1, 1, 6, 7 }, // English/Latin/Nauru
- { 31, 7, 151, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3865,20 , 8,5 , 23,6 , 747,7 , 1281,11 , 2, 1, 1, 6, 7 }, // English/Latin/Netherlands
- { 31, 7, 154, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 509,7 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {78,90,68}, 6,1 , 4404,62 , 4,4 , 4,0 , 747,7 , 1292,11 , 2, 1, 7, 6, 7 }, // English/Latin/NewZealand
- { 31, 7, 157, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {78,71,78}, 184,1 , 5626,50 , 4,4 , 4,0 , 747,7 , 1303,7 , 2, 1, 1, 6, 7 }, // English/Latin/Nigeria
- { 31, 7, 158, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {78,90,68}, 6,1 , 4404,62 , 4,4 , 4,0 , 747,7 , 1310,4 , 2, 1, 1, 6, 7 }, // English/Latin/Niue
- { 31, 7, 159, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {65,85,68}, 6,1 , 3806,59 , 4,4 , 4,0 , 747,7 , 1314,14 , 2, 1, 1, 6, 7 }, // English/Latin/NorfolkIsland
- { 31, 7, 160, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 516,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 6,1 , 3700,35 , 4,4 , 4,0 , 747,7 , 1328,24 , 2, 1, 1, 6, 7 }, // English/Latin/NorthernMarianaIslands
- { 31, 7, 163, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {80,75,82}, 182,2 , 5676,53 , 4,4 , 4,0 , 747,7 , 1352,8 , 0, 0, 7, 6, 7 }, // English/Latin/Pakistan
- { 31, 7, 164, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 165,3 , 3700,35 , 4,4 , 4,0 , 747,7 , 1360,5 , 2, 1, 1, 6, 7 }, // English/Latin/Palau
- { 31, 7, 167, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {80,71,75}, 137,1 , 5729,73 , 4,4 , 4,0 , 747,7 , 1365,16 , 2, 1, 1, 6, 7 }, // English/Latin/PapuaNewGuinea
- { 31, 7, 170, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {80,72,80}, 185,1 , 5802,53 , 4,4 , 4,0 , 747,7 , 1381,11 , 2, 1, 7, 6, 7 }, // English/Latin/Philippines
- { 31, 7, 171, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {78,90,68}, 6,1 , 4404,62 , 4,4 , 4,0 , 747,7 , 1392,16 , 2, 1, 1, 6, 7 }, // English/Latin/Pitcairn
- { 31, 7, 174, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 516,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 6,1 , 3700,35 , 4,4 , 4,0 , 747,7 , 1408,11 , 2, 1, 7, 6, 7 }, // English/Latin/PuertoRico
- { 31, 7, 179, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {82,87,70}, 186,2 , 5855,47 , 4,4 , 4,0 , 747,7 , 1419,6 , 0, 0, 1, 6, 7 }, // English/Latin/Rwanda
- { 31, 7, 180, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {88,67,68}, 6,1 , 3735,71 , 4,4 , 4,0 , 747,7 , 1425,17 , 2, 1, 1, 6, 7 }, // English/Latin/SaintKittsAndNevis
- { 31, 7, 181, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {88,67,68}, 6,1 , 3735,71 , 4,4 , 4,0 , 747,7 , 1442,9 , 2, 1, 1, 6, 7 }, // English/Latin/SaintLucia
- { 31, 7, 182, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {88,67,68}, 6,1 , 3735,71 , 4,4 , 4,0 , 747,7 , 1451,24 , 2, 1, 1, 6, 7 }, // English/Latin/SaintVincentAndTheGrenadines
- { 31, 7, 183, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {87,83,84}, 188,3 , 5902,40 , 4,4 , 4,0 , 747,7 , 1475,5 , 2, 1, 7, 6, 7 }, // English/Latin/Samoa
- { 31, 7, 188, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {83,67,82}, 191,2 , 5942,59 , 4,4 , 4,0 , 747,7 , 1480,10 , 2, 1, 1, 6, 7 }, // English/Latin/Seychelles
- { 31, 7, 189, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {83,76,76}, 193,2 , 6001,68 , 4,4 , 4,0 , 747,7 , 1490,12 , 0, 0, 1, 6, 7 }, // English/Latin/SierraLeone
- { 31, 7, 190, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 278,6 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {83,71,68}, 6,1 , 6069,56 , 4,4 , 4,0 , 747,7 , 1502,9 , 2, 1, 7, 6, 7 }, // English/Latin/Singapore
- { 31, 7, 192, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3865,20 , 13,5 , 29,7 , 747,7 , 1511,8 , 2, 1, 1, 6, 7 }, // English/Latin/Slovenia
- { 31, 7, 193, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {83,66,68}, 6,1 , 6125,74 , 4,4 , 4,0 , 747,7 , 1519,15 , 2, 1, 1, 6, 7 }, // English/Latin/SolomonIslands
- { 31, 7, 195, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 522,10 , 80,18 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {90,65,82}, 5,1 , 5187,61 , 4,4 , 4,0 , 747,7 , 1534,12 , 2, 1, 7, 6, 7 }, // English/Latin/SouthAfrica
- { 31, 7, 199, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {83,72,80}, 125,1 , 6199,56 , 4,4 , 4,0 , 747,7 , 1546,10 , 2, 1, 1, 6, 7 }, // English/Latin/SaintHelena
- { 31, 7, 201, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {83,68,71}, 0,0 , 6255,50 , 4,4 , 4,0 , 747,7 , 1556,5 , 2, 1, 6, 5, 6 }, // English/Latin/Sudan
- { 31, 7, 204, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {83,90,76}, 195,1 , 6305,53 , 4,4 , 4,0 , 747,7 , 1561,9 , 2, 1, 1, 6, 7 }, // English/Latin/Swaziland
- { 31, 7, 205, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 53,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {83,69,75}, 196,2 , 6358,47 , 13,5 , 4,0 , 747,7 , 1570,6 , 2, 1, 1, 6, 7 }, // English/Latin/Sweden
- { 31, 7, 206, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {67,72,70}, 0,0 , 6405,41 , 8,5 , 36,5 , 747,7 , 1576,11 , 2, 0, 1, 6, 7 }, // English/Latin/Switzerland
- { 31, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {84,90,83}, 198,3 , 6446,62 , 4,4 , 4,0 , 747,7 , 1587,8 , 0, 0, 1, 6, 7 }, // English/Latin/Tanzania
- { 31, 7, 213, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {78,90,68}, 6,1 , 4404,62 , 4,4 , 4,0 , 747,7 , 1595,7 , 2, 1, 1, 6, 7 }, // English/Latin/Tokelau
- { 31, 7, 214, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {84,79,80}, 201,2 , 6508,49 , 4,4 , 4,0 , 747,7 , 1602,5 , 2, 1, 1, 6, 7 }, // English/Latin/Tonga
- { 31, 7, 215, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {84,84,68}, 6,1 , 6557,80 , 4,4 , 4,0 , 747,7 , 1607,17 , 2, 1, 7, 6, 7 }, // English/Latin/TrinidadAndTobago
- { 31, 7, 219, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 165,3 , 3700,35 , 4,4 , 4,0 , 747,7 , 1624,22 , 2, 1, 1, 6, 7 }, // English/Latin/TurksAndCaicosIslands
- { 31, 7, 220, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {65,85,68}, 6,1 , 3806,59 , 4,4 , 4,0 , 747,7 , 1646,6 , 2, 1, 1, 6, 7 }, // English/Latin/Tuvalu
- { 31, 7, 221, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,71,88}, 203,3 , 6637,56 , 4,4 , 4,0 , 747,7 , 1652,6 , 0, 0, 1, 6, 7 }, // English/Latin/Uganda
- { 31, 7, 224, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 201,9 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 68,2 , 65,2 , 0,5 , 5,17 , 22,23 , {71,66,80}, 125,1 , 6693,47 , 4,4 , 4,0 , 1658,15 , 1673,14 , 2, 1, 1, 6, 7 }, // English/Latin/UnitedKingdom
- { 31, 7, 226, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 516,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 6,1 , 3700,35 , 4,4 , 4,0 , 747,7 , 1687,21 , 2, 1, 7, 6, 7 }, // English/Latin/UnitedStatesMinorOutlyingIslands
- { 31, 7, 229, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {86,85,86}, 206,2 , 6740,44 , 4,4 , 4,0 , 747,7 , 1708,7 , 0, 0, 1, 6, 7 }, // English/Latin/Vanuatu
- { 31, 7, 233, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 165,3 , 3700,35 , 4,4 , 4,0 , 747,7 , 1715,22 , 2, 1, 1, 6, 7 }, // English/Latin/BritishVirginIslands
- { 31, 7, 234, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 516,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 6,1 , 3700,35 , 4,4 , 4,0 , 747,7 , 1737,19 , 2, 1, 7, 6, 7 }, // English/Latin/UnitedStatesVirginIslands
- { 31, 7, 239, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {90,77,87}, 137,1 , 6784,50 , 4,4 , 4,0 , 747,7 , 1756,6 , 2, 1, 1, 6, 7 }, // English/Latin/Zambia
- { 31, 7, 240, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 406,8 , 80,18 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 165,3 , 3700,35 , 4,4 , 4,0 , 747,7 , 1762,8 , 2, 1, 7, 6, 7 }, // English/Latin/Zimbabwe
- { 31, 7, 249, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 165,3 , 3700,35 , 4,4 , 4,0 , 747,7 , 1770,12 , 2, 1, 1, 6, 7 }, // English/Latin/DiegoGarcia
- { 31, 7, 251, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {71,66,80}, 125,1 , 4681,32 , 4,4 , 4,0 , 747,7 , 1782,11 , 2, 1, 1, 6, 7 }, // English/Latin/IsleOfMan
- { 31, 7, 252, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {71,66,80}, 125,1 , 4681,32 , 4,4 , 4,0 , 747,7 , 1793,6 , 2, 1, 1, 6, 7 }, // English/Latin/Jersey
- { 31, 7, 254, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {83,83,80}, 125,1 , 6834,68 , 4,4 , 4,0 , 747,7 , 1799,11 , 2, 1, 1, 6, 7 }, // English/Latin/SouthSudan
- { 31, 7, 256, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 191,10 , 201,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {65,78,71}, 161,4 , 6902,95 , 4,4 , 4,0 , 747,7 , 1810,12 , 2, 1, 1, 6, 7 }, // English/Latin/SintMaarten
- { 33, 7, 68, 44, 160, 59, 37, 48, 8722, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 210,8 , 210,8 , 175,8 , 532,18 , 37,5 , 8,10 , 5617,59 , 5676,91 , 5767,24 , 5617,59 , 5676,91 , 5767,24 , 2556,14 , 2570,63 , 2556,14 , 2556,14 , 2570,63 , 2556,14 , 0,2 , 0,2 , 288,6 , 5,17 , 22,23 , {69,85,82}, 14,1 , 6997,20 , 13,5 , 4,0 , 1822,5 , 1827,5 , 2, 1, 1, 6, 7 }, // Estonian/Latin/Estonia
- { 34, 7, 71, 44, 46, 59, 37, 48, 8722, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 183,8 , 183,8 , 175,8 , 532,18 , 37,5 , 8,10 , 5791,48 , 5839,83 , 134,24 , 5922,59 , 5839,83 , 134,24 , 2633,28 , 2661,74 , 2735,14 , 2749,35 , 2661,74 , 2735,14 , 0,2 , 0,2 , 294,3 , 297,17 , 22,23 , {68,75,75}, 196,2 , 7017,43 , 13,5 , 4,0 , 1832,8 , 1840,7 , 2, 1, 1, 6, 7 }, // Faroese/Latin/FaroeIslands
- { 34, 7, 58, 44, 46, 59, 37, 48, 8722, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 183,8 , 183,8 , 175,8 , 532,18 , 37,5 , 8,10 , 5791,48 , 5839,83 , 134,24 , 5922,59 , 5839,83 , 134,24 , 2633,28 , 2661,74 , 2735,14 , 2749,35 , 2661,74 , 2735,14 , 0,2 , 0,2 , 294,3 , 297,17 , 22,23 , {68,75,75}, 154,3 , 7017,43 , 13,5 , 4,0 , 1832,8 , 627,7 , 2, 1, 1, 6, 7 }, // Faroese/Latin/Denmark
- { 36, 7, 73, 44, 160, 59, 37, 48, 8722, 43, 101, 8221, 8221, 8217, 8217, 0,6 , 0,6 , 210,8 , 210,8 , 550,8 , 469,17 , 222,4 , 226,9 , 5981,69 , 6050,105 , 6155,24 , 6179,93 , 6272,129 , 6155,24 , 2784,21 , 2805,67 , 2872,14 , 2784,21 , 2886,81 , 2872,14 , 70,3 , 67,3 , 314,5 , 319,17 , 336,23 , {69,85,82}, 14,1 , 7060,20 , 13,5 , 4,0 , 1847,5 , 1852,5 , 2, 1, 1, 6, 7 }, // Finnish/Latin/Finland
- { 37, 7, 74, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {69,85,82}, 14,1 , 3057,20 , 13,5 , 4,0 , 1857,8 , 1865,6 , 2, 1, 1, 6, 7 }, // French/Latin/France
- { 37, 7, 3, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 18,7 , 25,12 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {68,90,68}, 208,2 , 7080,51 , 13,5 , 4,0 , 1857,8 , 1871,7 , 2, 1, 6, 5, 6 }, // French/Latin/Algeria
- { 37, 7, 21, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 509,7 , 98,16 , 37,5 , 235,23 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {69,85,82}, 14,1 , 3057,20 , 13,5 , 4,0 , 1857,8 , 1878,8 , 2, 1, 1, 6, 7 }, // French/Latin/Belgium
- { 37, 7, 23, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {88,79,70}, 210,3 , 7131,59 , 13,5 , 4,0 , 1857,8 , 1886,5 , 0, 0, 1, 6, 7 }, // French/Latin/Benin
- { 37, 7, 34, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {88,79,70}, 210,3 , 7131,59 , 13,5 , 4,0 , 1857,8 , 1891,12 , 0, 0, 1, 6, 7 }, // French/Latin/BurkinaFaso
- { 37, 7, 35, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {66,73,70}, 169,3 , 7190,53 , 13,5 , 4,0 , 1857,8 , 900,7 , 0, 0, 1, 6, 7 }, // French/Latin/Burundi
- { 37, 7, 37, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 73,5 , 70,4 , 359,6 , 174,17 , 191,23 , {88,65,70}, 32,4 , 7243,56 , 13,5 , 4,0 , 1857,8 , 1903,8 , 0, 0, 1, 6, 7 }, // French/Latin/Cameroon
- { 37, 7, 38, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8221, 8220, 0,6 , 0,6 , 218,8 , 218,8 , 558,8 , 98,16 , 258,9 , 8,10 , 6549,64 , 6464,85 , 134,24 , 6549,64 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 64,4 , 61,4 , 359,6 , 174,17 , 191,23 , {67,65,68}, 6,1 , 7299,54 , 41,8 , 4,0 , 1911,17 , 931,6 , 2, 0, 7, 6, 7 }, // French/Latin/Canada
- { 37, 7, 41, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {88,65,70}, 32,4 , 7243,56 , 13,5 , 4,0 , 1857,8 , 1928,25 , 0, 0, 1, 6, 7 }, // French/Latin/CentralAfricanRepublic
- { 37, 7, 42, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 18,7 , 25,12 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {88,65,70}, 32,4 , 7243,56 , 13,5 , 4,0 , 1857,8 , 1953,5 , 0, 0, 1, 6, 7 }, // French/Latin/Chad
- { 37, 7, 48, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {75,77,70}, 213,2 , 7353,51 , 13,5 , 4,0 , 1857,8 , 1958,7 , 0, 0, 1, 6, 7 }, // French/Latin/Comoros
- { 37, 7, 49, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {67,68,70}, 215,2 , 7404,53 , 13,5 , 4,0 , 1857,8 , 1965,14 , 2, 1, 1, 6, 7 }, // French/Latin/CongoKinshasa
- { 37, 7, 50, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {88,65,70}, 32,4 , 7243,56 , 13,5 , 4,0 , 1857,8 , 1979,17 , 0, 0, 1, 6, 7 }, // French/Latin/CongoBrazzaville
- { 37, 7, 53, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {88,79,70}, 210,3 , 7131,59 , 13,5 , 4,0 , 1857,8 , 1996,13 , 0, 0, 1, 6, 7 }, // French/Latin/IvoryCoast
- { 37, 7, 59, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 18,7 , 25,12 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {68,74,70}, 43,3 , 7457,57 , 13,5 , 4,0 , 1857,8 , 2009,8 , 0, 0, 6, 6, 7 }, // French/Latin/Djibouti
- { 37, 7, 66, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {88,65,70}, 32,4 , 7243,56 , 13,5 , 4,0 , 1857,8 , 2017,18 , 0, 0, 1, 6, 7 }, // French/Latin/EquatorialGuinea
- { 37, 7, 76, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {69,85,82}, 14,1 , 3057,20 , 13,5 , 4,0 , 1857,8 , 2035,16 , 2, 1, 1, 6, 7 }, // French/Latin/FrenchGuiana
- { 37, 7, 77, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {88,80,70}, 217,4 , 7514,35 , 13,5 , 4,0 , 1857,8 , 2051,19 , 0, 0, 1, 6, 7 }, // French/Latin/FrenchPolynesia
- { 37, 7, 79, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {88,65,70}, 32,4 , 7243,56 , 13,5 , 4,0 , 1857,8 , 2070,5 , 0, 0, 1, 6, 7 }, // French/Latin/Gabon
- { 37, 7, 88, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {69,85,82}, 14,1 , 3057,20 , 13,5 , 4,0 , 1857,8 , 2075,10 , 2, 1, 1, 6, 7 }, // French/Latin/Guadeloupe
- { 37, 7, 91, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {71,78,70}, 221,2 , 7549,48 , 13,5 , 4,0 , 1857,8 , 2085,6 , 0, 0, 1, 6, 7 }, // French/Latin/Guinea
- { 37, 7, 94, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {72,84,71}, 223,1 , 7597,57 , 13,5 , 4,0 , 1857,8 , 2091,5 , 2, 1, 1, 6, 7 }, // French/Latin/Haiti
- { 37, 7, 125, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {69,85,82}, 14,1 , 3057,20 , 13,5 , 4,0 , 1857,8 , 2096,10 , 2, 1, 1, 6, 7 }, // French/Latin/Luxembourg
- { 37, 7, 128, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {77,71,65}, 176,2 , 7654,54 , 13,5 , 4,0 , 1857,8 , 1195,10 , 0, 0, 1, 6, 7 }, // French/Latin/Madagascar
- { 37, 7, 132, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {88,79,70}, 210,3 , 7131,59 , 13,5 , 4,0 , 1857,8 , 2106,4 , 0, 0, 1, 6, 7 }, // French/Latin/Mali
- { 37, 7, 135, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {69,85,82}, 14,1 , 3057,20 , 13,5 , 4,0 , 1857,8 , 2110,10 , 2, 1, 1, 6, 7 }, // French/Latin/Martinique
- { 37, 7, 136, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 18,7 , 25,12 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {77,82,79}, 224,2 , 7708,66 , 13,5 , 4,0 , 1857,8 , 2120,10 , 0, 0, 1, 6, 7 }, // French/Latin/Mauritania
- { 37, 7, 137, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {77,85,82}, 182,2 , 7774,63 , 13,5 , 4,0 , 1857,8 , 2130,7 , 0, 0, 1, 6, 7 }, // French/Latin/Mauritius
- { 37, 7, 138, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {69,85,82}, 14,1 , 3057,20 , 13,5 , 4,0 , 1857,8 , 2137,7 , 2, 1, 1, 6, 7 }, // French/Latin/Mayotte
- { 37, 7, 142, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {69,85,82}, 14,1 , 3057,20 , 13,5 , 4,0 , 1857,8 , 2144,6 , 2, 1, 1, 6, 7 }, // French/Latin/Monaco
- { 37, 7, 145, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6613,61 , 6464,85 , 134,24 , 6613,61 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 64,4 , 61,4 , 359,6 , 174,17 , 191,23 , {77,65,68}, 226,3 , 7837,54 , 13,5 , 4,0 , 1857,8 , 2150,5 , 2, 1, 6, 5, 6 }, // French/Latin/Morocco
- { 37, 7, 153, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {88,80,70}, 217,4 , 7514,35 , 13,5 , 4,0 , 1857,8 , 2155,18 , 0, 0, 1, 6, 7 }, // French/Latin/NewCaledonia
- { 37, 7, 156, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {88,79,70}, 210,3 , 7131,59 , 13,5 , 4,0 , 1857,8 , 2173,5 , 0, 0, 1, 6, 7 }, // French/Latin/Niger
- { 37, 7, 176, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {69,85,82}, 14,1 , 3057,20 , 13,5 , 4,0 , 1857,8 , 2178,10 , 2, 1, 1, 6, 7 }, // French/Latin/Reunion
- { 37, 7, 179, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {82,87,70}, 186,2 , 7891,50 , 13,5 , 4,0 , 1857,8 , 1419,6 , 0, 0, 1, 6, 7 }, // French/Latin/Rwanda
- { 37, 7, 187, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {88,79,70}, 210,3 , 7131,59 , 13,5 , 4,0 , 1857,8 , 2188,7 , 0, 0, 1, 6, 7 }, // French/Latin/Senegal
- { 37, 7, 188, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {83,67,82}, 191,2 , 7941,71 , 13,5 , 4,0 , 1857,8 , 1480,10 , 2, 1, 1, 6, 7 }, // French/Latin/Seychelles
- { 37, 7, 200, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {69,85,82}, 14,1 , 3057,20 , 13,5 , 4,0 , 1857,8 , 2195,24 , 2, 1, 1, 6, 7 }, // French/Latin/SaintPierreAndMiquelon
- { 37, 7, 206, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8249, 8250, 0,6 , 0,6 , 218,8 , 218,8 , 175,8 , 10,17 , 37,5 , 267,14 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {67,72,70}, 229,3 , 8012,45 , 13,5 , 4,0 , 2219,15 , 2234,6 , 2, 0, 1, 6, 7 }, // French/Latin/Switzerland
- { 37, 7, 207, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 18,7 , 25,12 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {83,89,80}, 232,2 , 8057,51 , 13,5 , 4,0 , 1857,8 , 2240,5 , 0, 0, 6, 5, 6 }, // French/Latin/Syria
- { 37, 7, 212, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {88,79,70}, 210,3 , 7131,59 , 13,5 , 4,0 , 1857,8 , 2245,4 , 0, 0, 1, 6, 7 }, // French/Latin/Togo
- { 37, 7, 216, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 18,7 , 25,12 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {84,78,68}, 234,2 , 8108,51 , 13,5 , 4,0 , 1857,8 , 2249,7 , 3, 0, 7, 5, 6 }, // French/Latin/Tunisia
- { 37, 7, 229, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 18,7 , 25,12 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {86,85,86}, 206,2 , 8159,51 , 13,5 , 4,0 , 1857,8 , 1708,7 , 0, 0, 1, 6, 7 }, // French/Latin/Vanuatu
- { 37, 7, 235, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {88,80,70}, 217,4 , 7514,35 , 13,5 , 4,0 , 1857,8 , 2256,16 , 0, 0, 1, 6, 7 }, // French/Latin/WallisAndFutunaIslands
- { 37, 7, 244, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {69,85,82}, 14,1 , 3057,20 , 13,5 , 4,0 , 1857,8 , 2272,16 , 2, 1, 1, 6, 7 }, // French/Latin/Saint Barthelemy
- { 37, 7, 245, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 218,8 , 218,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6401,63 , 6464,85 , 134,24 , 6401,63 , 6464,85 , 134,24 , 2967,35 , 3002,52 , 3054,14 , 2967,35 , 3002,52 , 3054,14 , 0,2 , 0,2 , 359,6 , 174,17 , 191,23 , {69,85,82}, 14,1 , 3057,20 , 13,5 , 4,0 , 1857,8 , 2288,12 , 2, 1, 1, 6, 7 }, // French/Latin/Saint Martin
- { 38, 7, 151, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 6,8 , 6,8 , 348,8 , 98,16 , 37,5 , 8,10 , 6674,48 , 6722,95 , 134,24 , 6674,48 , 6722,95 , 134,24 , 3068,21 , 3089,54 , 85,14 , 3068,21 , 3089,54 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3410,19 , 8,5 , 49,6 , 2300,10 , 2310,8 , 2, 1, 1, 6, 7 }, // Western Frisian/Latin/Netherlands
- { 39, 7, 224, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 226,10 , 226,10 , 120,10 , 566,21 , 37,5 , 8,10 , 6817,61 , 6878,142 , 7020,24 , 6817,61 , 7044,167 , 7020,24 , 3143,28 , 3171,69 , 3240,14 , 3143,28 , 3171,69 , 3240,14 , 78,1 , 74,1 , 365,6 , 5,17 , 22,23 , {71,66,80}, 125,1 , 8210,86 , 4,4 , 4,0 , 2318,8 , 2326,22 , 2, 1, 1, 6, 7 }, // Gaelic/Latin/UnitedKingdom
- { 40, 7, 197, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 236,7 , 236,7 , 27,8 , 587,27 , 37,5 , 8,10 , 7211,60 , 7271,87 , 7358,24 , 7382,60 , 7442,87 , 7529,36 , 3254,35 , 3289,49 , 3338,14 , 3352,35 , 3387,49 , 3436,21 , 64,4 , 61,4 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3865,20 , 13,5 , 4,0 , 2348,6 , 2354,6 , 2, 1, 1, 6, 7 }, // Galician/Latin/Spain
- { 41, 15, 81, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8220, 171, 187, 0,6 , 0,6 , 243,8 , 243,8 , 175,8 , 614,19 , 37,5 , 8,10 , 7565,48 , 7613,99 , 7712,24 , 7565,48 , 7613,99 , 7712,24 , 3457,28 , 3485,62 , 3547,14 , 3457,28 , 3485,62 , 3547,14 , 0,2 , 0,2 , 371,5 , 376,33 , 22,23 , {71,69,76}, 236,1 , 8296,43 , 13,5 , 4,0 , 2360,7 , 2367,10 , 2, 1, 1, 6, 7 }, // Georgian/Georgian/Georgia
- { 42, 7, 82, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 251,9 , 251,9 , 175,8 , 532,18 , 37,5 , 8,10 , 7736,48 , 7784,83 , 134,24 , 7867,59 , 7784,83 , 134,24 , 3561,21 , 3582,60 , 3642,14 , 3656,28 , 3582,60 , 3642,14 , 79,5 , 75,6 , 409,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8339,19 , 13,5 , 4,0 , 2377,7 , 2384,11 , 2, 1, 1, 6, 7 }, // German/Latin/Germany
- { 42, 7, 14, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 251,9 , 251,9 , 175,8 , 532,18 , 37,5 , 8,10 , 7926,48 , 7974,83 , 134,24 , 8057,59 , 7974,83 , 134,24 , 3561,21 , 3582,60 , 3642,14 , 3656,28 , 3582,60 , 3642,14 , 79,5 , 75,6 , 409,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8339,19 , 8,5 , 4,0 , 2395,24 , 2419,10 , 2, 1, 1, 6, 7 }, // German/Latin/Austria
- { 42, 7, 21, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 251,9 , 251,9 , 175,8 , 532,18 , 37,5 , 8,10 , 7736,48 , 7784,83 , 134,24 , 7867,59 , 7784,83 , 134,24 , 3561,21 , 3582,60 , 3642,14 , 3656,28 , 3582,60 , 3642,14 , 79,5 , 75,6 , 409,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8339,19 , 13,5 , 4,0 , 2377,7 , 2429,7 , 2, 1, 1, 6, 7 }, // German/Latin/Belgium
- { 42, 7, 106, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 251,9 , 251,9 , 175,8 , 532,18 , 37,5 , 8,10 , 7926,48 , 7974,83 , 134,24 , 8057,59 , 7974,83 , 134,24 , 3561,21 , 3582,60 , 3642,14 , 3656,28 , 3582,60 , 3642,14 , 79,5 , 75,6 , 409,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8339,19 , 13,5 , 4,0 , 2377,7 , 2436,7 , 2, 1, 1, 6, 7 }, // German/Latin/Italy
- { 42, 7, 123, 46, 8217, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 251,9 , 251,9 , 175,8 , 532,18 , 37,5 , 8,10 , 7736,48 , 7784,83 , 134,24 , 7867,59 , 7784,83 , 134,24 , 3561,21 , 3582,60 , 3642,14 , 3656,28 , 3582,60 , 3642,14 , 79,5 , 75,6 , 409,5 , 5,17 , 22,23 , {67,72,70}, 229,3 , 8358,58 , 8,5 , 4,0 , 2377,7 , 2443,13 , 2, 0, 1, 6, 7 }, // German/Latin/Liechtenstein
- { 42, 7, 125, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 251,9 , 251,9 , 175,8 , 532,18 , 37,5 , 8,10 , 7736,48 , 7784,83 , 134,24 , 7867,59 , 7784,83 , 134,24 , 3561,21 , 3582,60 , 3642,14 , 3656,28 , 3582,60 , 3642,14 , 79,5 , 75,6 , 409,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8339,19 , 13,5 , 4,0 , 2377,7 , 2456,9 , 2, 1, 1, 6, 7 }, // German/Latin/Luxembourg
- { 42, 7, 206, 46, 8217, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 251,9 , 251,9 , 175,8 , 532,18 , 37,5 , 8,10 , 7736,48 , 7784,83 , 134,24 , 7867,59 , 7784,83 , 134,24 , 3561,21 , 3582,60 , 3642,14 , 3656,28 , 3582,60 , 3642,14 , 79,5 , 75,6 , 409,5 , 5,17 , 22,23 , {67,72,70}, 229,3 , 8358,58 , 8,5 , 36,5 , 2465,21 , 2486,7 , 2, 0, 1, 6, 7 }, // German/Latin/Switzerland
- { 43, 16, 85, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 260,9 , 260,9 , 278,6 , 10,17 , 18,7 , 25,12 , 8116,50 , 8166,115 , 8281,24 , 8305,50 , 8355,115 , 8281,24 , 3684,28 , 3712,55 , 3767,14 , 3684,28 , 3712,55 , 3767,14 , 84,4 , 81,4 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8416,19 , 13,5 , 4,0 , 2493,8 , 2501,6 , 2, 1, 1, 6, 7 }, // Greek/Greek/Greece
- { 43, 16, 56, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 260,9 , 260,9 , 278,6 , 10,17 , 18,7 , 25,12 , 8116,50 , 8166,115 , 8281,24 , 8305,50 , 8355,115 , 8281,24 , 3684,28 , 3712,55 , 3767,14 , 3684,28 , 3712,55 , 3767,14 , 84,4 , 81,4 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8416,19 , 13,5 , 4,0 , 2493,8 , 2507,6 , 2, 1, 1, 6, 7 }, // Greek/Greek/Cyprus
- { 44, 7, 86, 44, 46, 59, 37, 48, 8722, 43, 101, 187, 171, 8250, 8249, 0,6 , 0,6 , 269,11 , 269,11 , 53,10 , 633,17 , 18,7 , 25,12 , 8470,48 , 8518,96 , 134,24 , 8470,48 , 8518,96 , 134,24 , 3781,28 , 3809,98 , 3907,14 , 3781,28 , 3809,98 , 3907,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {68,75,75}, 154,3 , 8435,62 , 4,4 , 55,5 , 2513,11 , 2524,16 , 2, 1, 1, 6, 7 }, // Greenlandic/Latin/Greenland
- { 45, 7, 168, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {80,89,71}, 237,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 0, 0, 7, 6, 7 }, // Guarani/Latin/Paraguay
- { 46, 17, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 280,9 , 280,9 , 278,6 , 211,18 , 281,8 , 289,13 , 8614,67 , 8681,87 , 8768,31 , 8614,67 , 8681,87 , 8768,31 , 3921,32 , 3953,53 , 4006,19 , 3921,32 , 3953,53 , 4006,19 , 0,2 , 0,2 , 414,4 , 5,17 , 22,23 , {73,78,82}, 127,1 , 8497,46 , 4,4 , 4,0 , 2540,7 , 2547,4 , 2, 1, 7, 7, 7 }, // Gujarati/Gujarati/India
- { 47, 7, 157, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 278,6 , 211,18 , 37,5 , 8,10 , 8799,48 , 8847,85 , 8932,24 , 8799,48 , 8847,85 , 8932,24 , 4025,28 , 4053,52 , 4105,14 , 4025,28 , 4053,52 , 4105,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {78,71,78}, 184,1 , 8543,12 , 8,5 , 4,0 , 2551,5 , 2556,8 , 2, 1, 1, 6, 7 }, // Hausa/Latin/Nigeria
- { 47, 1, 157, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {78,71,78}, 184,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Hausa/Arabic/Nigeria
- { 47, 7, 83, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 278,6 , 211,18 , 37,5 , 8,10 , 8799,48 , 8847,85 , 8932,24 , 8799,48 , 8847,85 , 8932,24 , 4025,28 , 4053,52 , 4105,14 , 4025,28 , 4053,52 , 4105,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {71,72,83}, 173,3 , 0,7 , 8,5 , 4,0 , 2551,5 , 2564,4 , 2, 1, 1, 6, 7 }, // Hausa/Latin/Ghana
- { 47, 7, 156, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 278,6 , 211,18 , 37,5 , 8,10 , 8799,48 , 8847,85 , 8932,24 , 8799,48 , 8847,85 , 8932,24 , 4025,28 , 4053,52 , 4105,14 , 4025,28 , 4053,52 , 4105,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {88,79,70}, 210,3 , 8555,36 , 8,5 , 4,0 , 2551,5 , 2568,5 , 0, 0, 1, 6, 7 }, // Hausa/Latin/Niger
- { 48, 18, 105, 46, 44, 59, 37, 48, 45, 43, 101, 8221, 8221, 8217, 8217, 0,6 , 0,6 , 289,6 , 289,6 , 550,8 , 650,18 , 55,4 , 59,9 , 8956,58 , 9014,72 , 158,27 , 8956,58 , 9014,72 , 158,27 , 4119,46 , 4165,65 , 4230,21 , 4119,46 , 4165,65 , 4230,21 , 88,6 , 85,5 , 418,4 , 5,17 , 22,23 , {73,76,83}, 54,1 , 8591,54 , 60,6 , 66,8 , 2573,5 , 2578,5 , 2, 1, 7, 5, 6 }, // Hebrew/Hebrew/Israel
- { 49, 13, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 295,9 , 304,8 , 278,6 , 10,17 , 18,7 , 25,12 , 9086,59 , 9145,73 , 9218,30 , 9086,59 , 9145,73 , 9218,30 , 4251,32 , 4283,53 , 4336,19 , 4251,32 , 4283,53 , 4336,19 , 94,9 , 90,7 , 422,4 , 5,17 , 22,23 , {73,78,82}, 127,1 , 8645,42 , 4,4 , 4,0 , 2583,6 , 2589,4 , 2, 1, 7, 7, 7 }, // Hindi/Devanagari/India
- { 50, 7, 98, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8221, 187, 171, 0,6 , 0,6 , 312,8 , 312,8 , 668,13 , 681,19 , 55,4 , 59,9 , 9248,64 , 9312,98 , 9410,25 , 9248,64 , 9312,98 , 9410,25 , 4355,19 , 4374,52 , 4426,17 , 4355,19 , 4374,52 , 4426,17 , 103,3 , 97,3 , 426,4 , 5,17 , 22,23 , {72,85,70}, 238,2 , 8687,46 , 13,5 , 4,0 , 2593,6 , 2599,12 , 2, 0, 1, 6, 7 }, // Hungarian/Latin/Hungary
- { 51, 7, 99, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 183,8 , 183,8 , 550,8 , 532,18 , 37,5 , 8,10 , 9435,59 , 9494,82 , 9576,24 , 9435,59 , 9494,82 , 9576,24 , 4443,35 , 4478,81 , 4559,14 , 4443,35 , 4478,81 , 4559,14 , 106,4 , 100,4 , 430,4 , 5,17 , 22,23 , {73,83,75}, 240,3 , 8733,49 , 13,5 , 4,0 , 2611,8 , 2619,6 , 0, 0, 1, 6, 7 }, // Icelandic/Latin/Iceland
- { 52, 7, 101, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 320,10 , 330,9 , 27,8 , 80,18 , 200,5 , 205,10 , 9600,48 , 9648,87 , 134,24 , 9600,48 , 9648,87 , 134,24 , 4573,28 , 4601,43 , 4644,14 , 4573,28 , 4601,43 , 4644,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {73,68,82}, 243,2 , 8782,39 , 4,4 , 4,0 , 2625,9 , 2625,9 , 0, 0, 7, 6, 7 }, // Indonesian/Latin/Indonesia
+ { 27, 7, 54, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 163,7 , 163,7 , 455,13 , 468,19 , 37,5 , 87,12 , 4748,49 , 4797,94 , 4891,39 , 4748,49 , 4930,98 , 4891,39 , 2086,28 , 2114,58 , 2172,14 , 2086,28 , 2114,58 , 2186,14 , 0,2 , 0,2 , 313,7 , 5,17 , 22,23 , {72,82,75}, 137,3 , 3200,60 , 13,5 , 4,0 , 575,8 , 583,8 , 2, 1, 1, 6, 7 }, // Croatian/Latin/Croatia
+ { 27, 7, 27, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 163,7 , 163,7 , 487,9 , 468,19 , 37,5 , 87,12 , 4748,49 , 4797,94 , 4891,39 , 4748,49 , 4930,98 , 4891,39 , 2086,28 , 2114,58 , 2186,14 , 2086,28 , 2114,58 , 2186,14 , 0,2 , 0,2 , 313,7 , 5,17 , 22,23 , {66,65,77}, 140,2 , 3260,85 , 13,5 , 4,0 , 575,8 , 591,19 , 2, 1, 1, 6, 7 }, // Croatian/Latin/BosniaAndHerzegowina
+ { 28, 7, 57, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 185,7 , 185,7 , 174,8 , 496,17 , 55,4 , 59,9 , 5028,48 , 5076,82 , 158,27 , 5028,48 , 5158,84 , 158,27 , 2200,21 , 2221,49 , 2270,14 , 2200,21 , 2221,49 , 2270,14 , 62,4 , 59,4 , 320,5 , 5,17 , 22,23 , {67,90,75}, 142,2 , 3345,68 , 13,5 , 4,0 , 610,7 , 617,5 , 2, 0, 1, 6, 7 }, // Czech/Latin/CzechRepublic
+ { 29, 7, 58, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 192,8 , 192,8 , 120,10 , 513,23 , 228,5 , 233,10 , 5242,59 , 5301,84 , 134,24 , 5242,59 , 5301,84 , 134,24 , 2284,28 , 2312,51 , 2363,14 , 2377,35 , 2312,51 , 2363,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {68,75,75}, 144,3 , 3413,42 , 13,5 , 4,0 , 622,5 , 627,7 , 2, 0, 1, 6, 7 }, // Danish/Latin/Denmark
+ { 29, 7, 86, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 192,8 , 192,8 , 120,10 , 513,23 , 228,5 , 233,10 , 5242,59 , 5301,84 , 134,24 , 5242,59 , 5301,84 , 134,24 , 2284,28 , 2312,51 , 2363,14 , 2377,35 , 2312,51 , 2363,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {68,75,75}, 144,3 , 3413,42 , 13,5 , 4,0 , 622,5 , 634,8 , 2, 0, 1, 6, 7 }, // Danish/Latin/Greenland
+ { 30, 7, 151, 44, 46, 59, 37, 48, 45, 43, 101, 8216, 8217, 8220, 8221, 0,6 , 0,6 , 6,8 , 6,8 , 357,8 , 98,16 , 37,5 , 8,10 , 5385,59 , 5444,88 , 134,24 , 5385,59 , 5444,88 , 134,24 , 2412,21 , 2433,59 , 2492,14 , 2412,21 , 2433,59 , 2492,14 , 66,4 , 63,4 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3455,19 , 13,5 , 4,0 , 642,10 , 652,9 , 2, 1, 1, 6, 7 }, // Dutch/Latin/Netherlands
+ { 30, 7, 12, 44, 46, 59, 37, 48, 45, 43, 101, 8216, 8217, 8220, 8221, 0,6 , 0,6 , 6,8 , 6,8 , 357,8 , 98,16 , 37,5 , 8,10 , 5385,59 , 5444,88 , 134,24 , 5385,59 , 5444,88 , 134,24 , 2412,21 , 2433,59 , 2492,14 , 2412,21 , 2433,59 , 2492,14 , 66,4 , 63,4 , 45,4 , 5,17 , 22,23 , {65,87,71}, 147,4 , 3474,55 , 13,5 , 4,0 , 642,10 , 661,5 , 2, 1, 1, 6, 7 }, // Dutch/Latin/Aruba
+ { 30, 7, 21, 44, 46, 59, 37, 48, 45, 43, 101, 8216, 8217, 8220, 8221, 0,6 , 0,6 , 6,8 , 6,8 , 536,7 , 98,16 , 37,5 , 8,10 , 5385,59 , 5444,88 , 134,24 , 5385,59 , 5444,88 , 134,24 , 2412,21 , 2433,59 , 2492,14 , 2412,21 , 2433,59 , 2492,14 , 66,4 , 63,4 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3455,19 , 13,5 , 4,0 , 642,10 , 666,6 , 2, 1, 1, 6, 7 }, // Dutch/Latin/Belgium
+ { 30, 7, 152, 44, 46, 59, 37, 48, 45, 43, 101, 8216, 8217, 8220, 8221, 0,6 , 0,6 , 6,8 , 6,8 , 357,8 , 98,16 , 37,5 , 8,10 , 5385,59 , 5444,88 , 134,24 , 5385,59 , 5444,88 , 134,24 , 2412,21 , 2433,59 , 2492,14 , 2412,21 , 2433,59 , 2492,14 , 66,4 , 63,4 , 45,4 , 5,17 , 22,23 , {65,78,71}, 151,4 , 3529,97 , 13,5 , 4,0 , 642,10 , 672,7 , 2, 1, 1, 6, 7 }, // Dutch/Latin/CuraSao
+ { 30, 7, 202, 44, 46, 59, 37, 48, 45, 43, 101, 8216, 8217, 8220, 8221, 0,6 , 0,6 , 6,8 , 6,8 , 357,8 , 98,16 , 37,5 , 8,10 , 5385,59 , 5444,88 , 134,24 , 5385,59 , 5444,88 , 134,24 , 2412,21 , 2433,59 , 2492,14 , 2412,21 , 2433,59 , 2492,14 , 66,4 , 63,4 , 45,4 , 5,17 , 22,23 , {83,82,68}, 6,1 , 3626,58 , 13,5 , 4,0 , 642,10 , 679,8 , 2, 1, 1, 6, 7 }, // Dutch/Latin/Suriname
+ { 30, 7, 255, 44, 46, 59, 37, 48, 45, 43, 101, 8216, 8217, 8220, 8221, 0,6 , 0,6 , 6,8 , 6,8 , 357,8 , 98,16 , 37,5 , 8,10 , 5385,59 , 5444,88 , 134,24 , 5385,59 , 5444,88 , 134,24 , 2412,21 , 2433,59 , 2492,14 , 2412,21 , 2433,59 , 2492,14 , 66,4 , 63,4 , 45,4 , 5,17 , 22,23 , {85,83,68}, 6,1 , 3684,61 , 13,5 , 4,0 , 642,10 , 687,19 , 2, 1, 1, 6, 7 }, // Dutch/Latin/Bonaire
+ { 30, 7, 256, 44, 46, 59, 37, 48, 45, 43, 101, 8216, 8217, 8220, 8221, 0,6 , 0,6 , 6,8 , 6,8 , 357,8 , 98,16 , 37,5 , 8,10 , 5385,59 , 5444,88 , 134,24 , 5385,59 , 5444,88 , 134,24 , 2412,21 , 2433,59 , 2492,14 , 2412,21 , 2433,59 , 2492,14 , 66,4 , 63,4 , 45,4 , 5,17 , 22,23 , {65,78,71}, 151,4 , 3529,97 , 13,5 , 4,0 , 642,10 , 706,12 , 2, 1, 1, 6, 7 }, // Dutch/Latin/SintMaarten
+ { 31, 7, 225, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 543,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 6,1 , 3745,35 , 4,4 , 4,0 , 718,16 , 734,13 , 2, 1, 7, 6, 7 }, // English/Latin/UnitedStates
+ { 31, 3, 225, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {85,83,68}, 155,3 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 6, 7 }, // English/Deseret/UnitedStates
+ { 31, 7, 4, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 543,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 6,1 , 3745,35 , 4,4 , 4,0 , 747,7 , 754,14 , 2, 1, 7, 6, 7 }, // English/Latin/AmericanSamoa
+ { 31, 7, 7, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {88,67,68}, 6,1 , 3780,71 , 4,4 , 4,0 , 747,7 , 768,8 , 2, 1, 1, 6, 7 }, // English/Latin/Anguilla
+ { 31, 7, 9, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {88,67,68}, 6,1 , 3780,71 , 4,4 , 4,0 , 747,7 , 776,17 , 2, 1, 7, 6, 7 }, // English/Latin/AntiguaAndBarbuda
+ { 31, 7, 13, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 210,9 , 210,9 , 287,6 , 10,17 , 18,7 , 25,12 , 5532,59 , 48,86 , 134,24 , 5532,59 , 48,86 , 134,24 , 2506,35 , 28,57 , 2541,25 , 2506,35 , 28,57 , 2541,25 , 70,2 , 67,2 , 0,5 , 5,17 , 22,23 , {65,85,68}, 6,1 , 3851,59 , 4,4 , 4,0 , 793,18 , 811,9 , 2, 1, 7, 6, 7 }, // English/Latin/Australia
+ { 31, 7, 14, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3910,20 , 8,5 , 4,0 , 747,7 , 820,7 , 2, 1, 1, 6, 7 }, // English/Latin/Austria
+ { 31, 7, 16, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {66,83,68}, 6,1 , 3930,53 , 4,4 , 4,0 , 747,7 , 827,7 , 2, 1, 7, 6, 7 }, // English/Latin/Bahamas
+ { 31, 7, 19, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {66,66,68}, 6,1 , 3983,56 , 4,4 , 4,0 , 747,7 , 834,8 , 2, 1, 1, 6, 7 }, // English/Latin/Barbados
+ { 31, 7, 21, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 27,8 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3910,20 , 13,5 , 4,0 , 747,7 , 842,7 , 2, 1, 1, 6, 7 }, // English/Latin/Belgium
+ { 31, 7, 22, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 27,8 , 80,18 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {66,90,68}, 6,1 , 4039,47 , 4,4 , 4,0 , 747,7 , 849,6 , 2, 1, 7, 6, 7 }, // English/Latin/Belize
+ { 31, 7, 24, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {66,77,68}, 6,1 , 4086,53 , 4,4 , 4,0 , 747,7 , 855,7 , 2, 1, 1, 6, 7 }, // English/Latin/Bermuda
+ { 31, 7, 28, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 27,8 , 80,18 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {66,87,80}, 158,1 , 4139,50 , 4,4 , 4,0 , 747,7 , 862,8 , 2, 1, 7, 6, 7 }, // English/Latin/Botswana
+ { 31, 7, 31, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 155,3 , 3745,35 , 4,4 , 4,0 , 747,7 , 870,30 , 2, 1, 1, 6, 7 }, // English/Latin/BritishIndianOceanTerritory
+ { 31, 7, 35, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 543,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {66,73,70}, 159,3 , 4189,53 , 4,4 , 4,0 , 747,7 , 900,7 , 0, 0, 1, 6, 7 }, // English/Latin/Burundi
+ { 31, 7, 37, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {88,65,70}, 32,4 , 4242,83 , 4,4 , 4,0 , 747,7 , 907,8 , 0, 0, 1, 6, 7 }, // English/Latin/Cameroon
+ { 31, 7, 38, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 53,10 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 5532,59 , 48,86 , 134,24 , 2506,35 , 28,57 , 85,14 , 2506,35 , 28,57 , 85,14 , 66,4 , 63,4 , 0,5 , 5,17 , 22,23 , {67,65,68}, 6,1 , 4325,53 , 4,4 , 4,0 , 915,16 , 931,6 , 2, 0, 7, 6, 7 }, // English/Latin/Canada
+ { 31, 7, 40, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {75,89,68}, 6,1 , 4378,71 , 4,4 , 4,0 , 747,7 , 937,14 , 2, 1, 1, 6, 7 }, // English/Latin/CaymanIslands
+ { 31, 7, 45, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {65,85,68}, 6,1 , 3851,59 , 4,4 , 4,0 , 747,7 , 951,16 , 2, 1, 1, 6, 7 }, // English/Latin/ChristmasIsland
+ { 31, 7, 46, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {65,85,68}, 6,1 , 3851,59 , 4,4 , 4,0 , 747,7 , 967,23 , 2, 1, 1, 6, 7 }, // English/Latin/CocosIslands
+ { 31, 7, 51, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {78,90,68}, 6,1 , 4449,62 , 4,4 , 4,0 , 747,7 , 990,12 , 2, 1, 1, 6, 7 }, // English/Latin/CookIslands
+ { 31, 7, 56, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3910,20 , 4,4 , 4,0 , 747,7 , 1002,6 , 2, 1, 1, 6, 7 }, // English/Latin/Cyprus
+ { 31, 7, 58, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 228,5 , 233,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {68,75,75}, 144,3 , 4511,44 , 13,5 , 4,0 , 747,7 , 1008,7 , 2, 0, 1, 6, 7 }, // English/Latin/Denmark
+ { 31, 7, 60, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {88,67,68}, 6,1 , 3780,71 , 4,4 , 4,0 , 747,7 , 1015,8 , 2, 1, 7, 6, 7 }, // English/Latin/Dominica
+ { 31, 7, 67, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {69,82,78}, 41,3 , 4555,50 , 4,4 , 4,0 , 747,7 , 1023,7 , 2, 1, 1, 6, 7 }, // English/Latin/Eritrea
+ { 31, 7, 70, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {70,75,80}, 115,1 , 4605,74 , 4,4 , 4,0 , 747,7 , 1030,16 , 2, 1, 1, 6, 7 }, // English/Latin/FalklandIslands
+ { 31, 7, 72, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {70,74,68}, 6,1 , 4679,47 , 4,4 , 4,0 , 747,7 , 1046,4 , 2, 1, 1, 6, 7 }, // English/Latin/Fiji
+ { 31, 7, 73, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 243,4 , 247,9 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3910,20 , 13,5 , 4,0 , 747,7 , 1050,7 , 2, 1, 1, 6, 7 }, // English/Latin/Finland
+ { 31, 7, 75, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {71,66,80}, 115,1 , 4726,32 , 4,4 , 4,0 , 747,7 , 1057,8 , 2, 1, 1, 6, 7 }, // English/Latin/Guernsey
+ { 31, 7, 80, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {71,77,68}, 162,1 , 4758,50 , 4,4 , 4,0 , 747,7 , 1065,6 , 2, 1, 1, 6, 7 }, // English/Latin/Gambia
+ { 31, 7, 82, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3910,20 , 13,5 , 4,0 , 747,7 , 1071,7 , 2, 1, 1, 6, 7 }, // English/Latin/Germany
+ { 31, 7, 83, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {71,72,83}, 163,3 , 4808,47 , 4,4 , 4,0 , 747,7 , 1078,5 , 2, 1, 1, 6, 7 }, // English/Latin/Ghana
+ { 31, 7, 84, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {71,73,80}, 115,1 , 4855,53 , 4,4 , 4,0 , 747,7 , 1083,9 , 2, 1, 1, 6, 7 }, // English/Latin/Gibraltar
+ { 31, 7, 87, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {88,67,68}, 6,1 , 3780,71 , 4,4 , 4,0 , 747,7 , 1092,7 , 2, 1, 1, 6, 7 }, // English/Latin/Grenada
+ { 31, 7, 89, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 543,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 6,1 , 3745,35 , 4,4 , 4,0 , 747,7 , 1099,4 , 2, 1, 7, 6, 7 }, // English/Latin/Guam
+ { 31, 7, 93, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {71,89,68}, 6,1 , 4908,56 , 4,4 , 4,0 , 747,7 , 1103,6 , 0, 0, 1, 6, 7 }, // English/Latin/Guyana
+ { 31, 7, 97, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 433,8 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {72,75,68}, 130,3 , 4964,56 , 4,4 , 4,0 , 747,7 , 1109,19 , 2, 1, 7, 6, 7 }, // English/Latin/HongKong
+ { 31, 7, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 27,8 , 210,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {73,78,82}, 117,1 , 5020,44 , 8,5 , 4,0 , 747,7 , 1128,5 , 2, 1, 7, 7, 7 }, // English/Latin/India
+ { 31, 7, 104, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 98,16 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 66,4 , 63,4 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3910,20 , 4,4 , 4,0 , 747,7 , 1133,7 , 2, 1, 7, 6, 7 }, // English/Latin/Ireland
+ { 31, 7, 105, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 55,4 , 59,9 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {73,76,83}, 49,1 , 5064,62 , 4,4 , 4,0 , 747,7 , 1140,6 , 2, 1, 7, 5, 6 }, // English/Latin/Israel
+ { 31, 7, 107, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 287,6 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {74,77,68}, 6,1 , 5126,53 , 4,4 , 4,0 , 747,7 , 1146,7 , 2, 1, 7, 6, 7 }, // English/Latin/Jamaica
+ { 31, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {75,69,83}, 2,3 , 5179,53 , 4,4 , 4,0 , 747,7 , 1153,5 , 2, 1, 7, 6, 7 }, // English/Latin/Kenya
+ { 31, 7, 112, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {65,85,68}, 6,1 , 3851,59 , 4,4 , 4,0 , 747,7 , 1158,8 , 2, 1, 1, 6, 7 }, // English/Latin/Kiribati
+ { 31, 7, 120, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {90,65,82}, 5,1 , 5232,61 , 4,4 , 4,0 , 747,7 , 1166,7 , 2, 1, 1, 6, 7 }, // English/Latin/Lesotho
+ { 31, 7, 121, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {76,82,68}, 6,1 , 5293,53 , 4,4 , 4,0 , 747,7 , 1173,7 , 2, 1, 1, 6, 7 }, // English/Latin/Liberia
+ { 31, 7, 126, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {77,79,80}, 133,4 , 5346,53 , 4,4 , 4,0 , 747,7 , 1180,15 , 2, 1, 7, 6, 7 }, // English/Latin/Macau
+ { 31, 7, 128, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {77,71,65}, 166,2 , 5399,54 , 4,4 , 4,0 , 747,7 , 1195,10 , 0, 0, 1, 6, 7 }, // English/Latin/Madagascar
+ { 31, 7, 129, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {77,87,75}, 168,2 , 5453,53 , 4,4 , 4,0 , 747,7 , 1205,6 , 2, 1, 1, 6, 7 }, // English/Latin/Malawi
+ { 31, 7, 130, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {77,89,82}, 170,2 , 5506,59 , 4,4 , 4,0 , 747,7 , 1211,8 , 2, 1, 1, 6, 7 }, // English/Latin/Malaysia
+ { 31, 7, 133, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3910,20 , 4,4 , 4,0 , 747,7 , 1219,5 , 2, 1, 7, 6, 7 }, // English/Latin/Malta
+ { 31, 7, 134, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 543,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 6,1 , 3745,35 , 4,4 , 4,0 , 747,7 , 1224,16 , 2, 1, 7, 6, 7 }, // English/Latin/MarshallIslands
+ { 31, 7, 137, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {77,85,82}, 172,2 , 5565,53 , 4,4 , 4,0 , 747,7 , 1240,9 , 0, 0, 1, 6, 7 }, // English/Latin/Mauritius
+ { 31, 7, 140, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 155,3 , 3745,35 , 4,4 , 4,0 , 747,7 , 1249,10 , 2, 1, 1, 6, 7 }, // English/Latin/Micronesia
+ { 31, 7, 144, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {88,67,68}, 6,1 , 3780,71 , 4,4 , 4,0 , 747,7 , 1259,10 , 2, 1, 1, 6, 7 }, // English/Latin/Montserrat
+ { 31, 7, 148, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {78,65,68}, 6,1 , 5618,53 , 4,4 , 4,0 , 747,7 , 1269,7 , 2, 1, 1, 6, 7 }, // English/Latin/Namibia
+ { 31, 7, 149, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {65,85,68}, 6,1 , 3851,59 , 4,4 , 4,0 , 747,7 , 1276,5 , 2, 1, 1, 6, 7 }, // English/Latin/Nauru
+ { 31, 7, 151, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3910,20 , 8,5 , 23,6 , 747,7 , 1281,11 , 2, 1, 1, 6, 7 }, // English/Latin/Netherlands
+ { 31, 7, 154, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 536,7 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {78,90,68}, 6,1 , 4449,62 , 4,4 , 4,0 , 747,7 , 1292,11 , 2, 1, 1, 6, 7 }, // English/Latin/NewZealand
+ { 31, 7, 157, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {78,71,78}, 174,1 , 5671,50 , 4,4 , 4,0 , 747,7 , 1303,7 , 2, 1, 1, 6, 7 }, // English/Latin/Nigeria
+ { 31, 7, 158, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {78,90,68}, 6,1 , 4449,62 , 4,4 , 4,0 , 747,7 , 1310,4 , 2, 1, 1, 6, 7 }, // English/Latin/Niue
+ { 31, 7, 159, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {65,85,68}, 6,1 , 3851,59 , 4,4 , 4,0 , 747,7 , 1314,14 , 2, 1, 1, 6, 7 }, // English/Latin/NorfolkIsland
+ { 31, 7, 160, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 543,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 6,1 , 3745,35 , 4,4 , 4,0 , 747,7 , 1328,24 , 2, 1, 1, 6, 7 }, // English/Latin/NorthernMarianaIslands
+ { 31, 7, 163, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {80,75,82}, 172,2 , 5721,53 , 4,4 , 4,0 , 747,7 , 1352,8 , 0, 0, 7, 6, 7 }, // English/Latin/Pakistan
+ { 31, 7, 164, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 155,3 , 3745,35 , 4,4 , 4,0 , 747,7 , 1360,5 , 2, 1, 1, 6, 7 }, // English/Latin/Palau
+ { 31, 7, 167, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {80,71,75}, 127,1 , 5774,73 , 4,4 , 4,0 , 747,7 , 1365,16 , 2, 1, 1, 6, 7 }, // English/Latin/PapuaNewGuinea
+ { 31, 7, 170, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {80,72,80}, 175,1 , 5847,53 , 4,4 , 4,0 , 747,7 , 1381,11 , 2, 1, 7, 6, 7 }, // English/Latin/Philippines
+ { 31, 7, 171, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {78,90,68}, 6,1 , 4449,62 , 4,4 , 4,0 , 747,7 , 1392,16 , 2, 1, 1, 6, 7 }, // English/Latin/Pitcairn
+ { 31, 7, 174, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 543,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 6,1 , 3745,35 , 4,4 , 4,0 , 747,7 , 1408,11 , 2, 1, 7, 6, 7 }, // English/Latin/PuertoRico
+ { 31, 7, 179, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {82,87,70}, 176,2 , 5900,47 , 4,4 , 4,0 , 747,7 , 1419,6 , 0, 0, 1, 6, 7 }, // English/Latin/Rwanda
+ { 31, 7, 180, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {88,67,68}, 6,1 , 3780,71 , 4,4 , 4,0 , 747,7 , 1425,17 , 2, 1, 1, 6, 7 }, // English/Latin/SaintKittsAndNevis
+ { 31, 7, 181, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {88,67,68}, 6,1 , 3780,71 , 4,4 , 4,0 , 747,7 , 1442,9 , 2, 1, 1, 6, 7 }, // English/Latin/SaintLucia
+ { 31, 7, 182, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {88,67,68}, 6,1 , 3780,71 , 4,4 , 4,0 , 747,7 , 1451,24 , 2, 1, 1, 6, 7 }, // English/Latin/SaintVincentAndTheGrenadines
+ { 31, 7, 183, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {87,83,84}, 178,3 , 5947,40 , 4,4 , 4,0 , 747,7 , 1475,5 , 2, 1, 7, 6, 7 }, // English/Latin/Samoa
+ { 31, 7, 188, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {83,67,82}, 181,2 , 5987,59 , 4,4 , 4,0 , 747,7 , 1480,10 , 2, 1, 1, 6, 7 }, // English/Latin/Seychelles
+ { 31, 7, 189, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {83,76,76}, 183,2 , 6046,68 , 4,4 , 4,0 , 747,7 , 1490,12 , 0, 0, 1, 6, 7 }, // English/Latin/SierraLeone
+ { 31, 7, 190, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 287,6 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {83,71,68}, 6,1 , 6114,56 , 4,4 , 4,0 , 747,7 , 1502,9 , 2, 1, 7, 6, 7 }, // English/Latin/Singapore
+ { 31, 7, 192, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3910,20 , 13,5 , 29,7 , 747,7 , 1511,8 , 2, 1, 1, 6, 7 }, // English/Latin/Slovenia
+ { 31, 7, 193, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {83,66,68}, 6,1 , 6170,74 , 4,4 , 4,0 , 747,7 , 1519,15 , 2, 1, 1, 6, 7 }, // English/Latin/SolomonIslands
+ { 31, 7, 195, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 549,10 , 80,18 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {90,65,82}, 5,1 , 5232,61 , 4,4 , 4,0 , 747,7 , 1534,12 , 2, 1, 7, 6, 7 }, // English/Latin/SouthAfrica
+ { 31, 7, 199, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {83,72,80}, 115,1 , 6244,56 , 4,4 , 4,0 , 747,7 , 1546,10 , 2, 1, 1, 6, 7 }, // English/Latin/SaintHelena
+ { 31, 7, 201, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {83,68,71}, 0,0 , 6300,50 , 4,4 , 4,0 , 747,7 , 1556,5 , 2, 1, 6, 5, 6 }, // English/Latin/Sudan
+ { 31, 7, 204, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {83,90,76}, 185,1 , 6350,53 , 4,4 , 4,0 , 747,7 , 1561,9 , 2, 1, 1, 6, 7 }, // English/Latin/Swaziland
+ { 31, 7, 205, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 53,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {83,69,75}, 186,2 , 6403,47 , 13,5 , 4,0 , 747,7 , 1570,6 , 2, 0, 1, 6, 7 }, // English/Latin/Sweden
+ { 31, 7, 206, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {67,72,70}, 0,0 , 6450,41 , 8,5 , 36,5 , 747,7 , 1576,11 , 2, 0, 1, 6, 7 }, // English/Latin/Switzerland
+ { 31, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {84,90,83}, 188,3 , 6491,62 , 4,4 , 4,0 , 747,7 , 1587,8 , 0, 0, 1, 6, 7 }, // English/Latin/Tanzania
+ { 31, 7, 213, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {78,90,68}, 6,1 , 4449,62 , 4,4 , 4,0 , 747,7 , 1595,7 , 2, 1, 1, 6, 7 }, // English/Latin/Tokelau
+ { 31, 7, 214, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {84,79,80}, 191,2 , 6553,49 , 4,4 , 4,0 , 747,7 , 1602,5 , 2, 1, 1, 6, 7 }, // English/Latin/Tonga
+ { 31, 7, 215, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {84,84,68}, 6,1 , 6602,80 , 4,4 , 4,0 , 747,7 , 1607,17 , 2, 1, 7, 6, 7 }, // English/Latin/TrinidadAndTobago
+ { 31, 7, 219, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 155,3 , 3745,35 , 4,4 , 4,0 , 747,7 , 1624,22 , 2, 1, 1, 6, 7 }, // English/Latin/TurksAndCaicosIslands
+ { 31, 7, 220, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {65,85,68}, 6,1 , 3851,59 , 4,4 , 4,0 , 747,7 , 1646,6 , 2, 1, 1, 6, 7 }, // English/Latin/Tuvalu
+ { 31, 7, 221, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,71,88}, 193,3 , 6682,56 , 4,4 , 4,0 , 747,7 , 1652,6 , 0, 0, 1, 6, 7 }, // English/Latin/Uganda
+ { 31, 7, 224, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 210,9 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 70,2 , 67,2 , 0,5 , 5,17 , 22,23 , {71,66,80}, 115,1 , 6738,47 , 4,4 , 4,0 , 1658,15 , 1673,14 , 2, 1, 1, 6, 7 }, // English/Latin/UnitedKingdom
+ { 31, 7, 226, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 543,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 6,1 , 3745,35 , 4,4 , 4,0 , 747,7 , 1687,21 , 2, 1, 7, 6, 7 }, // English/Latin/UnitedStatesMinorOutlyingIslands
+ { 31, 7, 229, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {86,85,86}, 196,2 , 6785,44 , 4,4 , 4,0 , 747,7 , 1708,7 , 0, 0, 1, 6, 7 }, // English/Latin/Vanuatu
+ { 31, 7, 233, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 155,3 , 3745,35 , 4,4 , 4,0 , 747,7 , 1715,22 , 2, 1, 1, 6, 7 }, // English/Latin/BritishVirginIslands
+ { 31, 7, 234, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 543,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 6,1 , 3745,35 , 4,4 , 4,0 , 747,7 , 1737,19 , 2, 1, 7, 6, 7 }, // English/Latin/UnitedStatesVirginIslands
+ { 31, 7, 239, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {90,77,87}, 127,1 , 6829,50 , 4,4 , 4,0 , 747,7 , 1756,6 , 2, 1, 1, 6, 7 }, // English/Latin/Zambia
+ { 31, 7, 240, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 433,8 , 80,18 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 155,3 , 3745,35 , 4,4 , 4,0 , 747,7 , 1762,8 , 2, 1, 7, 6, 7 }, // English/Latin/Zimbabwe
+ { 31, 7, 249, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {85,83,68}, 155,3 , 3745,35 , 4,4 , 4,0 , 747,7 , 1770,12 , 2, 1, 1, 6, 7 }, // English/Latin/DiegoGarcia
+ { 31, 7, 251, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {71,66,80}, 115,1 , 4726,32 , 4,4 , 4,0 , 747,7 , 1782,11 , 2, 1, 1, 6, 7 }, // English/Latin/IsleOfMan
+ { 31, 7, 252, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {71,66,80}, 115,1 , 4726,32 , 4,4 , 4,0 , 747,7 , 1793,6 , 2, 1, 1, 6, 7 }, // English/Latin/Jersey
+ { 31, 7, 254, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {83,83,80}, 115,1 , 6879,68 , 4,4 , 4,0 , 747,7 , 1799,11 , 2, 1, 1, 6, 7 }, // English/Latin/SouthSudan
+ { 31, 7, 256, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 200,10 , 210,9 , 120,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 134,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {65,78,71}, 151,4 , 6947,95 , 4,4 , 4,0 , 747,7 , 1810,12 , 2, 1, 1, 6, 7 }, // English/Latin/SintMaarten
+ { 33, 7, 68, 44, 160, 59, 37, 48, 8722, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 219,8 , 219,8 , 174,8 , 559,18 , 37,5 , 8,10 , 5591,59 , 5650,91 , 5741,24 , 5591,59 , 5650,91 , 5741,24 , 2566,14 , 2580,63 , 2566,14 , 2566,14 , 2580,63 , 2566,14 , 0,2 , 0,2 , 325,6 , 5,17 , 22,23 , {69,85,82}, 14,1 , 7042,20 , 13,5 , 4,0 , 1822,5 , 1827,5 , 2, 1, 1, 6, 7 }, // Estonian/Latin/Estonia
+ { 34, 7, 71, 44, 46, 59, 37, 48, 8722, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 192,8 , 192,8 , 174,8 , 559,18 , 37,5 , 8,10 , 5765,48 , 5813,83 , 134,24 , 5896,59 , 5813,83 , 134,24 , 2643,28 , 2671,74 , 2745,14 , 2759,35 , 2671,74 , 2745,14 , 0,2 , 0,2 , 331,3 , 334,17 , 22,23 , {68,75,75}, 186,2 , 7062,43 , 13,5 , 4,0 , 1832,8 , 1840,7 , 2, 0, 1, 6, 7 }, // Faroese/Latin/FaroeIslands
+ { 34, 7, 58, 44, 46, 59, 37, 48, 8722, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 192,8 , 192,8 , 174,8 , 559,18 , 37,5 , 8,10 , 5765,48 , 5813,83 , 134,24 , 5896,59 , 5813,83 , 134,24 , 2643,28 , 2671,74 , 2745,14 , 2759,35 , 2671,74 , 2745,14 , 0,2 , 0,2 , 331,3 , 334,17 , 22,23 , {68,75,75}, 144,3 , 7062,43 , 13,5 , 4,0 , 1832,8 , 627,7 , 2, 0, 1, 6, 7 }, // Faroese/Latin/Denmark
+ { 36, 7, 73, 44, 160, 59, 37, 48, 8722, 43, 101, 8221, 8221, 8217, 8217, 0,6 , 0,6 , 219,8 , 219,8 , 577,8 , 496,17 , 243,4 , 247,9 , 5955,69 , 6024,105 , 6129,24 , 6153,93 , 6246,129 , 6129,24 , 2794,21 , 2815,67 , 2882,14 , 2794,21 , 2896,81 , 2882,14 , 72,3 , 69,3 , 351,5 , 356,17 , 373,23 , {69,85,82}, 14,1 , 7105,20 , 13,5 , 4,0 , 1847,5 , 1852,5 , 2, 1, 1, 6, 7 }, // Finnish/Latin/Finland
+ { 37, 7, 74, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {69,85,82}, 14,1 , 3102,20 , 13,5 , 4,0 , 1857,8 , 1865,6 , 2, 1, 1, 6, 7 }, // French/Latin/France
+ { 37, 7, 3, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 18,7 , 25,12 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {68,90,68}, 198,2 , 7125,51 , 13,5 , 4,0 , 1857,8 , 1871,7 , 2, 1, 6, 5, 6 }, // French/Latin/Algeria
+ { 37, 7, 21, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 536,7 , 98,16 , 37,5 , 256,23 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {69,85,82}, 14,1 , 3102,20 , 13,5 , 4,0 , 1857,8 , 1878,8 , 2, 1, 1, 6, 7 }, // French/Latin/Belgium
+ { 37, 7, 23, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {88,79,70}, 200,3 , 7176,59 , 13,5 , 4,0 , 1857,8 , 1886,5 , 0, 0, 1, 6, 7 }, // French/Latin/Benin
+ { 37, 7, 34, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {88,79,70}, 200,3 , 7176,59 , 13,5 , 4,0 , 1857,8 , 1891,12 , 0, 0, 1, 6, 7 }, // French/Latin/BurkinaFaso
+ { 37, 7, 35, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {66,73,70}, 159,3 , 7235,53 , 13,5 , 4,0 , 1857,8 , 900,7 , 0, 0, 1, 6, 7 }, // French/Latin/Burundi
+ { 37, 7, 37, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 75,5 , 72,4 , 396,6 , 211,17 , 228,23 , {88,65,70}, 32,4 , 7288,56 , 13,5 , 4,0 , 1857,8 , 1903,8 , 0, 0, 1, 6, 7 }, // French/Latin/Cameroon
+ { 37, 7, 38, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8221, 8220, 0,6 , 0,6 , 227,8 , 227,8 , 585,8 , 98,16 , 279,9 , 288,24 , 6523,64 , 6438,85 , 134,24 , 6523,64 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 66,4 , 63,4 , 396,6 , 211,17 , 228,23 , {67,65,68}, 6,1 , 7344,54 , 41,6 , 4,0 , 1911,17 , 931,6 , 2, 0, 7, 6, 7 }, // French/Latin/Canada
+ { 37, 7, 41, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {88,65,70}, 32,4 , 7288,56 , 13,5 , 4,0 , 1857,8 , 1928,25 , 0, 0, 1, 6, 7 }, // French/Latin/CentralAfricanRepublic
+ { 37, 7, 42, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 18,7 , 25,12 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {88,65,70}, 32,4 , 7288,56 , 13,5 , 4,0 , 1857,8 , 1953,5 , 0, 0, 1, 6, 7 }, // French/Latin/Chad
+ { 37, 7, 48, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {75,77,70}, 36,2 , 7398,51 , 13,5 , 4,0 , 1857,8 , 1958,7 , 0, 0, 1, 6, 7 }, // French/Latin/Comoros
+ { 37, 7, 49, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {67,68,70}, 203,2 , 7449,53 , 13,5 , 4,0 , 1857,8 , 1965,14 , 2, 1, 1, 6, 7 }, // French/Latin/CongoKinshasa
+ { 37, 7, 50, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {88,65,70}, 32,4 , 7288,56 , 13,5 , 4,0 , 1857,8 , 1979,17 , 0, 0, 1, 6, 7 }, // French/Latin/CongoBrazzaville
+ { 37, 7, 53, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {88,79,70}, 200,3 , 7176,59 , 13,5 , 4,0 , 1857,8 , 1996,13 , 0, 0, 1, 6, 7 }, // French/Latin/IvoryCoast
+ { 37, 7, 59, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 18,7 , 25,12 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {68,74,70}, 38,3 , 7502,57 , 13,5 , 4,0 , 1857,8 , 2009,8 , 0, 0, 6, 6, 7 }, // French/Latin/Djibouti
+ { 37, 7, 66, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {88,65,70}, 32,4 , 7288,56 , 13,5 , 4,0 , 1857,8 , 2017,18 , 0, 0, 1, 6, 7 }, // French/Latin/EquatorialGuinea
+ { 37, 7, 76, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {69,85,82}, 14,1 , 3102,20 , 13,5 , 4,0 , 1857,8 , 2035,16 , 2, 1, 1, 6, 7 }, // French/Latin/FrenchGuiana
+ { 37, 7, 77, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {88,80,70}, 205,4 , 7559,35 , 13,5 , 4,0 , 1857,8 , 2051,19 , 0, 0, 1, 6, 7 }, // French/Latin/FrenchPolynesia
+ { 37, 7, 79, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {88,65,70}, 32,4 , 7288,56 , 13,5 , 4,0 , 1857,8 , 2070,5 , 0, 0, 1, 6, 7 }, // French/Latin/Gabon
+ { 37, 7, 88, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {69,85,82}, 14,1 , 3102,20 , 13,5 , 4,0 , 1857,8 , 2075,10 , 2, 1, 1, 6, 7 }, // French/Latin/Guadeloupe
+ { 37, 7, 91, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {71,78,70}, 209,2 , 7594,48 , 13,5 , 4,0 , 1857,8 , 2085,6 , 0, 0, 1, 6, 7 }, // French/Latin/Guinea
+ { 37, 7, 94, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {72,84,71}, 211,1 , 7642,57 , 13,5 , 4,0 , 1857,8 , 2091,5 , 2, 1, 1, 6, 7 }, // French/Latin/Haiti
+ { 37, 7, 125, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {69,85,82}, 14,1 , 3102,20 , 13,5 , 4,0 , 1857,8 , 2096,10 , 2, 1, 1, 6, 7 }, // French/Latin/Luxembourg
+ { 37, 7, 128, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {77,71,65}, 166,2 , 7699,54 , 13,5 , 4,0 , 1857,8 , 1195,10 , 0, 0, 1, 6, 7 }, // French/Latin/Madagascar
+ { 37, 7, 132, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {88,79,70}, 200,3 , 7176,59 , 13,5 , 4,0 , 1857,8 , 2106,4 , 0, 0, 1, 6, 7 }, // French/Latin/Mali
+ { 37, 7, 135, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {69,85,82}, 14,1 , 3102,20 , 13,5 , 4,0 , 1857,8 , 2110,10 , 2, 1, 1, 6, 7 }, // French/Latin/Martinique
+ { 37, 7, 136, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 18,7 , 25,12 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {77,82,85}, 212,2 , 7753,66 , 13,5 , 4,0 , 1857,8 , 2120,10 , 2, 1, 1, 6, 7 }, // French/Latin/Mauritania
+ { 37, 7, 137, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {77,85,82}, 172,2 , 7819,63 , 13,5 , 4,0 , 1857,8 , 2130,7 , 0, 0, 1, 6, 7 }, // French/Latin/Mauritius
+ { 37, 7, 138, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {69,85,82}, 14,1 , 3102,20 , 13,5 , 4,0 , 1857,8 , 2137,7 , 2, 1, 1, 6, 7 }, // French/Latin/Mayotte
+ { 37, 7, 142, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {69,85,82}, 14,1 , 3102,20 , 13,5 , 4,0 , 1857,8 , 2144,6 , 2, 1, 1, 6, 7 }, // French/Latin/Monaco
+ { 37, 7, 145, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6587,61 , 6438,85 , 134,24 , 6587,61 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 66,4 , 63,4 , 396,6 , 211,17 , 228,23 , {77,65,68}, 214,3 , 7882,54 , 13,5 , 4,0 , 1857,8 , 2150,5 , 2, 1, 6, 5, 6 }, // French/Latin/Morocco
+ { 37, 7, 153, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {88,80,70}, 205,4 , 7559,35 , 13,5 , 4,0 , 1857,8 , 2155,18 , 0, 0, 1, 6, 7 }, // French/Latin/NewCaledonia
+ { 37, 7, 156, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {88,79,70}, 200,3 , 7176,59 , 13,5 , 4,0 , 1857,8 , 2173,5 , 0, 0, 1, 6, 7 }, // French/Latin/Niger
+ { 37, 7, 176, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {69,85,82}, 14,1 , 3102,20 , 13,5 , 4,0 , 1857,8 , 2178,10 , 2, 1, 1, 6, 7 }, // French/Latin/Reunion
+ { 37, 7, 179, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {82,87,70}, 176,2 , 7936,50 , 13,5 , 4,0 , 1857,8 , 1419,6 , 0, 0, 1, 6, 7 }, // French/Latin/Rwanda
+ { 37, 7, 187, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {88,79,70}, 200,3 , 7176,59 , 13,5 , 4,0 , 1857,8 , 2188,7 , 0, 0, 1, 6, 7 }, // French/Latin/Senegal
+ { 37, 7, 188, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {83,67,82}, 181,2 , 7986,71 , 13,5 , 4,0 , 1857,8 , 1480,10 , 2, 1, 1, 6, 7 }, // French/Latin/Seychelles
+ { 37, 7, 200, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {69,85,82}, 14,1 , 3102,20 , 13,5 , 4,0 , 1857,8 , 2195,24 , 2, 1, 1, 6, 7 }, // French/Latin/SaintPierreAndMiquelon
+ { 37, 7, 206, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8249, 8250, 0,6 , 0,6 , 227,8 , 227,8 , 174,8 , 10,17 , 37,5 , 312,14 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {67,72,70}, 217,3 , 8057,45 , 13,5 , 47,6 , 2219,15 , 2234,6 , 2, 0, 1, 6, 7 }, // French/Latin/Switzerland
+ { 37, 7, 207, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 18,7 , 25,12 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {83,89,80}, 220,2 , 8102,51 , 13,5 , 4,0 , 1857,8 , 2240,5 , 0, 0, 6, 5, 6 }, // French/Latin/Syria
+ { 37, 7, 212, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {88,79,70}, 200,3 , 7176,59 , 13,5 , 4,0 , 1857,8 , 2245,4 , 0, 0, 1, 6, 7 }, // French/Latin/Togo
+ { 37, 7, 216, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 18,7 , 25,12 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {84,78,68}, 222,2 , 8153,51 , 13,5 , 4,0 , 1857,8 , 2249,7 , 3, 0, 7, 5, 6 }, // French/Latin/Tunisia
+ { 37, 7, 229, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 18,7 , 25,12 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {86,85,86}, 196,2 , 8204,51 , 13,5 , 4,0 , 1857,8 , 1708,7 , 0, 0, 1, 6, 7 }, // French/Latin/Vanuatu
+ { 37, 7, 235, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {88,80,70}, 205,4 , 7559,35 , 13,5 , 4,0 , 1857,8 , 2256,16 , 0, 0, 1, 6, 7 }, // French/Latin/WallisAndFutunaIslands
+ { 37, 7, 244, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {69,85,82}, 14,1 , 3102,20 , 13,5 , 4,0 , 1857,8 , 2272,16 , 2, 1, 1, 6, 7 }, // French/Latin/Saint Barthelemy
+ { 37, 7, 245, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 227,8 , 227,8 , 120,10 , 98,16 , 37,5 , 8,10 , 6375,63 , 6438,85 , 134,24 , 6375,63 , 6438,85 , 134,24 , 2977,35 , 3012,52 , 3064,14 , 2977,35 , 3012,52 , 3064,14 , 0,2 , 0,2 , 396,6 , 211,17 , 228,23 , {69,85,82}, 14,1 , 3102,20 , 13,5 , 4,0 , 1857,8 , 2288,12 , 2, 1, 1, 6, 7 }, // French/Latin/Saint Martin
+ { 38, 7, 151, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 6,8 , 6,8 , 357,8 , 98,16 , 37,5 , 8,10 , 6648,48 , 6696,95 , 134,24 , 6648,48 , 6696,95 , 134,24 , 3078,21 , 3099,54 , 85,14 , 3078,21 , 3099,54 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3455,19 , 8,5 , 53,6 , 2300,5 , 2305,8 , 2, 1, 1, 6, 7 }, // Western Frisian/Latin/Netherlands
+ { 39, 7, 224, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 235,10 , 235,10 , 120,10 , 593,21 , 37,5 , 8,10 , 6791,61 , 6852,142 , 6994,24 , 6791,61 , 7018,167 , 6994,24 , 3153,28 , 3181,69 , 3250,14 , 3153,28 , 3181,69 , 3250,14 , 80,1 , 76,1 , 402,6 , 5,17 , 22,23 , {71,66,80}, 115,1 , 8255,86 , 4,4 , 4,0 , 2313,8 , 2321,22 , 2, 1, 1, 6, 7 }, // Gaelic/Latin/UnitedKingdom
+ { 40, 7, 197, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 245,7 , 245,7 , 27,8 , 614,27 , 37,5 , 8,10 , 7185,60 , 7245,87 , 7332,24 , 7356,60 , 7416,87 , 7503,36 , 3264,35 , 3299,49 , 3348,14 , 3362,35 , 3397,49 , 3446,21 , 66,4 , 63,4 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3910,20 , 13,5 , 4,0 , 2343,6 , 2349,6 , 2, 1, 1, 6, 7 }, // Galician/Latin/Spain
+ { 41, 15, 81, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8220, 171, 187, 0,6 , 0,6 , 252,8 , 252,8 , 174,8 , 641,19 , 37,5 , 8,10 , 7539,48 , 7587,99 , 7686,24 , 7539,48 , 7587,99 , 7686,24 , 3467,28 , 3495,62 , 3557,14 , 3467,28 , 3495,62 , 3557,14 , 0,2 , 0,2 , 408,5 , 413,33 , 22,23 , {71,69,76}, 224,1 , 8341,43 , 13,5 , 4,0 , 2355,7 , 2362,10 , 2, 1, 1, 6, 7 }, // Georgian/Georgian/Georgia
+ { 42, 7, 82, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 260,9 , 260,9 , 174,8 , 559,18 , 37,5 , 8,10 , 7710,48 , 7758,83 , 134,24 , 7841,59 , 7758,83 , 134,24 , 3571,21 , 3592,60 , 3652,14 , 3666,28 , 3592,60 , 3652,14 , 0,2 , 0,2 , 446,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8384,19 , 13,5 , 4,0 , 2372,7 , 2379,11 , 2, 1, 1, 6, 7 }, // German/Latin/Germany
+ { 42, 7, 14, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 260,9 , 260,9 , 174,8 , 559,18 , 37,5 , 8,10 , 7900,48 , 7948,83 , 134,24 , 8031,59 , 7948,83 , 134,24 , 3571,21 , 3592,60 , 3652,14 , 3666,28 , 3592,60 , 3652,14 , 0,2 , 0,2 , 446,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8384,19 , 8,5 , 4,0 , 2390,24 , 2414,10 , 2, 1, 1, 6, 7 }, // German/Latin/Austria
+ { 42, 7, 21, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 260,9 , 260,9 , 174,8 , 559,18 , 37,5 , 8,10 , 7710,48 , 7758,83 , 134,24 , 7841,59 , 7758,83 , 134,24 , 3571,21 , 3592,60 , 3652,14 , 3666,28 , 3592,60 , 3652,14 , 0,2 , 0,2 , 446,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8384,19 , 13,5 , 4,0 , 2372,7 , 2424,7 , 2, 1, 1, 6, 7 }, // German/Latin/Belgium
+ { 42, 7, 106, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 260,9 , 260,9 , 174,8 , 559,18 , 37,5 , 8,10 , 7900,48 , 7948,83 , 134,24 , 8031,59 , 7948,83 , 134,24 , 3571,21 , 3592,60 , 3652,14 , 3666,28 , 3592,60 , 3652,14 , 0,2 , 0,2 , 446,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8384,19 , 13,5 , 4,0 , 2372,7 , 2431,7 , 2, 1, 1, 6, 7 }, // German/Latin/Italy
+ { 42, 7, 123, 46, 8217, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 260,9 , 260,9 , 174,8 , 559,18 , 37,5 , 8,10 , 7710,48 , 7758,83 , 134,24 , 7841,59 , 7758,83 , 134,24 , 3571,21 , 3592,60 , 3652,14 , 3666,28 , 3592,60 , 3652,14 , 0,2 , 0,2 , 446,5 , 5,17 , 22,23 , {67,72,70}, 217,3 , 8403,58 , 8,5 , 4,0 , 2372,7 , 2438,13 , 2, 0, 1, 6, 7 }, // German/Latin/Liechtenstein
+ { 42, 7, 125, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 260,9 , 260,9 , 174,8 , 559,18 , 37,5 , 8,10 , 7710,48 , 7758,83 , 134,24 , 7841,59 , 7758,83 , 134,24 , 3571,21 , 3592,60 , 3652,14 , 3666,28 , 3592,60 , 3652,14 , 0,2 , 0,2 , 446,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8384,19 , 13,5 , 4,0 , 2372,7 , 2451,9 , 2, 1, 1, 6, 7 }, // German/Latin/Luxembourg
+ { 42, 7, 206, 46, 8217, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 260,9 , 260,9 , 174,8 , 559,18 , 37,5 , 8,10 , 7710,48 , 7758,83 , 134,24 , 7841,59 , 7758,83 , 134,24 , 3571,21 , 3592,60 , 3652,14 , 3666,28 , 3592,60 , 3652,14 , 0,2 , 0,2 , 446,5 , 5,17 , 22,23 , {67,72,70}, 217,3 , 8403,58 , 8,5 , 36,5 , 2460,21 , 2481,7 , 2, 0, 1, 6, 7 }, // German/Latin/Switzerland
+ { 43, 16, 85, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 269,9 , 269,9 , 287,6 , 10,17 , 18,7 , 25,12 , 8090,50 , 8140,115 , 8255,24 , 8279,50 , 8329,115 , 8255,24 , 3694,28 , 3722,55 , 3777,14 , 3694,28 , 3722,55 , 3777,14 , 81,4 , 77,4 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8461,19 , 13,5 , 4,0 , 2488,8 , 2496,6 , 2, 1, 1, 6, 7 }, // Greek/Greek/Greece
+ { 43, 16, 56, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 269,9 , 269,9 , 287,6 , 10,17 , 18,7 , 25,12 , 8090,50 , 8140,115 , 8255,24 , 8279,50 , 8329,115 , 8255,24 , 3694,28 , 3722,55 , 3777,14 , 3694,28 , 3722,55 , 3777,14 , 81,4 , 77,4 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8461,19 , 13,5 , 4,0 , 2488,8 , 2502,6 , 2, 1, 1, 6, 7 }, // Greek/Greek/Cyprus
+ { 44, 7, 86, 44, 46, 59, 37, 48, 8722, 43, 101, 187, 171, 8250, 8249, 0,6 , 0,6 , 278,11 , 278,11 , 53,10 , 660,17 , 228,5 , 233,10 , 8444,48 , 8492,96 , 134,24 , 8444,48 , 8492,96 , 134,24 , 3791,28 , 3819,98 , 3917,14 , 3791,28 , 3819,98 , 3917,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {68,75,75}, 144,3 , 8480,62 , 4,4 , 59,5 , 2508,11 , 2519,16 , 2, 0, 1, 6, 7 }, // Greenlandic/Latin/Greenland
+ { 45, 7, 168, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {80,89,71}, 225,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 0, 0, 7, 6, 7 }, // Guarani/Latin/Paraguay
+ { 46, 17, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 289,9 , 289,9 , 287,6 , 210,18 , 326,8 , 334,13 , 8588,67 , 8655,87 , 8742,31 , 8588,67 , 8655,87 , 8742,31 , 3931,32 , 3963,53 , 4016,19 , 3931,32 , 3963,53 , 4016,19 , 0,2 , 0,2 , 451,4 , 5,17 , 22,23 , {73,78,82}, 117,1 , 8542,46 , 4,4 , 4,0 , 2535,7 , 2542,4 , 2, 1, 7, 7, 7 }, // Gujarati/Gujarati/India
+ { 47, 7, 157, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 287,6 , 210,18 , 37,5 , 8,10 , 8773,48 , 8821,85 , 8906,24 , 8773,48 , 8821,85 , 8906,24 , 4035,28 , 4063,52 , 4115,14 , 4035,28 , 4063,52 , 4115,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {78,71,78}, 174,1 , 8588,12 , 8,5 , 4,0 , 2546,5 , 2551,8 , 2, 1, 1, 6, 7 }, // Hausa/Latin/Nigeria
+ { 47, 1, 157, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {78,71,78}, 174,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Hausa/Arabic/Nigeria
+ { 47, 7, 83, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 287,6 , 210,18 , 37,5 , 8,10 , 8773,48 , 8821,85 , 8906,24 , 8773,48 , 8821,85 , 8906,24 , 4035,28 , 4063,52 , 4115,14 , 4035,28 , 4063,52 , 4115,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {71,72,83}, 163,3 , 0,7 , 8,5 , 4,0 , 2546,5 , 2559,4 , 2, 1, 1, 6, 7 }, // Hausa/Latin/Ghana
+ { 47, 7, 156, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 287,6 , 210,18 , 37,5 , 8,10 , 8773,48 , 8821,85 , 8906,24 , 8773,48 , 8821,85 , 8906,24 , 4035,28 , 4063,52 , 4115,14 , 4035,28 , 4063,52 , 4115,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {88,79,70}, 200,3 , 8600,36 , 8,5 , 4,0 , 2546,5 , 2563,5 , 0, 0, 1, 6, 7 }, // Hausa/Latin/Niger
+ { 48, 18, 105, 46, 44, 59, 37, 48, 45, 43, 101, 8221, 8221, 8217, 8217, 0,6 , 0,6 , 298,6 , 298,6 , 577,8 , 677,18 , 55,4 , 59,9 , 8930,58 , 8988,72 , 158,27 , 8930,58 , 8988,72 , 158,27 , 4129,46 , 4175,65 , 4240,21 , 4129,46 , 4175,65 , 4240,21 , 85,6 , 81,5 , 455,4 , 5,17 , 22,23 , {73,76,83}, 49,1 , 8636,54 , 64,6 , 70,8 , 2568,5 , 2573,5 , 2, 1, 7, 5, 6 }, // Hebrew/Hebrew/Israel
+ { 49, 13, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 304,9 , 313,8 , 287,6 , 10,17 , 18,7 , 25,12 , 9060,59 , 9119,73 , 9192,30 , 9060,59 , 9119,73 , 9192,30 , 4261,32 , 4293,53 , 4346,19 , 4261,32 , 4293,53 , 4346,19 , 91,9 , 86,7 , 459,4 , 5,17 , 22,23 , {73,78,82}, 117,1 , 8690,42 , 4,4 , 4,0 , 2578,6 , 2584,4 , 2, 1, 7, 7, 7 }, // Hindi/Devanagari/India
+ { 50, 7, 98, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8221, 187, 171, 0,6 , 0,6 , 321,8 , 321,8 , 695,13 , 708,19 , 55,4 , 59,9 , 9222,64 , 9286,98 , 9384,25 , 9222,64 , 9286,98 , 9384,25 , 4365,19 , 4384,52 , 4436,17 , 4365,19 , 4384,52 , 4436,17 , 100,3 , 93,3 , 463,4 , 5,17 , 22,23 , {72,85,70}, 226,2 , 8732,46 , 13,5 , 4,0 , 2588,6 , 2594,12 , 2, 0, 1, 6, 7 }, // Hungarian/Latin/Hungary
+ { 51, 7, 99, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 192,8 , 192,8 , 577,8 , 559,18 , 37,5 , 8,10 , 9409,59 , 9468,82 , 9550,24 , 9409,59 , 9468,82 , 9550,24 , 4453,35 , 4488,81 , 4569,14 , 4453,35 , 4488,81 , 4569,14 , 103,4 , 96,4 , 467,4 , 5,17 , 22,23 , {73,83,75}, 228,3 , 8778,49 , 13,5 , 4,0 , 2606,8 , 2614,6 , 0, 0, 1, 6, 7 }, // Icelandic/Latin/Iceland
+ { 52, 7, 101, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 329,10 , 339,9 , 27,8 , 80,18 , 228,5 , 233,10 , 9574,48 , 9622,87 , 134,24 , 9574,48 , 9622,87 , 134,24 , 4583,28 , 4611,43 , 4654,14 , 4583,28 , 4611,43 , 4654,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {73,68,82}, 231,2 , 8827,39 , 4,4 , 4,0 , 2620,9 , 2620,9 , 0, 0, 7, 6, 7 }, // Indonesian/Latin/Indonesia
{ 53, 7, 74, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Interlingua/Latin/France
- { 55, 44, 38, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {67,65,68}, 245,3 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 0, 7, 6, 7 }, // Inuktitut/CanadianAboriginal/Canada
- { 55, 7, 38, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {67,65,68}, 245,3 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 0, 7, 6, 7 }, // Inuktitut/Latin/Canada
- { 57, 7, 104, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 339,11 , 226,10 , 120,10 , 98,16 , 37,5 , 8,10 , 9735,62 , 9797,107 , 9904,24 , 9735,62 , 9797,107 , 9904,24 , 4658,37 , 4695,75 , 4770,14 , 4658,37 , 4695,75 , 4770,14 , 64,4 , 61,4 , 434,6 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8821,31 , 4,4 , 4,0 , 2634,7 , 2641,4 , 2, 1, 7, 6, 7 }, // Irish/Latin/Ireland
- { 58, 7, 106, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 236,7 , 236,7 , 27,8 , 98,16 , 37,5 , 8,10 , 9928,48 , 9976,94 , 10070,24 , 9928,48 , 9976,94 , 10070,24 , 4784,28 , 4812,57 , 4869,14 , 4784,28 , 4812,57 , 4869,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8852,19 , 13,5 , 4,0 , 2645,8 , 2653,6 , 2, 1, 1, 6, 7 }, // Italian/Latin/Italy
- { 58, 7, 184, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 236,7 , 236,7 , 27,8 , 98,16 , 37,5 , 8,10 , 9928,48 , 9976,94 , 10070,24 , 9928,48 , 9976,94 , 10070,24 , 4784,28 , 4812,57 , 4869,14 , 4784,28 , 4812,57 , 4869,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8852,19 , 13,5 , 4,0 , 2645,8 , 2659,10 , 2, 1, 1, 6, 7 }, // Italian/Latin/SanMarino
- { 58, 7, 206, 46, 8217, 59, 37, 48, 45, 43, 101, 171, 187, 8249, 8250, 0,6 , 0,6 , 236,7 , 236,7 , 175,8 , 10,17 , 37,5 , 8,10 , 9928,48 , 9976,94 , 10070,24 , 9928,48 , 9976,94 , 10070,24 , 4784,28 , 4812,57 , 4869,14 , 4784,28 , 4812,57 , 4869,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {67,72,70}, 229,3 , 8871,53 , 8,5 , 36,5 , 2645,8 , 2669,8 , 2, 0, 1, 6, 7 }, // Italian/Latin/Switzerland
- { 58, 7, 230, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 236,7 , 236,7 , 27,8 , 98,16 , 37,5 , 8,10 , 9928,48 , 9976,94 , 10070,24 , 9928,48 , 9976,94 , 10070,24 , 4784,28 , 4812,57 , 4869,14 , 4784,28 , 4812,57 , 4869,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8852,19 , 13,5 , 4,0 , 2645,8 , 2677,18 , 2, 1, 1, 6, 7 }, // Italian/Latin/VaticanCityState
- { 59, 19, 108, 46, 44, 59, 37, 48, 45, 43, 101, 12300, 12301, 12302, 12303, 161,5 , 161,5 , 161,5 , 161,5 , 522,10 , 393,13 , 55,4 , 302,10 , 4697,39 , 4697,39 , 158,27 , 4697,39 , 4697,39 , 158,27 , 4883,14 , 4897,28 , 4883,14 , 4883,14 , 4897,28 , 4883,14 , 110,2 , 104,2 , 440,3 , 297,17 , 22,23 , {74,80,89}, 139,1 , 8924,11 , 4,4 , 4,0 , 2695,3 , 2698,2 , 0, 0, 7, 6, 7 }, // Japanese/Japanese/Japan
- { 60, 7, 101, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {73,68,82}, 243,2 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 0, 0, 7, 6, 7 }, // Javanese/Latin/Indonesia
- { 61, 21, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 350,12 , 362,11 , 278,6 , 35,18 , 281,8 , 289,13 , 10094,63 , 10157,87 , 10244,31 , 10094,63 , 10157,87 , 10244,31 , 4925,33 , 4958,54 , 5012,20 , 4925,33 , 4958,54 , 5012,20 , 112,9 , 106,7 , 443,8 , 451,33 , 22,23 , {73,78,82}, 127,1 , 8935,49 , 4,4 , 4,0 , 2700,5 , 2705,4 , 2, 1, 7, 7, 7 }, // Kannada/Kannada/India
- { 62, 1, 100, 1643, 1644, 1563, 1642, 1776, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 516,6 , 35,18 , 18,7 , 25,12 , 10275,72 , 10275,72 , 10347,24 , 10275,72 , 10275,72 , 10347,24 , 5032,54 , 5086,56 , 5142,14 , 5032,54 , 5086,56 , 5142,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {73,78,82}, 127,1 , 8984,23 , 8,5 , 4,0 , 2709,5 , 2714,10 , 2, 1, 7, 7, 7 }, // Kashmiri/Arabic/India
- { 63, 2, 110, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 0,6 , 373,10 , 175,8 , 700,22 , 37,5 , 8,10 , 10371,60 , 10431,83 , 10514,24 , 10538,60 , 10598,83 , 10514,24 , 5156,21 , 5177,56 , 5233,14 , 5156,21 , 5247,56 , 5233,14 , 0,2 , 0,2 , 484,4 , 488,17 , 505,23 , {75,90,84}, 248,1 , 9007,58 , 13,5 , 4,0 , 2724,10 , 2734,9 , 2, 1, 1, 6, 7 }, // Kazakh/Cyrillic/Kazakhstan
- { 64, 7, 179, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 10681,60 , 10741,101 , 158,27 , 10681,60 , 10741,101 , 158,27 , 5303,35 , 5338,84 , 85,14 , 5303,35 , 5338,84 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {82,87,70}, 186,2 , 0,7 , 8,5 , 4,0 , 2743,11 , 1419,6 , 0, 0, 1, 6, 7 }, // Kinyarwanda/Latin/Rwanda
- { 65, 2, 116, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 383,10 , 383,10 , 278,6 , 722,23 , 37,5 , 8,10 , 10842,48 , 10890,80 , 10970,24 , 10994,59 , 11053,80 , 10970,24 , 5422,38 , 5460,57 , 5517,14 , 5422,38 , 5460,57 , 5517,14 , 121,5 , 113,14 , 484,4 , 528,17 , 22,23 , {75,71,83}, 249,3 , 9065,52 , 13,5 , 4,0 , 2754,8 , 2762,10 , 2, 1, 1, 6, 7 }, // Kirghiz/Cyrillic/Kyrgyzstan
- { 66, 22, 114, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 393,7 , 393,7 , 745,9 , 754,16 , 312,7 , 319,13 , 11133,39 , 11133,39 , 11133,39 , 11133,39 , 11133,39 , 11133,39 , 5531,14 , 5545,28 , 5531,14 , 5531,14 , 5545,28 , 5531,14 , 126,2 , 127,2 , 545,3 , 5,17 , 22,23 , {75,82,87}, 252,1 , 9117,19 , 4,4 , 4,0 , 2772,3 , 2775,4 , 0, 0, 7, 6, 7 }, // Korean/Korean/SouthKorea
- { 66, 22, 113, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 393,7 , 393,7 , 745,9 , 754,16 , 312,7 , 319,13 , 11133,39 , 11133,39 , 11133,39 , 11133,39 , 11133,39 , 11133,39 , 5531,14 , 5545,28 , 5531,14 , 5531,14 , 5545,28 , 5531,14 , 126,2 , 127,2 , 545,3 , 5,17 , 22,23 , {75,80,87}, 253,3 , 9136,39 , 4,4 , 4,0 , 2772,3 , 2779,11 , 0, 0, 1, 6, 7 }, // Korean/Korean/NorthKorea
- { 67, 7, 217, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {84,82,89}, 256,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Kurdish/Latin/Turkey
- { 68, 7, 35, 44, 46, 59, 37, 48, 45, 43, 101, 8221, 8221, 8217, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 37,5 , 8,10 , 11172,60 , 11232,106 , 158,27 , 11172,60 , 11232,106 , 158,27 , 5573,34 , 5607,89 , 85,14 , 5573,34 , 5607,89 , 85,14 , 128,5 , 129,5 , 45,4 , 5,17 , 22,23 , {66,73,70}, 169,3 , 9175,27 , 0,4 , 4,0 , 2790,8 , 2798,8 , 0, 0, 1, 6, 7 }, // Rundi/Latin/Burundi
- { 69, 23, 117, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 400,9 , 406,8 , 770,19 , 55,4 , 332,24 , 11338,61 , 11399,75 , 158,27 , 11338,61 , 11399,75 , 158,27 , 5696,36 , 5732,57 , 5789,17 , 5696,36 , 5732,57 , 5789,17 , 133,8 , 134,8 , 45,4 , 5,17 , 22,23 , {76,65,75}, 257,1 , 9202,21 , 4,4 , 36,5 , 2806,3 , 2806,3 , 0, 0, 7, 6, 7 }, // Lao/Lao/Laos
- { 71, 7, 118, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 409,8 , 409,8 , 175,8 , 789,26 , 37,5 , 8,10 , 11474,65 , 11539,101 , 134,24 , 11474,65 , 11539,101 , 134,24 , 5806,51 , 5857,72 , 5929,14 , 5943,51 , 5994,72 , 5929,14 , 141,14 , 142,11 , 548,5 , 297,17 , 22,23 , {69,85,82}, 14,1 , 9223,23 , 13,5 , 4,0 , 2809,8 , 2817,7 , 2, 1, 1, 6, 7 }, // Latvian/Latin/Latvia
- { 72, 7, 49, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 417,9 , 417,9 , 406,8 , 98,16 , 37,5 , 8,10 , 11640,48 , 11688,203 , 11891,24 , 11640,48 , 11688,203 , 11891,24 , 6066,28 , 6094,100 , 6194,14 , 6066,28 , 6094,100 , 6194,14 , 155,8 , 153,6 , 45,4 , 5,17 , 22,23 , {67,68,70}, 215,2 , 9246,23 , 13,5 , 4,0 , 2824,7 , 2831,30 , 2, 1, 1, 6, 7 }, // Lingala/Latin/CongoKinshasa
- { 72, 7, 6, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 417,9 , 417,9 , 406,8 , 98,16 , 37,5 , 8,10 , 11640,48 , 11688,203 , 11891,24 , 11640,48 , 11688,203 , 11891,24 , 6066,28 , 6094,100 , 6194,14 , 6066,28 , 6094,100 , 6194,14 , 155,8 , 153,6 , 45,4 , 5,17 , 22,23 , {65,79,65}, 258,2 , 9269,23 , 13,5 , 4,0 , 2824,7 , 2861,6 , 2, 1, 1, 6, 7 }, // Lingala/Latin/Angola
- { 72, 7, 41, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 417,9 , 417,9 , 406,8 , 98,16 , 37,5 , 8,10 , 11640,48 , 11688,203 , 11891,24 , 11640,48 , 11688,203 , 11891,24 , 6066,28 , 6094,100 , 6194,14 , 6066,28 , 6094,100 , 6194,14 , 155,8 , 153,6 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 9292,23 , 13,5 , 4,0 , 2824,7 , 2867,26 , 0, 0, 1, 6, 7 }, // Lingala/Latin/CentralAfricanRepublic
- { 72, 7, 50, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 417,9 , 417,9 , 406,8 , 98,16 , 37,5 , 8,10 , 11640,48 , 11688,203 , 11891,24 , 11640,48 , 11688,203 , 11891,24 , 6066,28 , 6094,100 , 6194,14 , 6066,28 , 6094,100 , 6194,14 , 155,8 , 153,6 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 9292,23 , 13,5 , 4,0 , 2824,7 , 2893,5 , 0, 0, 1, 6, 7 }, // Lingala/Latin/CongoBrazzaville
- { 73, 7, 124, 44, 160, 59, 37, 48, 8722, 43, 101, 8222, 8220, 8222, 8220, 0,6 , 0,6 , 426,8 , 426,8 , 53,10 , 815,27 , 37,5 , 8,10 , 11915,70 , 11985,96 , 12081,24 , 11915,70 , 12105,98 , 12081,24 , 6208,21 , 6229,89 , 6318,14 , 6208,21 , 6229,89 , 6318,14 , 163,9 , 159,6 , 553,6 , 5,17 , 22,23 , {69,85,82}, 14,1 , 9315,30 , 13,5 , 4,0 , 2898,8 , 2906,7 , 2, 1, 1, 6, 7 }, // Lithuanian/Latin/Lithuania
- { 74, 2, 127, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 107,7 , 107,7 , 842,7 , 80,18 , 37,5 , 8,10 , 12203,61 , 12264,85 , 12349,24 , 12203,61 , 12264,85 , 12349,24 , 6332,35 , 6367,54 , 1649,14 , 6421,34 , 6367,54 , 1649,14 , 172,10 , 165,8 , 559,5 , 5,17 , 22,23 , {77,75,68}, 260,3 , 9345,56 , 13,5 , 4,0 , 2913,10 , 2923,10 , 2, 1, 1, 6, 7 }, // Macedonian/Cyrillic/Macedonia
- { 75, 7, 128, 46, 44, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 98,16 , 37,5 , 8,10 , 12373,48 , 12421,92 , 134,24 , 12373,48 , 12421,92 , 134,24 , 6455,34 , 6489,60 , 6549,14 , 6455,34 , 6489,60 , 6549,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {77,71,65}, 176,2 , 9401,13 , 8,5 , 4,0 , 2933,8 , 2941,12 , 0, 0, 1, 6, 7 }, // Malagasy/Latin/Madagascar
- { 76, 7, 130, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 330,9 , 330,9 , 509,7 , 10,17 , 18,7 , 25,12 , 12513,48 , 12561,82 , 12643,24 , 12513,48 , 12561,82 , 12643,24 , 6563,28 , 6591,43 , 6634,14 , 6563,28 , 6591,43 , 6634,14 , 182,2 , 173,3 , 564,4 , 5,17 , 22,23 , {77,89,82}, 180,2 , 9414,39 , 4,4 , 4,0 , 2953,13 , 1211,8 , 2, 1, 1, 6, 7 }, // Malay/Latin/Malaysia
- { 76, 1, 130, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {77,89,82}, 180,2 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Malay/Arabic/Malaysia
- { 76, 7, 32, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 330,9 , 330,9 , 509,7 , 849,12 , 18,7 , 25,12 , 12513,48 , 12561,82 , 12643,24 , 12513,48 , 12561,82 , 12643,24 , 6563,28 , 6591,43 , 6634,14 , 6563,28 , 6591,43 , 6634,14 , 182,2 , 173,3 , 564,4 , 5,17 , 22,23 , {66,78,68}, 6,1 , 9453,31 , 8,5 , 4,0 , 2953,13 , 2966,6 , 2, 1, 1, 6, 7 }, // Malay/Latin/Brunei
- { 76, 7, 190, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 330,9 , 330,9 , 509,7 , 10,17 , 18,7 , 25,12 , 12513,48 , 12561,82 , 12643,24 , 12513,48 , 12561,82 , 12643,24 , 6563,28 , 6591,43 , 6634,14 , 6563,28 , 6591,43 , 6634,14 , 182,2 , 173,3 , 564,4 , 5,17 , 22,23 , {83,71,68}, 6,1 , 9484,37 , 4,4 , 4,0 , 2953,13 , 2972,9 , 2, 1, 7, 6, 7 }, // Malay/Latin/Singapore
- { 77, 24, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 434,13 , 447,12 , 278,6 , 861,18 , 18,7 , 25,12 , 12667,62 , 12729,88 , 12817,32 , 12667,62 , 12729,88 , 12849,31 , 6648,41 , 6689,77 , 6766,22 , 6648,41 , 6788,76 , 6864,21 , 0,2 , 0,2 , 568,6 , 574,31 , 22,23 , {73,78,82}, 127,1 , 9521,40 , 4,4 , 4,0 , 2981,6 , 2987,6 , 2, 1, 7, 7, 7 }, // Malayalam/Malayalam/India
- { 78, 7, 133, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 459,8 , 467,7 , 120,10 , 879,23 , 37,5 , 8,10 , 12880,48 , 12928,86 , 13014,36 , 12880,48 , 12928,86 , 13050,24 , 6885,28 , 6913,63 , 6976,21 , 6885,28 , 6913,63 , 6997,20 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 9561,27 , 4,4 , 4,0 , 2993,5 , 1219,5 , 2, 1, 7, 6, 7 }, // Maltese/Latin/Malta
- { 79, 7, 154, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {78,90,68}, 263,3 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 6, 7 }, // Maori/Latin/NewZealand
- { 80, 13, 100, 46, 44, 59, 37, 2406, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 474,9 , 474,9 , 278,6 , 211,18 , 18,7 , 25,12 , 13074,66 , 13140,86 , 13226,32 , 13074,66 , 13140,86 , 13226,32 , 7017,32 , 7049,53 , 4336,19 , 7017,32 , 7049,53 , 4336,19 , 184,5 , 176,4 , 422,4 , 5,17 , 22,23 , {73,78,82}, 127,1 , 9588,43 , 4,4 , 4,0 , 2998,5 , 2589,4 , 2, 1, 7, 7, 7 }, // Marathi/Devanagari/India
- { 82, 2, 143, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 902,29 , 37,5 , 8,10 , 13258,99 , 13357,189 , 158,27 , 13258,99 , 13357,189 , 158,27 , 7102,21 , 7123,43 , 7102,21 , 7102,21 , 7123,43 , 7102,21 , 189,3 , 180,3 , 484,4 , 528,17 , 22,23 , {77,78,84}, 266,1 , 9631,25 , 8,5 , 4,0 , 3003,6 , 3009,6 , 0, 0, 1, 6, 7 }, // Mongolian/Cyrillic/Mongolia
- { 82, 8, 44, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {67,78,89}, 267,3 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 6, 7 }, // Mongolian/Mongolian/China
- { 84, 13, 150, 46, 44, 59, 37, 2406, 45, 43, 101, 8220, 8221, 8216, 8217, 483,5 , 0,6 , 488,7 , 488,7 , 53,10 , 63,17 , 37,5 , 8,10 , 13546,85 , 13546,85 , 13631,27 , 13546,85 , 13658,85 , 13631,27 , 7166,33 , 7199,54 , 7253,18 , 7166,33 , 7199,54 , 7253,18 , 94,9 , 90,7 , 422,4 , 5,17 , 22,23 , {78,80,82}, 270,4 , 9656,49 , 8,5 , 4,0 , 3015,6 , 3021,5 , 2, 1, 7, 6, 7 }, // Nepali/Devanagari/Nepal
- { 84, 13, 100, 46, 44, 59, 37, 2406, 45, 43, 101, 8220, 8221, 8216, 8217, 483,5 , 0,6 , 488,7 , 488,7 , 53,10 , 63,17 , 18,7 , 25,12 , 13546,85 , 13546,85 , 13631,27 , 13546,85 , 13658,85 , 13631,27 , 7166,33 , 7199,54 , 7253,18 , 7166,33 , 7199,54 , 7253,18 , 94,9 , 90,7 , 422,4 , 5,17 , 22,23 , {73,78,82}, 127,1 , 9705,49 , 8,5 , 4,0 , 3015,6 , 2589,4 , 2, 1, 7, 7, 7 }, // Nepali/Devanagari/India
- { 85, 7, 161, 44, 160, 59, 37, 48, 8722, 43, 101, 171, 187, 8216, 8217, 0,6 , 0,6 , 183,8 , 183,8 , 931,10 , 469,17 , 37,5 , 8,10 , 5791,48 , 13743,83 , 134,24 , 5922,59 , 13743,83 , 134,24 , 2367,35 , 2302,51 , 2353,14 , 2367,35 , 2302,51 , 2353,14 , 64,4 , 61,4 , 45,4 , 5,17 , 22,23 , {78,79,75}, 196,2 , 9754,44 , 8,5 , 4,0 , 3026,12 , 3038,5 , 2, 1, 1, 6, 7 }, // NorwegianBokmal/Latin/Norway
- { 85, 7, 203, 44, 160, 59, 37, 48, 8722, 43, 101, 171, 187, 8216, 8217, 0,6 , 0,6 , 183,8 , 183,8 , 931,10 , 469,17 , 37,5 , 8,10 , 5791,48 , 13743,83 , 134,24 , 5922,59 , 13743,83 , 134,24 , 2367,35 , 2302,51 , 2353,14 , 2367,35 , 2302,51 , 2353,14 , 64,4 , 61,4 , 45,4 , 5,17 , 22,23 , {78,79,75}, 196,2 , 9754,44 , 8,5 , 4,0 , 3026,12 , 3043,21 , 2, 1, 1, 6, 7 }, // NorwegianBokmal/Latin/SvalbardAndJanMayenIslands
+ { 55, 44, 38, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {67,65,68}, 233,3 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 0, 7, 6, 7 }, // Inuktitut/CanadianAboriginal/Canada
+ { 55, 7, 38, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {67,65,68}, 233,3 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 0, 7, 6, 7 }, // Inuktitut/Latin/Canada
+ { 57, 7, 104, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 348,11 , 235,10 , 120,10 , 98,16 , 37,5 , 8,10 , 9709,62 , 9771,107 , 9878,24 , 9709,62 , 9771,107 , 9878,24 , 4668,37 , 4705,75 , 4780,14 , 4668,37 , 4705,75 , 4780,14 , 107,4 , 100,4 , 471,6 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8866,31 , 4,4 , 4,0 , 2629,7 , 2636,4 , 2, 1, 7, 6, 7 }, // Irish/Latin/Ireland
+ { 58, 7, 106, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 245,7 , 245,7 , 27,8 , 98,16 , 37,5 , 8,10 , 9902,48 , 9950,94 , 10044,24 , 9902,48 , 9950,94 , 10044,24 , 4794,28 , 4822,57 , 4879,14 , 4794,28 , 4822,57 , 4879,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8897,19 , 13,5 , 4,0 , 2640,8 , 2648,6 , 2, 1, 1, 6, 7 }, // Italian/Latin/Italy
+ { 58, 7, 184, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 245,7 , 245,7 , 27,8 , 98,16 , 37,5 , 8,10 , 9902,48 , 9950,94 , 10044,24 , 9902,48 , 9950,94 , 10044,24 , 4794,28 , 4822,57 , 4879,14 , 4794,28 , 4822,57 , 4879,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8897,19 , 13,5 , 4,0 , 2640,8 , 2654,10 , 2, 1, 1, 6, 7 }, // Italian/Latin/SanMarino
+ { 58, 7, 206, 46, 8217, 59, 37, 48, 45, 43, 101, 171, 187, 8249, 8250, 0,6 , 0,6 , 245,7 , 245,7 , 174,8 , 10,17 , 37,5 , 8,10 , 9902,48 , 9950,94 , 10044,24 , 9902,48 , 9950,94 , 10044,24 , 4794,28 , 4822,57 , 4879,14 , 4794,28 , 4822,57 , 4879,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {67,72,70}, 217,3 , 8916,53 , 8,5 , 36,5 , 2640,8 , 2664,8 , 2, 0, 1, 6, 7 }, // Italian/Latin/Switzerland
+ { 58, 7, 230, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 245,7 , 245,7 , 27,8 , 98,16 , 37,5 , 8,10 , 9902,48 , 9950,94 , 10044,24 , 9902,48 , 9950,94 , 10044,24 , 4794,28 , 4822,57 , 4879,14 , 4794,28 , 4822,57 , 4879,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8897,19 , 13,5 , 4,0 , 2640,8 , 2672,18 , 2, 1, 1, 6, 7 }, // Italian/Latin/VaticanCityState
+ { 59, 19, 108, 46, 44, 59, 37, 48, 45, 43, 101, 12300, 12301, 12302, 12303, 170,5 , 170,5 , 170,5 , 170,5 , 549,10 , 420,13 , 55,4 , 347,10 , 4671,39 , 4671,39 , 158,27 , 4671,39 , 4671,39 , 158,27 , 4893,14 , 4907,28 , 4893,14 , 4893,14 , 4907,28 , 4893,14 , 111,2 , 104,2 , 477,3 , 334,17 , 22,23 , {74,80,89}, 129,1 , 8969,11 , 4,4 , 4,0 , 2690,3 , 2693,2 , 0, 0, 7, 6, 7 }, // Japanese/Japanese/Japan
+ { 60, 7, 101, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {73,68,82}, 231,2 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 0, 0, 7, 6, 7 }, // Javanese/Latin/Indonesia
+ { 61, 21, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 359,12 , 371,11 , 287,6 , 35,18 , 326,8 , 334,13 , 10068,63 , 10131,87 , 10218,31 , 10249,69 , 10131,87 , 10218,31 , 4935,33 , 4968,54 , 5022,20 , 4935,33 , 4968,54 , 5022,20 , 113,9 , 106,7 , 480,8 , 488,33 , 22,23 , {73,78,82}, 117,1 , 8980,49 , 4,4 , 4,0 , 2695,5 , 2700,4 , 2, 1, 7, 7, 7 }, // Kannada/Kannada/India
+ { 62, 1, 100, 1643, 1644, 1563, 1642, 1776, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 543,6 , 35,18 , 18,7 , 25,12 , 10318,72 , 10318,72 , 10390,24 , 10318,72 , 10318,72 , 10390,24 , 5042,54 , 5096,56 , 5152,14 , 5042,54 , 5096,56 , 5152,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {73,78,82}, 117,1 , 9029,23 , 8,5 , 4,0 , 2704,5 , 2709,10 , 2, 1, 7, 7, 7 }, // Kashmiri/Arabic/India
+ { 63, 2, 110, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 0,6 , 382,10 , 174,8 , 727,22 , 37,5 , 8,10 , 10414,60 , 10474,83 , 10557,24 , 10581,60 , 10641,83 , 10557,24 , 5166,21 , 5187,56 , 5243,14 , 5166,21 , 5257,56 , 5243,14 , 0,2 , 0,2 , 521,4 , 525,17 , 542,23 , {75,90,84}, 236,1 , 9052,58 , 13,5 , 4,0 , 2719,10 , 2729,9 , 2, 1, 1, 6, 7 }, // Kazakh/Cyrillic/Kazakhstan
+ { 64, 7, 179, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 10724,60 , 10784,101 , 158,27 , 10724,60 , 10784,101 , 158,27 , 5313,35 , 5348,84 , 85,14 , 5313,35 , 5348,84 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {82,87,70}, 176,2 , 0,7 , 8,5 , 4,0 , 2738,11 , 2749,8 , 0, 0, 1, 6, 7 }, // Kinyarwanda/Latin/Rwanda
+ { 65, 2, 116, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 392,10 , 392,10 , 287,6 , 749,23 , 37,5 , 8,10 , 10885,48 , 10933,80 , 11013,24 , 11037,59 , 11096,80 , 11013,24 , 5432,38 , 5470,57 , 5527,14 , 5432,38 , 5470,57 , 5527,14 , 122,5 , 113,14 , 521,4 , 565,17 , 22,23 , {75,71,83}, 237,3 , 9110,52 , 13,5 , 4,0 , 2757,8 , 2765,10 , 2, 1, 1, 6, 7 }, // Kirghiz/Cyrillic/Kyrgyzstan
+ { 66, 22, 114, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 402,7 , 402,7 , 772,9 , 781,16 , 357,7 , 364,13 , 11176,39 , 11176,39 , 11176,39 , 11176,39 , 11176,39 , 11176,39 , 5541,14 , 5555,28 , 5541,14 , 5541,14 , 5555,28 , 5541,14 , 127,2 , 127,2 , 582,3 , 5,17 , 22,23 , {75,82,87}, 240,1 , 9162,19 , 4,4 , 4,0 , 2775,3 , 2778,4 , 0, 0, 7, 6, 7 }, // Korean/Korean/SouthKorea
+ { 66, 22, 113, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 402,7 , 402,7 , 772,9 , 781,16 , 357,7 , 364,13 , 11176,39 , 11176,39 , 11176,39 , 11176,39 , 11176,39 , 11176,39 , 5541,14 , 5555,28 , 5541,14 , 5541,14 , 5555,28 , 5541,14 , 127,2 , 127,2 , 582,3 , 5,17 , 22,23 , {75,80,87}, 241,3 , 9181,39 , 4,4 , 4,0 , 2775,3 , 2782,11 , 0, 0, 1, 6, 7 }, // Korean/Korean/NorthKorea
+ { 67, 7, 217, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {84,82,89}, 244,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Kurdish/Latin/Turkey
+ { 68, 7, 35, 44, 46, 59, 37, 48, 45, 43, 101, 8221, 8221, 8217, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 37,5 , 8,10 , 11215,60 , 11275,106 , 158,27 , 11215,60 , 11275,106 , 158,27 , 5583,34 , 5617,89 , 85,14 , 5583,34 , 5617,89 , 85,14 , 129,5 , 129,5 , 45,4 , 5,17 , 22,23 , {66,73,70}, 159,3 , 9220,27 , 0,4 , 4,0 , 2793,8 , 2801,8 , 0, 0, 1, 6, 7 }, // Rundi/Latin/Burundi
+ { 69, 23, 117, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 409,9 , 433,8 , 797,19 , 55,4 , 377,24 , 11381,61 , 11442,75 , 158,27 , 11381,61 , 11442,75 , 158,27 , 5706,36 , 5742,57 , 5799,17 , 5706,36 , 5742,57 , 5799,17 , 134,8 , 134,8 , 45,4 , 5,17 , 22,23 , {76,65,75}, 245,1 , 9247,21 , 4,4 , 36,5 , 2809,3 , 2809,3 , 0, 0, 7, 6, 7 }, // Lao/Lao/Laos
+ { 71, 7, 118, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 418,8 , 418,8 , 174,8 , 816,26 , 37,5 , 8,10 , 11517,65 , 11582,101 , 134,24 , 11517,65 , 11582,101 , 134,24 , 5816,51 , 5867,72 , 5939,14 , 5953,51 , 6004,72 , 5939,14 , 142,14 , 142,11 , 585,5 , 334,17 , 22,23 , {69,85,82}, 14,1 , 9268,23 , 13,5 , 4,0 , 2812,8 , 2820,7 , 2, 1, 1, 6, 7 }, // Latvian/Latin/Latvia
+ { 72, 7, 49, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 426,9 , 426,9 , 433,8 , 98,16 , 37,5 , 8,10 , 11683,48 , 11731,203 , 11934,24 , 11683,48 , 11731,203 , 11934,24 , 6076,28 , 6104,100 , 6204,14 , 6076,28 , 6104,100 , 6204,14 , 156,8 , 153,6 , 45,4 , 5,17 , 22,23 , {67,68,70}, 203,2 , 9291,23 , 13,5 , 4,0 , 2827,7 , 2834,30 , 2, 1, 1, 6, 7 }, // Lingala/Latin/CongoKinshasa
+ { 72, 7, 6, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 426,9 , 426,9 , 433,8 , 98,16 , 37,5 , 8,10 , 11683,48 , 11731,203 , 11934,24 , 11683,48 , 11731,203 , 11934,24 , 6076,28 , 6104,100 , 6204,14 , 6076,28 , 6104,100 , 6204,14 , 156,8 , 153,6 , 45,4 , 5,17 , 22,23 , {65,79,65}, 246,2 , 9314,23 , 13,5 , 4,0 , 2827,7 , 2864,6 , 2, 1, 1, 6, 7 }, // Lingala/Latin/Angola
+ { 72, 7, 41, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 426,9 , 426,9 , 433,8 , 98,16 , 37,5 , 8,10 , 11683,48 , 11731,203 , 11934,24 , 11683,48 , 11731,203 , 11934,24 , 6076,28 , 6104,100 , 6204,14 , 6076,28 , 6104,100 , 6204,14 , 156,8 , 153,6 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 9337,23 , 13,5 , 4,0 , 2827,7 , 2870,26 , 0, 0, 1, 6, 7 }, // Lingala/Latin/CentralAfricanRepublic
+ { 72, 7, 50, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 426,9 , 426,9 , 433,8 , 98,16 , 37,5 , 8,10 , 11683,48 , 11731,203 , 11934,24 , 11683,48 , 11731,203 , 11934,24 , 6076,28 , 6104,100 , 6204,14 , 6076,28 , 6104,100 , 6204,14 , 156,8 , 153,6 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 9337,23 , 13,5 , 4,0 , 2827,7 , 2896,5 , 0, 0, 1, 6, 7 }, // Lingala/Latin/CongoBrazzaville
+ { 73, 7, 124, 44, 160, 59, 37, 48, 8722, 43, 101, 8222, 8220, 8222, 8220, 0,6 , 0,6 , 435,8 , 435,8 , 53,10 , 842,27 , 37,5 , 8,10 , 11958,70 , 12028,96 , 12124,24 , 11958,70 , 12148,98 , 12124,24 , 6218,21 , 6239,89 , 6328,14 , 6218,21 , 6239,89 , 6328,14 , 164,9 , 159,6 , 590,6 , 5,17 , 22,23 , {69,85,82}, 14,1 , 9360,30 , 13,5 , 4,0 , 2901,8 , 2909,7 , 2, 1, 1, 6, 7 }, // Lithuanian/Latin/Lithuania
+ { 74, 2, 127, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 116,7 , 116,7 , 869,7 , 80,18 , 37,5 , 8,10 , 12246,61 , 12307,85 , 12392,24 , 12246,61 , 12307,85 , 12392,24 , 6342,35 , 6377,54 , 1659,14 , 6431,34 , 6377,54 , 1659,14 , 173,10 , 165,8 , 596,5 , 5,17 , 22,23 , {77,75,68}, 248,3 , 9390,56 , 13,5 , 4,0 , 2916,10 , 2926,10 , 2, 1, 1, 6, 7 }, // Macedonian/Cyrillic/Macedonia
+ { 75, 7, 128, 46, 44, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 98,16 , 37,5 , 8,10 , 12416,48 , 12464,92 , 134,24 , 12416,48 , 12464,92 , 134,24 , 6465,34 , 6499,60 , 6559,14 , 6465,34 , 6499,60 , 6559,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {77,71,65}, 166,2 , 9446,13 , 8,5 , 4,0 , 2936,8 , 2944,12 , 0, 0, 1, 6, 7 }, // Malagasy/Latin/Madagascar
+ { 76, 7, 130, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 339,9 , 339,9 , 536,7 , 10,17 , 18,7 , 25,12 , 12556,48 , 12604,82 , 12686,24 , 12556,48 , 12604,82 , 12686,24 , 6573,28 , 6601,43 , 6644,14 , 6573,28 , 6601,43 , 6644,14 , 183,2 , 173,3 , 601,4 , 5,17 , 22,23 , {77,89,82}, 170,2 , 9459,39 , 4,4 , 4,0 , 2956,6 , 1211,8 , 2, 1, 1, 6, 7 }, // Malay/Latin/Malaysia
+ { 76, 1, 130, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {77,89,82}, 170,2 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Malay/Arabic/Malaysia
+ { 76, 7, 32, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 339,9 , 339,9 , 536,7 , 876,12 , 18,7 , 25,12 , 12556,48 , 12604,82 , 12686,24 , 12556,48 , 12604,82 , 12686,24 , 6573,28 , 6601,43 , 6644,14 , 6573,28 , 6601,43 , 6644,14 , 183,2 , 173,3 , 601,4 , 5,17 , 22,23 , {66,78,68}, 6,1 , 9498,31 , 8,5 , 4,0 , 2956,6 , 2962,6 , 2, 1, 1, 6, 7 }, // Malay/Latin/Brunei
+ { 76, 7, 190, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 339,9 , 339,9 , 536,7 , 10,17 , 18,7 , 25,12 , 12556,48 , 12604,82 , 12686,24 , 12556,48 , 12604,82 , 12686,24 , 6573,28 , 6601,43 , 6644,14 , 6573,28 , 6601,43 , 6644,14 , 183,2 , 173,3 , 601,4 , 5,17 , 22,23 , {83,71,68}, 6,1 , 9529,37 , 4,4 , 4,0 , 2956,6 , 2968,9 , 2, 1, 7, 6, 7 }, // Malay/Latin/Singapore
+ { 77, 24, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 443,13 , 456,12 , 287,6 , 888,18 , 18,7 , 25,12 , 12710,62 , 12772,88 , 12860,32 , 12710,62 , 12772,88 , 12860,32 , 6658,41 , 6699,77 , 6776,22 , 6658,41 , 6798,76 , 6874,21 , 0,2 , 0,2 , 605,6 , 611,31 , 22,23 , {73,78,82}, 117,1 , 9566,40 , 4,4 , 4,0 , 2977,6 , 2983,6 , 2, 1, 7, 7, 7 }, // Malayalam/Malayalam/India
+ { 78, 7, 133, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 468,8 , 476,7 , 120,10 , 906,23 , 37,5 , 8,10 , 12892,48 , 12940,86 , 13026,36 , 12892,48 , 12940,86 , 13062,24 , 6895,28 , 6923,63 , 6986,21 , 6895,28 , 6923,63 , 7007,20 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 9606,27 , 4,4 , 4,0 , 2989,5 , 1219,5 , 2, 1, 7, 6, 7 }, // Maltese/Latin/Malta
+ { 79, 7, 154, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {78,90,68}, 251,3 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Maori/Latin/NewZealand
+ { 80, 13, 100, 46, 44, 59, 37, 2406, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 483,9 , 483,9 , 287,6 , 210,18 , 18,7 , 25,12 , 13086,66 , 13152,86 , 13238,32 , 13086,66 , 13152,86 , 13238,32 , 7027,32 , 7059,53 , 4346,19 , 7027,32 , 7059,53 , 4346,19 , 185,5 , 176,4 , 459,4 , 5,17 , 22,23 , {73,78,82}, 117,1 , 9633,43 , 4,4 , 4,0 , 2994,5 , 2584,4 , 2, 1, 7, 7, 7 }, // Marathi/Devanagari/India
+ { 82, 2, 143, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 929,10 , 939,16 , 37,5 , 87,12 , 13270,99 , 13369,190 , 13559,38 , 13270,99 , 13369,190 , 13559,38 , 7112,21 , 7133,43 , 7112,21 , 7112,21 , 7133,43 , 7112,21 , 190,3 , 180,3 , 521,4 , 565,17 , 22,23 , {77,78,84}, 254,1 , 9676,25 , 8,5 , 4,0 , 2999,6 , 3005,6 , 0, 0, 1, 6, 7 }, // Mongolian/Cyrillic/Mongolia
+ { 82, 8, 44, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {67,78,89}, 255,3 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 6, 7 }, // Mongolian/Mongolian/China
+ { 84, 13, 150, 46, 44, 59, 37, 2406, 45, 43, 101, 8220, 8221, 8216, 8217, 492,5 , 0,6 , 497,7 , 497,7 , 245,6 , 63,17 , 37,5 , 8,10 , 13597,85 , 13597,85 , 13682,53 , 13597,85 , 13597,85 , 13735,52 , 7176,33 , 7209,54 , 7263,18 , 7176,33 , 7209,54 , 7263,18 , 91,9 , 86,7 , 459,4 , 5,17 , 22,23 , {78,80,82}, 258,4 , 9701,49 , 8,5 , 4,0 , 3011,6 , 3017,5 , 2, 1, 7, 6, 7 }, // Nepali/Devanagari/Nepal
+ { 84, 13, 100, 46, 44, 59, 37, 2406, 45, 43, 101, 8220, 8221, 8216, 8217, 492,5 , 0,6 , 497,7 , 497,7 , 245,6 , 63,17 , 18,7 , 25,12 , 13597,85 , 13597,85 , 13682,53 , 13597,85 , 13597,85 , 13735,52 , 7176,33 , 7209,54 , 7263,18 , 7176,33 , 7209,54 , 7263,18 , 91,9 , 86,7 , 459,4 , 5,17 , 22,23 , {73,78,82}, 117,1 , 9750,49 , 8,5 , 4,0 , 3011,6 , 2584,4 , 2, 1, 7, 7, 7 }, // Nepali/Devanagari/India
+ { 85, 7, 161, 44, 160, 59, 37, 48, 8722, 43, 101, 171, 187, 8216, 8217, 0,6 , 0,6 , 192,8 , 192,8 , 955,10 , 496,17 , 37,5 , 8,10 , 5765,48 , 13787,83 , 134,24 , 5896,59 , 13787,83 , 134,24 , 2377,35 , 2312,51 , 2363,14 , 2377,35 , 2312,51 , 2363,14 , 66,4 , 63,4 , 45,4 , 5,17 , 22,23 , {78,79,75}, 186,2 , 9799,44 , 8,5 , 4,0 , 3022,12 , 3034,5 , 2, 0, 1, 6, 7 }, // NorwegianBokmal/Latin/Norway
+ { 85, 7, 203, 44, 160, 59, 37, 48, 8722, 43, 101, 171, 187, 8216, 8217, 0,6 , 0,6 , 192,8 , 192,8 , 955,10 , 496,17 , 37,5 , 8,10 , 5765,48 , 13787,83 , 134,24 , 5896,59 , 13787,83 , 134,24 , 2377,35 , 2312,51 , 2363,14 , 2377,35 , 2312,51 , 2363,14 , 66,4 , 63,4 , 45,4 , 5,17 , 22,23 , {78,79,75}, 186,2 , 9799,44 , 8,5 , 4,0 , 3022,12 , 3039,21 , 2, 0, 1, 6, 7 }, // NorwegianBokmal/Latin/SvalbardAndJanMayenIslands
{ 86, 7, 74, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Occitan/Latin/France
- { 87, 26, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 941,6 , 10,17 , 18,7 , 25,12 , 13826,86 , 13826,86 , 13912,32 , 13826,86 , 13826,86 , 13912,32 , 7271,33 , 7304,54 , 7358,18 , 7271,33 , 7304,54 , 7358,18 , 68,2 , 65,2 , 45,4 , 5,17 , 22,23 , {73,78,82}, 127,1 , 9798,11 , 8,5 , 4,0 , 3064,5 , 3069,4 , 2, 1, 7, 7, 7 }, // Oriya/Oriya/India
- { 88, 1, 1, 1643, 1644, 1563, 1642, 1776, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 385,8 , 947,20 , 55,4 , 356,11 , 13944,68 , 13944,68 , 158,27 , 13944,68 , 13944,68 , 158,27 , 7376,49 , 7376,49 , 85,14 , 7376,49 , 7376,49 , 85,14 , 192,4 , 183,4 , 45,4 , 5,17 , 22,23 , {65,70,78}, 274,1 , 9809,25 , 13,5 , 4,0 , 3073,4 , 3077,9 , 0, 0, 6, 4, 5 }, // Pashto/Arabic/Afghanistan
- { 89, 1, 102, 1643, 1644, 1563, 37, 1776, 45, 43, 101, 171, 187, 8249, 8250, 495,7 , 495,7 , 502,8 , 510,7 , 385,8 , 98,16 , 55,4 , 356,11 , 14012,70 , 14012,70 , 14082,24 , 14106,74 , 14106,74 , 14082,24 , 7376,49 , 7376,49 , 7425,14 , 7376,49 , 7376,49 , 7425,14 , 196,9 , 187,8 , 605,4 , 609,39 , 22,23 , {73,82,82}, 275,4 , 9834,37 , 74,5 , 4,0 , 3086,5 , 3091,5 , 0, 0, 6, 5, 5 }, // Persian/Arabic/Iran
- { 89, 1, 1, 1643, 1644, 1563, 37, 1776, 45, 43, 101, 171, 187, 8249, 8250, 495,7 , 495,7 , 502,8 , 510,7 , 385,8 , 98,16 , 55,4 , 356,11 , 14180,68 , 14180,68 , 14248,24 , 14272,62 , 14180,68 , 14248,24 , 7376,49 , 7376,49 , 7425,14 , 7376,49 , 7376,49 , 7425,14 , 196,9 , 187,8 , 605,4 , 609,39 , 22,23 , {65,70,78}, 274,1 , 9871,55 , 8,5 , 4,0 , 3096,3 , 3077,9 , 0, 0, 6, 4, 5 }, // Persian/Arabic/Afghanistan
- { 90, 7, 172, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8221, 171, 187, 0,6 , 0,6 , 154,7 , 154,7 , 931,10 , 10,17 , 37,5 , 8,10 , 14334,48 , 14382,97 , 14479,24 , 14334,48 , 14503,99 , 14602,24 , 7439,34 , 7473,59 , 7532,14 , 7439,34 , 7473,59 , 7546,14 , 0,2 , 0,2 , 283,5 , 5,17 , 22,23 , {80,76,78}, 279,2 , 9926,77 , 13,5 , 4,0 , 3099,6 , 3105,6 , 2, 1, 1, 6, 7 }, // Polish/Latin/Poland
- { 91, 7, 30, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 236,7 , 236,7 , 120,10 , 587,27 , 37,5 , 8,10 , 14626,48 , 14674,89 , 134,24 , 14626,48 , 14674,89 , 134,24 , 7560,28 , 7588,79 , 7667,14 , 7560,28 , 7588,79 , 7667,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {66,82,76}, 281,2 , 10003,54 , 4,4 , 4,0 , 3111,9 , 3120,6 , 2, 1, 7, 6, 7 }, // Portuguese/Latin/Brazil
- { 91, 7, 6, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 236,7 , 236,7 , 27,8 , 587,27 , 37,5 , 8,10 , 14626,48 , 14674,89 , 134,24 , 14626,48 , 14674,89 , 134,24 , 7681,49 , 7588,79 , 7667,14 , 7681,49 , 7588,79 , 7667,14 , 205,8 , 195,8 , 0,5 , 5,17 , 22,23 , {65,79,65}, 258,2 , 10057,54 , 13,5 , 4,0 , 3111,9 , 3126,6 , 2, 1, 1, 6, 7 }, // Portuguese/Latin/Angola
- { 91, 7, 39, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 236,7 , 236,7 , 27,8 , 587,27 , 37,5 , 8,10 , 14626,48 , 14674,89 , 134,24 , 14626,48 , 14674,89 , 134,24 , 7681,49 , 7588,79 , 7667,14 , 7681,49 , 7588,79 , 7667,14 , 205,8 , 195,8 , 0,5 , 5,17 , 22,23 , {67,86,69}, 283,1 , 10111,69 , 13,5 , 4,0 , 3111,9 , 3132,10 , 2, 1, 1, 6, 7 }, // Portuguese/Latin/CapeVerde
- { 91, 7, 62, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 236,7 , 236,7 , 27,8 , 587,27 , 37,5 , 8,10 , 14626,48 , 14674,89 , 134,24 , 14626,48 , 14674,89 , 134,24 , 7681,49 , 7588,79 , 7667,14 , 7681,49 , 7588,79 , 7667,14 , 205,8 , 195,8 , 0,5 , 5,17 , 22,23 , {85,83,68}, 165,3 , 10180,81 , 13,5 , 4,0 , 3111,9 , 3142,11 , 2, 1, 1, 6, 7 }, // Portuguese/Latin/EastTimor
- { 91, 7, 66, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 236,7 , 236,7 , 27,8 , 587,27 , 37,5 , 8,10 , 14626,48 , 14674,89 , 134,24 , 14626,48 , 14674,89 , 134,24 , 7681,49 , 7588,79 , 7667,14 , 7681,49 , 7588,79 , 7667,14 , 205,8 , 195,8 , 0,5 , 5,17 , 22,23 , {88,65,70}, 32,4 , 10261,59 , 13,5 , 4,0 , 3111,9 , 3153,16 , 0, 0, 1, 6, 7 }, // Portuguese/Latin/EquatorialGuinea
- { 91, 7, 92, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 236,7 , 236,7 , 27,8 , 587,27 , 37,5 , 8,10 , 14626,48 , 14674,89 , 134,24 , 14626,48 , 14674,89 , 134,24 , 7681,49 , 7588,79 , 7667,14 , 7681,49 , 7588,79 , 7667,14 , 205,8 , 195,8 , 0,5 , 5,17 , 22,23 , {88,79,70}, 210,3 , 10320,62 , 13,5 , 4,0 , 3111,9 , 3169,12 , 0, 0, 1, 6, 7 }, // Portuguese/Latin/GuineaBissau
- { 91, 7, 125, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 236,7 , 236,7 , 27,8 , 587,27 , 37,5 , 8,10 , 14626,48 , 14674,89 , 134,24 , 14626,48 , 14674,89 , 134,24 , 7681,49 , 7588,79 , 7667,14 , 7681,49 , 7588,79 , 7667,14 , 205,8 , 195,8 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 10382,20 , 13,5 , 4,0 , 3111,9 , 3181,10 , 2, 1, 1, 6, 7 }, // Portuguese/Latin/Luxembourg
- { 91, 7, 126, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 236,7 , 236,7 , 27,8 , 587,27 , 18,7 , 25,12 , 14626,48 , 14674,89 , 134,24 , 14626,48 , 14674,89 , 134,24 , 7681,49 , 7588,79 , 7667,14 , 7681,49 , 7588,79 , 7667,14 , 205,8 , 195,8 , 0,5 , 5,17 , 22,23 , {77,79,80}, 143,4 , 10402,53 , 13,5 , 4,0 , 3111,9 , 3191,19 , 2, 1, 7, 6, 7 }, // Portuguese/Latin/Macau
- { 91, 7, 146, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 236,7 , 236,7 , 27,8 , 587,27 , 37,5 , 8,10 , 14626,48 , 14674,89 , 134,24 , 14626,48 , 14674,89 , 134,24 , 7681,49 , 7588,79 , 7667,14 , 7681,49 , 7588,79 , 7667,14 , 205,8 , 195,8 , 0,5 , 5,17 , 22,23 , {77,90,78}, 284,3 , 10455,72 , 13,5 , 4,0 , 3111,9 , 3210,10 , 2, 1, 7, 6, 7 }, // Portuguese/Latin/Mozambique
- { 91, 7, 173, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 236,7 , 236,7 , 27,8 , 587,27 , 37,5 , 8,10 , 14626,48 , 14674,89 , 134,24 , 14626,48 , 14674,89 , 134,24 , 7681,49 , 7588,79 , 7667,14 , 7681,49 , 7588,79 , 7667,14 , 205,8 , 195,8 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 10382,20 , 13,5 , 4,0 , 3220,17 , 3237,8 , 2, 1, 1, 6, 7 }, // Portuguese/Latin/Portugal
- { 91, 7, 185, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 236,7 , 236,7 , 27,8 , 587,27 , 37,5 , 8,10 , 14626,48 , 14674,89 , 134,24 , 14626,48 , 14674,89 , 134,24 , 7681,49 , 7588,79 , 7667,14 , 7681,49 , 7588,79 , 7667,14 , 205,8 , 195,8 , 0,5 , 5,17 , 22,23 , {83,84,68}, 287,2 , 10527,92 , 13,5 , 4,0 , 3111,9 , 3245,19 , 0, 0, 1, 6, 7 }, // Portuguese/Latin/SaoTomeAndPrincipe
- { 91, 7, 206, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 236,7 , 236,7 , 27,8 , 587,27 , 37,5 , 8,10 , 14626,48 , 14674,89 , 134,24 , 14626,48 , 14674,89 , 134,24 , 7681,49 , 7588,79 , 7667,14 , 7681,49 , 7588,79 , 7667,14 , 205,8 , 195,8 , 0,5 , 5,17 , 22,23 , {67,72,70}, 229,3 , 10619,45 , 13,5 , 4,0 , 3111,9 , 3264,5 , 2, 0, 1, 6, 7 }, // Portuguese/Latin/Switzerland
- { 92, 4, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 517,9 , 517,9 , 278,6 , 10,17 , 18,7 , 25,12 , 14763,50 , 14813,68 , 14881,28 , 14763,50 , 14813,68 , 14881,28 , 7730,36 , 7766,57 , 7823,23 , 7730,36 , 7766,57 , 7823,23 , 213,6 , 203,6 , 648,4 , 5,17 , 22,23 , {73,78,82}, 127,1 , 10664,39 , 4,4 , 4,0 , 3269,6 , 3275,4 , 2, 1, 7, 7, 7 }, // Punjabi/Gurmukhi/India
- { 92, 1, 163, 1643, 1644, 1563, 1642, 1776, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 80,18 , 18,7 , 25,12 , 14909,67 , 14909,67 , 158,27 , 14909,67 , 14909,67 , 158,27 , 7846,37 , 7846,37 , 85,14 , 7846,37 , 7846,37 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {80,75,82}, 289,1 , 10703,13 , 79,6 , 4,0 , 3279,6 , 3285,7 , 0, 0, 7, 6, 7 }, // Punjabi/Arabic/Pakistan
- { 93, 7, 169, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 211,18 , 37,5 , 8,10 , 14976,48 , 15024,128 , 158,27 , 14976,48 , 15024,128 , 158,27 , 7883,28 , 7911,53 , 7964,14 , 7883,28 , 7911,53 , 7964,14 , 64,4 , 61,4 , 45,4 , 5,17 , 22,23 , {80,69,78}, 290,2 , 0,7 , 8,5 , 4,0 , 3292,8 , 3300,4 , 2, 1, 7, 6, 7 }, // Quechua/Latin/Peru
- { 93, 7, 26, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 211,18 , 37,5 , 8,10 , 14976,48 , 15024,128 , 158,27 , 14976,48 , 15024,128 , 158,27 , 7883,28 , 7911,53 , 7964,14 , 7883,28 , 7911,53 , 7964,14 , 64,4 , 61,4 , 45,4 , 5,17 , 22,23 , {66,79,66}, 292,2 , 0,7 , 8,5 , 4,0 , 3292,8 , 3304,7 , 2, 1, 1, 6, 7 }, // Quechua/Latin/Bolivia
- { 93, 7, 63, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 211,18 , 37,5 , 8,10 , 14976,48 , 15024,128 , 158,27 , 14976,48 , 15024,128 , 158,27 , 7883,28 , 7911,53 , 7964,14 , 7883,28 , 7911,53 , 7964,14 , 64,4 , 61,4 , 45,4 , 5,17 , 22,23 , {85,83,68}, 6,1 , 0,7 , 8,5 , 4,0 , 3292,8 , 3311,7 , 2, 1, 1, 6, 7 }, // Quechua/Latin/Ecuador
- { 94, 7, 206, 46, 8217, 59, 37, 48, 8722, 43, 101, 171, 187, 8249, 8250, 0,6 , 0,6 , 0,6 , 0,6 , 348,8 , 967,28 , 37,5 , 8,10 , 15152,67 , 15219,92 , 15311,24 , 15152,67 , 15219,92 , 15311,24 , 7978,23 , 8001,56 , 8057,14 , 7978,23 , 8001,56 , 8057,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {67,72,70}, 229,3 , 10716,46 , 13,5 , 4,0 , 3318,9 , 3327,6 , 2, 0, 1, 6, 7 }, // Romansh/Latin/Switzerland
- { 95, 7, 177, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8221, 171, 187, 0,6 , 0,6 , 526,8 , 526,8 , 931,10 , 10,17 , 37,5 , 8,10 , 15335,60 , 15395,98 , 15493,24 , 15335,60 , 15395,98 , 15493,24 , 8071,34 , 8105,48 , 3054,14 , 8071,34 , 8105,48 , 3054,14 , 64,4 , 61,4 , 652,4 , 5,17 , 22,23 , {82,79,78}, 294,3 , 10762,57 , 13,5 , 4,0 , 3333,6 , 3339,7 , 2, 1, 1, 6, 7 }, // Romanian/Latin/Romania
- { 95, 7, 141, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8221, 171, 187, 0,6 , 0,6 , 526,8 , 526,8 , 931,10 , 10,17 , 37,5 , 8,10 , 15335,60 , 15395,98 , 15493,24 , 15335,60 , 15395,98 , 15493,24 , 8153,28 , 8105,48 , 8181,16 , 8153,28 , 8105,48 , 8181,16 , 64,4 , 61,4 , 652,4 , 5,17 , 22,23 , {77,68,76}, 297,1 , 10819,69 , 13,5 , 4,0 , 3346,13 , 3359,17 , 2, 1, 1, 6, 7 }, // Romanian/Latin/Moldova
- { 96, 2, 178, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 107,7 , 107,7 , 931,10 , 326,22 , 55,4 , 59,9 , 15517,62 , 11053,80 , 10970,24 , 15579,62 , 15641,82 , 10970,24 , 8197,21 , 8218,62 , 8280,14 , 8197,21 , 8218,62 , 8197,21 , 219,2 , 209,2 , 226,5 , 528,17 , 22,23 , {82,85,66}, 129,1 , 10888,89 , 13,5 , 4,0 , 3376,7 , 3383,6 , 2, 1, 1, 6, 7 }, // Russian/Cyrillic/Russia
- { 96, 2, 20, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 107,7 , 107,7 , 931,10 , 326,22 , 55,4 , 59,9 , 15517,62 , 11053,80 , 10970,24 , 15579,62 , 15641,82 , 10970,24 , 8197,21 , 8218,62 , 8280,14 , 8197,21 , 8218,62 , 8197,21 , 219,2 , 209,2 , 226,5 , 528,17 , 22,23 , {66,89,78}, 0,2 , 10977,94 , 13,5 , 4,0 , 3376,7 , 472,8 , 2, 0, 1, 6, 7 }, // Russian/Cyrillic/Belarus
- { 96, 2, 110, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 107,7 , 107,7 , 931,10 , 326,22 , 55,4 , 59,9 , 15517,62 , 11053,80 , 10970,24 , 15579,62 , 15641,82 , 10970,24 , 8197,21 , 8218,62 , 8280,14 , 8197,21 , 8218,62 , 8197,21 , 219,2 , 209,2 , 226,5 , 528,17 , 22,23 , {75,90,84}, 248,1 , 11071,83 , 13,5 , 4,0 , 3376,7 , 3389,9 , 2, 1, 1, 6, 7 }, // Russian/Cyrillic/Kazakhstan
- { 96, 2, 116, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 107,7 , 107,7 , 931,10 , 326,22 , 55,4 , 59,9 , 15517,62 , 11053,80 , 10970,24 , 15579,62 , 15641,82 , 10970,24 , 8197,21 , 8218,62 , 8280,14 , 8197,21 , 8218,62 , 8197,21 , 219,2 , 209,2 , 226,5 , 528,17 , 22,23 , {75,71,83}, 249,3 , 11154,82 , 13,5 , 4,0 , 3376,7 , 3398,8 , 2, 1, 1, 6, 7 }, // Russian/Cyrillic/Kyrgyzstan
- { 96, 2, 141, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 107,7 , 107,7 , 931,10 , 326,22 , 55,4 , 59,9 , 15517,62 , 11053,80 , 10970,24 , 15579,62 , 15641,82 , 10970,24 , 8197,21 , 8218,62 , 8280,14 , 8197,21 , 8218,62 , 8197,21 , 219,2 , 209,2 , 226,5 , 528,17 , 22,23 , {77,68,76}, 297,1 , 11236,79 , 13,5 , 4,0 , 3376,7 , 3406,7 , 2, 1, 1, 6, 7 }, // Russian/Cyrillic/Moldova
- { 96, 2, 222, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 107,7 , 107,7 , 931,10 , 326,22 , 37,5 , 8,10 , 15517,62 , 11053,80 , 10970,24 , 15579,62 , 15641,82 , 10970,24 , 8197,21 , 8218,62 , 8280,14 , 8197,21 , 8218,62 , 8197,21 , 0,2 , 0,2 , 226,5 , 528,17 , 22,23 , {85,65,72}, 298,1 , 11315,92 , 13,5 , 4,0 , 3376,7 , 3413,7 , 2, 1, 1, 6, 7 }, // Russian/Cyrillic/Ukraine
- { 98, 7, 41, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 37,5 , 8,10 , 15723,48 , 15771,91 , 15862,24 , 15723,48 , 15771,91 , 15862,24 , 8294,28 , 8322,66 , 8388,14 , 8294,28 , 8322,66 , 8388,14 , 221,2 , 211,2 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 11407,25 , 4,4 , 36,5 , 3420,5 , 3425,22 , 0, 0, 1, 6, 7 }, // Sango/Latin/CentralAfricanRepublic
- { 99, 13, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {73,78,82}, 127,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 7, 7 }, // Sanskrit/Devanagari/India
- { 100, 2, 243, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 107,7 , 107,7 , 995,7 , 1002,20 , 37,5 , 8,10 , 15886,48 , 15934,81 , 12349,24 , 15886,48 , 15934,81 , 12349,24 , 8402,28 , 8430,52 , 8482,14 , 8402,28 , 8430,52 , 8482,14 , 223,9 , 213,8 , 656,7 , 5,17 , 22,23 , {82,83,68}, 299,3 , 11432,58 , 13,5 , 4,0 , 3447,6 , 3453,6 , 0, 0, 1, 6, 7 }, // Serbian/Cyrillic/Serbia
- { 100, 2, 27, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 107,7 , 107,7 , 995,7 , 1002,20 , 37,5 , 8,10 , 16015,58 , 15934,81 , 12349,24 , 16015,58 , 15934,81 , 12349,24 , 8496,33 , 8529,55 , 8482,14 , 8496,33 , 8529,55 , 8482,14 , 232,11 , 213,8 , 656,7 , 5,17 , 22,23 , {66,65,77}, 302,2 , 11490,174 , 13,5 , 4,0 , 3447,6 , 3459,19 , 2, 1, 1, 6, 7 }, // Serbian/Cyrillic/BosniaAndHerzegowina
- { 100, 2, 242, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 107,7 , 107,7 , 995,7 , 1002,20 , 37,5 , 8,10 , 16015,58 , 15934,81 , 12349,24 , 16015,58 , 15934,81 , 12349,24 , 8496,33 , 8529,55 , 8482,14 , 8496,33 , 8529,55 , 8482,14 , 232,11 , 213,8 , 656,7 , 5,17 , 22,23 , {69,85,82}, 14,1 , 11664,23 , 13,5 , 4,0 , 3447,6 , 3478,9 , 2, 1, 1, 6, 7 }, // Serbian/Cyrillic/Montenegro
- { 100, 2, 257, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 107,7 , 107,7 , 995,7 , 1002,20 , 37,5 , 8,10 , 16015,58 , 15934,81 , 12349,24 , 16015,58 , 15934,81 , 12349,24 , 8496,33 , 8430,52 , 8482,14 , 8496,33 , 8430,52 , 8482,14 , 223,9 , 213,8 , 656,7 , 5,17 , 22,23 , {69,85,82}, 14,1 , 11664,23 , 13,5 , 4,0 , 3447,6 , 3487,6 , 2, 1, 1, 6, 7 }, // Serbian/Cyrillic/Kosovo
- { 100, 7, 27, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 154,7 , 154,7 , 995,7 , 1002,20 , 37,5 , 8,10 , 16073,58 , 16131,81 , 16212,24 , 16073,58 , 16131,81 , 16212,24 , 8584,33 , 8617,57 , 2162,14 , 8584,33 , 8617,57 , 2162,14 , 243,11 , 221,8 , 276,7 , 5,17 , 22,23 , {66,65,77}, 150,2 , 11687,174 , 13,5 , 4,0 , 3493,6 , 591,19 , 2, 1, 1, 6, 7 }, // Serbian/Latin/BosniaAndHerzegowina
- { 100, 7, 242, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 154,7 , 154,7 , 995,7 , 1002,20 , 37,5 , 8,10 , 16073,58 , 16131,81 , 16212,24 , 16073,58 , 16131,81 , 16212,24 , 8584,33 , 8617,57 , 2162,14 , 8584,33 , 8617,57 , 2162,14 , 243,11 , 221,8 , 276,7 , 5,17 , 22,23 , {69,85,82}, 14,1 , 11861,23 , 13,5 , 4,0 , 3493,6 , 3499,9 , 2, 1, 1, 6, 7 }, // Serbian/Latin/Montenegro
- { 100, 7, 243, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 154,7 , 154,7 , 995,7 , 1002,20 , 37,5 , 8,10 , 16236,48 , 16131,81 , 16212,24 , 16236,48 , 16131,81 , 16212,24 , 8674,28 , 8702,54 , 2162,14 , 8674,28 , 8702,54 , 2162,14 , 254,9 , 221,8 , 276,7 , 5,17 , 22,23 , {82,83,68}, 299,3 , 11884,58 , 13,5 , 4,0 , 3493,6 , 3508,6 , 0, 0, 1, 6, 7 }, // Serbian/Latin/Serbia
- { 100, 7, 257, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 154,7 , 154,7 , 995,7 , 1002,20 , 37,5 , 8,10 , 16073,58 , 16131,81 , 16212,24 , 16073,58 , 16131,81 , 16212,24 , 8584,33 , 8702,54 , 2162,14 , 8584,33 , 8702,54 , 2162,14 , 254,9 , 221,8 , 276,7 , 5,17 , 22,23 , {69,85,82}, 14,1 , 11861,23 , 13,5 , 4,0 , 3493,6 , 3514,6 , 2, 1, 1, 6, 7 }, // Serbian/Latin/Kosovo
- { 101, 2, 81, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 534,9 , 534,9 , 175,8 , 1022,23 , 37,5 , 8,10 , 16284,63 , 16347,82 , 10970,24 , 16429,60 , 16489,86 , 10970,24 , 8756,28 , 8784,61 , 8845,14 , 8859,28 , 8887,61 , 8845,14 , 263,15 , 229,15 , 45,4 , 5,17 , 22,23 , {71,69,76}, 236,1 , 11942,17 , 8,5 , 4,0 , 3520,4 , 3524,11 , 2, 1, 1, 6, 7 }, // Ossetic/Cyrillic/Georgia
- { 101, 2, 178, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 534,9 , 534,9 , 175,8 , 1022,23 , 37,5 , 8,10 , 16284,63 , 16347,82 , 10970,24 , 16429,60 , 16489,86 , 10970,24 , 8756,28 , 8784,61 , 8845,14 , 8859,28 , 8887,61 , 8845,14 , 263,15 , 229,15 , 45,4 , 5,17 , 22,23 , {82,85,66}, 129,1 , 11959,17 , 8,5 , 4,0 , 3520,4 , 3535,6 , 2, 1, 1, 6, 7 }, // Ossetic/Cyrillic/Russia
+ { 87, 26, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 504,8 , 512,7 , 543,6 , 35,18 , 18,7 , 25,12 , 13870,86 , 13870,86 , 13956,32 , 13870,86 , 13870,86 , 13956,32 , 7281,33 , 7314,54 , 7368,18 , 7281,33 , 7314,54 , 7368,18 , 0,2 , 0,2 , 642,5 , 5,17 , 22,23 , {73,78,82}, 117,1 , 9843,43 , 8,5 , 4,0 , 3060,5 , 3065,4 , 2, 1, 7, 7, 7 }, // Oriya/Oriya/India
+ { 88, 1, 1, 1643, 1644, 1563, 1642, 1776, 45, 43, 101, 8220, 8221, 8216, 8217, 46,6 , 46,6 , 519,9 , 528,8 , 412,8 , 965,20 , 55,4 , 401,11 , 13988,68 , 14056,69 , 158,27 , 14125,69 , 14125,69 , 14194,24 , 7386,39 , 7386,39 , 85,14 , 7386,39 , 7386,39 , 85,14 , 193,4 , 183,4 , 0,5 , 5,17 , 22,23 , {65,70,78}, 262,1 , 9886,25 , 13,5 , 4,0 , 3069,4 , 3073,9 , 0, 0, 6, 4, 5 }, // Pashto/Arabic/Afghanistan
+ { 89, 1, 102, 1643, 1644, 1563, 1642, 1776, 45, 43, 101, 171, 187, 8249, 8250, 536,7 , 536,7 , 543,8 , 551,7 , 412,8 , 98,16 , 55,4 , 401,11 , 14218,70 , 14218,70 , 14288,24 , 14312,74 , 14312,74 , 14288,24 , 7425,49 , 7425,49 , 7474,14 , 7425,49 , 7425,49 , 7474,14 , 197,9 , 187,8 , 647,4 , 651,39 , 22,23 , {73,82,82}, 263,4 , 9911,37 , 78,5 , 4,0 , 3082,5 , 3087,5 , 0, 0, 6, 5, 5 }, // Persian/Arabic/Iran
+ { 89, 1, 1, 1643, 1644, 1563, 1642, 1776, 45, 43, 101, 171, 187, 8249, 8250, 536,7 , 536,7 , 543,8 , 551,7 , 412,8 , 98,16 , 55,4 , 401,11 , 14386,68 , 14386,68 , 14194,24 , 14454,62 , 14386,68 , 14194,24 , 7425,49 , 7425,49 , 7474,14 , 7425,49 , 7425,49 , 7474,14 , 197,9 , 187,8 , 647,4 , 651,39 , 22,23 , {65,70,78}, 262,1 , 9948,55 , 8,5 , 4,0 , 3092,3 , 3073,9 , 0, 0, 6, 4, 5 }, // Persian/Arabic/Afghanistan
+ { 90, 7, 172, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8221, 171, 187, 0,6 , 0,6 , 163,7 , 163,7 , 955,10 , 10,17 , 37,5 , 8,10 , 14516,48 , 14564,97 , 14661,24 , 14516,48 , 14685,99 , 14784,24 , 7488,34 , 7522,59 , 7581,14 , 7488,34 , 7522,59 , 7595,14 , 0,2 , 0,2 , 320,5 , 5,17 , 22,23 , {80,76,78}, 267,2 , 10003,77 , 13,5 , 4,0 , 3095,6 , 3101,6 , 2, 1, 1, 6, 7 }, // Polish/Latin/Poland
+ { 91, 7, 30, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 245,7 , 245,7 , 120,10 , 614,27 , 37,5 , 8,10 , 14808,48 , 14856,89 , 134,24 , 14808,48 , 14856,89 , 134,24 , 7609,28 , 7637,79 , 7716,14 , 7609,28 , 7637,79 , 7716,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {66,82,76}, 269,2 , 10080,54 , 8,5 , 4,0 , 3107,9 , 3116,6 , 2, 1, 7, 6, 7 }, // Portuguese/Latin/Brazil
+ { 91, 7, 6, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 245,7 , 245,7 , 27,8 , 614,27 , 37,5 , 8,10 , 14808,48 , 14856,89 , 134,24 , 14808,48 , 14856,89 , 134,24 , 7730,49 , 7637,79 , 7716,14 , 7730,49 , 7637,79 , 7716,14 , 206,8 , 195,8 , 0,5 , 5,17 , 22,23 , {65,79,65}, 246,2 , 10134,54 , 13,5 , 4,0 , 3107,9 , 3122,6 , 2, 1, 1, 6, 7 }, // Portuguese/Latin/Angola
+ { 91, 7, 39, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 245,7 , 245,7 , 27,8 , 614,27 , 37,5 , 8,10 , 14808,48 , 14856,89 , 134,24 , 14808,48 , 14856,89 , 134,24 , 7730,49 , 7637,79 , 7716,14 , 7730,49 , 7637,79 , 7716,14 , 206,8 , 195,8 , 0,5 , 5,17 , 22,23 , {67,86,69}, 271,1 , 10188,69 , 13,5 , 4,0 , 3107,9 , 3128,10 , 2, 1, 1, 6, 7 }, // Portuguese/Latin/CapeVerde
+ { 91, 7, 62, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 245,7 , 245,7 , 27,8 , 614,27 , 37,5 , 8,10 , 14808,48 , 14856,89 , 134,24 , 14808,48 , 14856,89 , 134,24 , 7730,49 , 7637,79 , 7716,14 , 7730,49 , 7637,79 , 7716,14 , 206,8 , 195,8 , 0,5 , 5,17 , 22,23 , {85,83,68}, 155,3 , 10257,81 , 13,5 , 4,0 , 3107,9 , 3138,11 , 2, 1, 1, 6, 7 }, // Portuguese/Latin/EastTimor
+ { 91, 7, 66, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 245,7 , 245,7 , 27,8 , 614,27 , 37,5 , 8,10 , 14808,48 , 14856,89 , 134,24 , 14808,48 , 14856,89 , 134,24 , 7730,49 , 7637,79 , 7716,14 , 7730,49 , 7637,79 , 7716,14 , 206,8 , 195,8 , 0,5 , 5,17 , 22,23 , {88,65,70}, 32,4 , 10338,59 , 13,5 , 4,0 , 3107,9 , 3149,16 , 0, 0, 1, 6, 7 }, // Portuguese/Latin/EquatorialGuinea
+ { 91, 7, 92, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 245,7 , 245,7 , 27,8 , 614,27 , 37,5 , 8,10 , 14808,48 , 14856,89 , 134,24 , 14808,48 , 14856,89 , 134,24 , 7730,49 , 7637,79 , 7716,14 , 7730,49 , 7637,79 , 7716,14 , 206,8 , 195,8 , 0,5 , 5,17 , 22,23 , {88,79,70}, 200,3 , 10397,62 , 13,5 , 4,0 , 3107,9 , 3165,12 , 0, 0, 1, 6, 7 }, // Portuguese/Latin/GuineaBissau
+ { 91, 7, 125, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 245,7 , 245,7 , 27,8 , 614,27 , 37,5 , 8,10 , 14808,48 , 14856,89 , 134,24 , 14808,48 , 14856,89 , 134,24 , 7730,49 , 7637,79 , 7716,14 , 7730,49 , 7637,79 , 7716,14 , 206,8 , 195,8 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3102,20 , 13,5 , 4,0 , 3107,9 , 3177,10 , 2, 1, 1, 6, 7 }, // Portuguese/Latin/Luxembourg
+ { 91, 7, 126, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 245,7 , 245,7 , 27,8 , 614,27 , 18,7 , 25,12 , 14808,48 , 14856,89 , 134,24 , 14808,48 , 14856,89 , 134,24 , 7730,49 , 7637,79 , 7716,14 , 7730,49 , 7637,79 , 7716,14 , 206,8 , 195,8 , 0,5 , 5,17 , 22,23 , {77,79,80}, 133,4 , 10459,53 , 13,5 , 4,0 , 3107,9 , 3187,19 , 2, 1, 7, 6, 7 }, // Portuguese/Latin/Macau
+ { 91, 7, 146, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 245,7 , 245,7 , 27,8 , 614,27 , 37,5 , 8,10 , 14808,48 , 14856,89 , 134,24 , 14808,48 , 14856,89 , 134,24 , 7730,49 , 7637,79 , 7716,14 , 7730,49 , 7637,79 , 7716,14 , 206,8 , 195,8 , 0,5 , 5,17 , 22,23 , {77,90,78}, 272,3 , 10512,72 , 13,5 , 4,0 , 3107,9 , 3206,10 , 2, 1, 7, 6, 7 }, // Portuguese/Latin/Mozambique
+ { 91, 7, 173, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 245,7 , 245,7 , 27,8 , 614,27 , 37,5 , 8,10 , 14808,48 , 14856,89 , 134,24 , 14808,48 , 14856,89 , 134,24 , 7730,49 , 7637,79 , 7716,14 , 7730,49 , 7637,79 , 7716,14 , 206,8 , 195,8 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3102,20 , 13,5 , 4,0 , 3216,17 , 3233,8 , 2, 1, 1, 6, 7 }, // Portuguese/Latin/Portugal
+ { 91, 7, 185, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 245,7 , 245,7 , 27,8 , 614,27 , 37,5 , 8,10 , 14808,48 , 14856,89 , 134,24 , 14808,48 , 14856,89 , 134,24 , 7730,49 , 7637,79 , 7716,14 , 7730,49 , 7637,79 , 7716,14 , 206,8 , 195,8 , 0,5 , 5,17 , 22,23 , {83,84,78}, 275,2 , 10584,104 , 13,5 , 4,0 , 3107,9 , 3241,19 , 2, 1, 1, 6, 7 }, // Portuguese/Latin/SaoTomeAndPrincipe
+ { 91, 7, 206, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 245,7 , 245,7 , 27,8 , 614,27 , 37,5 , 8,10 , 14808,48 , 14856,89 , 134,24 , 14808,48 , 14856,89 , 134,24 , 7730,49 , 7637,79 , 7716,14 , 7730,49 , 7637,79 , 7716,14 , 206,8 , 195,8 , 0,5 , 5,17 , 22,23 , {67,72,70}, 217,3 , 10688,45 , 13,5 , 4,0 , 3107,9 , 3260,5 , 2, 0, 1, 6, 7 }, // Portuguese/Latin/Switzerland
+ { 92, 4, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 558,9 , 558,9 , 287,6 , 10,17 , 18,7 , 25,12 , 14945,50 , 14995,68 , 15063,28 , 14945,50 , 14995,68 , 15063,28 , 7779,36 , 7815,57 , 7872,23 , 7779,36 , 7815,57 , 7872,23 , 214,6 , 203,6 , 690,4 , 5,17 , 22,23 , {73,78,82}, 117,1 , 10733,39 , 4,4 , 4,0 , 3265,6 , 3271,4 , 2, 1, 7, 7, 7 }, // Punjabi/Gurmukhi/India
+ { 92, 1, 163, 1643, 1644, 1563, 1642, 1776, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 80,18 , 18,7 , 25,12 , 15091,67 , 15091,67 , 158,27 , 15091,67 , 15091,67 , 158,27 , 7895,37 , 7895,37 , 85,14 , 7895,37 , 7895,37 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {80,75,82}, 277,1 , 10772,13 , 83,6 , 4,0 , 3275,6 , 3281,7 , 0, 0, 7, 6, 7 }, // Punjabi/Arabic/Pakistan
+ { 93, 7, 169, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 210,18 , 37,5 , 8,10 , 15158,48 , 15206,88 , 158,27 , 15158,48 , 15206,88 , 158,27 , 7932,28 , 7960,53 , 8013,14 , 7932,28 , 7960,53 , 8013,14 , 66,4 , 63,4 , 45,4 , 5,17 , 22,23 , {80,69,78}, 278,2 , 0,7 , 8,5 , 4,0 , 3288,8 , 3296,4 , 2, 1, 7, 6, 7 }, // Quechua/Latin/Peru
+ { 93, 7, 26, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 210,18 , 37,5 , 8,10 , 15158,48 , 15206,88 , 158,27 , 15158,48 , 15206,88 , 158,27 , 7932,28 , 7960,53 , 8013,14 , 7932,28 , 7960,53 , 8013,14 , 66,4 , 63,4 , 45,4 , 5,17 , 22,23 , {66,79,66}, 280,2 , 0,7 , 8,5 , 4,0 , 3288,8 , 3300,7 , 2, 1, 1, 6, 7 }, // Quechua/Latin/Bolivia
+ { 93, 7, 63, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 210,18 , 37,5 , 8,10 , 15158,48 , 15206,88 , 158,27 , 15158,48 , 15206,88 , 158,27 , 7932,28 , 7960,53 , 8013,14 , 7932,28 , 7960,53 , 8013,14 , 66,4 , 63,4 , 45,4 , 5,17 , 22,23 , {85,83,68}, 6,1 , 0,7 , 8,5 , 4,0 , 3288,8 , 3307,7 , 2, 1, 1, 6, 7 }, // Quechua/Latin/Ecuador
+ { 94, 7, 206, 46, 8217, 59, 37, 48, 8722, 43, 101, 171, 187, 8249, 8250, 0,6 , 0,6 , 0,6 , 0,6 , 357,8 , 985,28 , 37,5 , 8,10 , 15294,67 , 15361,92 , 15453,24 , 15294,67 , 15361,92 , 15453,24 , 8027,23 , 8050,56 , 8106,14 , 8027,23 , 8050,56 , 8106,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {67,72,70}, 217,3 , 10785,46 , 13,5 , 4,0 , 3314,9 , 3323,6 , 2, 0, 1, 6, 7 }, // Romansh/Latin/Switzerland
+ { 95, 7, 177, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8221, 171, 187, 0,6 , 0,6 , 567,8 , 567,8 , 955,10 , 10,17 , 37,5 , 8,10 , 15477,60 , 15537,98 , 15635,24 , 15477,60 , 15537,98 , 15635,24 , 8120,34 , 8154,48 , 3064,14 , 8120,34 , 8154,48 , 3064,14 , 66,4 , 63,4 , 694,4 , 5,17 , 22,23 , {82,79,78}, 282,3 , 10831,57 , 13,5 , 4,0 , 3329,6 , 3335,7 , 2, 1, 1, 6, 7 }, // Romanian/Latin/Romania
+ { 95, 7, 141, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8221, 171, 187, 0,6 , 0,6 , 567,8 , 567,8 , 955,10 , 10,17 , 37,5 , 8,10 , 15477,60 , 15537,98 , 15635,24 , 15477,60 , 15537,98 , 15635,24 , 8202,28 , 8154,48 , 8230,16 , 8202,28 , 8154,48 , 8230,16 , 66,4 , 63,4 , 694,4 , 5,17 , 22,23 , {77,68,76}, 285,1 , 10888,69 , 13,5 , 4,0 , 3329,6 , 3342,17 , 2, 1, 1, 6, 7 }, // Romanian/Latin/Moldova
+ { 96, 2, 178, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 116,7 , 116,7 , 955,10 , 335,22 , 55,4 , 59,9 , 15659,62 , 11096,80 , 11013,24 , 15721,62 , 15783,82 , 11013,24 , 8246,21 , 8267,62 , 8329,14 , 8246,21 , 8267,62 , 8246,21 , 0,2 , 0,2 , 263,5 , 565,17 , 22,23 , {82,85,66}, 119,1 , 10957,89 , 13,5 , 4,0 , 3359,7 , 3366,6 , 2, 1, 1, 6, 7 }, // Russian/Cyrillic/Russia
+ { 96, 2, 20, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 116,7 , 116,7 , 955,10 , 335,22 , 55,4 , 59,9 , 15659,62 , 11096,80 , 11013,24 , 15721,62 , 15783,82 , 11013,24 , 8246,21 , 8267,62 , 8329,14 , 8246,21 , 8267,62 , 8246,21 , 0,2 , 0,2 , 263,5 , 565,17 , 22,23 , {66,89,78}, 0,2 , 11046,94 , 13,5 , 4,0 , 3359,7 , 472,8 , 2, 0, 1, 6, 7 }, // Russian/Cyrillic/Belarus
+ { 96, 2, 110, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 116,7 , 116,7 , 955,10 , 335,22 , 55,4 , 59,9 , 15659,62 , 11096,80 , 11013,24 , 15721,62 , 15783,82 , 11013,24 , 8246,21 , 8267,62 , 8329,14 , 8246,21 , 8267,62 , 8246,21 , 0,2 , 0,2 , 263,5 , 565,17 , 22,23 , {75,90,84}, 236,1 , 11140,83 , 13,5 , 4,0 , 3359,7 , 3372,9 , 2, 1, 1, 6, 7 }, // Russian/Cyrillic/Kazakhstan
+ { 96, 2, 116, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 116,7 , 116,7 , 955,10 , 335,22 , 55,4 , 59,9 , 15659,62 , 11096,80 , 11013,24 , 15721,62 , 15783,82 , 11013,24 , 8246,21 , 8267,62 , 8329,14 , 8246,21 , 8267,62 , 8246,21 , 0,2 , 0,2 , 263,5 , 565,17 , 22,23 , {75,71,83}, 237,3 , 11223,82 , 13,5 , 4,0 , 3359,7 , 3381,8 , 2, 1, 1, 6, 7 }, // Russian/Cyrillic/Kyrgyzstan
+ { 96, 2, 141, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 116,7 , 116,7 , 955,10 , 335,22 , 55,4 , 59,9 , 15659,62 , 11096,80 , 11013,24 , 15721,62 , 15783,82 , 11013,24 , 8246,21 , 8267,62 , 8329,14 , 8246,21 , 8267,62 , 8246,21 , 0,2 , 0,2 , 263,5 , 565,17 , 22,23 , {77,68,76}, 285,1 , 11305,79 , 13,5 , 4,0 , 3359,7 , 3389,7 , 2, 1, 1, 6, 7 }, // Russian/Cyrillic/Moldova
+ { 96, 2, 222, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 116,7 , 116,7 , 955,10 , 335,22 , 37,5 , 8,10 , 15659,62 , 11096,80 , 11013,24 , 15721,62 , 15783,82 , 11013,24 , 8246,21 , 8267,62 , 8329,14 , 8246,21 , 8267,62 , 8246,21 , 0,2 , 0,2 , 263,5 , 565,17 , 22,23 , {85,65,72}, 286,1 , 11384,92 , 13,5 , 4,0 , 3359,7 , 3396,7 , 2, 1, 1, 6, 7 }, // Russian/Cyrillic/Ukraine
+ { 98, 7, 41, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 37,5 , 8,10 , 15865,48 , 15913,91 , 16004,24 , 15865,48 , 15913,91 , 16004,24 , 8343,28 , 8371,66 , 8437,14 , 8343,28 , 8371,66 , 8437,14 , 220,2 , 209,2 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 11476,25 , 4,4 , 36,5 , 3403,5 , 3408,22 , 0, 0, 1, 6, 7 }, // Sango/Latin/CentralAfricanRepublic
+ { 99, 13, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {73,78,82}, 117,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 7, 7 }, // Sanskrit/Devanagari/India
+ { 100, 2, 243, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 116,7 , 116,7 , 1013,7 , 1020,20 , 37,5 , 8,10 , 16028,48 , 16076,81 , 12392,24 , 16028,48 , 16076,81 , 12392,24 , 8451,28 , 8479,52 , 8531,14 , 8451,28 , 8479,52 , 8531,14 , 222,9 , 211,8 , 698,7 , 5,17 , 22,23 , {82,83,68}, 287,3 , 11501,58 , 13,5 , 4,0 , 3430,6 , 3436,6 , 0, 0, 1, 6, 7 }, // Serbian/Cyrillic/Serbia
+ { 100, 2, 27, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 116,7 , 116,7 , 1013,7 , 1020,20 , 37,5 , 8,10 , 16157,58 , 16076,81 , 12392,24 , 16157,58 , 16076,81 , 12392,24 , 8545,33 , 8578,55 , 8531,14 , 8545,33 , 8578,55 , 8531,14 , 231,11 , 211,8 , 698,7 , 5,17 , 22,23 , {66,65,77}, 290,2 , 11559,174 , 13,5 , 4,0 , 3430,6 , 3442,19 , 2, 1, 1, 6, 7 }, // Serbian/Cyrillic/BosniaAndHerzegowina
+ { 100, 2, 242, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 116,7 , 116,7 , 1013,7 , 1020,20 , 37,5 , 8,10 , 16157,58 , 16076,81 , 12392,24 , 16157,58 , 16076,81 , 12392,24 , 8545,33 , 8578,55 , 8531,14 , 8545,33 , 8578,55 , 8531,14 , 231,11 , 211,8 , 698,7 , 5,17 , 22,23 , {69,85,82}, 14,1 , 11733,23 , 13,5 , 4,0 , 3430,6 , 3461,9 , 2, 1, 1, 6, 7 }, // Serbian/Cyrillic/Montenegro
+ { 100, 2, 257, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 116,7 , 116,7 , 1013,7 , 1020,20 , 37,5 , 8,10 , 16157,58 , 16076,81 , 12392,24 , 16157,58 , 16076,81 , 12392,24 , 8545,33 , 8479,52 , 8531,14 , 8545,33 , 8479,52 , 8531,14 , 222,9 , 211,8 , 698,7 , 5,17 , 22,23 , {69,85,82}, 14,1 , 11733,23 , 13,5 , 4,0 , 3430,6 , 3470,6 , 2, 1, 1, 6, 7 }, // Serbian/Cyrillic/Kosovo
+ { 100, 7, 27, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 163,7 , 163,7 , 1013,7 , 1020,20 , 37,5 , 8,10 , 16215,58 , 16273,81 , 16354,24 , 16215,58 , 16273,81 , 16354,24 , 8633,33 , 8666,57 , 2172,14 , 8633,33 , 8666,57 , 2172,14 , 242,11 , 219,8 , 313,7 , 5,17 , 22,23 , {66,65,77}, 140,2 , 11756,174 , 13,5 , 4,0 , 3476,6 , 591,19 , 2, 1, 1, 6, 7 }, // Serbian/Latin/BosniaAndHerzegowina
+ { 100, 7, 242, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 163,7 , 163,7 , 1013,7 , 1020,20 , 37,5 , 8,10 , 16215,58 , 16273,81 , 16354,24 , 16215,58 , 16273,81 , 16354,24 , 8633,33 , 8666,57 , 2172,14 , 8633,33 , 8666,57 , 2172,14 , 242,11 , 219,8 , 313,7 , 5,17 , 22,23 , {69,85,82}, 14,1 , 11930,23 , 13,5 , 4,0 , 3476,6 , 3482,9 , 2, 1, 1, 6, 7 }, // Serbian/Latin/Montenegro
+ { 100, 7, 243, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 163,7 , 163,7 , 1013,7 , 1020,20 , 37,5 , 8,10 , 16378,48 , 16273,81 , 16354,24 , 16378,48 , 16273,81 , 16354,24 , 8723,28 , 8751,54 , 2172,14 , 8723,28 , 8751,54 , 2172,14 , 253,9 , 219,8 , 313,7 , 5,17 , 22,23 , {82,83,68}, 287,3 , 11953,58 , 13,5 , 4,0 , 3476,6 , 3491,6 , 0, 0, 1, 6, 7 }, // Serbian/Latin/Serbia
+ { 100, 7, 257, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 163,7 , 163,7 , 1013,7 , 1020,20 , 37,5 , 8,10 , 16215,58 , 16273,81 , 16354,24 , 16215,58 , 16273,81 , 16354,24 , 8633,33 , 8751,54 , 2172,14 , 8633,33 , 8751,54 , 2172,14 , 253,9 , 219,8 , 313,7 , 5,17 , 22,23 , {69,85,82}, 14,1 , 11930,23 , 13,5 , 4,0 , 3476,6 , 3497,6 , 2, 1, 1, 6, 7 }, // Serbian/Latin/Kosovo
+ { 101, 2, 81, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 575,9 , 575,9 , 174,8 , 1040,23 , 37,5 , 8,10 , 16426,63 , 16489,82 , 11013,24 , 16571,60 , 16631,86 , 11013,24 , 8805,28 , 8833,61 , 8894,14 , 8908,28 , 8936,61 , 8894,14 , 262,15 , 227,15 , 45,4 , 5,17 , 22,23 , {71,69,76}, 224,1 , 12011,17 , 8,5 , 4,0 , 3503,4 , 3507,11 , 2, 1, 1, 6, 7 }, // Ossetic/Cyrillic/Georgia
+ { 101, 2, 178, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 575,9 , 575,9 , 174,8 , 1040,23 , 37,5 , 8,10 , 16426,63 , 16489,82 , 11013,24 , 16571,60 , 16631,86 , 11013,24 , 8805,28 , 8833,61 , 8894,14 , 8908,28 , 8936,61 , 8894,14 , 262,15 , 227,15 , 45,4 , 5,17 , 22,23 , {82,85,66}, 119,1 , 12028,17 , 8,5 , 4,0 , 3503,4 , 3518,6 , 2, 1, 1, 6, 7 }, // Ossetic/Cyrillic/Russia
{ 102, 7, 195, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {90,65,82}, 5,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 6, 7 }, // Southern Sotho/Latin/SouthAfrica
{ 103, 7, 195, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {90,65,82}, 5,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 6, 7 }, // Tswana/Latin/SouthAfrica
- { 104, 7, 240, 46, 44, 59, 37, 48, 45, 43, 101, 8221, 8221, 8217, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 16575,48 , 16623,100 , 16723,24 , 16575,48 , 16623,100 , 16723,24 , 8948,28 , 8976,55 , 9031,14 , 8948,28 , 8976,55 , 9031,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {85,83,68}, 165,3 , 11976,22 , 4,4 , 4,0 , 3541,8 , 1762,8 , 2, 1, 7, 6, 7 }, // Shona/Latin/Zimbabwe
- { 105, 1, 163, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {80,75,82}, 182,2 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 0, 0, 7, 6, 7 }, // Sindhi/Arabic/Pakistan
- { 106, 32, 198, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 543,9 , 552,8 , 53,10 , 63,17 , 200,5 , 205,10 , 16747,59 , 16806,96 , 16902,32 , 16934,61 , 16806,96 , 16902,32 , 9045,39 , 9084,62 , 9146,19 , 9045,39 , 9084,62 , 9146,19 , 278,5 , 244,4 , 663,5 , 668,37 , 22,23 , {76,75,82}, 304,3 , 11998,58 , 4,4 , 4,0 , 3549,5 , 3554,11 , 2, 1, 1, 6, 7 }, // Sinhala/Sinhala/SriLanka
+ { 104, 7, 240, 46, 44, 59, 37, 48, 45, 43, 101, 8221, 8221, 8217, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 16717,48 , 16765,100 , 16865,24 , 16717,48 , 16765,100 , 16865,24 , 8997,28 , 9025,55 , 9080,14 , 8997,28 , 9025,55 , 9080,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {85,83,68}, 155,3 , 12045,22 , 4,4 , 4,0 , 3524,8 , 1762,8 , 2, 1, 7, 6, 7 }, // Shona/Latin/Zimbabwe
+ { 105, 1, 163, 1643, 1644, 1563, 37, 1632, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 18,7 , 25,12 , 16889,72 , 16889,72 , 158,27 , 16889,72 , 16889,72 , 158,27 , 9094,35 , 9094,35 , 9129,21 , 9094,35 , 9094,35 , 9150,31 , 277,11 , 242,11 , 705,6 , 711,52 , 22,23 , {80,75,82}, 172,2 , 12067,43 , 8,5 , 4,0 , 3532,4 , 3536,7 , 0, 0, 7, 6, 7 }, // Sindhi/Arabic/Pakistan
+ { 106, 32, 198, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 584,9 , 593,8 , 53,10 , 63,17 , 228,5 , 233,10 , 16961,59 , 17020,96 , 17116,32 , 17148,61 , 17020,96 , 17116,32 , 9181,39 , 9220,62 , 9282,19 , 9181,39 , 9220,62 , 9282,19 , 288,5 , 253,4 , 763,5 , 768,37 , 22,23 , {76,75,82}, 292,3 , 12110,58 , 4,4 , 4,0 , 3543,5 , 3548,11 , 2, 1, 1, 6, 7 }, // Sinhala/Sinhala/SriLanka
{ 107, 7, 195, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {90,65,82}, 5,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 6, 7 }, // Swati/Latin/SouthAfrica
- { 108, 7, 191, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 176,7 , 560,7 , 1045,10 , 532,18 , 55,4 , 59,9 , 16995,48 , 17043,82 , 16212,24 , 16995,48 , 17125,89 , 16212,24 , 9165,21 , 9186,52 , 9238,14 , 9165,21 , 9186,52 , 9238,14 , 0,2 , 0,2 , 283,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 12056,26 , 13,5 , 4,0 , 3565,10 , 3575,9 , 2, 1, 1, 6, 7 }, // Slovak/Latin/Slovakia
- { 109, 7, 192, 44, 46, 59, 37, 48, 8722, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 567,8 , 567,8 , 1055,9 , 1064,19 , 37,5 , 8,10 , 17214,59 , 17273,86 , 16212,24 , 17214,59 , 17273,86 , 16212,24 , 9252,35 , 9287,52 , 9339,14 , 9252,35 , 9287,52 , 9339,14 , 60,4 , 248,4 , 54,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 12082,28 , 13,5 , 4,0 , 3584,11 , 3595,9 , 2, 1, 1, 6, 7 }, // Slovenian/Latin/Slovenia
- { 110, 7, 194, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 27,8 , 1083,19 , 18,7 , 25,12 , 17359,48 , 17407,189 , 17596,24 , 17359,48 , 17407,189 , 17596,24 , 9353,28 , 9381,47 , 9428,15 , 9353,28 , 9381,47 , 9428,15 , 283,3 , 252,3 , 45,4 , 5,17 , 22,23 , {83,79,83}, 100,1 , 12110,22 , 4,4 , 4,0 , 3604,8 , 3612,10 , 0, 0, 1, 6, 7 }, // Somali/Latin/Somalia
- { 110, 7, 59, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 27,8 , 1083,19 , 18,7 , 25,12 , 17359,48 , 17407,189 , 17596,24 , 17359,48 , 17407,189 , 17596,24 , 9353,28 , 9381,47 , 9428,15 , 9353,28 , 9381,47 , 9428,15 , 283,3 , 252,3 , 45,4 , 5,17 , 22,23 , {68,74,70}, 43,3 , 12132,21 , 4,4 , 4,0 , 3604,8 , 3622,7 , 0, 0, 6, 6, 7 }, // Somali/Latin/Djibouti
- { 110, 7, 69, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 27,8 , 1083,19 , 18,7 , 25,12 , 17359,48 , 17407,189 , 17596,24 , 17359,48 , 17407,189 , 17596,24 , 9353,28 , 9381,47 , 9428,15 , 9353,28 , 9381,47 , 9428,15 , 283,3 , 252,3 , 45,4 , 5,17 , 22,23 , {69,84,66}, 0,2 , 12153,22 , 4,4 , 4,0 , 3604,8 , 3629,8 , 2, 1, 7, 6, 7 }, // Somali/Latin/Ethiopia
- { 110, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 27,8 , 1083,19 , 37,5 , 8,10 , 17359,48 , 17407,189 , 17596,24 , 17359,48 , 17407,189 , 17596,24 , 9353,28 , 9381,47 , 9428,15 , 9353,28 , 9381,47 , 9428,15 , 283,3 , 252,3 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 0,7 , 4,4 , 4,0 , 3604,8 , 3637,7 , 2, 1, 7, 6, 7 }, // Somali/Latin/Kenya
- { 111, 7, 197, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 278,6 , 587,27 , 55,4 , 356,11 , 17620,61 , 17681,89 , 17770,24 , 17620,61 , 17681,89 , 17770,24 , 9443,35 , 9478,53 , 7964,14 , 9443,35 , 9478,53 , 7964,14 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3057,20 , 13,5 , 4,0 , 3644,17 , 2354,6 , 2, 1, 1, 6, 7 }, // Spanish/Latin/Spain
- { 111, 7, 10, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 278,6 , 587,27 , 37,5 , 8,10 , 17794,60 , 17681,89 , 17770,24 , 17794,60 , 17681,89 , 17854,24 , 9443,35 , 9478,53 , 3054,14 , 9443,35 , 9478,53 , 3054,14 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {65,82,83}, 6,1 , 12175,51 , 8,5 , 4,0 , 3661,7 , 3668,9 , 2, 1, 7, 6, 7 }, // Spanish/Latin/Argentina
- { 111, 7, 22, 46, 44, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 278,6 , 587,27 , 37,5 , 8,10 , 17794,60 , 17681,89 , 17770,24 , 17794,60 , 17681,89 , 17854,24 , 9443,35 , 9478,53 , 3054,14 , 9443,35 , 9478,53 , 9531,14 , 64,4 , 61,4 , 0,5 , 5,17 , 22,23 , {66,90,68}, 6,1 , 12226,52 , 4,4 , 4,0 , 3661,7 , 3677,6 , 2, 1, 7, 6, 7 }, // Spanish/Latin/Belize
- { 111, 7, 26, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 278,6 , 587,27 , 37,5 , 8,10 , 17794,60 , 17681,89 , 17770,24 , 17794,60 , 17681,89 , 17770,24 , 9443,35 , 9478,53 , 3054,14 , 9443,35 , 9478,53 , 9531,14 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {66,79,66}, 292,2 , 12278,35 , 4,4 , 4,0 , 3661,7 , 3304,7 , 2, 1, 1, 6, 7 }, // Spanish/Latin/Bolivia
- { 111, 7, 30, 46, 44, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 278,6 , 587,27 , 37,5 , 8,10 , 17794,60 , 17681,89 , 17770,24 , 17794,60 , 17681,89 , 17854,24 , 9443,35 , 9478,53 , 3054,14 , 9443,35 , 9478,53 , 9531,14 , 64,4 , 61,4 , 0,5 , 5,17 , 22,23 , {66,82,76}, 281,2 , 12313,52 , 4,4 , 4,0 , 3661,7 , 3120,6 , 2, 1, 7, 6, 7 }, // Spanish/Latin/Brazil
- { 111, 7, 43, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 348,8 , 587,27 , 37,5 , 8,10 , 17620,61 , 17681,89 , 17770,24 , 17794,60 , 17681,89 , 17854,24 , 9443,35 , 9478,53 , 3054,14 , 9443,35 , 9478,53 , 9531,14 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {67,76,80}, 6,1 , 12365,45 , 4,4 , 36,5 , 3661,7 , 3683,5 , 0, 0, 1, 6, 7 }, // Spanish/Latin/Chile
- { 111, 7, 47, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 509,7 , 587,27 , 18,7 , 25,12 , 17620,61 , 17681,89 , 17770,24 , 17794,60 , 17681,89 , 17854,24 , 9443,35 , 9478,53 , 9531,14 , 9443,35 , 9478,53 , 3054,14 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {67,79,80}, 6,1 , 12410,54 , 8,5 , 4,0 , 3661,7 , 3688,8 , 0, 0, 7, 6, 7 }, // Spanish/Latin/Colombia
- { 111, 7, 52, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 278,6 , 587,27 , 37,5 , 8,10 , 17794,60 , 17681,89 , 17770,24 , 17794,60 , 17681,89 , 17854,24 , 9443,35 , 9478,53 , 3054,14 , 9443,35 , 9478,53 , 9531,14 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {67,82,67}, 307,1 , 12464,67 , 4,4 , 4,0 , 3661,7 , 3696,10 , 2, 0, 1, 6, 7 }, // Spanish/Latin/CostaRica
- { 111, 7, 55, 46, 44, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 278,6 , 587,27 , 37,5 , 8,10 , 17794,60 , 17681,89 , 17770,24 , 17794,60 , 17681,89 , 17854,24 , 9443,35 , 9478,53 , 3054,14 , 9443,35 , 9478,53 , 9531,14 , 64,4 , 61,4 , 0,5 , 5,17 , 22,23 , {67,85,80}, 6,1 , 12531,42 , 4,4 , 4,0 , 3661,7 , 3706,4 , 2, 1, 1, 6, 7 }, // Spanish/Latin/Cuba
- { 111, 7, 61, 46, 44, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 278,6 , 587,27 , 18,7 , 25,12 , 17794,60 , 17681,89 , 17770,24 , 17794,60 , 17681,89 , 17854,24 , 9443,35 , 9478,53 , 3054,14 , 9443,35 , 9478,53 , 3054,14 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {68,79,80}, 308,3 , 12573,54 , 4,4 , 85,6 , 3661,7 , 3710,20 , 2, 1, 7, 6, 7 }, // Spanish/Latin/DominicanRepublic
- { 111, 7, 63, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 278,6 , 587,27 , 37,5 , 8,10 , 17794,60 , 17681,89 , 17770,24 , 17794,60 , 17681,89 , 17854,24 , 9443,35 , 9478,53 , 3054,14 , 9443,35 , 9478,53 , 9531,14 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {85,83,68}, 6,1 , 12627,70 , 4,4 , 36,5 , 3661,7 , 3311,7 , 2, 1, 1, 6, 7 }, // Spanish/Latin/Ecuador
- { 111, 7, 65, 46, 44, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 278,6 , 587,27 , 37,5 , 8,10 , 17794,60 , 17681,89 , 17770,24 , 17794,60 , 17681,89 , 17854,24 , 9443,35 , 9478,53 , 3054,14 , 9443,35 , 9478,53 , 9531,14 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {85,83,68}, 6,1 , 12627,70 , 4,4 , 4,0 , 3661,7 , 3730,11 , 2, 1, 7, 6, 7 }, // Spanish/Latin/ElSalvador
- { 111, 7, 66, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 278,6 , 587,27 , 55,4 , 356,11 , 17620,61 , 17681,89 , 17770,24 , 17620,61 , 17681,89 , 17770,24 , 9443,35 , 9478,53 , 7964,14 , 9443,35 , 9478,53 , 7964,14 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {88,65,70}, 32,4 , 12697,53 , 4,4 , 4,0 , 3661,7 , 3741,17 , 0, 0, 1, 6, 7 }, // Spanish/Latin/EquatorialGuinea
- { 111, 7, 90, 46, 44, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 509,7 , 587,27 , 37,5 , 8,10 , 17794,60 , 17681,89 , 17770,24 , 17794,60 , 17681,89 , 17854,24 , 9443,35 , 9478,53 , 3054,14 , 9443,35 , 9478,53 , 9531,14 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {71,84,81}, 311,1 , 12750,30 , 18,5 , 4,0 , 3661,7 , 3758,9 , 2, 1, 7, 6, 7 }, // Spanish/Latin/Guatemala
- { 111, 7, 96, 46, 44, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 278,6 , 1102,27 , 37,5 , 8,10 , 17794,60 , 17681,89 , 17770,24 , 17794,60 , 17681,89 , 17854,24 , 9443,35 , 9478,53 , 3054,14 , 9443,35 , 9478,53 , 9531,14 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {72,78,76}, 297,1 , 12780,60 , 4,4 , 4,0 , 3661,7 , 3767,8 , 2, 1, 7, 6, 7 }, // Spanish/Latin/Honduras
- { 111, 7, 139, 46, 44, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 27,8 , 587,27 , 37,5 , 8,10 , 17794,60 , 17681,89 , 17770,24 , 17878,48 , 17681,89 , 17854,24 , 9443,35 , 9478,53 , 3054,14 , 9443,35 , 9478,53 , 3054,14 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {77,88,78}, 6,1 , 12840,48 , 4,4 , 4,0 , 3775,17 , 3792,6 , 2, 1, 7, 6, 7 }, // Spanish/Latin/Mexico
- { 111, 7, 155, 46, 44, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 278,6 , 587,27 , 37,5 , 8,10 , 17794,60 , 17681,89 , 17770,24 , 17794,60 , 17681,89 , 17854,24 , 9443,35 , 9478,53 , 3054,14 , 9443,35 , 9478,53 , 9531,14 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {78,73,79}, 312,2 , 12888,69 , 4,4 , 4,0 , 3661,7 , 3798,9 , 2, 1, 7, 6, 7 }, // Spanish/Latin/Nicaragua
- { 111, 7, 166, 46, 44, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 1129,8 , 587,27 , 18,7 , 25,12 , 17794,60 , 17681,89 , 17770,24 , 17794,60 , 17681,89 , 17770,24 , 9443,35 , 9478,53 , 3054,14 , 9443,35 , 9478,53 , 9531,14 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {80,65,66}, 314,3 , 12957,54 , 4,4 , 4,0 , 3661,7 , 3807,6 , 2, 1, 7, 6, 7 }, // Spanish/Latin/Panama
- { 111, 7, 168, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 278,6 , 587,27 , 37,5 , 8,10 , 17620,61 , 17681,89 , 17770,24 , 17620,61 , 17681,89 , 17854,24 , 9443,35 , 9478,53 , 3054,14 , 9443,35 , 9478,53 , 9531,14 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {80,89,71}, 317,3 , 13011,61 , 8,5 , 23,6 , 3661,7 , 3813,8 , 0, 0, 7, 6, 7 }, // Spanish/Latin/Paraguay
- { 111, 7, 169, 46, 44, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 509,7 , 587,27 , 37,5 , 8,10 , 17926,60 , 17986,88 , 17770,24 , 18074,60 , 18134,88 , 17854,24 , 9443,35 , 9478,53 , 3054,14 , 9443,35 , 9478,53 , 9531,14 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {80,69,78}, 290,2 , 13072,43 , 4,4 , 4,0 , 3661,7 , 3300,4 , 2, 1, 7, 6, 7 }, // Spanish/Latin/Peru
- { 111, 7, 170, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 278,6 , 587,27 , 18,7 , 25,12 , 17620,61 , 17681,89 , 17770,24 , 17620,61 , 17681,89 , 17770,24 , 9443,35 , 9478,53 , 7964,14 , 9443,35 , 9478,53 , 7964,14 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {80,72,80}, 185,1 , 13115,48 , 13,5 , 4,0 , 3661,7 , 3821,9 , 2, 1, 7, 6, 7 }, // Spanish/Latin/Philippines
- { 111, 7, 174, 46, 44, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 1129,8 , 587,27 , 18,7 , 25,12 , 17794,60 , 17681,89 , 17770,24 , 17794,60 , 17681,89 , 17854,24 , 9443,35 , 9478,53 , 3054,14 , 9443,35 , 9478,53 , 9531,14 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {85,83,68}, 6,1 , 12627,70 , 4,4 , 4,0 , 3661,7 , 1408,11 , 2, 1, 7, 6, 7 }, // Spanish/Latin/PuertoRico
- { 111, 7, 225, 46, 44, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 278,6 , 587,27 , 18,7 , 25,12 , 17794,60 , 17681,89 , 17770,24 , 17794,60 , 17681,89 , 17854,24 , 9443,35 , 9478,53 , 3054,14 , 9443,35 , 9478,53 , 9531,14 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {85,83,68}, 6,1 , 12627,70 , 4,4 , 4,0 , 3661,7 , 3830,7 , 2, 1, 7, 6, 7 }, // Spanish/Latin/UnitedStates
- { 111, 7, 227, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 278,6 , 587,27 , 37,5 , 8,10 , 17926,60 , 17986,88 , 17770,24 , 18074,60 , 18134,88 , 17854,24 , 9443,35 , 9478,53 , 3054,14 , 9443,35 , 9478,53 , 9531,14 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {85,89,85}, 6,1 , 13163,48 , 8,5 , 4,0 , 3661,7 , 3837,7 , 2, 1, 1, 6, 7 }, // Spanish/Latin/Uruguay
- { 111, 7, 231, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 278,6 , 587,27 , 18,7 , 25,12 , 17620,61 , 17681,89 , 17770,24 , 17620,61 , 17681,89 , 17770,24 , 9443,35 , 9478,53 , 3054,14 , 9443,35 , 9478,53 , 9531,14 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {86,69,70}, 320,3 , 13211,64 , 4,4 , 36,5 , 3661,7 , 3844,9 , 2, 1, 7, 6, 7 }, // Spanish/Latin/Venezuela
- { 111, 7, 238, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 278,6 , 587,27 , 55,4 , 356,11 , 17620,61 , 17681,89 , 17770,24 , 17620,61 , 17681,89 , 17770,24 , 9443,35 , 9478,53 , 7964,14 , 9443,35 , 9478,53 , 7964,14 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3057,20 , 13,5 , 4,0 , 3661,7 , 3853,8 , 2, 1, 1, 6, 7 }, // Spanish/Latin/CanaryIslands
- { 111, 7, 246, 46, 44, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 278,6 , 587,27 , 37,5 , 8,10 , 17794,60 , 17681,89 , 17770,24 , 17794,60 , 17681,89 , 17854,24 , 9443,35 , 9478,53 , 3054,14 , 9443,35 , 9478,53 , 9531,14 , 64,4 , 61,4 , 0,5 , 5,17 , 22,23 , {0,0,0}, 0,0 , 13275,0 , 4,4 , 4,0 , 3861,23 , 3884,13 , 2, 1, 1, 6, 7 }, // Spanish/Latin/LatinAmericaAndTheCaribbean
- { 111, 7, 250, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 278,6 , 587,27 , 55,4 , 356,11 , 17620,61 , 17681,89 , 17770,24 , 17620,61 , 17681,89 , 17770,24 , 9443,35 , 9478,53 , 7964,14 , 9443,35 , 9478,53 , 7964,14 , 53,5 , 50,5 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3057,20 , 13,5 , 4,0 , 3661,7 , 3897,15 , 2, 1, 1, 6, 7 }, // Spanish/Latin/CeutaAndMelilla
- { 113, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 582,8 , 582,8 , 120,10 , 10,17 , 37,5 , 8,10 , 18222,48 , 18270,84 , 134,24 , 18222,48 , 18270,84 , 134,24 , 9545,60 , 9545,60 , 85,14 , 9545,60 , 9545,60 , 85,14 , 286,7 , 255,6 , 548,5 , 705,47 , 22,23 , {84,90,83}, 198,3 , 13275,67 , 4,4 , 4,0 , 3912,9 , 1587,8 , 0, 0, 1, 6, 7 }, // Swahili/Latin/Tanzania
- { 113, 7, 49, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 582,8 , 582,8 , 120,10 , 10,17 , 37,5 , 8,10 , 18222,48 , 18270,84 , 134,24 , 18222,48 , 18270,84 , 134,24 , 9545,60 , 9545,60 , 85,14 , 9545,60 , 9545,60 , 85,14 , 286,7 , 255,6 , 548,5 , 705,47 , 22,23 , {67,68,70}, 215,2 , 13342,55 , 4,4 , 4,0 , 3921,8 , 3929,32 , 2, 1, 1, 6, 7 }, // Swahili/Latin/CongoKinshasa
- { 113, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 582,8 , 582,8 , 120,10 , 10,17 , 37,5 , 8,10 , 18222,48 , 18270,84 , 134,24 , 18222,48 , 18270,84 , 134,24 , 9545,60 , 9545,60 , 85,14 , 9545,60 , 9545,60 , 85,14 , 0,2 , 0,2 , 548,5 , 705,47 , 22,23 , {75,69,83}, 2,3 , 13397,58 , 4,4 , 4,0 , 3912,9 , 1153,5 , 2, 1, 7, 6, 7 }, // Swahili/Latin/Kenya
- { 113, 7, 221, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 582,8 , 582,8 , 120,10 , 10,17 , 37,5 , 8,10 , 18222,48 , 18270,84 , 134,24 , 18222,48 , 18270,84 , 134,24 , 9545,60 , 9545,60 , 85,14 , 9545,60 , 9545,60 , 85,14 , 286,7 , 255,6 , 548,5 , 705,47 , 22,23 , {85,71,88}, 203,3 , 13455,61 , 4,4 , 4,0 , 3912,9 , 1652,6 , 0, 0, 1, 6, 7 }, // Swahili/Latin/Uganda
- { 114, 7, 205, 44, 160, 59, 37, 48, 8722, 43, 101, 8221, 8221, 8217, 8217, 0,6 , 0,6 , 590,9 , 590,9 , 53,10 , 98,16 , 37,5 , 367,16 , 18354,59 , 18413,86 , 134,24 , 18354,59 , 18413,86 , 134,24 , 9605,29 , 9634,50 , 2353,14 , 9605,29 , 9634,50 , 2353,14 , 293,2 , 261,2 , 45,4 , 5,17 , 22,23 , {83,69,75}, 196,2 , 13516,45 , 13,5 , 4,0 , 3961,7 , 3968,7 , 2, 1, 1, 6, 7 }, // Swedish/Latin/Sweden
- { 114, 7, 73, 44, 160, 59, 37, 48, 8722, 43, 101, 8221, 8221, 8217, 8217, 0,6 , 0,6 , 590,9 , 590,9 , 1137,10 , 98,16 , 37,5 , 367,16 , 18354,59 , 18413,86 , 134,24 , 18354,59 , 18413,86 , 134,24 , 9605,29 , 9634,50 , 2353,14 , 9605,29 , 9634,50 , 2353,14 , 293,2 , 261,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8852,19 , 13,5 , 4,0 , 3961,7 , 1050,7 , 2, 1, 1, 6, 7 }, // Swedish/Latin/Finland
- { 114, 7, 248, 44, 160, 59, 37, 48, 8722, 43, 101, 8221, 8221, 8217, 8217, 0,6 , 0,6 , 590,9 , 590,9 , 53,10 , 98,16 , 37,5 , 367,16 , 18354,59 , 18413,86 , 134,24 , 18354,59 , 18413,86 , 134,24 , 9605,29 , 9634,50 , 2353,14 , 9605,29 , 9634,50 , 2353,14 , 293,2 , 261,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8852,19 , 13,5 , 4,0 , 3961,7 , 3975,5 , 2, 1, 1, 6, 7 }, // Swedish/Latin/AlandIslands
- { 116, 2, 209, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {84,74,83}, 0,0 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Tajik/Cyrillic/Tajikistan
- { 117, 27, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 599,13 , 599,13 , 278,6 , 211,18 , 312,7 , 383,12 , 18499,58 , 18557,86 , 18643,31 , 18499,58 , 18557,86 , 18643,31 , 9684,39 , 9723,49 , 9772,20 , 9684,39 , 9723,49 , 9772,20 , 295,8 , 263,8 , 752,7 , 5,17 , 22,23 , {73,78,82}, 127,1 , 13561,49 , 8,5 , 4,0 , 3980,5 , 3985,7 , 2, 1, 7, 7, 7 }, // Tamil/Tamil/India
- { 117, 27, 130, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 599,13 , 599,13 , 278,6 , 211,18 , 312,7 , 383,12 , 18499,58 , 18557,86 , 18643,31 , 18499,58 , 18557,86 , 18643,31 , 9684,39 , 9723,49 , 9772,20 , 9684,39 , 9723,49 , 9772,20 , 295,8 , 263,8 , 752,7 , 5,17 , 22,23 , {77,89,82}, 180,2 , 13610,61 , 8,5 , 4,0 , 3980,5 , 3992,7 , 2, 1, 1, 6, 7 }, // Tamil/Tamil/Malaysia
- { 117, 27, 190, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 599,13 , 599,13 , 278,6 , 211,18 , 312,7 , 383,12 , 18499,58 , 18557,86 , 18643,31 , 18499,58 , 18557,86 , 18643,31 , 9684,39 , 9723,49 , 9772,20 , 9684,39 , 9723,49 , 9772,20 , 295,8 , 263,8 , 752,7 , 5,17 , 22,23 , {83,71,68}, 6,1 , 13671,61 , 8,5 , 4,0 , 3980,5 , 3999,11 , 2, 1, 7, 6, 7 }, // Tamil/Tamil/Singapore
- { 117, 27, 198, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 599,13 , 599,13 , 278,6 , 211,18 , 37,5 , 8,10 , 18499,58 , 18557,86 , 18643,31 , 18499,58 , 18557,86 , 18643,31 , 9684,39 , 9723,49 , 9772,20 , 9684,39 , 9723,49 , 9772,20 , 295,8 , 263,8 , 752,7 , 5,17 , 22,23 , {76,75,82}, 323,3 , 13732,49 , 8,5 , 4,0 , 3980,5 , 4010,6 , 2, 1, 1, 6, 7 }, // Tamil/Tamil/SriLanka
- { 118, 2, 178, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {82,85,66}, 129,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Tatar/Cyrillic/Russia
- { 119, 28, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 612,11 , 612,11 , 348,8 , 1147,18 , 18,7 , 25,12 , 18674,66 , 18740,86 , 18826,31 , 18857,62 , 18740,86 , 18826,31 , 9792,32 , 9824,60 , 9884,18 , 9792,32 , 9824,60 , 9884,18 , 0,2 , 0,2 , 759,7 , 766,27 , 22,23 , {73,78,82}, 127,1 , 13781,26 , 4,4 , 4,0 , 4016,6 , 4022,9 , 2, 1, 7, 7, 7 }, // Telugu/Telugu/India
- { 120, 30, 211, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 114,5 , 114,5 , 623,8 , 631,7 , 278,6 , 1165,19 , 37,5 , 395,28 , 18919,63 , 18982,98 , 18919,63 , 18919,63 , 18982,98 , 18919,63 , 9902,23 , 9925,68 , 9993,16 , 9902,23 , 9925,68 , 9993,16 , 303,10 , 271,10 , 793,4 , 5,17 , 22,23 , {84,72,66}, 326,3 , 13807,19 , 4,4 , 4,0 , 4031,3 , 4031,3 , 2, 1, 7, 6, 7 }, // Thai/Thai/Thailand
- { 121, 31, 44, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 1184,23 , 18,7 , 25,12 , 2886,63 , 19080,159 , 158,27 , 2886,63 , 19239,147 , 158,27 , 10009,51 , 10060,79 , 10139,27 , 10009,51 , 10060,79 , 10139,27 , 313,7 , 281,8 , 45,4 , 5,17 , 22,23 , {67,78,89}, 329,1 , 13826,13 , 8,5 , 4,0 , 4034,8 , 4042,6 , 2, 1, 7, 6, 7 }, // Tibetan/Tibetan/China
- { 121, 31, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 1184,23 , 18,7 , 25,12 , 2886,63 , 19080,159 , 158,27 , 2886,63 , 19239,147 , 158,27 , 10009,51 , 10060,79 , 10139,27 , 10009,51 , 10060,79 , 10139,27 , 313,7 , 281,8 , 45,4 , 5,17 , 22,23 , {73,78,82}, 127,1 , 13839,19 , 8,5 , 4,0 , 4034,8 , 4048,7 , 2, 1, 7, 7, 7 }, // Tibetan/Tibetan/India
- { 122, 14, 69, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 27,8 , 1207,23 , 18,7 , 25,12 , 19386,36 , 19422,54 , 19476,24 , 19386,36 , 19422,54 , 19476,24 , 10166,21 , 10187,29 , 10216,14 , 10166,21 , 10230,29 , 10259,14 , 320,7 , 289,7 , 45,4 , 5,17 , 22,23 , {69,84,66}, 0,2 , 13858,16 , 4,4 , 4,0 , 4055,4 , 82,5 , 2, 1, 7, 6, 7 }, // Tigrinya/Ethiopic/Ethiopia
- { 122, 14, 67, 46, 44, 59, 37, 48, 45, 43, 101, 8216, 8217, 8220, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 27,8 , 1207,23 , 18,7 , 25,12 , 19386,36 , 19422,54 , 19476,24 , 19386,36 , 19422,54 , 19476,24 , 10166,21 , 10187,29 , 10259,14 , 10166,21 , 10230,29 , 10259,14 , 320,7 , 289,7 , 45,4 , 5,17 , 22,23 , {69,82,78}, 46,3 , 0,7 , 4,4 , 4,0 , 4055,4 , 4059,4 , 2, 1, 1, 6, 7 }, // Tigrinya/Ethiopic/Eritrea
- { 123, 7, 214, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 638,8 , 638,8 , 638,8 , 638,8 , 278,6 , 98,16 , 18,7 , 25,12 , 19500,51 , 19551,87 , 19638,24 , 19500,51 , 19551,87 , 19638,24 , 10273,29 , 10302,60 , 10362,14 , 10273,29 , 10302,60 , 10362,14 , 327,10 , 296,6 , 797,5 , 802,59 , 861,65 , {84,79,80}, 201,2 , 13874,41 , 8,5 , 4,0 , 4063,13 , 1602,5 , 2, 1, 1, 6, 7 }, // Tongan/Latin/Tonga
+ { 108, 7, 191, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 185,7 , 601,7 , 1063,10 , 496,17 , 55,4 , 59,9 , 17209,48 , 17257,82 , 16354,24 , 17209,48 , 17339,89 , 16354,24 , 9301,21 , 9322,52 , 9374,14 , 9301,21 , 9322,52 , 9374,14 , 0,2 , 0,2 , 320,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 12168,26 , 13,5 , 4,0 , 3559,10 , 3569,9 , 2, 1, 1, 6, 7 }, // Slovak/Latin/Slovakia
+ { 109, 7, 192, 44, 46, 59, 37, 48, 8722, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 608,8 , 608,8 , 1073,9 , 1082,19 , 37,5 , 8,10 , 17428,59 , 17487,86 , 16354,24 , 17428,59 , 17487,86 , 16354,24 , 9388,35 , 9423,52 , 9475,14 , 9388,35 , 9423,52 , 9475,14 , 62,4 , 257,4 , 54,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 12194,28 , 13,5 , 4,0 , 3578,11 , 3589,9 , 2, 1, 1, 6, 7 }, // Slovenian/Latin/Slovenia
+ { 110, 7, 194, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 27,8 , 1101,19 , 18,7 , 25,12 , 17573,48 , 17621,189 , 17810,24 , 17573,48 , 17621,189 , 17810,24 , 9489,28 , 9517,47 , 9564,15 , 9489,28 , 9517,47 , 9564,15 , 293,3 , 261,3 , 45,4 , 5,17 , 22,23 , {83,79,83}, 90,1 , 12222,22 , 4,4 , 4,0 , 3598,8 , 3606,10 , 0, 0, 1, 6, 7 }, // Somali/Latin/Somalia
+ { 110, 7, 59, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 27,8 , 1101,19 , 18,7 , 25,12 , 17573,48 , 17621,189 , 17810,24 , 17573,48 , 17621,189 , 17810,24 , 9489,28 , 9517,47 , 9564,15 , 9489,28 , 9517,47 , 9564,15 , 293,3 , 261,3 , 45,4 , 5,17 , 22,23 , {68,74,70}, 38,3 , 12244,21 , 4,4 , 4,0 , 3598,8 , 3616,7 , 0, 0, 6, 6, 7 }, // Somali/Latin/Djibouti
+ { 110, 7, 69, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 27,8 , 1101,19 , 18,7 , 25,12 , 17573,48 , 17621,189 , 17810,24 , 17573,48 , 17621,189 , 17810,24 , 9489,28 , 9517,47 , 9564,15 , 9489,28 , 9517,47 , 9564,15 , 293,3 , 261,3 , 45,4 , 5,17 , 22,23 , {69,84,66}, 0,2 , 12265,22 , 4,4 , 4,0 , 3598,8 , 3623,8 , 2, 1, 7, 6, 7 }, // Somali/Latin/Ethiopia
+ { 110, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 27,8 , 1101,19 , 37,5 , 8,10 , 17573,48 , 17621,189 , 17810,24 , 17573,48 , 17621,189 , 17810,24 , 9489,28 , 9517,47 , 9564,15 , 9489,28 , 9517,47 , 9564,15 , 293,3 , 261,3 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 0,7 , 4,4 , 4,0 , 3598,8 , 3631,7 , 2, 1, 7, 6, 7 }, // Somali/Latin/Kenya
+ { 111, 7, 197, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 616,7 , 616,7 , 287,6 , 614,27 , 55,4 , 401,11 , 17834,61 , 17895,89 , 17984,24 , 17834,61 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 8013,14 , 9579,35 , 9614,53 , 8013,14 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3102,20 , 13,5 , 4,0 , 3638,17 , 2349,6 , 2, 1, 1, 6, 7 }, // Spanish/Latin/Spain
+ { 111, 7, 10, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 616,7 , 616,7 , 287,6 , 614,27 , 37,5 , 8,10 , 18008,60 , 17895,89 , 17984,24 , 18008,60 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 3064,14 , 9579,35 , 9614,53 , 3064,14 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {65,82,83}, 6,1 , 12287,51 , 8,5 , 4,0 , 3655,7 , 3662,9 , 2, 1, 7, 6, 7 }, // Spanish/Latin/Argentina
+ { 111, 7, 22, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 616,7 , 616,7 , 287,6 , 614,27 , 37,5 , 8,10 , 18008,60 , 17895,89 , 17984,24 , 18008,60 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 3064,14 , 9579,35 , 9614,53 , 9667,14 , 66,4 , 63,4 , 0,5 , 5,17 , 22,23 , {66,90,68}, 6,1 , 12338,52 , 4,4 , 4,0 , 3655,7 , 3671,6 , 2, 1, 7, 6, 7 }, // Spanish/Latin/Belize
+ { 111, 7, 26, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 616,7 , 616,7 , 287,6 , 614,27 , 37,5 , 8,10 , 18008,60 , 17895,89 , 17984,24 , 18008,60 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 3064,14 , 9579,35 , 9614,53 , 9667,14 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {66,79,66}, 280,2 , 12390,35 , 4,4 , 4,0 , 3655,7 , 3300,7 , 2, 1, 1, 6, 7 }, // Spanish/Latin/Bolivia
+ { 111, 7, 30, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 616,7 , 616,7 , 287,6 , 614,27 , 37,5 , 8,10 , 18008,60 , 17895,89 , 17984,24 , 18008,60 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 3064,14 , 9579,35 , 9614,53 , 9667,14 , 66,4 , 63,4 , 0,5 , 5,17 , 22,23 , {66,82,76}, 269,2 , 12425,52 , 4,4 , 4,0 , 3655,7 , 3116,6 , 2, 1, 7, 6, 7 }, // Spanish/Latin/Brazil
+ { 111, 7, 43, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 616,7 , 616,7 , 357,8 , 614,27 , 37,5 , 8,10 , 17834,61 , 17895,89 , 17984,24 , 18008,60 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 3064,14 , 9579,35 , 9614,53 , 9667,14 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {67,76,80}, 6,1 , 12477,45 , 4,4 , 36,5 , 3655,7 , 3677,5 , 0, 0, 1, 6, 7 }, // Spanish/Latin/Chile
+ { 111, 7, 47, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 616,7 , 616,7 , 536,7 , 614,27 , 18,7 , 25,12 , 17834,61 , 17895,89 , 17984,24 , 18008,60 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 9667,14 , 9579,35 , 9614,53 , 3064,14 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {67,79,80}, 6,1 , 12522,54 , 8,5 , 4,0 , 3655,7 , 3682,8 , 0, 0, 7, 6, 7 }, // Spanish/Latin/Colombia
+ { 111, 7, 52, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 616,7 , 616,7 , 287,6 , 614,27 , 37,5 , 8,10 , 18008,60 , 17895,89 , 17984,24 , 18008,60 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 3064,14 , 9579,35 , 9614,53 , 9667,14 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {67,82,67}, 295,1 , 12576,67 , 4,4 , 4,0 , 3655,7 , 3690,10 , 2, 0, 1, 6, 7 }, // Spanish/Latin/CostaRica
+ { 111, 7, 55, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 616,7 , 616,7 , 287,6 , 614,27 , 37,5 , 8,10 , 18008,60 , 17895,89 , 17984,24 , 18008,60 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 3064,14 , 9579,35 , 9614,53 , 9667,14 , 66,4 , 63,4 , 0,5 , 5,17 , 22,23 , {67,85,80}, 6,1 , 12643,42 , 4,4 , 4,0 , 3655,7 , 3700,4 , 2, 1, 1, 6, 7 }, // Spanish/Latin/Cuba
+ { 111, 7, 61, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 616,7 , 616,7 , 287,6 , 614,27 , 18,7 , 25,12 , 18008,60 , 17895,89 , 17984,24 , 18008,60 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 3064,14 , 9579,35 , 9614,53 , 3064,14 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {68,79,80}, 296,3 , 12685,54 , 4,4 , 89,6 , 3655,7 , 3704,20 , 2, 1, 7, 6, 7 }, // Spanish/Latin/DominicanRepublic
+ { 111, 7, 63, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 616,7 , 616,7 , 287,6 , 614,27 , 37,5 , 8,10 , 18008,60 , 17895,89 , 17984,24 , 18008,60 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 3064,14 , 9579,35 , 9614,53 , 9667,14 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {85,83,68}, 6,1 , 12739,70 , 4,4 , 36,5 , 3655,7 , 3307,7 , 2, 1, 1, 6, 7 }, // Spanish/Latin/Ecuador
+ { 111, 7, 65, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 616,7 , 616,7 , 287,6 , 614,27 , 37,5 , 8,10 , 18008,60 , 17895,89 , 17984,24 , 18008,60 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 3064,14 , 9579,35 , 9614,53 , 9667,14 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {85,83,68}, 6,1 , 12739,70 , 4,4 , 4,0 , 3655,7 , 3724,11 , 2, 1, 7, 6, 7 }, // Spanish/Latin/ElSalvador
+ { 111, 7, 66, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 616,7 , 616,7 , 287,6 , 614,27 , 55,4 , 401,11 , 17834,61 , 17895,89 , 17984,24 , 17834,61 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 8013,14 , 9579,35 , 9614,53 , 8013,14 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {88,65,70}, 32,4 , 12809,92 , 4,4 , 4,0 , 3655,7 , 3735,17 , 0, 0, 1, 6, 7 }, // Spanish/Latin/EquatorialGuinea
+ { 111, 7, 90, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 616,7 , 616,7 , 536,7 , 614,27 , 37,5 , 8,10 , 18008,60 , 17895,89 , 17984,24 , 18008,60 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 3064,14 , 9579,35 , 9614,53 , 9667,14 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {71,84,81}, 299,1 , 12901,30 , 18,5 , 4,0 , 3655,7 , 3752,9 , 2, 1, 7, 6, 7 }, // Spanish/Latin/Guatemala
+ { 111, 7, 96, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 616,7 , 616,7 , 287,6 , 1120,27 , 37,5 , 8,10 , 18008,60 , 17895,89 , 17984,24 , 18008,60 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 3064,14 , 9579,35 , 9614,53 , 9667,14 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {72,78,76}, 285,1 , 12931,60 , 4,4 , 4,0 , 3655,7 , 3761,8 , 2, 1, 7, 6, 7 }, // Spanish/Latin/Honduras
+ { 111, 7, 139, 46, 44, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 616,7 , 616,7 , 27,8 , 614,27 , 55,4 , 59,9 , 18008,60 , 17895,89 , 17984,24 , 18068,48 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 3064,14 , 9579,35 , 9614,53 , 3064,14 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {77,88,78}, 6,1 , 12991,48 , 41,6 , 4,0 , 3769,17 , 3786,6 , 2, 1, 7, 6, 7 }, // Spanish/Latin/Mexico
+ { 111, 7, 155, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 616,7 , 616,7 , 287,6 , 614,27 , 37,5 , 8,10 , 18008,60 , 17895,89 , 17984,24 , 18008,60 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 3064,14 , 9579,35 , 9614,53 , 9667,14 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {78,73,79}, 300,2 , 13039,69 , 4,4 , 4,0 , 3655,7 , 3792,9 , 2, 1, 7, 6, 7 }, // Spanish/Latin/Nicaragua
+ { 111, 7, 166, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 616,7 , 616,7 , 1147,8 , 614,27 , 18,7 , 25,12 , 18008,60 , 17895,89 , 17984,24 , 18008,60 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 3064,14 , 9579,35 , 9614,53 , 9667,14 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {80,65,66}, 302,3 , 13108,54 , 4,4 , 4,0 , 3655,7 , 3801,6 , 2, 1, 7, 6, 7 }, // Spanish/Latin/Panama
+ { 111, 7, 168, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 616,7 , 616,7 , 287,6 , 614,27 , 37,5 , 8,10 , 17834,61 , 17895,89 , 17984,24 , 17834,61 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 3064,14 , 9579,35 , 9614,53 , 9667,14 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {80,89,71}, 305,3 , 13162,61 , 8,5 , 23,6 , 3655,7 , 3807,8 , 0, 0, 7, 6, 7 }, // Spanish/Latin/Paraguay
+ { 111, 7, 169, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 616,7 , 616,7 , 536,7 , 614,27 , 37,5 , 8,10 , 18116,60 , 15206,88 , 17984,24 , 18176,60 , 18236,88 , 17984,24 , 9579,35 , 9614,53 , 3064,14 , 9579,35 , 9614,53 , 9667,14 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {80,69,78}, 278,2 , 13223,43 , 4,4 , 4,0 , 3655,7 , 3296,4 , 2, 1, 7, 6, 7 }, // Spanish/Latin/Peru
+ { 111, 7, 170, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 616,7 , 616,7 , 287,6 , 614,27 , 18,7 , 25,12 , 17834,61 , 17895,89 , 17984,24 , 17834,61 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 8013,14 , 9579,35 , 9614,53 , 8013,14 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {80,72,80}, 175,1 , 13266,48 , 13,5 , 4,0 , 3655,7 , 3815,9 , 2, 1, 7, 6, 7 }, // Spanish/Latin/Philippines
+ { 111, 7, 174, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 616,7 , 616,7 , 1147,8 , 614,27 , 18,7 , 25,12 , 18008,60 , 17895,89 , 17984,24 , 18008,60 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 3064,14 , 9579,35 , 9614,53 , 9667,14 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {85,83,68}, 6,1 , 12739,70 , 4,4 , 4,0 , 3655,7 , 1408,11 , 2, 1, 7, 6, 7 }, // Spanish/Latin/PuertoRico
+ { 111, 7, 225, 46, 44, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 616,7 , 616,7 , 433,8 , 614,27 , 18,7 , 25,12 , 18008,60 , 17895,89 , 17984,24 , 18008,60 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 3064,14 , 9579,35 , 9614,53 , 3064,14 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {85,83,68}, 6,1 , 12739,70 , 95,7 , 4,0 , 3655,7 , 3824,14 , 2, 1, 7, 6, 7 }, // Spanish/Latin/UnitedStates
+ { 111, 7, 227, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 616,7 , 616,7 , 287,6 , 614,27 , 37,5 , 8,10 , 18116,60 , 15206,88 , 17984,24 , 18176,60 , 18236,88 , 17984,24 , 9579,35 , 9614,53 , 3064,14 , 9579,35 , 9614,53 , 9667,14 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {85,89,85}, 6,1 , 13314,48 , 8,5 , 4,0 , 3655,7 , 3838,7 , 2, 1, 1, 6, 7 }, // Spanish/Latin/Uruguay
+ { 111, 7, 231, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 616,7 , 616,7 , 287,6 , 614,27 , 18,7 , 25,12 , 17834,61 , 17895,89 , 17984,24 , 17834,61 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 3064,14 , 9579,35 , 9614,53 , 9667,14 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {86,69,70}, 308,3 , 13362,64 , 4,4 , 36,5 , 3655,7 , 3845,9 , 2, 0, 7, 6, 7 }, // Spanish/Latin/Venezuela
+ { 111, 7, 238, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 616,7 , 616,7 , 287,6 , 614,27 , 55,4 , 401,11 , 17834,61 , 17895,89 , 17984,24 , 17834,61 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 8013,14 , 9579,35 , 9614,53 , 8013,14 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3102,20 , 13,5 , 4,0 , 3655,7 , 3854,8 , 2, 1, 1, 6, 7 }, // Spanish/Latin/CanaryIslands
+ { 111, 7, 246, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 616,7 , 616,7 , 287,6 , 614,27 , 37,5 , 8,10 , 18008,60 , 17895,89 , 17984,24 , 18008,60 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 3064,14 , 9579,35 , 9614,53 , 9667,14 , 66,4 , 63,4 , 0,5 , 5,17 , 22,23 , {0,0,0}, 0,0 , 13426,0 , 4,4 , 4,0 , 3862,23 , 3885,13 , 2, 1, 1, 6, 7 }, // Spanish/Latin/LatinAmericaAndTheCaribbean
+ { 111, 7, 250, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 616,7 , 616,7 , 287,6 , 614,27 , 55,4 , 401,11 , 17834,61 , 17895,89 , 17984,24 , 17834,61 , 17895,89 , 17984,24 , 9579,35 , 9614,53 , 8013,14 , 9579,35 , 9614,53 , 8013,14 , 55,5 , 52,5 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3102,20 , 13,5 , 4,0 , 3655,7 , 3898,15 , 2, 1, 1, 6, 7 }, // Spanish/Latin/CeutaAndMelilla
+ { 113, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 623,8 , 623,8 , 120,10 , 10,17 , 37,5 , 8,10 , 18324,48 , 18372,84 , 134,24 , 18324,48 , 18372,84 , 134,24 , 9681,60 , 9681,60 , 85,14 , 9681,60 , 9681,60 , 85,14 , 0,2 , 0,2 , 585,5 , 805,47 , 22,23 , {84,90,83}, 188,3 , 13426,67 , 4,4 , 4,0 , 3913,9 , 1587,8 , 0, 0, 1, 6, 7 }, // Swahili/Latin/Tanzania
+ { 113, 7, 49, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 623,8 , 623,8 , 120,10 , 10,17 , 37,5 , 8,10 , 18324,48 , 18372,84 , 134,24 , 18324,48 , 18372,84 , 134,24 , 9681,60 , 9681,60 , 85,14 , 9681,60 , 9681,60 , 85,14 , 0,2 , 0,2 , 585,5 , 805,47 , 22,23 , {67,68,70}, 203,2 , 13493,55 , 4,4 , 4,0 , 3922,8 , 3930,32 , 2, 1, 1, 6, 7 }, // Swahili/Latin/CongoKinshasa
+ { 113, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 623,8 , 623,8 , 120,10 , 10,17 , 37,5 , 8,10 , 18324,48 , 18372,84 , 134,24 , 18324,48 , 18372,84 , 134,24 , 9681,60 , 9681,60 , 85,14 , 9681,60 , 9681,60 , 85,14 , 0,2 , 0,2 , 585,5 , 805,47 , 22,23 , {75,69,83}, 2,3 , 13548,58 , 4,4 , 4,0 , 3913,9 , 1153,5 , 2, 1, 7, 6, 7 }, // Swahili/Latin/Kenya
+ { 113, 7, 221, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 623,8 , 623,8 , 120,10 , 10,17 , 37,5 , 8,10 , 18324,48 , 18372,84 , 134,24 , 18324,48 , 18372,84 , 134,24 , 9681,60 , 9681,60 , 85,14 , 9681,60 , 9681,60 , 85,14 , 0,2 , 0,2 , 585,5 , 805,47 , 22,23 , {85,71,88}, 193,3 , 13606,61 , 4,4 , 4,0 , 3913,9 , 1652,6 , 0, 0, 1, 6, 7 }, // Swahili/Latin/Uganda
+ { 114, 7, 205, 44, 160, 59, 37, 48, 8722, 43, 101, 8221, 8221, 8217, 8217, 0,6 , 0,6 , 631,9 , 631,9 , 53,10 , 98,16 , 37,5 , 412,16 , 18456,59 , 18515,86 , 134,24 , 18456,59 , 18515,86 , 134,24 , 9741,29 , 9770,50 , 2363,14 , 9741,29 , 9770,50 , 2363,14 , 296,2 , 264,2 , 45,4 , 5,17 , 22,23 , {83,69,75}, 186,2 , 13667,45 , 13,5 , 4,0 , 3962,7 , 3969,7 , 2, 0, 1, 6, 7 }, // Swedish/Latin/Sweden
+ { 114, 7, 73, 44, 160, 59, 37, 48, 8722, 43, 101, 8221, 8221, 8217, 8217, 0,6 , 0,6 , 631,9 , 631,9 , 1155,10 , 98,16 , 37,5 , 412,16 , 18456,59 , 18515,86 , 134,24 , 18456,59 , 18515,86 , 134,24 , 9741,29 , 9770,50 , 2363,14 , 9741,29 , 9770,50 , 2363,14 , 296,2 , 264,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8897,19 , 13,5 , 4,0 , 3962,7 , 1050,7 , 2, 1, 1, 6, 7 }, // Swedish/Latin/Finland
+ { 114, 7, 248, 44, 160, 59, 37, 48, 8722, 43, 101, 8221, 8221, 8217, 8217, 0,6 , 0,6 , 631,9 , 631,9 , 53,10 , 98,16 , 37,5 , 412,16 , 18456,59 , 18515,86 , 134,24 , 18456,59 , 18515,86 , 134,24 , 9741,29 , 9770,50 , 2363,14 , 9741,29 , 9770,50 , 2363,14 , 296,2 , 264,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8897,19 , 13,5 , 4,0 , 3962,7 , 3976,5 , 2, 1, 1, 6, 7 }, // Swedish/Latin/AlandIslands
+ { 116, 2, 209, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 0,6 , 0,6 , 27,8 , 80,18 , 37,5 , 8,10 , 10885,48 , 18601,71 , 11013,24 , 10885,48 , 18601,71 , 11013,24 , 9820,28 , 9848,55 , 9903,14 , 9820,28 , 9848,55 , 9903,14 , 298,7 , 266,7 , 45,4 , 5,17 , 22,23 , {84,74,83}, 311,4 , 13712,19 , 13,5 , 4,0 , 3981,6 , 3987,10 , 2, 1, 1, 6, 7 }, // Tajik/Cyrillic/Tajikistan
+ { 117, 27, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 640,13 , 640,13 , 287,6 , 210,18 , 357,7 , 428,12 , 18672,58 , 18730,86 , 18816,31 , 18672,58 , 18730,86 , 18816,31 , 9917,39 , 9956,49 , 10005,20 , 9917,39 , 9956,49 , 10005,20 , 305,8 , 273,8 , 852,7 , 5,17 , 22,23 , {73,78,82}, 117,1 , 13731,49 , 8,5 , 4,0 , 3997,5 , 4002,7 , 2, 1, 7, 7, 7 }, // Tamil/Tamil/India
+ { 117, 27, 130, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 640,13 , 640,13 , 287,6 , 210,18 , 357,7 , 428,12 , 18672,58 , 18730,86 , 18816,31 , 18672,58 , 18730,86 , 18816,31 , 9917,39 , 9956,49 , 10005,20 , 9917,39 , 9956,49 , 10005,20 , 305,8 , 273,8 , 852,7 , 5,17 , 22,23 , {77,89,82}, 170,2 , 13780,61 , 8,5 , 4,0 , 3997,5 , 4009,7 , 2, 1, 1, 6, 7 }, // Tamil/Tamil/Malaysia
+ { 117, 27, 190, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 640,13 , 640,13 , 287,6 , 210,18 , 357,7 , 428,12 , 18672,58 , 18730,86 , 18816,31 , 18672,58 , 18730,86 , 18816,31 , 9917,39 , 9956,49 , 10005,20 , 9917,39 , 9956,49 , 10005,20 , 305,8 , 273,8 , 852,7 , 5,17 , 22,23 , {83,71,68}, 6,1 , 13841,61 , 8,5 , 4,0 , 3997,5 , 4016,11 , 2, 1, 7, 6, 7 }, // Tamil/Tamil/Singapore
+ { 117, 27, 198, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 640,13 , 640,13 , 287,6 , 210,18 , 37,5 , 8,10 , 18672,58 , 18730,86 , 18816,31 , 18672,58 , 18730,86 , 18816,31 , 9917,39 , 9956,49 , 10005,20 , 9917,39 , 9956,49 , 10005,20 , 305,8 , 273,8 , 852,7 , 5,17 , 22,23 , {76,75,82}, 315,3 , 13902,49 , 8,5 , 4,0 , 3997,5 , 4027,6 , 2, 1, 1, 6, 7 }, // Tamil/Tamil/SriLanka
+ { 118, 2, 178, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 653,9 , 653,9 , 955,10 , 1165,23 , 55,4 , 59,9 , 18847,62 , 18909,81 , 158,27 , 18847,62 , 18909,81 , 158,27 , 10025,36 , 10061,56 , 10117,14 , 10025,36 , 10061,56 , 10117,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {82,85,66}, 119,1 , 13951,21 , 0,4 , 4,0 , 4033,5 , 3366,6 , 2, 1, 1, 6, 7 }, // Tatar/Cyrillic/Russia
+ { 119, 28, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 662,11 , 662,11 , 357,8 , 1188,18 , 18,7 , 25,12 , 18990,62 , 19052,86 , 19138,31 , 18990,62 , 19052,86 , 19138,31 , 10131,32 , 10163,60 , 10223,18 , 10131,32 , 10163,60 , 10223,18 , 0,2 , 0,2 , 859,7 , 866,27 , 22,23 , {73,78,82}, 117,1 , 13972,26 , 4,4 , 4,0 , 4038,6 , 4044,8 , 2, 1, 7, 7, 7 }, // Telugu/Telugu/India
+ { 120, 30, 211, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 123,5 , 123,5 , 673,8 , 681,7 , 287,6 , 1206,19 , 37,5 , 440,28 , 19169,63 , 19232,98 , 19169,63 , 19169,63 , 19232,98 , 19169,63 , 10241,23 , 10264,68 , 10332,16 , 10241,23 , 10264,68 , 10332,16 , 313,10 , 281,10 , 893,4 , 5,17 , 22,23 , {84,72,66}, 318,3 , 13998,16 , 4,4 , 4,0 , 4052,3 , 4052,3 , 2, 1, 7, 6, 7 }, // Thai/Thai/Thailand
+ { 121, 31, 44, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 1225,23 , 18,7 , 25,12 , 2923,63 , 19330,159 , 158,27 , 2923,63 , 19489,147 , 158,27 , 10348,51 , 10399,79 , 10478,27 , 10348,51 , 10399,79 , 10478,27 , 323,7 , 291,8 , 45,4 , 5,17 , 22,23 , {67,78,89}, 321,1 , 14014,13 , 8,5 , 4,0 , 4055,8 , 4063,6 , 2, 1, 7, 6, 7 }, // Tibetan/Tibetan/China
+ { 121, 31, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 1225,23 , 18,7 , 25,12 , 2923,63 , 19330,159 , 158,27 , 2923,63 , 19489,147 , 158,27 , 10348,51 , 10399,79 , 10478,27 , 10348,51 , 10399,79 , 10478,27 , 323,7 , 291,8 , 45,4 , 5,17 , 22,23 , {73,78,82}, 117,1 , 14027,19 , 8,5 , 4,0 , 4055,8 , 4069,7 , 2, 1, 7, 7, 7 }, // Tibetan/Tibetan/India
+ { 122, 14, 69, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 27,8 , 1248,23 , 18,7 , 25,12 , 19636,36 , 19672,54 , 19726,24 , 19636,36 , 19672,54 , 19726,24 , 10505,21 , 10526,29 , 10555,14 , 10505,21 , 10569,29 , 10598,14 , 330,7 , 299,7 , 45,4 , 5,17 , 22,23 , {69,84,66}, 0,2 , 14046,16 , 4,4 , 4,0 , 4076,4 , 82,5 , 2, 1, 7, 6, 7 }, // Tigrinya/Ethiopic/Ethiopia
+ { 122, 14, 67, 46, 44, 59, 37, 48, 45, 43, 101, 8216, 8217, 8220, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 27,8 , 1248,23 , 18,7 , 25,12 , 19636,36 , 19672,54 , 19726,24 , 19636,36 , 19672,54 , 19726,24 , 10505,21 , 10526,29 , 10598,14 , 10505,21 , 10569,29 , 10598,14 , 330,7 , 299,7 , 45,4 , 5,17 , 22,23 , {69,82,78}, 41,3 , 0,7 , 4,4 , 4,0 , 4076,4 , 4080,4 , 2, 1, 1, 6, 7 }, // Tigrinya/Ethiopic/Eritrea
+ { 123, 7, 214, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 688,8 , 688,8 , 688,8 , 688,8 , 287,6 , 98,16 , 18,7 , 25,12 , 19750,51 , 19801,87 , 19888,24 , 19750,51 , 19801,87 , 19888,24 , 10612,29 , 10641,60 , 10701,14 , 10612,29 , 10641,60 , 10701,14 , 337,10 , 306,6 , 897,5 , 902,59 , 961,65 , {84,79,80}, 191,2 , 14062,41 , 13,5 , 4,0 , 4084,13 , 1602,5 , 2, 1, 1, 6, 7 }, // Tongan/Latin/Tonga
{ 124, 7, 195, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {90,65,82}, 5,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 6, 7 }, // Tsonga/Latin/SouthAfrica
- { 125, 7, 217, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 646,8 , 646,8 , 1230,9 , 1239,16 , 37,5 , 8,10 , 19662,48 , 19710,75 , 19785,24 , 19662,48 , 19710,75 , 19785,24 , 10376,28 , 10404,54 , 10458,14 , 10376,28 , 10404,54 , 10458,14 , 337,2 , 302,2 , 152,4 , 5,17 , 22,23 , {84,82,89}, 256,1 , 13915,40 , 4,4 , 4,0 , 4076,6 , 4082,7 , 2, 1, 1, 6, 7 }, // Turkish/Latin/Turkey
- { 125, 7, 56, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 646,8 , 646,8 , 1230,9 , 1239,16 , 18,7 , 25,12 , 19662,48 , 19710,75 , 19785,24 , 19662,48 , 19710,75 , 19785,24 , 10376,28 , 10404,54 , 10458,14 , 10376,28 , 10404,54 , 10458,14 , 337,2 , 302,2 , 152,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8339,19 , 4,4 , 4,0 , 4076,6 , 4089,6 , 2, 1, 1, 6, 7 }, // Turkish/Latin/Cyprus
- { 126, 7, 218, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8220, 8221, 0,6 , 0,6 , 654,8 , 654,8 , 931,10 , 1239,16 , 37,5 , 8,10 , 19809,51 , 19860,77 , 19937,24 , 19809,51 , 19860,77 , 19937,24 , 10472,21 , 10493,54 , 10547,14 , 10472,21 , 10493,54 , 10547,14 , 0,2 , 0,2 , 926,4 , 5,17 , 22,23 , {84,77,84}, 330,3 , 13955,49 , 13,5 , 4,0 , 4095,9 , 4104,12 , 2, 1, 1, 6, 7 }, // Turkmen/Latin/Turkmenistan
- { 128, 1, 44, 46, 44, 59, 37, 48, 45, 43, 101, 187, 171, 8250, 8249, 0,6 , 0,6 , 191,10 , 201,9 , 53,10 , 1255,17 , 18,7 , 25,12 , 19961,84 , 19961,84 , 158,27 , 19961,84 , 19961,84 , 158,27 , 10561,21 , 10582,55 , 10637,14 , 10561,21 , 10582,55 , 10637,14 , 339,12 , 304,12 , 45,4 , 5,17 , 22,23 , {67,78,89}, 139,1 , 14004,40 , 4,4 , 4,0 , 4116,8 , 4124,5 , 2, 1, 7, 6, 7 }, // Uighur/Arabic/China
- { 129, 2, 222, 44, 160, 59, 37, 48, 45, 43, 1077, 171, 187, 8222, 8220, 0,6 , 0,6 , 129,7 , 129,7 , 175,8 , 1272,22 , 37,5 , 8,10 , 20045,48 , 20093,95 , 20188,24 , 20212,67 , 20279,87 , 20366,24 , 1573,21 , 10651,56 , 10707,14 , 1573,21 , 10651,56 , 10707,14 , 351,2 , 316,2 , 930,5 , 528,17 , 22,23 , {85,65,72}, 298,1 , 14044,49 , 13,5 , 4,0 , 4129,10 , 4139,7 , 2, 1, 1, 6, 7 }, // Ukrainian/Cyrillic/Ukraine
- { 130, 1, 163, 46, 44, 59, 37, 48, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 662,10 , 672,9 , 278,6 , 157,18 , 18,7 , 25,12 , 20390,68 , 20390,68 , 134,24 , 20390,68 , 20390,68 , 134,24 , 10721,39 , 10721,39 , 85,14 , 10721,39 , 10721,39 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {80,75,82}, 182,2 , 14093,49 , 4,4 , 4,0 , 4146,4 , 3285,7 , 0, 0, 7, 6, 7 }, // Urdu/Arabic/Pakistan
- { 130, 1, 100, 46, 44, 59, 37, 1776, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 681,6 , 681,6 , 278,6 , 157,18 , 18,7 , 25,12 , 20390,68 , 20390,68 , 134,24 , 20390,68 , 20390,68 , 134,24 , 10760,36 , 10760,36 , 85,14 , 10760,36 , 10760,36 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {73,78,82}, 127,1 , 14142,42 , 8,5 , 4,0 , 4146,4 , 4150,5 , 2, 1, 7, 7, 7 }, // Urdu/Arabic/India
- { 131, 7, 228, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8217, 8216, 0,6 , 0,6 , 687,8 , 687,8 , 27,8 , 1294,18 , 37,5 , 356,11 , 20458,48 , 20506,75 , 20581,24 , 20605,48 , 20653,75 , 20581,24 , 10796,32 , 10828,61 , 10889,14 , 10796,32 , 10828,61 , 10889,14 , 353,2 , 318,2 , 152,4 , 297,17 , 22,23 , {85,90,83}, 333,4 , 14184,58 , 13,5 , 4,0 , 4155,6 , 4161,11 , 0, 0, 1, 6, 7 }, // Uzbek/Latin/Uzbekistan
- { 131, 1, 1, 1643, 1644, 1563, 1642, 1776, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 385,8 , 1312,33 , 55,4 , 356,11 , 20728,47 , 14180,68 , 158,27 , 20728,47 , 14180,68 , 158,27 , 10903,21 , 7376,49 , 85,14 , 10903,21 , 7376,49 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {65,70,78}, 274,1 , 14242,13 , 13,5 , 4,0 , 4172,6 , 3077,9 , 0, 0, 6, 4, 5 }, // Uzbek/Arabic/Afghanistan
- { 131, 2, 228, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 27,8 , 614,19 , 37,5 , 88,12 , 10842,48 , 20775,71 , 10970,24 , 20846,48 , 20894,71 , 10970,24 , 10924,28 , 10952,53 , 11005,14 , 11019,28 , 11047,53 , 11005,14 , 355,2 , 320,2 , 45,4 , 5,17 , 22,23 , {85,90,83}, 337,3 , 14255,49 , 13,5 , 4,0 , 4178,7 , 4185,10 , 0, 0, 1, 6, 7 }, // Uzbek/Cyrillic/Uzbekistan
- { 132, 7, 232, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 695,8 , 695,8 , 120,10 , 211,18 , 37,5 , 8,10 , 20965,75 , 21040,99 , 158,27 , 21139,75 , 21214,99 , 158,27 , 11100,33 , 11133,55 , 11188,21 , 11100,33 , 11133,55 , 11188,21 , 357,2 , 322,2 , 45,4 , 5,17 , 22,23 , {86,78,68}, 340,1 , 14304,33 , 8,5 , 4,0 , 4195,10 , 4205,8 , 0, 0, 1, 6, 7 }, // Vietnamese/Latin/Vietnam
- { 134, 7, 224, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 27,8 , 10,17 , 37,5 , 8,10 , 21313,52 , 21365,87 , 21452,26 , 21478,59 , 21365,87 , 21452,26 , 11209,29 , 11238,77 , 11315,15 , 11330,30 , 11238,77 , 11315,15 , 359,2 , 324,2 , 935,7 , 5,17 , 22,23 , {71,66,80}, 125,1 , 14337,92 , 4,4 , 4,0 , 4213,7 , 4220,16 , 2, 1, 1, 6, 7 }, // Welsh/Latin/UnitedKingdom
- { 135, 7, 187, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {88,79,70}, 210,3 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 0, 0, 1, 6, 7 }, // Wolof/Latin/Senegal
+ { 125, 7, 217, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 696,8 , 696,8 , 1271,9 , 1280,16 , 37,5 , 8,10 , 19912,48 , 19960,75 , 20035,24 , 19912,48 , 19960,75 , 20035,24 , 10715,28 , 10743,54 , 10797,14 , 10715,28 , 10743,54 , 10797,14 , 347,2 , 312,2 , 193,4 , 5,17 , 22,23 , {84,82,89}, 244,1 , 14103,40 , 4,4 , 4,0 , 4097,6 , 4103,7 , 2, 1, 1, 6, 7 }, // Turkish/Latin/Turkey
+ { 125, 7, 56, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 696,8 , 696,8 , 1271,9 , 1280,16 , 18,7 , 25,12 , 19912,48 , 19960,75 , 20035,24 , 19912,48 , 19960,75 , 20035,24 , 10715,28 , 10743,54 , 10797,14 , 10715,28 , 10743,54 , 10797,14 , 347,2 , 312,2 , 193,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8384,19 , 4,4 , 4,0 , 4097,6 , 4110,6 , 2, 1, 1, 6, 7 }, // Turkish/Latin/Cyprus
+ { 126, 7, 218, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8220, 8221, 0,6 , 0,6 , 704,8 , 704,8 , 955,10 , 1280,16 , 37,5 , 8,10 , 20059,51 , 20110,77 , 20187,24 , 20211,51 , 20262,77 , 20187,24 , 10811,28 , 10839,54 , 10893,14 , 10907,28 , 10935,54 , 10893,14 , 349,13 , 314,14 , 1026,4 , 5,17 , 22,23 , {84,77,84}, 322,3 , 14143,49 , 13,5 , 4,0 , 4116,12 , 4128,12 , 2, 1, 1, 6, 7 }, // Turkmen/Latin/Turkmenistan
+ { 128, 1, 44, 46, 44, 59, 37, 48, 45, 43, 101, 187, 171, 8250, 8249, 0,6 , 0,6 , 200,10 , 210,9 , 53,10 , 1296,17 , 18,7 , 25,12 , 20339,84 , 20339,84 , 158,27 , 20339,84 , 20339,84 , 158,27 , 10989,21 , 11010,55 , 11065,14 , 10989,21 , 11010,55 , 11065,14 , 362,12 , 328,12 , 45,4 , 5,17 , 22,23 , {67,78,89}, 129,1 , 14192,40 , 4,4 , 4,0 , 4140,8 , 4148,5 , 2, 1, 7, 6, 7 }, // Uighur/Arabic/China
+ { 129, 2, 222, 44, 160, 59, 37, 48, 45, 43, 1077, 171, 187, 8222, 8220, 0,6 , 0,6 , 138,7 , 138,7 , 174,8 , 1313,22 , 37,5 , 8,10 , 20423,48 , 20471,95 , 20566,24 , 20590,67 , 20657,87 , 20744,24 , 1583,21 , 11079,56 , 11135,14 , 1583,21 , 11079,56 , 11135,14 , 374,2 , 340,2 , 1030,5 , 565,17 , 22,23 , {85,65,72}, 286,1 , 14232,49 , 13,5 , 4,0 , 4153,10 , 4163,7 , 2, 1, 1, 6, 7 }, // Ukrainian/Cyrillic/Ukraine
+ { 130, 1, 163, 46, 44, 59, 37, 48, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 712,10 , 722,9 , 287,6 , 1335,18 , 18,7 , 25,12 , 20768,68 , 20768,68 , 134,24 , 20768,68 , 20768,68 , 134,24 , 11149,36 , 11149,36 , 85,14 , 11149,36 , 11149,36 , 85,14 , 0,2 , 0,2 , 1035,4 , 5,17 , 22,23 , {80,75,82}, 172,2 , 14281,49 , 4,4 , 4,0 , 4170,4 , 3281,7 , 0, 0, 7, 6, 7 }, // Urdu/Arabic/Pakistan
+ { 130, 1, 100, 1643, 1644, 59, 37, 1776, 45, 43, 101, 8221, 8220, 8217, 8216, 46,6 , 46,6 , 731,6 , 731,6 , 287,6 , 1335,18 , 18,7 , 25,12 , 20768,68 , 20768,68 , 134,24 , 20768,68 , 20768,68 , 134,24 , 11149,36 , 11149,36 , 85,14 , 11149,36 , 11149,36 , 85,14 , 0,2 , 0,2 , 1035,4 , 5,17 , 22,23 , {73,78,82}, 117,1 , 14330,42 , 8,5 , 4,0 , 4170,4 , 4174,5 , 2, 1, 7, 7, 7 }, // Urdu/Arabic/India
+ { 131, 7, 228, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8217, 8216, 0,6 , 0,6 , 737,8 , 737,8 , 27,8 , 1353,18 , 37,5 , 401,11 , 20836,48 , 20884,75 , 20959,24 , 20983,48 , 21031,75 , 20959,24 , 11185,32 , 11217,61 , 11278,14 , 11185,32 , 11217,61 , 11278,14 , 376,2 , 342,2 , 193,4 , 334,17 , 22,23 , {85,90,83}, 325,4 , 14372,58 , 13,5 , 4,0 , 4179,6 , 4185,11 , 0, 0, 1, 6, 7 }, // Uzbek/Latin/Uzbekistan
+ { 131, 1, 1, 1643, 1644, 1563, 1642, 1776, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 412,8 , 1371,33 , 55,4 , 401,11 , 21106,47 , 14386,68 , 158,27 , 21106,47 , 14386,68 , 158,27 , 11292,21 , 7425,49 , 85,14 , 11292,21 , 7425,49 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {65,70,78}, 262,1 , 14430,13 , 13,5 , 4,0 , 4196,6 , 3073,9 , 0, 0, 6, 4, 5 }, // Uzbek/Arabic/Afghanistan
+ { 131, 2, 228, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 27,8 , 641,19 , 37,5 , 87,12 , 10885,48 , 18601,71 , 11013,24 , 21153,48 , 21201,71 , 11013,24 , 11313,28 , 11341,53 , 11394,14 , 11408,28 , 11436,53 , 11394,14 , 378,2 , 344,2 , 45,4 , 5,17 , 22,23 , {85,90,83}, 329,3 , 14443,49 , 13,5 , 4,0 , 4202,7 , 4209,10 , 0, 0, 1, 6, 7 }, // Uzbek/Cyrillic/Uzbekistan
+ { 132, 7, 232, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 745,8 , 745,8 , 120,10 , 210,18 , 37,5 , 8,10 , 21272,75 , 21347,99 , 158,27 , 21446,75 , 21521,99 , 158,27 , 11489,33 , 11522,55 , 11577,21 , 11489,33 , 11522,55 , 11577,21 , 380,2 , 346,2 , 45,4 , 5,17 , 22,23 , {86,78,68}, 332,1 , 14492,33 , 13,5 , 4,0 , 4219,10 , 4229,8 , 0, 0, 1, 6, 7 }, // Vietnamese/Latin/Vietnam
+ { 134, 7, 224, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 753,11 , 764,10 , 27,8 , 10,17 , 37,5 , 8,10 , 21620,52 , 21672,87 , 21759,26 , 21785,59 , 21672,87 , 21759,26 , 11598,29 , 11627,77 , 11704,15 , 11719,30 , 11627,77 , 11704,15 , 382,2 , 348,2 , 1039,7 , 5,17 , 22,23 , {71,66,80}, 115,1 , 14525,92 , 4,4 , 4,0 , 4237,7 , 4244,16 , 2, 1, 1, 6, 7 }, // Welsh/Latin/UnitedKingdom
+ { 135, 7, 187, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 1155,10 , 1404,17 , 37,5 , 8,10 , 21844,47 , 21891,84 , 158,27 , 21844,47 , 21891,84 , 158,27 , 11749,28 , 11777,50 , 11749,28 , 11749,28 , 11777,50 , 11749,28 , 384,3 , 350,3 , 45,4 , 5,17 , 22,23 , {88,79,70}, 200,3 , 14617,65 , 8,5 , 4,0 , 4260,5 , 4265,8 , 0, 0, 1, 6, 7 }, // Wolof/Latin/Senegal
{ 136, 7, 195, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {90,65,82}, 5,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 6, 7 }, // Xhosa/Latin/SouthAfrica
- { 138, 7, 157, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 21537,73 , 21610,121 , 158,27 , 21537,73 , 21610,121 , 158,27 , 11360,44 , 11404,69 , 85,14 , 11360,44 , 11404,69 , 85,14 , 361,5 , 326,5 , 45,4 , 5,17 , 22,23 , {78,71,78}, 184,1 , 14429,34 , 4,4 , 4,0 , 4236,10 , 4246,18 , 2, 1, 1, 6, 7 }, // Yoruba/Latin/Nigeria
- { 138, 7, 23, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 21731,74 , 21805,134 , 158,27 , 21731,74 , 21805,134 , 158,27 , 11473,44 , 11517,69 , 85,14 , 11473,44 , 11517,69 , 85,14 , 366,5 , 331,5 , 45,4 , 5,17 , 22,23 , {88,79,70}, 210,3 , 14463,34 , 4,4 , 4,0 , 4236,10 , 4264,16 , 0, 0, 1, 6, 7 }, // Yoruba/Latin/Benin
- { 140, 7, 195, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 703,9 , 712,8 , 516,6 , 35,18 , 37,5 , 8,10 , 21939,48 , 21987,91 , 134,24 , 21939,48 , 22078,93 , 22171,24 , 11586,28 , 11614,74 , 11688,14 , 11586,28 , 11614,74 , 11688,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {90,65,82}, 5,1 , 14497,67 , 4,4 , 4,0 , 4280,7 , 4287,14 , 2, 1, 7, 6, 7 }, // Zulu/Latin/SouthAfrica
- { 141, 7, 161, 44, 160, 59, 37, 48, 8722, 43, 101, 171, 187, 8216, 8217, 0,6 , 0,6 , 183,8 , 183,8 , 931,10 , 469,17 , 37,5 , 367,16 , 5791,48 , 13743,83 , 134,24 , 22195,59 , 13743,83 , 134,24 , 11702,28 , 11730,51 , 2353,14 , 11781,28 , 11730,51 , 2353,14 , 371,9 , 336,11 , 45,4 , 5,17 , 22,23 , {78,79,75}, 196,2 , 14564,42 , 13,5 , 4,0 , 4301,7 , 4308,5 , 2, 1, 1, 6, 7 }, // NorwegianNynorsk/Latin/Norway
- { 142, 7, 27, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8221, 8216, 8217, 0,6 , 0,6 , 154,7 , 154,7 , 995,7 , 441,19 , 37,5 , 8,10 , 16236,48 , 22254,83 , 16212,24 , 16236,48 , 22254,83 , 16212,24 , 2076,28 , 2104,58 , 2162,14 , 2076,28 , 2104,58 , 2176,14 , 380,10 , 347,7 , 276,7 , 5,17 , 22,23 , {66,65,77}, 150,2 , 14606,170 , 13,5 , 4,0 , 4313,8 , 591,19 , 2, 1, 1, 6, 7 }, // Bosnian/Latin/BosniaAndHerzegowina
- { 142, 2, 27, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 107,7 , 107,7 , 995,7 , 1002,20 , 37,5 , 8,10 , 15886,48 , 22337,83 , 12349,24 , 15886,48 , 22337,83 , 12349,24 , 11809,28 , 11837,54 , 8482,14 , 11809,28 , 11837,54 , 8482,14 , 223,9 , 354,7 , 45,4 , 5,17 , 22,23 , {66,65,77}, 302,2 , 14776,151 , 13,5 , 4,0 , 4321,8 , 3459,19 , 2, 1, 1, 6, 7 }, // Bosnian/Cyrillic/BosniaAndHerzegowina
+ { 138, 7, 157, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 21975,73 , 22048,121 , 158,27 , 21975,73 , 22048,121 , 158,27 , 11827,44 , 11871,69 , 85,14 , 11827,44 , 11871,69 , 85,14 , 387,5 , 353,5 , 45,4 , 5,17 , 22,23 , {78,71,78}, 174,1 , 14682,34 , 4,4 , 4,0 , 4273,10 , 4283,18 , 2, 1, 1, 6, 7 }, // Yoruba/Latin/Nigeria
+ { 138, 7, 23, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 22169,74 , 22243,134 , 158,27 , 22169,74 , 22243,134 , 158,27 , 11940,44 , 11984,69 , 85,14 , 11940,44 , 11984,69 , 85,14 , 392,5 , 358,5 , 45,4 , 5,17 , 22,23 , {88,79,70}, 200,3 , 14716,34 , 4,4 , 4,0 , 4273,10 , 4301,16 , 0, 0, 1, 6, 7 }, // Yoruba/Latin/Benin
+ { 140, 7, 195, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 774,9 , 783,8 , 543,6 , 35,18 , 37,5 , 8,10 , 22377,48 , 22425,91 , 134,24 , 22377,48 , 22425,91 , 22516,24 , 12053,28 , 12081,74 , 12155,14 , 12053,28 , 12081,74 , 12155,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {90,65,82}, 5,1 , 14750,67 , 4,4 , 4,0 , 4317,7 , 4324,17 , 2, 1, 7, 6, 7 }, // Zulu/Latin/SouthAfrica
+ { 141, 7, 161, 44, 160, 59, 37, 48, 8722, 43, 101, 171, 187, 8216, 8217, 0,6 , 0,6 , 192,8 , 192,8 , 955,10 , 496,17 , 37,5 , 412,16 , 5765,48 , 13787,83 , 134,24 , 22540,59 , 13787,83 , 134,24 , 12169,28 , 12197,51 , 2363,14 , 12248,28 , 12197,51 , 2363,14 , 397,9 , 363,11 , 45,4 , 5,17 , 22,23 , {78,79,75}, 186,2 , 9799,44 , 13,5 , 4,0 , 4341,7 , 4348,5 , 2, 0, 1, 6, 7 }, // NorwegianNynorsk/Latin/Norway
+ { 142, 7, 27, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8221, 8216, 8217, 0,6 , 0,6 , 163,7 , 163,7 , 1013,7 , 468,19 , 37,5 , 8,10 , 16378,48 , 22599,83 , 16354,24 , 16378,48 , 22599,83 , 16354,24 , 2086,28 , 2114,58 , 2172,14 , 2086,28 , 2114,58 , 2186,14 , 406,10 , 374,7 , 313,7 , 5,17 , 22,23 , {66,65,77}, 140,2 , 14817,170 , 13,5 , 4,0 , 4353,8 , 591,19 , 2, 1, 1, 6, 7 }, // Bosnian/Latin/BosniaAndHerzegowina
+ { 142, 2, 27, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 116,7 , 116,7 , 1013,7 , 1020,20 , 37,5 , 8,10 , 22682,48 , 22730,83 , 12392,24 , 22682,48 , 22730,83 , 12392,24 , 12276,28 , 12304,56 , 8531,14 , 12276,28 , 12304,56 , 8531,14 , 222,9 , 381,7 , 45,4 , 5,17 , 22,23 , {66,65,77}, 290,2 , 14987,151 , 13,5 , 4,0 , 4361,8 , 3442,19 , 2, 1, 1, 6, 7 }, // Bosnian/Cyrillic/BosniaAndHerzegowina
{ 143, 29, 131, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {77,86,82}, 0,0 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 5, 6, 7 }, // Divehi/Thaana/Maldives
- { 144, 7, 251, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 27,8 , 633,17 , 37,5 , 8,10 , 22420,102 , 22522,140 , 158,27 , 22420,102 , 22522,140 , 158,27 , 11891,30 , 11921,57 , 85,14 , 11891,30 , 11921,57 , 85,14 , 64,4 , 61,4 , 45,4 , 5,17 , 22,23 , {71,66,80}, 125,1 , 0,7 , 4,4 , 4,0 , 4329,5 , 4334,12 , 2, 1, 1, 6, 7 }, // Manx/Latin/IsleOfMan
- { 145, 7, 224, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 98,16 , 37,5 , 8,10 , 22662,46 , 22708,130 , 158,27 , 22662,46 , 22708,130 , 158,27 , 11978,28 , 12006,61 , 85,14 , 11978,28 , 12006,61 , 85,14 , 64,4 , 61,4 , 45,4 , 5,17 , 22,23 , {71,66,80}, 125,1 , 0,7 , 4,4 , 4,0 , 4346,8 , 4354,14 , 2, 1, 1, 6, 7 }, // Cornish/Latin/UnitedKingdom
- { 146, 7, 83, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 1345,8 , 1353,18 , 18,7 , 25,12 , 22838,48 , 22886,192 , 158,27 , 22838,48 , 22886,192 , 158,27 , 12067,28 , 12095,49 , 12144,14 , 12067,28 , 12095,49 , 12144,14 , 390,2 , 361,2 , 45,4 , 5,17 , 22,23 , {71,72,83}, 173,3 , 14927,17 , 4,4 , 4,0 , 4368,4 , 4372,5 , 2, 1, 1, 6, 7 }, // Akan/Latin/Ghana
- { 147, 13, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 941,6 , 98,16 , 18,7 , 25,12 , 23078,87 , 23078,87 , 158,27 , 23078,87 , 23078,87 , 158,27 , 7017,32 , 12158,55 , 85,14 , 7017,32 , 12158,55 , 85,14 , 184,5 , 363,5 , 45,4 , 5,17 , 22,23 , {73,78,82}, 127,1 , 0,7 , 8,5 , 4,0 , 4377,6 , 2589,4 , 2, 1, 7, 7, 7 }, // Konkani/Devanagari/India
+ { 144, 7, 251, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 27,8 , 660,17 , 37,5 , 8,10 , 22813,102 , 22915,140 , 158,27 , 22813,102 , 22915,140 , 158,27 , 12360,30 , 12390,57 , 85,14 , 12360,30 , 12390,57 , 85,14 , 66,4 , 63,4 , 45,4 , 5,17 , 22,23 , {71,66,80}, 115,1 , 0,7 , 4,4 , 4,0 , 4369,5 , 4374,12 , 2, 1, 1, 6, 7 }, // Manx/Latin/IsleOfMan
+ { 145, 7, 224, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 98,16 , 37,5 , 8,10 , 23055,46 , 23101,130 , 158,27 , 23055,46 , 23101,130 , 158,27 , 12447,28 , 12475,61 , 85,14 , 12447,28 , 12475,61 , 85,14 , 66,4 , 63,4 , 45,4 , 5,17 , 22,23 , {71,66,80}, 115,1 , 0,7 , 4,4 , 4,0 , 4386,8 , 4394,14 , 2, 1, 1, 6, 7 }, // Cornish/Latin/UnitedKingdom
+ { 146, 7, 83, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 1421,8 , 1429,18 , 18,7 , 25,12 , 23231,48 , 23279,192 , 158,27 , 23231,48 , 23279,192 , 158,27 , 12536,28 , 12564,49 , 12613,14 , 12536,28 , 12564,49 , 12613,14 , 416,2 , 388,2 , 45,4 , 5,17 , 22,23 , {71,72,83}, 163,3 , 15138,17 , 4,4 , 4,0 , 4408,4 , 4412,5 , 2, 1, 1, 6, 7 }, // Akan/Latin/Ghana
+ { 147, 13, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 1447,6 , 98,16 , 18,7 , 25,12 , 23471,88 , 23471,88 , 158,27 , 23471,88 , 23471,88 , 158,27 , 12627,49 , 12627,49 , 12676,20 , 12627,49 , 12627,49 , 12676,20 , 185,5 , 390,5 , 45,4 , 5,17 , 22,23 , {73,78,82}, 117,1 , 15155,13 , 8,5 , 4,0 , 4417,6 , 2584,4 , 2, 1, 7, 7, 7 }, // Konkani/Devanagari/India
{ 148, 7, 83, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {71,72,83}, 0,0 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Ga/Latin/Ghana
- { 149, 7, 157, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 23165,48 , 23213,86 , 158,27 , 23165,48 , 23213,86 , 158,27 , 12213,29 , 12242,57 , 85,14 , 12213,29 , 12242,57 , 85,14 , 38,4 , 368,4 , 45,4 , 5,17 , 22,23 , {78,71,78}, 184,1 , 14944,12 , 4,4 , 4,0 , 4383,4 , 1303,7 , 2, 1, 1, 6, 7 }, // Igbo/Latin/Nigeria
- { 150, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 23299,48 , 23347,189 , 23536,24 , 23299,48 , 23347,189 , 23536,24 , 12299,28 , 12327,74 , 12401,14 , 12299,28 , 12327,74 , 12401,14 , 392,9 , 372,7 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 14956,23 , 4,4 , 4,0 , 4387,7 , 1153,5 , 2, 1, 7, 6, 7 }, // Kamba/Latin/Kenya
+ { 149, 7, 157, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 23559,48 , 23607,86 , 158,27 , 23559,48 , 23607,86 , 158,27 , 12696,29 , 12725,57 , 85,14 , 12696,29 , 12725,57 , 85,14 , 40,4 , 395,4 , 45,4 , 5,17 , 22,23 , {78,71,78}, 174,1 , 15168,12 , 4,4 , 4,0 , 4423,4 , 4427,8 , 2, 1, 1, 6, 7 }, // Igbo/Latin/Nigeria
+ { 150, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 23693,48 , 23741,189 , 23930,24 , 23693,48 , 23741,189 , 23930,24 , 12782,28 , 12810,74 , 12884,14 , 12782,28 , 12810,74 , 12884,14 , 418,9 , 399,7 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 15180,23 , 4,4 , 4,0 , 4435,7 , 1153,5 , 2, 1, 7, 6, 7 }, // Kamba/Latin/Kenya
{ 151, 33, 103, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {73,81,68}, 0,0 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 0, 0, 6, 5, 6 }, // Syriac/Syriac/Iraq
{ 152, 14, 67, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,82,78}, 0,0 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Blin/Ethiopic/Eritrea
{ 153, 14, 69, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,84,66}, 0,0 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 6, 7 }, // Geez/Ethiopic/Ethiopia
{ 155, 7, 69, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,84,66}, 0,0 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 6, 7 }, // Sidamo/Latin/Ethiopia
- { 156, 7, 157, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {78,71,78}, 184,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Atsam/Latin/Nigeria
+ { 156, 7, 157, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {78,71,78}, 174,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Atsam/Latin/Nigeria
{ 157, 14, 67, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,82,78}, 0,0 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Tigre/Ethiopic/Eritrea
- { 158, 7, 157, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {78,71,78}, 184,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Jju/Latin/Nigeria
- { 159, 7, 106, 44, 46, 59, 37, 48, 45, 43, 101, 8216, 8217, 8220, 8221, 0,6 , 0,6 , 236,7 , 236,7 , 27,8 , 1371,27 , 37,5 , 8,10 , 23560,48 , 23608,77 , 23685,24 , 23560,48 , 23608,77 , 23685,24 , 12415,28 , 12443,50 , 3054,14 , 12415,28 , 12443,50 , 3054,14 , 401,2 , 379,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3057,20 , 8,5 , 4,0 , 4394,6 , 4400,6 , 2, 1, 1, 6, 7 }, // Friulian/Latin/Italy
+ { 158, 7, 157, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {78,71,78}, 174,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Jju/Latin/Nigeria
+ { 159, 7, 106, 44, 46, 59, 37, 48, 45, 43, 101, 8216, 8217, 8220, 8221, 0,6 , 0,6 , 245,7 , 245,7 , 27,8 , 1453,27 , 37,5 , 8,10 , 23954,48 , 24002,77 , 24079,24 , 23954,48 , 24002,77 , 24079,24 , 12898,28 , 12926,50 , 3064,14 , 12898,28 , 12926,50 , 3064,14 , 427,2 , 406,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3102,20 , 8,5 , 4,0 , 4442,6 , 4448,6 , 2, 1, 1, 6, 7 }, // Friulian/Latin/Italy
{ 160, 7, 195, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {90,65,82}, 5,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 6, 7 }, // Venda/Latin/SouthAfrica
- { 161, 7, 83, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 720,11 , 731,10 , 516,6 , 1398,23 , 423,12 , 435,17 , 23709,48 , 23757,87 , 23844,24 , 23709,48 , 23757,87 , 23844,24 , 12493,28 , 12521,44 , 12565,14 , 12493,28 , 12521,44 , 12565,14 , 403,3 , 381,5 , 45,4 , 5,17 , 22,23 , {71,72,83}, 173,3 , 14979,37 , 4,4 , 4,0 , 4406,6 , 4412,12 , 2, 1, 1, 6, 7 }, // Ewe/Latin/Ghana
- { 161, 7, 212, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 720,11 , 731,10 , 516,6 , 1398,23 , 37,5 , 8,10 , 23709,48 , 23757,87 , 23844,24 , 23709,48 , 23757,87 , 23844,24 , 12493,28 , 12521,44 , 12565,14 , 12493,28 , 12521,44 , 12565,14 , 403,3 , 381,5 , 45,4 , 5,17 , 22,23 , {88,79,70}, 210,3 , 15016,106 , 4,4 , 4,0 , 4406,6 , 4424,11 , 0, 0, 1, 6, 7 }, // Ewe/Latin/Togo
+ { 161, 7, 83, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 791,11 , 802,10 , 543,6 , 1480,23 , 468,12 , 480,17 , 24103,48 , 24151,87 , 24238,24 , 24103,48 , 24151,87 , 24238,24 , 12976,28 , 13004,44 , 13048,14 , 12976,28 , 13004,44 , 13048,14 , 429,3 , 408,5 , 45,4 , 5,17 , 22,23 , {71,72,83}, 163,3 , 15203,37 , 4,4 , 4,0 , 4454,6 , 4460,12 , 2, 1, 1, 6, 7 }, // Ewe/Latin/Ghana
+ { 161, 7, 212, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 791,11 , 802,10 , 543,6 , 1480,23 , 37,5 , 8,10 , 24103,48 , 24151,87 , 24238,24 , 24103,48 , 24151,87 , 24238,24 , 12976,28 , 13004,44 , 13048,14 , 12976,28 , 13004,44 , 13048,14 , 429,3 , 408,5 , 45,4 , 5,17 , 22,23 , {88,79,70}, 200,3 , 15240,106 , 4,4 , 4,0 , 4454,6 , 4472,11 , 0, 0, 1, 6, 7 }, // Ewe/Latin/Togo
{ 162, 14, 69, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,84,66}, 0,0 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 6, 7 }, // Walamo/Ethiopic/Ethiopia
- { 163, 7, 225, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 278,6 , 10,17 , 18,7 , 25,12 , 23868,59 , 23927,95 , 158,27 , 23868,59 , 23927,95 , 158,27 , 12579,21 , 12600,57 , 85,14 , 12579,21 , 12600,57 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {85,83,68}, 6,1 , 0,7 , 4,4 , 4,0 , 4435,14 , 4449,19 , 2, 1, 7, 6, 7 }, // Hawaiian/Latin/UnitedStates
- { 164, 7, 157, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {78,71,78}, 184,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Tyap/Latin/Nigeria
+ { 163, 7, 225, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 287,6 , 10,17 , 18,7 , 25,12 , 24262,59 , 24321,95 , 158,27 , 24262,59 , 24321,95 , 158,27 , 13062,21 , 13083,57 , 85,14 , 13062,21 , 13083,57 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {85,83,68}, 6,1 , 0,7 , 4,4 , 4,0 , 4483,14 , 4497,19 , 2, 1, 7, 6, 7 }, // Hawaiian/Latin/UnitedStates
+ { 164, 7, 157, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {78,71,78}, 174,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Tyap/Latin/Nigeria
{ 165, 7, 129, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {77,87,75}, 0,0 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Nyanja/Latin/Malawi
- { 166, 7, 170, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 741,9 , 750,8 , 516,6 , 35,18 , 18,7 , 25,12 , 24022,48 , 24070,88 , 24158,38 , 24022,48 , 24070,88 , 24022,48 , 12657,28 , 12685,55 , 12657,28 , 12657,28 , 12685,55 , 12657,28 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {80,72,80}, 185,1 , 15122,58 , 4,4 , 4,0 , 4468,8 , 4476,9 , 2, 1, 7, 6, 7 }, // Filipino/Latin/Philippines
- { 167, 7, 206, 46, 8217, 59, 37, 48, 8722, 43, 101, 171, 187, 8249, 8250, 0,6 , 0,6 , 251,9 , 251,9 , 175,8 , 532,18 , 37,5 , 8,10 , 7736,48 , 24196,86 , 134,24 , 7736,48 , 24196,86 , 134,24 , 12740,28 , 12768,63 , 3642,14 , 12740,28 , 12768,63 , 3642,14 , 406,12 , 386,11 , 45,4 , 5,17 , 22,23 , {67,72,70}, 229,3 , 15180,55 , 13,5 , 4,0 , 4485,16 , 4501,7 , 2, 0, 1, 6, 7 }, // Swiss German/Latin/Switzerland
- { 167, 7, 74, 46, 8217, 59, 37, 48, 8722, 43, 101, 171, 187, 8249, 8250, 0,6 , 0,6 , 251,9 , 251,9 , 175,8 , 532,18 , 37,5 , 8,10 , 7736,48 , 24196,86 , 134,24 , 7736,48 , 24196,86 , 134,24 , 12740,28 , 12768,63 , 3642,14 , 12740,28 , 12768,63 , 3642,14 , 406,12 , 386,11 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8339,19 , 13,5 , 4,0 , 4485,16 , 4508,10 , 2, 1, 1, 6, 7 }, // Swiss German/Latin/France
- { 167, 7, 123, 46, 8217, 59, 37, 48, 8722, 43, 101, 171, 187, 8249, 8250, 0,6 , 0,6 , 251,9 , 251,9 , 175,8 , 532,18 , 37,5 , 8,10 , 7736,48 , 24196,86 , 134,24 , 7736,48 , 24196,86 , 134,24 , 12740,28 , 12768,63 , 3642,14 , 12740,28 , 12768,63 , 3642,14 , 406,12 , 386,11 , 45,4 , 5,17 , 22,23 , {67,72,70}, 229,3 , 15180,55 , 13,5 , 4,0 , 4485,16 , 4518,13 , 2, 0, 1, 6, 7 }, // Swiss German/Latin/Liechtenstein
- { 168, 34, 44, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 18,7 , 25,12 , 24282,38 , 24282,38 , 158,27 , 24282,38 , 24282,38 , 158,27 , 12831,21 , 12852,28 , 12880,14 , 12831,21 , 12852,28 , 12880,14 , 418,2 , 397,2 , 45,4 , 5,17 , 22,23 , {67,78,89}, 329,1 , 0,7 , 8,5 , 4,0 , 4531,3 , 4534,2 , 2, 1, 7, 6, 7 }, // Sichuan Yi/Yi/China
+ { 166, 7, 170, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 812,9 , 821,8 , 543,6 , 35,18 , 18,7 , 25,12 , 24416,48 , 24464,88 , 24552,38 , 24416,48 , 24464,88 , 24416,48 , 13140,28 , 13168,55 , 13140,28 , 13140,28 , 13168,55 , 13140,28 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {80,72,80}, 175,1 , 15346,58 , 4,4 , 4,0 , 4516,8 , 4524,9 , 2, 1, 7, 6, 7 }, // Filipino/Latin/Philippines
+ { 167, 7, 206, 46, 8217, 59, 37, 48, 8722, 43, 101, 171, 187, 8249, 8250, 0,6 , 0,6 , 260,9 , 260,9 , 174,8 , 559,18 , 37,5 , 8,10 , 7710,48 , 24590,86 , 134,24 , 7710,48 , 24590,86 , 134,24 , 13223,28 , 13251,63 , 3652,14 , 13223,28 , 13251,63 , 3652,14 , 432,12 , 413,11 , 45,4 , 5,17 , 22,23 , {67,72,70}, 217,3 , 15404,55 , 13,5 , 4,0 , 4533,16 , 4549,7 , 2, 0, 1, 6, 7 }, // Swiss German/Latin/Switzerland
+ { 167, 7, 74, 46, 8217, 59, 37, 48, 8722, 43, 101, 171, 187, 8249, 8250, 0,6 , 0,6 , 260,9 , 260,9 , 174,8 , 559,18 , 37,5 , 8,10 , 7710,48 , 24590,86 , 134,24 , 7710,48 , 24590,86 , 134,24 , 13223,28 , 13251,63 , 3652,14 , 13223,28 , 13251,63 , 3652,14 , 432,12 , 413,11 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8384,19 , 13,5 , 4,0 , 4533,16 , 4556,10 , 2, 1, 1, 6, 7 }, // Swiss German/Latin/France
+ { 167, 7, 123, 46, 8217, 59, 37, 48, 8722, 43, 101, 171, 187, 8249, 8250, 0,6 , 0,6 , 260,9 , 260,9 , 174,8 , 559,18 , 37,5 , 8,10 , 7710,48 , 24590,86 , 134,24 , 7710,48 , 24590,86 , 134,24 , 13223,28 , 13251,63 , 3652,14 , 13223,28 , 13251,63 , 3652,14 , 432,12 , 413,11 , 45,4 , 5,17 , 22,23 , {67,72,70}, 217,3 , 15404,55 , 13,5 , 4,0 , 4533,16 , 4566,13 , 2, 0, 1, 6, 7 }, // Swiss German/Latin/Liechtenstein
+ { 168, 34, 44, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 18,7 , 25,12 , 24676,38 , 24676,38 , 158,27 , 24676,38 , 24676,38 , 158,27 , 13314,21 , 13335,28 , 13363,14 , 13314,21 , 13335,28 , 13363,14 , 444,2 , 424,2 , 45,4 , 5,17 , 22,23 , {67,78,89}, 321,1 , 0,7 , 8,5 , 4,0 , 4579,3 , 4582,2 , 2, 1, 7, 6, 7 }, // Sichuan Yi/Yi/China
{ 169, 7, 121, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {76,82,68}, 6,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Kpelle/Latin/Liberia
- { 170, 7, 82, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 409,8 , 409,8 , 356,7 , 1421,23 , 452,10 , 462,19 , 7867,59 , 24320,85 , 134,24 , 7867,59 , 24320,85 , 134,24 , 12894,28 , 12922,65 , 3642,14 , 12894,28 , 12922,65 , 3642,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 15235,15 , 13,5 , 4,0 , 4536,14 , 4550,11 , 2, 1, 1, 6, 7 }, // Low German/Latin/Germany
- { 170, 7, 151, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 409,8 , 409,8 , 356,7 , 1421,23 , 452,10 , 462,19 , 7867,59 , 24320,85 , 134,24 , 7867,59 , 24320,85 , 134,24 , 12894,28 , 12922,65 , 3642,14 , 12894,28 , 12922,65 , 3642,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 15235,15 , 13,5 , 4,0 , 4536,14 , 4561,12 , 2, 1, 1, 6, 7 }, // Low German/Latin/Netherlands
+ { 170, 7, 82, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 418,8 , 418,8 , 383,7 , 1503,23 , 497,10 , 507,19 , 7841,59 , 24714,85 , 134,24 , 7841,59 , 24714,85 , 134,24 , 13377,28 , 13405,65 , 3652,14 , 13377,28 , 13405,65 , 3652,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 15459,15 , 13,5 , 4,0 , 4584,14 , 4598,11 , 2, 1, 1, 6, 7 }, // Low German/Latin/Germany
+ { 170, 7, 151, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 418,8 , 418,8 , 383,7 , 1503,23 , 497,10 , 507,19 , 7841,59 , 24714,85 , 134,24 , 7841,59 , 24714,85 , 134,24 , 13377,28 , 13405,65 , 3652,14 , 13377,28 , 13405,65 , 3652,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 15459,15 , 13,5 , 4,0 , 4584,14 , 4609,12 , 2, 1, 1, 6, 7 }, // Low German/Latin/Netherlands
{ 171, 7, 195, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {90,65,82}, 5,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 6, 7 }, // South Ndebele/Latin/SouthAfrica
{ 172, 7, 195, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {90,65,82}, 5,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 6, 7 }, // Northern Sotho/Latin/SouthAfrica
- { 173, 7, 161, 44, 160, 59, 37, 48, 8722, 43, 101, 8221, 8221, 8217, 8217, 0,6 , 0,6 , 210,8 , 210,8 , 53,10 , 63,17 , 37,5 , 8,10 , 24405,59 , 24464,145 , 24609,24 , 24405,59 , 24464,145 , 24609,24 , 12987,33 , 13020,75 , 13095,14 , 12987,33 , 13020,75 , 13095,14 , 420,11 , 399,13 , 45,4 , 5,17 , 22,23 , {78,79,75}, 196,2 , 15250,63 , 13,5 , 4,0 , 4573,15 , 4588,5 , 2, 1, 1, 6, 7 }, // Northern Sami/Latin/Norway
- { 173, 7, 73, 44, 160, 59, 37, 48, 8722, 43, 101, 8221, 8221, 8217, 8217, 0,6 , 0,6 , 210,8 , 210,8 , 53,10 , 63,17 , 37,5 , 8,10 , 24405,59 , 24464,145 , 24609,24 , 24405,59 , 24464,145 , 24609,24 , 12987,33 , 13020,75 , 13109,14 , 12987,33 , 13123,79 , 13109,14 , 420,11 , 399,13 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 15313,23 , 13,5 , 4,0 , 4573,15 , 4593,6 , 2, 1, 1, 6, 7 }, // Northern Sami/Latin/Finland
- { 173, 7, 205, 44, 160, 59, 37, 48, 8722, 43, 101, 8221, 8221, 8217, 8217, 0,6 , 0,6 , 210,8 , 210,8 , 53,10 , 63,17 , 37,5 , 8,10 , 24405,59 , 24464,145 , 24609,24 , 24405,59 , 24464,145 , 24609,24 , 12987,33 , 13020,75 , 13095,14 , 12987,33 , 13020,75 , 13095,14 , 420,11 , 399,13 , 45,4 , 5,17 , 22,23 , {83,69,75}, 196,2 , 15336,63 , 13,5 , 4,0 , 4573,15 , 4599,6 , 2, 1, 1, 6, 7 }, // Northern Sami/Latin/Sweden
- { 174, 7, 208, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {84,87,68}, 341,3 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 0, 7, 6, 7 }, // Taroko/Latin/Taiwan
- { 175, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 24633,48 , 24681,88 , 24769,24 , 24633,48 , 24681,88 , 24769,24 , 13202,28 , 13230,62 , 13292,14 , 13202,28 , 13230,62 , 13292,14 , 431,6 , 412,3 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 15399,24 , 4,4 , 4,0 , 4605,8 , 1153,5 , 2, 1, 7, 6, 7 }, // Gusii/Latin/Kenya
- { 176, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 24793,48 , 24841,221 , 25062,24 , 24793,48 , 24841,221 , 25062,24 , 13306,28 , 13334,105 , 13439,14 , 13306,28 , 13334,105 , 13439,14 , 437,10 , 415,10 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 15399,24 , 4,4 , 4,0 , 4613,7 , 1153,5 , 2, 1, 7, 6, 7 }, // Taita/Latin/Kenya
- { 177, 7, 187, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8221, 8218, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 37,5 , 8,10 , 25086,48 , 25134,77 , 25211,24 , 25086,48 , 25134,77 , 25211,24 , 13453,28 , 13481,59 , 13540,14 , 13453,28 , 13481,59 , 13540,14 , 447,6 , 425,7 , 45,4 , 5,17 , 22,23 , {88,79,70}, 210,3 , 15423,26 , 13,5 , 4,0 , 4620,6 , 4626,8 , 0, 0, 1, 6, 7 }, // Fulah/Latin/Senegal
- { 177, 7, 37, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8221, 8218, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 37,5 , 8,10 , 25086,48 , 25134,77 , 25211,24 , 25086,48 , 25134,77 , 25211,24 , 13453,28 , 13481,59 , 13540,14 , 13453,28 , 13481,59 , 13540,14 , 447,6 , 425,7 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 15449,25 , 13,5 , 4,0 , 4620,6 , 4634,8 , 0, 0, 1, 6, 7 }, // Fulah/Latin/Cameroon
- { 177, 7, 91, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8221, 8218, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 37,5 , 8,10 , 25086,48 , 25134,77 , 25211,24 , 25086,48 , 25134,77 , 25211,24 , 13453,28 , 13481,59 , 13540,14 , 13453,28 , 13481,59 , 13540,14 , 447,6 , 425,7 , 45,4 , 5,17 , 22,23 , {71,78,70}, 221,2 , 0,7 , 13,5 , 4,0 , 4620,6 , 4642,4 , 0, 0, 1, 6, 7 }, // Fulah/Latin/Guinea
- { 177, 7, 136, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8221, 8218, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 18,7 , 25,12 , 25086,48 , 25134,77 , 25211,24 , 25086,48 , 25134,77 , 25211,24 , 13453,28 , 13481,59 , 13540,14 , 13453,28 , 13481,59 , 13540,14 , 447,6 , 425,7 , 45,4 , 5,17 , 22,23 , {77,82,79}, 224,2 , 15474,22 , 13,5 , 4,0 , 4620,6 , 4646,8 , 0, 0, 1, 6, 7 }, // Fulah/Latin/Mauritania
- { 178, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 25235,48 , 25283,185 , 25468,24 , 25235,48 , 25283,185 , 25468,24 , 13554,28 , 13582,63 , 13645,14 , 13554,28 , 13582,63 , 13645,14 , 453,6 , 432,8 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 15496,23 , 4,4 , 4,0 , 4654,6 , 1153,5 , 2, 1, 7, 6, 7 }, // Kikuyu/Latin/Kenya
- { 179, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 25492,48 , 25540,173 , 25713,24 , 25492,48 , 25540,173 , 25713,24 , 13659,28 , 13687,105 , 13792,14 , 13659,28 , 13687,105 , 13792,14 , 459,7 , 440,5 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 15519,25 , 4,4 , 4,0 , 4660,8 , 1153,5 , 2, 1, 7, 6, 7 }, // Samburu/Latin/Kenya
- { 180, 7, 146, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 587,27 , 37,5 , 8,10 , 25737,48 , 25785,88 , 134,24 , 25737,48 , 25785,88 , 134,24 , 13806,28 , 13834,55 , 13889,14 , 13806,28 , 13834,55 , 13889,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {77,90,78}, 284,3 , 15544,28 , 0,4 , 4,0 , 4668,4 , 3210,10 , 2, 1, 7, 6, 7 }, // Sena/Latin/Mozambique
- { 181, 7, 240, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 25873,52 , 25925,112 , 26037,24 , 25873,52 , 25925,112 , 26037,24 , 13903,28 , 13931,50 , 13981,14 , 13903,28 , 13931,50 , 13981,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {85,83,68}, 165,3 , 15572,24 , 4,4 , 4,0 , 4672,10 , 1762,8 , 2, 1, 7, 6, 7 }, // North Ndebele/Latin/Zimbabwe
- { 182, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 26061,39 , 26100,194 , 26294,24 , 26061,39 , 26100,194 , 26294,24 , 13995,29 , 14024,65 , 14089,14 , 13995,29 , 14024,65 , 14089,14 , 466,8 , 445,7 , 45,4 , 5,17 , 22,23 , {84,90,83}, 198,3 , 15596,25 , 4,4 , 4,0 , 4682,9 , 1587,8 , 0, 0, 1, 6, 7 }, // Rombo/Latin/Tanzania
- { 183, 9, 145, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 37,5 , 8,10 , 26318,48 , 26366,81 , 26447,24 , 26318,48 , 26366,81 , 26447,24 , 14103,30 , 14133,47 , 85,14 , 14103,30 , 14133,47 , 85,14 , 474,6 , 452,8 , 45,4 , 5,17 , 22,23 , {77,65,68}, 0,0 , 15621,21 , 0,4 , 4,0 , 4691,7 , 4698,6 , 2, 1, 6, 5, 6 }, // Tachelhit/Tifinagh/Morocco
- { 183, 7, 145, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 37,5 , 8,10 , 26471,48 , 26519,81 , 26600,24 , 26471,48 , 26519,81 , 26600,24 , 14180,30 , 14210,48 , 85,14 , 14180,30 , 14210,48 , 85,14 , 480,6 , 460,8 , 45,4 , 5,17 , 22,23 , {77,65,68}, 0,0 , 15642,21 , 0,4 , 4,0 , 4704,10 , 4714,6 , 2, 1, 6, 5, 6 }, // Tachelhit/Latin/Morocco
- { 184, 7, 3, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 18,7 , 25,12 , 26624,48 , 26672,84 , 26756,24 , 26624,48 , 26672,84 , 26756,24 , 14258,30 , 14288,51 , 14339,14 , 14258,30 , 14288,51 , 14339,14 , 486,7 , 468,9 , 45,4 , 5,17 , 22,23 , {68,90,68}, 208,2 , 15663,21 , 0,4 , 4,0 , 4720,9 , 4729,8 , 2, 1, 6, 5, 6 }, // Kabyle/Latin/Algeria
- { 185, 7, 221, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 26780,48 , 26828,152 , 134,24 , 26780,48 , 26828,152 , 134,24 , 14353,28 , 14381,74 , 14455,14 , 14353,28 , 14381,74 , 14455,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {85,71,88}, 203,3 , 15684,26 , 4,4 , 4,0 , 4737,10 , 1652,6 , 0, 0, 1, 6, 7 }, // Nyankole/Latin/Uganda
- { 186, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 26980,48 , 27028,254 , 27282,24 , 26980,48 , 27028,254 , 27282,24 , 14469,28 , 14497,82 , 14579,14 , 14469,28 , 14497,82 , 14579,14 , 493,7 , 477,7 , 45,4 , 5,17 , 22,23 , {84,90,83}, 198,3 , 15710,29 , 0,4 , 4,0 , 4747,6 , 4753,10 , 0, 0, 1, 6, 7 }, // Bena/Latin/Tanzania
- { 187, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 18222,48 , 27306,87 , 134,24 , 18222,48 , 27306,87 , 134,24 , 14593,28 , 14621,62 , 14683,14 , 14593,28 , 14621,62 , 14683,14 , 500,5 , 484,9 , 45,4 , 5,17 , 22,23 , {84,90,83}, 198,3 , 15739,27 , 4,4 , 4,0 , 4763,8 , 1587,8 , 0, 0, 1, 6, 7 }, // Vunjo/Latin/Tanzania
- { 188, 7, 132, 46, 44, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 37,5 , 8,10 , 27393,47 , 27440,92 , 27532,24 , 27393,47 , 27440,92 , 27532,24 , 14697,28 , 14725,44 , 14769,14 , 14697,28 , 14725,44 , 14769,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {88,79,70}, 210,3 , 15766,24 , 4,4 , 4,0 , 4771,9 , 2106,4 , 0, 0, 1, 6, 7 }, // Bambara/Latin/Mali
- { 188, 75, 132, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {88,79,70}, 210,3 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 0, 0, 1, 6, 7 }, // Bambara/Nko/Mali
- { 189, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 27556,48 , 27604,207 , 27811,24 , 27556,48 , 27604,207 , 27811,24 , 14783,28 , 14811,64 , 14875,14 , 14783,28 , 14811,64 , 14875,14 , 505,2 , 493,2 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 15399,24 , 4,4 , 4,0 , 4780,6 , 1153,5 , 2, 1, 7, 6, 7 }, // Embu/Latin/Kenya
- { 190, 12, 225, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 758,8 , 758,8 , 516,6 , 35,18 , 18,7 , 25,12 , 27835,36 , 27871,58 , 27929,24 , 27835,36 , 27871,58 , 27929,24 , 14889,28 , 14917,49 , 14966,14 , 14889,28 , 14917,49 , 14966,14 , 507,3 , 495,6 , 942,6 , 5,17 , 22,23 , {85,83,68}, 6,1 , 15790,25 , 4,4 , 4,0 , 4786,3 , 4789,15 , 2, 1, 7, 6, 7 }, // Cherokee/Cherokee/UnitedStates
- { 191, 7, 137, 46, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 37,5 , 8,10 , 27953,47 , 28000,68 , 28068,24 , 27953,47 , 28000,68 , 28068,24 , 14980,27 , 15007,48 , 15055,14 , 14980,27 , 15007,48 , 15055,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {77,85,82}, 182,2 , 15815,21 , 79,6 , 4,0 , 4804,14 , 4818,5 , 0, 0, 1, 6, 7 }, // Morisyen/Latin/Mauritius
- { 192, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 18222,48 , 28092,264 , 134,24 , 18222,48 , 28092,264 , 134,24 , 15069,28 , 15097,133 , 14089,14 , 15069,28 , 15097,133 , 14089,14 , 510,4 , 501,5 , 45,4 , 5,17 , 22,23 , {84,90,83}, 198,3 , 15739,27 , 4,4 , 4,0 , 4823,10 , 1587,8 , 0, 0, 1, 6, 7 }, // Makonde/Latin/Tanzania
- { 193, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8221, 8221, 8217, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 28356,83 , 28439,111 , 28550,24 , 28356,83 , 28439,111 , 28550,24 , 15230,36 , 15266,63 , 15329,14 , 15230,36 , 15266,63 , 15329,14 , 514,3 , 506,3 , 45,4 , 5,17 , 22,23 , {84,90,83}, 198,3 , 15836,29 , 79,6 , 4,0 , 4833,8 , 4841,9 , 0, 0, 1, 6, 7 }, // Langi/Latin/Tanzania
- { 194, 7, 221, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 28574,48 , 28622,97 , 134,24 , 28574,48 , 28622,97 , 134,24 , 15343,28 , 15371,66 , 15437,14 , 15343,28 , 15371,66 , 15437,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {85,71,88}, 203,3 , 15865,26 , 0,4 , 4,0 , 4850,7 , 4857,7 , 0, 0, 1, 6, 7 }, // Ganda/Latin/Uganda
- { 195, 7, 239, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 18,7 , 25,12 , 28719,48 , 28767,83 , 28850,24 , 28719,48 , 28767,83 , 28850,24 , 15451,80 , 15451,80 , 85,14 , 15451,80 , 15451,80 , 85,14 , 517,8 , 509,7 , 45,4 , 5,17 , 22,23 , {90,77,87}, 137,1 , 0,7 , 4,4 , 4,0 , 4864,9 , 1756,6 , 2, 1, 1, 6, 7 }, // Bemba/Latin/Zambia
- { 196, 7, 39, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 154,7 , 154,7 , 406,8 , 1444,27 , 37,5 , 8,10 , 28874,48 , 28922,85 , 134,24 , 28874,48 , 28922,85 , 134,24 , 15531,28 , 15559,73 , 15632,14 , 15531,28 , 15646,73 , 15632,14 , 68,2 , 65,2 , 45,4 , 297,17 , 22,23 , {67,86,69}, 283,1 , 15891,43 , 13,5 , 4,0 , 4873,12 , 4885,10 , 2, 1, 1, 6, 7 }, // Kabuverdianu/Latin/CapeVerde
- { 197, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 29007,48 , 29055,86 , 29141,24 , 29007,48 , 29055,86 , 29141,24 , 15719,28 , 15747,51 , 15798,14 , 15719,28 , 15747,51 , 15798,14 , 525,2 , 516,2 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 15399,24 , 4,4 , 4,0 , 4895,6 , 1153,5 , 2, 1, 7, 6, 7 }, // Meru/Latin/Kenya
- { 198, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 29165,49 , 29214,121 , 29335,24 , 29165,49 , 29214,121 , 29335,24 , 15812,28 , 15840,53 , 15893,14 , 15812,28 , 15840,53 , 15893,14 , 527,6 , 518,10 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 15934,26 , 4,4 , 4,0 , 4901,8 , 4909,12 , 2, 1, 7, 6, 7 }, // Kalenjin/Latin/Kenya
- { 199, 7, 148, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 29359,136 , 134,24 , 0,48 , 29359,136 , 134,24 , 15907,23 , 15930,92 , 16022,14 , 15907,23 , 15930,92 , 16022,14 , 533,7 , 528,5 , 45,4 , 5,17 , 22,23 , {78,65,68}, 6,1 , 15960,22 , 4,4 , 4,0 , 4921,13 , 4934,8 , 2, 1, 1, 6, 7 }, // Nama/Latin/Namibia
- { 200, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 18222,48 , 27306,87 , 134,24 , 18222,48 , 27306,87 , 134,24 , 14593,28 , 14621,62 , 14683,14 , 14593,28 , 14621,62 , 14683,14 , 500,5 , 484,9 , 45,4 , 5,17 , 22,23 , {84,90,83}, 198,3 , 15739,27 , 4,4 , 4,0 , 4942,9 , 1587,8 , 0, 0, 1, 6, 7 }, // Machame/Latin/Tanzania
- { 201, 7, 82, 44, 160, 59, 37, 48, 8722, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 409,8 , 409,8 , 1045,10 , 1471,23 , 37,5 , 8,10 , 29495,59 , 29554,87 , 12643,24 , 29641,48 , 29554,87 , 12643,24 , 16036,28 , 16064,72 , 3642,14 , 16036,28 , 16064,72 , 3642,14 , 540,16 , 533,16 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 15982,11 , 13,5 , 4,0 , 4951,6 , 4957,11 , 2, 1, 1, 6, 7 }, // Colognian/Latin/Germany
- { 202, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 29689,51 , 29740,132 , 158,27 , 29689,51 , 29740,132 , 158,27 , 14593,28 , 16136,58 , 14089,14 , 14593,28 , 16136,58 , 14089,14 , 556,9 , 549,6 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 15993,25 , 4,4 , 4,0 , 4968,3 , 1153,5 , 2, 1, 7, 6, 7 }, // Masai/Latin/Kenya
- { 202, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 29689,51 , 29740,132 , 158,27 , 29689,51 , 29740,132 , 158,27 , 14593,28 , 16136,58 , 14089,14 , 14593,28 , 16136,58 , 14089,14 , 556,9 , 549,6 , 45,4 , 5,17 , 22,23 , {84,90,83}, 198,3 , 16018,28 , 4,4 , 4,0 , 4968,3 , 4971,8 , 0, 0, 1, 6, 7 }, // Masai/Latin/Tanzania
- { 203, 7, 221, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 28574,48 , 28622,97 , 134,24 , 28574,48 , 28622,97 , 134,24 , 16194,35 , 16229,65 , 16294,14 , 16194,35 , 16229,65 , 16294,14 , 565,6 , 555,6 , 45,4 , 5,17 , 22,23 , {85,71,88}, 203,3 , 15865,26 , 13,5 , 4,0 , 4979,7 , 4857,7 , 0, 0, 1, 6, 7 }, // Soga/Latin/Uganda
- { 204, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 29872,48 , 18270,84 , 134,24 , 29872,48 , 18270,84 , 134,24 , 16308,21 , 16329,75 , 85,14 , 16308,21 , 16329,75 , 85,14 , 64,4 , 61,4 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 16046,23 , 4,4 , 91,6 , 4986,7 , 1153,5 , 2, 1, 7, 6, 7 }, // Luyia/Latin/Kenya
- { 205, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 29920,48 , 18270,84 , 134,24 , 29920,48 , 18270,84 , 134,24 , 16404,28 , 9545,60 , 14683,14 , 16404,28 , 9545,60 , 14683,14 , 571,9 , 561,8 , 45,4 , 5,17 , 22,23 , {84,90,83}, 198,3 , 16069,28 , 13,5 , 4,0 , 4993,6 , 4999,8 , 0, 0, 1, 6, 7 }, // Asu/Latin/Tanzania
- { 206, 7, 221, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 29968,48 , 30016,94 , 30110,24 , 29968,48 , 30016,94 , 30110,24 , 16432,28 , 16460,69 , 16529,14 , 16432,28 , 16460,69 , 16529,14 , 580,9 , 569,6 , 45,4 , 5,17 , 22,23 , {85,71,88}, 203,3 , 16097,28 , 4,4 , 4,0 , 5007,6 , 1652,6 , 0, 0, 1, 6, 7 }, // Teso/Latin/Uganda
- { 206, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 29968,48 , 30016,94 , 30110,24 , 29968,48 , 30016,94 , 30110,24 , 16432,28 , 16460,69 , 16529,14 , 16432,28 , 16460,69 , 16529,14 , 580,9 , 569,6 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 16125,27 , 4,4 , 4,0 , 5007,6 , 5013,5 , 2, 1, 7, 6, 7 }, // Teso/Latin/Kenya
+ { 173, 7, 161, 44, 160, 59, 37, 48, 8722, 43, 101, 8221, 8221, 8217, 8217, 0,6 , 0,6 , 219,8 , 219,8 , 53,10 , 63,17 , 37,5 , 8,10 , 24799,59 , 24858,145 , 25003,24 , 24799,59 , 24858,145 , 25003,24 , 13470,33 , 13503,75 , 13578,14 , 13470,33 , 13503,75 , 13578,14 , 446,11 , 426,13 , 45,4 , 5,17 , 22,23 , {78,79,75}, 186,2 , 15474,63 , 13,5 , 4,0 , 4621,15 , 4636,5 , 2, 0, 1, 6, 7 }, // Northern Sami/Latin/Norway
+ { 173, 7, 73, 44, 160, 59, 37, 48, 8722, 43, 101, 8221, 8221, 8217, 8217, 0,6 , 0,6 , 219,8 , 219,8 , 955,10 , 98,16 , 37,5 , 8,10 , 25027,60 , 24858,145 , 25003,24 , 25027,60 , 24858,145 , 25003,24 , 13592,21 , 13613,70 , 13683,14 , 13592,21 , 13613,70 , 13683,14 , 457,2 , 439,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 15537,23 , 13,5 , 4,0 , 4621,15 , 4641,6 , 2, 1, 1, 6, 7 }, // Northern Sami/Latin/Finland
+ { 173, 7, 205, 44, 160, 59, 37, 48, 8722, 43, 101, 8221, 8221, 8217, 8217, 0,6 , 0,6 , 219,8 , 219,8 , 53,10 , 63,17 , 37,5 , 8,10 , 24799,59 , 24858,145 , 25003,24 , 24799,59 , 24858,145 , 25003,24 , 13470,33 , 13503,75 , 13578,14 , 13470,33 , 13503,75 , 13578,14 , 446,11 , 426,13 , 45,4 , 5,17 , 22,23 , {83,69,75}, 186,2 , 15560,63 , 13,5 , 4,0 , 4621,15 , 4647,6 , 2, 0, 1, 6, 7 }, // Northern Sami/Latin/Sweden
+ { 174, 7, 208, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {84,87,68}, 333,3 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 0, 7, 6, 7 }, // Taroko/Latin/Taiwan
+ { 175, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 25087,48 , 25135,88 , 25223,24 , 25087,48 , 25135,88 , 25223,24 , 13697,28 , 13725,62 , 13787,14 , 13697,28 , 13725,62 , 13787,14 , 459,6 , 441,3 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 15623,24 , 4,4 , 4,0 , 4653,8 , 1153,5 , 2, 1, 7, 6, 7 }, // Gusii/Latin/Kenya
+ { 176, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 25247,48 , 25295,221 , 25516,24 , 25247,48 , 25295,221 , 25516,24 , 13801,28 , 13829,105 , 13934,14 , 13801,28 , 13829,105 , 13934,14 , 465,10 , 444,10 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 15623,24 , 4,4 , 4,0 , 4661,7 , 1153,5 , 2, 1, 7, 6, 7 }, // Taita/Latin/Kenya
+ { 177, 7, 187, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8221, 8218, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 37,5 , 8,10 , 25540,48 , 25588,77 , 25665,24 , 25540,48 , 25588,77 , 25665,24 , 13948,28 , 13976,59 , 14035,14 , 13948,28 , 13976,59 , 14035,14 , 475,6 , 454,7 , 45,4 , 5,17 , 22,23 , {88,79,70}, 200,3 , 15647,26 , 13,5 , 4,0 , 4668,6 , 4265,8 , 0, 0, 1, 6, 7 }, // Fulah/Latin/Senegal
+ { 177, 7, 37, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8221, 8218, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 37,5 , 8,10 , 25540,48 , 25588,77 , 25665,24 , 25540,48 , 25588,77 , 25665,24 , 13948,28 , 13976,59 , 14035,14 , 13948,28 , 13976,59 , 14035,14 , 475,6 , 454,7 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 15673,25 , 13,5 , 4,0 , 4668,6 , 4674,8 , 0, 0, 1, 6, 7 }, // Fulah/Latin/Cameroon
+ { 177, 7, 91, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8221, 8218, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 37,5 , 8,10 , 25540,48 , 25588,77 , 25665,24 , 25540,48 , 25588,77 , 25665,24 , 13948,28 , 13976,59 , 14035,14 , 13948,28 , 13976,59 , 14035,14 , 475,6 , 454,7 , 45,4 , 5,17 , 22,23 , {71,78,70}, 209,2 , 0,7 , 13,5 , 4,0 , 4668,6 , 4682,4 , 0, 0, 1, 6, 7 }, // Fulah/Latin/Guinea
+ { 177, 7, 136, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8221, 8218, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 18,7 , 25,12 , 25540,48 , 25588,77 , 25665,24 , 25540,48 , 25588,77 , 25665,24 , 13948,28 , 13976,59 , 14035,14 , 13948,28 , 13976,59 , 14035,14 , 475,6 , 454,7 , 45,4 , 5,17 , 22,23 , {77,82,85}, 212,2 , 15698,22 , 13,5 , 4,0 , 4668,6 , 4686,8 , 2, 1, 1, 6, 7 }, // Fulah/Latin/Mauritania
+ { 178, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 25689,48 , 25737,185 , 25922,24 , 25689,48 , 25737,185 , 25922,24 , 14049,28 , 14077,63 , 14140,14 , 14049,28 , 14077,63 , 14140,14 , 481,6 , 461,8 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 15720,23 , 4,4 , 4,0 , 4694,6 , 1153,5 , 2, 1, 7, 6, 7 }, // Kikuyu/Latin/Kenya
+ { 179, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 25946,48 , 25994,173 , 26167,24 , 25946,48 , 25994,173 , 26167,24 , 14154,28 , 14182,105 , 14287,14 , 14154,28 , 14182,105 , 14287,14 , 487,7 , 469,5 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 15743,25 , 4,4 , 4,0 , 4700,8 , 1153,5 , 2, 1, 7, 6, 7 }, // Samburu/Latin/Kenya
+ { 180, 7, 146, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 614,27 , 37,5 , 8,10 , 26191,48 , 26239,88 , 134,24 , 26191,48 , 26239,88 , 134,24 , 14301,28 , 14329,55 , 14384,14 , 14301,28 , 14329,55 , 14384,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {77,90,78}, 272,3 , 15768,28 , 0,4 , 4,0 , 4708,4 , 3206,10 , 2, 1, 7, 6, 7 }, // Sena/Latin/Mozambique
+ { 181, 7, 240, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 26327,52 , 26379,112 , 26491,24 , 26327,52 , 26379,112 , 26491,24 , 14398,28 , 14426,50 , 14476,14 , 14398,28 , 14426,50 , 14476,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {85,83,68}, 155,3 , 15796,24 , 4,4 , 4,0 , 4712,10 , 1762,8 , 2, 1, 7, 6, 7 }, // North Ndebele/Latin/Zimbabwe
+ { 182, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 26515,39 , 26554,194 , 26748,24 , 26515,39 , 26554,194 , 26748,24 , 14490,29 , 14519,65 , 14584,14 , 14490,29 , 14519,65 , 14584,14 , 494,8 , 474,7 , 45,4 , 5,17 , 22,23 , {84,90,83}, 188,3 , 15820,25 , 4,4 , 4,0 , 4722,9 , 1587,8 , 0, 0, 1, 6, 7 }, // Rombo/Latin/Tanzania
+ { 183, 9, 145, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 37,5 , 8,10 , 26772,48 , 26820,81 , 26901,24 , 26772,48 , 26820,81 , 26901,24 , 14598,30 , 14628,47 , 85,14 , 14598,30 , 14628,47 , 85,14 , 502,6 , 481,8 , 45,4 , 5,17 , 22,23 , {77,65,68}, 0,0 , 15845,21 , 0,4 , 4,0 , 4731,7 , 4738,6 , 2, 1, 6, 5, 6 }, // Tachelhit/Tifinagh/Morocco
+ { 183, 7, 145, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 37,5 , 8,10 , 26925,48 , 26973,81 , 27054,24 , 26925,48 , 26973,81 , 27054,24 , 14675,30 , 14705,48 , 85,14 , 14675,30 , 14705,48 , 85,14 , 508,6 , 489,8 , 45,4 , 5,17 , 22,23 , {77,65,68}, 0,0 , 15866,21 , 0,4 , 4,0 , 4744,10 , 4754,6 , 2, 1, 6, 5, 6 }, // Tachelhit/Latin/Morocco
+ { 184, 7, 3, 44, 160, 59, 37, 48, 45, 43, 122, 171, 187, 8220, 8221, 0,6 , 0,6 , 829,12 , 841,11 , 433,8 , 98,16 , 18,7 , 25,12 , 27078,48 , 27126,82 , 27208,24 , 27232,48 , 27280,84 , 27364,24 , 14753,28 , 14781,34 , 14815,14 , 14829,30 , 14859,51 , 14910,14 , 514,7 , 497,9 , 1046,7 , 1053,23 , 1076,29 , {68,90,68}, 198,2 , 15887,53 , 0,4 , 4,0 , 4760,9 , 4769,8 , 2, 1, 6, 5, 6 }, // Kabyle/Latin/Algeria
+ { 185, 7, 221, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 27388,48 , 27436,152 , 134,24 , 27388,48 , 27436,152 , 134,24 , 14924,28 , 14952,74 , 15026,14 , 14924,28 , 14952,74 , 15026,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {85,71,88}, 193,3 , 15940,26 , 4,4 , 4,0 , 4777,10 , 1652,6 , 0, 0, 1, 6, 7 }, // Nyankole/Latin/Uganda
+ { 186, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 27588,48 , 27636,254 , 27890,24 , 27588,48 , 27636,254 , 27890,24 , 15040,28 , 15068,82 , 15150,14 , 15040,28 , 15068,82 , 15150,14 , 521,7 , 506,7 , 45,4 , 5,17 , 22,23 , {84,90,83}, 188,3 , 15966,29 , 0,4 , 4,0 , 4787,6 , 4793,10 , 0, 0, 1, 6, 7 }, // Bena/Latin/Tanzania
+ { 187, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 18324,48 , 27914,87 , 134,24 , 18324,48 , 27914,87 , 134,24 , 15164,28 , 15192,62 , 15254,14 , 15164,28 , 15192,62 , 15254,14 , 528,5 , 513,9 , 45,4 , 5,17 , 22,23 , {84,90,83}, 188,3 , 15995,27 , 4,4 , 4,0 , 4803,8 , 1587,8 , 0, 0, 1, 6, 7 }, // Vunjo/Latin/Tanzania
+ { 188, 7, 132, 46, 44, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 37,5 , 8,10 , 28001,47 , 28048,92 , 28140,24 , 28001,47 , 28048,92 , 28140,24 , 15268,28 , 15296,44 , 15340,14 , 15268,28 , 15296,44 , 15340,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {88,79,70}, 200,3 , 16022,24 , 4,4 , 4,0 , 4811,9 , 2106,4 , 0, 0, 1, 6, 7 }, // Bambara/Latin/Mali
+ { 188, 75, 132, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {88,79,70}, 200,3 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 0, 0, 1, 6, 7 }, // Bambara/Nko/Mali
+ { 189, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 28164,48 , 28212,207 , 28419,24 , 28164,48 , 28212,207 , 28419,24 , 15354,28 , 15382,64 , 15446,14 , 15354,28 , 15382,64 , 15446,14 , 533,2 , 522,2 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 15623,24 , 4,4 , 4,0 , 4820,6 , 1153,5 , 2, 1, 7, 6, 7 }, // Embu/Latin/Kenya
+ { 190, 12, 225, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 852,8 , 852,8 , 543,6 , 35,18 , 18,7 , 25,12 , 28443,36 , 28479,58 , 28537,24 , 28443,36 , 28479,58 , 28537,24 , 15460,28 , 15488,49 , 15537,14 , 15460,28 , 15488,49 , 15537,14 , 535,3 , 524,6 , 1105,6 , 5,17 , 22,23 , {85,83,68}, 6,1 , 16046,25 , 4,4 , 4,0 , 4826,3 , 4829,15 , 2, 1, 7, 6, 7 }, // Cherokee/Cherokee/UnitedStates
+ { 191, 7, 137, 46, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 37,5 , 8,10 , 28561,47 , 28608,68 , 28676,24 , 28561,47 , 28608,68 , 28676,24 , 15551,27 , 15578,48 , 15626,14 , 15551,27 , 15578,48 , 15626,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {77,85,82}, 172,2 , 16071,21 , 83,6 , 4,0 , 4844,14 , 4858,5 , 0, 0, 1, 6, 7 }, // Morisyen/Latin/Mauritius
+ { 192, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 18324,48 , 28700,264 , 134,24 , 18324,48 , 28700,264 , 134,24 , 15640,28 , 15668,133 , 14584,14 , 15640,28 , 15668,133 , 14584,14 , 538,4 , 530,5 , 45,4 , 5,17 , 22,23 , {84,90,83}, 188,3 , 15995,27 , 4,4 , 4,0 , 4863,10 , 1587,8 , 0, 0, 1, 6, 7 }, // Makonde/Latin/Tanzania
+ { 193, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8221, 8221, 8217, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 28964,83 , 29047,111 , 29158,24 , 28964,83 , 29047,111 , 29158,24 , 15801,36 , 15837,63 , 15900,14 , 15801,36 , 15837,63 , 15900,14 , 542,3 , 535,3 , 45,4 , 5,17 , 22,23 , {84,90,83}, 188,3 , 16092,29 , 83,6 , 4,0 , 4873,8 , 4881,9 , 0, 0, 1, 6, 7 }, // Langi/Latin/Tanzania
+ { 194, 7, 221, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 29182,48 , 29230,97 , 134,24 , 29182,48 , 29230,97 , 134,24 , 15914,28 , 15942,66 , 16008,14 , 15914,28 , 15942,66 , 16008,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {85,71,88}, 193,3 , 16121,26 , 0,4 , 4,0 , 4890,7 , 4897,7 , 0, 0, 1, 6, 7 }, // Ganda/Latin/Uganda
+ { 195, 7, 239, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 18,7 , 25,12 , 29327,48 , 29375,83 , 29458,24 , 29327,48 , 29375,83 , 29458,24 , 16022,80 , 16022,80 , 85,14 , 16022,80 , 16022,80 , 85,14 , 545,8 , 538,7 , 45,4 , 5,17 , 22,23 , {90,77,87}, 127,1 , 0,7 , 4,4 , 4,0 , 4904,9 , 1756,6 , 2, 1, 1, 6, 7 }, // Bemba/Latin/Zambia
+ { 196, 7, 39, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 163,7 , 163,7 , 433,8 , 1526,27 , 37,5 , 8,10 , 29482,48 , 29530,85 , 134,24 , 29482,48 , 29530,85 , 134,24 , 16102,28 , 16130,73 , 16203,14 , 16102,28 , 16217,73 , 16203,14 , 70,2 , 67,2 , 45,4 , 334,17 , 22,23 , {67,86,69}, 271,1 , 16147,43 , 13,5 , 4,0 , 4913,12 , 4925,10 , 2, 1, 1, 6, 7 }, // Kabuverdianu/Latin/CapeVerde
+ { 197, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 29615,48 , 29663,86 , 29749,24 , 29615,48 , 29663,86 , 29749,24 , 16290,28 , 16318,51 , 16369,14 , 16290,28 , 16318,51 , 16369,14 , 553,2 , 545,2 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 15623,24 , 4,4 , 4,0 , 4935,6 , 1153,5 , 2, 1, 7, 6, 7 }, // Meru/Latin/Kenya
+ { 198, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 29773,49 , 29822,121 , 29943,24 , 29773,49 , 29822,121 , 29943,24 , 16383,28 , 16411,53 , 16464,14 , 16383,28 , 16411,53 , 16464,14 , 555,6 , 547,10 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 16190,26 , 4,4 , 4,0 , 4941,8 , 4949,12 , 2, 1, 7, 6, 7 }, // Kalenjin/Latin/Kenya
+ { 199, 7, 148, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 18,7 , 25,12 , 0,48 , 29967,136 , 134,24 , 0,48 , 29967,136 , 134,24 , 16478,23 , 16501,92 , 16593,14 , 16478,23 , 16501,92 , 16593,14 , 561,7 , 557,5 , 45,4 , 5,17 , 22,23 , {78,65,68}, 6,1 , 16216,22 , 4,4 , 4,0 , 4961,13 , 4974,8 , 2, 1, 1, 6, 7 }, // Nama/Latin/Namibia
+ { 200, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 18324,48 , 27914,87 , 134,24 , 18324,48 , 27914,87 , 134,24 , 15164,28 , 15192,62 , 15254,14 , 15164,28 , 15192,62 , 15254,14 , 528,5 , 513,9 , 45,4 , 5,17 , 22,23 , {84,90,83}, 188,3 , 15995,27 , 4,4 , 4,0 , 4982,9 , 1587,8 , 0, 0, 1, 6, 7 }, // Machame/Latin/Tanzania
+ { 201, 7, 82, 44, 160, 59, 37, 48, 8722, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 418,8 , 418,8 , 1063,10 , 1553,23 , 37,5 , 8,10 , 30103,59 , 30162,87 , 12686,24 , 30249,48 , 30162,87 , 12686,24 , 16607,28 , 16635,72 , 3652,14 , 16607,28 , 16635,72 , 3652,14 , 568,16 , 562,16 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 16238,11 , 13,5 , 4,0 , 4991,6 , 4997,11 , 2, 1, 1, 6, 7 }, // Colognian/Latin/Germany
+ { 202, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 30297,51 , 30348,132 , 158,27 , 30297,51 , 30348,132 , 158,27 , 15164,28 , 16707,58 , 14584,14 , 15164,28 , 16707,58 , 14584,14 , 584,9 , 578,6 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 16249,25 , 4,4 , 4,0 , 5008,3 , 1153,5 , 2, 1, 7, 6, 7 }, // Masai/Latin/Kenya
+ { 202, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 30297,51 , 30348,132 , 158,27 , 30297,51 , 30348,132 , 158,27 , 15164,28 , 16707,58 , 14584,14 , 15164,28 , 16707,58 , 14584,14 , 584,9 , 578,6 , 45,4 , 5,17 , 22,23 , {84,90,83}, 188,3 , 16274,28 , 4,4 , 4,0 , 5008,3 , 5011,8 , 0, 0, 1, 6, 7 }, // Masai/Latin/Tanzania
+ { 203, 7, 221, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 29182,48 , 29230,97 , 134,24 , 29182,48 , 29230,97 , 134,24 , 16765,35 , 16800,65 , 16865,14 , 16765,35 , 16800,65 , 16865,14 , 593,6 , 584,6 , 45,4 , 5,17 , 22,23 , {85,71,88}, 193,3 , 16121,26 , 13,5 , 4,0 , 5019,7 , 4897,7 , 0, 0, 1, 6, 7 }, // Soga/Latin/Uganda
+ { 204, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 30480,48 , 18372,84 , 134,24 , 30480,48 , 18372,84 , 134,24 , 16879,21 , 16900,75 , 85,14 , 16879,21 , 16900,75 , 85,14 , 66,4 , 63,4 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 16302,23 , 4,4 , 102,6 , 5026,7 , 1153,5 , 2, 1, 7, 6, 7 }, // Luyia/Latin/Kenya
+ { 205, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 30528,48 , 18372,84 , 134,24 , 30528,48 , 18372,84 , 134,24 , 16975,28 , 9681,60 , 15254,14 , 16975,28 , 9681,60 , 15254,14 , 599,9 , 590,8 , 45,4 , 5,17 , 22,23 , {84,90,83}, 188,3 , 16325,28 , 13,5 , 4,0 , 5033,6 , 5039,8 , 0, 0, 1, 6, 7 }, // Asu/Latin/Tanzania
+ { 206, 7, 221, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 30576,48 , 30624,94 , 30718,24 , 30576,48 , 30624,94 , 30718,24 , 17003,28 , 17031,69 , 17100,14 , 17003,28 , 17031,69 , 17100,14 , 608,9 , 598,6 , 45,4 , 5,17 , 22,23 , {85,71,88}, 193,3 , 16353,28 , 4,4 , 4,0 , 5047,6 , 1652,6 , 0, 0, 1, 6, 7 }, // Teso/Latin/Uganda
+ { 206, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 30576,48 , 30624,94 , 30718,24 , 30576,48 , 30624,94 , 30718,24 , 17003,28 , 17031,69 , 17100,14 , 17003,28 , 17031,69 , 17100,14 , 608,9 , 598,6 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 16381,27 , 4,4 , 4,0 , 5047,6 , 5053,5 , 2, 1, 7, 6, 7 }, // Teso/Latin/Kenya
{ 207, 7, 67, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,82,78}, 0,0 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Saho/Latin/Eritrea
- { 208, 7, 132, 46, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 37,5 , 8,10 , 30134,46 , 30180,88 , 30268,24 , 30134,46 , 30180,88 , 30268,24 , 16543,28 , 16571,53 , 16624,14 , 16543,28 , 16571,53 , 16624,14 , 589,6 , 575,6 , 45,4 , 5,17 , 22,23 , {88,79,70}, 210,3 , 16152,23 , 0,4 , 4,0 , 5018,11 , 5029,5 , 0, 0, 1, 6, 7 }, // Koyra Chiini/Latin/Mali
- { 209, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 18222,48 , 27306,87 , 134,24 , 18222,48 , 27306,87 , 134,24 , 14593,28 , 14621,62 , 14683,14 , 14593,28 , 14621,62 , 14683,14 , 500,5 , 484,9 , 45,4 , 5,17 , 22,23 , {84,90,83}, 198,3 , 15739,27 , 0,4 , 4,0 , 5034,6 , 1587,8 , 0, 0, 1, 6, 7 }, // Rwa/Latin/Tanzania
- { 210, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 30292,48 , 30340,186 , 30526,24 , 30292,48 , 30340,186 , 30526,24 , 16638,28 , 16666,69 , 16735,14 , 16638,28 , 16666,69 , 16735,14 , 595,2 , 581,2 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 16175,23 , 0,4 , 4,0 , 5040,6 , 1153,5 , 2, 1, 7, 6, 7 }, // Luo/Latin/Kenya
- { 211, 7, 221, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 26780,48 , 26828,152 , 134,24 , 26780,48 , 26828,152 , 134,24 , 14353,28 , 14381,74 , 14455,14 , 14353,28 , 14381,74 , 14455,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {85,71,88}, 203,3 , 15684,26 , 4,4 , 4,0 , 5046,6 , 1652,6 , 0, 0, 1, 6, 7 }, // Chiga/Latin/Uganda
- { 212, 7, 145, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 30550,48 , 30598,86 , 30684,24 , 30550,48 , 30598,86 , 30684,24 , 16749,28 , 16777,48 , 16825,14 , 16749,28 , 16777,48 , 16825,14 , 597,9 , 583,10 , 45,4 , 5,17 , 22,23 , {77,65,68}, 0,0 , 16198,22 , 13,5 , 4,0 , 5052,17 , 5069,6 , 2, 1, 6, 5, 6 }, // Central Morocco Tamazight/Latin/Morocco
- { 213, 7, 132, 46, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 37,5 , 8,10 , 30134,46 , 30180,88 , 30268,24 , 30134,46 , 30180,88 , 30268,24 , 16839,28 , 16867,54 , 16624,14 , 16839,28 , 16867,54 , 16624,14 , 589,6 , 575,6 , 45,4 , 5,17 , 22,23 , {88,79,70}, 210,3 , 16152,23 , 0,4 , 4,0 , 5075,15 , 5029,5 , 0, 0, 1, 6, 7 }, // Koyraboro Senni/Latin/Mali
- { 214, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 18222,48 , 30708,84 , 134,24 , 18222,48 , 30708,84 , 134,24 , 16921,28 , 16949,63 , 17012,14 , 16921,28 , 16949,63 , 17012,14 , 606,5 , 593,8 , 45,4 , 5,17 , 22,23 , {84,90,83}, 198,3 , 16220,27 , 0,4 , 4,0 , 5090,9 , 1587,8 , 0, 0, 1, 6, 7 }, // Shambala/Latin/Tanzania
- { 215, 13, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 516,6 , 35,18 , 18,7 , 25,12 , 30792,88 , 30792,88 , 30880,31 , 30792,88 , 30792,88 , 30880,31 , 17026,33 , 17059,54 , 17113,19 , 17026,33 , 17059,54 , 17113,19 , 611,3 , 601,6 , 45,4 , 5,17 , 22,23 , {73,78,82}, 127,1 , 16247,10 , 8,5 , 4,0 , 5099,4 , 2589,4 , 2, 1, 7, 7, 7 }, // Bodo/Devanagari/India
- { 218, 2, 178, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 20846,48 , 11053,80 , 158,27 , 20846,48 , 11053,80 , 158,27 , 17132,74 , 17132,74 , 85,14 , 17132,74 , 17132,74 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {82,85,66}, 129,1 , 16257,43 , 13,5 , 4,0 , 5103,7 , 5110,5 , 2, 1, 1, 6, 7 }, // Chechen/Cyrillic/Russia
- { 219, 2, 178, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 766,8 , 766,8 , 1494,10 , 1504,23 , 37,5 , 8,10 , 30911,65 , 30976,117 , 31093,30 , 30911,65 , 31123,117 , 31093,30 , 17206,37 , 17243,68 , 10707,14 , 17206,37 , 17243,68 , 10707,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {82,85,66}, 129,1 , 16300,44 , 13,5 , 4,0 , 5115,19 , 5134,7 , 2, 1, 1, 6, 7 }, // Church/Cyrillic/Russia
- { 220, 2, 178, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {82,85,66}, 129,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Chuvash/Cyrillic/Russia
- { 230, 7, 49, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 37,5 , 8,10 , 31240,49 , 31289,99 , 31388,24 , 31240,49 , 31289,99 , 31388,24 , 17311,28 , 17339,50 , 17389,14 , 17311,28 , 17339,50 , 17389,14 , 614,5 , 607,6 , 45,4 , 5,17 , 22,23 , {67,68,70}, 215,2 , 16344,24 , 0,4 , 4,0 , 5141,8 , 5149,16 , 2, 1, 1, 6, 7 }, // LubaKatanga/Latin/CongoKinshasa
- { 231, 7, 125, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 774,10 , 774,10 , 175,8 , 532,18 , 37,5 , 8,10 , 31412,48 , 31460,85 , 134,24 , 31545,59 , 31460,85 , 134,24 , 17403,28 , 17431,65 , 3642,14 , 17496,35 , 17431,65 , 3642,14 , 619,5 , 613,8 , 409,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8339,19 , 13,5 , 4,0 , 5165,14 , 5179,10 , 2, 1, 1, 6, 7 }, // Luxembourgish/Latin/Luxembourg
+ { 208, 7, 132, 46, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 37,5 , 8,10 , 30742,46 , 30788,88 , 30876,24 , 30742,46 , 30788,88 , 30876,24 , 17114,28 , 17142,53 , 17195,14 , 17114,28 , 17142,53 , 17195,14 , 617,6 , 604,6 , 45,4 , 5,17 , 22,23 , {88,79,70}, 200,3 , 16408,23 , 0,4 , 4,0 , 5058,11 , 5069,5 , 0, 0, 1, 6, 7 }, // Koyra Chiini/Latin/Mali
+ { 209, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 18324,48 , 27914,87 , 134,24 , 18324,48 , 27914,87 , 134,24 , 15164,28 , 15192,62 , 15254,14 , 15164,28 , 15192,62 , 15254,14 , 528,5 , 513,9 , 45,4 , 5,17 , 22,23 , {84,90,83}, 188,3 , 15995,27 , 0,4 , 4,0 , 5074,6 , 1587,8 , 0, 0, 1, 6, 7 }, // Rwa/Latin/Tanzania
+ { 210, 7, 111, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 30900,48 , 30948,186 , 31134,24 , 30900,48 , 30948,186 , 31134,24 , 17209,28 , 17237,69 , 17306,14 , 17209,28 , 17237,69 , 17306,14 , 623,2 , 610,2 , 45,4 , 5,17 , 22,23 , {75,69,83}, 2,3 , 16431,23 , 0,4 , 4,0 , 5080,6 , 1153,5 , 2, 1, 7, 6, 7 }, // Luo/Latin/Kenya
+ { 211, 7, 221, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 27388,48 , 27436,152 , 134,24 , 27388,48 , 27436,152 , 134,24 , 14924,28 , 14952,74 , 15026,14 , 14924,28 , 14952,74 , 15026,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {85,71,88}, 193,3 , 15940,26 , 4,4 , 4,0 , 5086,6 , 1652,6 , 0, 0, 1, 6, 7 }, // Chiga/Latin/Uganda
+ { 212, 7, 145, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 31158,48 , 31206,86 , 31292,24 , 31158,48 , 31206,86 , 31292,24 , 17320,28 , 17348,48 , 17396,14 , 17320,28 , 17348,48 , 17396,14 , 625,9 , 612,10 , 45,4 , 5,17 , 22,23 , {77,65,68}, 0,0 , 16454,22 , 13,5 , 4,0 , 5092,17 , 5109,6 , 2, 1, 6, 5, 6 }, // Central Morocco Tamazight/Latin/Morocco
+ { 213, 7, 132, 46, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 37,5 , 8,10 , 30742,46 , 30788,88 , 30876,24 , 30742,46 , 30788,88 , 30876,24 , 17410,28 , 17438,54 , 17195,14 , 17410,28 , 17438,54 , 17195,14 , 617,6 , 604,6 , 45,4 , 5,17 , 22,23 , {88,79,70}, 200,3 , 16408,23 , 0,4 , 4,0 , 5115,15 , 5069,5 , 0, 0, 1, 6, 7 }, // Koyraboro Senni/Latin/Mali
+ { 214, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 18324,48 , 31316,84 , 134,24 , 18324,48 , 31316,84 , 134,24 , 17492,28 , 17520,63 , 17583,14 , 17492,28 , 17520,63 , 17583,14 , 634,5 , 622,8 , 45,4 , 5,17 , 22,23 , {84,90,83}, 188,3 , 16476,27 , 0,4 , 4,0 , 5130,9 , 1587,8 , 0, 0, 1, 6, 7 }, // Shambala/Latin/Tanzania
+ { 215, 13, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 543,6 , 35,18 , 18,7 , 25,12 , 31400,88 , 31400,88 , 31488,31 , 31400,88 , 31400,88 , 31488,31 , 17597,33 , 17630,54 , 17684,19 , 17597,33 , 17630,54 , 17684,19 , 639,3 , 630,6 , 45,4 , 5,17 , 22,23 , {73,78,82}, 117,1 , 16503,10 , 8,5 , 4,0 , 5139,4 , 2584,4 , 2, 1, 7, 7, 7 }, // Bodo/Devanagari/India
+ { 218, 2, 178, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 21153,48 , 11096,80 , 11013,24 , 21153,48 , 11096,80 , 11013,24 , 17703,25 , 17728,45 , 17773,17 , 17703,25 , 17728,45 , 17703,25 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {82,85,66}, 119,1 , 16513,43 , 13,5 , 4,0 , 5143,7 , 5150,5 , 2, 1, 1, 6, 7 }, // Chechen/Cyrillic/Russia
+ { 219, 2, 178, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 860,8 , 860,8 , 929,10 , 1576,23 , 37,5 , 8,10 , 31519,65 , 31584,117 , 31701,30 , 31519,65 , 31731,117 , 31701,30 , 17790,37 , 17827,68 , 11135,14 , 17790,37 , 17827,68 , 11135,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {82,85,66}, 119,1 , 16556,44 , 13,5 , 4,0 , 5155,19 , 5174,7 , 2, 1, 1, 6, 7 }, // Church/Cyrillic/Russia
+ { 220, 2, 178, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {82,85,66}, 119,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Chuvash/Cyrillic/Russia
+ { 230, 7, 49, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 37,5 , 8,10 , 31848,49 , 31897,99 , 31996,24 , 31848,49 , 31897,99 , 31996,24 , 17895,28 , 17923,50 , 17973,14 , 17895,28 , 17923,50 , 17973,14 , 642,5 , 636,6 , 45,4 , 5,17 , 22,23 , {67,68,70}, 203,2 , 16600,24 , 0,4 , 4,0 , 5181,8 , 5189,16 , 2, 1, 1, 6, 7 }, // LubaKatanga/Latin/CongoKinshasa
+ { 231, 7, 125, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 868,10 , 868,10 , 174,8 , 559,18 , 37,5 , 8,10 , 32020,48 , 32068,85 , 134,24 , 32153,59 , 32068,85 , 134,24 , 17987,28 , 18015,65 , 3652,14 , 18080,35 , 18015,65 , 3652,14 , 647,5 , 642,8 , 446,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 8384,19 , 13,5 , 4,0 , 5205,14 , 5219,10 , 2, 1, 1, 6, 7 }, // Luxembourgish/Latin/Luxembourg
{ 236, 7, 21, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Walloon/Latin/Belgium
- { 237, 7, 37, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8221, 8218, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 37,5 , 8,10 , 31604,48 , 31652,195 , 31847,24 , 31604,48 , 31652,195 , 31847,24 , 17531,28 , 17559,72 , 17631,14 , 17531,28 , 17559,72 , 17631,14 , 624,3 , 621,3 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 16368,21 , 0,4 , 4,0 , 5189,5 , 5194,7 , 0, 0, 1, 6, 7 }, // Aghem/Latin/Cameroon
- { 238, 7, 37, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 37,5 , 8,10 , 31871,48 , 31919,90 , 32009,24 , 31871,48 , 31919,90 , 32009,24 , 17645,28 , 17673,70 , 17743,14 , 17645,28 , 17673,70 , 17743,14 , 627,10 , 624,9 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 16389,22 , 13,5 , 4,0 , 5201,5 , 5206,8 , 0, 0, 1, 6, 7 }, // Basaa/Latin/Cameroon
- { 239, 7, 156, 46, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 37,5 , 8,10 , 30134,46 , 30180,88 , 30268,24 , 30134,46 , 30180,88 , 30268,24 , 16839,28 , 17757,53 , 17810,14 , 16839,28 , 17757,53 , 17810,14 , 637,8 , 633,10 , 45,4 , 5,17 , 22,23 , {88,79,70}, 210,3 , 16152,23 , 0,4 , 4,0 , 5214,10 , 5224,5 , 0, 0, 1, 6, 7 }, // Zarma/Latin/Niger
- { 240, 7, 37, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 37,5 , 8,10 , 32033,49 , 32082,99 , 32181,24 , 32033,49 , 32082,99 , 32181,24 , 17824,28 , 17852,45 , 17897,14 , 17824,28 , 17852,45 , 17897,14 , 645,5 , 643,6 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 0,7 , 13,5 , 4,0 , 5229,5 , 1903,8 , 0, 0, 1, 6, 7 }, // Duala/Latin/Cameroon
- { 241, 7, 187, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 37,5 , 8,10 , 32205,36 , 32241,82 , 32323,24 , 32205,36 , 32241,82 , 32323,24 , 17911,28 , 17939,50 , 17989,14 , 17911,28 , 17939,50 , 17989,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {88,79,70}, 210,3 , 16411,23 , 13,5 , 4,0 , 5234,5 , 5239,7 , 0, 0, 1, 6, 7 }, // JolaFonyi/Latin/Senegal
- { 242, 7, 37, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 37,5 , 8,10 , 32347,50 , 32397,141 , 32538,24 , 32347,50 , 32397,141 , 32538,24 , 18003,30 , 18033,85 , 18118,14 , 18003,30 , 18033,85 , 18118,14 , 650,7 , 649,9 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 16434,23 , 13,5 , 4,0 , 5246,6 , 5252,7 , 0, 0, 1, 6, 7 }, // Ewondo/Latin/Cameroon
- { 243, 7, 37, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 37,5 , 8,10 , 32562,39 , 32601,191 , 158,27 , 32562,39 , 32601,191 , 158,27 , 18132,29 , 18161,45 , 18206,14 , 18132,29 , 18161,45 , 18206,14 , 657,6 , 658,7 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 16457,11 , 13,5 , 4,0 , 5259,5 , 5264,7 , 0, 0, 1, 6, 7 }, // Bafia/Latin/Cameroon
- { 244, 7, 146, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 32792,48 , 32840,213 , 33053,24 , 32792,48 , 32840,213 , 33053,24 , 18220,28 , 18248,59 , 18307,14 , 18220,28 , 18248,59 , 18307,14 , 663,8 , 665,10 , 45,4 , 5,17 , 22,23 , {77,90,78}, 284,3 , 0,7 , 79,6 , 4,0 , 5271,5 , 5276,10 , 2, 1, 7, 6, 7 }, // MakhuwaMeetto/Latin/Mozambique
- { 245, 7, 37, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 37,5 , 8,10 , 33077,48 , 33125,139 , 33264,24 , 33077,48 , 33125,139 , 33264,24 , 18321,28 , 18349,74 , 18423,14 , 18321,28 , 18349,74 , 18423,14 , 671,5 , 675,5 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 16468,17 , 4,4 , 4,0 , 5286,6 , 5292,7 , 0, 0, 1, 6, 7 }, // Mundang/Latin/Cameroon
- { 246, 7, 37, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8221, 171, 187, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 37,5 , 8,10 , 33288,51 , 33339,143 , 158,27 , 33288,51 , 33339,143 , 158,27 , 18437,30 , 18467,89 , 18556,14 , 18437,30 , 18467,89 , 18556,14 , 676,4 , 680,4 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 16485,20 , 13,5 , 4,0 , 5299,6 , 5305,7 , 0, 0, 1, 6, 7 }, // Kwasio/Latin/Cameroon
- { 247, 7, 254, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 1527,9 , 98,16 , 18,7 , 481,12 , 33482,54 , 33536,96 , 33632,24 , 33482,54 , 33536,96 , 33632,24 , 18570,38 , 18608,79 , 18687,14 , 18570,38 , 18608,79 , 18687,14 , 680,2 , 684,2 , 45,4 , 5,17 , 22,23 , {83,83,80}, 125,1 , 0,7 , 4,4 , 4,0 , 5312,9 , 0,0 , 2, 1, 1, 6, 7 }, // Nuer/Latin/SouthSudan
- { 248, 2, 178, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 784,11 , 784,11 , 246,6 , 1536,30 , 37,5 , 8,10 , 33656,50 , 33706,116 , 33822,24 , 33656,50 , 33846,121 , 33822,24 , 18701,21 , 18722,71 , 18793,14 , 18701,21 , 18722,71 , 18793,14 , 682,2 , 686,2 , 948,5 , 953,17 , 22,23 , {82,85,66}, 129,1 , 16505,47 , 13,5 , 4,0 , 5321,9 , 5330,9 , 2, 1, 1, 6, 7 }, // Sakha/Cyrillic/Russia
- { 249, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 33967,48 , 34015,117 , 158,27 , 33967,48 , 34015,117 , 158,27 , 18807,28 , 18835,60 , 18895,14 , 18807,28 , 18835,60 , 18895,14 , 684,9 , 688,9 , 45,4 , 5,17 , 22,23 , {84,90,83}, 198,3 , 16552,25 , 0,4 , 4,0 , 5339,9 , 5348,9 , 0, 0, 1, 6, 7 }, // Sangu/Latin/Tanzania
- { 251, 7, 156, 46, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 37,5 , 8,10 , 30134,46 , 30180,88 , 30268,24 , 30134,46 , 30180,88 , 30268,24 , 16839,28 , 16867,54 , 16624,14 , 16839,28 , 16867,54 , 16624,14 , 637,8 , 633,10 , 45,4 , 5,17 , 22,23 , {88,79,70}, 210,3 , 16152,23 , 0,4 , 4,0 , 5357,13 , 5224,5 , 0, 0, 1, 6, 7 }, // Tasawaq/Latin/Niger
- { 252, 35, 121, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 18,7 , 25,12 , 34132,50 , 34132,50 , 158,27 , 34132,50 , 34132,50 , 158,27 , 18909,30 , 18909,30 , 85,14 , 18909,30 , 18909,30 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {76,82,68}, 6,1 , 16577,15 , 4,4 , 4,0 , 5370,2 , 5372,4 , 2, 1, 1, 6, 7 }, // Vai/Vai/Liberia
- { 252, 7, 121, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 18,7 , 25,12 , 34182,81 , 34182,81 , 158,27 , 34182,81 , 34182,81 , 158,27 , 18939,48 , 18939,48 , 85,14 , 18939,48 , 18939,48 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {76,82,68}, 6,1 , 16592,20 , 4,4 , 4,0 , 5376,3 , 5379,8 , 2, 1, 1, 6, 7 }, // Vai/Latin/Liberia
- { 253, 7, 206, 44, 8217, 59, 37, 48, 45, 43, 101, 171, 187, 8249, 8250, 0,6 , 0,6 , 251,9 , 251,9 , 53,10 , 532,18 , 37,5 , 8,10 , 34263,48 , 34311,99 , 34410,24 , 34263,48 , 34311,99 , 34410,24 , 18987,28 , 19015,53 , 19068,14 , 18987,28 , 19015,53 , 19068,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {67,72,70}, 0,0 , 0,7 , 79,6 , 4,0 , 5387,6 , 5393,6 , 2, 0, 1, 6, 7 }, // Walser/Latin/Switzerland
- { 254, 7, 37, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 37,5 , 8,10 , 34434,51 , 34485,191 , 158,27 , 34434,51 , 34485,191 , 158,27 , 19082,21 , 19103,71 , 19174,14 , 19082,21 , 19103,71 , 19174,14 , 693,8 , 697,8 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 0,7 , 13,5 , 4,0 , 5399,6 , 5405,7 , 0, 0, 1, 6, 7 }, // Yangben/Latin/Cameroon
- { 256, 7, 197, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 575,7 , 575,7 , 278,6 , 363,22 , 37,5 , 8,10 , 34676,48 , 34724,85 , 34809,24 , 34833,48 , 34881,117 , 34809,24 , 19188,28 , 19216,54 , 3338,14 , 19188,28 , 19216,54 , 3338,14 , 701,12 , 705,11 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3057,20 , 13,5 , 4,0 , 5412,9 , 2354,6 , 2, 1, 1, 6, 7 }, // Asturian/Latin/Spain
- { 257, 7, 37, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8249, 8250, 795,11 , 795,11 , 806,16 , 822,9 , 53,10 , 1353,18 , 37,5 , 8,10 , 34998,174 , 34998,174 , 158,27 , 34998,174 , 34998,174 , 158,27 , 19270,60 , 19270,60 , 19330,25 , 19270,60 , 19270,60 , 19330,25 , 713,8 , 716,13 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 16612,12 , 8,5 , 4,0 , 5421,5 , 5426,7 , 0, 0, 1, 6, 7 }, // Ngomba/Latin/Cameroon
- { 258, 7, 37, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8249, 8250, 0,6 , 0,6 , 0,6 , 0,6 , 1566,10 , 633,17 , 37,5 , 8,10 , 35172,102 , 35172,102 , 158,27 , 35172,102 , 35172,102 , 158,27 , 19355,54 , 19355,54 , 19409,21 , 19355,54 , 19355,54 , 19409,21 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 16624,16 , 79,6 , 4,0 , 5433,4 , 5437,7 , 0, 0, 1, 6, 7 }, // Kako/Latin/Cameroon
- { 259, 7, 37, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 1353,18 , 37,5 , 8,10 , 35274,137 , 35411,142 , 35553,36 , 35274,137 , 35411,142 , 35553,36 , 19430,49 , 19430,49 , 19479,21 , 19430,49 , 19430,49 , 19479,21 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 16640,12 , 8,5 , 4,0 , 5444,5 , 5449,7 , 0, 0, 1, 6, 7 }, // Meta/Latin/Cameroon
- { 260, 7, 37, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 27,8 , 1576,32 , 37,5 , 8,10 , 35589,165 , 35589,165 , 158,27 , 35589,165 , 35589,165 , 158,27 , 19500,111 , 19500,111 , 85,14 , 19500,111 , 19500,111 , 85,14 , 721,9 , 729,8 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 16652,16 , 8,5 , 4,0 , 5456,16 , 5472,7 , 0, 0, 1, 6, 7 }, // Ngiemboon/Latin/Cameroon
- { 272, 46, 18, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {66,68,84}, 130,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 5, 6, 7 }, // Chakma/Chakma/Bangladesh
- { 290, 11, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {73,78,82}, 127,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 7, 7 }, // Manipuri/Bengali/India
- { 309, 100, 232, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {86,78,68}, 340,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 0, 0, 1, 6, 7 }, // TaiDam/Tai Viet/Vietnam
+ { 237, 7, 37, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8221, 8218, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 37,5 , 8,10 , 32212,48 , 32260,195 , 32455,24 , 32212,48 , 32260,195 , 32455,24 , 18115,28 , 18143,72 , 18215,14 , 18115,28 , 18143,72 , 18215,14 , 652,3 , 650,3 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 16624,21 , 0,4 , 4,0 , 5229,5 , 5234,7 , 0, 0, 1, 6, 7 }, // Aghem/Latin/Cameroon
+ { 238, 7, 37, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 37,5 , 8,10 , 32479,48 , 32527,90 , 32617,24 , 32479,48 , 32527,90 , 32617,24 , 18229,28 , 18257,70 , 18327,14 , 18229,28 , 18257,70 , 18327,14 , 655,10 , 653,9 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 16645,22 , 13,5 , 4,0 , 5241,5 , 5246,8 , 0, 0, 1, 6, 7 }, // Basaa/Latin/Cameroon
+ { 239, 7, 156, 46, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 37,5 , 8,10 , 30742,46 , 30788,88 , 30876,24 , 30742,46 , 30788,88 , 30876,24 , 17410,28 , 18341,53 , 18394,14 , 17410,28 , 18341,53 , 18394,14 , 665,8 , 662,10 , 45,4 , 5,17 , 22,23 , {88,79,70}, 200,3 , 16408,23 , 0,4 , 4,0 , 5254,10 , 5264,5 , 0, 0, 1, 6, 7 }, // Zarma/Latin/Niger
+ { 240, 7, 37, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 37,5 , 8,10 , 32641,49 , 32690,99 , 32789,24 , 32641,49 , 32690,99 , 32789,24 , 18408,28 , 18436,45 , 18481,14 , 18408,28 , 18436,45 , 18481,14 , 673,5 , 672,6 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 0,7 , 13,5 , 4,0 , 5269,5 , 1903,8 , 0, 0, 1, 6, 7 }, // Duala/Latin/Cameroon
+ { 241, 7, 187, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 37,5 , 8,10 , 32813,36 , 32849,82 , 32931,24 , 32813,36 , 32849,82 , 32931,24 , 18495,28 , 18523,50 , 18573,14 , 18495,28 , 18523,50 , 18573,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {88,79,70}, 200,3 , 16667,23 , 13,5 , 4,0 , 5274,5 , 5279,7 , 0, 0, 1, 6, 7 }, // JolaFonyi/Latin/Senegal
+ { 242, 7, 37, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 37,5 , 8,10 , 32955,50 , 33005,141 , 33146,24 , 32955,50 , 33005,141 , 33146,24 , 18587,30 , 18617,85 , 18702,14 , 18587,30 , 18617,85 , 18702,14 , 678,7 , 678,9 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 16690,23 , 13,5 , 4,0 , 5286,6 , 5292,7 , 0, 0, 1, 6, 7 }, // Ewondo/Latin/Cameroon
+ { 243, 7, 37, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 37,5 , 8,10 , 33170,39 , 33209,191 , 158,27 , 33170,39 , 33209,191 , 158,27 , 18716,29 , 18745,45 , 18790,14 , 18716,29 , 18745,45 , 18790,14 , 685,6 , 687,7 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 16713,11 , 13,5 , 4,0 , 5299,5 , 5304,7 , 0, 0, 1, 6, 7 }, // Bafia/Latin/Cameroon
+ { 244, 7, 146, 44, 46, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 33400,48 , 33448,213 , 33661,24 , 33400,48 , 33448,213 , 33661,24 , 18804,28 , 18832,59 , 18891,14 , 18804,28 , 18832,59 , 18891,14 , 691,8 , 694,10 , 45,4 , 5,17 , 22,23 , {77,90,78}, 272,3 , 0,7 , 83,6 , 4,0 , 5311,5 , 5316,10 , 2, 1, 7, 6, 7 }, // MakhuwaMeetto/Latin/Mozambique
+ { 245, 7, 37, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 37,5 , 8,10 , 33685,48 , 33733,139 , 33872,24 , 33685,48 , 33733,139 , 33872,24 , 18905,28 , 18933,74 , 19007,14 , 18905,28 , 18933,74 , 19007,14 , 699,5 , 704,5 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 16724,17 , 4,4 , 4,0 , 5326,6 , 5332,7 , 0, 0, 1, 6, 7 }, // Mundang/Latin/Cameroon
+ { 246, 7, 37, 44, 160, 59, 37, 48, 45, 43, 101, 8222, 8221, 171, 187, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 37,5 , 8,10 , 33896,51 , 33947,143 , 158,27 , 33896,51 , 33947,143 , 158,27 , 19021,30 , 19051,89 , 19140,14 , 19021,30 , 19051,89 , 19140,14 , 704,4 , 709,4 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 16741,20 , 13,5 , 4,0 , 5339,6 , 5345,7 , 0, 0, 1, 6, 7 }, // Kwasio/Latin/Cameroon
+ { 247, 7, 254, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 1599,9 , 98,16 , 18,7 , 526,12 , 34090,54 , 34144,96 , 34240,24 , 34090,54 , 34144,96 , 34240,24 , 19154,38 , 19192,79 , 19271,14 , 19154,38 , 19192,79 , 19271,14 , 708,2 , 713,2 , 45,4 , 5,17 , 22,23 , {83,83,80}, 115,1 , 0,7 , 4,4 , 4,0 , 5352,9 , 0,0 , 2, 1, 1, 6, 7 }, // Nuer/Latin/SouthSudan
+ { 248, 2, 178, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 878,11 , 878,11 , 245,6 , 1608,30 , 37,5 , 8,10 , 34264,50 , 34314,116 , 34430,24 , 34264,50 , 34454,121 , 34430,24 , 19285,21 , 19306,71 , 19377,14 , 19285,21 , 19306,71 , 19377,14 , 710,2 , 715,2 , 1111,5 , 1116,17 , 22,23 , {82,85,66}, 119,1 , 16761,47 , 13,5 , 4,0 , 5361,9 , 5370,9 , 2, 1, 1, 6, 7 }, // Sakha/Cyrillic/Russia
+ { 249, 7, 210, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 37,5 , 8,10 , 34575,48 , 34623,117 , 158,27 , 34575,48 , 34623,117 , 158,27 , 19391,28 , 19419,60 , 19479,14 , 19391,28 , 19419,60 , 19479,14 , 712,9 , 717,9 , 45,4 , 5,17 , 22,23 , {84,90,83}, 188,3 , 16808,25 , 0,4 , 4,0 , 5379,9 , 5388,9 , 0, 0, 1, 6, 7 }, // Sangu/Latin/Tanzania
+ { 251, 7, 156, 46, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 37,5 , 8,10 , 30742,46 , 30788,88 , 30876,24 , 30742,46 , 30788,88 , 30876,24 , 17410,28 , 17438,54 , 17195,14 , 17410,28 , 17438,54 , 17195,14 , 665,8 , 662,10 , 45,4 , 5,17 , 22,23 , {88,79,70}, 200,3 , 16408,23 , 0,4 , 4,0 , 5397,13 , 5264,5 , 0, 0, 1, 6, 7 }, // Tasawaq/Latin/Niger
+ { 252, 35, 121, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 18,7 , 25,12 , 34740,38 , 34778,61 , 158,27 , 34740,38 , 34778,61 , 158,27 , 19493,30 , 19493,30 , 85,14 , 19493,30 , 19493,30 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {76,82,68}, 6,1 , 16833,15 , 4,4 , 4,0 , 5410,2 , 5412,4 , 2, 1, 1, 6, 7 }, // Vai/Vai/Liberia
+ { 252, 7, 121, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 120,10 , 10,17 , 18,7 , 25,12 , 34839,81 , 34839,81 , 158,27 , 34839,81 , 34839,81 , 158,27 , 19523,48 , 19523,48 , 85,14 , 19523,48 , 19523,48 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {76,82,68}, 6,1 , 16848,20 , 4,4 , 4,0 , 5416,3 , 5419,8 , 2, 1, 1, 6, 7 }, // Vai/Latin/Liberia
+ { 253, 7, 206, 44, 8217, 59, 37, 48, 45, 43, 101, 171, 187, 8249, 8250, 0,6 , 0,6 , 260,9 , 260,9 , 53,10 , 559,18 , 37,5 , 8,10 , 34920,48 , 34968,99 , 35067,24 , 34920,48 , 34968,99 , 35067,24 , 19571,28 , 19599,53 , 19652,14 , 19571,28 , 19599,53 , 19652,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {67,72,70}, 0,0 , 0,7 , 83,6 , 4,0 , 5427,6 , 5433,6 , 2, 0, 1, 6, 7 }, // Walser/Latin/Switzerland
+ { 254, 7, 37, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 171, 187, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 37,5 , 8,10 , 35091,51 , 35142,191 , 158,27 , 35091,51 , 35142,191 , 158,27 , 19666,21 , 19687,71 , 19758,14 , 19666,21 , 19687,71 , 19758,14 , 721,8 , 726,8 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 0,7 , 13,5 , 4,0 , 5439,6 , 5445,7 , 0, 0, 1, 6, 7 }, // Yangben/Latin/Cameroon
+ { 256, 7, 197, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 616,7 , 616,7 , 287,6 , 390,22 , 37,5 , 8,10 , 35333,48 , 35381,85 , 35466,24 , 35490,48 , 35538,117 , 35466,24 , 19772,28 , 19800,54 , 3348,14 , 19772,28 , 19800,54 , 3348,14 , 729,12 , 734,11 , 0,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 3102,20 , 13,5 , 4,0 , 5452,9 , 2349,6 , 2, 1, 1, 6, 7 }, // Asturian/Latin/Spain
+ { 257, 7, 37, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8249, 8250, 889,11 , 889,11 , 900,16 , 916,9 , 53,10 , 1429,18 , 37,5 , 8,10 , 35655,174 , 35655,174 , 158,27 , 35655,174 , 35655,174 , 158,27 , 19854,60 , 19854,60 , 19914,25 , 19854,60 , 19854,60 , 19914,25 , 741,8 , 745,13 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 16868,12 , 8,5 , 4,0 , 5461,5 , 5466,7 , 0, 0, 1, 6, 7 }, // Ngomba/Latin/Cameroon
+ { 258, 7, 37, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8249, 8250, 0,6 , 0,6 , 0,6 , 0,6 , 1638,10 , 660,17 , 37,5 , 8,10 , 35829,102 , 35829,102 , 158,27 , 35829,102 , 35829,102 , 158,27 , 19939,54 , 19939,54 , 19993,21 , 19939,54 , 19939,54 , 19993,21 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 16880,16 , 83,6 , 4,0 , 5473,4 , 5477,7 , 0, 0, 1, 6, 7 }, // Kako/Latin/Cameroon
+ { 259, 7, 37, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 1429,18 , 37,5 , 8,10 , 35931,137 , 36068,142 , 36210,36 , 35931,137 , 36068,142 , 36210,36 , 20014,49 , 20014,49 , 20063,21 , 20014,49 , 20014,49 , 20063,21 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 16896,12 , 8,5 , 4,0 , 5484,5 , 5489,7 , 0, 0, 1, 6, 7 }, // Meta/Latin/Cameroon
+ { 260, 7, 37, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 27,8 , 1648,32 , 37,5 , 8,10 , 36246,165 , 36246,165 , 158,27 , 36246,165 , 36246,165 , 158,27 , 20084,111 , 20084,111 , 85,14 , 20084,111 , 20084,111 , 85,14 , 749,9 , 758,8 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 16908,16 , 8,5 , 4,0 , 5496,16 , 5512,7 , 0, 0, 1, 6, 7 }, // Ngiemboon/Latin/Cameroon
+ { 290, 11, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {73,78,82}, 117,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 7, 7 }, // Manipuri/Bengali/India
+ { 309, 100, 232, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {86,78,68}, 332,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 0, 0, 1, 6, 7 }, // TaiDam/Tai Viet/Vietnam
{ 312, 7, 37, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 0, 0, 1, 6, 7 }, // Akoose/Latin/Cameroon
- { 313, 7, 225, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 516,6 , 35,18 , 18,7 , 25,12 , 35754,180 , 35754,180 , 158,27 , 35754,180 , 35754,180 , 158,27 , 19611,87 , 19611,87 , 85,14 , 19611,87 , 19611,87 , 19698,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {85,83,68}, 6,1 , 0,7 , 79,6 , 4,0 , 5479,12 , 5491,22 , 2, 1, 7, 6, 7 }, // Lakota/Latin/UnitedStates
- { 314, 9, 145, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 406,8 , 98,16 , 37,5 , 8,10 , 26318,48 , 26366,81 , 26447,24 , 26318,48 , 26366,81 , 26447,24 , 14103,30 , 19712,48 , 85,14 , 14103,30 , 19712,48 , 85,14 , 474,6 , 452,8 , 45,4 , 5,17 , 22,23 , {77,65,68}, 0,0 , 15621,21 , 0,4 , 4,0 , 5513,8 , 4698,6 , 2, 1, 6, 5, 6 }, // Standard Moroccan Tamazight/Tifinagh/Morocco
+ { 313, 7, 225, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 543,6 , 35,18 , 18,7 , 25,12 , 36411,180 , 36411,180 , 158,27 , 36411,180 , 36411,180 , 158,27 , 20195,87 , 20195,87 , 85,14 , 20195,87 , 20195,87 , 20282,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {85,83,68}, 6,1 , 0,7 , 83,6 , 4,0 , 5519,12 , 5531,22 , 2, 1, 7, 6, 7 }, // Lakota/Latin/UnitedStates
+ { 314, 9, 145, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 433,8 , 98,16 , 37,5 , 8,10 , 26772,48 , 26820,81 , 26901,24 , 26772,48 , 26820,81 , 26901,24 , 14598,30 , 20296,48 , 85,14 , 14598,30 , 20296,48 , 85,14 , 502,6 , 481,8 , 45,4 , 5,17 , 22,23 , {77,65,68}, 0,0 , 15845,21 , 0,4 , 4,0 , 5553,8 , 4738,6 , 2, 1, 6, 5, 6 }, // Standard Moroccan Tamazight/Tifinagh/Morocco
{ 315, 7, 43, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {67,76,80}, 6,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 0, 0, 1, 6, 7 }, // Mapuche/Latin/Chile
- { 316, 1, 103, 1643, 1644, 1563, 1642, 1632, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 18,7 , 25,12 , 35934,105 , 35934,105 , 36039,24 , 35934,105 , 35934,105 , 36039,24 , 19760,58 , 19760,58 , 19818,14 , 19760,58 , 19760,58 , 19818,14 , 730,3 , 737,3 , 45,4 , 5,17 , 22,23 , {73,81,68}, 0,0 , 16668,20 , 13,5 , 4,0 , 5521,14 , 5535,5 , 0, 0, 6, 5, 6 }, // Central Kurdish/Arabic/Iraq
- { 316, 1, 102, 1643, 1644, 1563, 1642, 1632, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 35934,105 , 35934,105 , 36039,24 , 35934,105 , 35934,105 , 36039,24 , 19760,58 , 19760,58 , 19818,14 , 19760,58 , 19760,58 , 19818,14 , 730,3 , 737,3 , 45,4 , 5,17 , 22,23 , {73,82,82}, 0,0 , 16688,19 , 13,5 , 4,0 , 5521,14 , 5540,5 , 0, 0, 6, 5, 5 }, // Central Kurdish/Arabic/Iran
- { 317, 7, 82, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 176,7 , 176,7 , 114,6 , 532,18 , 55,4 , 59,9 , 36063,48 , 36111,85 , 16212,24 , 36196,60 , 36256,93 , 16212,24 , 19832,28 , 19860,53 , 19913,14 , 19832,28 , 19860,53 , 19913,14 , 733,9 , 740,10 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 16707,27 , 13,5 , 4,0 , 5545,14 , 5559,6 , 2, 1, 1, 6, 7 }, // LowerSorbian/Latin/Germany
- { 318, 7, 82, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 176,7 , 176,7 , 114,6 , 532,18 , 493,12 , 59,9 , 36349,48 , 36397,86 , 16212,24 , 36483,60 , 36543,93 , 16212,24 , 19927,28 , 19955,53 , 20008,14 , 19927,28 , 19955,53 , 20008,14 , 733,9 , 750,9 , 970,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 16734,29 , 13,5 , 4,0 , 5565,15 , 5580,6 , 2, 1, 1, 6, 7 }, // UpperSorbian/Latin/Germany
+ { 316, 1, 103, 1643, 1644, 1563, 1642, 1632, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 18,7 , 25,12 , 36591,105 , 36591,105 , 36696,24 , 36591,105 , 36591,105 , 36696,24 , 20344,58 , 20344,58 , 20402,14 , 20344,58 , 20344,58 , 20402,14 , 758,3 , 766,3 , 45,4 , 5,17 , 22,23 , {73,81,68}, 44,5 , 16924,20 , 13,5 , 4,0 , 5561,14 , 5575,5 , 0, 0, 6, 5, 6 }, // Central Kurdish/Arabic/Iraq
+ { 316, 1, 102, 1643, 1644, 1563, 1642, 1632, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 36591,105 , 36591,105 , 36696,24 , 36591,105 , 36591,105 , 36696,24 , 20344,58 , 20344,58 , 20402,14 , 20344,58 , 20344,58 , 20402,14 , 758,3 , 766,3 , 45,4 , 5,17 , 22,23 , {73,82,82}, 0,0 , 16944,19 , 13,5 , 4,0 , 5561,14 , 5580,5 , 0, 0, 6, 5, 5 }, // Central Kurdish/Arabic/Iran
+ { 317, 7, 82, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 185,7 , 185,7 , 114,6 , 559,18 , 55,4 , 59,9 , 36720,48 , 36768,85 , 16354,24 , 36853,60 , 36913,93 , 16354,24 , 20416,28 , 20444,53 , 20497,14 , 20416,28 , 20444,53 , 20497,14 , 761,9 , 769,10 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 16963,27 , 13,5 , 4,0 , 5585,14 , 5599,6 , 2, 1, 1, 6, 7 }, // LowerSorbian/Latin/Germany
+ { 318, 7, 82, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 185,7 , 185,7 , 114,6 , 559,18 , 538,12 , 59,9 , 37006,48 , 37054,86 , 16354,24 , 37140,60 , 37200,93 , 16354,24 , 20511,28 , 20539,53 , 20592,14 , 20511,28 , 20539,53 , 20592,14 , 761,9 , 779,9 , 1133,5 , 5,17 , 22,23 , {69,85,82}, 14,1 , 16990,29 , 13,5 , 4,0 , 5605,15 , 5620,6 , 2, 1, 1, 6, 7 }, // UpperSorbian/Latin/Germany
{ 319, 7, 37, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 0, 0, 1, 6, 7 }, // Kenyang/Latin/Cameroon
- { 320, 7, 38, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {67,65,68}, 245,3 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 0, 7, 6, 7 }, // Mohawk/Latin/Canada
- { 321, 75, 91, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {71,78,70}, 221,2 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 0, 0, 1, 6, 7 }, // Nko/Nko/Guinea
- { 323, 7, 90, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {71,84,81}, 311,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 6, 7 }, // Kiche/Latin/Guatemala
- { 324, 7, 205, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {83,69,75}, 196,2 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Southern Sami/Latin/Sweden
- { 325, 7, 205, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {83,69,75}, 196,2 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Lule Sami/Latin/Sweden
- { 326, 7, 73, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 550,8 , 1608,18 , 222,4 , 226,9 , 36636,77 , 36713,140 , 36853,25 , 36636,77 , 36713,140 , 36853,25 , 20022,28 , 20050,70 , 85,14 , 20022,28 , 20120,73 , 20193,14 , 742,3 , 759,3 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 16763,11 , 13,5 , 4,0 , 5586,11 , 5597,5 , 2, 1, 1, 6, 7 }, // Inari Sami/Latin/Finland
+ { 320, 7, 38, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {67,65,68}, 233,3 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 0, 7, 6, 7 }, // Mohawk/Latin/Canada
+ { 321, 75, 91, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {71,78,70}, 209,2 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 0, 0, 1, 6, 7 }, // Nko/Nko/Guinea
+ { 323, 7, 90, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {71,84,81}, 299,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 6, 7 }, // Kiche/Latin/Guatemala
+ { 324, 7, 205, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {83,69,75}, 186,2 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 0, 1, 6, 7 }, // Southern Sami/Latin/Sweden
+ { 325, 7, 205, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {83,69,75}, 186,2 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 0, 1, 6, 7 }, // Lule Sami/Latin/Sweden
+ { 326, 7, 73, 44, 160, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 577,8 , 1680,18 , 243,4 , 247,9 , 37293,77 , 37370,140 , 37510,25 , 37293,77 , 37370,140 , 37510,25 , 20606,28 , 20634,70 , 85,14 , 20606,28 , 20704,73 , 20777,14 , 770,3 , 788,3 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 17019,11 , 13,5 , 4,0 , 5626,11 , 5637,5 , 2, 1, 1, 6, 7 }, // Inari Sami/Latin/Finland
{ 327, 7, 73, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Skolt Sami/Latin/Finland
- { 328, 7, 13, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {65,85,68}, 344,2 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 6, 7 }, // Warlpiri/Latin/Australia
- { 346, 1, 102, 1643, 1644, 1563, 1642, 1776, 45, 43, 101, 171, 187, 8249, 8250, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 14012,70 , 14012,70 , 158,27 , 14012,70 , 14012,70 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 605,4 , 609,39 , 22,23 , {73,82,82}, 346,3 , 16774,27 , 8,5 , 4,0 , 5602,7 , 3091,5 , 0, 0, 6, 5, 5 }, // Mazanderani/Arabic/Iran
- { 349, 1, 102, 1643, 1644, 1563, 1642, 1776, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 36878,77 , 36878,77 , 158,27 , 36878,77 , 36878,77 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {73,82,82}, 0,0 , 0,7 , 8,5 , 4,0 , 5609,11 , 0,0 , 0, 0, 6, 5, 5 }, // Northern Luri/Arabic/Iran
- { 349, 1, 103, 1643, 1644, 1563, 1642, 1776, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 18,7 , 25,12 , 36878,77 , 36878,77 , 158,27 , 36878,77 , 36878,77 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {73,81,68}, 0,0 , 0,7 , 8,5 , 4,0 , 5609,11 , 0,0 , 0, 0, 6, 5, 6 }, // Northern Luri/Arabic/Iraq
- { 357, 6, 97, 46, 44, 59, 37, 48, 45, 43, 101, 12300, 12301, 12302, 12303, 161,5 , 161,5 , 831,5 , 831,5 , 385,8 , 414,14 , 170,6 , 187,13 , 4697,39 , 4697,39 , 158,27 , 4697,39 , 4697,39 , 158,27 , 2055,21 , 2013,28 , 2041,14 , 2055,21 , 2013,28 , 2041,14 , 58,2 , 55,2 , 45,4 , 5,17 , 22,23 , {72,75,68}, 140,3 , 16801,11 , 4,4 , 4,0 , 5620,2 , 5622,14 , 2, 1, 7, 6, 7 }, // Cantonese/Traditional Han/HongKong
+ { 328, 7, 13, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {65,85,68}, 336,2 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 6, 7 }, // Warlpiri/Latin/Australia
+ { 346, 1, 102, 1643, 1644, 1563, 1642, 1776, 45, 43, 101, 171, 187, 8249, 8250, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 14218,70 , 14218,70 , 158,27 , 14218,70 , 14218,70 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 647,4 , 651,39 , 22,23 , {73,82,82}, 338,3 , 17030,27 , 8,5 , 4,0 , 5642,7 , 3087,5 , 0, 0, 6, 5, 5 }, // Mazanderani/Arabic/Iran
+ { 349, 1, 102, 1643, 1644, 1563, 1642, 1776, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 37535,77 , 37535,77 , 158,27 , 37535,77 , 37535,77 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {73,82,82}, 0,0 , 0,7 , 8,5 , 4,0 , 5649,11 , 0,0 , 0, 0, 6, 5, 5 }, // Northern Luri/Arabic/Iran
+ { 349, 1, 103, 1643, 1644, 1563, 1642, 1776, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 18,7 , 25,12 , 37535,77 , 37535,77 , 158,27 , 37535,77 , 37535,77 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {73,81,68}, 44,5 , 0,7 , 8,5 , 4,0 , 5649,11 , 0,0 , 0, 0, 6, 5, 6 }, // Northern Luri/Arabic/Iraq
+ { 357, 6, 97, 46, 44, 59, 37, 48, 45, 43, 101, 12300, 12301, 12302, 12303, 170,5 , 170,5 , 925,5 , 925,5 , 412,8 , 441,14 , 198,6 , 215,13 , 4671,39 , 4671,39 , 158,27 , 4671,39 , 4671,39 , 158,27 , 2023,28 , 2023,28 , 2051,14 , 2023,28 , 2023,28 , 2051,14 , 60,2 , 57,2 , 45,4 , 5,17 , 22,23 , {72,75,68}, 130,3 , 17057,11 , 4,4 , 4,0 , 5660,2 , 5662,14 , 2, 1, 7, 6, 7 }, // Cantonese/Traditional Han/HongKong
+ { 357, 5, 44, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 170,5 , 170,5 , 925,5 , 925,5 , 412,8 , 420,13 , 198,6 , 204,11 , 4671,39 , 4710,38 , 158,27 , 4671,39 , 4710,38 , 158,27 , 2002,21 , 2023,28 , 2051,14 , 2002,21 , 2023,28 , 2051,14 , 60,2 , 57,2 , 45,4 , 5,17 , 22,23 , {67,78,89}, 129,1 , 3122,13 , 4,4 , 4,0 , 5676,2 , 5678,7 , 2, 1, 7, 6, 7 }, // Cantonese/Simplified Han/China
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, {0,0,0}, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0, 0, 0, 0, 0 } // trailing 0s
};
@@ -1818,45 +1818,50 @@ static const ushort list_pattern_part_data[] = {
0x25, 0x31, 0x2c, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x65, 0x6e, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x64, 0x68, 0x65,
0x20, 0x25, 0x32, 0x25, 0x31, 0x1363, 0x20, 0x25, 0x32, 0x25, 0x31, 0x2c, 0x20, 0x12a5, 0x1293, 0x20, 0x25, 0x32, 0x25, 0x31,
0x20, 0x12a5, 0x1293, 0x20, 0x25, 0x32, 0x25, 0x31, 0x60c, 0x20, 0x25, 0x32, 0x25, 0x31, 0x60c, 0x20, 0x648, 0x25, 0x32, 0x25,
-0x31, 0x20, 0x648, 0x25, 0x32, 0x25, 0x31, 0x20, 0x587, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x76, 0x259, 0x20, 0x25, 0x32,
-0x25, 0x31, 0x20, 0x65, 0x74, 0x61, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x98f, 0x9ac, 0x982, 0x20, 0x25, 0x32, 0x25, 0x31,
-0x20, 0xf51, 0xf44, 0xf0b, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x438, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x25, 0x32, 0x25,
-0x31, 0x1014, 0x103e, 0x1004, 0x1037, 0x103a, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x456, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x1793,
-0x17b7, 0x1784, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x1793, 0x17b7, 0x1784, 0x200b, 0x25, 0x32, 0x25, 0x31, 0x20, 0x69, 0x20, 0x25,
-0x32, 0x25, 0x31, 0x3001, 0x25, 0x32, 0x25, 0x31, 0x548c, 0x25, 0x32, 0x25, 0x31, 0x53ca, 0x25, 0x32, 0x25, 0x31, 0x20, 0x61,
-0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x6f, 0x67, 0x20, 0x25, 0x32, 0x25, 0x31, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x25,
-0x32, 0x25, 0x31, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x6a, 0x61, 0x20, 0x25, 0x32, 0x25, 0x31,
-0x20, 0x65, 0x74, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x61, 0x67, 0x75, 0x73, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x65,
-0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x10d3, 0x10d0, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x75, 0x6e, 0x64, 0x20, 0x25, 0x32,
-0x25, 0x31, 0x20, 0x3ba, 0x3b1, 0x3b9, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x61, 0x61, 0x6d, 0x6d, 0x61, 0x20, 0x25, 0x32,
-0x25, 0x31, 0x20, 0xa85, 0xaa8, 0xac7, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x5d5, 0x25, 0x32, 0x25, 0x31, 0x2c, 0x20, 0x914,
-0x930, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x914, 0x930, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0xe9, 0x73, 0x20, 0x25, 0x32,
-0x25, 0x31, 0x2c, 0x20, 0x64, 0x61, 0x6e, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x64, 0x61, 0x6e, 0x20, 0x25, 0x32, 0x25,
-0x31, 0x2c, 0x20, 0x61, 0x67, 0x75, 0x73, 0x20, 0x25, 0x32, 0x25, 0x31, 0x2c, 0x20, 0xcae, 0xca4, 0xccd, 0xca4, 0xcc1, 0x20,
-0x25, 0x32, 0x25, 0x31, 0x20, 0xcae, 0xca4, 0xccd, 0xca4, 0xcc1, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x436, 0x4d9, 0x43d, 0x435,
-0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x436, 0x430, 0x43d, 0x430, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0xbc0f, 0x20, 0x25, 0x32,
-0x25, 0x31, 0x20, 0xec1, 0xea5, 0xeb0, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x75, 0x6e, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20,
-0x6d, 0x70, 0xe9, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x69, 0x72, 0x20, 0x25, 0x32, 0x25, 0x31, 0x2c, 0x20, 0x25, 0x32,
-0x20, 0xd0e, 0xd28, 0xd4d, 0xd28, 0xd3f, 0xd35, 0x25, 0x31, 0x20, 0xd15, 0xd42, 0xd1f, 0xd3e, 0xd24, 0xd46, 0x20, 0x25, 0x32, 0x25,
-0x31, 0x2c, 0x20, 0x75, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x75, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x906, 0x923, 0x93f,
-0x20, 0x25, 0x32, 0x25, 0x31, 0x2c, 0x25, 0x32, 0x25, 0x31, 0x20, 0x930, 0x20, 0x25, 0x32, 0x25, 0x31, 0x60c, 0x200f, 0x20,
-0x25, 0x32, 0x25, 0x31, 0x60c, 0x20, 0x648, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x648, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20,
-0xa05, 0xa24, 0xa47, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x219, 0x69, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x4d5, 0x43c, 0x4d5,
-0x20, 0x25, 0x32, 0x25, 0x31, 0x2c, 0x20, 0xdc3, 0xdc4, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0xdc3, 0xdc4, 0x20, 0x25, 0x32,
-0x25, 0x31, 0x20, 0x61, 0xa0, 0x25, 0x32, 0x25, 0x31, 0x20, 0x69, 0x6e, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x79, 0x20,
-0x25, 0x32, 0x25, 0x31, 0x20, 0x6e, 0x61, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x6f, 0x63, 0x68, 0x20, 0x25, 0x32, 0x25,
-0x31, 0x20, 0xbae, 0xbb1, 0xbcd, 0xbb1, 0xbc1, 0xbae, 0xbcd, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0xc2e, 0xc30, 0xc3f, 0xc2f, 0xc41,
-0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0xe41, 0xe25, 0xe30, 0x25, 0x32, 0x25, 0x31, 0xe41, 0xe25, 0xe30, 0x25, 0x32, 0x25, 0x31,
-0x20, 0x6d, 0x6f, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x76, 0x65, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x77, 0x65, 0x20,
-0x25, 0x32, 0x25, 0x31, 0x60c, 0x20, 0x627, 0x648, 0x631, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x627, 0x648, 0x631, 0x20, 0x25,
-0x32, 0x25, 0x32, 0x60c, 0x20, 0x25, 0x31, 0x25, 0x31, 0x20, 0x76, 0x61, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x76, 0xe0,
-0x20, 0x25, 0x32, 0x25, 0x31, 0x2c, 0x20, 0x6e, 0x65, 0x2d, 0x25, 0x32, 0x25, 0x31, 0x20, 0x6e, 0x65, 0x2d, 0x25, 0x32,
-0x25, 0x31, 0x2c, 0x20, 0x6b, 0x70, 0x6c, 0x65, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x6b, 0x70, 0x6c, 0x65, 0x20, 0x25,
-0x32, 0x25, 0x31, 0x2c, 0x20, 0x61, 0x74, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x61, 0x74, 0x20, 0x25, 0x32, 0x25, 0x31,
-0x20, 0x13a0, 0x13b4, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x438, 0x486, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x61, 0x28, 0x6e,
-0x29, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x443, 0x43e, 0x43d, 0x43d, 0x430, 0x20, 0x25, 0x32, 0x25, 0x31, 0x2c, 0x20, 0x14b,
-0x301, 0x67, 0x25b, 0x20, 0x25, 0x32, 0x25, 0x31, 0x2c, 0x20, 0x1e3f, 0x62, 0x25b, 0x6e, 0x20, 0x14b, 0x301, 0x67, 0x25b, 0x20,
-0x25, 0x32, 0x25, 0x31, 0x20, 0x70, 0x254, 0x70, 0x20, 0x25, 0x32, 0x25, 0x31, 0x540c, 0x25, 0x32
+0x31, 0x20, 0x648, 0x25, 0x32, 0x25, 0x31, 0x20, 0x587, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x986, 0x9f0, 0x9c1, 0x20, 0x25,
+0x32, 0x25, 0x31, 0x20, 0x76, 0x259, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x65, 0x74, 0x61, 0x20, 0x25, 0x32, 0x25, 0x31,
+0x20, 0x98f, 0x9ac, 0x982, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0xf51, 0xf44, 0xf0b, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x438,
+0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x25, 0x32, 0x25, 0x31, 0x1014, 0x103e, 0x1004, 0x1037, 0x103a, 0x20, 0x25, 0x32, 0x25, 0x31,
+0x20, 0x456, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x1793, 0x17b7, 0x1784, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x1793, 0x17b7, 0x1784,
+0x200b, 0x25, 0x32, 0x25, 0x31, 0x20, 0x69, 0x20, 0x25, 0x32, 0x25, 0x31, 0x3001, 0x25, 0x32, 0x25, 0x31, 0x548c, 0x25, 0x32,
+0x25, 0x31, 0x53ca, 0x25, 0x32, 0x25, 0x31, 0x20, 0x61, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x6f, 0x67, 0x20, 0x25, 0x32,
+0x25, 0x31, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x25, 0x32, 0x25,
+0x31, 0x20, 0x6a, 0x61, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x65, 0x74, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x61, 0x67,
+0x75, 0x73, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x65, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x10d3, 0x10d0, 0x20, 0x25, 0x32,
+0x25, 0x31, 0x20, 0x75, 0x6e, 0x64, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x3ba, 0x3b1, 0x3b9, 0x20, 0x25, 0x32, 0x25, 0x31,
+0x20, 0x61, 0x61, 0x6d, 0x6d, 0x61, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0xa85, 0xaa8, 0xac7, 0x20, 0x25, 0x32, 0x25, 0x31,
+0x20, 0x5d5, 0x25, 0x32, 0x25, 0x31, 0x2c, 0x20, 0x914, 0x930, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x914, 0x930, 0x20, 0x25,
+0x32, 0x25, 0x31, 0x20, 0xe9, 0x73, 0x20, 0x25, 0x32, 0x25, 0x31, 0x2c, 0x20, 0x64, 0x61, 0x6e, 0x20, 0x25, 0x32, 0x25,
+0x31, 0x20, 0x64, 0x61, 0x6e, 0x20, 0x25, 0x32, 0x25, 0x31, 0x2c, 0x20, 0x61, 0x67, 0x75, 0x73, 0x20, 0x25, 0x32, 0x25,
+0x31, 0x2c, 0x20, 0xcae, 0xca4, 0xccd, 0xca4, 0xcc1, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0xcae, 0xca4, 0xccd, 0xca4, 0xcc1, 0x20,
+0x25, 0x32, 0x25, 0x31, 0x20, 0x436, 0x4d9, 0x43d, 0x435, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x436, 0x430, 0x43d, 0x430, 0x20,
+0x25, 0x32, 0x25, 0x31, 0x20, 0xbc0f, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0xec1, 0xea5, 0xeb0, 0x20, 0x25, 0x32, 0x25, 0x31,
+0x20, 0x75, 0x6e, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x6d, 0x70, 0xe9, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x69, 0x72,
+0x20, 0x25, 0x32, 0x25, 0x31, 0x2c, 0x20, 0x25, 0x32, 0x20, 0xd0e, 0xd28, 0xd4d, 0xd28, 0xd3f, 0xd35, 0x25, 0x31, 0x20, 0xd15,
+0xd42, 0xd1f, 0xd3e, 0xd24, 0xd46, 0x20, 0x25, 0x32, 0x25, 0x31, 0x2c, 0x20, 0x75, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x75,
+0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x906, 0x923, 0x93f, 0x20, 0x25, 0x32, 0x25, 0x31, 0x2c, 0x25, 0x32, 0x25, 0x31, 0x20,
+0x930, 0x20, 0x25, 0x32, 0x25, 0x31, 0x2c, 0x20, 0xb13, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0xb13, 0x20, 0x25, 0x32, 0x25,
+0x31, 0x60c, 0x20, 0x627, 0x648, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x627, 0x648, 0x20, 0x25, 0x32, 0x25, 0x31, 0x60c, 0x200f,
+0x20, 0x25, 0x32, 0x25, 0x31, 0x60c, 0x20, 0x648, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x648, 0x20, 0x25, 0x32, 0x25, 0x31,
+0x20, 0xa05, 0xa24, 0xa47, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x219, 0x69, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x4d5, 0x43c,
+0x4d5, 0x20, 0x25, 0x32, 0x25, 0x31, 0x2c, 0x20, 0xdc3, 0xdc4, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0xdc3, 0xdc4, 0x20, 0x25,
+0x32, 0x25, 0x31, 0x20, 0x61, 0xa0, 0x25, 0x32, 0x25, 0x31, 0x20, 0x69, 0x6e, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x79,
+0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x6e, 0x61, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x6f, 0x63, 0x68, 0x20, 0x25, 0x32,
+0x25, 0x31, 0x20, 0xbae, 0xbb1, 0xbcd, 0xbb1, 0xbc1, 0xbae, 0xbcd, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x4bb, 0x4d9, 0x43c, 0x20,
+0x25, 0x32, 0x25, 0x31, 0x20, 0xc2e, 0xc30, 0xc3f, 0xc2f, 0xc41, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0xe41, 0xe25, 0xe30, 0x25,
+0x32, 0x25, 0x31, 0xe41, 0xe25, 0xe30, 0x25, 0x32, 0x25, 0x31, 0x20, 0x6d, 0x6f, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x76,
+0x65, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x77, 0x65, 0x20, 0x25, 0x32, 0x25, 0x31, 0x60c, 0x20, 0x627, 0x648, 0x631, 0x20,
+0x25, 0x32, 0x25, 0x31, 0x20, 0x627, 0x648, 0x631, 0x20, 0x25, 0x32, 0x25, 0x32, 0x60c, 0x20, 0x25, 0x31, 0x25, 0x31, 0x20,
+0x76, 0x61, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x76, 0xe0, 0x20, 0x25, 0x32, 0x25, 0x31, 0x2c, 0x20, 0x61, 0x28, 0x63,
+0x29, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x61, 0x28, 0x63, 0x29, 0x20, 0x25, 0x32, 0x25, 0x31, 0x2c, 0x20, 0x6e, 0x65,
+0x2d, 0x25, 0x32, 0x25, 0x31, 0x20, 0x6e, 0x65, 0x2d, 0x25, 0x32, 0x25, 0x31, 0x2c, 0x20, 0x6b, 0x70, 0x6c, 0x65, 0x20,
+0x25, 0x32, 0x25, 0x31, 0x20, 0x6b, 0x70, 0x6c, 0x65, 0x20, 0x25, 0x32, 0x25, 0x31, 0x2c, 0x20, 0x61, 0x74, 0x20, 0x25,
+0x32, 0x25, 0x31, 0x20, 0x61, 0x74, 0x20, 0x25, 0x32, 0x25, 0x31, 0x2c, 0x20, 0x61, 0x6b, 0x6b, 0x65, 0x64, 0x20, 0x25,
+0x32, 0x25, 0x31, 0x20, 0x61, 0x6b, 0x6b, 0x65, 0x64, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x13a0, 0x13b4, 0x20, 0x25, 0x32,
+0x25, 0x31, 0x20, 0x438, 0x486, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x61, 0x28, 0x6e, 0x29, 0x20, 0x25, 0x32, 0x25, 0x31,
+0x20, 0x443, 0x43e, 0x43d, 0x43d, 0x430, 0x20, 0x25, 0x32, 0x25, 0x31, 0x2c, 0x20, 0x14b, 0x301, 0x67, 0x25b, 0x20, 0x25, 0x32,
+0x25, 0x31, 0x2c, 0x20, 0x1e3f, 0x62, 0x25b, 0x6e, 0x20, 0x14b, 0x301, 0x67, 0x25b, 0x20, 0x25, 0x32, 0x25, 0x31, 0x20, 0x70,
+0x254, 0x70, 0x20, 0x25, 0x32, 0x25, 0x31, 0x540c, 0x25, 0x32
};
static const ushort date_format_data[] = {
@@ -1868,109 +1873,114 @@ static const ushort date_format_data[] = {
0x64, 0x64, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x2e, 0x4d, 0x2e, 0x79, 0x79,
0x64, 0x64, 0x2f, 0x4d, 0x4d, 0x2f, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x20, 0x1363, 0x64, 0x20, 0x4d, 0x4d,
0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x200f, 0x2f, 0x4d, 0x200f, 0x2f, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64,
-0x64, 0x60c, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x60c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x2e, 0x4d, 0x4d,
-0x2e, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x20, 0x569, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x2c, 0x20, 0x64,
-0x64, 0x64, 0x64, 0x64, 0x2d, 0x4d, 0x2d, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x4d,
-0x4d, 0x4d, 0x4d, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79,
-0x2c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x79, 0x79, 0x2f, 0x4d, 0x2f, 0x64, 0x79, 0x79, 0x79, 0x79, 0x28, 0x27, 0x65, 0x27,
-0x29, 0x27, 0x6b, 0x6f, 0x27, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x2c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2f,
-0x4d, 0x2f, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0xf66, 0xfa4, 0xfb1, 0xf72, 0xf0b, 0xf63, 0xf7c, 0xf0b, 0x79, 0x79,
-0x79, 0x79, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0xf5a, 0xf7a, 0xf66, 0xf0b, 0x64, 0x64, 0x64, 0x2e, 0x4d, 0x4d, 0x2e, 0x79,
-0x79, 0x20, 0x27, 0x433, 0x27, 0x2e, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79,
-0x79, 0x79, 0x79, 0x20, 0x27, 0x433, 0x27, 0x2e, 0x64, 0x64, 0x2d, 0x4d, 0x4d, 0x2d, 0x79, 0x79, 0x64, 0x2e, 0x4d, 0x4d,
-0x2e, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x27, 0x64, 0x65, 0x27,
-0x20, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x2f, 0x4d, 0x2f, 0x64, 0x79, 0x79, 0x79, 0x79, 0x5e74, 0x4d, 0x6708,
-0x64, 0x65e5, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2f, 0x4d, 0x2f, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x5e74, 0x4d,
-0x6708, 0x64, 0x65e5, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x2e, 0x20, 0x79, 0x79, 0x79, 0x79,
-0x2e, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x2e,
-0x64, 0x2e, 0x20, 0x4d, 0x2e, 0x20, 0x79, 0x79, 0x2e, 0x64, 0x64, 0x64, 0x64, 0x20, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d,
-0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x20, 0x27, 0x64, 0x65, 0x6e, 0x27, 0x20, 0x64, 0x2e, 0x20,
-0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x2f, 0x4d, 0x4d, 0x2f, 0x79, 0x79, 0x4d, 0x2f, 0x64, 0x2f,
-0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x2f, 0x4d, 0x4d, 0x2f, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x2e,
-0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x2e, 0x4d, 0x2e, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79,
-0x2d, 0x4d, 0x4d, 0x2d, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x27, 0x6d, 0x68, 0x27, 0x20, 0x4d, 0x4d,
-0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x27, 0x64, 0x65, 0x27, 0x20,
-0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x27, 0x64, 0x65, 0x27, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20,
-0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x20, 0x64, 0x64,
-0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x5d1, 0x4d,
-0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x2e, 0x20, 0x4d, 0x4d, 0x2e, 0x20, 0x64, 0x64,
-0x2e, 0x79, 0x79, 0x79, 0x79, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x2e, 0x2c, 0x20, 0x64, 0x64, 0x64, 0x64,
-0x79, 0x79, 0x79, 0x79, 0x20, 0x27, 0x436, 0x27, 0x2e, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x2c, 0x20, 0x64, 0x64,
-0x64, 0x64, 0x79, 0x79, 0x79, 0x79, 0x2d, 0x27, 0x436, 0x27, 0x2e, 0x2c, 0x20, 0x64, 0x2d, 0x4d, 0x4d, 0x4d, 0x4d, 0x2c,
-0x20, 0x64, 0x64, 0x64, 0x64, 0x79, 0x79, 0x2e, 0x20, 0x4d, 0x2e, 0x20, 0x64, 0x2e, 0x79, 0x79, 0x79, 0x79, 0xb144, 0x20,
-0x4d, 0xc6d4, 0x20, 0x64, 0xc77c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x20, 0xe97, 0xeb5, 0x20, 0x64, 0x20,
-0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x2e,
-0x20, 0x27, 0x67, 0x61, 0x64, 0x61, 0x27, 0x20, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x79, 0x79, 0x79, 0x79, 0x20,
-0x27, 0x6d, 0x27, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x20, 0x27, 0x64, 0x27, 0x2e, 0x2c, 0x20, 0x64, 0x64,
-0x64, 0x64, 0x64, 0x64, 0x2e, 0x4d, 0x2e, 0x79, 0x79, 0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79,
-0x79, 0x79, 0x79, 0x79, 0x79, 0x2c, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x2c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64,
-0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x27, 0x74, 0x61, 0x27, 0x2019, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79,
-0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x20, 0x27, 0x43e, 0x43d, 0x44b, 0x27, 0x20, 0x4d,
-0x4d, 0x20, 0x27, 0x441, 0x430, 0x440, 0x44b, 0x43d, 0x27, 0x20, 0x64, 0x64, 0x64, 0x2e, 0x4d, 0x4d, 0x2e, 0x79, 0x79, 0x79,
-0x79, 0x64, 0x2d, 0x4d, 0x2d, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x20, 0x62f, 0x20, 0x79, 0x79, 0x79, 0x79, 0x20, 0x62f,
-0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x27, 0x69, 0x6c, 0x73, 0x27, 0x20, 0x64,
-0x20, 0x27, 0x64, 0x61, 0x27, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x2e, 0x4d, 0x2e, 0x79,
-0x79, 0x2e, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79,
-0x79, 0x2e, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79,
-0x20, 0x27, 0x430, 0x437, 0x27, 0x64, 0x2e, 0x20, 0x4d, 0x2e, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x2e, 0x20, 0x4d, 0x4d,
-0x2e, 0x20, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79,
-0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x64, 0x2c, 0x20, 0x79, 0x79,
-0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x20, 0x64, 0x64, 0x20, 0x27, 0x64, 0x65, 0x27, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20,
-0x27, 0x64, 0x65, 0x27, 0x20, 0x79, 0x79, 0x79, 0x79, 0x4d, 0x4d, 0x2f, 0x64, 0x64, 0x2f, 0x79, 0x79, 0x64, 0x64, 0x2d,
-0x4d, 0x4d, 0x2d, 0x79, 0x79, 0x79, 0x79, 0x64, 0x2c, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x2c,
-0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0xe17, 0xe35, 0xe48, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20,
-0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0xf60, 0xf72, 0xf0b, 0xf5a, 0xf7a, 0xf66, 0xf0b,
-0x64, 0x2c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x1363, 0x20, 0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d,
-0x20, 0x1218, 0x12d3, 0x120d, 0x1272, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x2e, 0x4d, 0x4d, 0x2e, 0x79, 0x79, 0x79, 0x79, 0x64,
-0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x20, 0x64, 0x64, 0x64, 0x64, 0x79, 0x79, 0x79, 0x79, 0x20,
-0x64, 0x2d, 0x4d, 0x4d, 0x4d, 0x4d, 0x60c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20,
-0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x20, 0x27, 0x440, 0x27, 0x2e, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20,
-0x64, 0x2d, 0x4d, 0x4d, 0x4d, 0x4d, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x20, 0x646, 0x686, 0x6cc,
-0x20, 0x6cc, 0x6cc, 0x644, 0x20, 0x64, 0x20, 0x646, 0x686, 0x6cc, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x64, 0x64, 0x64,
-0x20, 0x6a9, 0x648, 0x646, 0x6cc, 0x79, 0x79, 0x2f, 0x4d, 0x4d, 0x2f, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x79,
-0x79, 0x79, 0x79, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x20, 0x64, 0x20, 0x27, 0x64,
-0x69, 0x27, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x27, 0x64, 0x61, 0x6c, 0x27, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64,
-0x64, 0x64, 0x2c, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x20, 0x27, 0x6c, 0x69, 0x61, 0x27, 0x20, 0x79, 0x79, 0x79,
-0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x27, 0x64, 0x65, 0x27, 0x20, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20,
-0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x27, 0x64, 0x69, 0x27, 0x20, 0x4d, 0x4d, 0x4d,
-0x4d, 0x20, 0x27, 0x64, 0x69, 0x27, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x27, 0x64, 0xe4,
-0x27, 0x20, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x2e, 0x4d,
-0x4d, 0x2e, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x27, 0x43b, 0x27,
-0x2e, 0x20, 0x79, 0x79, 0x79, 0x79, 0x2e, 0x64, 0x2f, 0x4d, 0x4d, 0x2f, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79,
-0x20, 0x27, 0x441, 0x44b, 0x43b, 0x27, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x20, 0x27, 0x43a, 0x4af, 0x43d, 0x44d, 0x27,
-0x2c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2f, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64,
-0x20, 0x2c, 0x20, 0x27, 0x6c, 0x79, 0x25b, 0x27, 0x30c, 0x2bc, 0x20, 0x64, 0x20, 0x27, 0x6e, 0x61, 0x27, 0x20, 0x4d, 0x4d,
-0x4d, 0x4d, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64,
-0x2e, 0x20, 0x79, 0x79, 0x79, 0x79
+0x64, 0x60c, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x2e, 0x4d, 0x4d, 0x2e,
+0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x20, 0x569, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x2c, 0x20, 0x64, 0x64,
+0x64, 0x64, 0x64, 0x2d, 0x4d, 0x2d, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x4d, 0x4d,
+0x4d, 0x4d, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x2c,
+0x20, 0x64, 0x64, 0x64, 0x64, 0x79, 0x79, 0x2f, 0x4d, 0x2f, 0x64, 0x79, 0x79, 0x79, 0x79, 0x28, 0x27, 0x65, 0x27, 0x29,
+0x27, 0x6b, 0x6f, 0x27, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x27, 0x72, 0x65, 0x6e, 0x27, 0x20, 0x64, 0x28, 0x27, 0x61, 0x27,
+0x29, 0x2c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2f, 0x4d, 0x2f, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0xf66,
+0xfa4, 0xfb1, 0xf72, 0xf0b, 0xf63, 0xf7c, 0xf0b, 0x79, 0x79, 0x79, 0x79, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0xf5a, 0xf7a, 0xf66,
+0xf0b, 0x64, 0x64, 0x64, 0x2e, 0x4d, 0x4d, 0x2e, 0x79, 0x79, 0x20, 0x27, 0x433, 0x27, 0x2e, 0x64, 0x64, 0x64, 0x64, 0x2c,
+0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x20, 0x27, 0x433, 0x27, 0x2e, 0x64, 0x64, 0x2d,
+0x4d, 0x4d, 0x2d, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x104a, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x104a, 0x20, 0x64,
+0x64, 0x64, 0x64, 0x64, 0x2e, 0x4d, 0x4d, 0x2e, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x4d, 0x4d,
+0x4d, 0x4d, 0x20, 0x27, 0x64, 0x65, 0x27, 0x20, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x2f, 0x4d, 0x2f, 0x64,
+0x79, 0x79, 0x79, 0x79, 0x5e74, 0x4d, 0x6708, 0x64, 0x65e5, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2f, 0x4d, 0x2f, 0x79, 0x79, 0x79,
+0x79, 0x79, 0x79, 0x79, 0x79, 0x5e74, 0x4d, 0x6708, 0x64, 0x65e5, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2e, 0x20, 0x4d,
+0x4d, 0x2e, 0x20, 0x79, 0x79, 0x79, 0x79, 0x2e, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d,
+0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x2e, 0x64, 0x2e, 0x20, 0x4d, 0x2e, 0x20, 0x79, 0x79, 0x2e, 0x64, 0x64, 0x64, 0x64,
+0x20, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x20, 0x27, 0x64,
+0x65, 0x6e, 0x27, 0x20, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x2f, 0x4d, 0x4d,
+0x2f, 0x79, 0x79, 0x4d, 0x2f, 0x64, 0x2f, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x2f, 0x4d, 0x4d, 0x2f, 0x64, 0x64, 0x64,
+0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x2e, 0x4d,
+0x2e, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x2d, 0x4d, 0x4d, 0x2d, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64,
+0x27, 0x6d, 0x68, 0x27, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20,
+0x64, 0x20, 0x27, 0x64, 0x65, 0x27, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x27, 0x64, 0x65, 0x27, 0x20, 0x79, 0x79, 0x79,
+0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79,
+0x64, 0x64, 0x64, 0x64, 0x20, 0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64,
+0x64, 0x2c, 0x20, 0x64, 0x20, 0x5d1, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x2e,
+0x20, 0x4d, 0x4d, 0x2e, 0x20, 0x64, 0x64, 0x2e, 0x79, 0x79, 0x79, 0x79, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64,
+0x2e, 0x2c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x79, 0x79, 0x79, 0x79, 0x20, 0x27, 0x436, 0x27, 0x2e, 0x20, 0x64, 0x20, 0x4d,
+0x4d, 0x4d, 0x4d, 0x2c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x79, 0x79, 0x79, 0x79, 0x2d, 0x27, 0x436, 0x27, 0x2e, 0x2c, 0x20,
+0x64, 0x2d, 0x4d, 0x4d, 0x4d, 0x4d, 0x2c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x79, 0x79, 0x2e, 0x20, 0x4d, 0x2e, 0x20, 0x64,
+0x2e, 0x79, 0x79, 0x79, 0x79, 0xb144, 0x20, 0x4d, 0xc6d4, 0x20, 0x64, 0xc77c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64,
+0x64, 0x20, 0xe97, 0xeb5, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64,
+0x2c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x2e, 0x20, 0x27, 0x67, 0x61, 0x64, 0x61, 0x27, 0x20, 0x64, 0x2e, 0x20, 0x4d, 0x4d,
+0x4d, 0x4d, 0x79, 0x79, 0x79, 0x79, 0x20, 0x27, 0x6d, 0x27, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x20, 0x27,
+0x64, 0x27, 0x2e, 0x2c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2e, 0x4d, 0x2e, 0x79, 0x79, 0x64, 0x64, 0x20, 0x4d,
+0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x2c, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64,
+0x2c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x27, 0x74, 0x61, 0x27, 0x2019, 0x20,
+0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x2e, 0x4d, 0x4d, 0x2e, 0x64, 0x64, 0x79,
+0x79, 0x79, 0x79, 0x2e, 0x4d, 0x4d, 0x2e, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2e, 0x4d, 0x4d,
+0x2e, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x20, 0x62f, 0x20, 0x79, 0x79, 0x79, 0x79, 0x20, 0x62f, 0x20, 0x4d,
+0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x27, 0x69, 0x6c, 0x73, 0x27, 0x20, 0x64, 0x20, 0x27,
+0x64, 0x61, 0x27, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x2e, 0x4d, 0x2e, 0x79, 0x79, 0x2e,
+0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x2e,
+0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x20, 0x27,
+0x430, 0x437, 0x27, 0x64, 0x2e, 0x20, 0x4d, 0x2e, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x2e, 0x20,
+0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79,
+0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x64, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79,
+0x64, 0x64, 0x64, 0x64, 0x20, 0x64, 0x64, 0x20, 0x27, 0x64, 0x65, 0x27, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x27, 0x64,
+0x65, 0x27, 0x20, 0x79, 0x79, 0x79, 0x79, 0x4d, 0x4d, 0x2f, 0x64, 0x64, 0x2f, 0x79, 0x79, 0x64, 0x64, 0x2d, 0x4d, 0x4d,
+0x2d, 0x79, 0x79, 0x79, 0x79, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x20, 0x27, 0x435,
+0x43b, 0x27, 0x2c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79,
+0x2c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0xe17, 0xe35, 0xe48, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d,
+0x20, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0xf60, 0xf72, 0xf0b, 0xf5a, 0xf7a, 0xf66,
+0xf0b, 0x64, 0x2c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x1363, 0x20, 0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d,
+0x4d, 0x20, 0x1218, 0x12d3, 0x120d, 0x1272, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x2e, 0x4d, 0x4d, 0x2e, 0x79, 0x79, 0x79, 0x79,
+0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x20, 0x64, 0x64, 0x64, 0x64, 0x79, 0x79, 0x79, 0x79,
+0x20, 0x64, 0x2d, 0x4d, 0x4d, 0x4d, 0x4d, 0x60c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64,
+0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x20, 0x27, 0x440, 0x27, 0x2e, 0x64, 0x64, 0x64, 0x64, 0x60c,
+0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x60c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64,
+0x2d, 0x4d, 0x4d, 0x4d, 0x4d, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x20, 0x646, 0x686, 0x6cc, 0x20,
+0x6cc, 0x6cc, 0x644, 0x20, 0x64, 0x20, 0x646, 0x686, 0x6cc, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x64, 0x64, 0x64, 0x20,
+0x6a9, 0x648, 0x646, 0x6cc, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x2c, 0x20, 0x79, 0x79, 0x79,
+0x79, 0x79, 0x79, 0x2f, 0x4d, 0x4d, 0x2f, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x20,
+0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x64, 0x64, 0x2d, 0x4d, 0x2d, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x20, 0x64, 0x20,
+0x27, 0x64, 0x69, 0x27, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x27, 0x64, 0x61, 0x6c, 0x27, 0x20, 0x79, 0x79, 0x79, 0x79,
+0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x20, 0x27, 0x6c, 0x69, 0x61, 0x27, 0x20, 0x79,
+0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x27, 0x64, 0x65, 0x27, 0x20, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d,
+0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x27, 0x64, 0x69, 0x27, 0x20, 0x4d,
+0x4d, 0x4d, 0x4d, 0x20, 0x27, 0x64, 0x69, 0x27, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x27,
+0x64, 0xe4, 0x27, 0x20, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64,
+0x2c, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x27, 0x43b, 0x27, 0x2e, 0x20, 0x79, 0x79, 0x79, 0x79, 0x2e, 0x64,
+0x2f, 0x4d, 0x4d, 0x2f, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x20, 0x27, 0x441, 0x44b, 0x43b, 0x27, 0x20, 0x4d,
+0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x20, 0x27, 0x43a, 0x4af, 0x43d, 0x44d, 0x27, 0x2c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64,
+0x2f, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x20, 0x2c, 0x20, 0x27, 0x6c, 0x79, 0x25b, 0x27,
+0x30c, 0x2bc, 0x20, 0x64, 0x20, 0x27, 0x6e, 0x61, 0x27, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79,
+0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x2e, 0x20, 0x79, 0x79, 0x79, 0x79
};
static const ushort time_format_data[] = {
0x48, 0x48, 0x3a, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x48, 0x48, 0x3a, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x20, 0x74, 0x68, 0x3a,
0x6d, 0x6d, 0x20, 0x41, 0x50, 0x68, 0x3a, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x20, 0x41, 0x50, 0x20, 0x74, 0x48, 0x48, 0x3a,
0x6d, 0x6d, 0x68, 0x3a, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x20, 0x41, 0x50, 0x2c, 0x20, 0x74, 0x48, 0x3a, 0x6d, 0x6d, 0x48,
-0x3a, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x20, 0x74, 0x68, 0x2e, 0x6d, 0x6d, 0x2e, 0x20, 0x41, 0x50, 0x68, 0x2e, 0x6d, 0x6d,
-0x2e, 0x73, 0x73, 0x20, 0x41, 0x50, 0x20, 0x74, 0x48, 0x48, 0x3a, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x20, 0x28, 0x74, 0x29,
-0xf46, 0xf74, 0xf0b, 0xf5a, 0xf7c, 0xf51, 0xf0b, 0x20, 0x68, 0x20, 0xf66, 0xf90, 0xf62, 0xf0b, 0xf58, 0xf0b, 0x20, 0x6d, 0x6d, 0x20,
-0x41, 0x50, 0xf46, 0xf74, 0xf0b, 0xf5a, 0xf7c, 0xf51, 0xf0b, 0x20, 0x68, 0x20, 0xf66, 0xf90, 0xf62, 0xf0b, 0xf58, 0xf0b, 0x20, 0x6d,
-0x6d, 0x3a, 0x73, 0x73, 0x20, 0x41, 0x50, 0x20, 0x74, 0x74, 0x20, 0x48, 0x48, 0x3a, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x48,
-0x48, 0x3a, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x2c, 0x20, 0x74, 0x41, 0x50, 0x68, 0x3a, 0x6d, 0x6d, 0x74, 0x20, 0x41, 0x50,
-0x68, 0x3a, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x41, 0x50, 0x68, 0x3a, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x20, 0x5b, 0x74, 0x5d,
-0x48, 0x48, 0x2e, 0x6d, 0x6d, 0x48, 0x48, 0x2e, 0x6d, 0x6d, 0x2e, 0x73, 0x73, 0x20, 0x74, 0x68, 0x2e, 0x6d, 0x6d, 0x20,
-0x41, 0x50, 0x48, 0x2e, 0x6d, 0x6d, 0x48, 0x2e, 0x6d, 0x6d, 0x2e, 0x73, 0x73, 0x20, 0x74, 0x48, 0x20, 0x27, 0x68, 0x27,
-0x20, 0x6d, 0x6d, 0x20, 0x27, 0x6d, 0x69, 0x6e, 0x27, 0x20, 0x73, 0x73, 0x20, 0x27, 0x73, 0x27, 0x20, 0x74, 0x48, 0x48,
-0x20, 0x27, 0x68, 0x27, 0x20, 0x6d, 0x6d, 0x48, 0x48, 0x2e, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x20, 0x27, 0x68, 0x27, 0x20,
-0x74, 0x68, 0x68, 0x3a, 0x6d, 0x6d, 0x20, 0x41, 0x50, 0x68, 0x68, 0x3a, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x20, 0x41, 0x50,
-0x20, 0x74, 0x48, 0x6642, 0x6d, 0x6d, 0x5206, 0x73, 0x73, 0x79d2, 0x20, 0x74, 0x41, 0x50, 0x20, 0x68, 0x3a, 0x6d, 0x6d, 0x41,
-0x50, 0x20, 0x68, 0xc2dc, 0x20, 0x6d, 0xbd84, 0x20, 0x73, 0xcd08, 0x20, 0x74, 0x48, 0x20, 0xec2, 0xea1, 0xe87, 0x20, 0x6d, 0x20,
-0xe99, 0xeb2, 0xe97, 0xeb5, 0x20, 0x73, 0x73, 0x20, 0xea7, 0xeb4, 0xe99, 0xeb2, 0xe97, 0xeb5, 0x20, 0x74, 0x48, 0x3a, 0x6d, 0x6d,
-0x3a, 0x73, 0x73, 0x20, 0x28, 0x74, 0x29, 0x27, 0x6b, 0x6c, 0x27, 0x2e, 0x20, 0x48, 0x48, 0x3a, 0x6d, 0x6d, 0x3a, 0x73,
-0x73, 0x20, 0x74, 0x41, 0x50, 0x20, 0x68, 0x3a, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x20, 0x74, 0x48, 0x20, 0xe19, 0xe32, 0xe2c,
-0xe34, 0xe01, 0xe32, 0x20, 0x6d, 0x6d, 0x20, 0xe19, 0xe32, 0xe17, 0xe35, 0x20, 0x73, 0x73, 0x20, 0xe27, 0xe34, 0xe19, 0xe32, 0xe17,
-0xe35, 0x20, 0x74, 0x41, 0x50, 0x20, 0x27, 0x67, 0x61, 0x27, 0x20, 0x68, 0x3a, 0x6d, 0x6d, 0x41, 0x50, 0x20, 0x27, 0x67,
-0x61, 0x27, 0x20, 0x68, 0x3a, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x20, 0x74, 0x27, 0x4b, 0x6c, 0x27, 0x2e, 0x20, 0x48, 0x2e,
-0x6d, 0x6d, 0x27, 0x4b, 0x6c, 0x6f, 0x63, 0x6b, 0x27, 0x20, 0x48, 0x2e, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x20, 0x28, 0x74,
-0x29, 0x74, 0x20, 0x68, 0x3a, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x20, 0x41, 0x50, 0x48, 0x3a, 0x6d, 0x6d, 0x20, 0x27, 0x68,
-0x6f, 0x64, 0x17a, 0x27, 0x2e
+0x3a, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x20, 0x74, 0x41, 0x50, 0x20, 0x68, 0x2e, 0x6d, 0x6d, 0x41, 0x50, 0x20, 0x68, 0x2e,
+0x6d, 0x6d, 0x2e, 0x73, 0x73, 0x20, 0x74, 0x48, 0x48, 0x3a, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x20, 0x28, 0x74, 0x29, 0xf46,
+0xf74, 0xf0b, 0xf5a, 0xf7c, 0xf51, 0xf0b, 0x20, 0x68, 0x20, 0xf66, 0xf90, 0xf62, 0xf0b, 0xf58, 0xf0b, 0x20, 0x6d, 0x6d, 0x20, 0x41,
+0x50, 0xf46, 0xf74, 0xf0b, 0xf5a, 0xf7c, 0xf51, 0xf0b, 0x20, 0x68, 0x20, 0xf66, 0xf90, 0xf62, 0xf0b, 0xf58, 0xf0b, 0x20, 0x6d, 0x6d,
+0x3a, 0x73, 0x73, 0x20, 0x41, 0x50, 0x20, 0x74, 0x48, 0x3a, 0x6d, 0x6d, 0x20, 0x27, 0x447, 0x27, 0x2e, 0x48, 0x3a, 0x6d,
+0x6d, 0x3a, 0x73, 0x73, 0x20, 0x27, 0x447, 0x27, 0x2e, 0x20, 0x74, 0x42, 0x20, 0x48, 0x3a, 0x6d, 0x6d, 0x74, 0x20, 0x48,
+0x48, 0x3a, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x48, 0x48, 0x3a, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x2c, 0x20, 0x74, 0x41, 0x50,
+0x68, 0x3a, 0x6d, 0x6d, 0x74, 0x20, 0x41, 0x50, 0x68, 0x3a, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x41, 0x50, 0x68, 0x3a, 0x6d,
+0x6d, 0x3a, 0x73, 0x73, 0x20, 0x5b, 0x74, 0x5d, 0x48, 0x48, 0x2e, 0x6d, 0x6d, 0x48, 0x48, 0x2e, 0x6d, 0x6d, 0x2e, 0x73,
+0x73, 0x20, 0x74, 0x48, 0x2e, 0x6d, 0x6d, 0x48, 0x2e, 0x6d, 0x6d, 0x2e, 0x73, 0x73, 0x20, 0x74, 0x48, 0x20, 0x27, 0x68,
+0x27, 0x20, 0x6d, 0x6d, 0x20, 0x27, 0x6d, 0x69, 0x6e, 0x27, 0x20, 0x73, 0x73, 0x20, 0x27, 0x73, 0x27, 0x20, 0x74, 0x48,
+0x48, 0x20, 0x27, 0x68, 0x27, 0x20, 0x6d, 0x6d, 0x48, 0x48, 0x20, 0x27, 0x68, 0x27, 0x20, 0x6d, 0x6d, 0x20, 0x27, 0x6d,
+0x69, 0x6e, 0x27, 0x20, 0x73, 0x73, 0x20, 0x27, 0x73, 0x27, 0x20, 0x74, 0x48, 0x48, 0x2e, 0x6d, 0x6d, 0x3a, 0x73, 0x73,
+0x20, 0x27, 0x68, 0x27, 0x20, 0x74, 0x68, 0x68, 0x3a, 0x6d, 0x6d, 0x20, 0x41, 0x50, 0x68, 0x68, 0x3a, 0x6d, 0x6d, 0x3a,
+0x73, 0x73, 0x20, 0x41, 0x50, 0x20, 0x74, 0x48, 0x6642, 0x6d, 0x6d, 0x5206, 0x73, 0x73, 0x79d2, 0x20, 0x74, 0x41, 0x50, 0x20,
+0x68, 0x3a, 0x6d, 0x6d, 0x41, 0x50, 0x20, 0x68, 0xc2dc, 0x20, 0x6d, 0xbd84, 0x20, 0x73, 0xcd08, 0x20, 0x74, 0x48, 0x20, 0xec2,
+0xea1, 0xe87, 0x20, 0x6d, 0x20, 0xe99, 0xeb2, 0xe97, 0xeb5, 0x20, 0x73, 0x73, 0x20, 0xea7, 0xeb4, 0xe99, 0xeb2, 0xe97, 0xeb5, 0x20,
+0x74, 0x48, 0x3a, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x20, 0x28, 0x74, 0x29, 0x27, 0x6b, 0x6c, 0x27, 0x2e, 0x20, 0x48, 0x48,
+0x3a, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x20, 0x74, 0x41, 0x50, 0x20, 0x68, 0x3a, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x20, 0x74,
+0x48, 0x20, 0xe19, 0xe32, 0xe2c, 0xe34, 0xe01, 0xe32, 0x20, 0x6d, 0x6d, 0x20, 0xe19, 0xe32, 0xe17, 0xe35, 0x20, 0x73, 0x73, 0x20,
+0xe27, 0xe34, 0xe19, 0xe32, 0xe17, 0xe35, 0x20, 0x74, 0x41, 0x50, 0x20, 0x27, 0x67, 0x61, 0x27, 0x20, 0x68, 0x3a, 0x6d, 0x6d,
+0x41, 0x50, 0x20, 0x27, 0x67, 0x61, 0x27, 0x20, 0x68, 0x3a, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x20, 0x74, 0x27, 0x4b, 0x6c,
+0x27, 0x2e, 0x20, 0x48, 0x2e, 0x6d, 0x6d, 0x27, 0x4b, 0x6c, 0x6f, 0x63, 0x6b, 0x27, 0x20, 0x48, 0x2e, 0x6d, 0x6d, 0x3a,
+0x73, 0x73, 0x20, 0x28, 0x74, 0x29, 0x74, 0x20, 0x68, 0x3a, 0x6d, 0x6d, 0x3a, 0x73, 0x73, 0x20, 0x41, 0x50, 0x48, 0x3a,
+0x6d, 0x6d, 0x20, 0x27, 0x68, 0x6f, 0x64, 0x17a, 0x27, 0x2e
};
static const ushort months_data[] = {
@@ -2003,1825 +2013,1858 @@ static const ushort months_data[] = {
0x65, 0x3b, 0x41, 0x75, 0x67, 0x75, 0x73, 0x74, 0x75, 0x73, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72,
0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44, 0x65,
0x73, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x53, 0x68, 0x6b, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x50,
-0x72, 0x69, 0x3b, 0x4d, 0x61, 0x6a, 0x3b, 0x51, 0x65, 0x72, 0x3b, 0x4b, 0x6f, 0x72, 0x3b, 0x47, 0x73, 0x68, 0x3b, 0x53,
-0x68, 0x74, 0x3b, 0x54, 0x65, 0x74, 0x3b, 0x4e, 0xeb, 0x6e, 0x3b, 0x44, 0x68, 0x6a, 0x3b, 0x4a, 0x61, 0x6e, 0x61, 0x72,
-0x3b, 0x53, 0x68, 0x6b, 0x75, 0x72, 0x74, 0x3b, 0x4d, 0x61, 0x72, 0x73, 0x3b, 0x50, 0x72, 0x69, 0x6c, 0x6c, 0x3b, 0x4d,
-0x61, 0x6a, 0x3b, 0x51, 0x65, 0x72, 0x73, 0x68, 0x6f, 0x72, 0x3b, 0x4b, 0x6f, 0x72, 0x72, 0x69, 0x6b, 0x3b, 0x47, 0x75,
-0x73, 0x68, 0x74, 0x3b, 0x53, 0x68, 0x74, 0x61, 0x74, 0x6f, 0x72, 0x3b, 0x54, 0x65, 0x74, 0x6f, 0x72, 0x3b, 0x4e, 0xeb,
-0x6e, 0x74, 0x6f, 0x72, 0x3b, 0x44, 0x68, 0x6a, 0x65, 0x74, 0x6f, 0x72, 0x3b, 0x4a, 0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0x50,
-0x3b, 0x4d, 0x3b, 0x51, 0x3b, 0x4b, 0x3b, 0x47, 0x3b, 0x53, 0x3b, 0x54, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x6a, 0x61, 0x6e,
-0x3b, 0x73, 0x68, 0x6b, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x70, 0x72, 0x69, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x71, 0x65, 0x72,
-0x3b, 0x6b, 0x6f, 0x72, 0x3b, 0x67, 0x73, 0x68, 0x3b, 0x73, 0x68, 0x74, 0x3b, 0x74, 0x65, 0x74, 0x3b, 0x6e, 0xeb, 0x6e,
-0x3b, 0x64, 0x68, 0x6a, 0x3b, 0x6a, 0x61, 0x6e, 0x61, 0x72, 0x3b, 0x73, 0x68, 0x6b, 0x75, 0x72, 0x74, 0x3b, 0x6d, 0x61,
-0x72, 0x73, 0x3b, 0x70, 0x72, 0x69, 0x6c, 0x6c, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x71, 0x65, 0x72, 0x73, 0x68, 0x6f, 0x72,
-0x3b, 0x6b, 0x6f, 0x72, 0x72, 0x69, 0x6b, 0x3b, 0x67, 0x75, 0x73, 0x68, 0x74, 0x3b, 0x73, 0x68, 0x74, 0x61, 0x74, 0x6f,
-0x72, 0x3b, 0x74, 0x65, 0x74, 0x6f, 0x72, 0x3b, 0x6e, 0xeb, 0x6e, 0x74, 0x6f, 0x72, 0x3b, 0x64, 0x68, 0x6a, 0x65, 0x74,
-0x6f, 0x72, 0x3b, 0x6a, 0x3b, 0x73, 0x3b, 0x6d, 0x3b, 0x70, 0x3b, 0x6d, 0x3b, 0x71, 0x3b, 0x6b, 0x3b, 0x67, 0x3b, 0x73,
-0x3b, 0x74, 0x3b, 0x6e, 0x3b, 0x64, 0x3b, 0x1303, 0x1295, 0x12e9, 0x3b, 0x134c, 0x1265, 0x1229, 0x3b, 0x121b, 0x122d, 0x127d, 0x3b, 0x12a4,
-0x1355, 0x122a, 0x3b, 0x121c, 0x12ed, 0x3b, 0x1301, 0x1295, 0x3b, 0x1301, 0x120b, 0x12ed, 0x3b, 0x12a6, 0x1308, 0x1235, 0x3b, 0x1234, 0x1355, 0x1274,
-0x3b, 0x12a6, 0x12ad, 0x1276, 0x3b, 0x1296, 0x126c, 0x121d, 0x3b, 0x12f2, 0x1234, 0x121d, 0x3b, 0x1303, 0x1295, 0x12e9, 0x12c8, 0x122a, 0x3b, 0x134c,
-0x1265, 0x1229, 0x12c8, 0x122a, 0x3b, 0x121b, 0x122d, 0x127d, 0x3b, 0x12a4, 0x1355, 0x122a, 0x120d, 0x3b, 0x121c, 0x12ed, 0x3b, 0x1301, 0x1295, 0x3b,
-0x1301, 0x120b, 0x12ed, 0x3b, 0x12a6, 0x1308, 0x1235, 0x1275, 0x3b, 0x1234, 0x1355, 0x1274, 0x121d, 0x1260, 0x122d, 0x3b, 0x12a6, 0x12ad, 0x1276, 0x1260,
-0x122d, 0x3b, 0x1296, 0x126c, 0x121d, 0x1260, 0x122d, 0x3b, 0x12f2, 0x1234, 0x121d, 0x1260, 0x122d, 0x3b, 0x1303, 0x3b, 0x134c, 0x3b, 0x121b, 0x3b,
-0x12a4, 0x3b, 0x121c, 0x3b, 0x1301, 0x3b, 0x1301, 0x3b, 0x12a6, 0x3b, 0x1234, 0x3b, 0x12a6, 0x3b, 0x1296, 0x3b, 0x12f2, 0x3b, 0x64a, 0x646,
-0x627, 0x64a, 0x631, 0x3b, 0x641, 0x628, 0x631, 0x627, 0x64a, 0x631, 0x3b, 0x645, 0x627, 0x631, 0x633, 0x3b, 0x623, 0x628, 0x631, 0x64a,
-0x644, 0x3b, 0x645, 0x627, 0x64a, 0x648, 0x3b, 0x64a, 0x648, 0x646, 0x64a, 0x648, 0x3b, 0x64a, 0x648, 0x644, 0x64a, 0x648, 0x3b, 0x623,
-0x63a, 0x633, 0x637, 0x633, 0x3b, 0x633, 0x628, 0x62a, 0x645, 0x628, 0x631, 0x3b, 0x623, 0x643, 0x62a, 0x648, 0x628, 0x631, 0x3b, 0x646,
-0x648, 0x641, 0x645, 0x628, 0x631, 0x3b, 0x62f, 0x64a, 0x633, 0x645, 0x628, 0x631, 0x3b, 0x64a, 0x3b, 0x641, 0x3b, 0x645, 0x3b, 0x623,
-0x3b, 0x648, 0x3b, 0x646, 0x3b, 0x644, 0x3b, 0x63a, 0x3b, 0x633, 0x3b, 0x643, 0x3b, 0x628, 0x3b, 0x62f, 0x3b, 0x62c, 0x627, 0x646,
-0x641, 0x64a, 0x3b, 0x641, 0x64a, 0x641, 0x631, 0x64a, 0x3b, 0x645, 0x627, 0x631, 0x633, 0x3b, 0x623, 0x641, 0x631, 0x64a, 0x644, 0x3b,
-0x645, 0x627, 0x64a, 0x3b, 0x62c, 0x648, 0x627, 0x646, 0x3b, 0x62c, 0x648, 0x64a, 0x644, 0x64a, 0x629, 0x3b, 0x623, 0x648, 0x62a, 0x3b,
-0x633, 0x628, 0x62a, 0x645, 0x628, 0x631, 0x3b, 0x623, 0x643, 0x62a, 0x648, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x641, 0x645, 0x628, 0x631,
-0x3b, 0x62f, 0x64a, 0x633, 0x645, 0x628, 0x631, 0x3b, 0x62c, 0x3b, 0x641, 0x3b, 0x645, 0x3b, 0x623, 0x3b, 0x645, 0x3b, 0x62c, 0x3b,
-0x62c, 0x3b, 0x623, 0x3b, 0x633, 0x3b, 0x623, 0x3b, 0x646, 0x3b, 0x62f, 0x3b, 0x643, 0x627, 0x646, 0x648, 0x646, 0x20, 0x627, 0x644,
-0x62b, 0x627, 0x646, 0x64a, 0x3b, 0x634, 0x628, 0x627, 0x637, 0x3b, 0x622, 0x630, 0x627, 0x631, 0x3b, 0x646, 0x64a, 0x633, 0x627, 0x646,
-0x3b, 0x623, 0x64a, 0x627, 0x631, 0x3b, 0x62d, 0x632, 0x64a, 0x631, 0x627, 0x646, 0x3b, 0x62a, 0x645, 0x648, 0x632, 0x3b, 0x622, 0x628,
-0x3b, 0x623, 0x64a, 0x644, 0x648, 0x644, 0x3b, 0x62a, 0x634, 0x631, 0x64a, 0x646, 0x20, 0x627, 0x644, 0x623, 0x648, 0x644, 0x3b, 0x62a,
-0x634, 0x631, 0x64a, 0x646, 0x20, 0x627, 0x644, 0x62b, 0x627, 0x646, 0x64a, 0x3b, 0x643, 0x627, 0x646, 0x648, 0x646, 0x20, 0x627, 0x644,
-0x623, 0x648, 0x644, 0x3b, 0x643, 0x3b, 0x634, 0x3b, 0x622, 0x3b, 0x646, 0x3b, 0x623, 0x3b, 0x62d, 0x3b, 0x62a, 0x3b, 0x622, 0x3b,
-0x623, 0x3b, 0x62a, 0x3b, 0x62a, 0x3b, 0x643, 0x3b, 0x643, 0x627, 0x646, 0x648, 0x646, 0x20, 0x627, 0x644, 0x62b, 0x627, 0x646, 0x64a,
-0x3b, 0x634, 0x628, 0x627, 0x637, 0x3b, 0x622, 0x630, 0x627, 0x631, 0x3b, 0x646, 0x64a, 0x633, 0x627, 0x646, 0x3b, 0x623, 0x64a, 0x627,
-0x631, 0x3b, 0x62d, 0x632, 0x64a, 0x631, 0x627, 0x646, 0x3b, 0x62a, 0x645, 0x648, 0x632, 0x3b, 0x622, 0x628, 0x3b, 0x623, 0x64a, 0x644,
-0x648, 0x644, 0x3b, 0x62a, 0x634, 0x631, 0x6cc, 0x646, 0x20, 0x627, 0x644, 0x623, 0x648, 0x644, 0x3b, 0x62a, 0x634, 0x631, 0x64a, 0x646,
-0x20, 0x627, 0x644, 0x62b, 0x627, 0x646, 0x64a, 0x3b, 0x643, 0x627, 0x646, 0x648, 0x646, 0x20, 0x627, 0x644, 0x623, 0x648, 0x644, 0x3b,
-0x64a, 0x646, 0x627, 0x64a, 0x631, 0x3b, 0x641, 0x628, 0x631, 0x627, 0x64a, 0x631, 0x3b, 0x645, 0x627, 0x631, 0x633, 0x3b, 0x625, 0x628,
-0x631, 0x64a, 0x644, 0x3b, 0x645, 0x627, 0x64a, 0x648, 0x3b, 0x64a, 0x648, 0x646, 0x64a, 0x648, 0x3b, 0x64a, 0x648, 0x644, 0x64a, 0x648,
-0x3b, 0x623, 0x63a, 0x634, 0x62a, 0x3b, 0x634, 0x62a, 0x645, 0x628, 0x631, 0x3b, 0x623, 0x643, 0x62a, 0x648, 0x628, 0x631, 0x3b, 0x646,
-0x648, 0x641, 0x645, 0x628, 0x631, 0x3b, 0x62f, 0x62c, 0x645, 0x628, 0x631, 0x3b, 0x64a, 0x3b, 0x641, 0x3b, 0x645, 0x3b, 0x625, 0x3b,
-0x648, 0x3b, 0x646, 0x3b, 0x644, 0x3b, 0x63a, 0x3b, 0x634, 0x3b, 0x643, 0x3b, 0x628, 0x3b, 0x62f, 0x3b, 0x64a, 0x646, 0x627, 0x64a,
-0x631, 0x3b, 0x641, 0x628, 0x631, 0x627, 0x64a, 0x631, 0x3b, 0x645, 0x627, 0x631, 0x633, 0x3b, 0x623, 0x628, 0x631, 0x64a, 0x644, 0x3b,
-0x645, 0x627, 0x64a, 0x3b, 0x64a, 0x648, 0x646, 0x64a, 0x648, 0x3b, 0x64a, 0x648, 0x644, 0x64a, 0x648, 0x632, 0x3b, 0x63a, 0x634, 0x62a,
-0x3b, 0x634, 0x62a, 0x646, 0x628, 0x631, 0x3b, 0x623, 0x643, 0x62a, 0x648, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x646, 0x628, 0x631, 0x3b,
-0x62f, 0x62c, 0x646, 0x628, 0x631, 0x3b, 0x64a, 0x3b, 0x641, 0x3b, 0x645, 0x3b, 0x623, 0x3b, 0x645, 0x3b, 0x646, 0x3b, 0x644, 0x3b,
-0x63a, 0x3b, 0x634, 0x3b, 0x643, 0x3b, 0x628, 0x3b, 0x62f, 0x3b, 0x570, 0x576, 0x57e, 0x3b, 0x583, 0x57f, 0x57e, 0x3b, 0x574, 0x580,
-0x57f, 0x3b, 0x561, 0x57a, 0x580, 0x3b, 0x574, 0x575, 0x57d, 0x3b, 0x570, 0x576, 0x57d, 0x3b, 0x570, 0x56c, 0x57d, 0x3b, 0x585, 0x563,
-0x57d, 0x3b, 0x57d, 0x565, 0x57a, 0x3b, 0x570, 0x578, 0x56f, 0x3b, 0x576, 0x578, 0x575, 0x3b, 0x564, 0x565, 0x56f, 0x3b, 0x570, 0x578,
-0x582, 0x576, 0x57e, 0x561, 0x580, 0x3b, 0x583, 0x565, 0x57f, 0x580, 0x57e, 0x561, 0x580, 0x3b, 0x574, 0x561, 0x580, 0x57f, 0x3b, 0x561,
-0x57a, 0x580, 0x56b, 0x56c, 0x3b, 0x574, 0x561, 0x575, 0x56b, 0x57d, 0x3b, 0x570, 0x578, 0x582, 0x576, 0x56b, 0x57d, 0x3b, 0x570, 0x578,
-0x582, 0x56c, 0x56b, 0x57d, 0x3b, 0x585, 0x563, 0x578, 0x57d, 0x57f, 0x578, 0x57d, 0x3b, 0x57d, 0x565, 0x57a, 0x57f, 0x565, 0x574, 0x562,
-0x565, 0x580, 0x3b, 0x570, 0x578, 0x56f, 0x57f, 0x565, 0x574, 0x562, 0x565, 0x580, 0x3b, 0x576, 0x578, 0x575, 0x565, 0x574, 0x562, 0x565,
-0x580, 0x3b, 0x564, 0x565, 0x56f, 0x57f, 0x565, 0x574, 0x562, 0x565, 0x580, 0x3b, 0x540, 0x3b, 0x553, 0x3b, 0x544, 0x3b, 0x531, 0x3b,
-0x544, 0x3b, 0x540, 0x3b, 0x540, 0x3b, 0x555, 0x3b, 0x54d, 0x3b, 0x540, 0x3b, 0x546, 0x3b, 0x534, 0x3b, 0x570, 0x578, 0x582, 0x576,
-0x57e, 0x561, 0x580, 0x56b, 0x3b, 0x583, 0x565, 0x57f, 0x580, 0x57e, 0x561, 0x580, 0x56b, 0x3b, 0x574, 0x561, 0x580, 0x57f, 0x56b, 0x3b,
-0x561, 0x57a, 0x580, 0x56b, 0x56c, 0x56b, 0x3b, 0x574, 0x561, 0x575, 0x56b, 0x57d, 0x56b, 0x3b, 0x570, 0x578, 0x582, 0x576, 0x56b, 0x57d,
-0x56b, 0x3b, 0x570, 0x578, 0x582, 0x56c, 0x56b, 0x57d, 0x56b, 0x3b, 0x585, 0x563, 0x578, 0x57d, 0x57f, 0x578, 0x57d, 0x56b, 0x3b, 0x57d,
-0x565, 0x57a, 0x57f, 0x565, 0x574, 0x562, 0x565, 0x580, 0x56b, 0x3b, 0x570, 0x578, 0x56f, 0x57f, 0x565, 0x574, 0x562, 0x565, 0x580, 0x56b,
-0x3b, 0x576, 0x578, 0x575, 0x565, 0x574, 0x562, 0x565, 0x580, 0x56b, 0x3b, 0x564, 0x565, 0x56f, 0x57f, 0x565, 0x574, 0x562, 0x565, 0x580,
-0x56b, 0x3b, 0x99c, 0x9be, 0x9a8, 0x9c1, 0x3b, 0x9ab, 0x9c7, 0x9ac, 0x9cd, 0x9f0, 0x9c1, 0x3b, 0x9ae, 0x9be, 0x9f0, 0x9cd, 0x99a, 0x3b,
-0x98f, 0x9aa, 0x9cd, 0x9f0, 0x9bf, 0x9b2, 0x3b, 0x9ae, 0x9c7, 0x3b, 0x99c, 0x9c1, 0x9a8, 0x3b, 0x99c, 0x9c1, 0x9b2, 0x9be, 0x987, 0x3b,
-0x986, 0x997, 0x3b, 0x9b8, 0x9c7, 0x9aa, 0x9cd, 0x99f, 0x3b, 0x985, 0x995, 0x9cd, 0x99f, 0x9cb, 0x3b, 0x9a8, 0x9ad, 0x9c7, 0x3b, 0x9a1,
-0x9bf, 0x9b8, 0x9c7, 0x3b, 0x99c, 0x9be, 0x9a8, 0x9c1, 0x9f1, 0x9be, 0x9f0, 0x9c0, 0x3b, 0x9ab, 0x9c7, 0x9ac, 0x9cd, 0x9f0, 0x9c1, 0x9f1,
-0x9be, 0x9f0, 0x9c0, 0x3b, 0x9ae, 0x9be, 0x9f0, 0x9cd, 0x99a, 0x3b, 0x98f, 0x9aa, 0x9cd, 0x9f0, 0x9bf, 0x9b2, 0x3b, 0x9ae, 0x9c7, 0x3b,
-0x99c, 0x9c1, 0x9a8, 0x3b, 0x99c, 0x9c1, 0x9b2, 0x9be, 0x987, 0x3b, 0x986, 0x997, 0x9b7, 0x9cd, 0x99f, 0x3b, 0x99b, 0x9c7, 0x9aa, 0x9cd,
-0x9a4, 0x9c7, 0x9ae, 0x9cd, 0x9ac, 0x9f0, 0x3b, 0x985, 0x995, 0x9cd, 0x99f, 0x9cb, 0x9ac, 0x9f0, 0x3b, 0x9a8, 0x9f1, 0x9c7, 0x9ae, 0x9cd,
-0x9ac, 0x9f0, 0x3b, 0x9a1, 0x9bf, 0x99a, 0x9c7, 0x9ae, 0x9cd, 0x9ac, 0x9f0, 0x3b, 0x79, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x76, 0x3b,
-0x6d, 0x61, 0x72, 0x3b, 0x61, 0x70, 0x72, 0x3b, 0x6d, 0x61, 0x79, 0x3b, 0x69, 0x79, 0x6e, 0x3b, 0x69, 0x79, 0x6c, 0x3b,
-0x61, 0x76, 0x71, 0x3b, 0x73, 0x65, 0x6e, 0x3b, 0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x79, 0x3b, 0x64, 0x65, 0x6b, 0x3b,
-0x59, 0x61, 0x6e, 0x76, 0x61, 0x72, 0x3b, 0x46, 0x65, 0x76, 0x72, 0x61, 0x6c, 0x3b, 0x4d, 0x61, 0x72, 0x74, 0x3b, 0x41,
-0x70, 0x72, 0x65, 0x6c, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x130, 0x79, 0x75, 0x6e, 0x3b, 0x130, 0x79, 0x75, 0x6c, 0x3b, 0x41,
-0x76, 0x71, 0x75, 0x73, 0x74, 0x3b, 0x53, 0x65, 0x6e, 0x74, 0x79, 0x61, 0x62, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x79, 0x61,
-0x62, 0x72, 0x3b, 0x4e, 0x6f, 0x79, 0x61, 0x62, 0x72, 0x3b, 0x44, 0x65, 0x6b, 0x61, 0x62, 0x72, 0x3b, 0x79, 0x61, 0x6e,
-0x76, 0x61, 0x72, 0x3b, 0x66, 0x65, 0x76, 0x72, 0x61, 0x6c, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x3b, 0x61, 0x70, 0x72, 0x65,
-0x6c, 0x3b, 0x6d, 0x61, 0x79, 0x3b, 0x69, 0x79, 0x75, 0x6e, 0x3b, 0x69, 0x79, 0x75, 0x6c, 0x3b, 0x61, 0x76, 0x71, 0x75,
-0x73, 0x74, 0x3b, 0x73, 0x65, 0x6e, 0x74, 0x79, 0x61, 0x62, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0x79, 0x61, 0x62, 0x72, 0x3b,
-0x6e, 0x6f, 0x79, 0x61, 0x62, 0x72, 0x3b, 0x64, 0x65, 0x6b, 0x61, 0x62, 0x72, 0x3b, 0x458, 0x430, 0x43d, 0x3b, 0x444, 0x435,
-0x432, 0x3b, 0x43c, 0x430, 0x440, 0x3b, 0x430, 0x43f, 0x440, 0x3b, 0x43c, 0x430, 0x439, 0x3b, 0x438, 0x458, 0x43d, 0x3b, 0x438, 0x458,
-0x43b, 0x3b, 0x430, 0x432, 0x433, 0x3b, 0x441, 0x435, 0x43d, 0x3b, 0x43e, 0x43a, 0x442, 0x3b, 0x43d, 0x43e, 0x458, 0x3b, 0x434, 0x435,
-0x43a, 0x3b, 0x408, 0x430, 0x43d, 0x432, 0x430, 0x440, 0x3b, 0x424, 0x435, 0x432, 0x440, 0x430, 0x43b, 0x3b, 0x41c, 0x430, 0x440, 0x442,
-0x3b, 0x410, 0x43f, 0x440, 0x435, 0x43b, 0x3b, 0x41c, 0x430, 0x439, 0x3b, 0x418, 0x458, 0x443, 0x43d, 0x3b, 0x418, 0x458, 0x443, 0x43b,
-0x3b, 0x410, 0x432, 0x433, 0x443, 0x441, 0x442, 0x3b, 0x421, 0x435, 0x43d, 0x442, 0x458, 0x430, 0x431, 0x440, 0x3b, 0x41e, 0x43a, 0x442,
-0x458, 0x430, 0x431, 0x440, 0x3b, 0x41d, 0x43e, 0x458, 0x430, 0x431, 0x440, 0x3b, 0x414, 0x435, 0x43a, 0x430, 0x431, 0x440, 0x3b, 0x458,
-0x430, 0x43d, 0x432, 0x430, 0x440, 0x3b, 0x444, 0x435, 0x432, 0x440, 0x430, 0x43b, 0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430, 0x43f,
-0x440, 0x435, 0x43b, 0x3b, 0x43c, 0x430, 0x439, 0x3b, 0x438, 0x458, 0x443, 0x43d, 0x3b, 0x438, 0x458, 0x443, 0x43b, 0x3b, 0x430, 0x432,
-0x433, 0x443, 0x441, 0x442, 0x3b, 0x441, 0x435, 0x43d, 0x442, 0x458, 0x430, 0x431, 0x440, 0x3b, 0x43e, 0x43a, 0x442, 0x458, 0x430, 0x431,
-0x440, 0x3b, 0x43d, 0x43e, 0x458, 0x430, 0x431, 0x440, 0x3b, 0x434, 0x435, 0x43a, 0x430, 0x431, 0x440, 0x3b, 0x75, 0x72, 0x74, 0x2e,
-0x3b, 0x6f, 0x74, 0x73, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x2e, 0x3b, 0x61, 0x70, 0x69, 0x2e, 0x3b, 0x6d, 0x61, 0x69, 0x2e,
-0x3b, 0x65, 0x6b, 0x61, 0x2e, 0x3b, 0x75, 0x7a, 0x74, 0x2e, 0x3b, 0x61, 0x62, 0x75, 0x2e, 0x3b, 0x69, 0x72, 0x61, 0x2e,
-0x3b, 0x75, 0x72, 0x72, 0x2e, 0x3b, 0x61, 0x7a, 0x61, 0x2e, 0x3b, 0x61, 0x62, 0x65, 0x2e, 0x3b, 0x75, 0x72, 0x74, 0x61,
-0x72, 0x72, 0x69, 0x6c, 0x61, 0x3b, 0x4f, 0x74, 0x73, 0x61, 0x69, 0x6c, 0x61, 0x3b, 0x4d, 0x61, 0x72, 0x74, 0x78, 0x6f,
-0x61, 0x3b, 0x41, 0x70, 0x69, 0x72, 0x69, 0x6c, 0x61, 0x3b, 0x4d, 0x61, 0x69, 0x61, 0x74, 0x7a, 0x61, 0x3b, 0x45, 0x6b,
-0x61, 0x69, 0x6e, 0x61, 0x3b, 0x55, 0x7a, 0x74, 0x61, 0x69, 0x6c, 0x61, 0x3b, 0x41, 0x62, 0x75, 0x7a, 0x74, 0x75, 0x61,
-0x3b, 0x49, 0x72, 0x61, 0x69, 0x6c, 0x61, 0x3b, 0x55, 0x72, 0x72, 0x69, 0x61, 0x3b, 0x41, 0x7a, 0x61, 0x72, 0x6f, 0x61,
-0x3b, 0x41, 0x62, 0x65, 0x6e, 0x64, 0x75, 0x61, 0x3b, 0x55, 0x3b, 0x4f, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x45,
-0x3b, 0x55, 0x3b, 0x41, 0x3b, 0x49, 0x3b, 0x55, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x75, 0x72, 0x74, 0x61, 0x72, 0x72, 0x69,
-0x6c, 0x61, 0x3b, 0x6f, 0x74, 0x73, 0x61, 0x69, 0x6c, 0x61, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x78, 0x6f, 0x61, 0x3b, 0x61,
-0x70, 0x69, 0x72, 0x69, 0x6c, 0x61, 0x3b, 0x6d, 0x61, 0x69, 0x61, 0x74, 0x7a, 0x61, 0x3b, 0x65, 0x6b, 0x61, 0x69, 0x6e,
-0x61, 0x3b, 0x75, 0x7a, 0x74, 0x61, 0x69, 0x6c, 0x61, 0x3b, 0x61, 0x62, 0x75, 0x7a, 0x74, 0x75, 0x61, 0x3b, 0x69, 0x72,
-0x61, 0x69, 0x6c, 0x61, 0x3b, 0x75, 0x72, 0x72, 0x69, 0x61, 0x3b, 0x61, 0x7a, 0x61, 0x72, 0x6f, 0x61, 0x3b, 0x61, 0x62,
-0x65, 0x6e, 0x64, 0x75, 0x61, 0x3b, 0x99c, 0x9be, 0x9a8, 0x9c1, 0x9af, 0x9bc, 0x9be, 0x9b0, 0x9c0, 0x3b, 0x9ab, 0x9c7, 0x9ac, 0x9cd,
-0x9b0, 0x9c1, 0x9af, 0x9bc, 0x9be, 0x9b0, 0x9c0, 0x3b, 0x9ae, 0x9be, 0x9b0, 0x9cd, 0x99a, 0x3b, 0x98f, 0x9aa, 0x9cd, 0x9b0, 0x9bf, 0x9b2,
-0x3b, 0x9ae, 0x9c7, 0x3b, 0x99c, 0x9c1, 0x9a8, 0x3b, 0x99c, 0x9c1, 0x9b2, 0x9be, 0x987, 0x3b, 0x986, 0x997, 0x9b8, 0x9cd, 0x99f, 0x3b,
-0x9b8, 0x9c7, 0x9aa, 0x9cd, 0x99f, 0x9c7, 0x9ae, 0x9cd, 0x9ac, 0x9b0, 0x3b, 0x985, 0x995, 0x9cd, 0x99f, 0x9cb, 0x9ac, 0x9b0, 0x3b, 0x9a8,
-0x9ad, 0x9c7, 0x9ae, 0x9cd, 0x9ac, 0x9b0, 0x3b, 0x9a1, 0x9bf, 0x9b8, 0x9c7, 0x9ae, 0x9cd, 0x9ac, 0x9b0, 0x3b, 0x99c, 0x9be, 0x3b, 0x9ab,
-0x9c7, 0x3b, 0x9ae, 0x9be, 0x3b, 0x98f, 0x3b, 0x9ae, 0x9c7, 0x3b, 0x99c, 0x9c1, 0x9a8, 0x3b, 0x99c, 0x9c1, 0x3b, 0x986, 0x3b, 0x9b8,
-0x9c7, 0x3b, 0x985, 0x3b, 0x9a8, 0x3b, 0x9a1, 0x9bf, 0x3b, 0x99c, 0x9be, 0x9a8, 0x9c1, 0x3b, 0x9ab, 0x9c7, 0x9ac, 0x3b, 0x9ae, 0x9be,
-0x9b0, 0x9cd, 0x99a, 0x3b, 0x98f, 0x9aa, 0x9cd, 0x9b0, 0x9bf, 0x9b2, 0x3b, 0x9ae, 0x9c7, 0x3b, 0x99c, 0x9c1, 0x9a8, 0x3b, 0x99c, 0x9c1,
-0x9b2, 0x9be, 0x987, 0x3b, 0x986, 0x997, 0x9b8, 0x9cd, 0x99f, 0x3b, 0x9b8, 0x9c7, 0x9aa, 0x9cd, 0x99f, 0x9c7, 0x9ae, 0x9cd, 0x9ac, 0x9b0,
-0x3b, 0x985, 0x995, 0x9cd, 0x99f, 0x9cb, 0x9ac, 0x9b0, 0x3b, 0x9a8, 0x9ad, 0x9c7, 0x9ae, 0x9cd, 0x9ac, 0x9b0, 0x3b, 0x9a1, 0x9bf, 0x9b8,
-0x9c7, 0x9ae, 0x9cd, 0x9ac, 0x9b0, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf21, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf22, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf23,
-0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf24, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf25, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf26, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf27,
-0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf28, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf29, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf21, 0xf20, 0x3b, 0xf5f, 0xfb3, 0xf0b,
-0xf21, 0xf21, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf21, 0xf22, 0x3b, 0xf66, 0xfa4, 0xfb1, 0xf72, 0xf0b, 0xf5f, 0xfb3, 0xf0b, 0xf51, 0xf44, 0xf54,
-0xf0b, 0x3b, 0xf66, 0xfa4, 0xfb1, 0xf72, 0xf0b, 0xf5f, 0xfb3, 0xf0b, 0xf42, 0xf49, 0xf72, 0xf66, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf66, 0xfa4,
-0xfb1, 0xf72, 0xf0b, 0xf5f, 0xfb3, 0xf0b, 0xf42, 0xf66, 0xf74, 0xf58, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf66, 0xfa4, 0xfb1, 0xf72, 0xf0b, 0xf5f,
-0xfb3, 0xf0b, 0xf56, 0xf5e, 0xf72, 0xf0b, 0xf54, 0x3b, 0xf66, 0xfa4, 0xfb1, 0xf72, 0xf0b, 0xf5f, 0xfb3, 0xf0b, 0xf63, 0xf94, 0xf0b, 0xf54,
-0xf0b, 0x3b, 0xf66, 0xfa4, 0xfb1, 0xf72, 0xf0b, 0xf5f, 0xfb3, 0xf0b, 0xf51, 0xfb2, 0xf74, 0xf42, 0xf0b, 0xf54, 0x3b, 0xf66, 0xfa4, 0xfb1,
-0xf72, 0xf0b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf51, 0xf74, 0xf53, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf66, 0xfa4, 0xfb1, 0xf72, 0xf0b, 0xf5f, 0xfb3,
-0xf0b, 0xf56, 0xf62, 0xf92, 0xfb1, 0xf51, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf66, 0xfa4, 0xfb1, 0xf72, 0xf0b, 0xf5f, 0xfb3, 0xf0b, 0xf51, 0xf42,
-0xf74, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf66, 0xfa4, 0xfb1, 0xf72, 0xf0b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf54, 0xf0b, 0x3b,
-0xf66, 0xfa4, 0xfb1, 0xf72, 0xf0b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf42, 0xf45, 0xf72, 0xf42, 0xf0b, 0xf54, 0xf0b, 0x3b,
-0xf66, 0xfa4, 0xfb1, 0xf72, 0xf0b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf42, 0xf49, 0xf72, 0xf66, 0xf0b, 0xf54, 0xf0b, 0x3b,
-0xf21, 0x3b, 0xf22, 0x3b, 0xf23, 0x3b, 0xf24, 0x3b, 0xf25, 0x3b, 0xf26, 0x3b, 0xf27, 0x3b, 0xf28, 0x3b, 0xf29, 0x3b, 0xf21, 0xf20,
-0x3b, 0xf21, 0xf21, 0x3b, 0xf21, 0xf22, 0x3b, 0xf21, 0x3b, 0xf22, 0x3b, 0xf23, 0x3b, 0xf24, 0x3b, 0xf25, 0x3b, 0xf26, 0x3b, 0xf27,
-0x3b, 0xf28, 0x3b, 0xf29, 0x3b, 0xf21, 0xf20, 0x3b, 0xf21, 0xf21, 0x3b, 0x31, 0x32, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf51, 0xf44, 0xf54,
-0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf42, 0xf49, 0xf72, 0xf66, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf42, 0xf66, 0xf74, 0xf58,
-0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf5e, 0xf72, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf63, 0xf94, 0xf0b,
-0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf51, 0xfb2, 0xf74, 0xf42, 0xf0b, 0xf54, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf51, 0xf74, 0xf53,
-0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf62, 0xf92, 0xfb1, 0xf51, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf51,
-0xf42, 0xf74, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56,
-0xf45, 0xf74, 0xf0b, 0xf42, 0xf45, 0xf72, 0xf42, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf42, 0xf49,
-0xf72, 0xf66, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf21, 0x3b, 0xf22, 0x3b, 0xf23, 0x3b, 0x34, 0x3b, 0xf25, 0x3b, 0xf26, 0x3b, 0xf27, 0x3b,
-0xf28, 0x3b, 0x39, 0x3b, 0xf21, 0xf20, 0x3b, 0xf21, 0xf21, 0x3b, 0xf21, 0xf22, 0x3b, 0x47, 0x65, 0x6e, 0x2e, 0x3b, 0x43, 0x2bc,
-0x68, 0x77, 0x65, 0x2e, 0x3b, 0x4d, 0x65, 0x75, 0x72, 0x2e, 0x3b, 0x45, 0x62, 0x72, 0x2e, 0x3b, 0x4d, 0x61, 0x65, 0x3b,
-0x4d, 0x65, 0x7a, 0x68, 0x2e, 0x3b, 0x47, 0x6f, 0x75, 0x65, 0x2e, 0x3b, 0x45, 0x6f, 0x73, 0x74, 0x3b, 0x47, 0x77, 0x65,
-0x6e, 0x2e, 0x3b, 0x48, 0x65, 0x72, 0x65, 0x3b, 0x44, 0x75, 0x3b, 0x4b, 0x65, 0x72, 0x2e, 0x3b, 0x47, 0x65, 0x6e, 0x76,
-0x65, 0x72, 0x3b, 0x43, 0x2bc, 0x68, 0x77, 0x65, 0x76, 0x72, 0x65, 0x72, 0x3b, 0x4d, 0x65, 0x75, 0x72, 0x7a, 0x68, 0x3b,
-0x45, 0x62, 0x72, 0x65, 0x6c, 0x3b, 0x4d, 0x61, 0x65, 0x3b, 0x4d, 0x65, 0x7a, 0x68, 0x65, 0x76, 0x65, 0x6e, 0x3b, 0x47,
-0x6f, 0x75, 0x65, 0x72, 0x65, 0x3b, 0x45, 0x6f, 0x73, 0x74, 0x3b, 0x47, 0x77, 0x65, 0x6e, 0x67, 0x6f, 0x6c, 0x6f, 0x3b,
-0x48, 0x65, 0x72, 0x65, 0x3b, 0x44, 0x75, 0x3b, 0x4b, 0x65, 0x72, 0x7a, 0x75, 0x3b, 0x30, 0x31, 0x3b, 0x30, 0x32, 0x3b,
-0x30, 0x33, 0x3b, 0x30, 0x34, 0x3b, 0x30, 0x35, 0x3b, 0x30, 0x36, 0x3b, 0x30, 0x37, 0x3b, 0x30, 0x38, 0x3b, 0x30, 0x39,
-0x3b, 0x31, 0x30, 0x3b, 0x31, 0x31, 0x3b, 0x31, 0x32, 0x3b, 0x47, 0x65, 0x6e, 0x2e, 0x3b, 0x43, 0x2bc, 0x68, 0x77, 0x65,
+0x72, 0x69, 0x3b, 0x4d, 0x61, 0x6a, 0x3b, 0x51, 0x65, 0x72, 0x3b, 0x4b, 0x6f, 0x72, 0x72, 0x3b, 0x47, 0x75, 0x73, 0x68,
+0x3b, 0x53, 0x68, 0x74, 0x3b, 0x54, 0x65, 0x74, 0x3b, 0x4e, 0xeb, 0x6e, 0x3b, 0x44, 0x68, 0x6a, 0x3b, 0x4a, 0x61, 0x6e,
+0x61, 0x72, 0x3b, 0x53, 0x68, 0x6b, 0x75, 0x72, 0x74, 0x3b, 0x4d, 0x61, 0x72, 0x73, 0x3b, 0x50, 0x72, 0x69, 0x6c, 0x6c,
+0x3b, 0x4d, 0x61, 0x6a, 0x3b, 0x51, 0x65, 0x72, 0x73, 0x68, 0x6f, 0x72, 0x3b, 0x4b, 0x6f, 0x72, 0x72, 0x69, 0x6b, 0x3b,
+0x47, 0x75, 0x73, 0x68, 0x74, 0x3b, 0x53, 0x68, 0x74, 0x61, 0x74, 0x6f, 0x72, 0x3b, 0x54, 0x65, 0x74, 0x6f, 0x72, 0x3b,
+0x4e, 0xeb, 0x6e, 0x74, 0x6f, 0x72, 0x3b, 0x44, 0x68, 0x6a, 0x65, 0x74, 0x6f, 0x72, 0x3b, 0x4a, 0x3b, 0x53, 0x68, 0x3b,
+0x4d, 0x3b, 0x50, 0x3b, 0x4d, 0x3b, 0x51, 0x3b, 0x4b, 0x3b, 0x47, 0x3b, 0x53, 0x68, 0x3b, 0x54, 0x3b, 0x4e, 0x3b, 0x44,
+0x68, 0x3b, 0x6a, 0x61, 0x6e, 0x3b, 0x73, 0x68, 0x6b, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x70, 0x72, 0x69, 0x3b, 0x6d, 0x61,
+0x6a, 0x3b, 0x71, 0x65, 0x72, 0x3b, 0x6b, 0x6f, 0x72, 0x72, 0x3b, 0x67, 0x75, 0x73, 0x68, 0x3b, 0x73, 0x68, 0x74, 0x3b,
+0x74, 0x65, 0x74, 0x3b, 0x6e, 0xeb, 0x6e, 0x3b, 0x64, 0x68, 0x6a, 0x3b, 0x6a, 0x61, 0x6e, 0x61, 0x72, 0x3b, 0x73, 0x68,
+0x6b, 0x75, 0x72, 0x74, 0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b, 0x70, 0x72, 0x69, 0x6c, 0x6c, 0x3b, 0x6d, 0x61, 0x6a, 0x3b,
+0x71, 0x65, 0x72, 0x73, 0x68, 0x6f, 0x72, 0x3b, 0x6b, 0x6f, 0x72, 0x72, 0x69, 0x6b, 0x3b, 0x67, 0x75, 0x73, 0x68, 0x74,
+0x3b, 0x73, 0x68, 0x74, 0x61, 0x74, 0x6f, 0x72, 0x3b, 0x74, 0x65, 0x74, 0x6f, 0x72, 0x3b, 0x6e, 0xeb, 0x6e, 0x74, 0x6f,
+0x72, 0x3b, 0x64, 0x68, 0x6a, 0x65, 0x74, 0x6f, 0x72, 0x3b, 0x6a, 0x3b, 0x73, 0x68, 0x3b, 0x6d, 0x3b, 0x70, 0x3b, 0x6d,
+0x3b, 0x71, 0x3b, 0x6b, 0x3b, 0x67, 0x3b, 0x73, 0x68, 0x3b, 0x74, 0x3b, 0x6e, 0x3b, 0x64, 0x68, 0x3b, 0x1303, 0x1295, 0x12e9,
+0x3b, 0x134c, 0x1265, 0x1229, 0x3b, 0x121b, 0x122d, 0x127d, 0x3b, 0x12a4, 0x1355, 0x122a, 0x3b, 0x121c, 0x12ed, 0x3b, 0x1301, 0x1295, 0x3b, 0x1301,
+0x120b, 0x12ed, 0x3b, 0x12a6, 0x1308, 0x1235, 0x3b, 0x1234, 0x1355, 0x1274, 0x3b, 0x12a6, 0x12ad, 0x1276, 0x3b, 0x1296, 0x126c, 0x121d, 0x3b, 0x12f2,
+0x1234, 0x121d, 0x3b, 0x1303, 0x1295, 0x12e9, 0x12c8, 0x122a, 0x3b, 0x134c, 0x1265, 0x1229, 0x12c8, 0x122a, 0x3b, 0x121b, 0x122d, 0x127d, 0x3b, 0x12a4,
+0x1355, 0x122a, 0x120d, 0x3b, 0x121c, 0x12ed, 0x3b, 0x1301, 0x1295, 0x3b, 0x1301, 0x120b, 0x12ed, 0x3b, 0x12a6, 0x1308, 0x1235, 0x1275, 0x3b, 0x1234,
+0x1355, 0x1274, 0x121d, 0x1260, 0x122d, 0x3b, 0x12a6, 0x12ad, 0x1276, 0x1260, 0x122d, 0x3b, 0x1296, 0x126c, 0x121d, 0x1260, 0x122d, 0x3b, 0x12f2, 0x1234,
+0x121d, 0x1260, 0x122d, 0x3b, 0x1303, 0x3b, 0x134c, 0x3b, 0x121b, 0x3b, 0x12a4, 0x3b, 0x121c, 0x3b, 0x1301, 0x3b, 0x1301, 0x3b, 0x12a6, 0x3b,
+0x1234, 0x3b, 0x12a6, 0x3b, 0x1296, 0x3b, 0x12f2, 0x3b, 0x64a, 0x646, 0x627, 0x64a, 0x631, 0x3b, 0x641, 0x628, 0x631, 0x627, 0x64a, 0x631,
+0x3b, 0x645, 0x627, 0x631, 0x633, 0x3b, 0x623, 0x628, 0x631, 0x64a, 0x644, 0x3b, 0x645, 0x627, 0x64a, 0x648, 0x3b, 0x64a, 0x648, 0x646,
+0x64a, 0x648, 0x3b, 0x64a, 0x648, 0x644, 0x64a, 0x648, 0x3b, 0x623, 0x63a, 0x633, 0x637, 0x633, 0x3b, 0x633, 0x628, 0x62a, 0x645, 0x628,
+0x631, 0x3b, 0x623, 0x643, 0x62a, 0x648, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x641, 0x645, 0x628, 0x631, 0x3b, 0x62f, 0x64a, 0x633, 0x645,
+0x628, 0x631, 0x3b, 0x64a, 0x3b, 0x641, 0x3b, 0x645, 0x3b, 0x623, 0x3b, 0x648, 0x3b, 0x646, 0x3b, 0x644, 0x3b, 0x63a, 0x3b, 0x633,
+0x3b, 0x643, 0x3b, 0x628, 0x3b, 0x62f, 0x3b, 0x62c, 0x627, 0x646, 0x641, 0x64a, 0x3b, 0x641, 0x64a, 0x641, 0x631, 0x64a, 0x3b, 0x645,
+0x627, 0x631, 0x633, 0x3b, 0x623, 0x641, 0x631, 0x64a, 0x644, 0x3b, 0x645, 0x627, 0x64a, 0x3b, 0x62c, 0x648, 0x627, 0x646, 0x3b, 0x62c,
+0x648, 0x64a, 0x644, 0x64a, 0x629, 0x3b, 0x623, 0x648, 0x62a, 0x3b, 0x633, 0x628, 0x62a, 0x645, 0x628, 0x631, 0x3b, 0x623, 0x643, 0x62a,
+0x648, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x641, 0x645, 0x628, 0x631, 0x3b, 0x62f, 0x64a, 0x633, 0x645, 0x628, 0x631, 0x3b, 0x62c, 0x3b,
+0x641, 0x3b, 0x645, 0x3b, 0x623, 0x3b, 0x645, 0x3b, 0x62c, 0x3b, 0x62c, 0x3b, 0x623, 0x3b, 0x633, 0x3b, 0x623, 0x3b, 0x646, 0x3b,
+0x62f, 0x3b, 0x643, 0x627, 0x646, 0x648, 0x646, 0x20, 0x627, 0x644, 0x62b, 0x627, 0x646, 0x64a, 0x3b, 0x634, 0x628, 0x627, 0x637, 0x3b,
+0x622, 0x630, 0x627, 0x631, 0x3b, 0x646, 0x64a, 0x633, 0x627, 0x646, 0x3b, 0x623, 0x64a, 0x627, 0x631, 0x3b, 0x62d, 0x632, 0x64a, 0x631,
+0x627, 0x646, 0x3b, 0x62a, 0x645, 0x648, 0x632, 0x3b, 0x622, 0x628, 0x3b, 0x623, 0x64a, 0x644, 0x648, 0x644, 0x3b, 0x62a, 0x634, 0x631,
+0x64a, 0x646, 0x20, 0x627, 0x644, 0x623, 0x648, 0x644, 0x3b, 0x62a, 0x634, 0x631, 0x64a, 0x646, 0x20, 0x627, 0x644, 0x62b, 0x627, 0x646,
+0x64a, 0x3b, 0x643, 0x627, 0x646, 0x648, 0x646, 0x20, 0x627, 0x644, 0x623, 0x648, 0x644, 0x3b, 0x643, 0x3b, 0x634, 0x3b, 0x622, 0x3b,
+0x646, 0x3b, 0x623, 0x3b, 0x62d, 0x3b, 0x62a, 0x3b, 0x622, 0x3b, 0x623, 0x3b, 0x62a, 0x3b, 0x62a, 0x3b, 0x643, 0x3b, 0x643, 0x627,
+0x646, 0x648, 0x646, 0x20, 0x627, 0x644, 0x62b, 0x627, 0x646, 0x64a, 0x3b, 0x634, 0x628, 0x627, 0x637, 0x3b, 0x622, 0x630, 0x627, 0x631,
+0x3b, 0x646, 0x64a, 0x633, 0x627, 0x646, 0x3b, 0x623, 0x64a, 0x627, 0x631, 0x3b, 0x62d, 0x632, 0x64a, 0x631, 0x627, 0x646, 0x3b, 0x62a,
+0x645, 0x648, 0x632, 0x3b, 0x622, 0x628, 0x3b, 0x623, 0x64a, 0x644, 0x648, 0x644, 0x3b, 0x62a, 0x634, 0x631, 0x64a, 0x646, 0xa0, 0x627,
+0x644, 0x623, 0x648, 0x644, 0x3b, 0x62a, 0x634, 0x631, 0x64a, 0x646, 0x20, 0x627, 0x644, 0x62b, 0x627, 0x646, 0x64a, 0x3b, 0x643, 0x627,
+0x646, 0x648, 0x646, 0x20, 0x627, 0x644, 0x623, 0x648, 0x644, 0x3b, 0x64a, 0x646, 0x627, 0x64a, 0x631, 0x3b, 0x641, 0x628, 0x631, 0x627,
+0x64a, 0x631, 0x3b, 0x645, 0x627, 0x631, 0x633, 0x3b, 0x625, 0x628, 0x631, 0x64a, 0x644, 0x3b, 0x645, 0x627, 0x64a, 0x648, 0x3b, 0x64a,
+0x648, 0x646, 0x64a, 0x648, 0x3b, 0x64a, 0x648, 0x644, 0x64a, 0x648, 0x3b, 0x623, 0x63a, 0x634, 0x62a, 0x3b, 0x634, 0x62a, 0x645, 0x628,
+0x631, 0x3b, 0x623, 0x643, 0x62a, 0x648, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x641, 0x645, 0x628, 0x631, 0x3b, 0x62f, 0x62c, 0x645, 0x628,
+0x631, 0x3b, 0x64a, 0x3b, 0x641, 0x3b, 0x645, 0x3b, 0x625, 0x3b, 0x648, 0x3b, 0x646, 0x3b, 0x644, 0x3b, 0x63a, 0x3b, 0x634, 0x3b,
+0x643, 0x3b, 0x628, 0x3b, 0x62f, 0x3b, 0x64a, 0x646, 0x627, 0x64a, 0x631, 0x3b, 0x641, 0x628, 0x631, 0x627, 0x64a, 0x631, 0x3b, 0x645,
+0x627, 0x631, 0x633, 0x3b, 0x623, 0x628, 0x631, 0x64a, 0x644, 0x3b, 0x645, 0x627, 0x64a, 0x3b, 0x64a, 0x648, 0x646, 0x64a, 0x648, 0x3b,
+0x64a, 0x648, 0x644, 0x64a, 0x648, 0x632, 0x3b, 0x63a, 0x634, 0x62a, 0x3b, 0x634, 0x62a, 0x646, 0x628, 0x631, 0x3b, 0x623, 0x643, 0x62a,
+0x648, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x646, 0x628, 0x631, 0x3b, 0x62f, 0x62c, 0x646, 0x628, 0x631, 0x3b, 0x64a, 0x3b, 0x641, 0x3b,
+0x645, 0x3b, 0x623, 0x3b, 0x645, 0x3b, 0x646, 0x3b, 0x644, 0x3b, 0x63a, 0x3b, 0x634, 0x3b, 0x643, 0x3b, 0x628, 0x3b, 0x62f, 0x3b,
+0x570, 0x576, 0x57e, 0x3b, 0x583, 0x57f, 0x57e, 0x3b, 0x574, 0x580, 0x57f, 0x3b, 0x561, 0x57a, 0x580, 0x3b, 0x574, 0x575, 0x57d, 0x3b,
+0x570, 0x576, 0x57d, 0x3b, 0x570, 0x56c, 0x57d, 0x3b, 0x585, 0x563, 0x57d, 0x3b, 0x57d, 0x565, 0x57a, 0x3b, 0x570, 0x578, 0x56f, 0x3b,
+0x576, 0x578, 0x575, 0x3b, 0x564, 0x565, 0x56f, 0x3b, 0x570, 0x578, 0x582, 0x576, 0x57e, 0x561, 0x580, 0x3b, 0x583, 0x565, 0x57f, 0x580,
+0x57e, 0x561, 0x580, 0x3b, 0x574, 0x561, 0x580, 0x57f, 0x3b, 0x561, 0x57a, 0x580, 0x56b, 0x56c, 0x3b, 0x574, 0x561, 0x575, 0x56b, 0x57d,
+0x3b, 0x570, 0x578, 0x582, 0x576, 0x56b, 0x57d, 0x3b, 0x570, 0x578, 0x582, 0x56c, 0x56b, 0x57d, 0x3b, 0x585, 0x563, 0x578, 0x57d, 0x57f,
+0x578, 0x57d, 0x3b, 0x57d, 0x565, 0x57a, 0x57f, 0x565, 0x574, 0x562, 0x565, 0x580, 0x3b, 0x570, 0x578, 0x56f, 0x57f, 0x565, 0x574, 0x562,
+0x565, 0x580, 0x3b, 0x576, 0x578, 0x575, 0x565, 0x574, 0x562, 0x565, 0x580, 0x3b, 0x564, 0x565, 0x56f, 0x57f, 0x565, 0x574, 0x562, 0x565,
+0x580, 0x3b, 0x540, 0x3b, 0x553, 0x3b, 0x544, 0x3b, 0x531, 0x3b, 0x544, 0x3b, 0x540, 0x3b, 0x540, 0x3b, 0x555, 0x3b, 0x54d, 0x3b,
+0x540, 0x3b, 0x546, 0x3b, 0x534, 0x3b, 0x570, 0x578, 0x582, 0x576, 0x57e, 0x561, 0x580, 0x56b, 0x3b, 0x583, 0x565, 0x57f, 0x580, 0x57e,
+0x561, 0x580, 0x56b, 0x3b, 0x574, 0x561, 0x580, 0x57f, 0x56b, 0x3b, 0x561, 0x57a, 0x580, 0x56b, 0x56c, 0x56b, 0x3b, 0x574, 0x561, 0x575,
+0x56b, 0x57d, 0x56b, 0x3b, 0x570, 0x578, 0x582, 0x576, 0x56b, 0x57d, 0x56b, 0x3b, 0x570, 0x578, 0x582, 0x56c, 0x56b, 0x57d, 0x56b, 0x3b,
+0x585, 0x563, 0x578, 0x57d, 0x57f, 0x578, 0x57d, 0x56b, 0x3b, 0x57d, 0x565, 0x57a, 0x57f, 0x565, 0x574, 0x562, 0x565, 0x580, 0x56b, 0x3b,
+0x570, 0x578, 0x56f, 0x57f, 0x565, 0x574, 0x562, 0x565, 0x580, 0x56b, 0x3b, 0x576, 0x578, 0x575, 0x565, 0x574, 0x562, 0x565, 0x580, 0x56b,
+0x3b, 0x564, 0x565, 0x56f, 0x57f, 0x565, 0x574, 0x562, 0x565, 0x580, 0x56b, 0x3b, 0x99c, 0x9be, 0x9a8, 0x9c1, 0x3b, 0x9ab, 0x9c7, 0x9ac,
+0x9cd, 0x9f0, 0x9c1, 0x3b, 0x9ae, 0x9be, 0x9f0, 0x9cd, 0x99a, 0x3b, 0x98f, 0x9aa, 0x9cd, 0x9f0, 0x9bf, 0x9b2, 0x3b, 0x9ae, 0x9c7, 0x2019,
+0x3b, 0x99c, 0x9c1, 0x9a8, 0x3b, 0x99c, 0x9c1, 0x9b2, 0x9be, 0x987, 0x3b, 0x986, 0x997, 0x3b, 0x99b, 0x9c7, 0x9aa, 0x9cd, 0x9a4, 0x9c7,
+0x3b, 0x985, 0x995, 0x9cd, 0x99f, 0x9cb, 0x3b, 0x9a8, 0x9f1, 0x9c7, 0x3b, 0x9a1, 0x9bf, 0x99a, 0x9c7, 0x3b, 0x99c, 0x9be, 0x9a8, 0x9c1,
+0x9f1, 0x9be, 0x9f0, 0x9c0, 0x3b, 0x9ab, 0x9c7, 0x9ac, 0x9cd, 0x9f0, 0x9c1, 0x9f1, 0x9be, 0x9f0, 0x9c0, 0x3b, 0x9ae, 0x9be, 0x9f0, 0x9cd,
+0x99a, 0x3b, 0x98f, 0x9aa, 0x9cd, 0x9f0, 0x9bf, 0x9b2, 0x3b, 0x9ae, 0x9c7, 0x2019, 0x3b, 0x99c, 0x9c1, 0x9a8, 0x3b, 0x99c, 0x9c1, 0x9b2,
+0x9be, 0x987, 0x3b, 0x986, 0x997, 0x9b7, 0x9cd, 0x99f, 0x3b, 0x99b, 0x9c7, 0x9aa, 0x9cd, 0x9a4, 0x9c7, 0x9ae, 0x9cd, 0x9ac, 0x9f0, 0x3b,
+0x985, 0x995, 0x9cd, 0x99f, 0x9cb, 0x9ac, 0x9f0, 0x3b, 0x9a8, 0x9f1, 0x9c7, 0x9ae, 0x9cd, 0x9ac, 0x9f0, 0x3b, 0x9a1, 0x9bf, 0x99a, 0x9c7,
+0x9ae, 0x9cd, 0x9ac, 0x9f0, 0x3b, 0x99c, 0x3b, 0x9ab, 0x3b, 0x9ae, 0x3b, 0x98f, 0x3b, 0x9ae, 0x3b, 0x99c, 0x3b, 0x99c, 0x3b, 0x986,
+0x3b, 0x99b, 0x3b, 0x985, 0x3b, 0x9a8, 0x3b, 0x9a1, 0x3b, 0x79, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x76, 0x3b, 0x6d, 0x61, 0x72,
+0x3b, 0x61, 0x70, 0x72, 0x3b, 0x6d, 0x61, 0x79, 0x3b, 0x69, 0x79, 0x6e, 0x3b, 0x69, 0x79, 0x6c, 0x3b, 0x61, 0x76, 0x71,
+0x3b, 0x73, 0x65, 0x6e, 0x3b, 0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x79, 0x3b, 0x64, 0x65, 0x6b, 0x3b, 0x59, 0x61, 0x6e,
+0x76, 0x61, 0x72, 0x3b, 0x46, 0x65, 0x76, 0x72, 0x61, 0x6c, 0x3b, 0x4d, 0x61, 0x72, 0x74, 0x3b, 0x41, 0x70, 0x72, 0x65,
+0x6c, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x130, 0x79, 0x75, 0x6e, 0x3b, 0x130, 0x79, 0x75, 0x6c, 0x3b, 0x41, 0x76, 0x71, 0x75,
+0x73, 0x74, 0x3b, 0x53, 0x65, 0x6e, 0x74, 0x79, 0x61, 0x62, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x79, 0x61, 0x62, 0x72, 0x3b,
+0x4e, 0x6f, 0x79, 0x61, 0x62, 0x72, 0x3b, 0x44, 0x65, 0x6b, 0x61, 0x62, 0x72, 0x3b, 0x79, 0x61, 0x6e, 0x76, 0x61, 0x72,
+0x3b, 0x66, 0x65, 0x76, 0x72, 0x61, 0x6c, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x3b, 0x61, 0x70, 0x72, 0x65, 0x6c, 0x3b, 0x6d,
+0x61, 0x79, 0x3b, 0x69, 0x79, 0x75, 0x6e, 0x3b, 0x69, 0x79, 0x75, 0x6c, 0x3b, 0x61, 0x76, 0x71, 0x75, 0x73, 0x74, 0x3b,
+0x73, 0x65, 0x6e, 0x74, 0x79, 0x61, 0x62, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0x79, 0x61, 0x62, 0x72, 0x3b, 0x6e, 0x6f, 0x79,
+0x61, 0x62, 0x72, 0x3b, 0x64, 0x65, 0x6b, 0x61, 0x62, 0x72, 0x3b, 0x458, 0x430, 0x43d, 0x3b, 0x444, 0x435, 0x432, 0x3b, 0x43c,
+0x430, 0x440, 0x3b, 0x430, 0x43f, 0x440, 0x3b, 0x43c, 0x430, 0x439, 0x3b, 0x438, 0x458, 0x43d, 0x3b, 0x438, 0x458, 0x43b, 0x3b, 0x430,
+0x432, 0x433, 0x3b, 0x441, 0x435, 0x43d, 0x3b, 0x43e, 0x43a, 0x442, 0x3b, 0x43d, 0x43e, 0x458, 0x3b, 0x434, 0x435, 0x43a, 0x3b, 0x408,
+0x430, 0x43d, 0x432, 0x430, 0x440, 0x3b, 0x424, 0x435, 0x432, 0x440, 0x430, 0x43b, 0x3b, 0x41c, 0x430, 0x440, 0x442, 0x3b, 0x410, 0x43f,
+0x440, 0x435, 0x43b, 0x3b, 0x41c, 0x430, 0x439, 0x3b, 0x418, 0x458, 0x443, 0x43d, 0x3b, 0x418, 0x458, 0x443, 0x43b, 0x3b, 0x410, 0x432,
+0x433, 0x443, 0x441, 0x442, 0x3b, 0x421, 0x435, 0x43d, 0x442, 0x458, 0x430, 0x431, 0x440, 0x3b, 0x41e, 0x43a, 0x442, 0x458, 0x430, 0x431,
+0x440, 0x3b, 0x41d, 0x43e, 0x458, 0x430, 0x431, 0x440, 0x3b, 0x414, 0x435, 0x43a, 0x430, 0x431, 0x440, 0x3b, 0x458, 0x430, 0x43d, 0x432,
+0x430, 0x440, 0x3b, 0x444, 0x435, 0x432, 0x440, 0x430, 0x43b, 0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430, 0x43f, 0x440, 0x435, 0x43b,
+0x3b, 0x43c, 0x430, 0x439, 0x3b, 0x438, 0x458, 0x443, 0x43d, 0x3b, 0x438, 0x458, 0x443, 0x43b, 0x3b, 0x430, 0x432, 0x433, 0x443, 0x441,
+0x442, 0x3b, 0x441, 0x435, 0x43d, 0x442, 0x458, 0x430, 0x431, 0x440, 0x3b, 0x43e, 0x43a, 0x442, 0x458, 0x430, 0x431, 0x440, 0x3b, 0x43d,
+0x43e, 0x458, 0x430, 0x431, 0x440, 0x3b, 0x434, 0x435, 0x43a, 0x430, 0x431, 0x440, 0x3b, 0x75, 0x72, 0x74, 0x2e, 0x3b, 0x6f, 0x74,
+0x73, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x2e, 0x3b, 0x61, 0x70, 0x69, 0x2e, 0x3b, 0x6d, 0x61, 0x69, 0x2e, 0x3b, 0x65, 0x6b,
+0x61, 0x2e, 0x3b, 0x75, 0x7a, 0x74, 0x2e, 0x3b, 0x61, 0x62, 0x75, 0x2e, 0x3b, 0x69, 0x72, 0x61, 0x2e, 0x3b, 0x75, 0x72,
+0x72, 0x2e, 0x3b, 0x61, 0x7a, 0x61, 0x2e, 0x3b, 0x61, 0x62, 0x65, 0x2e, 0x3b, 0x75, 0x72, 0x74, 0x61, 0x72, 0x72, 0x69,
+0x6c, 0x61, 0x3b, 0x4f, 0x74, 0x73, 0x61, 0x69, 0x6c, 0x61, 0x3b, 0x4d, 0x61, 0x72, 0x74, 0x78, 0x6f, 0x61, 0x3b, 0x41,
+0x70, 0x69, 0x72, 0x69, 0x6c, 0x61, 0x3b, 0x4d, 0x61, 0x69, 0x61, 0x74, 0x7a, 0x61, 0x3b, 0x45, 0x6b, 0x61, 0x69, 0x6e,
+0x61, 0x3b, 0x55, 0x7a, 0x74, 0x61, 0x69, 0x6c, 0x61, 0x3b, 0x41, 0x62, 0x75, 0x7a, 0x74, 0x75, 0x61, 0x3b, 0x49, 0x72,
+0x61, 0x69, 0x6c, 0x61, 0x3b, 0x55, 0x72, 0x72, 0x69, 0x61, 0x3b, 0x41, 0x7a, 0x61, 0x72, 0x6f, 0x61, 0x3b, 0x41, 0x62,
+0x65, 0x6e, 0x64, 0x75, 0x61, 0x3b, 0x55, 0x3b, 0x4f, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x45, 0x3b, 0x55, 0x3b,
+0x41, 0x3b, 0x49, 0x3b, 0x55, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x75, 0x72, 0x74, 0x61, 0x72, 0x72, 0x69, 0x6c, 0x61, 0x3b,
+0x6f, 0x74, 0x73, 0x61, 0x69, 0x6c, 0x61, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x78, 0x6f, 0x61, 0x3b, 0x61, 0x70, 0x69, 0x72,
+0x69, 0x6c, 0x61, 0x3b, 0x6d, 0x61, 0x69, 0x61, 0x74, 0x7a, 0x61, 0x3b, 0x65, 0x6b, 0x61, 0x69, 0x6e, 0x61, 0x3b, 0x75,
+0x7a, 0x74, 0x61, 0x69, 0x6c, 0x61, 0x3b, 0x61, 0x62, 0x75, 0x7a, 0x74, 0x75, 0x61, 0x3b, 0x69, 0x72, 0x61, 0x69, 0x6c,
+0x61, 0x3b, 0x75, 0x72, 0x72, 0x69, 0x61, 0x3b, 0x61, 0x7a, 0x61, 0x72, 0x6f, 0x61, 0x3b, 0x61, 0x62, 0x65, 0x6e, 0x64,
+0x75, 0x61, 0x3b, 0x99c, 0x9be, 0x9a8, 0x9c1, 0x9af, 0x9bc, 0x9be, 0x9b0, 0x9c0, 0x3b, 0x9ab, 0x9c7, 0x9ac, 0x9cd, 0x9b0, 0x9c1, 0x9af,
+0x9bc, 0x9be, 0x9b0, 0x9c0, 0x3b, 0x9ae, 0x9be, 0x9b0, 0x9cd, 0x99a, 0x3b, 0x98f, 0x9aa, 0x9cd, 0x9b0, 0x9bf, 0x9b2, 0x3b, 0x9ae, 0x9c7,
+0x3b, 0x99c, 0x9c1, 0x9a8, 0x3b, 0x99c, 0x9c1, 0x9b2, 0x9be, 0x987, 0x3b, 0x986, 0x997, 0x9b8, 0x9cd, 0x99f, 0x3b, 0x9b8, 0x9c7, 0x9aa,
+0x9cd, 0x99f, 0x9c7, 0x9ae, 0x9cd, 0x9ac, 0x9b0, 0x3b, 0x985, 0x995, 0x9cd, 0x99f, 0x9cb, 0x9ac, 0x9b0, 0x3b, 0x9a8, 0x9ad, 0x9c7, 0x9ae,
+0x9cd, 0x9ac, 0x9b0, 0x3b, 0x9a1, 0x9bf, 0x9b8, 0x9c7, 0x9ae, 0x9cd, 0x9ac, 0x9b0, 0x3b, 0x99c, 0x9be, 0x3b, 0x9ab, 0x9c7, 0x3b, 0x9ae,
+0x9be, 0x3b, 0x98f, 0x3b, 0x9ae, 0x9c7, 0x3b, 0x99c, 0x9c1, 0x9a8, 0x3b, 0x99c, 0x9c1, 0x3b, 0x986, 0x3b, 0x9b8, 0x9c7, 0x3b, 0x985,
+0x3b, 0x9a8, 0x3b, 0x9a1, 0x9bf, 0x3b, 0x99c, 0x9be, 0x9a8, 0x9c1, 0x3b, 0x9ab, 0x9c7, 0x9ac, 0x3b, 0x9ae, 0x9be, 0x9b0, 0x9cd, 0x99a,
+0x3b, 0x98f, 0x9aa, 0x9cd, 0x9b0, 0x9bf, 0x9b2, 0x3b, 0x9ae, 0x9c7, 0x3b, 0x99c, 0x9c1, 0x9a8, 0x3b, 0x99c, 0x9c1, 0x9b2, 0x9be, 0x987,
+0x3b, 0x986, 0x997, 0x9b8, 0x9cd, 0x99f, 0x3b, 0x9b8, 0x9c7, 0x9aa, 0x9cd, 0x99f, 0x9c7, 0x9ae, 0x9cd, 0x9ac, 0x9b0, 0x3b, 0x985, 0x995,
+0x9cd, 0x99f, 0x9cb, 0x9ac, 0x9b0, 0x3b, 0x9a8, 0x9ad, 0x9c7, 0x9ae, 0x9cd, 0x9ac, 0x9b0, 0x3b, 0x9a1, 0x9bf, 0x9b8, 0x9c7, 0x9ae, 0x9cd,
+0x9ac, 0x9b0, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf21, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf22, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf23, 0x3b, 0xf5f, 0xfb3,
+0xf0b, 0xf24, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf25, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf26, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf27, 0x3b, 0xf5f, 0xfb3,
+0xf0b, 0xf28, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf29, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf21, 0xf20, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf21, 0xf21, 0x3b,
+0xf5f, 0xfb3, 0xf0b, 0xf21, 0xf22, 0x3b, 0xf66, 0xfa4, 0xfb1, 0xf72, 0xf0b, 0xf5f, 0xfb3, 0xf0b, 0xf51, 0xf44, 0xf54, 0xf0b, 0x3b, 0xf66,
+0xfa4, 0xfb1, 0xf72, 0xf0b, 0xf5f, 0xfb3, 0xf0b, 0xf42, 0xf49, 0xf72, 0xf66, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf66, 0xfa4, 0xfb1, 0xf72, 0xf0b,
+0xf5f, 0xfb3, 0xf0b, 0xf42, 0xf66, 0xf74, 0xf58, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf66, 0xfa4, 0xfb1, 0xf72, 0xf0b, 0xf5f, 0xfb3, 0xf0b, 0xf56,
+0xf5e, 0xf72, 0xf0b, 0xf54, 0x3b, 0xf66, 0xfa4, 0xfb1, 0xf72, 0xf0b, 0xf5f, 0xfb3, 0xf0b, 0xf63, 0xf94, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf66,
+0xfa4, 0xfb1, 0xf72, 0xf0b, 0xf5f, 0xfb3, 0xf0b, 0xf51, 0xfb2, 0xf74, 0xf42, 0xf0b, 0xf54, 0x3b, 0xf66, 0xfa4, 0xfb1, 0xf72, 0xf0b, 0xf5f,
+0xfb3, 0xf0b, 0xf56, 0xf51, 0xf74, 0xf53, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf66, 0xfa4, 0xfb1, 0xf72, 0xf0b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf62,
+0xf92, 0xfb1, 0xf51, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf66, 0xfa4, 0xfb1, 0xf72, 0xf0b, 0xf5f, 0xfb3, 0xf0b, 0xf51, 0xf42, 0xf74, 0xf0b, 0xf54,
+0xf0b, 0x3b, 0xf66, 0xfa4, 0xfb1, 0xf72, 0xf0b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf66, 0xfa4, 0xfb1,
+0xf72, 0xf0b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf42, 0xf45, 0xf72, 0xf42, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf66, 0xfa4, 0xfb1,
+0xf72, 0xf0b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf42, 0xf49, 0xf72, 0xf66, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf21, 0x3b, 0xf22,
+0x3b, 0xf23, 0x3b, 0xf24, 0x3b, 0xf25, 0x3b, 0xf26, 0x3b, 0xf27, 0x3b, 0xf28, 0x3b, 0xf29, 0x3b, 0xf21, 0xf20, 0x3b, 0xf21, 0xf21,
+0x3b, 0xf21, 0xf22, 0x3b, 0xf21, 0x3b, 0xf22, 0x3b, 0xf23, 0x3b, 0xf24, 0x3b, 0xf25, 0x3b, 0xf26, 0x3b, 0xf27, 0x3b, 0xf28, 0x3b,
+0xf29, 0x3b, 0xf21, 0xf20, 0x3b, 0xf21, 0xf21, 0x3b, 0x31, 0x32, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf51, 0xf44, 0xf54, 0xf0b, 0x3b, 0xf5f,
+0xfb3, 0xf0b, 0xf42, 0xf49, 0xf72, 0xf66, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf42, 0xf66, 0xf74, 0xf58, 0xf0b, 0xf54, 0xf0b,
+0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf5e, 0xf72, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf63, 0xf94, 0xf0b, 0xf54, 0xf0b, 0x3b,
+0xf5f, 0xfb3, 0xf0b, 0xf51, 0xfb2, 0xf74, 0xf42, 0xf0b, 0xf54, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf51, 0xf74, 0xf53, 0xf0b, 0xf54, 0xf0b,
+0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf62, 0xf92, 0xfb1, 0xf51, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf51, 0xf42, 0xf74, 0xf0b,
+0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b,
+0xf42, 0xf45, 0xf72, 0xf42, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf42, 0xf49, 0xf72, 0xf66, 0xf0b,
+0xf54, 0xf0b, 0x3b, 0xf21, 0x3b, 0xf22, 0x3b, 0xf23, 0x3b, 0x34, 0x3b, 0xf25, 0x3b, 0xf26, 0x3b, 0xf27, 0x3b, 0xf28, 0x3b, 0x39,
+0x3b, 0xf21, 0xf20, 0x3b, 0xf21, 0xf21, 0x3b, 0xf21, 0xf22, 0x3b, 0x47, 0x65, 0x6e, 0x2e, 0x3b, 0x43, 0x2bc, 0x68, 0x77, 0x65,
0x2e, 0x3b, 0x4d, 0x65, 0x75, 0x72, 0x2e, 0x3b, 0x45, 0x62, 0x72, 0x2e, 0x3b, 0x4d, 0x61, 0x65, 0x3b, 0x4d, 0x65, 0x7a,
0x68, 0x2e, 0x3b, 0x47, 0x6f, 0x75, 0x65, 0x2e, 0x3b, 0x45, 0x6f, 0x73, 0x74, 0x3b, 0x47, 0x77, 0x65, 0x6e, 0x2e, 0x3b,
-0x48, 0x65, 0x72, 0x65, 0x3b, 0x44, 0x75, 0x3b, 0x4b, 0x7a, 0x75, 0x2e, 0x3b, 0x44f, 0x43d, 0x443, 0x3b, 0x444, 0x435, 0x432,
-0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430, 0x43f, 0x440, 0x3b, 0x43c, 0x430, 0x439, 0x3b, 0x44e, 0x43d, 0x438, 0x3b, 0x44e, 0x43b,
-0x438, 0x3b, 0x430, 0x432, 0x433, 0x3b, 0x441, 0x435, 0x43f, 0x3b, 0x43e, 0x43a, 0x442, 0x3b, 0x43d, 0x43e, 0x435, 0x3b, 0x434, 0x435,
-0x43a, 0x3b, 0x44f, 0x43d, 0x443, 0x430, 0x440, 0x438, 0x3b, 0x444, 0x435, 0x432, 0x440, 0x443, 0x430, 0x440, 0x438, 0x3b, 0x43c, 0x430,
-0x440, 0x442, 0x3b, 0x430, 0x43f, 0x440, 0x438, 0x43b, 0x3b, 0x43c, 0x430, 0x439, 0x3b, 0x44e, 0x43d, 0x438, 0x3b, 0x44e, 0x43b, 0x438,
-0x3b, 0x430, 0x432, 0x433, 0x443, 0x441, 0x442, 0x3b, 0x441, 0x435, 0x43f, 0x442, 0x435, 0x43c, 0x432, 0x440, 0x438, 0x3b, 0x43e, 0x43a,
-0x442, 0x43e, 0x43c, 0x432, 0x440, 0x438, 0x3b, 0x43d, 0x43e, 0x435, 0x43c, 0x432, 0x440, 0x438, 0x3b, 0x434, 0x435, 0x43a, 0x435, 0x43c,
-0x432, 0x440, 0x438, 0x3b, 0x44f, 0x3b, 0x444, 0x3b, 0x43c, 0x3b, 0x430, 0x3b, 0x43c, 0x3b, 0x44e, 0x3b, 0x44e, 0x3b, 0x430, 0x3b,
-0x441, 0x3b, 0x43e, 0x3b, 0x43d, 0x3b, 0x434, 0x3b, 0x1007, 0x1014, 0x103a, 0x3b, 0x1016, 0x1031, 0x3b, 0x1019, 0x1010, 0x103a, 0x3b, 0x1027,
-0x3b, 0x1019, 0x1031, 0x3b, 0x1007, 0x103d, 0x1014, 0x103a, 0x3b, 0x1007, 0x1030, 0x3b, 0x1029, 0x3b, 0x1005, 0x1000, 0x103a, 0x3b, 0x1021, 0x1031,
-0x102c, 0x1000, 0x103a, 0x3b, 0x1014, 0x102d, 0x102f, 0x3b, 0x1012, 0x102e, 0x3b, 0x1007, 0x1014, 0x103a, 0x1014, 0x101d, 0x102b, 0x101b, 0x102e, 0x3b,
-0x1016, 0x1031, 0x1016, 0x1031, 0x102c, 0x103a, 0x101d, 0x102b, 0x101b, 0x102e, 0x3b, 0x1019, 0x1010, 0x103a, 0x3b, 0x1027, 0x1015, 0x103c, 0x102e, 0x3b,
-0x1019, 0x1031, 0x3b, 0x1007, 0x103d, 0x1014, 0x103a, 0x3b, 0x1007, 0x1030, 0x101c, 0x102d, 0x102f, 0x1004, 0x103a, 0x3b, 0x1029, 0x1002, 0x102f, 0x1010,
-0x103a, 0x3b, 0x1005, 0x1000, 0x103a, 0x1010, 0x1004, 0x103a, 0x1018, 0x102c, 0x3b, 0x1021, 0x1031, 0x102c, 0x1000, 0x103a, 0x1010, 0x102d, 0x102f, 0x1018,
-0x102c, 0x3b, 0x1014, 0x102d, 0x102f, 0x101d, 0x1004, 0x103a, 0x1018, 0x102c, 0x3b, 0x1012, 0x102e, 0x1007, 0x1004, 0x103a, 0x1018, 0x102c, 0x3b, 0x1007,
-0x3b, 0x1016, 0x3b, 0x1019, 0x3b, 0x1027, 0x3b, 0x1019, 0x3b, 0x1007, 0x3b, 0x1007, 0x3b, 0x1029, 0x3b, 0x1005, 0x3b, 0x1021, 0x3b, 0x1014,
-0x3b, 0x1012, 0x3b, 0x441, 0x442, 0x443, 0x3b, 0x43b, 0x44e, 0x442, 0x3b, 0x441, 0x430, 0x43a, 0x3b, 0x43a, 0x440, 0x430, 0x3b, 0x43c,
-0x430, 0x439, 0x3b, 0x447, 0x44d, 0x440, 0x3b, 0x43b, 0x456, 0x43f, 0x3b, 0x436, 0x43d, 0x456, 0x3b, 0x432, 0x435, 0x440, 0x3b, 0x43a,
-0x430, 0x441, 0x3b, 0x43b, 0x456, 0x441, 0x3b, 0x441, 0x43d, 0x435, 0x3b, 0x441, 0x442, 0x443, 0x434, 0x437, 0x435, 0x43d, 0x44c, 0x3b,
-0x43b, 0x44e, 0x442, 0x44b, 0x3b, 0x441, 0x430, 0x43a, 0x430, 0x432, 0x456, 0x43a, 0x3b, 0x43a, 0x440, 0x430, 0x441, 0x430, 0x432, 0x456,
-0x43a, 0x3b, 0x43c, 0x430, 0x439, 0x3b, 0x447, 0x44d, 0x440, 0x432, 0x435, 0x43d, 0x44c, 0x3b, 0x43b, 0x456, 0x43f, 0x435, 0x43d, 0x44c,
-0x3b, 0x436, 0x43d, 0x456, 0x432, 0x435, 0x43d, 0x44c, 0x3b, 0x432, 0x435, 0x440, 0x430, 0x441, 0x435, 0x43d, 0x44c, 0x3b, 0x43a, 0x430,
-0x441, 0x442, 0x440, 0x44b, 0x447, 0x43d, 0x456, 0x43a, 0x3b, 0x43b, 0x456, 0x441, 0x442, 0x430, 0x43f, 0x430, 0x434, 0x3b, 0x441, 0x43d,
-0x435, 0x436, 0x430, 0x43d, 0x44c, 0x3b, 0x441, 0x3b, 0x43b, 0x3b, 0x441, 0x3b, 0x43a, 0x3b, 0x43c, 0x3b, 0x447, 0x3b, 0x43b, 0x3b,
-0x436, 0x3b, 0x432, 0x3b, 0x43a, 0x3b, 0x43b, 0x3b, 0x441, 0x3b, 0x441, 0x442, 0x443, 0x3b, 0x43b, 0x44e, 0x442, 0x3b, 0x441, 0x430,
-0x43a, 0x3b, 0x43a, 0x440, 0x430, 0x3b, 0x43c, 0x430, 0x44f, 0x3b, 0x447, 0x44d, 0x440, 0x3b, 0x43b, 0x456, 0x43f, 0x3b, 0x436, 0x43d,
-0x456, 0x3b, 0x432, 0x435, 0x440, 0x3b, 0x43a, 0x430, 0x441, 0x3b, 0x43b, 0x456, 0x441, 0x3b, 0x441, 0x43d, 0x435, 0x3b, 0x441, 0x442,
-0x443, 0x434, 0x437, 0x435, 0x43d, 0x44f, 0x3b, 0x43b, 0x44e, 0x442, 0x430, 0x433, 0x430, 0x3b, 0x441, 0x430, 0x43a, 0x430, 0x432, 0x456,
-0x43a, 0x430, 0x3b, 0x43a, 0x440, 0x430, 0x441, 0x430, 0x432, 0x456, 0x43a, 0x430, 0x3b, 0x43c, 0x430, 0x44f, 0x3b, 0x447, 0x44d, 0x440,
-0x432, 0x435, 0x43d, 0x44f, 0x3b, 0x43b, 0x456, 0x43f, 0x435, 0x43d, 0x44f, 0x3b, 0x436, 0x43d, 0x456, 0x45e, 0x43d, 0x44f, 0x3b, 0x432,
-0x435, 0x440, 0x430, 0x441, 0x43d, 0x44f, 0x3b, 0x43a, 0x430, 0x441, 0x442, 0x440, 0x44b, 0x447, 0x43d, 0x456, 0x43a, 0x430, 0x3b, 0x43b,
-0x456, 0x441, 0x442, 0x430, 0x43f, 0x430, 0x434, 0x430, 0x3b, 0x441, 0x43d, 0x435, 0x436, 0x43d, 0x44f, 0x3b, 0x1798, 0x1780, 0x179a, 0x17b6,
-0x3b, 0x1780, 0x17bb, 0x1798, 0x17d2, 0x1797, 0x17c8, 0x3b, 0x1798, 0x17b8, 0x1793, 0x17b6, 0x3b, 0x1798, 0x17c1, 0x179f, 0x17b6, 0x3b, 0x17a7, 0x179f,
-0x1797, 0x17b6, 0x3b, 0x1798, 0x17b7, 0x1790, 0x17bb, 0x1793, 0x17b6, 0x3b, 0x1780, 0x1780, 0x17d2, 0x1780, 0x178a, 0x17b6, 0x3b, 0x179f, 0x17b8, 0x17a0,
-0x17b6, 0x3b, 0x1780, 0x1789, 0x17d2, 0x1789, 0x17b6, 0x3b, 0x178f, 0x17bb, 0x179b, 0x17b6, 0x3b, 0x179c, 0x17b7, 0x1785, 0x17d2, 0x1786, 0x17b7, 0x1780,
-0x17b6, 0x3b, 0x1792, 0x17d2, 0x1793, 0x17bc, 0x3b, 0x1798, 0x3b, 0x1780, 0x3b, 0x1798, 0x3b, 0x1798, 0x3b, 0x17a7, 0x3b, 0x1798, 0x3b, 0x1780,
-0x3b, 0x179f, 0x3b, 0x1780, 0x3b, 0x178f, 0x3b, 0x179c, 0x3b, 0x1792, 0x3b, 0x67, 0x65, 0x6e, 0x2e, 0x3b, 0x66, 0x65, 0x62, 0x72,
-0x2e, 0x3b, 0x6d, 0x61, 0x72, 0xe7, 0x3b, 0x61, 0x62, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x69, 0x67, 0x3b, 0x6a, 0x75, 0x6e,
-0x79, 0x3b, 0x6a, 0x75, 0x6c, 0x2e, 0x3b, 0x61, 0x67, 0x2e, 0x3b, 0x73, 0x65, 0x74, 0x2e, 0x3b, 0x6f, 0x63, 0x74, 0x2e,
-0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x73, 0x2e, 0x3b, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x3b, 0x66, 0x65, 0x62,
-0x72, 0x65, 0x72, 0x3b, 0x6d, 0x61, 0x72, 0xe7, 0x3b, 0x61, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x61, 0x69, 0x67, 0x3b,
-0x6a, 0x75, 0x6e, 0x79, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x6f, 0x6c, 0x3b, 0x61, 0x67, 0x6f, 0x73, 0x74, 0x3b, 0x73, 0x65,
-0x74, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x6f, 0x63, 0x74, 0x75, 0x62, 0x72, 0x65, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d,
-0x62, 0x72, 0x65, 0x3b, 0x64, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x47, 0x4e, 0x3b, 0x46, 0x42, 0x3b, 0x4d,
-0xc7, 0x3b, 0x41, 0x42, 0x3b, 0x4d, 0x47, 0x3b, 0x4a, 0x4e, 0x3b, 0x4a, 0x4c, 0x3b, 0x41, 0x47, 0x3b, 0x53, 0x54, 0x3b,
-0x4f, 0x43, 0x3b, 0x4e, 0x56, 0x3b, 0x44, 0x53, 0x3b, 0x64, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x2e, 0x3b, 0x64, 0x65, 0x20,
-0x66, 0x65, 0x62, 0x72, 0x2e, 0x3b, 0x64, 0x65, 0x20, 0x6d, 0x61, 0x72, 0xe7, 0x3b, 0x64, 0x2019, 0x61, 0x62, 0x72, 0x2e,
-0x3b, 0x64, 0x65, 0x20, 0x6d, 0x61, 0x69, 0x67, 0x3b, 0x64, 0x65, 0x20, 0x6a, 0x75, 0x6e, 0x79, 0x3b, 0x64, 0x65, 0x20,
-0x6a, 0x75, 0x6c, 0x2e, 0x3b, 0x64, 0x2019, 0x61, 0x67, 0x2e, 0x3b, 0x64, 0x65, 0x20, 0x73, 0x65, 0x74, 0x2e, 0x3b, 0x64,
-0x2019, 0x6f, 0x63, 0x74, 0x2e, 0x3b, 0x64, 0x65, 0x20, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x20, 0x64, 0x65, 0x73,
-0x2e, 0x3b, 0x64, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x3b, 0x64, 0x65, 0x20, 0x66, 0x65, 0x62, 0x72, 0x65, 0x72,
-0x3b, 0x64, 0x65, 0x20, 0x6d, 0x61, 0x72, 0xe7, 0x3b, 0x64, 0x2019, 0x61, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x64, 0x65, 0x20,
-0x6d, 0x61, 0x69, 0x67, 0x3b, 0x64, 0x65, 0x20, 0x6a, 0x75, 0x6e, 0x79, 0x3b, 0x64, 0x65, 0x20, 0x6a, 0x75, 0x6c, 0x69,
-0x6f, 0x6c, 0x3b, 0x64, 0x2019, 0x61, 0x67, 0x6f, 0x73, 0x74, 0x3b, 0x64, 0x65, 0x20, 0x73, 0x65, 0x74, 0x65, 0x6d, 0x62,
-0x72, 0x65, 0x3b, 0x64, 0x2019, 0x6f, 0x63, 0x74, 0x75, 0x62, 0x72, 0x65, 0x3b, 0x64, 0x65, 0x20, 0x6e, 0x6f, 0x76, 0x65,
-0x6d, 0x62, 0x72, 0x65, 0x3b, 0x64, 0x65, 0x20, 0x64, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x31, 0x6708, 0x3b,
-0x32, 0x6708, 0x3b, 0x33, 0x6708, 0x3b, 0x34, 0x6708, 0x3b, 0x35, 0x6708, 0x3b, 0x36, 0x6708, 0x3b, 0x37, 0x6708, 0x3b, 0x38, 0x6708,
-0x3b, 0x39, 0x6708, 0x3b, 0x31, 0x30, 0x6708, 0x3b, 0x31, 0x31, 0x6708, 0x3b, 0x31, 0x32, 0x6708, 0x3b, 0x4e00, 0x6708, 0x3b, 0x4e8c,
-0x6708, 0x3b, 0x4e09, 0x6708, 0x3b, 0x56db, 0x6708, 0x3b, 0x4e94, 0x6708, 0x3b, 0x516d, 0x6708, 0x3b, 0x4e03, 0x6708, 0x3b, 0x516b, 0x6708, 0x3b,
-0x4e5d, 0x6708, 0x3b, 0x5341, 0x6708, 0x3b, 0x5341, 0x4e00, 0x6708, 0x3b, 0x5341, 0x4e8c, 0x6708, 0x3b, 0x73, 0x69, 0x6a, 0x3b, 0x76, 0x65,
-0x6c, 0x6a, 0x3b, 0x6f, 0x17e, 0x75, 0x3b, 0x74, 0x72, 0x61, 0x3b, 0x73, 0x76, 0x69, 0x3b, 0x6c, 0x69, 0x70, 0x3b, 0x73,
-0x72, 0x70, 0x3b, 0x6b, 0x6f, 0x6c, 0x3b, 0x72, 0x75, 0x6a, 0x3b, 0x6c, 0x69, 0x73, 0x3b, 0x73, 0x74, 0x75, 0x3b, 0x70,
-0x72, 0x6f, 0x3b, 0x73, 0x69, 0x6a, 0x65, 0x10d, 0x61, 0x6e, 0x6a, 0x3b, 0x76, 0x65, 0x6c, 0x6a, 0x61, 0x10d, 0x61, 0x3b,
-0x6f, 0x17e, 0x75, 0x6a, 0x61, 0x6b, 0x3b, 0x74, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x6a, 0x3b, 0x73, 0x76, 0x69, 0x62, 0x61,
-0x6e, 0x6a, 0x3b, 0x6c, 0x69, 0x70, 0x61, 0x6e, 0x6a, 0x3b, 0x73, 0x72, 0x70, 0x61, 0x6e, 0x6a, 0x3b, 0x6b, 0x6f, 0x6c,
-0x6f, 0x76, 0x6f, 0x7a, 0x3b, 0x72, 0x75, 0x6a, 0x61, 0x6e, 0x3b, 0x6c, 0x69, 0x73, 0x74, 0x6f, 0x70, 0x61, 0x64, 0x3b,
-0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x69, 0x3b, 0x70, 0x72, 0x6f, 0x73, 0x69, 0x6e, 0x61, 0x63, 0x3b, 0x31, 0x2e, 0x3b,
-0x32, 0x2e, 0x3b, 0x33, 0x2e, 0x3b, 0x34, 0x2e, 0x3b, 0x35, 0x2e, 0x3b, 0x36, 0x2e, 0x3b, 0x37, 0x2e, 0x3b, 0x38, 0x2e,
-0x3b, 0x39, 0x2e, 0x3b, 0x31, 0x30, 0x2e, 0x3b, 0x31, 0x31, 0x2e, 0x3b, 0x31, 0x32, 0x2e, 0x3b, 0x73, 0x69, 0x6a, 0x65,
-0x10d, 0x6e, 0x6a, 0x61, 0x3b, 0x76, 0x65, 0x6c, 0x6a, 0x61, 0x10d, 0x65, 0x3b, 0x6f, 0x17e, 0x75, 0x6a, 0x6b, 0x61, 0x3b,
-0x74, 0x72, 0x61, 0x76, 0x6e, 0x6a, 0x61, 0x3b, 0x73, 0x76, 0x69, 0x62, 0x6e, 0x6a, 0x61, 0x3b, 0x6c, 0x69, 0x70, 0x6e,
-0x6a, 0x61, 0x3b, 0x73, 0x72, 0x70, 0x6e, 0x6a, 0x61, 0x3b, 0x6b, 0x6f, 0x6c, 0x6f, 0x76, 0x6f, 0x7a, 0x61, 0x3b, 0x72,
-0x75, 0x6a, 0x6e, 0x61, 0x3b, 0x6c, 0x69, 0x73, 0x74, 0x6f, 0x70, 0x61, 0x64, 0x61, 0x3b, 0x73, 0x74, 0x75, 0x64, 0x65,
-0x6e, 0x6f, 0x67, 0x61, 0x3b, 0x70, 0x72, 0x6f, 0x73, 0x69, 0x6e, 0x63, 0x61, 0x3b, 0x6c, 0x65, 0x64, 0x3b, 0xfa, 0x6e,
-0x6f, 0x3b, 0x62, 0x159, 0x65, 0x3b, 0x64, 0x75, 0x62, 0x3b, 0x6b, 0x76, 0x11b, 0x3b, 0x10d, 0x76, 0x6e, 0x3b, 0x10d, 0x76,
-0x63, 0x3b, 0x73, 0x72, 0x70, 0x3b, 0x7a, 0xe1, 0x159, 0x3b, 0x159, 0xed, 0x6a, 0x3b, 0x6c, 0x69, 0x73, 0x3b, 0x70, 0x72,
-0x6f, 0x3b, 0x6c, 0x65, 0x64, 0x65, 0x6e, 0x3b, 0xfa, 0x6e, 0x6f, 0x72, 0x3b, 0x62, 0x159, 0x65, 0x7a, 0x65, 0x6e, 0x3b,
-0x64, 0x75, 0x62, 0x65, 0x6e, 0x3b, 0x6b, 0x76, 0x11b, 0x74, 0x65, 0x6e, 0x3b, 0x10d, 0x65, 0x72, 0x76, 0x65, 0x6e, 0x3b,
-0x10d, 0x65, 0x72, 0x76, 0x65, 0x6e, 0x65, 0x63, 0x3b, 0x73, 0x72, 0x70, 0x65, 0x6e, 0x3b, 0x7a, 0xe1, 0x159, 0xed, 0x3b,
-0x159, 0xed, 0x6a, 0x65, 0x6e, 0x3b, 0x6c, 0x69, 0x73, 0x74, 0x6f, 0x70, 0x61, 0x64, 0x3b, 0x70, 0x72, 0x6f, 0x73, 0x69,
-0x6e, 0x65, 0x63, 0x3b, 0x6c, 0x65, 0x64, 0x6e, 0x61, 0x3b, 0xfa, 0x6e, 0x6f, 0x72, 0x61, 0x3b, 0x62, 0x159, 0x65, 0x7a,
-0x6e, 0x61, 0x3b, 0x64, 0x75, 0x62, 0x6e, 0x61, 0x3b, 0x6b, 0x76, 0x11b, 0x74, 0x6e, 0x61, 0x3b, 0x10d, 0x65, 0x72, 0x76,
-0x6e, 0x61, 0x3b, 0x10d, 0x65, 0x72, 0x76, 0x65, 0x6e, 0x63, 0x65, 0x3b, 0x73, 0x72, 0x70, 0x6e, 0x61, 0x3b, 0x7a, 0xe1,
-0x159, 0xed, 0x3b, 0x159, 0xed, 0x6a, 0x6e, 0x61, 0x3b, 0x6c, 0x69, 0x73, 0x74, 0x6f, 0x70, 0x61, 0x64, 0x75, 0x3b, 0x70,
-0x72, 0x6f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x3b, 0x6a, 0x61, 0x6e, 0x2e, 0x3b, 0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61,
-0x72, 0x2e, 0x3b, 0x61, 0x70, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x2e, 0x3b, 0x6a, 0x75, 0x6c,
-0x2e, 0x3b, 0x61, 0x75, 0x67, 0x2e, 0x3b, 0x73, 0x65, 0x70, 0x2e, 0x3b, 0x6f, 0x6b, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76,
-0x2e, 0x3b, 0x64, 0x65, 0x63, 0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x61,
-0x72, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x73, 0x3b, 0x61, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75,
-0x6e, 0x69, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x3b, 0x61, 0x75, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65,
-0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65,
-0x72, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6a, 0x61, 0x6e, 0x2e, 0x3b, 0x66, 0x65, 0x62, 0x2e,
-0x3b, 0x6d, 0x72, 0x74, 0x2e, 0x3b, 0x61, 0x70, 0x72, 0x2e, 0x3b, 0x6d, 0x65, 0x69, 0x3b, 0x6a, 0x75, 0x6e, 0x2e, 0x3b,
-0x6a, 0x75, 0x6c, 0x2e, 0x3b, 0x61, 0x75, 0x67, 0x2e, 0x3b, 0x73, 0x65, 0x70, 0x2e, 0x3b, 0x6f, 0x6b, 0x74, 0x2e, 0x3b,
-0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x63, 0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x66, 0x65,
-0x62, 0x72, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x6d, 0x61, 0x61, 0x72, 0x74, 0x3b, 0x61, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x6d,
-0x65, 0x69, 0x3b, 0x6a, 0x75, 0x6e, 0x69, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x3b, 0x61, 0x75, 0x67, 0x75, 0x73, 0x74, 0x75,
-0x73, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x3b,
-0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4a, 0x61,
-0x6e, 0x2e, 0x3b, 0x46, 0x65, 0x62, 0x2e, 0x3b, 0x4d, 0x61, 0x72, 0x2e, 0x3b, 0x41, 0x70, 0x72, 0x2e, 0x3b, 0x4d, 0x61,
-0x79, 0x3b, 0x4a, 0x75, 0x6e, 0x2e, 0x3b, 0x4a, 0x75, 0x6c, 0x2e, 0x3b, 0x41, 0x75, 0x67, 0x2e, 0x3b, 0x53, 0x65, 0x70,
-0x2e, 0x3b, 0x4f, 0x63, 0x74, 0x2e, 0x3b, 0x4e, 0x6f, 0x76, 0x2e, 0x3b, 0x44, 0x65, 0x63, 0x2e, 0x3b, 0x6a, 0x61, 0x61,
-0x6e, 0x3b, 0x76, 0x65, 0x65, 0x62, 0x72, 0x3b, 0x6d, 0xe4, 0x72, 0x74, 0x73, 0x3b, 0x61, 0x70, 0x72, 0x3b, 0x6d, 0x61,
-0x69, 0x3b, 0x6a, 0x75, 0x75, 0x6e, 0x69, 0x3b, 0x6a, 0x75, 0x75, 0x6c, 0x69, 0x3b, 0x61, 0x75, 0x67, 0x3b, 0x73, 0x65,
-0x70, 0x74, 0x3b, 0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x76, 0x3b, 0x64, 0x65, 0x74, 0x73, 0x3b, 0x6a, 0x61, 0x61, 0x6e,
-0x75, 0x61, 0x72, 0x3b, 0x76, 0x65, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x6d, 0xe4, 0x72, 0x74, 0x73, 0x3b, 0x61,
-0x70, 0x72, 0x69, 0x6c, 0x6c, 0x3b, 0x6d, 0x61, 0x69, 0x3b, 0x6a, 0x75, 0x75, 0x6e, 0x69, 0x3b, 0x6a, 0x75, 0x75, 0x6c,
+0x48, 0x65, 0x72, 0x65, 0x3b, 0x44, 0x75, 0x3b, 0x4b, 0x7a, 0x75, 0x2e, 0x3b, 0x47, 0x65, 0x6e, 0x76, 0x65, 0x72, 0x3b,
+0x43, 0x2bc, 0x68, 0x77, 0x65, 0x76, 0x72, 0x65, 0x72, 0x3b, 0x4d, 0x65, 0x75, 0x72, 0x7a, 0x68, 0x3b, 0x45, 0x62, 0x72,
+0x65, 0x6c, 0x3b, 0x4d, 0x61, 0x65, 0x3b, 0x4d, 0x65, 0x7a, 0x68, 0x65, 0x76, 0x65, 0x6e, 0x3b, 0x47, 0x6f, 0x75, 0x65,
+0x72, 0x65, 0x3b, 0x45, 0x6f, 0x73, 0x74, 0x3b, 0x47, 0x77, 0x65, 0x6e, 0x67, 0x6f, 0x6c, 0x6f, 0x3b, 0x48, 0x65, 0x72,
+0x65, 0x3b, 0x44, 0x75, 0x3b, 0x4b, 0x65, 0x72, 0x7a, 0x75, 0x3b, 0x30, 0x31, 0x3b, 0x30, 0x32, 0x3b, 0x30, 0x33, 0x3b,
+0x30, 0x34, 0x3b, 0x30, 0x35, 0x3b, 0x30, 0x36, 0x3b, 0x30, 0x37, 0x3b, 0x30, 0x38, 0x3b, 0x30, 0x39, 0x3b, 0x31, 0x30,
+0x3b, 0x31, 0x31, 0x3b, 0x31, 0x32, 0x3b, 0x44f, 0x43d, 0x443, 0x3b, 0x444, 0x435, 0x432, 0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b,
+0x430, 0x43f, 0x440, 0x3b, 0x43c, 0x430, 0x439, 0x3b, 0x44e, 0x43d, 0x438, 0x3b, 0x44e, 0x43b, 0x438, 0x3b, 0x430, 0x432, 0x433, 0x3b,
+0x441, 0x435, 0x43f, 0x3b, 0x43e, 0x43a, 0x442, 0x3b, 0x43d, 0x43e, 0x435, 0x3b, 0x434, 0x435, 0x43a, 0x3b, 0x44f, 0x43d, 0x443, 0x430,
+0x440, 0x438, 0x3b, 0x444, 0x435, 0x432, 0x440, 0x443, 0x430, 0x440, 0x438, 0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430, 0x43f, 0x440,
+0x438, 0x43b, 0x3b, 0x43c, 0x430, 0x439, 0x3b, 0x44e, 0x43d, 0x438, 0x3b, 0x44e, 0x43b, 0x438, 0x3b, 0x430, 0x432, 0x433, 0x443, 0x441,
+0x442, 0x3b, 0x441, 0x435, 0x43f, 0x442, 0x435, 0x43c, 0x432, 0x440, 0x438, 0x3b, 0x43e, 0x43a, 0x442, 0x43e, 0x43c, 0x432, 0x440, 0x438,
+0x3b, 0x43d, 0x43e, 0x435, 0x43c, 0x432, 0x440, 0x438, 0x3b, 0x434, 0x435, 0x43a, 0x435, 0x43c, 0x432, 0x440, 0x438, 0x3b, 0x44f, 0x3b,
+0x444, 0x3b, 0x43c, 0x3b, 0x430, 0x3b, 0x43c, 0x3b, 0x44e, 0x3b, 0x44e, 0x3b, 0x430, 0x3b, 0x441, 0x3b, 0x43e, 0x3b, 0x43d, 0x3b,
+0x434, 0x3b, 0x1007, 0x1014, 0x103a, 0x3b, 0x1016, 0x1031, 0x3b, 0x1019, 0x1010, 0x103a, 0x3b, 0x1027, 0x3b, 0x1019, 0x1031, 0x3b, 0x1007, 0x103d,
+0x1014, 0x103a, 0x3b, 0x1007, 0x1030, 0x3b, 0x1029, 0x3b, 0x1005, 0x1000, 0x103a, 0x3b, 0x1021, 0x1031, 0x102c, 0x1000, 0x103a, 0x3b, 0x1014, 0x102d,
+0x102f, 0x3b, 0x1012, 0x102e, 0x3b, 0x1007, 0x1014, 0x103a, 0x1014, 0x101d, 0x102b, 0x101b, 0x102e, 0x3b, 0x1016, 0x1031, 0x1016, 0x1031, 0x102c, 0x103a,
+0x101d, 0x102b, 0x101b, 0x102e, 0x3b, 0x1019, 0x1010, 0x103a, 0x3b, 0x1027, 0x1015, 0x103c, 0x102e, 0x3b, 0x1019, 0x1031, 0x3b, 0x1007, 0x103d, 0x1014,
+0x103a, 0x3b, 0x1007, 0x1030, 0x101c, 0x102d, 0x102f, 0x1004, 0x103a, 0x3b, 0x1029, 0x1002, 0x102f, 0x1010, 0x103a, 0x3b, 0x1005, 0x1000, 0x103a, 0x1010,
+0x1004, 0x103a, 0x1018, 0x102c, 0x3b, 0x1021, 0x1031, 0x102c, 0x1000, 0x103a, 0x1010, 0x102d, 0x102f, 0x1018, 0x102c, 0x3b, 0x1014, 0x102d, 0x102f, 0x101d,
+0x1004, 0x103a, 0x1018, 0x102c, 0x3b, 0x1012, 0x102e, 0x1007, 0x1004, 0x103a, 0x1018, 0x102c, 0x3b, 0x1007, 0x3b, 0x1016, 0x3b, 0x1019, 0x3b, 0x1027,
+0x3b, 0x1019, 0x3b, 0x1007, 0x3b, 0x1007, 0x3b, 0x1029, 0x3b, 0x1005, 0x3b, 0x1021, 0x3b, 0x1014, 0x3b, 0x1012, 0x3b, 0x441, 0x442, 0x443,
+0x3b, 0x43b, 0x44e, 0x442, 0x3b, 0x441, 0x430, 0x43a, 0x3b, 0x43a, 0x440, 0x430, 0x3b, 0x43c, 0x430, 0x439, 0x3b, 0x447, 0x44d, 0x440,
+0x3b, 0x43b, 0x456, 0x43f, 0x3b, 0x436, 0x43d, 0x456, 0x3b, 0x432, 0x435, 0x440, 0x3b, 0x43a, 0x430, 0x441, 0x3b, 0x43b, 0x456, 0x441,
+0x3b, 0x441, 0x43d, 0x435, 0x3b, 0x441, 0x442, 0x443, 0x434, 0x437, 0x435, 0x43d, 0x44c, 0x3b, 0x43b, 0x44e, 0x442, 0x44b, 0x3b, 0x441,
+0x430, 0x43a, 0x430, 0x432, 0x456, 0x43a, 0x3b, 0x43a, 0x440, 0x430, 0x441, 0x430, 0x432, 0x456, 0x43a, 0x3b, 0x43c, 0x430, 0x439, 0x3b,
+0x447, 0x44d, 0x440, 0x432, 0x435, 0x43d, 0x44c, 0x3b, 0x43b, 0x456, 0x43f, 0x435, 0x43d, 0x44c, 0x3b, 0x436, 0x43d, 0x456, 0x432, 0x435,
+0x43d, 0x44c, 0x3b, 0x432, 0x435, 0x440, 0x430, 0x441, 0x435, 0x43d, 0x44c, 0x3b, 0x43a, 0x430, 0x441, 0x442, 0x440, 0x44b, 0x447, 0x43d,
+0x456, 0x43a, 0x3b, 0x43b, 0x456, 0x441, 0x442, 0x430, 0x43f, 0x430, 0x434, 0x3b, 0x441, 0x43d, 0x435, 0x436, 0x430, 0x43d, 0x44c, 0x3b,
+0x441, 0x3b, 0x43b, 0x3b, 0x441, 0x3b, 0x43a, 0x3b, 0x43c, 0x3b, 0x447, 0x3b, 0x43b, 0x3b, 0x436, 0x3b, 0x432, 0x3b, 0x43a, 0x3b,
+0x43b, 0x3b, 0x441, 0x3b, 0x441, 0x442, 0x443, 0x3b, 0x43b, 0x44e, 0x442, 0x3b, 0x441, 0x430, 0x43a, 0x3b, 0x43a, 0x440, 0x430, 0x3b,
+0x43c, 0x430, 0x44f, 0x3b, 0x447, 0x44d, 0x440, 0x3b, 0x43b, 0x456, 0x43f, 0x3b, 0x436, 0x43d, 0x456, 0x3b, 0x432, 0x435, 0x440, 0x3b,
+0x43a, 0x430, 0x441, 0x3b, 0x43b, 0x456, 0x441, 0x3b, 0x441, 0x43d, 0x435, 0x3b, 0x441, 0x442, 0x443, 0x434, 0x437, 0x435, 0x43d, 0x44f,
+0x3b, 0x43b, 0x44e, 0x442, 0x430, 0x433, 0x430, 0x3b, 0x441, 0x430, 0x43a, 0x430, 0x432, 0x456, 0x43a, 0x430, 0x3b, 0x43a, 0x440, 0x430,
+0x441, 0x430, 0x432, 0x456, 0x43a, 0x430, 0x3b, 0x43c, 0x430, 0x44f, 0x3b, 0x447, 0x44d, 0x440, 0x432, 0x435, 0x43d, 0x44f, 0x3b, 0x43b,
+0x456, 0x43f, 0x435, 0x43d, 0x44f, 0x3b, 0x436, 0x43d, 0x456, 0x45e, 0x43d, 0x44f, 0x3b, 0x432, 0x435, 0x440, 0x430, 0x441, 0x43d, 0x44f,
+0x3b, 0x43a, 0x430, 0x441, 0x442, 0x440, 0x44b, 0x447, 0x43d, 0x456, 0x43a, 0x430, 0x3b, 0x43b, 0x456, 0x441, 0x442, 0x430, 0x43f, 0x430,
+0x434, 0x430, 0x3b, 0x441, 0x43d, 0x435, 0x436, 0x43d, 0x44f, 0x3b, 0x1798, 0x1780, 0x179a, 0x17b6, 0x3b, 0x1780, 0x17bb, 0x1798, 0x17d2, 0x1797,
+0x17c8, 0x3b, 0x1798, 0x17b8, 0x1793, 0x17b6, 0x3b, 0x1798, 0x17c1, 0x179f, 0x17b6, 0x3b, 0x17a7, 0x179f, 0x1797, 0x17b6, 0x3b, 0x1798, 0x17b7, 0x1790,
+0x17bb, 0x1793, 0x17b6, 0x3b, 0x1780, 0x1780, 0x17d2, 0x1780, 0x178a, 0x17b6, 0x3b, 0x179f, 0x17b8, 0x17a0, 0x17b6, 0x3b, 0x1780, 0x1789, 0x17d2, 0x1789,
+0x17b6, 0x3b, 0x178f, 0x17bb, 0x179b, 0x17b6, 0x3b, 0x179c, 0x17b7, 0x1785, 0x17d2, 0x1786, 0x17b7, 0x1780, 0x17b6, 0x3b, 0x1792, 0x17d2, 0x1793, 0x17bc,
+0x3b, 0x1798, 0x3b, 0x1780, 0x3b, 0x1798, 0x3b, 0x1798, 0x3b, 0x17a7, 0x3b, 0x1798, 0x3b, 0x1780, 0x3b, 0x179f, 0x3b, 0x1780, 0x3b, 0x178f,
+0x3b, 0x179c, 0x3b, 0x1792, 0x3b, 0x67, 0x65, 0x6e, 0x2e, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0xe7,
+0x3b, 0x61, 0x62, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x69, 0x67, 0x3b, 0x6a, 0x75, 0x6e, 0x79, 0x3b, 0x6a, 0x75, 0x6c, 0x2e,
+0x3b, 0x61, 0x67, 0x2e, 0x3b, 0x73, 0x65, 0x74, 0x2e, 0x3b, 0x6f, 0x63, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b,
+0x64, 0x65, 0x73, 0x2e, 0x3b, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x65, 0x72, 0x3b, 0x6d, 0x61,
+0x72, 0xe7, 0x3b, 0x61, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x61, 0x69, 0x67, 0x3b, 0x6a, 0x75, 0x6e, 0x79, 0x3b, 0x6a,
+0x75, 0x6c, 0x69, 0x6f, 0x6c, 0x3b, 0x61, 0x67, 0x6f, 0x73, 0x74, 0x3b, 0x73, 0x65, 0x74, 0x65, 0x6d, 0x62, 0x72, 0x65,
+0x3b, 0x6f, 0x63, 0x74, 0x75, 0x62, 0x72, 0x65, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x64, 0x65,
+0x73, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x47, 0x4e, 0x3b, 0x46, 0x42, 0x3b, 0x4d, 0xc7, 0x3b, 0x41, 0x42, 0x3b, 0x4d,
+0x47, 0x3b, 0x4a, 0x4e, 0x3b, 0x4a, 0x4c, 0x3b, 0x41, 0x47, 0x3b, 0x53, 0x54, 0x3b, 0x4f, 0x43, 0x3b, 0x4e, 0x56, 0x3b,
+0x44, 0x53, 0x3b, 0x64, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x2e, 0x3b, 0x64, 0x65, 0x20, 0x66, 0x65, 0x62, 0x72, 0x2e, 0x3b,
+0x64, 0x65, 0x20, 0x6d, 0x61, 0x72, 0xe7, 0x3b, 0x64, 0x2019, 0x61, 0x62, 0x72, 0x2e, 0x3b, 0x64, 0x65, 0x20, 0x6d, 0x61,
+0x69, 0x67, 0x3b, 0x64, 0x65, 0x20, 0x6a, 0x75, 0x6e, 0x79, 0x3b, 0x64, 0x65, 0x20, 0x6a, 0x75, 0x6c, 0x2e, 0x3b, 0x64,
+0x2019, 0x61, 0x67, 0x2e, 0x3b, 0x64, 0x65, 0x20, 0x73, 0x65, 0x74, 0x2e, 0x3b, 0x64, 0x2019, 0x6f, 0x63, 0x74, 0x2e, 0x3b,
+0x64, 0x65, 0x20, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x20, 0x64, 0x65, 0x73, 0x2e, 0x3b, 0x64, 0x65, 0x20, 0x67,
+0x65, 0x6e, 0x65, 0x72, 0x3b, 0x64, 0x65, 0x20, 0x66, 0x65, 0x62, 0x72, 0x65, 0x72, 0x3b, 0x64, 0x65, 0x20, 0x6d, 0x61,
+0x72, 0xe7, 0x3b, 0x64, 0x2019, 0x61, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x64, 0x65, 0x20, 0x6d, 0x61, 0x69, 0x67, 0x3b, 0x64,
+0x65, 0x20, 0x6a, 0x75, 0x6e, 0x79, 0x3b, 0x64, 0x65, 0x20, 0x6a, 0x75, 0x6c, 0x69, 0x6f, 0x6c, 0x3b, 0x64, 0x2019, 0x61,
+0x67, 0x6f, 0x73, 0x74, 0x3b, 0x64, 0x65, 0x20, 0x73, 0x65, 0x74, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x64, 0x2019, 0x6f,
+0x63, 0x74, 0x75, 0x62, 0x72, 0x65, 0x3b, 0x64, 0x65, 0x20, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x64,
+0x65, 0x20, 0x64, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x31, 0x6708, 0x3b, 0x32, 0x6708, 0x3b, 0x33, 0x6708, 0x3b,
+0x34, 0x6708, 0x3b, 0x35, 0x6708, 0x3b, 0x36, 0x6708, 0x3b, 0x37, 0x6708, 0x3b, 0x38, 0x6708, 0x3b, 0x39, 0x6708, 0x3b, 0x31, 0x30,
+0x6708, 0x3b, 0x31, 0x31, 0x6708, 0x3b, 0x31, 0x32, 0x6708, 0x3b, 0x4e00, 0x6708, 0x3b, 0x4e8c, 0x6708, 0x3b, 0x4e09, 0x6708, 0x3b, 0x56db,
+0x6708, 0x3b, 0x4e94, 0x6708, 0x3b, 0x516d, 0x6708, 0x3b, 0x4e03, 0x6708, 0x3b, 0x516b, 0x6708, 0x3b, 0x4e5d, 0x6708, 0x3b, 0x5341, 0x6708, 0x3b,
+0x5341, 0x4e00, 0x6708, 0x3b, 0x5341, 0x4e8c, 0x6708, 0x3b, 0x73, 0x69, 0x6a, 0x3b, 0x76, 0x65, 0x6c, 0x6a, 0x3b, 0x6f, 0x17e, 0x75,
+0x3b, 0x74, 0x72, 0x61, 0x3b, 0x73, 0x76, 0x69, 0x3b, 0x6c, 0x69, 0x70, 0x3b, 0x73, 0x72, 0x70, 0x3b, 0x6b, 0x6f, 0x6c,
+0x3b, 0x72, 0x75, 0x6a, 0x3b, 0x6c, 0x69, 0x73, 0x3b, 0x73, 0x74, 0x75, 0x3b, 0x70, 0x72, 0x6f, 0x3b, 0x73, 0x69, 0x6a,
+0x65, 0x10d, 0x61, 0x6e, 0x6a, 0x3b, 0x76, 0x65, 0x6c, 0x6a, 0x61, 0x10d, 0x61, 0x3b, 0x6f, 0x17e, 0x75, 0x6a, 0x61, 0x6b,
+0x3b, 0x74, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x6a, 0x3b, 0x73, 0x76, 0x69, 0x62, 0x61, 0x6e, 0x6a, 0x3b, 0x6c, 0x69, 0x70,
+0x61, 0x6e, 0x6a, 0x3b, 0x73, 0x72, 0x70, 0x61, 0x6e, 0x6a, 0x3b, 0x6b, 0x6f, 0x6c, 0x6f, 0x76, 0x6f, 0x7a, 0x3b, 0x72,
+0x75, 0x6a, 0x61, 0x6e, 0x3b, 0x6c, 0x69, 0x73, 0x74, 0x6f, 0x70, 0x61, 0x64, 0x3b, 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e,
+0x69, 0x3b, 0x70, 0x72, 0x6f, 0x73, 0x69, 0x6e, 0x61, 0x63, 0x3b, 0x31, 0x2e, 0x3b, 0x32, 0x2e, 0x3b, 0x33, 0x2e, 0x3b,
+0x34, 0x2e, 0x3b, 0x35, 0x2e, 0x3b, 0x36, 0x2e, 0x3b, 0x37, 0x2e, 0x3b, 0x38, 0x2e, 0x3b, 0x39, 0x2e, 0x3b, 0x31, 0x30,
+0x2e, 0x3b, 0x31, 0x31, 0x2e, 0x3b, 0x31, 0x32, 0x2e, 0x3b, 0x73, 0x69, 0x6a, 0x65, 0x10d, 0x6e, 0x6a, 0x61, 0x3b, 0x76,
+0x65, 0x6c, 0x6a, 0x61, 0x10d, 0x65, 0x3b, 0x6f, 0x17e, 0x75, 0x6a, 0x6b, 0x61, 0x3b, 0x74, 0x72, 0x61, 0x76, 0x6e, 0x6a,
+0x61, 0x3b, 0x73, 0x76, 0x69, 0x62, 0x6e, 0x6a, 0x61, 0x3b, 0x6c, 0x69, 0x70, 0x6e, 0x6a, 0x61, 0x3b, 0x73, 0x72, 0x70,
+0x6e, 0x6a, 0x61, 0x3b, 0x6b, 0x6f, 0x6c, 0x6f, 0x76, 0x6f, 0x7a, 0x61, 0x3b, 0x72, 0x75, 0x6a, 0x6e, 0x61, 0x3b, 0x6c,
+0x69, 0x73, 0x74, 0x6f, 0x70, 0x61, 0x64, 0x61, 0x3b, 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x6f, 0x67, 0x61, 0x3b, 0x70,
+0x72, 0x6f, 0x73, 0x69, 0x6e, 0x63, 0x61, 0x3b, 0x6c, 0x65, 0x64, 0x3b, 0xfa, 0x6e, 0x6f, 0x3b, 0x62, 0x159, 0x65, 0x3b,
+0x64, 0x75, 0x62, 0x3b, 0x6b, 0x76, 0x11b, 0x3b, 0x10d, 0x76, 0x6e, 0x3b, 0x10d, 0x76, 0x63, 0x3b, 0x73, 0x72, 0x70, 0x3b,
+0x7a, 0xe1, 0x159, 0x3b, 0x159, 0xed, 0x6a, 0x3b, 0x6c, 0x69, 0x73, 0x3b, 0x70, 0x72, 0x6f, 0x3b, 0x6c, 0x65, 0x64, 0x65,
+0x6e, 0x3b, 0xfa, 0x6e, 0x6f, 0x72, 0x3b, 0x62, 0x159, 0x65, 0x7a, 0x65, 0x6e, 0x3b, 0x64, 0x75, 0x62, 0x65, 0x6e, 0x3b,
+0x6b, 0x76, 0x11b, 0x74, 0x65, 0x6e, 0x3b, 0x10d, 0x65, 0x72, 0x76, 0x65, 0x6e, 0x3b, 0x10d, 0x65, 0x72, 0x76, 0x65, 0x6e,
+0x65, 0x63, 0x3b, 0x73, 0x72, 0x70, 0x65, 0x6e, 0x3b, 0x7a, 0xe1, 0x159, 0xed, 0x3b, 0x159, 0xed, 0x6a, 0x65, 0x6e, 0x3b,
+0x6c, 0x69, 0x73, 0x74, 0x6f, 0x70, 0x61, 0x64, 0x3b, 0x70, 0x72, 0x6f, 0x73, 0x69, 0x6e, 0x65, 0x63, 0x3b, 0x6c, 0x65,
+0x64, 0x6e, 0x61, 0x3b, 0xfa, 0x6e, 0x6f, 0x72, 0x61, 0x3b, 0x62, 0x159, 0x65, 0x7a, 0x6e, 0x61, 0x3b, 0x64, 0x75, 0x62,
+0x6e, 0x61, 0x3b, 0x6b, 0x76, 0x11b, 0x74, 0x6e, 0x61, 0x3b, 0x10d, 0x65, 0x72, 0x76, 0x6e, 0x61, 0x3b, 0x10d, 0x65, 0x72,
+0x76, 0x65, 0x6e, 0x63, 0x65, 0x3b, 0x73, 0x72, 0x70, 0x6e, 0x61, 0x3b, 0x7a, 0xe1, 0x159, 0xed, 0x3b, 0x159, 0xed, 0x6a,
+0x6e, 0x61, 0x3b, 0x6c, 0x69, 0x73, 0x74, 0x6f, 0x70, 0x61, 0x64, 0x75, 0x3b, 0x70, 0x72, 0x6f, 0x73, 0x69, 0x6e, 0x63,
+0x65, 0x3b, 0x6a, 0x61, 0x6e, 0x2e, 0x3b, 0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x2e, 0x3b, 0x61, 0x70, 0x72,
+0x2e, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x2e, 0x3b, 0x6a, 0x75, 0x6c, 0x2e, 0x3b, 0x61, 0x75, 0x67, 0x2e,
+0x3b, 0x73, 0x65, 0x70, 0x2e, 0x3b, 0x6f, 0x6b, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x63, 0x2e,
+0x3b, 0x6a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x6d, 0x61, 0x72, 0x74,
+0x73, 0x3b, 0x61, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x69, 0x3b, 0x6a, 0x75, 0x6c,
0x69, 0x3b, 0x61, 0x75, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6f,
-0x6b, 0x74, 0x6f, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x64, 0x65, 0x74,
-0x73, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4a, 0x3b, 0x56, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x4a,
-0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x6a, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x62, 0x3b, 0x6d,
-0x61, 0x72, 0x3b, 0x61, 0x70, 0x72, 0x3b, 0x6d, 0x61, 0x69, 0x3b, 0x6a, 0x75, 0x6e, 0x3b, 0x6a, 0x75, 0x6c, 0x3b, 0x61,
-0x75, 0x67, 0x3b, 0x73, 0x65, 0x70, 0x3b, 0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x76, 0x3b, 0x64, 0x65, 0x73, 0x3b, 0x6a,
-0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b, 0x61,
-0x70, 0x72, 0xed, 0x6c, 0x3b, 0x6d, 0x61, 0x69, 0x3b, 0x6a, 0x75, 0x6e, 0x69, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x3b, 0x61,
-0x75, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0x6f,
-0x62, 0x65, 0x72, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x64, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x65,
-0x72, 0x3b, 0x6a, 0x61, 0x6e, 0x2e, 0x3b, 0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x2e, 0x3b, 0x61, 0x70, 0x72,
-0x2e, 0x3b, 0x6d, 0x61, 0x69, 0x3b, 0x6a, 0x75, 0x6e, 0x2e, 0x3b, 0x6a, 0x75, 0x6c, 0x2e, 0x3b, 0x61, 0x75, 0x67, 0x2e,
-0x3b, 0x73, 0x65, 0x70, 0x2e, 0x3b, 0x6f, 0x6b, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x73, 0x2e,
-0x3b, 0x74, 0x61, 0x6d, 0x6d, 0x69, 0x3b, 0x68, 0x65, 0x6c, 0x6d, 0x69, 0x3b, 0x6d, 0x61, 0x61, 0x6c, 0x69, 0x73, 0x3b,
-0x68, 0x75, 0x68, 0x74, 0x69, 0x3b, 0x74, 0x6f, 0x75, 0x6b, 0x6f, 0x3b, 0x6b, 0x65, 0x73, 0xe4, 0x3b, 0x68, 0x65, 0x69,
-0x6e, 0xe4, 0x3b, 0x65, 0x6c, 0x6f, 0x3b, 0x73, 0x79, 0x79, 0x73, 0x3b, 0x6c, 0x6f, 0x6b, 0x61, 0x3b, 0x6d, 0x61, 0x72,
-0x72, 0x61, 0x73, 0x3b, 0x6a, 0x6f, 0x75, 0x6c, 0x75, 0x3b, 0x74, 0x61, 0x6d, 0x6d, 0x69, 0x6b, 0x75, 0x75, 0x3b, 0x68,
-0x65, 0x6c, 0x6d, 0x69, 0x6b, 0x75, 0x75, 0x3b, 0x6d, 0x61, 0x61, 0x6c, 0x69, 0x73, 0x6b, 0x75, 0x75, 0x3b, 0x68, 0x75,
-0x68, 0x74, 0x69, 0x6b, 0x75, 0x75, 0x3b, 0x74, 0x6f, 0x75, 0x6b, 0x6f, 0x6b, 0x75, 0x75, 0x3b, 0x6b, 0x65, 0x73, 0xe4,
-0x6b, 0x75, 0x75, 0x3b, 0x68, 0x65, 0x69, 0x6e, 0xe4, 0x6b, 0x75, 0x75, 0x3b, 0x65, 0x6c, 0x6f, 0x6b, 0x75, 0x75, 0x3b,
-0x73, 0x79, 0x79, 0x73, 0x6b, 0x75, 0x75, 0x3b, 0x6c, 0x6f, 0x6b, 0x61, 0x6b, 0x75, 0x75, 0x3b, 0x6d, 0x61, 0x72, 0x72,
-0x61, 0x73, 0x6b, 0x75, 0x75, 0x3b, 0x6a, 0x6f, 0x75, 0x6c, 0x75, 0x6b, 0x75, 0x75, 0x3b, 0x54, 0x3b, 0x48, 0x3b, 0x4d,
-0x3b, 0x48, 0x3b, 0x54, 0x3b, 0x4b, 0x3b, 0x48, 0x3b, 0x45, 0x3b, 0x53, 0x3b, 0x4c, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x74,
-0x61, 0x6d, 0x6d, 0x69, 0x6b, 0x2e, 0x3b, 0x68, 0x65, 0x6c, 0x6d, 0x69, 0x6b, 0x2e, 0x3b, 0x6d, 0x61, 0x61, 0x6c, 0x69,
-0x73, 0x6b, 0x2e, 0x3b, 0x68, 0x75, 0x68, 0x74, 0x69, 0x6b, 0x2e, 0x3b, 0x74, 0x6f, 0x75, 0x6b, 0x6f, 0x6b, 0x2e, 0x3b,
-0x6b, 0x65, 0x73, 0xe4, 0x6b, 0x2e, 0x3b, 0x68, 0x65, 0x69, 0x6e, 0xe4, 0x6b, 0x2e, 0x3b, 0x65, 0x6c, 0x6f, 0x6b, 0x2e,
-0x3b, 0x73, 0x79, 0x79, 0x73, 0x6b, 0x2e, 0x3b, 0x6c, 0x6f, 0x6b, 0x61, 0x6b, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x72, 0x61,
-0x73, 0x6b, 0x2e, 0x3b, 0x6a, 0x6f, 0x75, 0x6c, 0x75, 0x6b, 0x2e, 0x3b, 0x74, 0x61, 0x6d, 0x6d, 0x69, 0x6b, 0x75, 0x75,
-0x74, 0x61, 0x3b, 0x68, 0x65, 0x6c, 0x6d, 0x69, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x6d, 0x61, 0x61, 0x6c, 0x69, 0x73,
-0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x68, 0x75, 0x68, 0x74, 0x69, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x74, 0x6f, 0x75,
-0x6b, 0x6f, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x6b, 0x65, 0x73, 0xe4, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x68, 0x65,
-0x69, 0x6e, 0xe4, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x65, 0x6c, 0x6f, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x73, 0x79,
-0x79, 0x73, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x6c, 0x6f, 0x6b, 0x61, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x6d, 0x61,
-0x72, 0x72, 0x61, 0x73, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x6a, 0x6f, 0x75, 0x6c, 0x75, 0x6b, 0x75, 0x75, 0x74, 0x61,
-0x3b, 0x6a, 0x61, 0x6e, 0x76, 0x2e, 0x3b, 0x66, 0xe9, 0x76, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b, 0x61, 0x76,
-0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x69, 0x3b, 0x6a, 0x75, 0x69, 0x6e, 0x3b, 0x6a, 0x75, 0x69, 0x6c, 0x2e, 0x3b, 0x61, 0x6f,
-0xfb, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x2e, 0x3b, 0x6f, 0x63, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64,
-0xe9, 0x63, 0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0x76, 0x69, 0x65, 0x72, 0x3b, 0x66, 0xe9, 0x76, 0x72, 0x69, 0x65, 0x72, 0x3b,
-0x6d, 0x61, 0x72, 0x73, 0x3b, 0x61, 0x76, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x61, 0x69, 0x3b, 0x6a, 0x75, 0x69, 0x6e, 0x3b,
-0x6a, 0x75, 0x69, 0x6c, 0x6c, 0x65, 0x74, 0x3b, 0x61, 0x6f, 0xfb, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62,
-0x72, 0x65, 0x3b, 0x6f, 0x63, 0x74, 0x6f, 0x62, 0x72, 0x65, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b,
-0x64, 0xe9, 0x63, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x6a, 0x61, 0x6e, 0x76, 0x2e, 0x3b, 0x66, 0xe9, 0x76, 0x72, 0x2e,
-0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b, 0x61, 0x76, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x69, 0x3b, 0x6a, 0x75, 0x69, 0x6e, 0x3b,
-0x6a, 0x75, 0x69, 0x6c, 0x6c, 0x2e, 0x3b, 0x61, 0x6f, 0xfb, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x2e, 0x3b, 0x6f, 0x63,
-0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0xe9, 0x63, 0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0x2e, 0x3b, 0x66, 0xe9,
-0x76, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x2e, 0x3b, 0x61, 0x76, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x69, 0x3b, 0x6a, 0x75, 0x69,
-0x2e, 0x3b, 0x6a, 0x75, 0x69, 0x6c, 0x2e, 0x3b, 0x61, 0x6f, 0xfb, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x2e, 0x3b, 0x6f,
-0x63, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0xe9, 0x63, 0x2e, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65,
-0x62, 0x3b, 0x4d, 0x72, 0x74, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75,
-0x6c, 0x3b, 0x41, 0x75, 0x67, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65,
-0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x6e, 0x65, 0x77, 0x61, 0x72, 0x69, 0x73, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x65, 0x77, 0x61,
-0x72, 0x69, 0x73, 0x3b, 0x4d, 0x61, 0x61, 0x72, 0x74, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x61, 0x69,
-0x65, 0x3b, 0x4a, 0x75, 0x6e, 0x79, 0x3b, 0x4a, 0x75, 0x6c, 0x79, 0x3b, 0x41, 0x75, 0x67, 0x75, 0x73, 0x74, 0x75, 0x73,
-0x3b, 0x53, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x4e,
-0x6f, 0x76, 0x69, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44, 0x65, 0x73, 0x69, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x46, 0x61, 0x6f,
-0x69, 0x3b, 0x47, 0x65, 0x61, 0x72, 0x72, 0x3b, 0x4d, 0xe0, 0x72, 0x74, 0x3b, 0x47, 0x69, 0x62, 0x6c, 0x3b, 0x43, 0xe8,
-0x69, 0x74, 0x3b, 0xd2, 0x67, 0x6d, 0x68, 0x3b, 0x49, 0x75, 0x63, 0x68, 0x3b, 0x4c, 0xf9, 0x6e, 0x61, 0x3b, 0x53, 0x75,
-0x6c, 0x74, 0x3b, 0x44, 0xe0, 0x6d, 0x68, 0x3b, 0x53, 0x61, 0x6d, 0x68, 0x3b, 0x44, 0xf9, 0x62, 0x68, 0x3b, 0x41, 0x6d,
-0x20, 0x46, 0x61, 0x6f, 0x69, 0x6c, 0x6c, 0x65, 0x61, 0x63, 0x68, 0x3b, 0x41, 0x6e, 0x20, 0x47, 0x65, 0x61, 0x72, 0x72,
-0x61, 0x6e, 0x3b, 0x41, 0x6d, 0x20, 0x4d, 0xe0, 0x72, 0x74, 0x3b, 0x41, 0x6e, 0x20, 0x47, 0x69, 0x62, 0x6c, 0x65, 0x61,
-0x6e, 0x3b, 0x41, 0x6e, 0x20, 0x43, 0xe8, 0x69, 0x74, 0x65, 0x61, 0x6e, 0x3b, 0x41, 0x6e, 0x20, 0x74, 0x2d, 0xd2, 0x67,
-0x6d, 0x68, 0x69, 0x6f, 0x73, 0x3b, 0x41, 0x6e, 0x20, 0x74, 0x2d, 0x49, 0x75, 0x63, 0x68, 0x61, 0x72, 0x3b, 0x41, 0x6e,
-0x20, 0x4c, 0xf9, 0x6e, 0x61, 0x73, 0x74, 0x61, 0x6c, 0x3b, 0x41, 0x6e, 0x20, 0x74, 0x2d, 0x53, 0x75, 0x6c, 0x74, 0x61,
-0x69, 0x6e, 0x3b, 0x41, 0x6e, 0x20, 0x44, 0xe0, 0x6d, 0x68, 0x61, 0x69, 0x72, 0x3b, 0x41, 0x6e, 0x20, 0x74, 0x2d, 0x53,
-0x61, 0x6d, 0x68, 0x61, 0x69, 0x6e, 0x3b, 0x41, 0x6e, 0x20, 0x44, 0xf9, 0x62, 0x68, 0x6c, 0x61, 0x63, 0x68, 0x64, 0x3b,
-0x46, 0x3b, 0x47, 0x3b, 0x4d, 0x3b, 0x47, 0x3b, 0x43, 0x3b, 0xd2, 0x3b, 0x49, 0x3b, 0x4c, 0x3b, 0x53, 0x3b, 0x44, 0x3b,
-0x53, 0x3b, 0x44, 0x3b, 0x64, 0x68, 0x65, 0x6e, 0x20, 0x46, 0x68, 0x61, 0x6f, 0x69, 0x6c, 0x6c, 0x65, 0x61, 0x63, 0x68,
-0x3b, 0x64, 0x68, 0x65, 0x6e, 0x20, 0x47, 0x68, 0x65, 0x61, 0x72, 0x72, 0x61, 0x6e, 0x3b, 0x64, 0x68, 0x65, 0x6e, 0x20,
-0x4d, 0x68, 0xe0, 0x72, 0x74, 0x3b, 0x64, 0x68, 0x65, 0x6e, 0x20, 0x47, 0x68, 0x69, 0x62, 0x6c, 0x65, 0x61, 0x6e, 0x3b,
-0x64, 0x68, 0x65, 0x6e, 0x20, 0x43, 0x68, 0xe8, 0x69, 0x74, 0x65, 0x61, 0x6e, 0x3b, 0x64, 0x68, 0x65, 0x6e, 0x20, 0xd2,
-0x67, 0x6d, 0x68, 0x69, 0x6f, 0x73, 0x3b, 0x64, 0x68, 0x65, 0x6e, 0x20, 0x49, 0x75, 0x63, 0x68, 0x61, 0x72, 0x3b, 0x64,
-0x68, 0x65, 0x6e, 0x20, 0x4c, 0xf9, 0x6e, 0x61, 0x73, 0x74, 0x61, 0x6c, 0x3b, 0x64, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x2d,
-0x53, 0x75, 0x6c, 0x74, 0x61, 0x69, 0x6e, 0x3b, 0x64, 0x68, 0x65, 0x6e, 0x20, 0x44, 0xe0, 0x6d, 0x68, 0x61, 0x69, 0x72,
-0x3b, 0x64, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x2d, 0x53, 0x61, 0x6d, 0x68, 0x61, 0x69, 0x6e, 0x3b, 0x64, 0x68, 0x65, 0x6e,
-0x20, 0x44, 0xf9, 0x62, 0x68, 0x6c, 0x61, 0x63, 0x68, 0x64, 0x3b, 0x58, 0x61, 0x6e, 0x2e, 0x3b, 0x46, 0x65, 0x62, 0x2e,
-0x3b, 0x4d, 0x61, 0x72, 0x2e, 0x3b, 0x41, 0x62, 0x72, 0x2e, 0x3b, 0x4d, 0x61, 0x69, 0x6f, 0x3b, 0x58, 0x75, 0xf1, 0x6f,
-0x3b, 0x58, 0x75, 0x6c, 0x2e, 0x3b, 0x41, 0x67, 0x6f, 0x2e, 0x3b, 0x53, 0x65, 0x74, 0x2e, 0x3b, 0x4f, 0x75, 0x74, 0x2e,
-0x3b, 0x4e, 0x6f, 0x76, 0x2e, 0x3b, 0x44, 0x65, 0x63, 0x2e, 0x3b, 0x58, 0x61, 0x6e, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x46,
-0x65, 0x62, 0x72, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x4d, 0x61, 0x72, 0x7a, 0x6f, 0x3b, 0x41, 0x62, 0x72, 0x69, 0x6c, 0x3b,
-0x4d, 0x61, 0x69, 0x6f, 0x3b, 0x58, 0x75, 0xf1, 0x6f, 0x3b, 0x58, 0x75, 0x6c, 0x6c, 0x6f, 0x3b, 0x41, 0x67, 0x6f, 0x73,
-0x74, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x4f, 0x75, 0x74, 0x75, 0x62, 0x72, 0x6f, 0x3b,
-0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x44, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x58, 0x3b,
-0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x58, 0x3b, 0x58, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b,
-0x44, 0x3b, 0x78, 0x61, 0x6e, 0x2e, 0x3b, 0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x2e, 0x3b, 0x61, 0x62, 0x72,
-0x2e, 0x3b, 0x6d, 0x61, 0x69, 0x6f, 0x3b, 0x78, 0x75, 0xf1, 0x6f, 0x3b, 0x78, 0x75, 0x6c, 0x2e, 0x3b, 0x61, 0x67, 0x6f,
-0x2e, 0x3b, 0x73, 0x65, 0x74, 0x2e, 0x3b, 0x6f, 0x75, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x63,
-0x2e, 0x3b, 0x78, 0x61, 0x6e, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x6d,
-0x61, 0x72, 0x7a, 0x6f, 0x3b, 0x61, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x61, 0x69, 0x6f, 0x3b, 0x78, 0x75, 0xf1, 0x6f,
-0x3b, 0x78, 0x75, 0x6c, 0x6c, 0x6f, 0x3b, 0x61, 0x67, 0x6f, 0x73, 0x74, 0x6f, 0x3b, 0x73, 0x65, 0x74, 0x65, 0x6d, 0x62,
-0x72, 0x6f, 0x3b, 0x6f, 0x75, 0x74, 0x75, 0x62, 0x72, 0x6f, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b,
-0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x78, 0x2e, 0x3b, 0x66, 0x2e, 0x3b, 0x6d, 0x2e, 0x3b, 0x61, 0x2e,
-0x3b, 0x6d, 0x2e, 0x3b, 0x78, 0x2e, 0x3b, 0x78, 0x2e, 0x3b, 0x61, 0x2e, 0x3b, 0x73, 0x2e, 0x3b, 0x6f, 0x2e, 0x3b, 0x6e,
-0x2e, 0x3b, 0x64, 0x2e, 0x3b, 0x10d8, 0x10d0, 0x10dc, 0x3b, 0x10d7, 0x10d4, 0x10d1, 0x3b, 0x10db, 0x10d0, 0x10e0, 0x3b, 0x10d0, 0x10de, 0x10e0,
-0x3b, 0x10db, 0x10d0, 0x10d8, 0x3b, 0x10d8, 0x10d5, 0x10dc, 0x3b, 0x10d8, 0x10d5, 0x10da, 0x3b, 0x10d0, 0x10d2, 0x10d5, 0x3b, 0x10e1, 0x10d4, 0x10e5,
-0x3b, 0x10dd, 0x10e5, 0x10e2, 0x3b, 0x10dc, 0x10dd, 0x10d4, 0x3b, 0x10d3, 0x10d4, 0x10d9, 0x3b, 0x10d8, 0x10d0, 0x10dc, 0x10d5, 0x10d0, 0x10e0, 0x10d8,
-0x3b, 0x10d7, 0x10d4, 0x10d1, 0x10d4, 0x10e0, 0x10d5, 0x10d0, 0x10da, 0x10d8, 0x3b, 0x10db, 0x10d0, 0x10e0, 0x10e2, 0x10d8, 0x3b, 0x10d0, 0x10de, 0x10e0,
-0x10d8, 0x10da, 0x10d8, 0x3b, 0x10db, 0x10d0, 0x10d8, 0x10e1, 0x10d8, 0x3b, 0x10d8, 0x10d5, 0x10dc, 0x10d8, 0x10e1, 0x10d8, 0x3b, 0x10d8, 0x10d5, 0x10da,
-0x10d8, 0x10e1, 0x10d8, 0x3b, 0x10d0, 0x10d2, 0x10d5, 0x10d8, 0x10e1, 0x10e2, 0x10dd, 0x3b, 0x10e1, 0x10d4, 0x10e5, 0x10e2, 0x10d4, 0x10db, 0x10d1, 0x10d4,
-0x10e0, 0x10d8, 0x3b, 0x10dd, 0x10e5, 0x10e2, 0x10dd, 0x10db, 0x10d1, 0x10d4, 0x10e0, 0x10d8, 0x3b, 0x10dc, 0x10dd, 0x10d4, 0x10db, 0x10d1, 0x10d4, 0x10e0,
-0x10d8, 0x3b, 0x10d3, 0x10d4, 0x10d9, 0x10d4, 0x10db, 0x10d1, 0x10d4, 0x10e0, 0x10d8, 0x3b, 0x10d8, 0x3b, 0x10d7, 0x3b, 0x10db, 0x3b, 0x10d0, 0x3b,
-0x10db, 0x3b, 0x10d8, 0x3b, 0x10d8, 0x3b, 0x10d0, 0x3b, 0x10e1, 0x3b, 0x10dd, 0x3b, 0x10dc, 0x3b, 0x10d3, 0x3b, 0x4a, 0x61, 0x6e, 0x3b,
-0x46, 0x65, 0x62, 0x3b, 0x4d, 0xe4, 0x72, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b,
-0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x75, 0x67, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b,
-0x44, 0x65, 0x7a, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x4d,
-0xe4, 0x72, 0x7a, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a,
-0x75, 0x6c, 0x69, 0x3b, 0x41, 0x75, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72,
-0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44, 0x65,
-0x7a, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4a, 0x61, 0x6e, 0x2e, 0x3b, 0x46, 0x65, 0x62, 0x2e, 0x3b, 0x4d, 0xe4, 0x72,
-0x7a, 0x3b, 0x41, 0x70, 0x72, 0x2e, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x69,
-0x3b, 0x41, 0x75, 0x67, 0x2e, 0x3b, 0x53, 0x65, 0x70, 0x2e, 0x3b, 0x4f, 0x6b, 0x74, 0x2e, 0x3b, 0x4e, 0x6f, 0x76, 0x2e,
-0x3b, 0x44, 0x65, 0x7a, 0x2e, 0x3b, 0x4a, 0xe4, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0xe4, 0x72, 0x3b, 0x41, 0x70,
-0x72, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x75, 0x67, 0x3b, 0x53, 0x65,
-0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x7a, 0x3b, 0x4a, 0xe4, 0x6e, 0x6e, 0x65, 0x72,
-0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x4d, 0xe4, 0x72, 0x7a, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c, 0x3b,
-0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x69, 0x3b, 0x41, 0x75, 0x67, 0x75, 0x73, 0x74,
-0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x4e,
-0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44, 0x65, 0x7a, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4a, 0xe4, 0x6e,
-0x2e, 0x3b, 0x46, 0x65, 0x62, 0x2e, 0x3b, 0x4d, 0xe4, 0x72, 0x7a, 0x3b, 0x41, 0x70, 0x72, 0x2e, 0x3b, 0x4d, 0x61, 0x69,
-0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x69, 0x3b, 0x41, 0x75, 0x67, 0x2e, 0x3b, 0x53, 0x65, 0x70, 0x2e,
-0x3b, 0x4f, 0x6b, 0x74, 0x2e, 0x3b, 0x4e, 0x6f, 0x76, 0x2e, 0x3b, 0x44, 0x65, 0x7a, 0x2e, 0x3b, 0x399, 0x3b1, 0x3bd, 0x3b,
-0x3a6, 0x3b5, 0x3b2, 0x3b, 0x39c, 0x3ac, 0x3c1, 0x3b, 0x391, 0x3c0, 0x3c1, 0x3b, 0x39c, 0x3ac, 0x3b9, 0x3b, 0x399, 0x3bf, 0x3cd, 0x3bd,
-0x3b, 0x399, 0x3bf, 0x3cd, 0x3bb, 0x3b, 0x391, 0x3cd, 0x3b3, 0x3b, 0x3a3, 0x3b5, 0x3c0, 0x3b, 0x39f, 0x3ba, 0x3c4, 0x3b, 0x39d, 0x3bf,
-0x3ad, 0x3b, 0x394, 0x3b5, 0x3ba, 0x3b, 0x399, 0x3b1, 0x3bd, 0x3bf, 0x3c5, 0x3ac, 0x3c1, 0x3b9, 0x3bf, 0x3c2, 0x3b, 0x3a6, 0x3b5, 0x3b2,
-0x3c1, 0x3bf, 0x3c5, 0x3ac, 0x3c1, 0x3b9, 0x3bf, 0x3c2, 0x3b, 0x39c, 0x3ac, 0x3c1, 0x3c4, 0x3b9, 0x3bf, 0x3c2, 0x3b, 0x391, 0x3c0, 0x3c1,
-0x3af, 0x3bb, 0x3b9, 0x3bf, 0x3c2, 0x3b, 0x39c, 0x3ac, 0x3b9, 0x3bf, 0x3c2, 0x3b, 0x399, 0x3bf, 0x3cd, 0x3bd, 0x3b9, 0x3bf, 0x3c2, 0x3b,
-0x399, 0x3bf, 0x3cd, 0x3bb, 0x3b9, 0x3bf, 0x3c2, 0x3b, 0x391, 0x3cd, 0x3b3, 0x3bf, 0x3c5, 0x3c3, 0x3c4, 0x3bf, 0x3c2, 0x3b, 0x3a3, 0x3b5,
-0x3c0, 0x3c4, 0x3ad, 0x3bc, 0x3b2, 0x3c1, 0x3b9, 0x3bf, 0x3c2, 0x3b, 0x39f, 0x3ba, 0x3c4, 0x3ce, 0x3b2, 0x3c1, 0x3b9, 0x3bf, 0x3c2, 0x3b,
-0x39d, 0x3bf, 0x3ad, 0x3bc, 0x3b2, 0x3c1, 0x3b9, 0x3bf, 0x3c2, 0x3b, 0x394, 0x3b5, 0x3ba, 0x3ad, 0x3bc, 0x3b2, 0x3c1, 0x3b9, 0x3bf, 0x3c2,
-0x3b, 0x399, 0x3b, 0x3a6, 0x3b, 0x39c, 0x3b, 0x391, 0x3b, 0x39c, 0x3b, 0x399, 0x3b, 0x399, 0x3b, 0x391, 0x3b, 0x3a3, 0x3b, 0x39f,
-0x3b, 0x39d, 0x3b, 0x394, 0x3b, 0x399, 0x3b1, 0x3bd, 0x3b, 0x3a6, 0x3b5, 0x3b2, 0x3b, 0x39c, 0x3b1, 0x3c1, 0x3b, 0x391, 0x3c0, 0x3c1,
-0x3b, 0x39c, 0x3b1, 0x390, 0x3b, 0x399, 0x3bf, 0x3c5, 0x3bd, 0x3b, 0x399, 0x3bf, 0x3c5, 0x3bb, 0x3b, 0x391, 0x3c5, 0x3b3, 0x3b, 0x3a3,
-0x3b5, 0x3c0, 0x3b, 0x39f, 0x3ba, 0x3c4, 0x3b, 0x39d, 0x3bf, 0x3b5, 0x3b, 0x394, 0x3b5, 0x3ba, 0x3b, 0x399, 0x3b1, 0x3bd, 0x3bf, 0x3c5,
-0x3b1, 0x3c1, 0x3af, 0x3bf, 0x3c5, 0x3b, 0x3a6, 0x3b5, 0x3b2, 0x3c1, 0x3bf, 0x3c5, 0x3b1, 0x3c1, 0x3af, 0x3bf, 0x3c5, 0x3b, 0x39c, 0x3b1,
-0x3c1, 0x3c4, 0x3af, 0x3bf, 0x3c5, 0x3b, 0x391, 0x3c0, 0x3c1, 0x3b9, 0x3bb, 0x3af, 0x3bf, 0x3c5, 0x3b, 0x39c, 0x3b1, 0x390, 0x3bf, 0x3c5,
-0x3b, 0x399, 0x3bf, 0x3c5, 0x3bd, 0x3af, 0x3bf, 0x3c5, 0x3b, 0x399, 0x3bf, 0x3c5, 0x3bb, 0x3af, 0x3bf, 0x3c5, 0x3b, 0x391, 0x3c5, 0x3b3,
-0x3bf, 0x3cd, 0x3c3, 0x3c4, 0x3bf, 0x3c5, 0x3b, 0x3a3, 0x3b5, 0x3c0, 0x3c4, 0x3b5, 0x3bc, 0x3b2, 0x3c1, 0x3af, 0x3bf, 0x3c5, 0x3b, 0x39f,
-0x3ba, 0x3c4, 0x3c9, 0x3b2, 0x3c1, 0x3af, 0x3bf, 0x3c5, 0x3b, 0x39d, 0x3bf, 0x3b5, 0x3bc, 0x3b2, 0x3c1, 0x3af, 0x3bf, 0x3c5, 0x3b, 0x394,
-0x3b5, 0x3ba, 0x3b5, 0x3bc, 0x3b2, 0x3c1, 0x3af, 0x3bf, 0x3c5, 0x3b, 0x6a, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x62, 0x3b, 0x6d, 0x61,
-0x72, 0x3b, 0x61, 0x70, 0x72, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x3b, 0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x75,
-0x67, 0x3b, 0x73, 0x65, 0x70, 0x3b, 0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x76, 0x3b, 0x64, 0x65, 0x63, 0x3b, 0x6a, 0x61,
-0x6e, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x73,
-0x69, 0x3b, 0x61, 0x70, 0x72, 0x69, 0x6c, 0x69, 0x3b, 0x6d, 0x61, 0x6a, 0x69, 0x3b, 0x6a, 0x75, 0x6e, 0x69, 0x3b, 0x6a,
-0x75, 0x6c, 0x69, 0x3b, 0x61, 0x75, 0x67, 0x75, 0x73, 0x74, 0x75, 0x73, 0x69, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d,
-0x62, 0x65, 0x72, 0x69, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x69, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62,
-0x65, 0x72, 0x69, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x69, 0x3b, 0xa9c, 0xabe, 0xaa8, 0xacd, 0xaaf, 0xac1,
-0x3b, 0xaab, 0xac7, 0xaac, 0xacd, 0xab0, 0xac1, 0x3b, 0xaae, 0xabe, 0xab0, 0xacd, 0xa9a, 0x3b, 0xa8f, 0xaaa, 0xacd, 0xab0, 0xabf, 0xab2,
-0x3b, 0xaae, 0xac7, 0x3b, 0xa9c, 0xac2, 0xaa8, 0x3b, 0xa9c, 0xac1, 0xab2, 0xabe, 0xa88, 0x3b, 0xa91, 0xa97, 0xab8, 0xacd, 0xa9f, 0x3b,
-0xab8, 0xaaa, 0xacd, 0xa9f, 0xac7, 0x3b, 0xa91, 0xa95, 0xacd, 0xa9f, 0xacb, 0x3b, 0xaa8, 0xab5, 0xac7, 0x3b, 0xaa1, 0xabf, 0xab8, 0xac7,
-0x3b, 0xa9c, 0xabe, 0xaa8, 0xacd, 0xaaf, 0xac1, 0xa86, 0xab0, 0xac0, 0x3b, 0xaab, 0xac7, 0xaac, 0xacd, 0xab0, 0xac1, 0xa86, 0xab0, 0xac0,
-0x3b, 0xaae, 0xabe, 0xab0, 0xacd, 0xa9a, 0x3b, 0xa8f, 0xaaa, 0xacd, 0xab0, 0xabf, 0xab2, 0x3b, 0xaae, 0xac7, 0x3b, 0xa9c, 0xac2, 0xaa8,
-0x3b, 0xa9c, 0xac1, 0xab2, 0xabe, 0xa88, 0x3b, 0xa91, 0xa97, 0xab8, 0xacd, 0xa9f, 0x3b, 0xab8, 0xaaa, 0xacd, 0xa9f, 0xac7, 0xaae, 0xacd,
-0xaac, 0xab0, 0x3b, 0xa91, 0xa95, 0xacd, 0xa9f, 0xacb, 0xaac, 0xab0, 0x3b, 0xaa8, 0xab5, 0xac7, 0xaae, 0xacd, 0xaac, 0xab0, 0x3b, 0xaa1,
-0xabf, 0xab8, 0xac7, 0xaae, 0xacd, 0xaac, 0xab0, 0x3b, 0xa9c, 0xabe, 0x3b, 0xaab, 0xac7, 0x3b, 0xaae, 0xabe, 0x3b, 0xa8f, 0x3b, 0xaae,
-0xac7, 0x3b, 0xa9c, 0xac2, 0x3b, 0xa9c, 0xac1, 0x3b, 0xa91, 0x3b, 0xab8, 0x3b, 0xa91, 0x3b, 0xaa8, 0x3b, 0xaa1, 0xabf, 0x3b, 0x4a,
-0x61, 0x6e, 0x3b, 0x46, 0x61, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x66, 0x69, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x59,
-0x75, 0x6e, 0x3b, 0x59, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x75, 0x3b, 0x53, 0x61, 0x74, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e,
-0x75, 0x77, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x61, 0x69, 0x72, 0x75, 0x3b, 0x46, 0x61, 0x62, 0x75, 0x72,
-0x61, 0x69, 0x72, 0x75, 0x3b, 0x4d, 0x61, 0x72, 0x69, 0x73, 0x3b, 0x41, 0x66, 0x69, 0x72, 0x69, 0x6c, 0x75, 0x3b, 0x4d,
-0x61, 0x79, 0x75, 0x3b, 0x59, 0x75, 0x6e, 0x69, 0x3b, 0x59, 0x75, 0x6c, 0x69, 0x3b, 0x41, 0x67, 0x75, 0x73, 0x74, 0x61,
-0x3b, 0x53, 0x61, 0x74, 0x75, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x75, 0x77, 0x61,
-0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73, 0x61, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b,
-0x4d, 0x3b, 0x59, 0x3b, 0x59, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x5d9, 0x5e0, 0x5d5, 0x5f3,
-0x3b, 0x5e4, 0x5d1, 0x5e8, 0x5f3, 0x3b, 0x5de, 0x5e8, 0x5e5, 0x3b, 0x5d0, 0x5e4, 0x5e8, 0x5f3, 0x3b, 0x5de, 0x5d0, 0x5d9, 0x3b, 0x5d9,
-0x5d5, 0x5e0, 0x5d9, 0x3b, 0x5d9, 0x5d5, 0x5dc, 0x5d9, 0x3b, 0x5d0, 0x5d5, 0x5d2, 0x5f3, 0x3b, 0x5e1, 0x5e4, 0x5d8, 0x5f3, 0x3b, 0x5d0,
-0x5d5, 0x5e7, 0x5f3, 0x3b, 0x5e0, 0x5d5, 0x5d1, 0x5f3, 0x3b, 0x5d3, 0x5e6, 0x5de, 0x5f3, 0x3b, 0x5d9, 0x5e0, 0x5d5, 0x5d0, 0x5e8, 0x3b,
-0x5e4, 0x5d1, 0x5e8, 0x5d5, 0x5d0, 0x5e8, 0x3b, 0x5de, 0x5e8, 0x5e5, 0x3b, 0x5d0, 0x5e4, 0x5e8, 0x5d9, 0x5dc, 0x3b, 0x5de, 0x5d0, 0x5d9,
-0x3b, 0x5d9, 0x5d5, 0x5e0, 0x5d9, 0x3b, 0x5d9, 0x5d5, 0x5dc, 0x5d9, 0x3b, 0x5d0, 0x5d5, 0x5d2, 0x5d5, 0x5e1, 0x5d8, 0x3b, 0x5e1, 0x5e4,
-0x5d8, 0x5de, 0x5d1, 0x5e8, 0x3b, 0x5d0, 0x5d5, 0x5e7, 0x5d8, 0x5d5, 0x5d1, 0x5e8, 0x3b, 0x5e0, 0x5d5, 0x5d1, 0x5de, 0x5d1, 0x5e8, 0x3b,
-0x5d3, 0x5e6, 0x5de, 0x5d1, 0x5e8, 0x3b, 0x91c, 0x928, 0x970, 0x3b, 0x92b, 0x93c, 0x930, 0x970, 0x3b, 0x92e, 0x93e, 0x930, 0x94d, 0x91a,
-0x3b, 0x905, 0x92a, 0x94d, 0x930, 0x948, 0x932, 0x3b, 0x92e, 0x908, 0x3b, 0x91c, 0x942, 0x928, 0x3b, 0x91c, 0x941, 0x932, 0x970, 0x3b,
-0x905, 0x917, 0x970, 0x3b, 0x938, 0x93f, 0x924, 0x970, 0x3b, 0x905, 0x915, 0x94d, 0x924, 0x942, 0x970, 0x3b, 0x928, 0x935, 0x970, 0x3b,
-0x926, 0x93f, 0x938, 0x970, 0x3b, 0x91c, 0x928, 0x935, 0x930, 0x940, 0x3b, 0x92b, 0x93c, 0x930, 0x935, 0x930, 0x940, 0x3b, 0x92e, 0x93e,
-0x930, 0x94d, 0x91a, 0x3b, 0x905, 0x92a, 0x94d, 0x930, 0x948, 0x932, 0x3b, 0x92e, 0x908, 0x3b, 0x91c, 0x942, 0x928, 0x3b, 0x91c, 0x941,
-0x932, 0x93e, 0x908, 0x3b, 0x905, 0x917, 0x938, 0x94d, 0x924, 0x3b, 0x938, 0x93f, 0x924, 0x902, 0x92c, 0x930, 0x3b, 0x905, 0x915, 0x94d,
-0x924, 0x942, 0x92c, 0x930, 0x3b, 0x928, 0x935, 0x902, 0x92c, 0x930, 0x3b, 0x926, 0x93f, 0x938, 0x902, 0x92c, 0x930, 0x3b, 0x91c, 0x3b,
-0x92b, 0x93c, 0x3b, 0x92e, 0x93e, 0x3b, 0x905, 0x3b, 0x92e, 0x3b, 0x91c, 0x942, 0x3b, 0x91c, 0x941, 0x3b, 0x905, 0x3b, 0x938, 0x93f,
-0x3b, 0x905, 0x3b, 0x928, 0x3b, 0x926, 0x93f, 0x3b, 0x6a, 0x61, 0x6e, 0x2e, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x2e, 0x3b, 0x6d,
-0xe1, 0x72, 0x63, 0x2e, 0x3b, 0xe1, 0x70, 0x72, 0x2e, 0x3b, 0x6d, 0xe1, 0x6a, 0x2e, 0x3b, 0x6a, 0xfa, 0x6e, 0x2e, 0x3b,
-0x6a, 0xfa, 0x6c, 0x2e, 0x3b, 0x61, 0x75, 0x67, 0x2e, 0x3b, 0x73, 0x7a, 0x65, 0x70, 0x74, 0x2e, 0x3b, 0x6f, 0x6b, 0x74,
-0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x63, 0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0xe1, 0x72, 0x3b, 0x66,
-0x65, 0x62, 0x72, 0x75, 0xe1, 0x72, 0x3b, 0x6d, 0xe1, 0x72, 0x63, 0x69, 0x75, 0x73, 0x3b, 0xe1, 0x70, 0x72, 0x69, 0x6c,
-0x69, 0x73, 0x3b, 0x6d, 0xe1, 0x6a, 0x75, 0x73, 0x3b, 0x6a, 0xfa, 0x6e, 0x69, 0x75, 0x73, 0x3b, 0x6a, 0xfa, 0x6c, 0x69,
-0x75, 0x73, 0x3b, 0x61, 0x75, 0x67, 0x75, 0x73, 0x7a, 0x74, 0x75, 0x73, 0x3b, 0x73, 0x7a, 0x65, 0x70, 0x74, 0x65, 0x6d,
-0x62, 0x65, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0xf3, 0x62, 0x65, 0x72, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72,
-0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0xc1, 0x3b, 0x4d, 0x3b,
-0x4a, 0x3b, 0x4a, 0x3b, 0x41, 0x3b, 0x53, 0x7a, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x6a, 0x61, 0x6e, 0x2e, 0x3b,
-0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x2e, 0x3b, 0x61, 0x70, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0xed, 0x3b, 0x6a,
-0xfa, 0x6e, 0x2e, 0x3b, 0x6a, 0xfa, 0x6c, 0x2e, 0x3b, 0xe1, 0x67, 0xfa, 0x2e, 0x3b, 0x73, 0x65, 0x70, 0x2e, 0x3b, 0x6f,
-0x6b, 0x74, 0x2e, 0x3b, 0x6e, 0xf3, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x73, 0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0xfa, 0x61, 0x72,
-0x3b, 0x66, 0x65, 0x62, 0x72, 0xfa, 0x61, 0x72, 0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b, 0x61, 0x70, 0x72, 0xed, 0x6c, 0x3b,
-0x6d, 0x61, 0xed, 0x3b, 0x6a, 0xfa, 0x6e, 0xed, 0x3b, 0x6a, 0xfa, 0x6c, 0xed, 0x3b, 0xe1, 0x67, 0xfa, 0x73, 0x74, 0x3b,
-0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0xf3, 0x62, 0x65, 0x72, 0x3b, 0x6e, 0xf3,
-0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x64, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4a, 0x3b, 0x46, 0x3b,
-0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x4a, 0x3b, 0xc1, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b,
-0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x69, 0x3b,
-0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x74, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b,
-0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x72,
-0x75, 0x61, 0x72, 0x69, 0x3b, 0x4d, 0x61, 0x72, 0x65, 0x74, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x65, 0x69,
-0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x69, 0x3b, 0x41, 0x67, 0x75, 0x73, 0x74, 0x75, 0x73, 0x3b, 0x53,
-0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x4e, 0x6f, 0x76,
-0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x45, 0x61, 0x6e, 0x3b, 0x46,
-0x65, 0x61, 0x62, 0x68, 0x3b, 0x4d, 0xe1, 0x72, 0x74, 0x61, 0x3b, 0x41, 0x69, 0x62, 0x3b, 0x42, 0x65, 0x61, 0x6c, 0x3b,
-0x4d, 0x65, 0x69, 0x74, 0x68, 0x3b, 0x49, 0xfa, 0x69, 0x6c, 0x3b, 0x4c, 0xfa, 0x6e, 0x3b, 0x4d, 0x46, 0xf3, 0x6d, 0x68,
-0x3b, 0x44, 0x46, 0xf3, 0x6d, 0x68, 0x3b, 0x53, 0x61, 0x6d, 0x68, 0x3b, 0x4e, 0x6f, 0x6c, 0x6c, 0x3b, 0x45, 0x61, 0x6e,
-0xe1, 0x69, 0x72, 0x3b, 0x46, 0x65, 0x61, 0x62, 0x68, 0x72, 0x61, 0x3b, 0x4d, 0xe1, 0x72, 0x74, 0x61, 0x3b, 0x41, 0x69,
-0x62, 0x72, 0x65, 0xe1, 0x6e, 0x3b, 0x42, 0x65, 0x61, 0x6c, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x3b, 0x4d, 0x65, 0x69, 0x74,
-0x68, 0x65, 0x61, 0x6d, 0x68, 0x3b, 0x49, 0xfa, 0x69, 0x6c, 0x3b, 0x4c, 0xfa, 0x6e, 0x61, 0x73, 0x61, 0x3b, 0x4d, 0x65,
-0xe1, 0x6e, 0x20, 0x46, 0xf3, 0x6d, 0x68, 0x61, 0x69, 0x72, 0x3b, 0x44, 0x65, 0x69, 0x72, 0x65, 0x61, 0x64, 0x68, 0x20,
-0x46, 0xf3, 0x6d, 0x68, 0x61, 0x69, 0x72, 0x3b, 0x53, 0x61, 0x6d, 0x68, 0x61, 0x69, 0x6e, 0x3b, 0x4e, 0x6f, 0x6c, 0x6c,
-0x61, 0x69, 0x67, 0x3b, 0x45, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x42, 0x3b, 0x4d, 0x3b, 0x49, 0x3b, 0x4c, 0x3b,
-0x4d, 0x3b, 0x44, 0x3b, 0x53, 0x3b, 0x4e, 0x3b, 0x67, 0x65, 0x6e, 0x3b, 0x66, 0x65, 0x62, 0x3b, 0x6d, 0x61, 0x72, 0x3b,
-0x61, 0x70, 0x72, 0x3b, 0x6d, 0x61, 0x67, 0x3b, 0x67, 0x69, 0x75, 0x3b, 0x6c, 0x75, 0x67, 0x3b, 0x61, 0x67, 0x6f, 0x3b,
-0x73, 0x65, 0x74, 0x3b, 0x6f, 0x74, 0x74, 0x3b, 0x6e, 0x6f, 0x76, 0x3b, 0x64, 0x69, 0x63, 0x3b, 0x67, 0x65, 0x6e, 0x6e,
-0x61, 0x69, 0x6f, 0x3b, 0x66, 0x65, 0x62, 0x62, 0x72, 0x61, 0x69, 0x6f, 0x3b, 0x6d, 0x61, 0x72, 0x7a, 0x6f, 0x3b, 0x61,
-0x70, 0x72, 0x69, 0x6c, 0x65, 0x3b, 0x6d, 0x61, 0x67, 0x67, 0x69, 0x6f, 0x3b, 0x67, 0x69, 0x75, 0x67, 0x6e, 0x6f, 0x3b,
-0x6c, 0x75, 0x67, 0x6c, 0x69, 0x6f, 0x3b, 0x61, 0x67, 0x6f, 0x73, 0x74, 0x6f, 0x3b, 0x73, 0x65, 0x74, 0x74, 0x65, 0x6d,
-0x62, 0x72, 0x65, 0x3b, 0x6f, 0x74, 0x74, 0x6f, 0x62, 0x72, 0x65, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x72, 0x65,
-0x3b, 0x64, 0x69, 0x63, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x47, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b,
-0x47, 0x3b, 0x4c, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0xc9c, 0xca8, 0x3b, 0xcab, 0xcc6, 0xcac,
-0xccd, 0xcb0, 0x3b, 0xcae, 0xcbe, 0xcb0, 0xccd, 0xc9a, 0xccd, 0x3b, 0xc8f, 0xcaa, 0xccd, 0xcb0, 0xcbf, 0x3b, 0xcae, 0xcc7, 0x3b, 0xc9c,
-0xcc2, 0xca8, 0xccd, 0x3b, 0xc9c, 0xcc1, 0xcb2, 0xcc8, 0x3b, 0xc86, 0xc97, 0x3b, 0xcb8, 0xcc6, 0xcaa, 0xccd, 0xc9f, 0xcc6, 0xc82, 0x3b,
-0xc85, 0xc95, 0xccd, 0xc9f, 0xccb, 0x3b, 0xca8, 0xcb5, 0xcc6, 0xc82, 0x3b, 0xca1, 0xcbf, 0xcb8, 0xcc6, 0xc82, 0x3b, 0xc9c, 0xca8, 0xcb5,
-0xcb0, 0xcbf, 0x3b, 0xcab, 0xcc6, 0xcac, 0xccd, 0xcb0, 0xcb5, 0xcb0, 0xcbf, 0x3b, 0xcae, 0xcbe, 0xcb0, 0xccd, 0xc9a, 0xccd, 0x3b, 0xc8f,
-0xcaa, 0xccd, 0xcb0, 0xcbf, 0xcb2, 0xccd, 0x3b, 0xcae, 0xcc7, 0x3b, 0xc9c, 0xcc2, 0xca8, 0xccd, 0x3b, 0xc9c, 0xcc1, 0xcb2, 0xcc8, 0x3b,
-0xc86, 0xc97, 0xcb8, 0xccd, 0xc9f, 0xccd, 0x3b, 0xcb8, 0xcc6, 0xcaa, 0xccd, 0xc9f, 0xcc6, 0xc82, 0xcac, 0xcb0, 0xccd, 0x3b, 0xc85, 0xc95,
-0xccd, 0xc9f, 0xccb, 0xcac, 0xcb0, 0xccd, 0x3b, 0xca8, 0xcb5, 0xcc6, 0xc82, 0xcac, 0xcb0, 0xccd, 0x3b, 0xca1, 0xcbf, 0xcb8, 0xcc6, 0xc82,
-0xcac, 0xcb0, 0xccd, 0x3b, 0xc9c, 0x3b, 0xcab, 0xcc6, 0x3b, 0xcae, 0xcbe, 0x3b, 0xc8f, 0x3b, 0xcae, 0xcc7, 0x3b, 0xc9c, 0xcc2, 0x3b,
-0xc9c, 0xcc1, 0x3b, 0xc86, 0x3b, 0xcb8, 0xcc6, 0x3b, 0xc85, 0x3b, 0xca8, 0x3b, 0xca1, 0xcbf, 0x3b, 0x62c, 0x646, 0x624, 0x631, 0x6cc,
-0x3b, 0x641, 0x631, 0x624, 0x631, 0x6cc, 0x3b, 0x645, 0x627, 0x631, 0x655, 0x686, 0x3b, 0x627, 0x67e, 0x631, 0x6cc, 0x644, 0x3b, 0x645,
-0x6cc, 0x654, 0x3b, 0x62c, 0x648, 0x657, 0x646, 0x3b, 0x62c, 0x648, 0x657, 0x644, 0x627, 0x6cc, 0x6cc, 0x3b, 0x627, 0x6af, 0x633, 0x62a,
-0x3b, 0x633, 0x62a, 0x645, 0x628, 0x631, 0x3b, 0x627, 0x6a9, 0x62a, 0x648, 0x657, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x645, 0x628, 0x631,
-0x3b, 0x62f, 0x633, 0x645, 0x628, 0x631, 0x3b, 0x62c, 0x3b, 0x641, 0x3b, 0x645, 0x3b, 0x627, 0x3b, 0x645, 0x3b, 0x62c, 0x3b, 0x62c,
-0x3b, 0x627, 0x3b, 0x633, 0x3b, 0x633, 0x3b, 0x627, 0x3b, 0x646, 0x3b, 0x49a, 0x430, 0x4a3, 0x2e, 0x3b, 0x410, 0x49b, 0x43f, 0x2e,
-0x3b, 0x41d, 0x430, 0x443, 0x2e, 0x3b, 0x421, 0x4d9, 0x443, 0x2e, 0x3b, 0x41c, 0x430, 0x43c, 0x2e, 0x3b, 0x41c, 0x430, 0x443, 0x2e,
-0x3b, 0x428, 0x456, 0x43b, 0x2e, 0x3b, 0x422, 0x430, 0x43c, 0x2e, 0x3b, 0x49a, 0x44b, 0x440, 0x2e, 0x3b, 0x49a, 0x430, 0x437, 0x2e,
-0x3b, 0x49a, 0x430, 0x440, 0x2e, 0x3b, 0x416, 0x435, 0x43b, 0x2e, 0x3b, 0x49a, 0x430, 0x4a3, 0x442, 0x430, 0x440, 0x3b, 0x410, 0x49b,
-0x43f, 0x430, 0x43d, 0x3b, 0x41d, 0x430, 0x443, 0x440, 0x44b, 0x437, 0x3b, 0x421, 0x4d9, 0x443, 0x456, 0x440, 0x3b, 0x41c, 0x430, 0x43c,
-0x44b, 0x440, 0x3b, 0x41c, 0x430, 0x443, 0x441, 0x44b, 0x43c, 0x3b, 0x428, 0x456, 0x43b, 0x434, 0x435, 0x3b, 0x422, 0x430, 0x43c, 0x44b,
-0x437, 0x3b, 0x49a, 0x44b, 0x440, 0x43a, 0x4af, 0x439, 0x435, 0x43a, 0x3b, 0x49a, 0x430, 0x437, 0x430, 0x43d, 0x3b, 0x49a, 0x430, 0x440,
-0x430, 0x448, 0x430, 0x3b, 0x416, 0x435, 0x43b, 0x442, 0x43e, 0x49b, 0x441, 0x430, 0x43d, 0x3b, 0x49a, 0x3b, 0x410, 0x3b, 0x41d, 0x3b,
-0x421, 0x3b, 0x41c, 0x3b, 0x41c, 0x3b, 0x428, 0x3b, 0x422, 0x3b, 0x49a, 0x3b, 0x49a, 0x3b, 0x49a, 0x3b, 0x416, 0x3b, 0x49b, 0x430,
-0x4a3, 0x2e, 0x3b, 0x430, 0x49b, 0x43f, 0x2e, 0x3b, 0x43d, 0x430, 0x443, 0x2e, 0x3b, 0x441, 0x4d9, 0x443, 0x2e, 0x3b, 0x43c, 0x430,
-0x43c, 0x2e, 0x3b, 0x43c, 0x430, 0x443, 0x2e, 0x3b, 0x448, 0x456, 0x43b, 0x2e, 0x3b, 0x442, 0x430, 0x43c, 0x2e, 0x3b, 0x49b, 0x44b,
-0x440, 0x2e, 0x3b, 0x49b, 0x430, 0x437, 0x2e, 0x3b, 0x49b, 0x430, 0x440, 0x2e, 0x3b, 0x436, 0x435, 0x43b, 0x2e, 0x3b, 0x49b, 0x430,
-0x4a3, 0x442, 0x430, 0x440, 0x3b, 0x430, 0x49b, 0x43f, 0x430, 0x43d, 0x3b, 0x43d, 0x430, 0x443, 0x440, 0x44b, 0x437, 0x3b, 0x441, 0x4d9,
-0x443, 0x456, 0x440, 0x3b, 0x43c, 0x430, 0x43c, 0x44b, 0x440, 0x3b, 0x43c, 0x430, 0x443, 0x441, 0x44b, 0x43c, 0x3b, 0x448, 0x456, 0x43b,
-0x434, 0x435, 0x3b, 0x442, 0x430, 0x43c, 0x44b, 0x437, 0x3b, 0x49b, 0x44b, 0x440, 0x43a, 0x4af, 0x439, 0x435, 0x43a, 0x3b, 0x49b, 0x430,
-0x437, 0x430, 0x43d, 0x3b, 0x49b, 0x430, 0x440, 0x430, 0x448, 0x430, 0x3b, 0x436, 0x435, 0x43b, 0x442, 0x43e, 0x49b, 0x441, 0x430, 0x43d,
-0x3b, 0x6d, 0x75, 0x74, 0x2e, 0x3b, 0x67, 0x61, 0x73, 0x2e, 0x3b, 0x77, 0x65, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x74, 0x2e,
-0x3b, 0x67, 0x69, 0x63, 0x2e, 0x3b, 0x6b, 0x61, 0x6d, 0x2e, 0x3b, 0x6e, 0x79, 0x61, 0x2e, 0x3b, 0x6b, 0x61, 0x6e, 0x2e,
-0x3b, 0x6e, 0x7a, 0x65, 0x2e, 0x3b, 0x75, 0x6b, 0x77, 0x2e, 0x3b, 0x75, 0x67, 0x75, 0x2e, 0x3b, 0x75, 0x6b, 0x75, 0x2e,
-0x3b, 0x4d, 0x75, 0x74, 0x61, 0x72, 0x61, 0x6d, 0x61, 0x3b, 0x47, 0x61, 0x73, 0x68, 0x79, 0x61, 0x6e, 0x74, 0x61, 0x72,
-0x65, 0x3b, 0x57, 0x65, 0x72, 0x75, 0x72, 0x77, 0x65, 0x3b, 0x4d, 0x61, 0x74, 0x61, 0x3b, 0x47, 0x69, 0x63, 0x75, 0x72,
-0x61, 0x6e, 0x73, 0x69, 0x3b, 0x4b, 0x61, 0x6d, 0x65, 0x6e, 0x61, 0x3b, 0x4e, 0x79, 0x61, 0x6b, 0x61, 0x6e, 0x67, 0x61,
-0x3b, 0x4b, 0x61, 0x6e, 0x61, 0x6d, 0x61, 0x3b, 0x4e, 0x7a, 0x65, 0x6c, 0x69, 0x3b, 0x55, 0x6b, 0x77, 0x61, 0x6b, 0x69,
-0x72, 0x61, 0x3b, 0x55, 0x67, 0x75, 0x73, 0x68, 0x79, 0x69, 0x6e, 0x67, 0x6f, 0x3b, 0x55, 0x6b, 0x75, 0x62, 0x6f, 0x7a,
-0x61, 0x3b, 0x42f, 0x43d, 0x432, 0x3b, 0x424, 0x435, 0x432, 0x3b, 0x41c, 0x430, 0x440, 0x3b, 0x410, 0x43f, 0x440, 0x3b, 0x41c, 0x430,
-0x439, 0x3b, 0x418, 0x44e, 0x43d, 0x3b, 0x418, 0x44e, 0x43b, 0x3b, 0x410, 0x432, 0x433, 0x3b, 0x421, 0x435, 0x43d, 0x3b, 0x41e, 0x43a,
-0x442, 0x3b, 0x41d, 0x43e, 0x44f, 0x3b, 0x414, 0x435, 0x43a, 0x3b, 0x42f, 0x43d, 0x432, 0x430, 0x440, 0x44c, 0x3b, 0x424, 0x435, 0x432,
-0x440, 0x430, 0x43b, 0x44c, 0x3b, 0x41c, 0x430, 0x440, 0x442, 0x3b, 0x410, 0x43f, 0x440, 0x435, 0x43b, 0x44c, 0x3b, 0x41c, 0x430, 0x439,
-0x3b, 0x418, 0x44e, 0x43d, 0x44c, 0x3b, 0x418, 0x44e, 0x43b, 0x44c, 0x3b, 0x410, 0x432, 0x433, 0x443, 0x441, 0x442, 0x3b, 0x421, 0x435,
-0x43d, 0x442, 0x44f, 0x431, 0x440, 0x44c, 0x3b, 0x41e, 0x43a, 0x442, 0x44f, 0x431, 0x440, 0x44c, 0x3b, 0x41d, 0x43e, 0x44f, 0x431, 0x440,
-0x44c, 0x3b, 0x414, 0x435, 0x43a, 0x430, 0x431, 0x440, 0x44c, 0x3b, 0x42f, 0x3b, 0x424, 0x3b, 0x41c, 0x3b, 0x410, 0x3b, 0x41c, 0x3b,
-0x418, 0x3b, 0x418, 0x3b, 0x410, 0x3b, 0x421, 0x3b, 0x41e, 0x3b, 0x41d, 0x3b, 0x414, 0x3b, 0x44f, 0x43d, 0x432, 0x2e, 0x3b, 0x444,
-0x435, 0x432, 0x2e, 0x3b, 0x43c, 0x430, 0x440, 0x2e, 0x3b, 0x430, 0x43f, 0x440, 0x2e, 0x3b, 0x43c, 0x430, 0x439, 0x3b, 0x438, 0x44e,
-0x43d, 0x2e, 0x3b, 0x438, 0x44e, 0x43b, 0x2e, 0x3b, 0x430, 0x432, 0x433, 0x2e, 0x3b, 0x441, 0x435, 0x43d, 0x2e, 0x3b, 0x43e, 0x43a,
-0x442, 0x2e, 0x3b, 0x43d, 0x43e, 0x44f, 0x2e, 0x3b, 0x434, 0x435, 0x43a, 0x2e, 0x3b, 0x44f, 0x43d, 0x432, 0x430, 0x440, 0x44c, 0x3b,
-0x444, 0x435, 0x432, 0x440, 0x430, 0x43b, 0x44c, 0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430, 0x43f, 0x440, 0x435, 0x43b, 0x44c, 0x3b,
-0x43c, 0x430, 0x439, 0x3b, 0x438, 0x44e, 0x43d, 0x44c, 0x3b, 0x438, 0x44e, 0x43b, 0x44c, 0x3b, 0x430, 0x432, 0x433, 0x443, 0x441, 0x442,
-0x3b, 0x441, 0x435, 0x43d, 0x442, 0x44f, 0x431, 0x440, 0x44c, 0x3b, 0x43e, 0x43a, 0x442, 0x44f, 0x431, 0x440, 0x44c, 0x3b, 0x43d, 0x43e,
-0x44f, 0x431, 0x440, 0x44c, 0x3b, 0x434, 0x435, 0x43a, 0x430, 0x431, 0x440, 0x44c, 0x3b, 0x31, 0xc6d4, 0x3b, 0x32, 0xc6d4, 0x3b, 0x33,
-0xc6d4, 0x3b, 0x34, 0xc6d4, 0x3b, 0x35, 0xc6d4, 0x3b, 0x36, 0xc6d4, 0x3b, 0x37, 0xc6d4, 0x3b, 0x38, 0xc6d4, 0x3b, 0x39, 0xc6d4, 0x3b,
-0x31, 0x30, 0xc6d4, 0x3b, 0x31, 0x31, 0xc6d4, 0x3b, 0x31, 0x32, 0xc6d4, 0x3b, 0x4d, 0x75, 0x74, 0x2e, 0x3b, 0x47, 0x61, 0x73,
-0x2e, 0x3b, 0x57, 0x65, 0x72, 0x2e, 0x3b, 0x4d, 0x61, 0x74, 0x2e, 0x3b, 0x47, 0x69, 0x63, 0x2e, 0x3b, 0x4b, 0x61, 0x6d,
-0x2e, 0x3b, 0x4e, 0x79, 0x61, 0x2e, 0x3b, 0x4b, 0x61, 0x6e, 0x2e, 0x3b, 0x4e, 0x7a, 0x65, 0x2e, 0x3b, 0x55, 0x6b, 0x77,
-0x2e, 0x3b, 0x55, 0x67, 0x75, 0x2e, 0x3b, 0x55, 0x6b, 0x75, 0x2e, 0x3b, 0x4e, 0x7a, 0x65, 0x72, 0x6f, 0x3b, 0x52, 0x75,
-0x68, 0x75, 0x68, 0x75, 0x6d, 0x61, 0x3b, 0x4e, 0x74, 0x77, 0x61, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x3b, 0x4e, 0x64, 0x61,
-0x6d, 0x75, 0x6b, 0x69, 0x7a, 0x61, 0x3b, 0x52, 0x75, 0x73, 0x61, 0x6d, 0x61, 0x3b, 0x52, 0x75, 0x68, 0x65, 0x73, 0x68,
-0x69, 0x3b, 0x4d, 0x75, 0x6b, 0x61, 0x6b, 0x61, 0x72, 0x6f, 0x3b, 0x4e, 0x79, 0x61, 0x6e, 0x64, 0x61, 0x67, 0x61, 0x72,
-0x6f, 0x3b, 0x4e, 0x79, 0x61, 0x6b, 0x61, 0x6e, 0x67, 0x61, 0x3b, 0x47, 0x69, 0x74, 0x75, 0x67, 0x75, 0x74, 0x75, 0x3b,
-0x4d, 0x75, 0x6e, 0x79, 0x6f, 0x6e, 0x79, 0x6f, 0x3b, 0x4b, 0x69, 0x67, 0x61, 0x72, 0x61, 0x6d, 0x61, 0x3b, 0xea1, 0x2e,
-0xe81, 0x2e, 0x3b, 0xe81, 0x2e, 0xe9e, 0x2e, 0x3b, 0xea1, 0x2e, 0xe99, 0x2e, 0x3b, 0xea1, 0x2e, 0xeaa, 0x2e, 0x3b, 0xe9e, 0x2e,
-0xe9e, 0x2e, 0x3b, 0xea1, 0xeb4, 0x2e, 0xe96, 0x2e, 0x3b, 0xe81, 0x2e, 0xea5, 0x2e, 0x3b, 0xeaa, 0x2e, 0xeab, 0x2e, 0x3b, 0xe81,
-0x2e, 0xe8d, 0x2e, 0x3b, 0xe95, 0x2e, 0xea5, 0x2e, 0x3b, 0xe9e, 0x2e, 0xe88, 0x2e, 0x3b, 0xe97, 0x2e, 0xea7, 0x2e, 0x3b, 0xea1,
-0xeb1, 0xe87, 0xe81, 0xead, 0xe99, 0x3b, 0xe81, 0xeb8, 0xea1, 0xe9e, 0xeb2, 0x3b, 0xea1, 0xeb5, 0xe99, 0xeb2, 0x3b, 0xec0, 0xea1, 0xeaa,
-0xeb2, 0x3b, 0xe9e, 0xeb6, 0xe94, 0xeaa, 0xeb0, 0xe9e, 0xeb2, 0x3b, 0xea1, 0xeb4, 0xe96, 0xeb8, 0xe99, 0xeb2, 0x3b, 0xe81, 0xecd, 0xea5,
-0xeb0, 0xe81, 0xebb, 0xe94, 0x3b, 0xeaa, 0xeb4, 0xe87, 0xeab, 0xeb2, 0x3b, 0xe81, 0xeb1, 0xe99, 0xe8d, 0xeb2, 0x3b, 0xe95, 0xeb8, 0xea5,
-0xeb2, 0x3b, 0xe9e, 0xeb0, 0xe88, 0xeb4, 0xe81, 0x3b, 0xe97, 0xeb1, 0xe99, 0xea7, 0xeb2, 0x3b, 0x6a, 0x61, 0x6e, 0x76, 0x2e, 0x3b,
-0x66, 0x65, 0x62, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x73, 0x3b, 0x61, 0x70, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x69,
-0x6a, 0x73, 0x3b, 0x6a, 0x16b, 0x6e, 0x2e, 0x3b, 0x6a, 0x16b, 0x6c, 0x2e, 0x3b, 0x61, 0x75, 0x67, 0x2e, 0x3b, 0x73, 0x65,
-0x70, 0x74, 0x2e, 0x3b, 0x6f, 0x6b, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x63, 0x2e, 0x3b, 0x6a,
-0x61, 0x6e, 0x76, 0x101, 0x72, 0x69, 0x73, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x101, 0x72, 0x69, 0x73, 0x3b, 0x6d, 0x61,
-0x72, 0x74, 0x73, 0x3b, 0x61, 0x70, 0x72, 0x12b, 0x6c, 0x69, 0x73, 0x3b, 0x6d, 0x61, 0x69, 0x6a, 0x73, 0x3b, 0x6a, 0x16b,
-0x6e, 0x69, 0x6a, 0x73, 0x3b, 0x6a, 0x16b, 0x6c, 0x69, 0x6a, 0x73, 0x3b, 0x61, 0x75, 0x67, 0x75, 0x73, 0x74, 0x73, 0x3b,
-0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x72, 0x69, 0x73, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x72, 0x69, 0x73, 0x3b,
-0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x72, 0x69, 0x73, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x72, 0x69, 0x73, 0x3b,
-0x79, 0x61, 0x6e, 0x3b, 0x66, 0x62, 0x6c, 0x3b, 0x6d, 0x73, 0x69, 0x3b, 0x61, 0x70, 0x6c, 0x3b, 0x6d, 0x61, 0x69, 0x3b,
-0x79, 0x75, 0x6e, 0x3b, 0x79, 0x75, 0x6c, 0x3b, 0x61, 0x67, 0x74, 0x3b, 0x73, 0x74, 0x62, 0x3b, 0x254, 0x74, 0x62, 0x3b,
-0x6e, 0x76, 0x62, 0x3b, 0x64, 0x73, 0x62, 0x3b, 0x73, 0xe1, 0x6e, 0x7a, 0xe1, 0x20, 0x79, 0x61, 0x20, 0x79, 0x61, 0x6d,
-0x62, 0x6f, 0x3b, 0x73, 0xe1, 0x6e, 0x7a, 0xe1, 0x20, 0x79, 0x61, 0x20, 0x6d, 0xed, 0x62, 0x61, 0x6c, 0xe9, 0x3b, 0x73,
-0xe1, 0x6e, 0x7a, 0xe1, 0x20, 0x79, 0x61, 0x20, 0x6d, 0xed, 0x73, 0xe1, 0x74, 0x6f, 0x3b, 0x73, 0xe1, 0x6e, 0x7a, 0xe1,
-0x20, 0x79, 0x61, 0x20, 0x6d, 0xed, 0x6e, 0x65, 0x69, 0x3b, 0x73, 0xe1, 0x6e, 0x7a, 0xe1, 0x20, 0x79, 0x61, 0x20, 0x6d,
-0xed, 0x74, 0xe1, 0x6e, 0x6f, 0x3b, 0x73, 0xe1, 0x6e, 0x7a, 0xe1, 0x20, 0x79, 0x61, 0x20, 0x6d, 0x6f, 0x74, 0xf3, 0x62,
-0xe1, 0x3b, 0x73, 0xe1, 0x6e, 0x7a, 0xe1, 0x20, 0x79, 0x61, 0x20, 0x6e, 0x73, 0x61, 0x6d, 0x62, 0x6f, 0x3b, 0x73, 0xe1,
-0x6e, 0x7a, 0xe1, 0x20, 0x79, 0x61, 0x20, 0x6d, 0x77, 0x61, 0x6d, 0x62, 0x65, 0x3b, 0x73, 0xe1, 0x6e, 0x7a, 0xe1, 0x20,
-0x79, 0x61, 0x20, 0x6c, 0x69, 0x62, 0x77, 0x61, 0x3b, 0x73, 0xe1, 0x6e, 0x7a, 0xe1, 0x20, 0x79, 0x61, 0x20, 0x7a, 0xf3,
-0x6d, 0x69, 0x3b, 0x73, 0xe1, 0x6e, 0x7a, 0xe1, 0x20, 0x79, 0x61, 0x20, 0x7a, 0xf3, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20,
-0x6d, 0x254, 0x30c, 0x6b, 0x254, 0x301, 0x3b, 0x73, 0xe1, 0x6e, 0x7a, 0xe1, 0x20, 0x79, 0x61, 0x20, 0x7a, 0xf3, 0x6d, 0x69,
-0x20, 0x6e, 0x61, 0x20, 0x6d, 0xed, 0x62, 0x61, 0x6c, 0xe9, 0x3b, 0x79, 0x3b, 0x66, 0x3b, 0x6d, 0x3b, 0x61, 0x3b, 0x6d,
-0x3b, 0x79, 0x3b, 0x79, 0x3b, 0x61, 0x3b, 0x73, 0x3b, 0x254, 0x3b, 0x6e, 0x3b, 0x64, 0x3b, 0x73, 0x61, 0x75, 0x73, 0x2e,
-0x3b, 0x76, 0x61, 0x73, 0x2e, 0x3b, 0x6b, 0x6f, 0x76, 0x2e, 0x3b, 0x62, 0x61, 0x6c, 0x2e, 0x3b, 0x67, 0x65, 0x67, 0x2e,
-0x3b, 0x62, 0x69, 0x72, 0x17e, 0x2e, 0x3b, 0x6c, 0x69, 0x65, 0x70, 0x2e, 0x3b, 0x72, 0x75, 0x67, 0x70, 0x2e, 0x3b, 0x72,
-0x75, 0x67, 0x73, 0x2e, 0x3b, 0x73, 0x70, 0x61, 0x6c, 0x2e, 0x3b, 0x6c, 0x61, 0x70, 0x6b, 0x72, 0x2e, 0x3b, 0x67, 0x72,
-0x75, 0x6f, 0x64, 0x2e, 0x3b, 0x73, 0x61, 0x75, 0x73, 0x69, 0x73, 0x3b, 0x76, 0x61, 0x73, 0x61, 0x72, 0x69, 0x73, 0x3b,
-0x6b, 0x6f, 0x76, 0x61, 0x73, 0x3b, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x64, 0x69, 0x73, 0x3b, 0x67, 0x65, 0x67, 0x75, 0x17e,
-0x117, 0x3b, 0x62, 0x69, 0x72, 0x17e, 0x65, 0x6c, 0x69, 0x73, 0x3b, 0x6c, 0x69, 0x65, 0x70, 0x61, 0x3b, 0x72, 0x75, 0x67,
-0x70, 0x6a, 0x16b, 0x74, 0x69, 0x73, 0x3b, 0x72, 0x75, 0x67, 0x73, 0x117, 0x6a, 0x69, 0x73, 0x3b, 0x73, 0x70, 0x61, 0x6c,
-0x69, 0x73, 0x3b, 0x6c, 0x61, 0x70, 0x6b, 0x72, 0x69, 0x74, 0x69, 0x73, 0x3b, 0x67, 0x72, 0x75, 0x6f, 0x64, 0x69, 0x73,
-0x3b, 0x53, 0x3b, 0x56, 0x3b, 0x4b, 0x3b, 0x42, 0x3b, 0x47, 0x3b, 0x42, 0x3b, 0x4c, 0x3b, 0x52, 0x3b, 0x52, 0x3b, 0x53,
-0x3b, 0x4c, 0x3b, 0x47, 0x3b, 0x73, 0x61, 0x75, 0x73, 0x69, 0x6f, 0x3b, 0x76, 0x61, 0x73, 0x61, 0x72, 0x69, 0x6f, 0x3b,
-0x6b, 0x6f, 0x76, 0x6f, 0x3b, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x64, 0x17e, 0x69, 0x6f, 0x3b, 0x67, 0x65, 0x67, 0x75, 0x17e,
-0x117, 0x73, 0x3b, 0x62, 0x69, 0x72, 0x17e, 0x65, 0x6c, 0x69, 0x6f, 0x3b, 0x6c, 0x69, 0x65, 0x70, 0x6f, 0x73, 0x3b, 0x72,
-0x75, 0x67, 0x70, 0x6a, 0x16b, 0x10d, 0x69, 0x6f, 0x3b, 0x72, 0x75, 0x67, 0x73, 0x117, 0x6a, 0x6f, 0x3b, 0x73, 0x70, 0x61,
-0x6c, 0x69, 0x6f, 0x3b, 0x6c, 0x61, 0x70, 0x6b, 0x72, 0x69, 0x10d, 0x69, 0x6f, 0x3b, 0x67, 0x72, 0x75, 0x6f, 0x64, 0x17e,
-0x69, 0x6f, 0x3b, 0x458, 0x430, 0x43d, 0x2e, 0x3b, 0x444, 0x435, 0x432, 0x2e, 0x3b, 0x43c, 0x430, 0x440, 0x2e, 0x3b, 0x430, 0x43f,
-0x440, 0x2e, 0x3b, 0x43c, 0x430, 0x458, 0x3b, 0x458, 0x443, 0x43d, 0x2e, 0x3b, 0x458, 0x443, 0x43b, 0x2e, 0x3b, 0x430, 0x432, 0x433,
-0x2e, 0x3b, 0x441, 0x435, 0x43f, 0x442, 0x2e, 0x3b, 0x43e, 0x43a, 0x442, 0x2e, 0x3b, 0x43d, 0x43e, 0x435, 0x43c, 0x2e, 0x3b, 0x434,
-0x435, 0x43a, 0x2e, 0x3b, 0x458, 0x430, 0x43d, 0x443, 0x430, 0x440, 0x438, 0x3b, 0x444, 0x435, 0x432, 0x440, 0x443, 0x430, 0x440, 0x438,
-0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430, 0x43f, 0x440, 0x438, 0x43b, 0x3b, 0x43c, 0x430, 0x458, 0x3b, 0x458, 0x443, 0x43d, 0x438,
-0x3b, 0x458, 0x443, 0x43b, 0x438, 0x3b, 0x430, 0x432, 0x433, 0x443, 0x441, 0x442, 0x3b, 0x441, 0x435, 0x43f, 0x442, 0x435, 0x43c, 0x432,
-0x440, 0x438, 0x3b, 0x43e, 0x43a, 0x442, 0x43e, 0x43c, 0x432, 0x440, 0x438, 0x3b, 0x43d, 0x43e, 0x435, 0x43c, 0x432, 0x440, 0x438, 0x3b,
-0x434, 0x435, 0x43a, 0x435, 0x43c, 0x432, 0x440, 0x438, 0x3b, 0x458, 0x3b, 0x444, 0x3b, 0x43c, 0x3b, 0x430, 0x3b, 0x43c, 0x3b, 0x458,
-0x3b, 0x458, 0x3b, 0x430, 0x3b, 0x441, 0x3b, 0x43e, 0x3b, 0x43d, 0x3b, 0x434, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62,
-0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x79, 0x3b, 0x4a, 0x6f, 0x6e, 0x3b, 0x4a, 0x6f, 0x6c,
-0x3b, 0x41, 0x6f, 0x67, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x73,
-0x3b, 0x4a, 0x61, 0x6e, 0x6f, 0x61, 0x72, 0x79, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x6f, 0x61, 0x72, 0x79, 0x3b, 0x4d, 0x61,
-0x72, 0x74, 0x73, 0x61, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c, 0x79, 0x3b, 0x4d, 0x65, 0x79, 0x3b, 0x4a, 0x6f, 0x6e, 0x61,
-0x3b, 0x4a, 0x6f, 0x6c, 0x61, 0x79, 0x3b, 0x41, 0x6f, 0x67, 0x6f, 0x73, 0x69, 0x74, 0x72, 0x61, 0x3b, 0x53, 0x65, 0x70,
-0x74, 0x61, 0x6d, 0x62, 0x72, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x72, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x61, 0x6d,
-0x62, 0x72, 0x61, 0x3b, 0x44, 0x65, 0x73, 0x61, 0x6d, 0x62, 0x72, 0x61, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62,
-0x3b, 0x4d, 0x61, 0x63, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c,
-0x3b, 0x4f, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69, 0x73,
-0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x4d, 0x61,
-0x63, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x61,
-0x69, 0x3b, 0x4f, 0x67, 0x6f, 0x73, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4f, 0x6b, 0x74,
-0x6f, 0x62, 0x65, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62,
-0x65, 0x72, 0x3b, 0x4a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x4a, 0x3b, 0x4f, 0x3b, 0x53,
-0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0xd1c, 0xd28, 0xd41, 0x3b, 0xd2b, 0xd46, 0xd2c, 0xd4d, 0xd30, 0xd41, 0x3b, 0xd2e, 0xd3e,
-0xd7c, 0x3b, 0xd0f, 0xd2a, 0xd4d, 0xd30, 0xd3f, 0x3b, 0xd2e, 0xd47, 0xd2f, 0xd4d, 0x3b, 0xd1c, 0xd42, 0xd7a, 0x3b, 0xd1c, 0xd42, 0xd32,
-0xd48, 0x3b, 0xd13, 0xd17, 0x3b, 0xd38, 0xd46, 0xd2a, 0xd4d, 0xd31, 0xd4d, 0xd31, 0xd02, 0x3b, 0xd12, 0xd15, 0xd4d, 0xd1f, 0xd4b, 0x3b,
-0xd28, 0xd35, 0xd02, 0x3b, 0xd21, 0xd3f, 0xd38, 0xd02, 0x3b, 0xd1c, 0xd28, 0xd41, 0xd35, 0xd30, 0xd3f, 0x3b, 0xd2b, 0xd46, 0xd2c, 0xd4d,
-0xd30, 0xd41, 0xd35, 0xd30, 0xd3f, 0x3b, 0xd2e, 0xd3e, 0xd7c, 0xd1a, 0xd4d, 0xd1a, 0xd4d, 0x3b, 0xd0f, 0xd2a, 0xd4d, 0xd30, 0xd3f, 0xd7d,
-0x3b, 0xd2e, 0xd47, 0xd2f, 0xd4d, 0x3b, 0xd1c, 0xd42, 0xd7a, 0x3b, 0xd1c, 0xd42, 0xd32, 0xd48, 0x3b, 0xd13, 0xd17, 0xd38, 0xd4d, 0xd31,
-0xd4d, 0xd31, 0xd4d, 0x3b, 0xd38, 0xd46, 0xd2a, 0xd4d, 0xd31, 0xd4d, 0xd31, 0xd02, 0xd2c, 0xd7c, 0x3b, 0xd12, 0xd15, 0xd4d, 0x200c, 0xd1f,
-0xd4b, 0xd2c, 0xd7c, 0x3b, 0xd28, 0xd35, 0xd02, 0xd2c, 0xd7c, 0x3b, 0xd21, 0xd3f, 0xd38, 0xd02, 0xd2c, 0xd7c, 0x3b, 0xd1c, 0x3b, 0xd2b,
-0xd46, 0x3b, 0xd2e, 0xd3e, 0x3b, 0xd0f, 0x3b, 0xd2e, 0xd46, 0x3b, 0xd1c, 0xd42, 0xd7a, 0x3b, 0xd1c, 0xd42, 0x3b, 0xd13, 0x3b, 0xd38,
-0xd46, 0x3b, 0xd12, 0x3b, 0xd28, 0x3b, 0xd21, 0xd3f, 0x3b, 0xd1c, 0x3b, 0xd2b, 0x3b, 0xd2e, 0xd3e, 0x3b, 0xd0f, 0x3b, 0xd2e, 0xd46,
-0x3b, 0xd1c, 0xd42, 0xd7a, 0x3b, 0xd1c, 0xd42, 0x3b, 0xd13, 0x3b, 0xd38, 0xd46, 0x3b, 0xd12, 0x3b, 0xd28, 0x3b, 0xd21, 0xd3f, 0x3b,
-0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x72, 0x61, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x6a, 0x3b,
-0x120, 0x75, 0x6e, 0x3b, 0x4c, 0x75, 0x6c, 0x3b, 0x41, 0x77, 0x77, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x74, 0x74, 0x3b,
-0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69, 0x10b, 0x3b, 0x4a, 0x61, 0x6e, 0x6e, 0x61, 0x72, 0x3b, 0x46, 0x72, 0x61, 0x72, 0x3b,
-0x4d, 0x61, 0x72, 0x7a, 0x75, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x65, 0x6a, 0x6a, 0x75, 0x3b, 0x120, 0x75,
-0x6e, 0x6a, 0x75, 0x3b, 0x4c, 0x75, 0x6c, 0x6a, 0x75, 0x3b, 0x41, 0x77, 0x77, 0x69, 0x73, 0x73, 0x75, 0x3b, 0x53, 0x65,
-0x74, 0x74, 0x65, 0x6d, 0x62, 0x72, 0x75, 0x3b, 0x4f, 0x74, 0x74, 0x75, 0x62, 0x72, 0x75, 0x3b, 0x4e, 0x6f, 0x76, 0x65,
-0x6d, 0x62, 0x72, 0x75, 0x3b, 0x44, 0x69, 0x10b, 0x65, 0x6d, 0x62, 0x72, 0x75, 0x3b, 0x4a, 0x6e, 0x3b, 0x46, 0x72, 0x3b,
-0x4d, 0x7a, 0x3b, 0x41, 0x70, 0x3b, 0x4d, 0x6a, 0x3b, 0x120, 0x6e, 0x3b, 0x4c, 0x6a, 0x3b, 0x41, 0x77, 0x3b, 0x53, 0x74,
-0x3b, 0x4f, 0x62, 0x3b, 0x4e, 0x76, 0x3b, 0x44, 0x10b, 0x3b, 0x4a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b,
-0x120, 0x3b, 0x4c, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x91c, 0x93e, 0x928, 0x947, 0x3b, 0x92b,
-0x947, 0x92c, 0x94d, 0x930, 0x941, 0x3b, 0x92e, 0x93e, 0x930, 0x94d, 0x91a, 0x3b, 0x90f, 0x92a, 0x94d, 0x930, 0x93f, 0x3b, 0x92e, 0x947,
-0x3b, 0x91c, 0x942, 0x928, 0x3b, 0x91c, 0x941, 0x932, 0x948, 0x3b, 0x911, 0x917, 0x3b, 0x938, 0x92a, 0x94d, 0x91f, 0x947, 0x902, 0x3b,
-0x911, 0x915, 0x94d, 0x91f, 0x94b, 0x3b, 0x928, 0x94b, 0x935, 0x94d, 0x939, 0x947, 0x902, 0x3b, 0x921, 0x93f, 0x938, 0x947, 0x902, 0x3b,
-0x91c, 0x93e, 0x928, 0x947, 0x935, 0x93e, 0x930, 0x940, 0x3b, 0x92b, 0x947, 0x92c, 0x94d, 0x930, 0x941, 0x935, 0x93e, 0x930, 0x940, 0x3b,
-0x92e, 0x93e, 0x930, 0x94d, 0x91a, 0x3b, 0x90f, 0x92a, 0x94d, 0x930, 0x93f, 0x932, 0x3b, 0x92e, 0x947, 0x3b, 0x91c, 0x942, 0x928, 0x3b,
-0x91c, 0x941, 0x932, 0x948, 0x3b, 0x911, 0x917, 0x938, 0x94d, 0x91f, 0x3b, 0x938, 0x92a, 0x94d, 0x91f, 0x947, 0x902, 0x92c, 0x930, 0x3b,
-0x911, 0x915, 0x94d, 0x91f, 0x94b, 0x92c, 0x930, 0x3b, 0x928, 0x94b, 0x935, 0x94d, 0x939, 0x947, 0x902, 0x92c, 0x930, 0x3b, 0x921, 0x93f,
-0x938, 0x947, 0x902, 0x92c, 0x930, 0x3b, 0x91c, 0x93e, 0x3b, 0x92b, 0x947, 0x3b, 0x92e, 0x93e, 0x3b, 0x90f, 0x3b, 0x92e, 0x947, 0x3b,
-0x91c, 0x942, 0x3b, 0x91c, 0x941, 0x3b, 0x911, 0x3b, 0x938, 0x3b, 0x911, 0x3b, 0x928, 0x94b, 0x3b, 0x921, 0x93f, 0x3b, 0x31, 0x2d,
-0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x32, 0x2d, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x33, 0x2d, 0x440, 0x20, 0x441, 0x430,
-0x440, 0x3b, 0x34, 0x2d, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x35, 0x2d, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x36, 0x2d,
-0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x37, 0x2d, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x38, 0x2d, 0x440, 0x20, 0x441, 0x430,
-0x440, 0x3b, 0x39, 0x2d, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x31, 0x30, 0x2d, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x31,
-0x31, 0x2d, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x31, 0x32, 0x2d, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x41d, 0x44d, 0x433,
-0x434, 0x4af, 0x433, 0x44d, 0x44d, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x425, 0x43e, 0x451, 0x440, 0x434, 0x443, 0x433, 0x430, 0x430,
-0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x413, 0x443, 0x440, 0x430, 0x432, 0x434, 0x443, 0x433, 0x430, 0x430, 0x440, 0x20, 0x441, 0x430,
-0x440, 0x3b, 0x414, 0x4e9, 0x440, 0x4e9, 0x432, 0x434, 0x4af, 0x433, 0x44d, 0x44d, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x422, 0x430,
-0x432, 0x434, 0x443, 0x433, 0x430, 0x430, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x417, 0x443, 0x440, 0x433, 0x430, 0x434, 0x443, 0x433,
-0x430, 0x430, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x414, 0x43e, 0x43b, 0x434, 0x443, 0x433, 0x430, 0x430, 0x440, 0x20, 0x441, 0x430,
-0x440, 0x3b, 0x41d, 0x430, 0x439, 0x43c, 0x434, 0x443, 0x433, 0x430, 0x430, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x415, 0x441, 0x434,
-0x4af, 0x433, 0x44d, 0x44d, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x410, 0x440, 0x430, 0x432, 0x434, 0x443, 0x433, 0x430, 0x430, 0x440,
-0x20, 0x441, 0x430, 0x440, 0x3b, 0x410, 0x440, 0x432, 0x430, 0x43d, 0x20, 0x43d, 0x44d, 0x433, 0x434, 0x4af, 0x433, 0x44d, 0x44d, 0x440,
-0x20, 0x441, 0x430, 0x440, 0x3b, 0x410, 0x440, 0x432, 0x430, 0x43d, 0x20, 0x445, 0x43e, 0x451, 0x440, 0x434, 0x443, 0x433, 0x430, 0x430,
-0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x91c, 0x928, 0x935, 0x930, 0x940, 0x3b, 0x92b, 0x947, 0x92c, 0x94d, 0x930, 0x941, 0x905, 0x930,
-0x940, 0x3b, 0x92e, 0x93e, 0x930, 0x94d, 0x91a, 0x3b, 0x905, 0x92a, 0x94d, 0x930, 0x93f, 0x932, 0x3b, 0x92e, 0x947, 0x3b, 0x91c, 0x941,
-0x928, 0x3b, 0x91c, 0x941, 0x932, 0x93e, 0x908, 0x3b, 0x905, 0x917, 0x938, 0x94d, 0x91f, 0x3b, 0x938, 0x947, 0x92a, 0x94d, 0x91f, 0x947,
-0x92e, 0x94d, 0x92c, 0x930, 0x3b, 0x905, 0x915, 0x94d, 0x91f, 0x94b, 0x92c, 0x930, 0x3b, 0x928, 0x94b, 0x92d, 0x947, 0x92e, 0x94d, 0x92c,
-0x930, 0x3b, 0x921, 0x93f, 0x938, 0x947, 0x92e, 0x94d, 0x92c, 0x930, 0x3b, 0x967, 0x3b, 0x968, 0x3b, 0x969, 0x3b, 0x96a, 0x3b, 0x96b,
-0x3b, 0x96c, 0x3b, 0x96d, 0x3b, 0x96e, 0x3b, 0x96f, 0x3b, 0x967, 0x966, 0x3b, 0x967, 0x967, 0x3b, 0x967, 0x968, 0x3b, 0x91c, 0x928,
-0x935, 0x930, 0x940, 0x3b, 0x92b, 0x947, 0x92c, 0x94d, 0x930, 0x941, 0x905, 0x930, 0x940, 0x3b, 0x92e, 0x93e, 0x930, 0x94d, 0x91a, 0x3b,
-0x905, 0x92a, 0x94d, 0x930, 0x93f, 0x932, 0x3b, 0x92e, 0x908, 0x3b, 0x91c, 0x941, 0x928, 0x3b, 0x91c, 0x941, 0x932, 0x93e, 0x908, 0x3b,
-0x905, 0x917, 0x938, 0x94d, 0x91f, 0x3b, 0x938, 0x947, 0x92a, 0x94d, 0x91f, 0x947, 0x92e, 0x94d, 0x92c, 0x930, 0x3b, 0x905, 0x915, 0x94d,
-0x91f, 0x94b, 0x92c, 0x930, 0x3b, 0x928, 0x94b, 0x92d, 0x947, 0x92e, 0x94d, 0x92c, 0x930, 0x3b, 0x921, 0x93f, 0x938, 0x947, 0x92e, 0x94d,
-0x92c, 0x930, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x6d, 0x61,
-0x72, 0x73, 0x3b, 0x61, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x61, 0x69, 0x3b, 0x6a, 0x75, 0x6e, 0x69, 0x3b, 0x6a, 0x75,
-0x6c, 0x69, 0x3b, 0x61, 0x75, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b,
-0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x64, 0x65, 0x73,
-0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0xb1c, 0xb3e, 0xb28, 0xb41, 0xb06, 0xb30, 0xb40, 0x3b, 0xb2b, 0xb47, 0xb2c, 0xb43, 0xb06, 0xb30,
-0xb40, 0x3b, 0xb2e, 0xb3e, 0xb30, 0xb4d, 0xb1a, 0xb4d, 0xb1a, 0x3b, 0xb05, 0xb2a, 0xb4d, 0xb30, 0xb47, 0xb32, 0x3b, 0xb2e, 0xb07, 0x3b,
-0xb1c, 0xb41, 0xb28, 0x3b, 0xb1c, 0xb41, 0xb32, 0xb3e, 0xb07, 0x3b, 0xb05, 0xb17, 0xb37, 0xb4d, 0xb1f, 0x3b, 0xb38, 0xb47, 0xb2a, 0xb4d,
-0xb1f, 0xb47, 0xb2e, 0xb4d, 0xb2c, 0xb30, 0x3b, 0xb05, 0xb15, 0xb4d, 0xb1f, 0xb4b, 0xb2c, 0xb30, 0x3b, 0xb28, 0xb2d, 0xb47, 0xb2e, 0xb4d,
-0xb2c, 0xb30, 0x3b, 0xb21, 0xb3f, 0xb38, 0xb47, 0xb2e, 0xb4d, 0xb2c, 0xb30, 0x3b, 0xb1c, 0xb3e, 0x3b, 0xb2b, 0xb47, 0x3b, 0xb2e, 0xb3e,
-0x3b, 0xb05, 0x3b, 0xb2e, 0xb07, 0x3b, 0xb1c, 0xb41, 0x3b, 0xb1c, 0xb41, 0x3b, 0xb05, 0x3b, 0xb38, 0xb47, 0x3b, 0xb05, 0x3b, 0xb28,
-0x3b, 0xb21, 0xb3f, 0x3b, 0x62c, 0x646, 0x648, 0x631, 0x64a, 0x3b, 0x641, 0x628, 0x631, 0x648, 0x631, 0x64a, 0x3b, 0x645, 0x627, 0x631,
-0x686, 0x3b, 0x627, 0x67e, 0x631, 0x6cc, 0x644, 0x3b, 0x645, 0x6cd, 0x3b, 0x62c, 0x648, 0x646, 0x3b, 0x62c, 0x648, 0x644, 0x627, 0x6cc,
-0x3b, 0x627, 0x6ab, 0x633, 0x62a, 0x3b, 0x633, 0x67e, 0x62a, 0x645, 0x628, 0x631, 0x3b, 0x627, 0x6a9, 0x62a, 0x648, 0x628, 0x631, 0x3b,
-0x646, 0x648, 0x645, 0x628, 0x631, 0x3b, 0x62f, 0x633, 0x645, 0x628, 0x631, 0x3b, 0x698, 0x627, 0x646, 0x648, 0x6cc, 0x647, 0x3b, 0x641,
-0x648, 0x631, 0x6cc, 0x647, 0x3b, 0x645, 0x627, 0x631, 0x633, 0x3b, 0x622, 0x648, 0x631, 0x6cc, 0x644, 0x3b, 0x645, 0x647, 0x3b, 0x698,
-0x648, 0x626, 0x646, 0x3b, 0x698, 0x648, 0x626, 0x6cc, 0x647, 0x3b, 0x627, 0x648, 0x62a, 0x3b, 0x633, 0x67e, 0x62a, 0x627, 0x645, 0x628,
-0x631, 0x3b, 0x627, 0x6a9, 0x62a, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x627, 0x645, 0x628, 0x631, 0x3b, 0x62f, 0x633, 0x627, 0x645, 0x628,
-0x631, 0x3b, 0x698, 0x3b, 0x641, 0x3b, 0x645, 0x3b, 0x622, 0x3b, 0x645, 0x3b, 0x698, 0x3b, 0x698, 0x3b, 0x627, 0x3b, 0x633, 0x3b,
-0x627, 0x3b, 0x646, 0x3b, 0x62f, 0x3b, 0x698, 0x627, 0x646, 0x648, 0x6cc, 0x647, 0x654, 0x3b, 0x641, 0x648, 0x631, 0x6cc, 0x647, 0x654,
-0x3b, 0x645, 0x627, 0x631, 0x633, 0x3b, 0x622, 0x648, 0x631, 0x6cc, 0x644, 0x3b, 0x645, 0x647, 0x654, 0x3b, 0x698, 0x648, 0x626, 0x646,
-0x3b, 0x698, 0x648, 0x626, 0x6cc, 0x647, 0x654, 0x3b, 0x627, 0x648, 0x62a, 0x3b, 0x633, 0x67e, 0x62a, 0x627, 0x645, 0x628, 0x631, 0x3b,
-0x627, 0x6a9, 0x62a, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x627, 0x645, 0x628, 0x631, 0x3b, 0x62f, 0x633, 0x627, 0x645, 0x628, 0x631, 0x3b,
-0x62c, 0x646, 0x648, 0x631, 0x6cc, 0x3b, 0x641, 0x628, 0x631, 0x648, 0x631, 0x6cc, 0x3b, 0x645, 0x627, 0x631, 0x686, 0x3b, 0x627, 0x67e,
-0x631, 0x6cc, 0x644, 0x3b, 0x645, 0x6cc, 0x3b, 0x62c, 0x648, 0x646, 0x3b, 0x62c, 0x648, 0x644, 0x627, 0x6cc, 0x3b, 0x627, 0x6af, 0x633,
-0x62a, 0x3b, 0x633, 0x67e, 0x62a, 0x645, 0x628, 0x631, 0x3b, 0x627, 0x6a9, 0x62a, 0x648, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x645, 0x628,
-0x631, 0x3b, 0x62f, 0x633, 0x645, 0x628, 0x631, 0x3b, 0x62c, 0x3b, 0x641, 0x3b, 0x645, 0x3b, 0x627, 0x3b, 0x645, 0x3b, 0x62c, 0x3b,
-0x62c, 0x3b, 0x627, 0x3b, 0x633, 0x3b, 0x627, 0x3b, 0x646, 0x3b, 0x62f, 0x3b, 0x62c, 0x646, 0x648, 0x3b, 0x641, 0x628, 0x631, 0x648,
-0x631, 0x6cc, 0x3b, 0x645, 0x627, 0x631, 0x686, 0x3b, 0x627, 0x67e, 0x631, 0x6cc, 0x644, 0x3b, 0x645, 0x6cc, 0x3b, 0x62c, 0x648, 0x646,
-0x3b, 0x62c, 0x648, 0x644, 0x3b, 0x627, 0x6af, 0x633, 0x62a, 0x3b, 0x633, 0x67e, 0x62a, 0x645, 0x628, 0x631, 0x3b, 0x627, 0x6a9, 0x62a,
-0x648, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x645, 0x628, 0x631, 0x3b, 0x62f, 0x633, 0x645, 0x3b, 0x73, 0x74, 0x79, 0x3b, 0x6c, 0x75,
-0x74, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x6b, 0x77, 0x69, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x63, 0x7a, 0x65, 0x3b, 0x6c, 0x69,
-0x70, 0x3b, 0x73, 0x69, 0x65, 0x3b, 0x77, 0x72, 0x7a, 0x3b, 0x70, 0x61, 0x17a, 0x3b, 0x6c, 0x69, 0x73, 0x3b, 0x67, 0x72,
-0x75, 0x3b, 0x73, 0x74, 0x79, 0x63, 0x7a, 0x65, 0x144, 0x3b, 0x6c, 0x75, 0x74, 0x79, 0x3b, 0x6d, 0x61, 0x72, 0x7a, 0x65,
-0x63, 0x3b, 0x6b, 0x77, 0x69, 0x65, 0x63, 0x69, 0x65, 0x144, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x63, 0x7a, 0x65, 0x72, 0x77,
-0x69, 0x65, 0x63, 0x3b, 0x6c, 0x69, 0x70, 0x69, 0x65, 0x63, 0x3b, 0x73, 0x69, 0x65, 0x72, 0x70, 0x69, 0x65, 0x144, 0x3b,
-0x77, 0x72, 0x7a, 0x65, 0x73, 0x69, 0x65, 0x144, 0x3b, 0x70, 0x61, 0x17a, 0x64, 0x7a, 0x69, 0x65, 0x72, 0x6e, 0x69, 0x6b,
-0x3b, 0x6c, 0x69, 0x73, 0x74, 0x6f, 0x70, 0x61, 0x64, 0x3b, 0x67, 0x72, 0x75, 0x64, 0x7a, 0x69, 0x65, 0x144, 0x3b, 0x53,
-0x3b, 0x4c, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x4d, 0x3b, 0x43, 0x3b, 0x4c, 0x3b, 0x53, 0x3b, 0x57, 0x3b, 0x50, 0x3b, 0x4c,
-0x3b, 0x47, 0x3b, 0x73, 0x74, 0x79, 0x63, 0x7a, 0x6e, 0x69, 0x61, 0x3b, 0x6c, 0x75, 0x74, 0x65, 0x67, 0x6f, 0x3b, 0x6d,
-0x61, 0x72, 0x63, 0x61, 0x3b, 0x6b, 0x77, 0x69, 0x65, 0x74, 0x6e, 0x69, 0x61, 0x3b, 0x6d, 0x61, 0x6a, 0x61, 0x3b, 0x63,
-0x7a, 0x65, 0x72, 0x77, 0x63, 0x61, 0x3b, 0x6c, 0x69, 0x70, 0x63, 0x61, 0x3b, 0x73, 0x69, 0x65, 0x72, 0x70, 0x6e, 0x69,
-0x61, 0x3b, 0x77, 0x72, 0x7a, 0x65, 0x15b, 0x6e, 0x69, 0x61, 0x3b, 0x70, 0x61, 0x17a, 0x64, 0x7a, 0x69, 0x65, 0x72, 0x6e,
-0x69, 0x6b, 0x61, 0x3b, 0x6c, 0x69, 0x73, 0x74, 0x6f, 0x70, 0x61, 0x64, 0x61, 0x3b, 0x67, 0x72, 0x75, 0x64, 0x6e, 0x69,
-0x61, 0x3b, 0x73, 0x3b, 0x6c, 0x3b, 0x6d, 0x3b, 0x6b, 0x3b, 0x6d, 0x3b, 0x63, 0x3b, 0x6c, 0x3b, 0x73, 0x3b, 0x77, 0x3b,
-0x70, 0x3b, 0x6c, 0x3b, 0x67, 0x3b, 0x6a, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x76, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x61, 0x62,
-0x72, 0x3b, 0x6d, 0x61, 0x69, 0x3b, 0x6a, 0x75, 0x6e, 0x3b, 0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x67, 0x6f, 0x3b, 0x73, 0x65,
-0x74, 0x3b, 0x6f, 0x75, 0x74, 0x3b, 0x6e, 0x6f, 0x76, 0x3b, 0x64, 0x65, 0x7a, 0x3b, 0x6a, 0x61, 0x6e, 0x65, 0x69, 0x72,
-0x6f, 0x3b, 0x66, 0x65, 0x76, 0x65, 0x72, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x6d, 0x61, 0x72, 0xe7, 0x6f, 0x3b, 0x61, 0x62,
-0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x61, 0x69, 0x6f, 0x3b, 0x6a, 0x75, 0x6e, 0x68, 0x6f, 0x3b, 0x6a, 0x75, 0x6c, 0x68, 0x6f,
+0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x64, 0x65, 0x63, 0x65,
+0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6a, 0x61, 0x6e, 0x2e, 0x3b, 0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x72, 0x74, 0x2e, 0x3b,
+0x61, 0x70, 0x72, 0x2e, 0x3b, 0x6d, 0x65, 0x69, 0x3b, 0x6a, 0x75, 0x6e, 0x2e, 0x3b, 0x6a, 0x75, 0x6c, 0x2e, 0x3b, 0x61,
+0x75, 0x67, 0x2e, 0x3b, 0x73, 0x65, 0x70, 0x2e, 0x3b, 0x6f, 0x6b, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64,
+0x65, 0x63, 0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x69,
+0x3b, 0x6d, 0x61, 0x61, 0x72, 0x74, 0x3b, 0x61, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x65, 0x69, 0x3b, 0x6a, 0x75, 0x6e,
+0x69, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x3b, 0x61, 0x75, 0x67, 0x75, 0x73, 0x74, 0x75, 0x73, 0x3b, 0x73, 0x65, 0x70, 0x74,
+0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62,
+0x65, 0x72, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4a, 0x61, 0x6e, 0x2e, 0x3b, 0x46, 0x65, 0x62,
+0x2e, 0x3b, 0x4d, 0x61, 0x72, 0x2e, 0x3b, 0x41, 0x70, 0x72, 0x2e, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x4a, 0x75, 0x6e, 0x2e,
+0x3b, 0x4a, 0x75, 0x6c, 0x2e, 0x3b, 0x41, 0x75, 0x67, 0x2e, 0x3b, 0x53, 0x65, 0x70, 0x2e, 0x3b, 0x4f, 0x63, 0x74, 0x2e,
+0x3b, 0x4e, 0x6f, 0x76, 0x2e, 0x3b, 0x44, 0x65, 0x63, 0x2e, 0x3b, 0x6a, 0x61, 0x61, 0x6e, 0x3b, 0x76, 0x65, 0x65, 0x62,
+0x72, 0x3b, 0x6d, 0xe4, 0x72, 0x74, 0x73, 0x3b, 0x61, 0x70, 0x72, 0x3b, 0x6d, 0x61, 0x69, 0x3b, 0x6a, 0x75, 0x75, 0x6e,
+0x69, 0x3b, 0x6a, 0x75, 0x75, 0x6c, 0x69, 0x3b, 0x61, 0x75, 0x67, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x3b, 0x6f, 0x6b, 0x74,
+0x3b, 0x6e, 0x6f, 0x76, 0x3b, 0x64, 0x65, 0x74, 0x73, 0x3b, 0x6a, 0x61, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b, 0x76, 0x65,
+0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x6d, 0xe4, 0x72, 0x74, 0x73, 0x3b, 0x61, 0x70, 0x72, 0x69, 0x6c, 0x6c, 0x3b,
+0x6d, 0x61, 0x69, 0x3b, 0x6a, 0x75, 0x75, 0x6e, 0x69, 0x3b, 0x6a, 0x75, 0x75, 0x6c, 0x69, 0x3b, 0x61, 0x75, 0x67, 0x75,
+0x73, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x6f, 0x62, 0x65,
+0x72, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x64, 0x65, 0x74, 0x73, 0x65, 0x6d, 0x62, 0x65, 0x72,
+0x3b, 0x4a, 0x3b, 0x56, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x4a, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f,
+0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x6a, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x62, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x61, 0x70, 0x72,
+0x3b, 0x6d, 0x61, 0x69, 0x3b, 0x6a, 0x75, 0x6e, 0x3b, 0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x75, 0x67, 0x3b, 0x73, 0x65, 0x70,
+0x3b, 0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x76, 0x3b, 0x64, 0x65, 0x73, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b,
+0x66, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b, 0x61, 0x70, 0x72, 0xed, 0x6c, 0x3b, 0x6d,
+0x61, 0x69, 0x3b, 0x6a, 0x75, 0x6e, 0x69, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x3b, 0x61, 0x75, 0x67, 0x75, 0x73, 0x74, 0x3b,
+0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x6e, 0x6f,
+0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x64, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6a, 0x61, 0x6e, 0x2e,
+0x3b, 0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x2e, 0x3b, 0x61, 0x70, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x69, 0x3b,
+0x6a, 0x75, 0x6e, 0x2e, 0x3b, 0x6a, 0x75, 0x6c, 0x2e, 0x3b, 0x61, 0x75, 0x67, 0x2e, 0x3b, 0x73, 0x65, 0x70, 0x2e, 0x3b,
+0x6f, 0x6b, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x73, 0x2e, 0x3b, 0x74, 0x61, 0x6d, 0x6d, 0x69,
+0x3b, 0x68, 0x65, 0x6c, 0x6d, 0x69, 0x3b, 0x6d, 0x61, 0x61, 0x6c, 0x69, 0x73, 0x3b, 0x68, 0x75, 0x68, 0x74, 0x69, 0x3b,
+0x74, 0x6f, 0x75, 0x6b, 0x6f, 0x3b, 0x6b, 0x65, 0x73, 0xe4, 0x3b, 0x68, 0x65, 0x69, 0x6e, 0xe4, 0x3b, 0x65, 0x6c, 0x6f,
+0x3b, 0x73, 0x79, 0x79, 0x73, 0x3b, 0x6c, 0x6f, 0x6b, 0x61, 0x3b, 0x6d, 0x61, 0x72, 0x72, 0x61, 0x73, 0x3b, 0x6a, 0x6f,
+0x75, 0x6c, 0x75, 0x3b, 0x74, 0x61, 0x6d, 0x6d, 0x69, 0x6b, 0x75, 0x75, 0x3b, 0x68, 0x65, 0x6c, 0x6d, 0x69, 0x6b, 0x75,
+0x75, 0x3b, 0x6d, 0x61, 0x61, 0x6c, 0x69, 0x73, 0x6b, 0x75, 0x75, 0x3b, 0x68, 0x75, 0x68, 0x74, 0x69, 0x6b, 0x75, 0x75,
+0x3b, 0x74, 0x6f, 0x75, 0x6b, 0x6f, 0x6b, 0x75, 0x75, 0x3b, 0x6b, 0x65, 0x73, 0xe4, 0x6b, 0x75, 0x75, 0x3b, 0x68, 0x65,
+0x69, 0x6e, 0xe4, 0x6b, 0x75, 0x75, 0x3b, 0x65, 0x6c, 0x6f, 0x6b, 0x75, 0x75, 0x3b, 0x73, 0x79, 0x79, 0x73, 0x6b, 0x75,
+0x75, 0x3b, 0x6c, 0x6f, 0x6b, 0x61, 0x6b, 0x75, 0x75, 0x3b, 0x6d, 0x61, 0x72, 0x72, 0x61, 0x73, 0x6b, 0x75, 0x75, 0x3b,
+0x6a, 0x6f, 0x75, 0x6c, 0x75, 0x6b, 0x75, 0x75, 0x3b, 0x54, 0x3b, 0x48, 0x3b, 0x4d, 0x3b, 0x48, 0x3b, 0x54, 0x3b, 0x4b,
+0x3b, 0x48, 0x3b, 0x45, 0x3b, 0x53, 0x3b, 0x4c, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x74, 0x61, 0x6d, 0x6d, 0x69, 0x6b, 0x2e,
+0x3b, 0x68, 0x65, 0x6c, 0x6d, 0x69, 0x6b, 0x2e, 0x3b, 0x6d, 0x61, 0x61, 0x6c, 0x69, 0x73, 0x6b, 0x2e, 0x3b, 0x68, 0x75,
+0x68, 0x74, 0x69, 0x6b, 0x2e, 0x3b, 0x74, 0x6f, 0x75, 0x6b, 0x6f, 0x6b, 0x2e, 0x3b, 0x6b, 0x65, 0x73, 0xe4, 0x6b, 0x2e,
+0x3b, 0x68, 0x65, 0x69, 0x6e, 0xe4, 0x6b, 0x2e, 0x3b, 0x65, 0x6c, 0x6f, 0x6b, 0x2e, 0x3b, 0x73, 0x79, 0x79, 0x73, 0x6b,
+0x2e, 0x3b, 0x6c, 0x6f, 0x6b, 0x61, 0x6b, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x72, 0x61, 0x73, 0x6b, 0x2e, 0x3b, 0x6a, 0x6f,
+0x75, 0x6c, 0x75, 0x6b, 0x2e, 0x3b, 0x74, 0x61, 0x6d, 0x6d, 0x69, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x68, 0x65, 0x6c,
+0x6d, 0x69, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x6d, 0x61, 0x61, 0x6c, 0x69, 0x73, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b,
+0x68, 0x75, 0x68, 0x74, 0x69, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x74, 0x6f, 0x75, 0x6b, 0x6f, 0x6b, 0x75, 0x75, 0x74,
+0x61, 0x3b, 0x6b, 0x65, 0x73, 0xe4, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x68, 0x65, 0x69, 0x6e, 0xe4, 0x6b, 0x75, 0x75,
+0x74, 0x61, 0x3b, 0x65, 0x6c, 0x6f, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x73, 0x79, 0x79, 0x73, 0x6b, 0x75, 0x75, 0x74,
+0x61, 0x3b, 0x6c, 0x6f, 0x6b, 0x61, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x6d, 0x61, 0x72, 0x72, 0x61, 0x73, 0x6b, 0x75,
+0x75, 0x74, 0x61, 0x3b, 0x6a, 0x6f, 0x75, 0x6c, 0x75, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x6a, 0x61, 0x6e, 0x76, 0x2e,
+0x3b, 0x66, 0xe9, 0x76, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b, 0x61, 0x76, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x69,
+0x3b, 0x6a, 0x75, 0x69, 0x6e, 0x3b, 0x6a, 0x75, 0x69, 0x6c, 0x2e, 0x3b, 0x61, 0x6f, 0xfb, 0x74, 0x3b, 0x73, 0x65, 0x70,
+0x74, 0x2e, 0x3b, 0x6f, 0x63, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0xe9, 0x63, 0x2e, 0x3b, 0x6a, 0x61,
+0x6e, 0x76, 0x69, 0x65, 0x72, 0x3b, 0x66, 0xe9, 0x76, 0x72, 0x69, 0x65, 0x72, 0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b, 0x61,
+0x76, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x61, 0x69, 0x3b, 0x6a, 0x75, 0x69, 0x6e, 0x3b, 0x6a, 0x75, 0x69, 0x6c, 0x6c, 0x65,
+0x74, 0x3b, 0x61, 0x6f, 0xfb, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x6f, 0x63, 0x74,
+0x6f, 0x62, 0x72, 0x65, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x64, 0xe9, 0x63, 0x65, 0x6d, 0x62,
+0x72, 0x65, 0x3b, 0x6a, 0x61, 0x6e, 0x76, 0x2e, 0x3b, 0x66, 0xe9, 0x76, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b,
+0x61, 0x76, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x69, 0x3b, 0x6a, 0x75, 0x69, 0x6e, 0x3b, 0x6a, 0x75, 0x69, 0x6c, 0x6c, 0x2e,
+0x3b, 0x61, 0x6f, 0xfb, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x2e, 0x3b, 0x6f, 0x63, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76,
+0x2e, 0x3b, 0x64, 0xe9, 0x63, 0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0x2e, 0x3b, 0x66, 0xe9, 0x76, 0x2e, 0x3b, 0x6d, 0x61, 0x72,
+0x2e, 0x3b, 0x61, 0x76, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x69, 0x3b, 0x6a, 0x75, 0x69, 0x2e, 0x3b, 0x6a, 0x75, 0x69, 0x6c,
+0x2e, 0x3b, 0x61, 0x6f, 0xfb, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x2e, 0x3b, 0x6f, 0x63, 0x74, 0x2e, 0x3b, 0x6e, 0x6f,
+0x76, 0x2e, 0x3b, 0x64, 0xe9, 0x63, 0x2e, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x72, 0x74, 0x3b,
+0x41, 0x70, 0x72, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x75, 0x67, 0x3b,
+0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x6e,
+0x65, 0x77, 0x61, 0x72, 0x69, 0x73, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x65, 0x77, 0x61, 0x72, 0x69, 0x73, 0x3b, 0x4d, 0x61,
+0x61, 0x72, 0x74, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x61, 0x69, 0x65, 0x3b, 0x4a, 0x75, 0x6e, 0x79,
+0x3b, 0x4a, 0x75, 0x6c, 0x79, 0x3b, 0x41, 0x75, 0x67, 0x75, 0x73, 0x74, 0x75, 0x73, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x69,
+0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0x69, 0x6d, 0x62, 0x65,
+0x72, 0x3b, 0x44, 0x65, 0x73, 0x69, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x46, 0x61, 0x6f, 0x69, 0x3b, 0x47, 0x65, 0x61, 0x72,
+0x72, 0x3b, 0x4d, 0xe0, 0x72, 0x74, 0x3b, 0x47, 0x69, 0x62, 0x6c, 0x3b, 0x43, 0xe8, 0x69, 0x74, 0x3b, 0xd2, 0x67, 0x6d,
+0x68, 0x3b, 0x49, 0x75, 0x63, 0x68, 0x3b, 0x4c, 0xf9, 0x6e, 0x61, 0x3b, 0x53, 0x75, 0x6c, 0x74, 0x3b, 0x44, 0xe0, 0x6d,
+0x68, 0x3b, 0x53, 0x61, 0x6d, 0x68, 0x3b, 0x44, 0xf9, 0x62, 0x68, 0x3b, 0x41, 0x6d, 0x20, 0x46, 0x61, 0x6f, 0x69, 0x6c,
+0x6c, 0x65, 0x61, 0x63, 0x68, 0x3b, 0x41, 0x6e, 0x20, 0x47, 0x65, 0x61, 0x72, 0x72, 0x61, 0x6e, 0x3b, 0x41, 0x6d, 0x20,
+0x4d, 0xe0, 0x72, 0x74, 0x3b, 0x41, 0x6e, 0x20, 0x47, 0x69, 0x62, 0x6c, 0x65, 0x61, 0x6e, 0x3b, 0x41, 0x6e, 0x20, 0x43,
+0xe8, 0x69, 0x74, 0x65, 0x61, 0x6e, 0x3b, 0x41, 0x6e, 0x20, 0x74, 0x2d, 0xd2, 0x67, 0x6d, 0x68, 0x69, 0x6f, 0x73, 0x3b,
+0x41, 0x6e, 0x20, 0x74, 0x2d, 0x49, 0x75, 0x63, 0x68, 0x61, 0x72, 0x3b, 0x41, 0x6e, 0x20, 0x4c, 0xf9, 0x6e, 0x61, 0x73,
+0x74, 0x61, 0x6c, 0x3b, 0x41, 0x6e, 0x20, 0x74, 0x2d, 0x53, 0x75, 0x6c, 0x74, 0x61, 0x69, 0x6e, 0x3b, 0x41, 0x6e, 0x20,
+0x44, 0xe0, 0x6d, 0x68, 0x61, 0x69, 0x72, 0x3b, 0x41, 0x6e, 0x20, 0x74, 0x2d, 0x53, 0x61, 0x6d, 0x68, 0x61, 0x69, 0x6e,
+0x3b, 0x41, 0x6e, 0x20, 0x44, 0xf9, 0x62, 0x68, 0x6c, 0x61, 0x63, 0x68, 0x64, 0x3b, 0x46, 0x3b, 0x47, 0x3b, 0x4d, 0x3b,
+0x47, 0x3b, 0x43, 0x3b, 0xd2, 0x3b, 0x49, 0x3b, 0x4c, 0x3b, 0x53, 0x3b, 0x44, 0x3b, 0x53, 0x3b, 0x44, 0x3b, 0x64, 0x68,
+0x65, 0x6e, 0x20, 0x46, 0x68, 0x61, 0x6f, 0x69, 0x6c, 0x6c, 0x65, 0x61, 0x63, 0x68, 0x3b, 0x64, 0x68, 0x65, 0x6e, 0x20,
+0x47, 0x68, 0x65, 0x61, 0x72, 0x72, 0x61, 0x6e, 0x3b, 0x64, 0x68, 0x65, 0x6e, 0x20, 0x4d, 0x68, 0xe0, 0x72, 0x74, 0x3b,
+0x64, 0x68, 0x65, 0x6e, 0x20, 0x47, 0x68, 0x69, 0x62, 0x6c, 0x65, 0x61, 0x6e, 0x3b, 0x64, 0x68, 0x65, 0x6e, 0x20, 0x43,
+0x68, 0xe8, 0x69, 0x74, 0x65, 0x61, 0x6e, 0x3b, 0x64, 0x68, 0x65, 0x6e, 0x20, 0xd2, 0x67, 0x6d, 0x68, 0x69, 0x6f, 0x73,
+0x3b, 0x64, 0x68, 0x65, 0x6e, 0x20, 0x49, 0x75, 0x63, 0x68, 0x61, 0x72, 0x3b, 0x64, 0x68, 0x65, 0x6e, 0x20, 0x4c, 0xf9,
+0x6e, 0x61, 0x73, 0x74, 0x61, 0x6c, 0x3b, 0x64, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x2d, 0x53, 0x75, 0x6c, 0x74, 0x61, 0x69,
+0x6e, 0x3b, 0x64, 0x68, 0x65, 0x6e, 0x20, 0x44, 0xe0, 0x6d, 0x68, 0x61, 0x69, 0x72, 0x3b, 0x64, 0x68, 0x65, 0x6e, 0x20,
+0x74, 0x2d, 0x53, 0x61, 0x6d, 0x68, 0x61, 0x69, 0x6e, 0x3b, 0x64, 0x68, 0x65, 0x6e, 0x20, 0x44, 0xf9, 0x62, 0x68, 0x6c,
+0x61, 0x63, 0x68, 0x64, 0x3b, 0x58, 0x61, 0x6e, 0x2e, 0x3b, 0x46, 0x65, 0x62, 0x2e, 0x3b, 0x4d, 0x61, 0x72, 0x2e, 0x3b,
+0x41, 0x62, 0x72, 0x2e, 0x3b, 0x4d, 0x61, 0x69, 0x6f, 0x3b, 0x58, 0x75, 0xf1, 0x6f, 0x3b, 0x58, 0x75, 0x6c, 0x2e, 0x3b,
+0x41, 0x67, 0x6f, 0x2e, 0x3b, 0x53, 0x65, 0x74, 0x2e, 0x3b, 0x4f, 0x75, 0x74, 0x2e, 0x3b, 0x4e, 0x6f, 0x76, 0x2e, 0x3b,
+0x44, 0x65, 0x63, 0x2e, 0x3b, 0x58, 0x61, 0x6e, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x65, 0x69, 0x72,
+0x6f, 0x3b, 0x4d, 0x61, 0x72, 0x7a, 0x6f, 0x3b, 0x41, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x6f, 0x3b, 0x58,
+0x75, 0xf1, 0x6f, 0x3b, 0x58, 0x75, 0x6c, 0x6c, 0x6f, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x6f, 0x3b, 0x53, 0x65, 0x74,
+0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x4f, 0x75, 0x74, 0x75, 0x62, 0x72, 0x6f, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62,
+0x72, 0x6f, 0x3b, 0x44, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x58, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b,
+0x4d, 0x3b, 0x58, 0x3b, 0x58, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x78, 0x61, 0x6e, 0x2e,
+0x3b, 0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x2e, 0x3b, 0x61, 0x62, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x69, 0x6f,
+0x3b, 0x78, 0x75, 0xf1, 0x6f, 0x3b, 0x78, 0x75, 0x6c, 0x2e, 0x3b, 0x61, 0x67, 0x6f, 0x2e, 0x3b, 0x73, 0x65, 0x74, 0x2e,
+0x3b, 0x6f, 0x75, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x63, 0x2e, 0x3b, 0x78, 0x61, 0x6e, 0x65,
+0x69, 0x72, 0x6f, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x6d, 0x61, 0x72, 0x7a, 0x6f, 0x3b, 0x61,
+0x62, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x61, 0x69, 0x6f, 0x3b, 0x78, 0x75, 0xf1, 0x6f, 0x3b, 0x78, 0x75, 0x6c, 0x6c, 0x6f,
0x3b, 0x61, 0x67, 0x6f, 0x73, 0x74, 0x6f, 0x3b, 0x73, 0x65, 0x74, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x6f, 0x75, 0x74,
-0x75, 0x62, 0x72, 0x6f, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x64, 0x65, 0x7a, 0x65, 0x6d, 0x62,
-0x72, 0x6f, 0x3b, 0xa1c, 0xa28, 0x3b, 0xa2b, 0xa3c, 0xa30, 0x3b, 0xa2e, 0xa3e, 0xa30, 0xa1a, 0x3b, 0xa05, 0xa2a, 0xa4d, 0xa30, 0xa48,
-0x3b, 0xa2e, 0xa08, 0x3b, 0xa1c, 0xa42, 0xa28, 0x3b, 0xa1c, 0xa41, 0xa32, 0xa3e, 0x3b, 0xa05, 0xa17, 0x3b, 0xa38, 0xa24, 0xa70, 0x3b,
-0xa05, 0xa15, 0xa24, 0xa42, 0x3b, 0xa28, 0xa35, 0xa70, 0x3b, 0xa26, 0xa38, 0xa70, 0x3b, 0xa1c, 0xa28, 0xa35, 0xa30, 0xa40, 0x3b, 0xa2b,
-0xa3c, 0xa30, 0xa35, 0xa30, 0xa40, 0x3b, 0xa2e, 0xa3e, 0xa30, 0xa1a, 0x3b, 0xa05, 0xa2a, 0xa4d, 0xa30, 0xa48, 0xa32, 0x3b, 0xa2e, 0xa08,
-0x3b, 0xa1c, 0xa42, 0xa28, 0x3b, 0xa1c, 0xa41, 0xa32, 0xa3e, 0xa08, 0x3b, 0xa05, 0xa17, 0xa38, 0xa24, 0x3b, 0xa38, 0xa24, 0xa70, 0xa2c,
-0xa30, 0x3b, 0xa05, 0xa15, 0xa24, 0xa42, 0xa2c, 0xa30, 0x3b, 0xa28, 0xa35, 0xa70, 0xa2c, 0xa30, 0x3b, 0xa26, 0xa38, 0xa70, 0xa2c, 0xa30,
-0x3b, 0xa1c, 0x3b, 0xa2b, 0xa3c, 0x3b, 0xa2e, 0xa3e, 0x3b, 0xa05, 0x3b, 0xa2e, 0x3b, 0xa1c, 0xa42, 0x3b, 0xa1c, 0xa41, 0x3b, 0xa05,
-0x3b, 0xa38, 0x3b, 0xa05, 0x3b, 0xa28, 0x3b, 0xa26, 0x3b, 0x62c, 0x646, 0x648, 0x631, 0x6cc, 0x3b, 0x641, 0x631, 0x648, 0x631, 0x6cc,
-0x3b, 0x645, 0x627, 0x631, 0x686, 0x3b, 0x627, 0x67e, 0x631, 0x6cc, 0x644, 0x3b, 0x645, 0x626, 0x3b, 0x62c, 0x648, 0x646, 0x3b, 0x62c,
-0x648, 0x644, 0x627, 0x626, 0x6cc, 0x3b, 0x627, 0x6af, 0x633, 0x62a, 0x3b, 0x633, 0x62a, 0x645, 0x628, 0x631, 0x3b, 0x627, 0x6a9, 0x62a,
-0x648, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x645, 0x628, 0x631, 0x3b, 0x62f, 0x633, 0x645, 0x628, 0x631, 0x3b, 0x51, 0x75, 0x6c, 0x3b,
-0x48, 0x61, 0x74, 0x3b, 0x50, 0x61, 0x75, 0x3b, 0x41, 0x79, 0x72, 0x3b, 0x41, 0x79, 0x6d, 0x3b, 0x49, 0x6e, 0x74, 0x3b,
-0x41, 0x6e, 0x74, 0x3b, 0x51, 0x68, 0x61, 0x3b, 0x55, 0x6d, 0x61, 0x3b, 0x4b, 0x61, 0x6e, 0x3b, 0x41, 0x79, 0x61, 0x3b,
-0x4b, 0x61, 0x70, 0x3b, 0x51, 0x75, 0x6c, 0x6c, 0x61, 0x20, 0x70, 0x75, 0x71, 0x75, 0x79, 0x3b, 0x48, 0x61, 0x74, 0x75,
-0x6e, 0x20, 0x70, 0x75, 0x71, 0x75, 0x79, 0x3b, 0x50, 0x61, 0x75, 0x71, 0x61, 0x72, 0x20, 0x77, 0x61, 0x72, 0x61, 0x79,
-0x3b, 0x41, 0x79, 0x72, 0x69, 0x77, 0x61, 0x3b, 0x41, 0x79, 0x6d, 0x75, 0x72, 0x61, 0x79, 0x3b, 0x49, 0x6e, 0x74, 0x69,
-0x20, 0x72, 0x61, 0x79, 0x6d, 0x69, 0x3b, 0x41, 0x6e, 0x74, 0x61, 0x20, 0x53, 0x69, 0x74, 0x77, 0x61, 0x3b, 0x51, 0x68,
-0x61, 0x70, 0x61, 0x71, 0x20, 0x53, 0x69, 0x74, 0x77, 0x61, 0x3b, 0x55, 0x6d, 0x61, 0x20, 0x72, 0x61, 0x79, 0x6d, 0x69,
-0x3b, 0x4b, 0x61, 0x6e, 0x74, 0x61, 0x72, 0x61, 0x79, 0x3b, 0x41, 0x79, 0x61, 0x6d, 0x61, 0x72, 0x71, 0x2bc, 0x61, 0x3b,
-0x4b, 0x61, 0x70, 0x61, 0x71, 0x20, 0x52, 0x61, 0x79, 0x6d, 0x69, 0x3b, 0x73, 0x63, 0x68, 0x61, 0x6e, 0x2e, 0x3b, 0x66,
-0x61, 0x76, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b, 0x61, 0x76, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x74, 0x67, 0x3b,
-0x7a, 0x65, 0x72, 0x63, 0x6c, 0x2e, 0x3b, 0x66, 0x61, 0x6e, 0x2e, 0x3b, 0x61, 0x76, 0x75, 0x73, 0x74, 0x3b, 0x73, 0x65,
-0x74, 0x74, 0x2e, 0x3b, 0x6f, 0x63, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x63, 0x2e, 0x3b, 0x73,
-0x63, 0x68, 0x61, 0x6e, 0x65, 0x72, 0x3b, 0x66, 0x61, 0x76, 0x72, 0x65, 0x72, 0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b, 0x61,
-0x76, 0x72, 0x69, 0x67, 0x6c, 0x3b, 0x6d, 0x61, 0x74, 0x67, 0x3b, 0x7a, 0x65, 0x72, 0x63, 0x6c, 0x61, 0x64, 0x75, 0x72,
-0x3b, 0x66, 0x61, 0x6e, 0x61, 0x64, 0x75, 0x72, 0x3b, 0x61, 0x76, 0x75, 0x73, 0x74, 0x3b, 0x73, 0x65, 0x74, 0x74, 0x65,
-0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6f, 0x63, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65,
-0x72, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x53, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d,
-0x3b, 0x5a, 0x3b, 0x46, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x69, 0x61, 0x6e, 0x2e, 0x3b,
-0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x2e, 0x3b, 0x61, 0x70, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x69, 0x3b, 0x69,
-0x75, 0x6e, 0x2e, 0x3b, 0x69, 0x75, 0x6c, 0x2e, 0x3b, 0x61, 0x75, 0x67, 0x2e, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x2e, 0x3b,
-0x6f, 0x63, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x63, 0x2e, 0x3b, 0x69, 0x61, 0x6e, 0x75, 0x61,
-0x72, 0x69, 0x65, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x69, 0x65, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x69, 0x65,
-0x3b, 0x61, 0x70, 0x72, 0x69, 0x6c, 0x69, 0x65, 0x3b, 0x6d, 0x61, 0x69, 0x3b, 0x69, 0x75, 0x6e, 0x69, 0x65, 0x3b, 0x69,
-0x75, 0x6c, 0x69, 0x65, 0x3b, 0x61, 0x75, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x72,
-0x69, 0x65, 0x3b, 0x6f, 0x63, 0x74, 0x6f, 0x6d, 0x62, 0x72, 0x69, 0x65, 0x3b, 0x6e, 0x6f, 0x69, 0x65, 0x6d, 0x62, 0x72,
-0x69, 0x65, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x72, 0x69, 0x65, 0x3b, 0x49, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41,
-0x3b, 0x4d, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x44f, 0x43d, 0x432,
-0x2e, 0x3b, 0x444, 0x435, 0x432, 0x440, 0x2e, 0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430, 0x43f, 0x440, 0x2e, 0x3b, 0x43c, 0x430,
-0x439, 0x3b, 0x438, 0x44e, 0x43d, 0x44c, 0x3b, 0x438, 0x44e, 0x43b, 0x44c, 0x3b, 0x430, 0x432, 0x433, 0x2e, 0x3b, 0x441, 0x435, 0x43d,
-0x442, 0x2e, 0x3b, 0x43e, 0x43a, 0x442, 0x2e, 0x3b, 0x43d, 0x43e, 0x44f, 0x431, 0x2e, 0x3b, 0x434, 0x435, 0x43a, 0x2e, 0x3b, 0x44f,
-0x43d, 0x432, 0x2e, 0x3b, 0x444, 0x435, 0x432, 0x440, 0x2e, 0x3b, 0x43c, 0x430, 0x440, 0x2e, 0x3b, 0x430, 0x43f, 0x440, 0x2e, 0x3b,
-0x43c, 0x430, 0x44f, 0x3b, 0x438, 0x44e, 0x43d, 0x2e, 0x3b, 0x438, 0x44e, 0x43b, 0x2e, 0x3b, 0x430, 0x432, 0x433, 0x2e, 0x3b, 0x441,
-0x435, 0x43d, 0x442, 0x2e, 0x3b, 0x43e, 0x43a, 0x442, 0x2e, 0x3b, 0x43d, 0x43e, 0x44f, 0x431, 0x2e, 0x3b, 0x434, 0x435, 0x43a, 0x2e,
-0x3b, 0x44f, 0x43d, 0x432, 0x430, 0x440, 0x44f, 0x3b, 0x444, 0x435, 0x432, 0x440, 0x430, 0x43b, 0x44f, 0x3b, 0x43c, 0x430, 0x440, 0x442,
-0x430, 0x3b, 0x430, 0x43f, 0x440, 0x435, 0x43b, 0x44f, 0x3b, 0x43c, 0x430, 0x44f, 0x3b, 0x438, 0x44e, 0x43d, 0x44f, 0x3b, 0x438, 0x44e,
-0x43b, 0x44f, 0x3b, 0x430, 0x432, 0x433, 0x443, 0x441, 0x442, 0x430, 0x3b, 0x441, 0x435, 0x43d, 0x442, 0x44f, 0x431, 0x440, 0x44f, 0x3b,
-0x43e, 0x43a, 0x442, 0x44f, 0x431, 0x440, 0x44f, 0x3b, 0x43d, 0x43e, 0x44f, 0x431, 0x440, 0x44f, 0x3b, 0x434, 0x435, 0x43a, 0x430, 0x431,
-0x440, 0x44f, 0x3b, 0x4e, 0x79, 0x65, 0x3b, 0x46, 0x75, 0x6c, 0x3b, 0x4d, 0x62, 0xe4, 0x3b, 0x4e, 0x67, 0x75, 0x3b, 0x42,
-0xea, 0x6c, 0x3b, 0x46, 0xf6, 0x6e, 0x3b, 0x4c, 0x65, 0x6e, 0x3b, 0x4b, 0xfc, 0x6b, 0x3b, 0x4d, 0x76, 0x75, 0x3b, 0x4e,
-0x67, 0x62, 0x3b, 0x4e, 0x61, 0x62, 0x3b, 0x4b, 0x61, 0x6b, 0x3b, 0x4e, 0x79, 0x65, 0x6e, 0x79, 0x65, 0x3b, 0x46, 0x75,
-0x6c, 0x75, 0x6e, 0x64, 0xef, 0x67, 0x69, 0x3b, 0x4d, 0x62, 0xe4, 0x6e, 0x67, 0xfc, 0x3b, 0x4e, 0x67, 0x75, 0x62, 0xf9,
-0x65, 0x3b, 0x42, 0xea, 0x6c, 0xe4, 0x77, 0xfc, 0x3b, 0x46, 0xf6, 0x6e, 0x64, 0x6f, 0x3b, 0x4c, 0x65, 0x6e, 0x67, 0x75,
-0x61, 0x3b, 0x4b, 0xfc, 0x6b, 0xfc, 0x72, 0xfc, 0x3b, 0x4d, 0x76, 0x75, 0x6b, 0x61, 0x3b, 0x4e, 0x67, 0x62, 0x65, 0x72,
-0x65, 0x72, 0x65, 0x3b, 0x4e, 0x61, 0x62, 0xe4, 0x6e, 0x64, 0xfc, 0x72, 0x75, 0x3b, 0x4b, 0x61, 0x6b, 0x61, 0x75, 0x6b,
-0x61, 0x3b, 0x4e, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x42, 0x3b, 0x46, 0x3b, 0x4c, 0x3b, 0x4b, 0x3b, 0x4d, 0x3b,
-0x4e, 0x3b, 0x4e, 0x3b, 0x4b, 0x3b, 0x458, 0x430, 0x43d, 0x3b, 0x444, 0x435, 0x431, 0x3b, 0x43c, 0x430, 0x440, 0x3b, 0x430, 0x43f,
-0x440, 0x3b, 0x43c, 0x430, 0x458, 0x3b, 0x458, 0x443, 0x43d, 0x3b, 0x458, 0x443, 0x43b, 0x3b, 0x430, 0x432, 0x433, 0x3b, 0x441, 0x435,
-0x43f, 0x3b, 0x43e, 0x43a, 0x442, 0x3b, 0x43d, 0x43e, 0x432, 0x3b, 0x434, 0x435, 0x446, 0x3b, 0x458, 0x430, 0x43d, 0x443, 0x430, 0x440,
-0x3b, 0x444, 0x435, 0x431, 0x440, 0x443, 0x430, 0x440, 0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430, 0x43f, 0x440, 0x438, 0x43b, 0x3b,
-0x43c, 0x430, 0x458, 0x3b, 0x458, 0x443, 0x43d, 0x3b, 0x458, 0x443, 0x43b, 0x3b, 0x430, 0x432, 0x433, 0x443, 0x441, 0x442, 0x3b, 0x441,
-0x435, 0x43f, 0x442, 0x435, 0x43c, 0x431, 0x430, 0x440, 0x3b, 0x43e, 0x43a, 0x442, 0x43e, 0x431, 0x430, 0x440, 0x3b, 0x43d, 0x43e, 0x432,
-0x435, 0x43c, 0x431, 0x430, 0x440, 0x3b, 0x434, 0x435, 0x446, 0x435, 0x43c, 0x431, 0x430, 0x440, 0x3b, 0x458, 0x430, 0x43d, 0x2e, 0x3b,
-0x444, 0x435, 0x431, 0x2e, 0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430, 0x43f, 0x440, 0x2e, 0x3b, 0x43c, 0x430, 0x458, 0x3b, 0x458,
-0x443, 0x43d, 0x3b, 0x458, 0x443, 0x43b, 0x3b, 0x430, 0x432, 0x433, 0x2e, 0x3b, 0x441, 0x435, 0x43f, 0x442, 0x2e, 0x3b, 0x43e, 0x43a,
-0x442, 0x2e, 0x3b, 0x43d, 0x43e, 0x432, 0x2e, 0x3b, 0x434, 0x435, 0x446, 0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0x2e, 0x3b, 0x66, 0x65,
-0x62, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x3b, 0x61, 0x70, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e,
-0x3b, 0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x76, 0x67, 0x2e, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x2e, 0x3b, 0x6f, 0x6b, 0x74, 0x2e,
-0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x63, 0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b, 0x66, 0x65,
-0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x3b, 0x61, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x61, 0x6a,
-0x3b, 0x6a, 0x75, 0x6e, 0x3b, 0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x76, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74,
-0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x72, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62,
-0x61, 0x72, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x6a, 0x3b, 0x66, 0x3b, 0x6d, 0x3b, 0x61, 0x3b,
-0x6d, 0x3b, 0x6a, 0x3b, 0x6a, 0x3b, 0x61, 0x3b, 0x73, 0x3b, 0x6f, 0x3b, 0x6e, 0x3b, 0x64, 0x3b, 0x6a, 0x61, 0x6e, 0x3b,
-0x66, 0x65, 0x62, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x61, 0x70, 0x72, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x3b,
-0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x76, 0x67, 0x3b, 0x73, 0x65, 0x70, 0x3b, 0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x76, 0x3b,
-0x64, 0x65, 0x63, 0x3b, 0x42f, 0x43d, 0x432, 0x2e, 0x3b, 0x424, 0x435, 0x432, 0x440, 0x2e, 0x3b, 0x41c, 0x430, 0x440, 0x442, 0x2e,
-0x3b, 0x410, 0x43f, 0x440, 0x2e, 0x3b, 0x41c, 0x430, 0x439, 0x3b, 0x418, 0x44e, 0x43d, 0x44c, 0x3b, 0x418, 0x44e, 0x43b, 0x44c, 0x3b,
-0x410, 0x432, 0x433, 0x2e, 0x3b, 0x421, 0x435, 0x43d, 0x442, 0x2e, 0x3b, 0x41e, 0x43a, 0x442, 0x2e, 0x3b, 0x41d, 0x43e, 0x44f, 0x431,
-0x2e, 0x3b, 0x414, 0x435, 0x43a, 0x2e, 0x3b, 0x42f, 0x43d, 0x432, 0x430, 0x440, 0x44c, 0x3b, 0x424, 0x435, 0x432, 0x440, 0x430, 0x43b,
-0x44c, 0x3b, 0x41c, 0x430, 0x440, 0x442, 0x44a, 0x438, 0x3b, 0x410, 0x43f, 0x440, 0x435, 0x43b, 0x44c, 0x3b, 0x41c, 0x430, 0x439, 0x3b,
-0x418, 0x44e, 0x43d, 0x44c, 0x3b, 0x418, 0x44e, 0x43b, 0x44c, 0x3b, 0x410, 0x432, 0x433, 0x443, 0x441, 0x442, 0x3b, 0x421, 0x435, 0x43d,
-0x442, 0x44f, 0x431, 0x440, 0x44c, 0x3b, 0x41e, 0x43a, 0x442, 0x44f, 0x431, 0x440, 0x44c, 0x3b, 0x41d, 0x43e, 0x44f, 0x431, 0x440, 0x44c,
-0x3b, 0x414, 0x435, 0x43a, 0x430, 0x431, 0x440, 0x44c, 0x3b, 0x44f, 0x43d, 0x432, 0x2e, 0x3b, 0x444, 0x435, 0x432, 0x2e, 0x3b, 0x43c,
-0x430, 0x440, 0x2e, 0x3b, 0x430, 0x43f, 0x440, 0x2e, 0x3b, 0x43c, 0x430, 0x439, 0x44b, 0x3b, 0x438, 0x44e, 0x43d, 0x44b, 0x3b, 0x438,
-0x44e, 0x43b, 0x44b, 0x3b, 0x430, 0x432, 0x433, 0x2e, 0x3b, 0x441, 0x435, 0x43d, 0x2e, 0x3b, 0x43e, 0x43a, 0x442, 0x2e, 0x3b, 0x43d,
-0x43e, 0x44f, 0x2e, 0x3b, 0x434, 0x435, 0x43a, 0x2e, 0x3b, 0x44f, 0x43d, 0x432, 0x430, 0x440, 0x44b, 0x3b, 0x444, 0x435, 0x432, 0x440,
-0x430, 0x43b, 0x44b, 0x3b, 0x43c, 0x430, 0x440, 0x442, 0x44a, 0x438, 0x439, 0x44b, 0x3b, 0x430, 0x43f, 0x440, 0x435, 0x43b, 0x44b, 0x3b,
-0x43c, 0x430, 0x439, 0x44b, 0x3b, 0x438, 0x44e, 0x43d, 0x44b, 0x3b, 0x438, 0x44e, 0x43b, 0x44b, 0x3b, 0x430, 0x432, 0x433, 0x443, 0x441,
-0x442, 0x44b, 0x3b, 0x441, 0x435, 0x43d, 0x442, 0x44f, 0x431, 0x440, 0x44b, 0x3b, 0x43e, 0x43a, 0x442, 0x44f, 0x431, 0x440, 0x44b, 0x3b,
-0x43d, 0x43e, 0x44f, 0x431, 0x440, 0x44b, 0x3b, 0x434, 0x435, 0x43a, 0x430, 0x431, 0x440, 0x44b, 0x3b, 0x4e, 0x64, 0x69, 0x3b, 0x4b,
-0x75, 0x6b, 0x3b, 0x4b, 0x75, 0x72, 0x3b, 0x4b, 0x75, 0x62, 0x3b, 0x43, 0x68, 0x76, 0x3b, 0x43, 0x68, 0x6b, 0x3b, 0x43,
-0x68, 0x67, 0x3b, 0x4e, 0x79, 0x61, 0x3b, 0x47, 0x75, 0x6e, 0x3b, 0x47, 0x75, 0x6d, 0x3b, 0x4d, 0x62, 0x75, 0x3b, 0x5a,
-0x76, 0x69, 0x3b, 0x4e, 0x64, 0x69, 0x72, 0x61, 0x3b, 0x4b, 0x75, 0x6b, 0x61, 0x64, 0x7a, 0x69, 0x3b, 0x4b, 0x75, 0x72,
-0x75, 0x6d, 0x65, 0x3b, 0x4b, 0x75, 0x62, 0x76, 0x75, 0x6d, 0x62, 0x69, 0x3b, 0x43, 0x68, 0x69, 0x76, 0x61, 0x62, 0x76,
-0x75, 0x3b, 0x43, 0x68, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x43, 0x68, 0x69, 0x6b, 0x75, 0x6e, 0x67, 0x75, 0x72, 0x75,
-0x3b, 0x4e, 0x79, 0x61, 0x6d, 0x61, 0x76, 0x68, 0x75, 0x76, 0x68, 0x75, 0x3b, 0x47, 0x75, 0x6e, 0x79, 0x61, 0x6e, 0x61,
-0x3b, 0x47, 0x75, 0x6d, 0x69, 0x67, 0x75, 0x72, 0x75, 0x3b, 0x4d, 0x62, 0x75, 0x64, 0x7a, 0x69, 0x3b, 0x5a, 0x76, 0x69,
-0x74, 0x61, 0x3b, 0x4e, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x43, 0x3b, 0x43, 0x3b, 0x43, 0x3b, 0x4e, 0x3b, 0x47,
-0x3b, 0x47, 0x3b, 0x4d, 0x3b, 0x5a, 0x3b, 0xda2, 0xdb1, 0x3b, 0xdb4, 0xdd9, 0xdb6, 0x3b, 0xdb8, 0xdcf, 0xdbb, 0xdca, 0x3b, 0xd85,
-0xdb4, 0xdca, 0x200d, 0xdbb, 0xdda, 0xdbd, 0xdca, 0x3b, 0xdb8, 0xdd0, 0xdba, 0xdd2, 0x3b, 0xda2, 0xdd6, 0xdb1, 0xdd2, 0x3b, 0xda2, 0xdd6,
-0xdbd, 0xdd2, 0x3b, 0xd85, 0xd9c, 0xddd, 0x3b, 0xdc3, 0xdd0, 0xdb4, 0xdca, 0x3b, 0xd94, 0xd9a, 0xdca, 0x3b, 0xdb1, 0xddc, 0xdc0, 0xdd0,
-0x3b, 0xdaf, 0xdd9, 0xdc3, 0xdd0, 0x3b, 0xda2, 0xdb1, 0xdc0, 0xdcf, 0xdbb, 0xdd2, 0x3b, 0xdb4, 0xdd9, 0xdb6, 0xdbb, 0xdc0, 0xdcf, 0xdbb,
-0xdd2, 0x3b, 0xdb8, 0xdcf, 0xdbb, 0xdca, 0xdad, 0xdd4, 0x3b, 0xd85, 0xdb4, 0xdca, 0x200d, 0xdbb, 0xdda, 0xdbd, 0xdca, 0x3b, 0xdb8, 0xdd0,
-0xdba, 0xdd2, 0x3b, 0xda2, 0xdd6, 0xdb1, 0xdd2, 0x3b, 0xda2, 0xdd6, 0xdbd, 0xdd2, 0x3b, 0xd85, 0xd9c, 0xddd, 0xdc3, 0xdca, 0xdad, 0xdd4,
-0x3b, 0xdc3, 0xdd0, 0xdb4, 0xdca, 0xdad, 0xdd0, 0xdb8, 0xdca, 0xdb6, 0xdbb, 0xdca, 0x3b, 0xd94, 0xd9a, 0xdca, 0xdad, 0xddd, 0xdb6, 0xdbb,
-0xdca, 0x3b, 0xdb1, 0xddc, 0xdc0, 0xdd0, 0xdb8, 0xdca, 0xdb6, 0xdbb, 0xdca, 0x3b, 0xdaf, 0xdd9, 0xdc3, 0xdd0, 0xdb8, 0xdca, 0xdb6, 0xdbb,
-0xdca, 0x3b, 0xda2, 0x3b, 0xdb4, 0xdd9, 0x3b, 0xdb8, 0xdcf, 0x3b, 0xd85, 0x3b, 0xdb8, 0xdd0, 0x3b, 0xda2, 0xdd6, 0x3b, 0xda2, 0xdd6,
-0x3b, 0xd85, 0x3b, 0xdc3, 0xdd0, 0x3b, 0xd94, 0x3b, 0xdb1, 0xdd9, 0x3b, 0xdaf, 0xdd9, 0x3b, 0xda2, 0xdb1, 0x3b, 0xdb4, 0xdd9, 0xdb6,
-0x3b, 0xdb8, 0xdcf, 0xdbb, 0xdca, 0xdad, 0xdd4, 0x3b, 0xd85, 0xdb4, 0xdca, 0x200d, 0xdbb, 0xdda, 0xdbd, 0xdca, 0x3b, 0xdb8, 0xdd0, 0xdba,
-0xdd2, 0x3b, 0xda2, 0xdd6, 0xdb1, 0xdd2, 0x3b, 0xda2, 0xdd6, 0xdbd, 0xdd2, 0x3b, 0xd85, 0xd9c, 0xddd, 0x3b, 0xdc3, 0xdd0, 0xdb4, 0xdca,
-0x3b, 0xd94, 0xd9a, 0xdca, 0x3b, 0xdb1, 0xddc, 0xdc0, 0xdd0, 0x3b, 0xdaf, 0xdd9, 0xdc3, 0xdd0, 0x3b, 0x6a, 0x61, 0x6e, 0x3b, 0x66,
-0x65, 0x62, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x61, 0x70, 0x72, 0x3b, 0x6d, 0xe1, 0x6a, 0x3b, 0x6a, 0xfa, 0x6e, 0x3b, 0x6a,
-0xfa, 0x6c, 0x3b, 0x61, 0x75, 0x67, 0x3b, 0x73, 0x65, 0x70, 0x3b, 0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x76, 0x3b, 0x64,
-0x65, 0x63, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0xe1, 0x72, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0xe1, 0x72, 0x3b, 0x6d, 0x61,
-0x72, 0x65, 0x63, 0x3b, 0x61, 0x70, 0x72, 0xed, 0x6c, 0x3b, 0x6d, 0xe1, 0x6a, 0x3b, 0x6a, 0xfa, 0x6e, 0x3b, 0x6a, 0xfa,
-0x6c, 0x3b, 0x61, 0x75, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6f,
-0x6b, 0x74, 0xf3, 0x62, 0x65, 0x72, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x64, 0x65, 0x63, 0x65,
-0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0xe1, 0x72, 0x61, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0xe1, 0x72,
-0x61, 0x3b, 0x6d, 0x61, 0x72, 0x63, 0x61, 0x3b, 0x61, 0x70, 0x72, 0xed, 0x6c, 0x61, 0x3b, 0x6d, 0xe1, 0x6a, 0x61, 0x3b,
-0x6a, 0xfa, 0x6e, 0x61, 0x3b, 0x6a, 0xfa, 0x6c, 0x61, 0x3b, 0x61, 0x75, 0x67, 0x75, 0x73, 0x74, 0x61, 0x3b, 0x73, 0x65,
-0x70, 0x74, 0x65, 0x6d, 0x62, 0x72, 0x61, 0x3b, 0x6f, 0x6b, 0x74, 0xf3, 0x62, 0x72, 0x61, 0x3b, 0x6e, 0x6f, 0x76, 0x65,
-0x6d, 0x62, 0x72, 0x61, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x72, 0x61, 0x3b, 0x6a, 0x61, 0x6e, 0x2e, 0x3b, 0x66,
-0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x2e, 0x3b, 0x61, 0x70, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75,
-0x6e, 0x2e, 0x3b, 0x6a, 0x75, 0x6c, 0x2e, 0x3b, 0x61, 0x76, 0x67, 0x2e, 0x3b, 0x73, 0x65, 0x70, 0x2e, 0x3b, 0x6f, 0x6b,
-0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x63, 0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b,
-0x66, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x6d, 0x61, 0x72, 0x65, 0x63, 0x3b, 0x61, 0x70, 0x72, 0x69, 0x6c, 0x3b,
-0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x69, 0x6a, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x6a, 0x3b, 0x61, 0x76, 0x67, 0x75,
-0x73, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72,
-0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4b,
-0x6f, 0x62, 0x3b, 0x4c, 0x61, 0x62, 0x3b, 0x53, 0x61, 0x64, 0x3b, 0x41, 0x66, 0x72, 0x3b, 0x53, 0x68, 0x61, 0x3b, 0x4c,
-0x69, 0x78, 0x3b, 0x54, 0x6f, 0x64, 0x3b, 0x53, 0x69, 0x64, 0x3b, 0x53, 0x61, 0x67, 0x3b, 0x54, 0x6f, 0x62, 0x3b, 0x4b,
-0x49, 0x54, 0x3b, 0x4c, 0x49, 0x54, 0x3b, 0x42, 0x69, 0x73, 0x68, 0x61, 0x20, 0x4b, 0x6f, 0x6f, 0x62, 0x61, 0x61, 0x64,
-0x3b, 0x42, 0x69, 0x73, 0x68, 0x61, 0x20, 0x4c, 0x61, 0x62, 0x61, 0x61, 0x64, 0x3b, 0x42, 0x69, 0x73, 0x68, 0x61, 0x20,
-0x53, 0x61, 0x64, 0x64, 0x65, 0x78, 0x61, 0x61, 0x64, 0x3b, 0x42, 0x69, 0x73, 0x68, 0x61, 0x20, 0x41, 0x66, 0x72, 0x61,
-0x61, 0x64, 0x3b, 0x42, 0x69, 0x73, 0x68, 0x61, 0x20, 0x53, 0x68, 0x61, 0x6e, 0x61, 0x61, 0x64, 0x3b, 0x42, 0x69, 0x73,
-0x68, 0x61, 0x20, 0x4c, 0x69, 0x78, 0x61, 0x61, 0x64, 0x3b, 0x42, 0x69, 0x73, 0x68, 0x61, 0x20, 0x54, 0x6f, 0x64, 0x6f,
-0x62, 0x61, 0x61, 0x64, 0x3b, 0x42, 0x69, 0x73, 0x68, 0x61, 0x20, 0x53, 0x69, 0x64, 0x65, 0x65, 0x64, 0x61, 0x61, 0x64,
-0x3b, 0x42, 0x69, 0x73, 0x68, 0x61, 0x20, 0x53, 0x61, 0x67, 0x61, 0x61, 0x6c, 0x61, 0x61, 0x64, 0x3b, 0x42, 0x69, 0x73,
-0x68, 0x61, 0x20, 0x54, 0x6f, 0x62, 0x6e, 0x61, 0x61, 0x64, 0x3b, 0x42, 0x69, 0x73, 0x68, 0x61, 0x20, 0x4b, 0x6f, 0x77,
-0x20, 0x69, 0x79, 0x6f, 0x20, 0x54, 0x6f, 0x62, 0x6e, 0x61, 0x61, 0x64, 0x3b, 0x42, 0x69, 0x73, 0x68, 0x61, 0x20, 0x4c,
-0x61, 0x62, 0x61, 0x20, 0x69, 0x79, 0x6f, 0x20, 0x54, 0x6f, 0x62, 0x6e, 0x61, 0x61, 0x64, 0x3b, 0x4b, 0x3b, 0x4c, 0x3b,
-0x53, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4c, 0x3b, 0x54, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x54, 0x3b, 0x4b, 0x3b, 0x4c, 0x3b,
-0x65, 0x6e, 0x65, 0x2e, 0x3b, 0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x2e, 0x3b, 0x61, 0x62, 0x72, 0x2e, 0x3b,
-0x6d, 0x61, 0x79, 0x2e, 0x3b, 0x6a, 0x75, 0x6e, 0x2e, 0x3b, 0x6a, 0x75, 0x6c, 0x2e, 0x3b, 0x61, 0x67, 0x6f, 0x2e, 0x3b,
-0x73, 0x65, 0x70, 0x74, 0x2e, 0x3b, 0x6f, 0x63, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x69, 0x63, 0x2e,
-0x3b, 0x65, 0x6e, 0x65, 0x72, 0x6f, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x65, 0x72, 0x6f, 0x3b, 0x6d, 0x61, 0x72, 0x7a, 0x6f,
-0x3b, 0x61, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x61, 0x79, 0x6f, 0x3b, 0x6a, 0x75, 0x6e, 0x69, 0x6f, 0x3b, 0x6a, 0x75,
-0x6c, 0x69, 0x6f, 0x3b, 0x61, 0x67, 0x6f, 0x73, 0x74, 0x6f, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x69, 0x65, 0x6d, 0x62, 0x72,
-0x65, 0x3b, 0x6f, 0x63, 0x74, 0x75, 0x62, 0x72, 0x65, 0x3b, 0x6e, 0x6f, 0x76, 0x69, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b,
-0x64, 0x69, 0x63, 0x69, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x45, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b,
-0x4a, 0x3b, 0x4a, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x65, 0x6e, 0x65, 0x2e, 0x3b, 0x66,
-0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x2e, 0x3b, 0x61, 0x62, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x79, 0x2e, 0x3b, 0x6a,
-0x75, 0x6e, 0x2e, 0x3b, 0x6a, 0x75, 0x6c, 0x2e, 0x3b, 0x61, 0x67, 0x6f, 0x2e, 0x3b, 0x73, 0x65, 0x70, 0x2e, 0x3b, 0x6f,
-0x63, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x69, 0x63, 0x2e, 0x3b, 0x65, 0x3b, 0x66, 0x3b, 0x6d, 0x3b,
-0x61, 0x3b, 0x6d, 0x3b, 0x6a, 0x3b, 0x6a, 0x3b, 0x61, 0x3b, 0x73, 0x3b, 0x6f, 0x3b, 0x6e, 0x3b, 0x64, 0x3b, 0x65, 0x6e,
-0x65, 0x3b, 0x66, 0x65, 0x62, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x61, 0x62, 0x72, 0x3b, 0x6d, 0x61, 0x79, 0x3b, 0x6a, 0x75,
-0x6e, 0x3b, 0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x67, 0x6f, 0x3b, 0x73, 0x65, 0x70, 0x3b, 0x6f, 0x63, 0x74, 0x3b, 0x6e, 0x6f,
-0x76, 0x3b, 0x64, 0x69, 0x63, 0x3b, 0x45, 0x6e, 0x65, 0x2e, 0x3b, 0x46, 0x65, 0x62, 0x2e, 0x3b, 0x4d, 0x61, 0x72, 0x2e,
-0x3b, 0x41, 0x62, 0x72, 0x2e, 0x3b, 0x4d, 0x61, 0x79, 0x2e, 0x3b, 0x4a, 0x75, 0x6e, 0x2e, 0x3b, 0x4a, 0x75, 0x6c, 0x2e,
-0x3b, 0x41, 0x67, 0x6f, 0x2e, 0x3b, 0x53, 0x65, 0x74, 0x2e, 0x3b, 0x4f, 0x63, 0x74, 0x2e, 0x3b, 0x4e, 0x6f, 0x76, 0x2e,
-0x3b, 0x44, 0x69, 0x63, 0x2e, 0x3b, 0x45, 0x6e, 0x65, 0x72, 0x6f, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x65, 0x72, 0x6f, 0x3b,
+0x75, 0x62, 0x72, 0x6f, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62,
+0x72, 0x6f, 0x3b, 0x78, 0x2e, 0x3b, 0x66, 0x2e, 0x3b, 0x6d, 0x2e, 0x3b, 0x61, 0x2e, 0x3b, 0x6d, 0x2e, 0x3b, 0x78, 0x2e,
+0x3b, 0x78, 0x2e, 0x3b, 0x61, 0x2e, 0x3b, 0x73, 0x2e, 0x3b, 0x6f, 0x2e, 0x3b, 0x6e, 0x2e, 0x3b, 0x64, 0x2e, 0x3b, 0x10d8,
+0x10d0, 0x10dc, 0x3b, 0x10d7, 0x10d4, 0x10d1, 0x3b, 0x10db, 0x10d0, 0x10e0, 0x3b, 0x10d0, 0x10de, 0x10e0, 0x3b, 0x10db, 0x10d0, 0x10d8, 0x3b, 0x10d8,
+0x10d5, 0x10dc, 0x3b, 0x10d8, 0x10d5, 0x10da, 0x3b, 0x10d0, 0x10d2, 0x10d5, 0x3b, 0x10e1, 0x10d4, 0x10e5, 0x3b, 0x10dd, 0x10e5, 0x10e2, 0x3b, 0x10dc,
+0x10dd, 0x10d4, 0x3b, 0x10d3, 0x10d4, 0x10d9, 0x3b, 0x10d8, 0x10d0, 0x10dc, 0x10d5, 0x10d0, 0x10e0, 0x10d8, 0x3b, 0x10d7, 0x10d4, 0x10d1, 0x10d4, 0x10e0,
+0x10d5, 0x10d0, 0x10da, 0x10d8, 0x3b, 0x10db, 0x10d0, 0x10e0, 0x10e2, 0x10d8, 0x3b, 0x10d0, 0x10de, 0x10e0, 0x10d8, 0x10da, 0x10d8, 0x3b, 0x10db, 0x10d0,
+0x10d8, 0x10e1, 0x10d8, 0x3b, 0x10d8, 0x10d5, 0x10dc, 0x10d8, 0x10e1, 0x10d8, 0x3b, 0x10d8, 0x10d5, 0x10da, 0x10d8, 0x10e1, 0x10d8, 0x3b, 0x10d0, 0x10d2,
+0x10d5, 0x10d8, 0x10e1, 0x10e2, 0x10dd, 0x3b, 0x10e1, 0x10d4, 0x10e5, 0x10e2, 0x10d4, 0x10db, 0x10d1, 0x10d4, 0x10e0, 0x10d8, 0x3b, 0x10dd, 0x10e5, 0x10e2,
+0x10dd, 0x10db, 0x10d1, 0x10d4, 0x10e0, 0x10d8, 0x3b, 0x10dc, 0x10dd, 0x10d4, 0x10db, 0x10d1, 0x10d4, 0x10e0, 0x10d8, 0x3b, 0x10d3, 0x10d4, 0x10d9, 0x10d4,
+0x10db, 0x10d1, 0x10d4, 0x10e0, 0x10d8, 0x3b, 0x10d8, 0x3b, 0x10d7, 0x3b, 0x10db, 0x3b, 0x10d0, 0x3b, 0x10db, 0x3b, 0x10d8, 0x3b, 0x10d8, 0x3b,
+0x10d0, 0x3b, 0x10e1, 0x3b, 0x10dd, 0x3b, 0x10dc, 0x3b, 0x10d3, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0xe4,
+0x72, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x75,
+0x67, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x7a, 0x3b, 0x4a, 0x61,
+0x6e, 0x75, 0x61, 0x72, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x4d, 0xe4, 0x72, 0x7a, 0x3b, 0x41, 0x70,
+0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x69, 0x3b, 0x41, 0x75,
+0x67, 0x75, 0x73, 0x74, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62,
+0x65, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44, 0x65, 0x7a, 0x65, 0x6d, 0x62, 0x65, 0x72,
+0x3b, 0x4a, 0x61, 0x6e, 0x2e, 0x3b, 0x46, 0x65, 0x62, 0x2e, 0x3b, 0x4d, 0xe4, 0x72, 0x7a, 0x3b, 0x41, 0x70, 0x72, 0x2e,
+0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x69, 0x3b, 0x41, 0x75, 0x67, 0x2e, 0x3b,
+0x53, 0x65, 0x70, 0x2e, 0x3b, 0x4f, 0x6b, 0x74, 0x2e, 0x3b, 0x4e, 0x6f, 0x76, 0x2e, 0x3b, 0x44, 0x65, 0x7a, 0x2e, 0x3b,
+0x4a, 0xe4, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0xe4, 0x72, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x61, 0x69, 0x3b,
+0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x75, 0x67, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b,
+0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x7a, 0x3b, 0x4a, 0xe4, 0x6e, 0x6e, 0x65, 0x72, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75,
+0x61, 0x72, 0x3b, 0x4d, 0xe4, 0x72, 0x7a, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75,
+0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x69, 0x3b, 0x41, 0x75, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65,
+0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65,
+0x72, 0x3b, 0x44, 0x65, 0x7a, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4a, 0xe4, 0x6e, 0x2e, 0x3b, 0x46, 0x65, 0x62, 0x2e,
+0x3b, 0x4d, 0xe4, 0x72, 0x7a, 0x3b, 0x41, 0x70, 0x72, 0x2e, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b,
+0x4a, 0x75, 0x6c, 0x69, 0x3b, 0x41, 0x75, 0x67, 0x2e, 0x3b, 0x53, 0x65, 0x70, 0x2e, 0x3b, 0x4f, 0x6b, 0x74, 0x2e, 0x3b,
+0x4e, 0x6f, 0x76, 0x2e, 0x3b, 0x44, 0x65, 0x7a, 0x2e, 0x3b, 0x399, 0x3b1, 0x3bd, 0x3b, 0x3a6, 0x3b5, 0x3b2, 0x3b, 0x39c, 0x3ac,
+0x3c1, 0x3b, 0x391, 0x3c0, 0x3c1, 0x3b, 0x39c, 0x3ac, 0x3b9, 0x3b, 0x399, 0x3bf, 0x3cd, 0x3bd, 0x3b, 0x399, 0x3bf, 0x3cd, 0x3bb, 0x3b,
+0x391, 0x3cd, 0x3b3, 0x3b, 0x3a3, 0x3b5, 0x3c0, 0x3b, 0x39f, 0x3ba, 0x3c4, 0x3b, 0x39d, 0x3bf, 0x3ad, 0x3b, 0x394, 0x3b5, 0x3ba, 0x3b,
+0x399, 0x3b1, 0x3bd, 0x3bf, 0x3c5, 0x3ac, 0x3c1, 0x3b9, 0x3bf, 0x3c2, 0x3b, 0x3a6, 0x3b5, 0x3b2, 0x3c1, 0x3bf, 0x3c5, 0x3ac, 0x3c1, 0x3b9,
+0x3bf, 0x3c2, 0x3b, 0x39c, 0x3ac, 0x3c1, 0x3c4, 0x3b9, 0x3bf, 0x3c2, 0x3b, 0x391, 0x3c0, 0x3c1, 0x3af, 0x3bb, 0x3b9, 0x3bf, 0x3c2, 0x3b,
+0x39c, 0x3ac, 0x3b9, 0x3bf, 0x3c2, 0x3b, 0x399, 0x3bf, 0x3cd, 0x3bd, 0x3b9, 0x3bf, 0x3c2, 0x3b, 0x399, 0x3bf, 0x3cd, 0x3bb, 0x3b9, 0x3bf,
+0x3c2, 0x3b, 0x391, 0x3cd, 0x3b3, 0x3bf, 0x3c5, 0x3c3, 0x3c4, 0x3bf, 0x3c2, 0x3b, 0x3a3, 0x3b5, 0x3c0, 0x3c4, 0x3ad, 0x3bc, 0x3b2, 0x3c1,
+0x3b9, 0x3bf, 0x3c2, 0x3b, 0x39f, 0x3ba, 0x3c4, 0x3ce, 0x3b2, 0x3c1, 0x3b9, 0x3bf, 0x3c2, 0x3b, 0x39d, 0x3bf, 0x3ad, 0x3bc, 0x3b2, 0x3c1,
+0x3b9, 0x3bf, 0x3c2, 0x3b, 0x394, 0x3b5, 0x3ba, 0x3ad, 0x3bc, 0x3b2, 0x3c1, 0x3b9, 0x3bf, 0x3c2, 0x3b, 0x399, 0x3b, 0x3a6, 0x3b, 0x39c,
+0x3b, 0x391, 0x3b, 0x39c, 0x3b, 0x399, 0x3b, 0x399, 0x3b, 0x391, 0x3b, 0x3a3, 0x3b, 0x39f, 0x3b, 0x39d, 0x3b, 0x394, 0x3b, 0x399,
+0x3b1, 0x3bd, 0x3b, 0x3a6, 0x3b5, 0x3b2, 0x3b, 0x39c, 0x3b1, 0x3c1, 0x3b, 0x391, 0x3c0, 0x3c1, 0x3b, 0x39c, 0x3b1, 0x390, 0x3b, 0x399,
+0x3bf, 0x3c5, 0x3bd, 0x3b, 0x399, 0x3bf, 0x3c5, 0x3bb, 0x3b, 0x391, 0x3c5, 0x3b3, 0x3b, 0x3a3, 0x3b5, 0x3c0, 0x3b, 0x39f, 0x3ba, 0x3c4,
+0x3b, 0x39d, 0x3bf, 0x3b5, 0x3b, 0x394, 0x3b5, 0x3ba, 0x3b, 0x399, 0x3b1, 0x3bd, 0x3bf, 0x3c5, 0x3b1, 0x3c1, 0x3af, 0x3bf, 0x3c5, 0x3b,
+0x3a6, 0x3b5, 0x3b2, 0x3c1, 0x3bf, 0x3c5, 0x3b1, 0x3c1, 0x3af, 0x3bf, 0x3c5, 0x3b, 0x39c, 0x3b1, 0x3c1, 0x3c4, 0x3af, 0x3bf, 0x3c5, 0x3b,
+0x391, 0x3c0, 0x3c1, 0x3b9, 0x3bb, 0x3af, 0x3bf, 0x3c5, 0x3b, 0x39c, 0x3b1, 0x390, 0x3bf, 0x3c5, 0x3b, 0x399, 0x3bf, 0x3c5, 0x3bd, 0x3af,
+0x3bf, 0x3c5, 0x3b, 0x399, 0x3bf, 0x3c5, 0x3bb, 0x3af, 0x3bf, 0x3c5, 0x3b, 0x391, 0x3c5, 0x3b3, 0x3bf, 0x3cd, 0x3c3, 0x3c4, 0x3bf, 0x3c5,
+0x3b, 0x3a3, 0x3b5, 0x3c0, 0x3c4, 0x3b5, 0x3bc, 0x3b2, 0x3c1, 0x3af, 0x3bf, 0x3c5, 0x3b, 0x39f, 0x3ba, 0x3c4, 0x3c9, 0x3b2, 0x3c1, 0x3af,
+0x3bf, 0x3c5, 0x3b, 0x39d, 0x3bf, 0x3b5, 0x3bc, 0x3b2, 0x3c1, 0x3af, 0x3bf, 0x3c5, 0x3b, 0x394, 0x3b5, 0x3ba, 0x3b5, 0x3bc, 0x3b2, 0x3c1,
+0x3af, 0x3bf, 0x3c5, 0x3b, 0x6a, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x62, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x61, 0x70, 0x72, 0x3b,
+0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x3b, 0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x75, 0x67, 0x3b, 0x73, 0x65, 0x70, 0x3b,
+0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x76, 0x3b, 0x64, 0x65, 0x63, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x69, 0x3b,
+0x66, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x73, 0x69, 0x3b, 0x61, 0x70, 0x72, 0x69,
+0x6c, 0x69, 0x3b, 0x6d, 0x61, 0x6a, 0x69, 0x3b, 0x6a, 0x75, 0x6e, 0x69, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x3b, 0x61, 0x75,
+0x67, 0x75, 0x73, 0x74, 0x75, 0x73, 0x69, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x69, 0x3b, 0x6f,
+0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x69, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x69, 0x3b, 0x64, 0x65,
+0x63, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x69, 0x3b, 0xa9c, 0xabe, 0xaa8, 0xacd, 0xaaf, 0xac1, 0x3b, 0xaab, 0xac7, 0xaac, 0xacd, 0xab0,
+0xac1, 0x3b, 0xaae, 0xabe, 0xab0, 0xacd, 0xa9a, 0x3b, 0xa8f, 0xaaa, 0xacd, 0xab0, 0xabf, 0xab2, 0x3b, 0xaae, 0xac7, 0x3b, 0xa9c, 0xac2,
+0xaa8, 0x3b, 0xa9c, 0xac1, 0xab2, 0xabe, 0xa88, 0x3b, 0xa91, 0xa97, 0xab8, 0xacd, 0xa9f, 0x3b, 0xab8, 0xaaa, 0xacd, 0xa9f, 0xac7, 0x3b,
+0xa91, 0xa95, 0xacd, 0xa9f, 0xacb, 0x3b, 0xaa8, 0xab5, 0xac7, 0x3b, 0xaa1, 0xabf, 0xab8, 0xac7, 0x3b, 0xa9c, 0xabe, 0xaa8, 0xacd, 0xaaf,
+0xac1, 0xa86, 0xab0, 0xac0, 0x3b, 0xaab, 0xac7, 0xaac, 0xacd, 0xab0, 0xac1, 0xa86, 0xab0, 0xac0, 0x3b, 0xaae, 0xabe, 0xab0, 0xacd, 0xa9a,
+0x3b, 0xa8f, 0xaaa, 0xacd, 0xab0, 0xabf, 0xab2, 0x3b, 0xaae, 0xac7, 0x3b, 0xa9c, 0xac2, 0xaa8, 0x3b, 0xa9c, 0xac1, 0xab2, 0xabe, 0xa88,
+0x3b, 0xa91, 0xa97, 0xab8, 0xacd, 0xa9f, 0x3b, 0xab8, 0xaaa, 0xacd, 0xa9f, 0xac7, 0xaae, 0xacd, 0xaac, 0xab0, 0x3b, 0xa91, 0xa95, 0xacd,
+0xa9f, 0xacb, 0xaac, 0xab0, 0x3b, 0xaa8, 0xab5, 0xac7, 0xaae, 0xacd, 0xaac, 0xab0, 0x3b, 0xaa1, 0xabf, 0xab8, 0xac7, 0xaae, 0xacd, 0xaac,
+0xab0, 0x3b, 0xa9c, 0xabe, 0x3b, 0xaab, 0xac7, 0x3b, 0xaae, 0xabe, 0x3b, 0xa8f, 0x3b, 0xaae, 0xac7, 0x3b, 0xa9c, 0xac2, 0x3b, 0xa9c,
+0xac1, 0x3b, 0xa91, 0x3b, 0xab8, 0x3b, 0xa91, 0x3b, 0xaa8, 0x3b, 0xaa1, 0xabf, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x61, 0x62,
+0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x66, 0x69, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x59, 0x75, 0x6e, 0x3b, 0x59, 0x75, 0x6c,
+0x3b, 0x41, 0x67, 0x75, 0x3b, 0x53, 0x61, 0x74, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x75, 0x77, 0x3b, 0x44, 0x69, 0x73,
+0x3b, 0x4a, 0x61, 0x6e, 0x61, 0x69, 0x72, 0x75, 0x3b, 0x46, 0x61, 0x62, 0x75, 0x72, 0x61, 0x69, 0x72, 0x75, 0x3b, 0x4d,
+0x61, 0x72, 0x69, 0x73, 0x3b, 0x41, 0x66, 0x69, 0x72, 0x69, 0x6c, 0x75, 0x3b, 0x4d, 0x61, 0x79, 0x75, 0x3b, 0x59, 0x75,
+0x6e, 0x69, 0x3b, 0x59, 0x75, 0x6c, 0x69, 0x3b, 0x41, 0x67, 0x75, 0x73, 0x74, 0x61, 0x3b, 0x53, 0x61, 0x74, 0x75, 0x6d,
+0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x75, 0x77, 0x61, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69,
+0x73, 0x61, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x59, 0x3b, 0x59, 0x3b,
+0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x5d9, 0x5e0, 0x5d5, 0x5f3, 0x3b, 0x5e4, 0x5d1, 0x5e8, 0x5f3, 0x3b,
+0x5de, 0x5e8, 0x5e5, 0x3b, 0x5d0, 0x5e4, 0x5e8, 0x5f3, 0x3b, 0x5de, 0x5d0, 0x5d9, 0x3b, 0x5d9, 0x5d5, 0x5e0, 0x5d9, 0x3b, 0x5d9, 0x5d5,
+0x5dc, 0x5d9, 0x3b, 0x5d0, 0x5d5, 0x5d2, 0x5f3, 0x3b, 0x5e1, 0x5e4, 0x5d8, 0x5f3, 0x3b, 0x5d0, 0x5d5, 0x5e7, 0x5f3, 0x3b, 0x5e0, 0x5d5,
+0x5d1, 0x5f3, 0x3b, 0x5d3, 0x5e6, 0x5de, 0x5f3, 0x3b, 0x5d9, 0x5e0, 0x5d5, 0x5d0, 0x5e8, 0x3b, 0x5e4, 0x5d1, 0x5e8, 0x5d5, 0x5d0, 0x5e8,
+0x3b, 0x5de, 0x5e8, 0x5e5, 0x3b, 0x5d0, 0x5e4, 0x5e8, 0x5d9, 0x5dc, 0x3b, 0x5de, 0x5d0, 0x5d9, 0x3b, 0x5d9, 0x5d5, 0x5e0, 0x5d9, 0x3b,
+0x5d9, 0x5d5, 0x5dc, 0x5d9, 0x3b, 0x5d0, 0x5d5, 0x5d2, 0x5d5, 0x5e1, 0x5d8, 0x3b, 0x5e1, 0x5e4, 0x5d8, 0x5de, 0x5d1, 0x5e8, 0x3b, 0x5d0,
+0x5d5, 0x5e7, 0x5d8, 0x5d5, 0x5d1, 0x5e8, 0x3b, 0x5e0, 0x5d5, 0x5d1, 0x5de, 0x5d1, 0x5e8, 0x3b, 0x5d3, 0x5e6, 0x5de, 0x5d1, 0x5e8, 0x3b,
+0x91c, 0x928, 0x970, 0x3b, 0x92b, 0x93c, 0x930, 0x970, 0x3b, 0x92e, 0x93e, 0x930, 0x94d, 0x91a, 0x3b, 0x905, 0x92a, 0x94d, 0x930, 0x948,
+0x932, 0x3b, 0x92e, 0x908, 0x3b, 0x91c, 0x942, 0x928, 0x3b, 0x91c, 0x941, 0x932, 0x970, 0x3b, 0x905, 0x917, 0x970, 0x3b, 0x938, 0x93f,
+0x924, 0x970, 0x3b, 0x905, 0x915, 0x94d, 0x924, 0x942, 0x970, 0x3b, 0x928, 0x935, 0x970, 0x3b, 0x926, 0x93f, 0x938, 0x970, 0x3b, 0x91c,
+0x928, 0x935, 0x930, 0x940, 0x3b, 0x92b, 0x93c, 0x930, 0x935, 0x930, 0x940, 0x3b, 0x92e, 0x93e, 0x930, 0x94d, 0x91a, 0x3b, 0x905, 0x92a,
+0x94d, 0x930, 0x948, 0x932, 0x3b, 0x92e, 0x908, 0x3b, 0x91c, 0x942, 0x928, 0x3b, 0x91c, 0x941, 0x932, 0x93e, 0x908, 0x3b, 0x905, 0x917,
+0x938, 0x94d, 0x924, 0x3b, 0x938, 0x93f, 0x924, 0x902, 0x92c, 0x930, 0x3b, 0x905, 0x915, 0x94d, 0x924, 0x942, 0x92c, 0x930, 0x3b, 0x928,
+0x935, 0x902, 0x92c, 0x930, 0x3b, 0x926, 0x93f, 0x938, 0x902, 0x92c, 0x930, 0x3b, 0x91c, 0x3b, 0x92b, 0x93c, 0x3b, 0x92e, 0x93e, 0x3b,
+0x905, 0x3b, 0x92e, 0x3b, 0x91c, 0x942, 0x3b, 0x91c, 0x941, 0x3b, 0x905, 0x3b, 0x938, 0x93f, 0x3b, 0x905, 0x3b, 0x928, 0x3b, 0x926,
+0x93f, 0x3b, 0x6a, 0x61, 0x6e, 0x2e, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x2e, 0x3b, 0x6d, 0xe1, 0x72, 0x63, 0x2e, 0x3b, 0xe1,
+0x70, 0x72, 0x2e, 0x3b, 0x6d, 0xe1, 0x6a, 0x2e, 0x3b, 0x6a, 0xfa, 0x6e, 0x2e, 0x3b, 0x6a, 0xfa, 0x6c, 0x2e, 0x3b, 0x61,
+0x75, 0x67, 0x2e, 0x3b, 0x73, 0x7a, 0x65, 0x70, 0x74, 0x2e, 0x3b, 0x6f, 0x6b, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e,
+0x3b, 0x64, 0x65, 0x63, 0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0xe1, 0x72, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0xe1, 0x72,
+0x3b, 0x6d, 0xe1, 0x72, 0x63, 0x69, 0x75, 0x73, 0x3b, 0xe1, 0x70, 0x72, 0x69, 0x6c, 0x69, 0x73, 0x3b, 0x6d, 0xe1, 0x6a,
+0x75, 0x73, 0x3b, 0x6a, 0xfa, 0x6e, 0x69, 0x75, 0x73, 0x3b, 0x6a, 0xfa, 0x6c, 0x69, 0x75, 0x73, 0x3b, 0x61, 0x75, 0x67,
+0x75, 0x73, 0x7a, 0x74, 0x75, 0x73, 0x3b, 0x73, 0x7a, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6f, 0x6b,
+0x74, 0xf3, 0x62, 0x65, 0x72, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d,
+0x62, 0x65, 0x72, 0x3b, 0x4a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0xc1, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x4a, 0x3b, 0x41, 0x3b,
+0x53, 0x7a, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x6a, 0x61, 0x6e, 0x2e, 0x3b, 0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d,
+0x61, 0x72, 0x2e, 0x3b, 0x61, 0x70, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0xed, 0x3b, 0x6a, 0xfa, 0x6e, 0x2e, 0x3b, 0x6a, 0xfa,
+0x6c, 0x2e, 0x3b, 0xe1, 0x67, 0xfa, 0x2e, 0x3b, 0x73, 0x65, 0x70, 0x2e, 0x3b, 0x6f, 0x6b, 0x74, 0x2e, 0x3b, 0x6e, 0xf3,
+0x76, 0x2e, 0x3b, 0x64, 0x65, 0x73, 0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0xfa, 0x61, 0x72, 0x3b, 0x66, 0x65, 0x62, 0x72, 0xfa,
+0x61, 0x72, 0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b, 0x61, 0x70, 0x72, 0xed, 0x6c, 0x3b, 0x6d, 0x61, 0xed, 0x3b, 0x6a, 0xfa,
+0x6e, 0xed, 0x3b, 0x6a, 0xfa, 0x6c, 0xed, 0x3b, 0xe1, 0x67, 0xfa, 0x73, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d,
+0x62, 0x65, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0xf3, 0x62, 0x65, 0x72, 0x3b, 0x6e, 0xf3, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72,
+0x3b, 0x64, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b,
+0x4a, 0x3b, 0x4a, 0x3b, 0xc1, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65,
+0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75,
+0x6c, 0x3b, 0x41, 0x67, 0x74, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65,
+0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x4d,
+0x61, 0x72, 0x65, 0x74, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b,
+0x4a, 0x75, 0x6c, 0x69, 0x3b, 0x41, 0x67, 0x75, 0x73, 0x74, 0x75, 0x73, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62,
+0x65, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b,
+0x44, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x45, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x61, 0x62, 0x68, 0x3b, 0x4d,
+0xe1, 0x72, 0x74, 0x61, 0x3b, 0x41, 0x69, 0x62, 0x3b, 0x42, 0x65, 0x61, 0x6c, 0x3b, 0x4d, 0x65, 0x69, 0x74, 0x68, 0x3b,
+0x49, 0xfa, 0x69, 0x6c, 0x3b, 0x4c, 0xfa, 0x6e, 0x3b, 0x4d, 0x46, 0xf3, 0x6d, 0x68, 0x3b, 0x44, 0x46, 0xf3, 0x6d, 0x68,
+0x3b, 0x53, 0x61, 0x6d, 0x68, 0x3b, 0x4e, 0x6f, 0x6c, 0x6c, 0x3b, 0x45, 0x61, 0x6e, 0xe1, 0x69, 0x72, 0x3b, 0x46, 0x65,
+0x61, 0x62, 0x68, 0x72, 0x61, 0x3b, 0x4d, 0xe1, 0x72, 0x74, 0x61, 0x3b, 0x41, 0x69, 0x62, 0x72, 0x65, 0xe1, 0x6e, 0x3b,
+0x42, 0x65, 0x61, 0x6c, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x3b, 0x4d, 0x65, 0x69, 0x74, 0x68, 0x65, 0x61, 0x6d, 0x68, 0x3b,
+0x49, 0xfa, 0x69, 0x6c, 0x3b, 0x4c, 0xfa, 0x6e, 0x61, 0x73, 0x61, 0x3b, 0x4d, 0x65, 0xe1, 0x6e, 0x20, 0x46, 0xf3, 0x6d,
+0x68, 0x61, 0x69, 0x72, 0x3b, 0x44, 0x65, 0x69, 0x72, 0x65, 0x61, 0x64, 0x68, 0x20, 0x46, 0xf3, 0x6d, 0x68, 0x61, 0x69,
+0x72, 0x3b, 0x53, 0x61, 0x6d, 0x68, 0x61, 0x69, 0x6e, 0x3b, 0x4e, 0x6f, 0x6c, 0x6c, 0x61, 0x69, 0x67, 0x3b, 0x45, 0x3b,
+0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x42, 0x3b, 0x4d, 0x3b, 0x49, 0x3b, 0x4c, 0x3b, 0x4d, 0x3b, 0x44, 0x3b, 0x53, 0x3b,
+0x4e, 0x3b, 0x67, 0x65, 0x6e, 0x3b, 0x66, 0x65, 0x62, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x61, 0x70, 0x72, 0x3b, 0x6d, 0x61,
+0x67, 0x3b, 0x67, 0x69, 0x75, 0x3b, 0x6c, 0x75, 0x67, 0x3b, 0x61, 0x67, 0x6f, 0x3b, 0x73, 0x65, 0x74, 0x3b, 0x6f, 0x74,
+0x74, 0x3b, 0x6e, 0x6f, 0x76, 0x3b, 0x64, 0x69, 0x63, 0x3b, 0x67, 0x65, 0x6e, 0x6e, 0x61, 0x69, 0x6f, 0x3b, 0x66, 0x65,
+0x62, 0x62, 0x72, 0x61, 0x69, 0x6f, 0x3b, 0x6d, 0x61, 0x72, 0x7a, 0x6f, 0x3b, 0x61, 0x70, 0x72, 0x69, 0x6c, 0x65, 0x3b,
+0x6d, 0x61, 0x67, 0x67, 0x69, 0x6f, 0x3b, 0x67, 0x69, 0x75, 0x67, 0x6e, 0x6f, 0x3b, 0x6c, 0x75, 0x67, 0x6c, 0x69, 0x6f,
+0x3b, 0x61, 0x67, 0x6f, 0x73, 0x74, 0x6f, 0x3b, 0x73, 0x65, 0x74, 0x74, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x6f, 0x74,
+0x74, 0x6f, 0x62, 0x72, 0x65, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x64, 0x69, 0x63, 0x65, 0x6d,
+0x62, 0x72, 0x65, 0x3b, 0x47, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x47, 0x3b, 0x4c, 0x3b, 0x41, 0x3b,
+0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0xc9c, 0xca8, 0x3b, 0xcab, 0xcc6, 0xcac, 0xccd, 0xcb0, 0x3b, 0xcae, 0xcbe, 0xcb0,
+0xccd, 0xc9a, 0xccd, 0x3b, 0xc8f, 0xcaa, 0xccd, 0xcb0, 0xcbf, 0x3b, 0xcae, 0xcc7, 0x3b, 0xc9c, 0xcc2, 0xca8, 0xccd, 0x3b, 0xc9c, 0xcc1,
+0xcb2, 0xcc8, 0x3b, 0xc86, 0xc97, 0x3b, 0xcb8, 0xcc6, 0xcaa, 0xccd, 0xc9f, 0xcc6, 0xc82, 0x3b, 0xc85, 0xc95, 0xccd, 0xc9f, 0xccb, 0x3b,
+0xca8, 0xcb5, 0xcc6, 0xc82, 0x3b, 0xca1, 0xcbf, 0xcb8, 0xcc6, 0xc82, 0x3b, 0xc9c, 0xca8, 0xcb5, 0xcb0, 0xcbf, 0x3b, 0xcab, 0xcc6, 0xcac,
+0xccd, 0xcb0, 0xcb5, 0xcb0, 0xcbf, 0x3b, 0xcae, 0xcbe, 0xcb0, 0xccd, 0xc9a, 0xccd, 0x3b, 0xc8f, 0xcaa, 0xccd, 0xcb0, 0xcbf, 0xcb2, 0xccd,
+0x3b, 0xcae, 0xcc7, 0x3b, 0xc9c, 0xcc2, 0xca8, 0xccd, 0x3b, 0xc9c, 0xcc1, 0xcb2, 0xcc8, 0x3b, 0xc86, 0xc97, 0xcb8, 0xccd, 0xc9f, 0xccd,
+0x3b, 0xcb8, 0xcc6, 0xcaa, 0xccd, 0xc9f, 0xcc6, 0xc82, 0xcac, 0xcb0, 0xccd, 0x3b, 0xc85, 0xc95, 0xccd, 0xc9f, 0xccb, 0xcac, 0xcb0, 0xccd,
+0x3b, 0xca8, 0xcb5, 0xcc6, 0xc82, 0xcac, 0xcb0, 0xccd, 0x3b, 0xca1, 0xcbf, 0xcb8, 0xcc6, 0xc82, 0xcac, 0xcb0, 0xccd, 0x3b, 0xc9c, 0x3b,
+0xcab, 0xcc6, 0x3b, 0xcae, 0xcbe, 0x3b, 0xc8f, 0x3b, 0xcae, 0xcc7, 0x3b, 0xc9c, 0xcc2, 0x3b, 0xc9c, 0xcc1, 0x3b, 0xc86, 0x3b, 0xcb8,
+0xcc6, 0x3b, 0xc85, 0x3b, 0xca8, 0x3b, 0xca1, 0xcbf, 0x3b, 0xc9c, 0xca8, 0xcb5, 0xcb0, 0xcbf, 0x3b, 0xcab, 0xcc6, 0xcac, 0xccd, 0xcb0,
+0xcb5, 0xcb0, 0xcbf, 0x3b, 0xcae, 0xcbe, 0xcb0, 0xccd, 0xc9a, 0xccd, 0x3b, 0xc8f, 0xcaa, 0xccd, 0xcb0, 0xcbf, 0x3b, 0xcae, 0xcc7, 0x3b,
+0xc9c, 0xcc2, 0xca8, 0xccd, 0x3b, 0xc9c, 0xcc1, 0xcb2, 0xcc8, 0x3b, 0xc86, 0xc97, 0x3b, 0xcb8, 0xcc6, 0xcaa, 0xccd, 0xc9f, 0xcc6, 0xc82,
+0x3b, 0xc85, 0xc95, 0xccd, 0xc9f, 0xccb, 0x3b, 0xca8, 0xcb5, 0xcc6, 0xc82, 0x3b, 0xca1, 0xcbf, 0xcb8, 0xcc6, 0xc82, 0x3b, 0x62c, 0x646,
+0x624, 0x631, 0x6cc, 0x3b, 0x641, 0x631, 0x624, 0x631, 0x6cc, 0x3b, 0x645, 0x627, 0x631, 0x655, 0x686, 0x3b, 0x627, 0x67e, 0x631, 0x6cc,
+0x644, 0x3b, 0x645, 0x6cc, 0x654, 0x3b, 0x62c, 0x648, 0x657, 0x646, 0x3b, 0x62c, 0x648, 0x657, 0x644, 0x627, 0x6cc, 0x6cc, 0x3b, 0x627,
+0x6af, 0x633, 0x62a, 0x3b, 0x633, 0x62a, 0x645, 0x628, 0x631, 0x3b, 0x627, 0x6a9, 0x62a, 0x648, 0x657, 0x628, 0x631, 0x3b, 0x646, 0x648,
+0x645, 0x628, 0x631, 0x3b, 0x62f, 0x633, 0x645, 0x628, 0x631, 0x3b, 0x62c, 0x3b, 0x641, 0x3b, 0x645, 0x3b, 0x627, 0x3b, 0x645, 0x3b,
+0x62c, 0x3b, 0x62c, 0x3b, 0x627, 0x3b, 0x633, 0x3b, 0x633, 0x3b, 0x627, 0x3b, 0x646, 0x3b, 0x49a, 0x430, 0x4a3, 0x2e, 0x3b, 0x410,
+0x49b, 0x43f, 0x2e, 0x3b, 0x41d, 0x430, 0x443, 0x2e, 0x3b, 0x421, 0x4d9, 0x443, 0x2e, 0x3b, 0x41c, 0x430, 0x43c, 0x2e, 0x3b, 0x41c,
+0x430, 0x443, 0x2e, 0x3b, 0x428, 0x456, 0x43b, 0x2e, 0x3b, 0x422, 0x430, 0x43c, 0x2e, 0x3b, 0x49a, 0x44b, 0x440, 0x2e, 0x3b, 0x49a,
+0x430, 0x437, 0x2e, 0x3b, 0x49a, 0x430, 0x440, 0x2e, 0x3b, 0x416, 0x435, 0x43b, 0x2e, 0x3b, 0x49a, 0x430, 0x4a3, 0x442, 0x430, 0x440,
+0x3b, 0x410, 0x49b, 0x43f, 0x430, 0x43d, 0x3b, 0x41d, 0x430, 0x443, 0x440, 0x44b, 0x437, 0x3b, 0x421, 0x4d9, 0x443, 0x456, 0x440, 0x3b,
+0x41c, 0x430, 0x43c, 0x44b, 0x440, 0x3b, 0x41c, 0x430, 0x443, 0x441, 0x44b, 0x43c, 0x3b, 0x428, 0x456, 0x43b, 0x434, 0x435, 0x3b, 0x422,
+0x430, 0x43c, 0x44b, 0x437, 0x3b, 0x49a, 0x44b, 0x440, 0x43a, 0x4af, 0x439, 0x435, 0x43a, 0x3b, 0x49a, 0x430, 0x437, 0x430, 0x43d, 0x3b,
+0x49a, 0x430, 0x440, 0x430, 0x448, 0x430, 0x3b, 0x416, 0x435, 0x43b, 0x442, 0x43e, 0x49b, 0x441, 0x430, 0x43d, 0x3b, 0x49a, 0x3b, 0x410,
+0x3b, 0x41d, 0x3b, 0x421, 0x3b, 0x41c, 0x3b, 0x41c, 0x3b, 0x428, 0x3b, 0x422, 0x3b, 0x49a, 0x3b, 0x49a, 0x3b, 0x49a, 0x3b, 0x416,
+0x3b, 0x49b, 0x430, 0x4a3, 0x2e, 0x3b, 0x430, 0x49b, 0x43f, 0x2e, 0x3b, 0x43d, 0x430, 0x443, 0x2e, 0x3b, 0x441, 0x4d9, 0x443, 0x2e,
+0x3b, 0x43c, 0x430, 0x43c, 0x2e, 0x3b, 0x43c, 0x430, 0x443, 0x2e, 0x3b, 0x448, 0x456, 0x43b, 0x2e, 0x3b, 0x442, 0x430, 0x43c, 0x2e,
+0x3b, 0x49b, 0x44b, 0x440, 0x2e, 0x3b, 0x49b, 0x430, 0x437, 0x2e, 0x3b, 0x49b, 0x430, 0x440, 0x2e, 0x3b, 0x436, 0x435, 0x43b, 0x2e,
+0x3b, 0x49b, 0x430, 0x4a3, 0x442, 0x430, 0x440, 0x3b, 0x430, 0x49b, 0x43f, 0x430, 0x43d, 0x3b, 0x43d, 0x430, 0x443, 0x440, 0x44b, 0x437,
+0x3b, 0x441, 0x4d9, 0x443, 0x456, 0x440, 0x3b, 0x43c, 0x430, 0x43c, 0x44b, 0x440, 0x3b, 0x43c, 0x430, 0x443, 0x441, 0x44b, 0x43c, 0x3b,
+0x448, 0x456, 0x43b, 0x434, 0x435, 0x3b, 0x442, 0x430, 0x43c, 0x44b, 0x437, 0x3b, 0x49b, 0x44b, 0x440, 0x43a, 0x4af, 0x439, 0x435, 0x43a,
+0x3b, 0x49b, 0x430, 0x437, 0x430, 0x43d, 0x3b, 0x49b, 0x430, 0x440, 0x430, 0x448, 0x430, 0x3b, 0x436, 0x435, 0x43b, 0x442, 0x43e, 0x49b,
+0x441, 0x430, 0x43d, 0x3b, 0x6d, 0x75, 0x74, 0x2e, 0x3b, 0x67, 0x61, 0x73, 0x2e, 0x3b, 0x77, 0x65, 0x72, 0x2e, 0x3b, 0x6d,
+0x61, 0x74, 0x2e, 0x3b, 0x67, 0x69, 0x63, 0x2e, 0x3b, 0x6b, 0x61, 0x6d, 0x2e, 0x3b, 0x6e, 0x79, 0x61, 0x2e, 0x3b, 0x6b,
+0x61, 0x6e, 0x2e, 0x3b, 0x6e, 0x7a, 0x65, 0x2e, 0x3b, 0x75, 0x6b, 0x77, 0x2e, 0x3b, 0x75, 0x67, 0x75, 0x2e, 0x3b, 0x75,
+0x6b, 0x75, 0x2e, 0x3b, 0x4d, 0x75, 0x74, 0x61, 0x72, 0x61, 0x6d, 0x61, 0x3b, 0x47, 0x61, 0x73, 0x68, 0x79, 0x61, 0x6e,
+0x74, 0x61, 0x72, 0x65, 0x3b, 0x57, 0x65, 0x72, 0x75, 0x72, 0x77, 0x65, 0x3b, 0x4d, 0x61, 0x74, 0x61, 0x3b, 0x47, 0x69,
+0x63, 0x75, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x3b, 0x4b, 0x61, 0x6d, 0x65, 0x6e, 0x61, 0x3b, 0x4e, 0x79, 0x61, 0x6b, 0x61,
+0x6e, 0x67, 0x61, 0x3b, 0x4b, 0x61, 0x6e, 0x61, 0x6d, 0x61, 0x3b, 0x4e, 0x7a, 0x65, 0x6c, 0x69, 0x3b, 0x55, 0x6b, 0x77,
+0x61, 0x6b, 0x69, 0x72, 0x61, 0x3b, 0x55, 0x67, 0x75, 0x73, 0x68, 0x79, 0x69, 0x6e, 0x67, 0x6f, 0x3b, 0x55, 0x6b, 0x75,
+0x62, 0x6f, 0x7a, 0x61, 0x3b, 0x42f, 0x43d, 0x432, 0x3b, 0x424, 0x435, 0x432, 0x3b, 0x41c, 0x430, 0x440, 0x3b, 0x410, 0x43f, 0x440,
+0x3b, 0x41c, 0x430, 0x439, 0x3b, 0x418, 0x44e, 0x43d, 0x3b, 0x418, 0x44e, 0x43b, 0x3b, 0x410, 0x432, 0x433, 0x3b, 0x421, 0x435, 0x43d,
+0x3b, 0x41e, 0x43a, 0x442, 0x3b, 0x41d, 0x43e, 0x44f, 0x3b, 0x414, 0x435, 0x43a, 0x3b, 0x42f, 0x43d, 0x432, 0x430, 0x440, 0x44c, 0x3b,
+0x424, 0x435, 0x432, 0x440, 0x430, 0x43b, 0x44c, 0x3b, 0x41c, 0x430, 0x440, 0x442, 0x3b, 0x410, 0x43f, 0x440, 0x435, 0x43b, 0x44c, 0x3b,
+0x41c, 0x430, 0x439, 0x3b, 0x418, 0x44e, 0x43d, 0x44c, 0x3b, 0x418, 0x44e, 0x43b, 0x44c, 0x3b, 0x410, 0x432, 0x433, 0x443, 0x441, 0x442,
+0x3b, 0x421, 0x435, 0x43d, 0x442, 0x44f, 0x431, 0x440, 0x44c, 0x3b, 0x41e, 0x43a, 0x442, 0x44f, 0x431, 0x440, 0x44c, 0x3b, 0x41d, 0x43e,
+0x44f, 0x431, 0x440, 0x44c, 0x3b, 0x414, 0x435, 0x43a, 0x430, 0x431, 0x440, 0x44c, 0x3b, 0x42f, 0x3b, 0x424, 0x3b, 0x41c, 0x3b, 0x410,
+0x3b, 0x41c, 0x3b, 0x418, 0x3b, 0x418, 0x3b, 0x410, 0x3b, 0x421, 0x3b, 0x41e, 0x3b, 0x41d, 0x3b, 0x414, 0x3b, 0x44f, 0x43d, 0x432,
+0x2e, 0x3b, 0x444, 0x435, 0x432, 0x2e, 0x3b, 0x43c, 0x430, 0x440, 0x2e, 0x3b, 0x430, 0x43f, 0x440, 0x2e, 0x3b, 0x43c, 0x430, 0x439,
+0x3b, 0x438, 0x44e, 0x43d, 0x2e, 0x3b, 0x438, 0x44e, 0x43b, 0x2e, 0x3b, 0x430, 0x432, 0x433, 0x2e, 0x3b, 0x441, 0x435, 0x43d, 0x2e,
+0x3b, 0x43e, 0x43a, 0x442, 0x2e, 0x3b, 0x43d, 0x43e, 0x44f, 0x2e, 0x3b, 0x434, 0x435, 0x43a, 0x2e, 0x3b, 0x44f, 0x43d, 0x432, 0x430,
+0x440, 0x44c, 0x3b, 0x444, 0x435, 0x432, 0x440, 0x430, 0x43b, 0x44c, 0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430, 0x43f, 0x440, 0x435,
+0x43b, 0x44c, 0x3b, 0x43c, 0x430, 0x439, 0x3b, 0x438, 0x44e, 0x43d, 0x44c, 0x3b, 0x438, 0x44e, 0x43b, 0x44c, 0x3b, 0x430, 0x432, 0x433,
+0x443, 0x441, 0x442, 0x3b, 0x441, 0x435, 0x43d, 0x442, 0x44f, 0x431, 0x440, 0x44c, 0x3b, 0x43e, 0x43a, 0x442, 0x44f, 0x431, 0x440, 0x44c,
+0x3b, 0x43d, 0x43e, 0x44f, 0x431, 0x440, 0x44c, 0x3b, 0x434, 0x435, 0x43a, 0x430, 0x431, 0x440, 0x44c, 0x3b, 0x31, 0xc6d4, 0x3b, 0x32,
+0xc6d4, 0x3b, 0x33, 0xc6d4, 0x3b, 0x34, 0xc6d4, 0x3b, 0x35, 0xc6d4, 0x3b, 0x36, 0xc6d4, 0x3b, 0x37, 0xc6d4, 0x3b, 0x38, 0xc6d4, 0x3b,
+0x39, 0xc6d4, 0x3b, 0x31, 0x30, 0xc6d4, 0x3b, 0x31, 0x31, 0xc6d4, 0x3b, 0x31, 0x32, 0xc6d4, 0x3b, 0x4d, 0x75, 0x74, 0x2e, 0x3b,
+0x47, 0x61, 0x73, 0x2e, 0x3b, 0x57, 0x65, 0x72, 0x2e, 0x3b, 0x4d, 0x61, 0x74, 0x2e, 0x3b, 0x47, 0x69, 0x63, 0x2e, 0x3b,
+0x4b, 0x61, 0x6d, 0x2e, 0x3b, 0x4e, 0x79, 0x61, 0x2e, 0x3b, 0x4b, 0x61, 0x6e, 0x2e, 0x3b, 0x4e, 0x7a, 0x65, 0x2e, 0x3b,
+0x55, 0x6b, 0x77, 0x2e, 0x3b, 0x55, 0x67, 0x75, 0x2e, 0x3b, 0x55, 0x6b, 0x75, 0x2e, 0x3b, 0x4e, 0x7a, 0x65, 0x72, 0x6f,
+0x3b, 0x52, 0x75, 0x68, 0x75, 0x68, 0x75, 0x6d, 0x61, 0x3b, 0x4e, 0x74, 0x77, 0x61, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x3b,
+0x4e, 0x64, 0x61, 0x6d, 0x75, 0x6b, 0x69, 0x7a, 0x61, 0x3b, 0x52, 0x75, 0x73, 0x61, 0x6d, 0x61, 0x3b, 0x52, 0x75, 0x68,
+0x65, 0x73, 0x68, 0x69, 0x3b, 0x4d, 0x75, 0x6b, 0x61, 0x6b, 0x61, 0x72, 0x6f, 0x3b, 0x4e, 0x79, 0x61, 0x6e, 0x64, 0x61,
+0x67, 0x61, 0x72, 0x6f, 0x3b, 0x4e, 0x79, 0x61, 0x6b, 0x61, 0x6e, 0x67, 0x61, 0x3b, 0x47, 0x69, 0x74, 0x75, 0x67, 0x75,
+0x74, 0x75, 0x3b, 0x4d, 0x75, 0x6e, 0x79, 0x6f, 0x6e, 0x79, 0x6f, 0x3b, 0x4b, 0x69, 0x67, 0x61, 0x72, 0x61, 0x6d, 0x61,
+0x3b, 0xea1, 0x2e, 0xe81, 0x2e, 0x3b, 0xe81, 0x2e, 0xe9e, 0x2e, 0x3b, 0xea1, 0x2e, 0xe99, 0x2e, 0x3b, 0xea1, 0x2e, 0xeaa, 0x2e,
+0x3b, 0xe9e, 0x2e, 0xe9e, 0x2e, 0x3b, 0xea1, 0xeb4, 0x2e, 0xe96, 0x2e, 0x3b, 0xe81, 0x2e, 0xea5, 0x2e, 0x3b, 0xeaa, 0x2e, 0xeab,
+0x2e, 0x3b, 0xe81, 0x2e, 0xe8d, 0x2e, 0x3b, 0xe95, 0x2e, 0xea5, 0x2e, 0x3b, 0xe9e, 0x2e, 0xe88, 0x2e, 0x3b, 0xe97, 0x2e, 0xea7,
+0x2e, 0x3b, 0xea1, 0xeb1, 0xe87, 0xe81, 0xead, 0xe99, 0x3b, 0xe81, 0xeb8, 0xea1, 0xe9e, 0xeb2, 0x3b, 0xea1, 0xeb5, 0xe99, 0xeb2, 0x3b,
+0xec0, 0xea1, 0xeaa, 0xeb2, 0x3b, 0xe9e, 0xeb6, 0xe94, 0xeaa, 0xeb0, 0xe9e, 0xeb2, 0x3b, 0xea1, 0xeb4, 0xe96, 0xeb8, 0xe99, 0xeb2, 0x3b,
+0xe81, 0xecd, 0xea5, 0xeb0, 0xe81, 0xebb, 0xe94, 0x3b, 0xeaa, 0xeb4, 0xe87, 0xeab, 0xeb2, 0x3b, 0xe81, 0xeb1, 0xe99, 0xe8d, 0xeb2, 0x3b,
+0xe95, 0xeb8, 0xea5, 0xeb2, 0x3b, 0xe9e, 0xeb0, 0xe88, 0xeb4, 0xe81, 0x3b, 0xe97, 0xeb1, 0xe99, 0xea7, 0xeb2, 0x3b, 0x6a, 0x61, 0x6e,
+0x76, 0x2e, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x73, 0x3b, 0x61, 0x70, 0x72, 0x2e, 0x3b,
+0x6d, 0x61, 0x69, 0x6a, 0x73, 0x3b, 0x6a, 0x16b, 0x6e, 0x2e, 0x3b, 0x6a, 0x16b, 0x6c, 0x2e, 0x3b, 0x61, 0x75, 0x67, 0x2e,
+0x3b, 0x73, 0x65, 0x70, 0x74, 0x2e, 0x3b, 0x6f, 0x6b, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x63,
+0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0x76, 0x101, 0x72, 0x69, 0x73, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x101, 0x72, 0x69, 0x73,
+0x3b, 0x6d, 0x61, 0x72, 0x74, 0x73, 0x3b, 0x61, 0x70, 0x72, 0x12b, 0x6c, 0x69, 0x73, 0x3b, 0x6d, 0x61, 0x69, 0x6a, 0x73,
+0x3b, 0x6a, 0x16b, 0x6e, 0x69, 0x6a, 0x73, 0x3b, 0x6a, 0x16b, 0x6c, 0x69, 0x6a, 0x73, 0x3b, 0x61, 0x75, 0x67, 0x75, 0x73,
+0x74, 0x73, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x72, 0x69, 0x73, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x72,
+0x69, 0x73, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x72, 0x69, 0x73, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x72,
+0x69, 0x73, 0x3b, 0x79, 0x61, 0x6e, 0x3b, 0x66, 0x62, 0x6c, 0x3b, 0x6d, 0x73, 0x69, 0x3b, 0x61, 0x70, 0x6c, 0x3b, 0x6d,
+0x61, 0x69, 0x3b, 0x79, 0x75, 0x6e, 0x3b, 0x79, 0x75, 0x6c, 0x3b, 0x61, 0x67, 0x74, 0x3b, 0x73, 0x74, 0x62, 0x3b, 0x254,
+0x74, 0x62, 0x3b, 0x6e, 0x76, 0x62, 0x3b, 0x64, 0x73, 0x62, 0x3b, 0x73, 0xe1, 0x6e, 0x7a, 0xe1, 0x20, 0x79, 0x61, 0x20,
+0x79, 0x61, 0x6d, 0x62, 0x6f, 0x3b, 0x73, 0xe1, 0x6e, 0x7a, 0xe1, 0x20, 0x79, 0x61, 0x20, 0x6d, 0xed, 0x62, 0x61, 0x6c,
+0xe9, 0x3b, 0x73, 0xe1, 0x6e, 0x7a, 0xe1, 0x20, 0x79, 0x61, 0x20, 0x6d, 0xed, 0x73, 0xe1, 0x74, 0x6f, 0x3b, 0x73, 0xe1,
+0x6e, 0x7a, 0xe1, 0x20, 0x79, 0x61, 0x20, 0x6d, 0xed, 0x6e, 0x65, 0x69, 0x3b, 0x73, 0xe1, 0x6e, 0x7a, 0xe1, 0x20, 0x79,
+0x61, 0x20, 0x6d, 0xed, 0x74, 0xe1, 0x6e, 0x6f, 0x3b, 0x73, 0xe1, 0x6e, 0x7a, 0xe1, 0x20, 0x79, 0x61, 0x20, 0x6d, 0x6f,
+0x74, 0xf3, 0x62, 0xe1, 0x3b, 0x73, 0xe1, 0x6e, 0x7a, 0xe1, 0x20, 0x79, 0x61, 0x20, 0x6e, 0x73, 0x61, 0x6d, 0x62, 0x6f,
+0x3b, 0x73, 0xe1, 0x6e, 0x7a, 0xe1, 0x20, 0x79, 0x61, 0x20, 0x6d, 0x77, 0x61, 0x6d, 0x62, 0x65, 0x3b, 0x73, 0xe1, 0x6e,
+0x7a, 0xe1, 0x20, 0x79, 0x61, 0x20, 0x6c, 0x69, 0x62, 0x77, 0x61, 0x3b, 0x73, 0xe1, 0x6e, 0x7a, 0xe1, 0x20, 0x79, 0x61,
+0x20, 0x7a, 0xf3, 0x6d, 0x69, 0x3b, 0x73, 0xe1, 0x6e, 0x7a, 0xe1, 0x20, 0x79, 0x61, 0x20, 0x7a, 0xf3, 0x6d, 0x69, 0x20,
+0x6e, 0x61, 0x20, 0x6d, 0x254, 0x30c, 0x6b, 0x254, 0x301, 0x3b, 0x73, 0xe1, 0x6e, 0x7a, 0xe1, 0x20, 0x79, 0x61, 0x20, 0x7a,
+0xf3, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x6d, 0xed, 0x62, 0x61, 0x6c, 0xe9, 0x3b, 0x79, 0x3b, 0x66, 0x3b, 0x6d, 0x3b,
+0x61, 0x3b, 0x6d, 0x3b, 0x79, 0x3b, 0x79, 0x3b, 0x61, 0x3b, 0x73, 0x3b, 0x254, 0x3b, 0x6e, 0x3b, 0x64, 0x3b, 0x73, 0x61,
+0x75, 0x73, 0x2e, 0x3b, 0x76, 0x61, 0x73, 0x2e, 0x3b, 0x6b, 0x6f, 0x76, 0x2e, 0x3b, 0x62, 0x61, 0x6c, 0x2e, 0x3b, 0x67,
+0x65, 0x67, 0x2e, 0x3b, 0x62, 0x69, 0x72, 0x17e, 0x2e, 0x3b, 0x6c, 0x69, 0x65, 0x70, 0x2e, 0x3b, 0x72, 0x75, 0x67, 0x70,
+0x2e, 0x3b, 0x72, 0x75, 0x67, 0x73, 0x2e, 0x3b, 0x73, 0x70, 0x61, 0x6c, 0x2e, 0x3b, 0x6c, 0x61, 0x70, 0x6b, 0x72, 0x2e,
+0x3b, 0x67, 0x72, 0x75, 0x6f, 0x64, 0x2e, 0x3b, 0x73, 0x61, 0x75, 0x73, 0x69, 0x73, 0x3b, 0x76, 0x61, 0x73, 0x61, 0x72,
+0x69, 0x73, 0x3b, 0x6b, 0x6f, 0x76, 0x61, 0x73, 0x3b, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x64, 0x69, 0x73, 0x3b, 0x67, 0x65,
+0x67, 0x75, 0x17e, 0x117, 0x3b, 0x62, 0x69, 0x72, 0x17e, 0x65, 0x6c, 0x69, 0x73, 0x3b, 0x6c, 0x69, 0x65, 0x70, 0x61, 0x3b,
+0x72, 0x75, 0x67, 0x70, 0x6a, 0x16b, 0x74, 0x69, 0x73, 0x3b, 0x72, 0x75, 0x67, 0x73, 0x117, 0x6a, 0x69, 0x73, 0x3b, 0x73,
+0x70, 0x61, 0x6c, 0x69, 0x73, 0x3b, 0x6c, 0x61, 0x70, 0x6b, 0x72, 0x69, 0x74, 0x69, 0x73, 0x3b, 0x67, 0x72, 0x75, 0x6f,
+0x64, 0x69, 0x73, 0x3b, 0x53, 0x3b, 0x56, 0x3b, 0x4b, 0x3b, 0x42, 0x3b, 0x47, 0x3b, 0x42, 0x3b, 0x4c, 0x3b, 0x52, 0x3b,
+0x52, 0x3b, 0x53, 0x3b, 0x4c, 0x3b, 0x47, 0x3b, 0x73, 0x61, 0x75, 0x73, 0x69, 0x6f, 0x3b, 0x76, 0x61, 0x73, 0x61, 0x72,
+0x69, 0x6f, 0x3b, 0x6b, 0x6f, 0x76, 0x6f, 0x3b, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x64, 0x17e, 0x69, 0x6f, 0x3b, 0x67, 0x65,
+0x67, 0x75, 0x17e, 0x117, 0x73, 0x3b, 0x62, 0x69, 0x72, 0x17e, 0x65, 0x6c, 0x69, 0x6f, 0x3b, 0x6c, 0x69, 0x65, 0x70, 0x6f,
+0x73, 0x3b, 0x72, 0x75, 0x67, 0x70, 0x6a, 0x16b, 0x10d, 0x69, 0x6f, 0x3b, 0x72, 0x75, 0x67, 0x73, 0x117, 0x6a, 0x6f, 0x3b,
+0x73, 0x70, 0x61, 0x6c, 0x69, 0x6f, 0x3b, 0x6c, 0x61, 0x70, 0x6b, 0x72, 0x69, 0x10d, 0x69, 0x6f, 0x3b, 0x67, 0x72, 0x75,
+0x6f, 0x64, 0x17e, 0x69, 0x6f, 0x3b, 0x458, 0x430, 0x43d, 0x2e, 0x3b, 0x444, 0x435, 0x432, 0x2e, 0x3b, 0x43c, 0x430, 0x440, 0x2e,
+0x3b, 0x430, 0x43f, 0x440, 0x2e, 0x3b, 0x43c, 0x430, 0x458, 0x3b, 0x458, 0x443, 0x43d, 0x2e, 0x3b, 0x458, 0x443, 0x43b, 0x2e, 0x3b,
+0x430, 0x432, 0x433, 0x2e, 0x3b, 0x441, 0x435, 0x43f, 0x442, 0x2e, 0x3b, 0x43e, 0x43a, 0x442, 0x2e, 0x3b, 0x43d, 0x43e, 0x435, 0x43c,
+0x2e, 0x3b, 0x434, 0x435, 0x43a, 0x2e, 0x3b, 0x458, 0x430, 0x43d, 0x443, 0x430, 0x440, 0x438, 0x3b, 0x444, 0x435, 0x432, 0x440, 0x443,
+0x430, 0x440, 0x438, 0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430, 0x43f, 0x440, 0x438, 0x43b, 0x3b, 0x43c, 0x430, 0x458, 0x3b, 0x458,
+0x443, 0x43d, 0x438, 0x3b, 0x458, 0x443, 0x43b, 0x438, 0x3b, 0x430, 0x432, 0x433, 0x443, 0x441, 0x442, 0x3b, 0x441, 0x435, 0x43f, 0x442,
+0x435, 0x43c, 0x432, 0x440, 0x438, 0x3b, 0x43e, 0x43a, 0x442, 0x43e, 0x43c, 0x432, 0x440, 0x438, 0x3b, 0x43d, 0x43e, 0x435, 0x43c, 0x432,
+0x440, 0x438, 0x3b, 0x434, 0x435, 0x43a, 0x435, 0x43c, 0x432, 0x440, 0x438, 0x3b, 0x458, 0x3b, 0x444, 0x3b, 0x43c, 0x3b, 0x430, 0x3b,
+0x43c, 0x3b, 0x458, 0x3b, 0x458, 0x3b, 0x430, 0x3b, 0x441, 0x3b, 0x43e, 0x3b, 0x43d, 0x3b, 0x434, 0x3b, 0x4a, 0x61, 0x6e, 0x3b,
+0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x79, 0x3b, 0x4a, 0x6f, 0x6e, 0x3b,
+0x4a, 0x6f, 0x6c, 0x3b, 0x41, 0x6f, 0x67, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b,
+0x44, 0x65, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x6f, 0x61, 0x72, 0x79, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x6f, 0x61, 0x72, 0x79,
+0x3b, 0x4d, 0x61, 0x72, 0x74, 0x73, 0x61, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c, 0x79, 0x3b, 0x4d, 0x65, 0x79, 0x3b, 0x4a,
+0x6f, 0x6e, 0x61, 0x3b, 0x4a, 0x6f, 0x6c, 0x61, 0x79, 0x3b, 0x41, 0x6f, 0x67, 0x6f, 0x73, 0x69, 0x74, 0x72, 0x61, 0x3b,
+0x53, 0x65, 0x70, 0x74, 0x61, 0x6d, 0x62, 0x72, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x72, 0x61, 0x3b, 0x4e, 0x6f,
+0x76, 0x61, 0x6d, 0x62, 0x72, 0x61, 0x3b, 0x44, 0x65, 0x73, 0x61, 0x6d, 0x62, 0x72, 0x61, 0x3b, 0x4a, 0x61, 0x6e, 0x3b,
+0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x63, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b,
+0x4a, 0x75, 0x6c, 0x3b, 0x4f, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b,
+0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x69,
+0x3b, 0x4d, 0x61, 0x63, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a,
+0x75, 0x6c, 0x61, 0x69, 0x3b, 0x4f, 0x67, 0x6f, 0x73, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b,
+0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44, 0x69, 0x73,
+0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x4a, 0x3b,
+0x4f, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0xd1c, 0xd28, 0xd41, 0x3b, 0xd2b, 0xd46, 0xd2c, 0xd4d, 0xd30, 0xd41,
+0x3b, 0xd2e, 0xd3e, 0xd7c, 0x3b, 0xd0f, 0xd2a, 0xd4d, 0xd30, 0xd3f, 0x3b, 0xd2e, 0xd47, 0xd2f, 0xd4d, 0x3b, 0xd1c, 0xd42, 0xd7a, 0x3b,
+0xd1c, 0xd42, 0xd32, 0xd48, 0x3b, 0xd13, 0xd17, 0x3b, 0xd38, 0xd46, 0xd2a, 0xd4d, 0xd31, 0xd4d, 0xd31, 0xd02, 0x3b, 0xd12, 0xd15, 0xd4d,
+0xd1f, 0xd4b, 0x3b, 0xd28, 0xd35, 0xd02, 0x3b, 0xd21, 0xd3f, 0xd38, 0xd02, 0x3b, 0xd1c, 0xd28, 0xd41, 0xd35, 0xd30, 0xd3f, 0x3b, 0xd2b,
+0xd46, 0xd2c, 0xd4d, 0xd30, 0xd41, 0xd35, 0xd30, 0xd3f, 0x3b, 0xd2e, 0xd3e, 0xd7c, 0xd1a, 0xd4d, 0xd1a, 0xd4d, 0x3b, 0xd0f, 0xd2a, 0xd4d,
+0xd30, 0xd3f, 0xd7d, 0x3b, 0xd2e, 0xd47, 0xd2f, 0xd4d, 0x3b, 0xd1c, 0xd42, 0xd7a, 0x3b, 0xd1c, 0xd42, 0xd32, 0xd48, 0x3b, 0xd13, 0xd17,
+0xd38, 0xd4d, 0xd31, 0xd4d, 0xd31, 0xd4d, 0x3b, 0xd38, 0xd46, 0xd2a, 0xd4d, 0xd31, 0xd4d, 0xd31, 0xd02, 0xd2c, 0xd7c, 0x3b, 0xd12, 0xd15,
+0xd4d, 0x200c, 0xd1f, 0xd4b, 0xd2c, 0xd7c, 0x3b, 0xd28, 0xd35, 0xd02, 0xd2c, 0xd7c, 0x3b, 0xd21, 0xd3f, 0xd38, 0xd02, 0xd2c, 0xd7c, 0x3b,
+0xd1c, 0x3b, 0xd2b, 0xd46, 0x3b, 0xd2e, 0xd3e, 0x3b, 0xd0f, 0x3b, 0xd2e, 0xd46, 0x3b, 0xd1c, 0xd42, 0xd7a, 0x3b, 0xd1c, 0xd42, 0x3b,
+0xd13, 0x3b, 0xd38, 0xd46, 0x3b, 0xd12, 0x3b, 0xd28, 0x3b, 0xd21, 0xd3f, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x72, 0x61, 0x3b,
+0x4d, 0x61, 0x72, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x6a, 0x3b, 0x120, 0x75, 0x6e, 0x3b, 0x4c, 0x75, 0x6c, 0x3b,
+0x41, 0x77, 0x77, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x74, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69, 0x10b, 0x3b,
+0x4a, 0x61, 0x6e, 0x6e, 0x61, 0x72, 0x3b, 0x46, 0x72, 0x61, 0x72, 0x3b, 0x4d, 0x61, 0x72, 0x7a, 0x75, 0x3b, 0x41, 0x70,
+0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x65, 0x6a, 0x6a, 0x75, 0x3b, 0x120, 0x75, 0x6e, 0x6a, 0x75, 0x3b, 0x4c, 0x75, 0x6c, 0x6a,
+0x75, 0x3b, 0x41, 0x77, 0x77, 0x69, 0x73, 0x73, 0x75, 0x3b, 0x53, 0x65, 0x74, 0x74, 0x65, 0x6d, 0x62, 0x72, 0x75, 0x3b,
+0x4f, 0x74, 0x74, 0x75, 0x62, 0x72, 0x75, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x72, 0x75, 0x3b, 0x44, 0x69, 0x10b,
+0x65, 0x6d, 0x62, 0x72, 0x75, 0x3b, 0x4a, 0x6e, 0x3b, 0x46, 0x72, 0x3b, 0x4d, 0x7a, 0x3b, 0x41, 0x70, 0x3b, 0x4d, 0x6a,
+0x3b, 0x120, 0x6e, 0x3b, 0x4c, 0x6a, 0x3b, 0x41, 0x77, 0x3b, 0x53, 0x74, 0x3b, 0x4f, 0x62, 0x3b, 0x4e, 0x76, 0x3b, 0x44,
+0x10b, 0x3b, 0x4a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x120, 0x3b, 0x4c, 0x3b, 0x41, 0x3b, 0x53, 0x3b,
+0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x91c, 0x93e, 0x928, 0x947, 0x3b, 0x92b, 0x947, 0x92c, 0x94d, 0x930, 0x941, 0x3b, 0x92e, 0x93e,
+0x930, 0x94d, 0x91a, 0x3b, 0x90f, 0x92a, 0x94d, 0x930, 0x93f, 0x3b, 0x92e, 0x947, 0x3b, 0x91c, 0x942, 0x928, 0x3b, 0x91c, 0x941, 0x932,
+0x948, 0x3b, 0x911, 0x917, 0x3b, 0x938, 0x92a, 0x94d, 0x91f, 0x947, 0x902, 0x3b, 0x911, 0x915, 0x94d, 0x91f, 0x94b, 0x3b, 0x928, 0x94b,
+0x935, 0x94d, 0x939, 0x947, 0x902, 0x3b, 0x921, 0x93f, 0x938, 0x947, 0x902, 0x3b, 0x91c, 0x93e, 0x928, 0x947, 0x935, 0x93e, 0x930, 0x940,
+0x3b, 0x92b, 0x947, 0x92c, 0x94d, 0x930, 0x941, 0x935, 0x93e, 0x930, 0x940, 0x3b, 0x92e, 0x93e, 0x930, 0x94d, 0x91a, 0x3b, 0x90f, 0x92a,
+0x94d, 0x930, 0x93f, 0x932, 0x3b, 0x92e, 0x947, 0x3b, 0x91c, 0x942, 0x928, 0x3b, 0x91c, 0x941, 0x932, 0x948, 0x3b, 0x911, 0x917, 0x938,
+0x94d, 0x91f, 0x3b, 0x938, 0x92a, 0x94d, 0x91f, 0x947, 0x902, 0x92c, 0x930, 0x3b, 0x911, 0x915, 0x94d, 0x91f, 0x94b, 0x92c, 0x930, 0x3b,
+0x928, 0x94b, 0x935, 0x94d, 0x939, 0x947, 0x902, 0x92c, 0x930, 0x3b, 0x921, 0x93f, 0x938, 0x947, 0x902, 0x92c, 0x930, 0x3b, 0x91c, 0x93e,
+0x3b, 0x92b, 0x947, 0x3b, 0x92e, 0x93e, 0x3b, 0x90f, 0x3b, 0x92e, 0x947, 0x3b, 0x91c, 0x942, 0x3b, 0x91c, 0x941, 0x3b, 0x911, 0x3b,
+0x938, 0x3b, 0x911, 0x3b, 0x928, 0x94b, 0x3b, 0x921, 0x93f, 0x3b, 0x31, 0x2d, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x32, 0x2d,
+0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x33, 0x2d, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x34, 0x2d, 0x440, 0x20, 0x441, 0x430,
+0x440, 0x3b, 0x35, 0x2d, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x36, 0x2d, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x37, 0x2d,
+0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x38, 0x2d, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x39, 0x2d, 0x440, 0x20, 0x441, 0x430,
+0x440, 0x3b, 0x31, 0x30, 0x2d, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x31, 0x31, 0x2d, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b,
+0x31, 0x32, 0x2d, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x41d, 0x44d, 0x433, 0x434, 0x4af, 0x433, 0x44d, 0x44d, 0x440, 0x20, 0x441,
+0x430, 0x440, 0x3b, 0x425, 0x43e, 0x451, 0x440, 0x434, 0x443, 0x433, 0x430, 0x430, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x413, 0x443,
+0x440, 0x430, 0x432, 0x434, 0x443, 0x433, 0x430, 0x430, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x414, 0x4e9, 0x440, 0x4e9, 0x432, 0x434,
+0x4af, 0x433, 0x44d, 0x44d, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x422, 0x430, 0x432, 0x434, 0x443, 0x433, 0x430, 0x430, 0x440, 0x20,
+0x441, 0x430, 0x440, 0x3b, 0x417, 0x443, 0x440, 0x433, 0x430, 0x430, 0x434, 0x443, 0x433, 0x430, 0x430, 0x440, 0x20, 0x441, 0x430, 0x440,
+0x3b, 0x414, 0x43e, 0x43b, 0x434, 0x443, 0x433, 0x430, 0x430, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x41d, 0x430, 0x439, 0x43c, 0x434,
+0x443, 0x433, 0x430, 0x430, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x415, 0x441, 0x434, 0x4af, 0x433, 0x44d, 0x44d, 0x440, 0x20, 0x441,
+0x430, 0x440, 0x3b, 0x410, 0x440, 0x430, 0x432, 0x434, 0x443, 0x433, 0x430, 0x430, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x410, 0x440,
+0x432, 0x430, 0x43d, 0x20, 0x43d, 0x44d, 0x433, 0x434, 0x4af, 0x433, 0x44d, 0x44d, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x410, 0x440,
+0x432, 0x430, 0x43d, 0x20, 0x445, 0x43e, 0x451, 0x440, 0x434, 0x443, 0x433, 0x430, 0x430, 0x440, 0x20, 0x441, 0x430, 0x440, 0x3b, 0x49,
+0x3b, 0x49, 0x49, 0x3b, 0x49, 0x49, 0x49, 0x3b, 0x49, 0x56, 0x3b, 0x56, 0x3b, 0x56, 0x49, 0x3b, 0x56, 0x49, 0x49, 0x3b,
+0x56, 0x49, 0x49, 0x49, 0x3b, 0x49, 0x58, 0x3b, 0x58, 0x3b, 0x58, 0x49, 0x3b, 0x58, 0x49, 0x49, 0x3b, 0x91c, 0x928, 0x935,
+0x930, 0x940, 0x3b, 0x92b, 0x947, 0x92c, 0x94d, 0x930, 0x941, 0x905, 0x930, 0x940, 0x3b, 0x92e, 0x93e, 0x930, 0x94d, 0x91a, 0x3b, 0x905,
+0x92a, 0x94d, 0x930, 0x93f, 0x932, 0x3b, 0x92e, 0x947, 0x3b, 0x91c, 0x941, 0x928, 0x3b, 0x91c, 0x941, 0x932, 0x93e, 0x908, 0x3b, 0x905,
+0x917, 0x938, 0x94d, 0x91f, 0x3b, 0x938, 0x947, 0x92a, 0x94d, 0x91f, 0x947, 0x92e, 0x94d, 0x92c, 0x930, 0x3b, 0x905, 0x915, 0x94d, 0x91f,
+0x94b, 0x92c, 0x930, 0x3b, 0x928, 0x94b, 0x92d, 0x947, 0x92e, 0x94d, 0x92c, 0x930, 0x3b, 0x921, 0x93f, 0x938, 0x947, 0x92e, 0x94d, 0x92c,
+0x930, 0x3b, 0x91c, 0x928, 0x3b, 0x92b, 0x947, 0x947, 0x92c, 0x3b, 0x92e, 0x93e, 0x930, 0x94d, 0x91a, 0x3b, 0x905, 0x92a, 0x94d, 0x930,
+0x3b, 0x92e, 0x947, 0x3b, 0x91c, 0x941, 0x928, 0x3b, 0x91c, 0x941, 0x932, 0x3b, 0x905, 0x917, 0x3b, 0x938, 0x947, 0x92a, 0x3b, 0x905,
+0x915, 0x94d, 0x91f, 0x94b, 0x3b, 0x928, 0x94b, 0x92d, 0x947, 0x3b, 0x921, 0x93f, 0x938, 0x947, 0x3b, 0x91c, 0x928, 0x3b, 0x92b, 0x947,
+0x92c, 0x3b, 0x92e, 0x93e, 0x930, 0x94d, 0x91a, 0x3b, 0x905, 0x92a, 0x94d, 0x930, 0x3b, 0x92e, 0x947, 0x3b, 0x91c, 0x941, 0x928, 0x3b,
+0x91c, 0x941, 0x932, 0x3b, 0x905, 0x917, 0x3b, 0x938, 0x947, 0x92a, 0x3b, 0x905, 0x915, 0x94d, 0x91f, 0x94b, 0x3b, 0x928, 0x94b, 0x92d,
+0x947, 0x3b, 0x921, 0x93f, 0x938, 0x947, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x61,
+0x72, 0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b, 0x61, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x61, 0x69, 0x3b, 0x6a, 0x75, 0x6e,
+0x69, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x3b, 0x61, 0x75, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d,
+0x62, 0x65, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72,
+0x3b, 0x64, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0xb1c, 0xb3e, 0xb28, 0xb41, 0xb06, 0xb30, 0xb40, 0x3b, 0xb2b, 0xb47,
+0xb2c, 0xb43, 0xb06, 0xb30, 0xb40, 0x3b, 0xb2e, 0xb3e, 0xb30, 0xb4d, 0xb1a, 0xb4d, 0xb1a, 0x3b, 0xb05, 0xb2a, 0xb4d, 0xb30, 0xb47, 0xb32,
+0x3b, 0xb2e, 0xb07, 0x3b, 0xb1c, 0xb41, 0xb28, 0x3b, 0xb1c, 0xb41, 0xb32, 0xb3e, 0xb07, 0x3b, 0xb05, 0xb17, 0xb37, 0xb4d, 0xb1f, 0x3b,
+0xb38, 0xb47, 0xb2a, 0xb4d, 0xb1f, 0xb47, 0xb2e, 0xb4d, 0xb2c, 0xb30, 0x3b, 0xb05, 0xb15, 0xb4d, 0xb1f, 0xb4b, 0xb2c, 0xb30, 0x3b, 0xb28,
+0xb2d, 0xb47, 0xb2e, 0xb4d, 0xb2c, 0xb30, 0x3b, 0xb21, 0xb3f, 0xb38, 0xb47, 0xb2e, 0xb4d, 0xb2c, 0xb30, 0x3b, 0xb1c, 0xb3e, 0x3b, 0xb2b,
+0xb47, 0x3b, 0xb2e, 0xb3e, 0x3b, 0xb05, 0x3b, 0xb2e, 0xb07, 0x3b, 0xb1c, 0xb41, 0x3b, 0xb1c, 0xb41, 0x3b, 0xb05, 0x3b, 0xb38, 0xb47,
+0x3b, 0xb05, 0x3b, 0xb28, 0x3b, 0xb21, 0xb3f, 0x3b, 0x62c, 0x646, 0x648, 0x631, 0x64a, 0x3b, 0x641, 0x628, 0x631, 0x648, 0x631, 0x64a,
+0x3b, 0x645, 0x627, 0x631, 0x686, 0x3b, 0x627, 0x67e, 0x631, 0x6cc, 0x644, 0x3b, 0x645, 0x6cd, 0x3b, 0x62c, 0x648, 0x646, 0x3b, 0x62c,
+0x648, 0x644, 0x627, 0x6cc, 0x3b, 0x627, 0x6af, 0x633, 0x62a, 0x3b, 0x633, 0x67e, 0x62a, 0x645, 0x628, 0x631, 0x3b, 0x627, 0x6a9, 0x62a,
+0x648, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x645, 0x628, 0x631, 0x3b, 0x62f, 0x633, 0x645, 0x628, 0x631, 0x3b, 0x62c, 0x646, 0x648, 0x631,
+0x64a, 0x3b, 0x641, 0x6d0, 0x628, 0x631, 0x648, 0x631, 0x64a, 0x3b, 0x645, 0x627, 0x631, 0x686, 0x3b, 0x627, 0x67e, 0x631, 0x6cc, 0x644,
+0x3b, 0x645, 0x6cd, 0x3b, 0x62c, 0x648, 0x646, 0x3b, 0x62c, 0x648, 0x644, 0x627, 0x6cc, 0x3b, 0x627, 0x6af, 0x633, 0x62a, 0x3b, 0x633,
+0x67e, 0x62a, 0x645, 0x628, 0x631, 0x3b, 0x627, 0x6a9, 0x62a, 0x648, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x645, 0x628, 0x631, 0x3b, 0x62f,
+0x633, 0x645, 0x628, 0x631, 0x3b, 0x62c, 0x646, 0x648, 0x631, 0x64a, 0x3b, 0x641, 0x628, 0x631, 0x648, 0x631, 0x64a, 0x3b, 0x645, 0x627,
+0x631, 0x686, 0x3b, 0x627, 0x67e, 0x631, 0x6cc, 0x644, 0x3b, 0x645, 0x6cd, 0x3b, 0x62c, 0x648, 0x646, 0x3b, 0x62c, 0x648, 0x644, 0x627,
+0x6cc, 0x3b, 0x627, 0x6af, 0x633, 0x62a, 0x3b, 0x633, 0x6d0, 0x67e, 0x62a, 0x645, 0x628, 0x631, 0x3b, 0x627, 0x6a9, 0x62a, 0x648, 0x628,
+0x631, 0x3b, 0x646, 0x648, 0x645, 0x628, 0x631, 0x3b, 0x62f, 0x633, 0x645, 0x628, 0x631, 0x3b, 0x62c, 0x3b, 0x641, 0x3b, 0x645, 0x3b,
+0x627, 0x3b, 0x645, 0x3b, 0x62c, 0x3b, 0x62c, 0x3b, 0x627, 0x3b, 0x633, 0x3b, 0x627, 0x3b, 0x646, 0x3b, 0x62f, 0x3b, 0x698, 0x627,
+0x646, 0x648, 0x6cc, 0x647, 0x3b, 0x641, 0x648, 0x631, 0x6cc, 0x647, 0x3b, 0x645, 0x627, 0x631, 0x633, 0x3b, 0x622, 0x648, 0x631, 0x6cc,
+0x644, 0x3b, 0x645, 0x647, 0x3b, 0x698, 0x648, 0x626, 0x646, 0x3b, 0x698, 0x648, 0x626, 0x6cc, 0x647, 0x3b, 0x627, 0x648, 0x62a, 0x3b,
+0x633, 0x67e, 0x62a, 0x627, 0x645, 0x628, 0x631, 0x3b, 0x627, 0x6a9, 0x62a, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x627, 0x645, 0x628, 0x631,
+0x3b, 0x62f, 0x633, 0x627, 0x645, 0x628, 0x631, 0x3b, 0x698, 0x3b, 0x641, 0x3b, 0x645, 0x3b, 0x622, 0x3b, 0x645, 0x3b, 0x698, 0x3b,
+0x698, 0x3b, 0x627, 0x3b, 0x633, 0x3b, 0x627, 0x3b, 0x646, 0x3b, 0x62f, 0x3b, 0x698, 0x627, 0x646, 0x648, 0x6cc, 0x647, 0x654, 0x3b,
+0x641, 0x648, 0x631, 0x6cc, 0x647, 0x654, 0x3b, 0x645, 0x627, 0x631, 0x633, 0x3b, 0x622, 0x648, 0x631, 0x6cc, 0x644, 0x3b, 0x645, 0x647,
+0x654, 0x3b, 0x698, 0x648, 0x626, 0x646, 0x3b, 0x698, 0x648, 0x626, 0x6cc, 0x647, 0x654, 0x3b, 0x627, 0x648, 0x62a, 0x3b, 0x633, 0x67e,
+0x62a, 0x627, 0x645, 0x628, 0x631, 0x3b, 0x627, 0x6a9, 0x62a, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x627, 0x645, 0x628, 0x631, 0x3b, 0x62f,
+0x633, 0x627, 0x645, 0x628, 0x631, 0x3b, 0x62c, 0x646, 0x648, 0x631, 0x6cc, 0x3b, 0x641, 0x628, 0x631, 0x648, 0x631, 0x6cc, 0x3b, 0x645,
+0x627, 0x631, 0x686, 0x3b, 0x627, 0x67e, 0x631, 0x6cc, 0x644, 0x3b, 0x645, 0x6cc, 0x3b, 0x62c, 0x648, 0x646, 0x3b, 0x62c, 0x648, 0x644,
+0x627, 0x6cc, 0x3b, 0x627, 0x6af, 0x633, 0x62a, 0x3b, 0x633, 0x67e, 0x62a, 0x645, 0x628, 0x631, 0x3b, 0x627, 0x6a9, 0x62a, 0x648, 0x628,
+0x631, 0x3b, 0x646, 0x648, 0x645, 0x628, 0x631, 0x3b, 0x62f, 0x633, 0x645, 0x628, 0x631, 0x3b, 0x62c, 0x646, 0x648, 0x3b, 0x641, 0x628,
+0x631, 0x648, 0x631, 0x6cc, 0x3b, 0x645, 0x627, 0x631, 0x686, 0x3b, 0x627, 0x67e, 0x631, 0x6cc, 0x644, 0x3b, 0x645, 0x6cc, 0x3b, 0x62c,
+0x648, 0x646, 0x3b, 0x62c, 0x648, 0x644, 0x3b, 0x627, 0x6af, 0x633, 0x62a, 0x3b, 0x633, 0x67e, 0x62a, 0x645, 0x628, 0x631, 0x3b, 0x627,
+0x6a9, 0x62a, 0x648, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x645, 0x628, 0x631, 0x3b, 0x62f, 0x633, 0x645, 0x3b, 0x73, 0x74, 0x79, 0x3b,
+0x6c, 0x75, 0x74, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x6b, 0x77, 0x69, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x63, 0x7a, 0x65, 0x3b,
+0x6c, 0x69, 0x70, 0x3b, 0x73, 0x69, 0x65, 0x3b, 0x77, 0x72, 0x7a, 0x3b, 0x70, 0x61, 0x17a, 0x3b, 0x6c, 0x69, 0x73, 0x3b,
+0x67, 0x72, 0x75, 0x3b, 0x73, 0x74, 0x79, 0x63, 0x7a, 0x65, 0x144, 0x3b, 0x6c, 0x75, 0x74, 0x79, 0x3b, 0x6d, 0x61, 0x72,
+0x7a, 0x65, 0x63, 0x3b, 0x6b, 0x77, 0x69, 0x65, 0x63, 0x69, 0x65, 0x144, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x63, 0x7a, 0x65,
+0x72, 0x77, 0x69, 0x65, 0x63, 0x3b, 0x6c, 0x69, 0x70, 0x69, 0x65, 0x63, 0x3b, 0x73, 0x69, 0x65, 0x72, 0x70, 0x69, 0x65,
+0x144, 0x3b, 0x77, 0x72, 0x7a, 0x65, 0x73, 0x69, 0x65, 0x144, 0x3b, 0x70, 0x61, 0x17a, 0x64, 0x7a, 0x69, 0x65, 0x72, 0x6e,
+0x69, 0x6b, 0x3b, 0x6c, 0x69, 0x73, 0x74, 0x6f, 0x70, 0x61, 0x64, 0x3b, 0x67, 0x72, 0x75, 0x64, 0x7a, 0x69, 0x65, 0x144,
+0x3b, 0x53, 0x3b, 0x4c, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x4d, 0x3b, 0x43, 0x3b, 0x4c, 0x3b, 0x53, 0x3b, 0x57, 0x3b, 0x50,
+0x3b, 0x4c, 0x3b, 0x47, 0x3b, 0x73, 0x74, 0x79, 0x63, 0x7a, 0x6e, 0x69, 0x61, 0x3b, 0x6c, 0x75, 0x74, 0x65, 0x67, 0x6f,
+0x3b, 0x6d, 0x61, 0x72, 0x63, 0x61, 0x3b, 0x6b, 0x77, 0x69, 0x65, 0x74, 0x6e, 0x69, 0x61, 0x3b, 0x6d, 0x61, 0x6a, 0x61,
+0x3b, 0x63, 0x7a, 0x65, 0x72, 0x77, 0x63, 0x61, 0x3b, 0x6c, 0x69, 0x70, 0x63, 0x61, 0x3b, 0x73, 0x69, 0x65, 0x72, 0x70,
+0x6e, 0x69, 0x61, 0x3b, 0x77, 0x72, 0x7a, 0x65, 0x15b, 0x6e, 0x69, 0x61, 0x3b, 0x70, 0x61, 0x17a, 0x64, 0x7a, 0x69, 0x65,
+0x72, 0x6e, 0x69, 0x6b, 0x61, 0x3b, 0x6c, 0x69, 0x73, 0x74, 0x6f, 0x70, 0x61, 0x64, 0x61, 0x3b, 0x67, 0x72, 0x75, 0x64,
+0x6e, 0x69, 0x61, 0x3b, 0x73, 0x3b, 0x6c, 0x3b, 0x6d, 0x3b, 0x6b, 0x3b, 0x6d, 0x3b, 0x63, 0x3b, 0x6c, 0x3b, 0x73, 0x3b,
+0x77, 0x3b, 0x70, 0x3b, 0x6c, 0x3b, 0x67, 0x3b, 0x6a, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x76, 0x3b, 0x6d, 0x61, 0x72, 0x3b,
+0x61, 0x62, 0x72, 0x3b, 0x6d, 0x61, 0x69, 0x3b, 0x6a, 0x75, 0x6e, 0x3b, 0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x67, 0x6f, 0x3b,
+0x73, 0x65, 0x74, 0x3b, 0x6f, 0x75, 0x74, 0x3b, 0x6e, 0x6f, 0x76, 0x3b, 0x64, 0x65, 0x7a, 0x3b, 0x6a, 0x61, 0x6e, 0x65,
+0x69, 0x72, 0x6f, 0x3b, 0x66, 0x65, 0x76, 0x65, 0x72, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x6d, 0x61, 0x72, 0xe7, 0x6f, 0x3b,
+0x61, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x61, 0x69, 0x6f, 0x3b, 0x6a, 0x75, 0x6e, 0x68, 0x6f, 0x3b, 0x6a, 0x75, 0x6c,
+0x68, 0x6f, 0x3b, 0x61, 0x67, 0x6f, 0x73, 0x74, 0x6f, 0x3b, 0x73, 0x65, 0x74, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x6f,
+0x75, 0x74, 0x75, 0x62, 0x72, 0x6f, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x64, 0x65, 0x7a, 0x65,
+0x6d, 0x62, 0x72, 0x6f, 0x3b, 0xa1c, 0xa28, 0x3b, 0xa2b, 0xa3c, 0xa30, 0x3b, 0xa2e, 0xa3e, 0xa30, 0xa1a, 0x3b, 0xa05, 0xa2a, 0xa4d,
+0xa30, 0xa48, 0x3b, 0xa2e, 0xa08, 0x3b, 0xa1c, 0xa42, 0xa28, 0x3b, 0xa1c, 0xa41, 0xa32, 0xa3e, 0x3b, 0xa05, 0xa17, 0x3b, 0xa38, 0xa24,
+0xa70, 0x3b, 0xa05, 0xa15, 0xa24, 0xa42, 0x3b, 0xa28, 0xa35, 0xa70, 0x3b, 0xa26, 0xa38, 0xa70, 0x3b, 0xa1c, 0xa28, 0xa35, 0xa30, 0xa40,
+0x3b, 0xa2b, 0xa3c, 0xa30, 0xa35, 0xa30, 0xa40, 0x3b, 0xa2e, 0xa3e, 0xa30, 0xa1a, 0x3b, 0xa05, 0xa2a, 0xa4d, 0xa30, 0xa48, 0xa32, 0x3b,
+0xa2e, 0xa08, 0x3b, 0xa1c, 0xa42, 0xa28, 0x3b, 0xa1c, 0xa41, 0xa32, 0xa3e, 0xa08, 0x3b, 0xa05, 0xa17, 0xa38, 0xa24, 0x3b, 0xa38, 0xa24,
+0xa70, 0xa2c, 0xa30, 0x3b, 0xa05, 0xa15, 0xa24, 0xa42, 0xa2c, 0xa30, 0x3b, 0xa28, 0xa35, 0xa70, 0xa2c, 0xa30, 0x3b, 0xa26, 0xa38, 0xa70,
+0xa2c, 0xa30, 0x3b, 0xa1c, 0x3b, 0xa2b, 0xa3c, 0x3b, 0xa2e, 0xa3e, 0x3b, 0xa05, 0x3b, 0xa2e, 0x3b, 0xa1c, 0xa42, 0x3b, 0xa1c, 0xa41,
+0x3b, 0xa05, 0x3b, 0xa38, 0x3b, 0xa05, 0x3b, 0xa28, 0x3b, 0xa26, 0x3b, 0x62c, 0x646, 0x648, 0x631, 0x6cc, 0x3b, 0x641, 0x631, 0x648,
+0x631, 0x6cc, 0x3b, 0x645, 0x627, 0x631, 0x686, 0x3b, 0x627, 0x67e, 0x631, 0x6cc, 0x644, 0x3b, 0x645, 0x626, 0x3b, 0x62c, 0x648, 0x646,
+0x3b, 0x62c, 0x648, 0x644, 0x627, 0x626, 0x6cc, 0x3b, 0x627, 0x6af, 0x633, 0x62a, 0x3b, 0x633, 0x62a, 0x645, 0x628, 0x631, 0x3b, 0x627,
+0x6a9, 0x62a, 0x648, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x645, 0x628, 0x631, 0x3b, 0x62f, 0x633, 0x645, 0x628, 0x631, 0x3b, 0x45, 0x6e,
+0x65, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x62, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x4a, 0x75,
+0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x63, 0x74, 0x3b, 0x4e, 0x6f,
+0x76, 0x3b, 0x44, 0x69, 0x63, 0x3b, 0x45, 0x6e, 0x65, 0x72, 0x6f, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x65, 0x72, 0x6f, 0x3b,
0x4d, 0x61, 0x72, 0x7a, 0x6f, 0x3b, 0x41, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x79, 0x6f, 0x3b, 0x4a, 0x75, 0x6e,
0x69, 0x6f, 0x3b, 0x4a, 0x75, 0x6c, 0x69, 0x6f, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x69,
0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x4f, 0x63, 0x74, 0x75, 0x62, 0x72, 0x65, 0x3b, 0x4e, 0x6f, 0x76, 0x69, 0x65, 0x6d,
-0x62, 0x72, 0x65, 0x3b, 0x44, 0x69, 0x63, 0x69, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x65, 0x6e, 0x65, 0x2e, 0x3b, 0x66,
+0x62, 0x72, 0x65, 0x3b, 0x44, 0x69, 0x63, 0x69, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x73, 0x63, 0x68, 0x61, 0x6e, 0x2e,
+0x3b, 0x66, 0x61, 0x76, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b, 0x61, 0x76, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x74,
+0x67, 0x3b, 0x7a, 0x65, 0x72, 0x63, 0x6c, 0x2e, 0x3b, 0x66, 0x61, 0x6e, 0x2e, 0x3b, 0x61, 0x76, 0x75, 0x73, 0x74, 0x3b,
+0x73, 0x65, 0x74, 0x74, 0x2e, 0x3b, 0x6f, 0x63, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x63, 0x2e,
+0x3b, 0x73, 0x63, 0x68, 0x61, 0x6e, 0x65, 0x72, 0x3b, 0x66, 0x61, 0x76, 0x72, 0x65, 0x72, 0x3b, 0x6d, 0x61, 0x72, 0x73,
+0x3b, 0x61, 0x76, 0x72, 0x69, 0x67, 0x6c, 0x3b, 0x6d, 0x61, 0x74, 0x67, 0x3b, 0x7a, 0x65, 0x72, 0x63, 0x6c, 0x61, 0x64,
+0x75, 0x72, 0x3b, 0x66, 0x61, 0x6e, 0x61, 0x64, 0x75, 0x72, 0x3b, 0x61, 0x76, 0x75, 0x73, 0x74, 0x3b, 0x73, 0x65, 0x74,
+0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6f, 0x63, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d,
+0x62, 0x65, 0x72, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x53, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41,
+0x3b, 0x4d, 0x3b, 0x5a, 0x3b, 0x46, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x69, 0x61, 0x6e,
+0x2e, 0x3b, 0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x2e, 0x3b, 0x61, 0x70, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x69,
+0x3b, 0x69, 0x75, 0x6e, 0x2e, 0x3b, 0x69, 0x75, 0x6c, 0x2e, 0x3b, 0x61, 0x75, 0x67, 0x2e, 0x3b, 0x73, 0x65, 0x70, 0x74,
+0x2e, 0x3b, 0x6f, 0x63, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x63, 0x2e, 0x3b, 0x69, 0x61, 0x6e,
+0x75, 0x61, 0x72, 0x69, 0x65, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x69, 0x65, 0x3b, 0x6d, 0x61, 0x72, 0x74,
+0x69, 0x65, 0x3b, 0x61, 0x70, 0x72, 0x69, 0x6c, 0x69, 0x65, 0x3b, 0x6d, 0x61, 0x69, 0x3b, 0x69, 0x75, 0x6e, 0x69, 0x65,
+0x3b, 0x69, 0x75, 0x6c, 0x69, 0x65, 0x3b, 0x61, 0x75, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d,
+0x62, 0x72, 0x69, 0x65, 0x3b, 0x6f, 0x63, 0x74, 0x6f, 0x6d, 0x62, 0x72, 0x69, 0x65, 0x3b, 0x6e, 0x6f, 0x69, 0x65, 0x6d,
+0x62, 0x72, 0x69, 0x65, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x72, 0x69, 0x65, 0x3b, 0x49, 0x3b, 0x46, 0x3b, 0x4d,
+0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x44f,
+0x43d, 0x432, 0x2e, 0x3b, 0x444, 0x435, 0x432, 0x440, 0x2e, 0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430, 0x43f, 0x440, 0x2e, 0x3b,
+0x43c, 0x430, 0x439, 0x3b, 0x438, 0x44e, 0x43d, 0x44c, 0x3b, 0x438, 0x44e, 0x43b, 0x44c, 0x3b, 0x430, 0x432, 0x433, 0x2e, 0x3b, 0x441,
+0x435, 0x43d, 0x442, 0x2e, 0x3b, 0x43e, 0x43a, 0x442, 0x2e, 0x3b, 0x43d, 0x43e, 0x44f, 0x431, 0x2e, 0x3b, 0x434, 0x435, 0x43a, 0x2e,
+0x3b, 0x44f, 0x43d, 0x432, 0x2e, 0x3b, 0x444, 0x435, 0x432, 0x440, 0x2e, 0x3b, 0x43c, 0x430, 0x440, 0x2e, 0x3b, 0x430, 0x43f, 0x440,
+0x2e, 0x3b, 0x43c, 0x430, 0x44f, 0x3b, 0x438, 0x44e, 0x43d, 0x2e, 0x3b, 0x438, 0x44e, 0x43b, 0x2e, 0x3b, 0x430, 0x432, 0x433, 0x2e,
+0x3b, 0x441, 0x435, 0x43d, 0x442, 0x2e, 0x3b, 0x43e, 0x43a, 0x442, 0x2e, 0x3b, 0x43d, 0x43e, 0x44f, 0x431, 0x2e, 0x3b, 0x434, 0x435,
+0x43a, 0x2e, 0x3b, 0x44f, 0x43d, 0x432, 0x430, 0x440, 0x44f, 0x3b, 0x444, 0x435, 0x432, 0x440, 0x430, 0x43b, 0x44f, 0x3b, 0x43c, 0x430,
+0x440, 0x442, 0x430, 0x3b, 0x430, 0x43f, 0x440, 0x435, 0x43b, 0x44f, 0x3b, 0x43c, 0x430, 0x44f, 0x3b, 0x438, 0x44e, 0x43d, 0x44f, 0x3b,
+0x438, 0x44e, 0x43b, 0x44f, 0x3b, 0x430, 0x432, 0x433, 0x443, 0x441, 0x442, 0x430, 0x3b, 0x441, 0x435, 0x43d, 0x442, 0x44f, 0x431, 0x440,
+0x44f, 0x3b, 0x43e, 0x43a, 0x442, 0x44f, 0x431, 0x440, 0x44f, 0x3b, 0x43d, 0x43e, 0x44f, 0x431, 0x440, 0x44f, 0x3b, 0x434, 0x435, 0x43a,
+0x430, 0x431, 0x440, 0x44f, 0x3b, 0x4e, 0x79, 0x65, 0x3b, 0x46, 0x75, 0x6c, 0x3b, 0x4d, 0x62, 0xe4, 0x3b, 0x4e, 0x67, 0x75,
+0x3b, 0x42, 0xea, 0x6c, 0x3b, 0x46, 0xf6, 0x6e, 0x3b, 0x4c, 0x65, 0x6e, 0x3b, 0x4b, 0xfc, 0x6b, 0x3b, 0x4d, 0x76, 0x75,
+0x3b, 0x4e, 0x67, 0x62, 0x3b, 0x4e, 0x61, 0x62, 0x3b, 0x4b, 0x61, 0x6b, 0x3b, 0x4e, 0x79, 0x65, 0x6e, 0x79, 0x65, 0x3b,
+0x46, 0x75, 0x6c, 0x75, 0x6e, 0x64, 0xef, 0x67, 0x69, 0x3b, 0x4d, 0x62, 0xe4, 0x6e, 0x67, 0xfc, 0x3b, 0x4e, 0x67, 0x75,
+0x62, 0xf9, 0x65, 0x3b, 0x42, 0xea, 0x6c, 0xe4, 0x77, 0xfc, 0x3b, 0x46, 0xf6, 0x6e, 0x64, 0x6f, 0x3b, 0x4c, 0x65, 0x6e,
+0x67, 0x75, 0x61, 0x3b, 0x4b, 0xfc, 0x6b, 0xfc, 0x72, 0xfc, 0x3b, 0x4d, 0x76, 0x75, 0x6b, 0x61, 0x3b, 0x4e, 0x67, 0x62,
+0x65, 0x72, 0x65, 0x72, 0x65, 0x3b, 0x4e, 0x61, 0x62, 0xe4, 0x6e, 0x64, 0xfc, 0x72, 0x75, 0x3b, 0x4b, 0x61, 0x6b, 0x61,
+0x75, 0x6b, 0x61, 0x3b, 0x4e, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x42, 0x3b, 0x46, 0x3b, 0x4c, 0x3b, 0x4b, 0x3b,
+0x4d, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4b, 0x3b, 0x458, 0x430, 0x43d, 0x3b, 0x444, 0x435, 0x431, 0x3b, 0x43c, 0x430, 0x440, 0x3b,
+0x430, 0x43f, 0x440, 0x3b, 0x43c, 0x430, 0x458, 0x3b, 0x458, 0x443, 0x43d, 0x3b, 0x458, 0x443, 0x43b, 0x3b, 0x430, 0x432, 0x433, 0x3b,
+0x441, 0x435, 0x43f, 0x3b, 0x43e, 0x43a, 0x442, 0x3b, 0x43d, 0x43e, 0x432, 0x3b, 0x434, 0x435, 0x446, 0x3b, 0x458, 0x430, 0x43d, 0x443,
+0x430, 0x440, 0x3b, 0x444, 0x435, 0x431, 0x440, 0x443, 0x430, 0x440, 0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430, 0x43f, 0x440, 0x438,
+0x43b, 0x3b, 0x43c, 0x430, 0x458, 0x3b, 0x458, 0x443, 0x43d, 0x3b, 0x458, 0x443, 0x43b, 0x3b, 0x430, 0x432, 0x433, 0x443, 0x441, 0x442,
+0x3b, 0x441, 0x435, 0x43f, 0x442, 0x435, 0x43c, 0x431, 0x430, 0x440, 0x3b, 0x43e, 0x43a, 0x442, 0x43e, 0x431, 0x430, 0x440, 0x3b, 0x43d,
+0x43e, 0x432, 0x435, 0x43c, 0x431, 0x430, 0x440, 0x3b, 0x434, 0x435, 0x446, 0x435, 0x43c, 0x431, 0x430, 0x440, 0x3b, 0x458, 0x430, 0x43d,
+0x2e, 0x3b, 0x444, 0x435, 0x431, 0x2e, 0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430, 0x43f, 0x440, 0x2e, 0x3b, 0x43c, 0x430, 0x458,
+0x3b, 0x458, 0x443, 0x43d, 0x3b, 0x458, 0x443, 0x43b, 0x3b, 0x430, 0x432, 0x433, 0x2e, 0x3b, 0x441, 0x435, 0x43f, 0x442, 0x2e, 0x3b,
+0x43e, 0x43a, 0x442, 0x2e, 0x3b, 0x43d, 0x43e, 0x432, 0x2e, 0x3b, 0x434, 0x435, 0x446, 0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0x2e, 0x3b,
+0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x3b, 0x61, 0x70, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a,
+0x75, 0x6e, 0x3b, 0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x76, 0x67, 0x2e, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x2e, 0x3b, 0x6f, 0x6b,
+0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x63, 0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b,
+0x66, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x3b, 0x61, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x6d,
+0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x3b, 0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x76, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x73, 0x65,
+0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x72, 0x3b, 0x6e, 0x6f, 0x76, 0x65,
+0x6d, 0x62, 0x61, 0x72, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x6a, 0x3b, 0x66, 0x3b, 0x6d, 0x3b,
+0x61, 0x3b, 0x6d, 0x3b, 0x6a, 0x3b, 0x6a, 0x3b, 0x61, 0x3b, 0x73, 0x3b, 0x6f, 0x3b, 0x6e, 0x3b, 0x64, 0x3b, 0x6a, 0x61,
+0x6e, 0x3b, 0x66, 0x65, 0x62, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x61, 0x70, 0x72, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75,
+0x6e, 0x3b, 0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x76, 0x67, 0x3b, 0x73, 0x65, 0x70, 0x3b, 0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f,
+0x76, 0x3b, 0x64, 0x65, 0x63, 0x3b, 0x42f, 0x43d, 0x432, 0x2e, 0x3b, 0x424, 0x435, 0x432, 0x440, 0x2e, 0x3b, 0x41c, 0x430, 0x440,
+0x442, 0x2e, 0x3b, 0x410, 0x43f, 0x440, 0x2e, 0x3b, 0x41c, 0x430, 0x439, 0x3b, 0x418, 0x44e, 0x43d, 0x44c, 0x3b, 0x418, 0x44e, 0x43b,
+0x44c, 0x3b, 0x410, 0x432, 0x433, 0x2e, 0x3b, 0x421, 0x435, 0x43d, 0x442, 0x2e, 0x3b, 0x41e, 0x43a, 0x442, 0x2e, 0x3b, 0x41d, 0x43e,
+0x44f, 0x431, 0x2e, 0x3b, 0x414, 0x435, 0x43a, 0x2e, 0x3b, 0x42f, 0x43d, 0x432, 0x430, 0x440, 0x44c, 0x3b, 0x424, 0x435, 0x432, 0x440,
+0x430, 0x43b, 0x44c, 0x3b, 0x41c, 0x430, 0x440, 0x442, 0x44a, 0x438, 0x3b, 0x410, 0x43f, 0x440, 0x435, 0x43b, 0x44c, 0x3b, 0x41c, 0x430,
+0x439, 0x3b, 0x418, 0x44e, 0x43d, 0x44c, 0x3b, 0x418, 0x44e, 0x43b, 0x44c, 0x3b, 0x410, 0x432, 0x433, 0x443, 0x441, 0x442, 0x3b, 0x421,
+0x435, 0x43d, 0x442, 0x44f, 0x431, 0x440, 0x44c, 0x3b, 0x41e, 0x43a, 0x442, 0x44f, 0x431, 0x440, 0x44c, 0x3b, 0x41d, 0x43e, 0x44f, 0x431,
+0x440, 0x44c, 0x3b, 0x414, 0x435, 0x43a, 0x430, 0x431, 0x440, 0x44c, 0x3b, 0x44f, 0x43d, 0x432, 0x2e, 0x3b, 0x444, 0x435, 0x432, 0x2e,
+0x3b, 0x43c, 0x430, 0x440, 0x2e, 0x3b, 0x430, 0x43f, 0x440, 0x2e, 0x3b, 0x43c, 0x430, 0x439, 0x44b, 0x3b, 0x438, 0x44e, 0x43d, 0x44b,
+0x3b, 0x438, 0x44e, 0x43b, 0x44b, 0x3b, 0x430, 0x432, 0x433, 0x2e, 0x3b, 0x441, 0x435, 0x43d, 0x2e, 0x3b, 0x43e, 0x43a, 0x442, 0x2e,
+0x3b, 0x43d, 0x43e, 0x44f, 0x2e, 0x3b, 0x434, 0x435, 0x43a, 0x2e, 0x3b, 0x44f, 0x43d, 0x432, 0x430, 0x440, 0x44b, 0x3b, 0x444, 0x435,
+0x432, 0x440, 0x430, 0x43b, 0x44b, 0x3b, 0x43c, 0x430, 0x440, 0x442, 0x44a, 0x438, 0x439, 0x44b, 0x3b, 0x430, 0x43f, 0x440, 0x435, 0x43b,
+0x44b, 0x3b, 0x43c, 0x430, 0x439, 0x44b, 0x3b, 0x438, 0x44e, 0x43d, 0x44b, 0x3b, 0x438, 0x44e, 0x43b, 0x44b, 0x3b, 0x430, 0x432, 0x433,
+0x443, 0x441, 0x442, 0x44b, 0x3b, 0x441, 0x435, 0x43d, 0x442, 0x44f, 0x431, 0x440, 0x44b, 0x3b, 0x43e, 0x43a, 0x442, 0x44f, 0x431, 0x440,
+0x44b, 0x3b, 0x43d, 0x43e, 0x44f, 0x431, 0x440, 0x44b, 0x3b, 0x434, 0x435, 0x43a, 0x430, 0x431, 0x440, 0x44b, 0x3b, 0x4e, 0x64, 0x69,
+0x3b, 0x4b, 0x75, 0x6b, 0x3b, 0x4b, 0x75, 0x72, 0x3b, 0x4b, 0x75, 0x62, 0x3b, 0x43, 0x68, 0x76, 0x3b, 0x43, 0x68, 0x6b,
+0x3b, 0x43, 0x68, 0x67, 0x3b, 0x4e, 0x79, 0x61, 0x3b, 0x47, 0x75, 0x6e, 0x3b, 0x47, 0x75, 0x6d, 0x3b, 0x4d, 0x62, 0x75,
+0x3b, 0x5a, 0x76, 0x69, 0x3b, 0x4e, 0x64, 0x69, 0x72, 0x61, 0x3b, 0x4b, 0x75, 0x6b, 0x61, 0x64, 0x7a, 0x69, 0x3b, 0x4b,
+0x75, 0x72, 0x75, 0x6d, 0x65, 0x3b, 0x4b, 0x75, 0x62, 0x76, 0x75, 0x6d, 0x62, 0x69, 0x3b, 0x43, 0x68, 0x69, 0x76, 0x61,
+0x62, 0x76, 0x75, 0x3b, 0x43, 0x68, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x43, 0x68, 0x69, 0x6b, 0x75, 0x6e, 0x67, 0x75,
+0x72, 0x75, 0x3b, 0x4e, 0x79, 0x61, 0x6d, 0x61, 0x76, 0x68, 0x75, 0x76, 0x68, 0x75, 0x3b, 0x47, 0x75, 0x6e, 0x79, 0x61,
+0x6e, 0x61, 0x3b, 0x47, 0x75, 0x6d, 0x69, 0x67, 0x75, 0x72, 0x75, 0x3b, 0x4d, 0x62, 0x75, 0x64, 0x7a, 0x69, 0x3b, 0x5a,
+0x76, 0x69, 0x74, 0x61, 0x3b, 0x4e, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x43, 0x3b, 0x43, 0x3b, 0x43, 0x3b, 0x4e,
+0x3b, 0x47, 0x3b, 0x47, 0x3b, 0x4d, 0x3b, 0x5a, 0x3b, 0x62c, 0x646, 0x648, 0x631, 0x64a, 0x3b, 0x641, 0x64a, 0x628, 0x631, 0x648,
+0x631, 0x64a, 0x3b, 0x645, 0x627, 0x631, 0x686, 0x3b, 0x627, 0x67e, 0x631, 0x64a, 0x644, 0x3b, 0x645, 0x626, 0x64a, 0x3b, 0x62c, 0x648,
+0x646, 0x3b, 0x62c, 0x648, 0x644, 0x627, 0x621, 0x650, 0x3b, 0x622, 0x6af, 0x633, 0x67d, 0x3b, 0x633, 0x64a, 0x67e, 0x67d, 0x645, 0x628,
+0x631, 0x3b, 0x622, 0x6aa, 0x67d, 0x648, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x645, 0x628, 0x631, 0x3b, 0x68a, 0x633, 0x645, 0x628, 0x631,
+0x3b, 0xda2, 0xdb1, 0x3b, 0xdb4, 0xdd9, 0xdb6, 0x3b, 0xdb8, 0xdcf, 0xdbb, 0xdca, 0x3b, 0xd85, 0xdb4, 0xdca, 0x200d, 0xdbb, 0xdda, 0xdbd,
+0xdca, 0x3b, 0xdb8, 0xdd0, 0xdba, 0xdd2, 0x3b, 0xda2, 0xdd6, 0xdb1, 0xdd2, 0x3b, 0xda2, 0xdd6, 0xdbd, 0xdd2, 0x3b, 0xd85, 0xd9c, 0xddd,
+0x3b, 0xdc3, 0xdd0, 0xdb4, 0xdca, 0x3b, 0xd94, 0xd9a, 0xdca, 0x3b, 0xdb1, 0xddc, 0xdc0, 0xdd0, 0x3b, 0xdaf, 0xdd9, 0xdc3, 0xdd0, 0x3b,
+0xda2, 0xdb1, 0xdc0, 0xdcf, 0xdbb, 0xdd2, 0x3b, 0xdb4, 0xdd9, 0xdb6, 0xdbb, 0xdc0, 0xdcf, 0xdbb, 0xdd2, 0x3b, 0xdb8, 0xdcf, 0xdbb, 0xdca,
+0xdad, 0xdd4, 0x3b, 0xd85, 0xdb4, 0xdca, 0x200d, 0xdbb, 0xdda, 0xdbd, 0xdca, 0x3b, 0xdb8, 0xdd0, 0xdba, 0xdd2, 0x3b, 0xda2, 0xdd6, 0xdb1,
+0xdd2, 0x3b, 0xda2, 0xdd6, 0xdbd, 0xdd2, 0x3b, 0xd85, 0xd9c, 0xddd, 0xdc3, 0xdca, 0xdad, 0xdd4, 0x3b, 0xdc3, 0xdd0, 0xdb4, 0xdca, 0xdad,
+0xdd0, 0xdb8, 0xdca, 0xdb6, 0xdbb, 0xdca, 0x3b, 0xd94, 0xd9a, 0xdca, 0xdad, 0xddd, 0xdb6, 0xdbb, 0xdca, 0x3b, 0xdb1, 0xddc, 0xdc0, 0xdd0,
+0xdb8, 0xdca, 0xdb6, 0xdbb, 0xdca, 0x3b, 0xdaf, 0xdd9, 0xdc3, 0xdd0, 0xdb8, 0xdca, 0xdb6, 0xdbb, 0xdca, 0x3b, 0xda2, 0x3b, 0xdb4, 0xdd9,
+0x3b, 0xdb8, 0xdcf, 0x3b, 0xd85, 0x3b, 0xdb8, 0xdd0, 0x3b, 0xda2, 0xdd6, 0x3b, 0xda2, 0xdd6, 0x3b, 0xd85, 0x3b, 0xdc3, 0xdd0, 0x3b,
+0xd94, 0x3b, 0xdb1, 0xdd9, 0x3b, 0xdaf, 0xdd9, 0x3b, 0xda2, 0xdb1, 0x3b, 0xdb4, 0xdd9, 0xdb6, 0x3b, 0xdb8, 0xdcf, 0xdbb, 0xdca, 0xdad,
+0xdd4, 0x3b, 0xd85, 0xdb4, 0xdca, 0x200d, 0xdbb, 0xdda, 0xdbd, 0xdca, 0x3b, 0xdb8, 0xdd0, 0xdba, 0xdd2, 0x3b, 0xda2, 0xdd6, 0xdb1, 0xdd2,
+0x3b, 0xda2, 0xdd6, 0xdbd, 0xdd2, 0x3b, 0xd85, 0xd9c, 0xddd, 0x3b, 0xdc3, 0xdd0, 0xdb4, 0xdca, 0x3b, 0xd94, 0xd9a, 0xdca, 0x3b, 0xdb1,
+0xddc, 0xdc0, 0xdd0, 0x3b, 0xdaf, 0xdd9, 0xdc3, 0xdd0, 0x3b, 0x6a, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x62, 0x3b, 0x6d, 0x61, 0x72,
+0x3b, 0x61, 0x70, 0x72, 0x3b, 0x6d, 0xe1, 0x6a, 0x3b, 0x6a, 0xfa, 0x6e, 0x3b, 0x6a, 0xfa, 0x6c, 0x3b, 0x61, 0x75, 0x67,
+0x3b, 0x73, 0x65, 0x70, 0x3b, 0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x76, 0x3b, 0x64, 0x65, 0x63, 0x3b, 0x6a, 0x61, 0x6e,
+0x75, 0xe1, 0x72, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0xe1, 0x72, 0x3b, 0x6d, 0x61, 0x72, 0x65, 0x63, 0x3b, 0x61, 0x70,
+0x72, 0xed, 0x6c, 0x3b, 0x6d, 0xe1, 0x6a, 0x3b, 0x6a, 0xfa, 0x6e, 0x3b, 0x6a, 0xfa, 0x6c, 0x3b, 0x61, 0x75, 0x67, 0x75,
+0x73, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0xf3, 0x62, 0x65, 0x72,
+0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6a,
+0x61, 0x6e, 0x75, 0xe1, 0x72, 0x61, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0xe1, 0x72, 0x61, 0x3b, 0x6d, 0x61, 0x72, 0x63,
+0x61, 0x3b, 0x61, 0x70, 0x72, 0xed, 0x6c, 0x61, 0x3b, 0x6d, 0xe1, 0x6a, 0x61, 0x3b, 0x6a, 0xfa, 0x6e, 0x61, 0x3b, 0x6a,
+0xfa, 0x6c, 0x61, 0x3b, 0x61, 0x75, 0x67, 0x75, 0x73, 0x74, 0x61, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x72,
+0x61, 0x3b, 0x6f, 0x6b, 0x74, 0xf3, 0x62, 0x72, 0x61, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x72, 0x61, 0x3b, 0x64,
+0x65, 0x63, 0x65, 0x6d, 0x62, 0x72, 0x61, 0x3b, 0x6a, 0x61, 0x6e, 0x2e, 0x3b, 0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61,
+0x72, 0x2e, 0x3b, 0x61, 0x70, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x2e, 0x3b, 0x6a, 0x75, 0x6c,
+0x2e, 0x3b, 0x61, 0x76, 0x67, 0x2e, 0x3b, 0x73, 0x65, 0x70, 0x2e, 0x3b, 0x6f, 0x6b, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76,
+0x2e, 0x3b, 0x64, 0x65, 0x63, 0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x61,
+0x72, 0x3b, 0x6d, 0x61, 0x72, 0x65, 0x63, 0x3b, 0x61, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75,
+0x6e, 0x69, 0x6a, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x6a, 0x3b, 0x61, 0x76, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x73, 0x65, 0x70,
+0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d,
+0x62, 0x65, 0x72, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4b, 0x6f, 0x62, 0x3b, 0x4c, 0x61, 0x62,
+0x3b, 0x53, 0x61, 0x64, 0x3b, 0x41, 0x66, 0x72, 0x3b, 0x53, 0x68, 0x61, 0x3b, 0x4c, 0x69, 0x78, 0x3b, 0x54, 0x6f, 0x64,
+0x3b, 0x53, 0x69, 0x64, 0x3b, 0x53, 0x61, 0x67, 0x3b, 0x54, 0x6f, 0x62, 0x3b, 0x4b, 0x49, 0x54, 0x3b, 0x4c, 0x49, 0x54,
+0x3b, 0x42, 0x69, 0x73, 0x68, 0x61, 0x20, 0x4b, 0x6f, 0x6f, 0x62, 0x61, 0x61, 0x64, 0x3b, 0x42, 0x69, 0x73, 0x68, 0x61,
+0x20, 0x4c, 0x61, 0x62, 0x61, 0x61, 0x64, 0x3b, 0x42, 0x69, 0x73, 0x68, 0x61, 0x20, 0x53, 0x61, 0x64, 0x64, 0x65, 0x78,
+0x61, 0x61, 0x64, 0x3b, 0x42, 0x69, 0x73, 0x68, 0x61, 0x20, 0x41, 0x66, 0x72, 0x61, 0x61, 0x64, 0x3b, 0x42, 0x69, 0x73,
+0x68, 0x61, 0x20, 0x53, 0x68, 0x61, 0x6e, 0x61, 0x61, 0x64, 0x3b, 0x42, 0x69, 0x73, 0x68, 0x61, 0x20, 0x4c, 0x69, 0x78,
+0x61, 0x61, 0x64, 0x3b, 0x42, 0x69, 0x73, 0x68, 0x61, 0x20, 0x54, 0x6f, 0x64, 0x6f, 0x62, 0x61, 0x61, 0x64, 0x3b, 0x42,
+0x69, 0x73, 0x68, 0x61, 0x20, 0x53, 0x69, 0x64, 0x65, 0x65, 0x64, 0x61, 0x61, 0x64, 0x3b, 0x42, 0x69, 0x73, 0x68, 0x61,
+0x20, 0x53, 0x61, 0x67, 0x61, 0x61, 0x6c, 0x61, 0x61, 0x64, 0x3b, 0x42, 0x69, 0x73, 0x68, 0x61, 0x20, 0x54, 0x6f, 0x62,
+0x6e, 0x61, 0x61, 0x64, 0x3b, 0x42, 0x69, 0x73, 0x68, 0x61, 0x20, 0x4b, 0x6f, 0x77, 0x20, 0x69, 0x79, 0x6f, 0x20, 0x54,
+0x6f, 0x62, 0x6e, 0x61, 0x61, 0x64, 0x3b, 0x42, 0x69, 0x73, 0x68, 0x61, 0x20, 0x4c, 0x61, 0x62, 0x61, 0x20, 0x69, 0x79,
+0x6f, 0x20, 0x54, 0x6f, 0x62, 0x6e, 0x61, 0x61, 0x64, 0x3b, 0x4b, 0x3b, 0x4c, 0x3b, 0x53, 0x3b, 0x41, 0x3b, 0x53, 0x3b,
+0x4c, 0x3b, 0x54, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x54, 0x3b, 0x4b, 0x3b, 0x4c, 0x3b, 0x65, 0x6e, 0x65, 0x2e, 0x3b, 0x66,
0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x2e, 0x3b, 0x61, 0x62, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x79, 0x2e, 0x3b, 0x6a,
-0x75, 0x6e, 0x2e, 0x3b, 0x6a, 0x75, 0x6c, 0x2e, 0x3b, 0x61, 0x67, 0x6f, 0x2e, 0x3b, 0x73, 0x65, 0x74, 0x2e, 0x3b, 0x6f,
-0x63, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x69, 0x63, 0x2e, 0x3b, 0x65, 0x6e, 0x65, 0x72, 0x6f, 0x3b,
-0x66, 0x65, 0x62, 0x72, 0x65, 0x72, 0x6f, 0x3b, 0x6d, 0x61, 0x72, 0x7a, 0x6f, 0x3b, 0x61, 0x62, 0x72, 0x69, 0x6c, 0x3b,
-0x6d, 0x61, 0x79, 0x6f, 0x3b, 0x6a, 0x75, 0x6e, 0x69, 0x6f, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x6f, 0x3b, 0x61, 0x67, 0x6f,
-0x73, 0x74, 0x6f, 0x3b, 0x73, 0x65, 0x74, 0x69, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x6f, 0x63, 0x74, 0x75, 0x62, 0x72,
-0x65, 0x3b, 0x6e, 0x6f, 0x76, 0x69, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x64, 0x69, 0x63, 0x69, 0x65, 0x6d, 0x62, 0x72,
-0x65, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x63, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65,
-0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b,
-0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x46, 0x65,
-0x62, 0x72, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c, 0x69, 0x3b,
-0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74,
-0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f,
-0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x6a, 0x61, 0x6e, 0x2e, 0x3b, 0x66,
-0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b, 0x61, 0x70, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75,
-0x6e, 0x69, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x3b, 0x61, 0x75, 0x67, 0x2e, 0x3b, 0x73, 0x65, 0x70, 0x2e, 0x3b, 0x6f, 0x6b,
-0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x63, 0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x69,
-0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b, 0x61, 0x70, 0x72, 0x69, 0x6c,
-0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x69, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x3b, 0x61, 0x75, 0x67, 0x75, 0x73,
-0x74, 0x69, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72,
-0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0xb9c,
-0xba9, 0x2e, 0x3b, 0xbaa, 0xbbf, 0xbaa, 0xbcd, 0x2e, 0x3b, 0xbae, 0xbbe, 0xbb0, 0xbcd, 0x2e, 0x3b, 0xb8f, 0xbaa, 0xbcd, 0x2e, 0x3b,
-0xbae, 0xbc7, 0x3b, 0xb9c, 0xbc2, 0xba9, 0xbcd, 0x3b, 0xb9c, 0xbc2, 0xbb2, 0xbc8, 0x3b, 0xb86, 0xb95, 0x2e, 0x3b, 0xb9a, 0xbc6, 0xbaa,
-0xbcd, 0x2e, 0x3b, 0xb85, 0xb95, 0xbcd, 0x2e, 0x3b, 0xba8, 0xbb5, 0x2e, 0x3b, 0xb9f, 0xbbf, 0xb9a, 0x2e, 0x3b, 0xb9c, 0xba9, 0xbb5,
-0xbb0, 0xbbf, 0x3b, 0xbaa, 0xbbf, 0xbaa, 0xbcd, 0xbb0, 0xbb5, 0xbb0, 0xbbf, 0x3b, 0xbae, 0xbbe, 0xbb0, 0xbcd, 0xb9a, 0xbcd, 0x3b, 0xb8f,
-0xbaa, 0xbcd, 0xbb0, 0xbb2, 0xbcd, 0x3b, 0xbae, 0xbc7, 0x3b, 0xb9c, 0xbc2, 0xba9, 0xbcd, 0x3b, 0xb9c, 0xbc2, 0xbb2, 0xbc8, 0x3b, 0xb86,
-0xb95, 0xbb8, 0xbcd, 0xb9f, 0xbcd, 0x3b, 0xb9a, 0xbc6, 0xbaa, 0xbcd, 0xb9f, 0xbae, 0xbcd, 0xbaa, 0xbb0, 0xbcd, 0x3b, 0xb85, 0xb95, 0xbcd,
-0xb9f, 0xbcb, 0xbaa, 0xbb0, 0xbcd, 0x3b, 0xba8, 0xbb5, 0xbae, 0xbcd, 0xbaa, 0xbb0, 0xbcd, 0x3b, 0xb9f, 0xbbf, 0xb9a, 0xbae, 0xbcd, 0xbaa,
-0xbb0, 0xbcd, 0x3b, 0xb9c, 0x3b, 0xbaa, 0xbbf, 0x3b, 0xbae, 0xbbe, 0x3b, 0xb8f, 0x3b, 0xbae, 0xbc7, 0x3b, 0xb9c, 0xbc2, 0x3b, 0xb9c,
-0xbc2, 0x3b, 0xb86, 0x3b, 0xb9a, 0xbc6, 0x3b, 0xb85, 0x3b, 0xba8, 0x3b, 0xb9f, 0xbbf, 0x3b, 0xc1c, 0xc28, 0x3b, 0xc2b, 0xc3f, 0xc2c,
-0xc4d, 0xc30, 0x3b, 0xc2e, 0xc3e, 0xc30, 0xc4d, 0xc1a, 0xc3f, 0x3b, 0xc0f, 0xc2a, 0xc4d, 0xc30, 0xc3f, 0x3b, 0xc2e, 0xc47, 0x3b, 0xc1c,
-0xc42, 0xc28, 0xc4d, 0x3b, 0xc1c, 0xc41, 0xc32, 0xc48, 0x3b, 0xc06, 0xc17, 0xc38, 0xc4d, 0xc1f, 0xc41, 0x3b, 0xc38, 0xc46, 0xc2a, 0xc4d,
-0xc1f, 0xc46, 0xc02, 0x3b, 0xc05, 0xc15, 0xc4d, 0xc1f, 0xc4b, 0x3b, 0xc28, 0xc35, 0xc02, 0x3b, 0xc21, 0xc3f, 0xc38, 0xc46, 0xc02, 0x3b,
-0xc1c, 0xc28, 0xc35, 0xc30, 0xc3f, 0x3b, 0xc2b, 0xc3f, 0xc2c, 0xc4d, 0xc30, 0xc35, 0xc30, 0xc3f, 0x3b, 0xc2e, 0xc3e, 0xc30, 0xc4d, 0xc1a,
-0xc3f, 0x3b, 0xc0f, 0xc2a, 0xc4d, 0xc30, 0xc3f, 0xc32, 0xc4d, 0x3b, 0xc2e, 0xc47, 0x3b, 0xc1c, 0xc42, 0xc28, 0xc4d, 0x3b, 0xc1c, 0xc41,
-0xc32, 0xc48, 0x3b, 0xc06, 0xc17, 0xc38, 0xc4d, 0xc1f, 0xc41, 0x3b, 0xc38, 0xc46, 0xc2a, 0xc4d, 0xc1f, 0xc46, 0xc02, 0xc2c, 0xc30, 0xc4d,
-0x3b, 0xc05, 0xc15, 0xc4d, 0xc1f, 0xc4b, 0xc2c, 0xc30, 0xc4d, 0x3b, 0xc28, 0xc35, 0xc02, 0xc2c, 0xc30, 0xc4d, 0x3b, 0xc21, 0xc3f, 0xc38,
-0xc46, 0xc02, 0xc2c, 0xc30, 0xc4d, 0x3b, 0xc1c, 0x3b, 0xc2b, 0xc3f, 0x3b, 0xc2e, 0xc3e, 0x3b, 0xc0f, 0x3b, 0xc2e, 0xc47, 0x3b, 0xc1c,
-0xc42, 0x3b, 0xc1c, 0xc41, 0x3b, 0xc06, 0x3b, 0xc38, 0xc46, 0x3b, 0xc05, 0x3b, 0xc28, 0x3b, 0xc21, 0xc3f, 0x3b, 0xc1c, 0xc28, 0x3b,
-0xc2b, 0xc3f, 0xc2c, 0xc4d, 0xc30, 0x3b, 0xc2e, 0xc3e, 0xc30, 0xc4d, 0xc1a, 0xc3f, 0x3b, 0xc0f, 0xc2a, 0xc4d, 0xc30, 0xc3f, 0x3b, 0xc2e,
-0xc47, 0x3b, 0xc1c, 0xc42, 0xc28, 0xc4d, 0x3b, 0xc1c, 0xc41, 0xc32, 0xc48, 0x3b, 0xc06, 0xc17, 0x3b, 0xc38, 0xc46, 0xc2a, 0xc4d, 0xc1f,
-0xc46, 0xc02, 0x3b, 0xc05, 0xc15, 0xc4d, 0xc1f, 0xc4b, 0x3b, 0xc28, 0xc35, 0xc02, 0x3b, 0xc21, 0xc3f, 0xc38, 0xc46, 0xc02, 0x3b, 0xe21,
-0x2e, 0xe04, 0x2e, 0x3b, 0xe01, 0x2e, 0xe1e, 0x2e, 0x3b, 0xe21, 0xe35, 0x2e, 0xe04, 0x2e, 0x3b, 0xe40, 0xe21, 0x2e, 0xe22, 0x2e,
-0x3b, 0xe1e, 0x2e, 0xe04, 0x2e, 0x3b, 0xe21, 0xe34, 0x2e, 0xe22, 0x2e, 0x3b, 0xe01, 0x2e, 0xe04, 0x2e, 0x3b, 0xe2a, 0x2e, 0xe04,
-0x2e, 0x3b, 0xe01, 0x2e, 0xe22, 0x2e, 0x3b, 0xe15, 0x2e, 0xe04, 0x2e, 0x3b, 0xe1e, 0x2e, 0xe22, 0x2e, 0x3b, 0xe18, 0x2e, 0xe04,
-0x2e, 0x3b, 0xe21, 0xe01, 0xe23, 0xe32, 0xe04, 0xe21, 0x3b, 0xe01, 0xe38, 0xe21, 0xe20, 0xe32, 0xe1e, 0xe31, 0xe19, 0xe18, 0xe4c, 0x3b,
-0xe21, 0xe35, 0xe19, 0xe32, 0xe04, 0xe21, 0x3b, 0xe40, 0xe21, 0xe29, 0xe32, 0xe22, 0xe19, 0x3b, 0xe1e, 0xe24, 0xe29, 0xe20, 0xe32, 0xe04,
-0xe21, 0x3b, 0xe21, 0xe34, 0xe16, 0xe38, 0xe19, 0xe32, 0xe22, 0xe19, 0x3b, 0xe01, 0xe23, 0xe01, 0xe0e, 0xe32, 0xe04, 0xe21, 0x3b, 0xe2a,
-0xe34, 0xe07, 0xe2b, 0xe32, 0xe04, 0xe21, 0x3b, 0xe01, 0xe31, 0xe19, 0xe22, 0xe32, 0xe22, 0xe19, 0x3b, 0xe15, 0xe38, 0xe25, 0xe32, 0xe04,
-0xe21, 0x3b, 0xe1e, 0xe24, 0xe28, 0xe08, 0xe34, 0xe01, 0xe32, 0xe22, 0xe19, 0x3b, 0xe18, 0xe31, 0xe19, 0xe27, 0xe32, 0xe04, 0xe21, 0x3b,
-0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf51, 0xf44, 0xf0b, 0xf54, 0xf7c, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf42, 0xf49, 0xf72,
-0xf66, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf42, 0xf66, 0xf74, 0xf58, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3,
-0xf0b, 0xf56, 0xf0b, 0xf56, 0xf5e, 0xf72, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf63, 0xf94, 0xf0b, 0xf54, 0xf0b,
-0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf51, 0xfb2, 0xf74, 0xf42, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56,
-0xf51, 0xf74, 0xf53, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf62, 0xf92, 0xfb1, 0xf51, 0xf0b, 0xf54, 0xf0b,
-0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf51, 0xf42, 0xf74, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf45,
-0xf74, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf42, 0xf45, 0xf72, 0xf42, 0xf0b, 0xf54,
-0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf42, 0xf49, 0xf72, 0xf66, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f,
-0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf51, 0xf44, 0xf0b, 0xf54, 0xf7c, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf42, 0xf49, 0xf72, 0xf66, 0xf0b,
-0xf54, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf42, 0xf66, 0xf74, 0xf58, 0xf0b, 0xf54, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56,
-0xf5e, 0xf72, 0xf0b, 0xf54, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf63, 0xf94, 0xf0b, 0xf54, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b,
-0xf51, 0xfb2, 0xf74, 0xf42, 0xf0b, 0xf54, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf51, 0xf74, 0xf53, 0xf0b, 0xf54, 0x3b, 0xf5f,
-0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf62, 0xf92, 0xfb1, 0xf51, 0xf0b, 0xf54, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf51, 0xf42, 0xf74,
-0xf0b, 0xf54, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf54, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56,
-0xf45, 0xf74, 0xf0b, 0xf42, 0xf45, 0xf72, 0xf42, 0xf0b, 0xf54, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf42,
-0xf49, 0xf72, 0xf66, 0xf0b, 0xf54, 0x3b, 0x1325, 0x122a, 0x3b, 0x1208, 0x12ab, 0x3b, 0x1218, 0x130b, 0x3b, 0x121a, 0x12eb, 0x3b, 0x130d, 0x1295,
-0x3b, 0x1230, 0x1290, 0x3b, 0x1213, 0x121d, 0x3b, 0x1290, 0x1213, 0x3b, 0x1218, 0x1235, 0x3b, 0x1325, 0x1245, 0x3b, 0x1215, 0x12f3, 0x3b, 0x1273,
-0x1215, 0x3b, 0x1325, 0x122a, 0x3b, 0x1208, 0x12ab, 0x1272, 0x1275, 0x3b, 0x1218, 0x130b, 0x1262, 0x1275, 0x3b, 0x121a, 0x12eb, 0x12dd, 0x12eb, 0x3b,
-0x130d, 0x1295, 0x1266, 0x1275, 0x3b, 0x1230, 0x1290, 0x3b, 0x1213, 0x121d, 0x1208, 0x3b, 0x1290, 0x1213, 0x1230, 0x3b, 0x1218, 0x1235, 0x12a8, 0x1228,
-0x121d, 0x3b, 0x1325, 0x1245, 0x121d, 0x1272, 0x3b, 0x1215, 0x12f3, 0x122d, 0x3b, 0x1273, 0x1215, 0x1233, 0x1235, 0x3b, 0x1325, 0x3b, 0x1208, 0x3b,
-0x1218, 0x3b, 0x121a, 0x3b, 0x130d, 0x3b, 0x1230, 0x3b, 0x1213, 0x3b, 0x1290, 0x3b, 0x1218, 0x3b, 0x1325, 0x3b, 0x1215, 0x3b, 0x1273, 0x3b,
-0x53, 0x101, 0x6e, 0x3b, 0x46, 0x113, 0x70, 0x3b, 0x4d, 0x61, 0x2bb, 0x61, 0x3b, 0x2bb, 0x45, 0x70, 0x65, 0x3b, 0x4d, 0x113,
-0x3b, 0x53, 0x75, 0x6e, 0x3b, 0x53, 0x69, 0x75, 0x3b, 0x2bb, 0x41, 0x6f, 0x6b, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x2bb, 0x4f,
-0x6b, 0x61, 0x3b, 0x4e, 0x14d, 0x76, 0x3b, 0x54, 0x12b, 0x73, 0x3b, 0x53, 0x101, 0x6e, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x46,
-0x113, 0x70, 0x75, 0x65, 0x6c, 0x69, 0x3b, 0x4d, 0x61, 0x2bb, 0x61, 0x73, 0x69, 0x3b, 0x2bb, 0x45, 0x70, 0x65, 0x6c, 0x65,
-0x6c, 0x69, 0x3b, 0x4d, 0x113, 0x3b, 0x53, 0x75, 0x6e, 0x65, 0x3b, 0x53, 0x69, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x2bb, 0x41,
-0x6f, 0x6b, 0x6f, 0x73, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x69, 0x74, 0x65, 0x6d, 0x61, 0x3b, 0x2bb, 0x4f, 0x6b, 0x61, 0x74,
-0x6f, 0x70, 0x61, 0x3b, 0x4e, 0x14d, 0x76, 0x65, 0x6d, 0x61, 0x3b, 0x54, 0x12b, 0x73, 0x65, 0x6d, 0x61, 0x3b, 0x53, 0x3b,
-0x46, 0x3b, 0x4d, 0x3b, 0x45, 0x3b, 0x4d, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b,
-0x54, 0x3b, 0x4f, 0x63, 0x61, 0x3b, 0x15e, 0x75, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x4e, 0x69, 0x73, 0x3b, 0x4d, 0x61,
-0x79, 0x3b, 0x48, 0x61, 0x7a, 0x3b, 0x54, 0x65, 0x6d, 0x3b, 0x41, 0x11f, 0x75, 0x3b, 0x45, 0x79, 0x6c, 0x3b, 0x45, 0x6b,
-0x69, 0x3b, 0x4b, 0x61, 0x73, 0x3b, 0x41, 0x72, 0x61, 0x3b, 0x4f, 0x63, 0x61, 0x6b, 0x3b, 0x15e, 0x75, 0x62, 0x61, 0x74,
-0x3b, 0x4d, 0x61, 0x72, 0x74, 0x3b, 0x4e, 0x69, 0x73, 0x61, 0x6e, 0x3b, 0x4d, 0x61, 0x79, 0x131, 0x73, 0x3b, 0x48, 0x61,
-0x7a, 0x69, 0x72, 0x61, 0x6e, 0x3b, 0x54, 0x65, 0x6d, 0x6d, 0x75, 0x7a, 0x3b, 0x41, 0x11f, 0x75, 0x73, 0x74, 0x6f, 0x73,
-0x3b, 0x45, 0x79, 0x6c, 0xfc, 0x6c, 0x3b, 0x45, 0x6b, 0x69, 0x6d, 0x3b, 0x4b, 0x61, 0x73, 0x131, 0x6d, 0x3b, 0x41, 0x72,
-0x61, 0x6c, 0x131, 0x6b, 0x3b, 0x4f, 0x3b, 0x15e, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x4d, 0x3b, 0x48, 0x3b, 0x54, 0x3b, 0x41,
-0x3b, 0x45, 0x3b, 0x45, 0x3b, 0x4b, 0x3b, 0x41, 0x3b, 0xfd, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x77, 0x3b, 0x6d, 0x61, 0x72,
-0x74, 0x3b, 0x61, 0x70, 0x72, 0x3b, 0x6d, 0x61, 0xfd, 0x3b, 0x69, 0xfd, 0x75, 0x6e, 0x3b, 0x69, 0xfd, 0x75, 0x6c, 0x3b,
-0x61, 0x77, 0x67, 0x3b, 0x73, 0x65, 0x6e, 0x3b, 0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0xfd, 0x3b, 0x64, 0x65, 0x6b, 0x3b,
-0xfd, 0x61, 0x6e, 0x77, 0x61, 0x72, 0x3b, 0x66, 0x65, 0x77, 0x72, 0x61, 0x6c, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x3b, 0x61,
-0x70, 0x72, 0x65, 0x6c, 0x3b, 0x6d, 0x61, 0xfd, 0x3b, 0x69, 0xfd, 0x75, 0x6e, 0x3b, 0x69, 0xfd, 0x75, 0x6c, 0x3b, 0x61,
-0x77, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x73, 0x65, 0x6e, 0x74, 0xfd, 0x61, 0x62, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0xfd, 0x61,
-0x62, 0x72, 0x3b, 0x6e, 0x6f, 0xfd, 0x61, 0x62, 0x72, 0x3b, 0x64, 0x65, 0x6b, 0x61, 0x62, 0x72, 0x3b, 0xdd, 0x3b, 0x46,
-0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44,
-0x3b, 0x64a, 0x627, 0x646, 0x6cb, 0x627, 0x631, 0x3b, 0x641, 0x6d0, 0x6cb, 0x631, 0x627, 0x644, 0x3b, 0x645, 0x627, 0x631, 0x62a, 0x3b,
-0x626, 0x627, 0x67e, 0x631, 0x6d0, 0x644, 0x3b, 0x645, 0x627, 0x64a, 0x3b, 0x626, 0x649, 0x64a, 0x6c7, 0x646, 0x3b, 0x626, 0x649, 0x64a,
-0x6c7, 0x644, 0x3b, 0x626, 0x627, 0x6cb, 0x63a, 0x6c7, 0x633, 0x62a, 0x3b, 0x633, 0x6d0, 0x646, 0x62a, 0x6d5, 0x628, 0x649, 0x631, 0x3b,
-0x626, 0x6c6, 0x643, 0x62a, 0x6d5, 0x628, 0x649, 0x631, 0x3b, 0x646, 0x648, 0x64a, 0x627, 0x628, 0x649, 0x631, 0x3b, 0x62f, 0x6d0, 0x643,
-0x627, 0x628, 0x649, 0x631, 0x3b, 0x441, 0x456, 0x447, 0x3b, 0x43b, 0x44e, 0x442, 0x3b, 0x431, 0x435, 0x440, 0x3b, 0x43a, 0x432, 0x456,
-0x3b, 0x442, 0x440, 0x430, 0x3b, 0x447, 0x435, 0x440, 0x3b, 0x43b, 0x438, 0x43f, 0x3b, 0x441, 0x435, 0x440, 0x3b, 0x432, 0x435, 0x440,
-0x3b, 0x436, 0x43e, 0x432, 0x3b, 0x43b, 0x438, 0x441, 0x3b, 0x433, 0x440, 0x443, 0x3b, 0x441, 0x456, 0x447, 0x435, 0x43d, 0x44c, 0x3b,
-0x43b, 0x44e, 0x442, 0x438, 0x439, 0x3b, 0x431, 0x435, 0x440, 0x435, 0x437, 0x435, 0x43d, 0x44c, 0x3b, 0x43a, 0x432, 0x456, 0x442, 0x435,
-0x43d, 0x44c, 0x3b, 0x442, 0x440, 0x430, 0x432, 0x435, 0x43d, 0x44c, 0x3b, 0x447, 0x435, 0x440, 0x432, 0x435, 0x43d, 0x44c, 0x3b, 0x43b,
-0x438, 0x43f, 0x435, 0x43d, 0x44c, 0x3b, 0x441, 0x435, 0x440, 0x43f, 0x435, 0x43d, 0x44c, 0x3b, 0x432, 0x435, 0x440, 0x435, 0x441, 0x435,
-0x43d, 0x44c, 0x3b, 0x436, 0x43e, 0x432, 0x442, 0x435, 0x43d, 0x44c, 0x3b, 0x43b, 0x438, 0x441, 0x442, 0x43e, 0x43f, 0x430, 0x434, 0x3b,
-0x433, 0x440, 0x443, 0x434, 0x435, 0x43d, 0x44c, 0x3b, 0x421, 0x3b, 0x41b, 0x3b, 0x411, 0x3b, 0x41a, 0x3b, 0x422, 0x3b, 0x427, 0x3b,
-0x41b, 0x3b, 0x421, 0x3b, 0x412, 0x3b, 0x416, 0x3b, 0x41b, 0x3b, 0x413, 0x3b, 0x441, 0x456, 0x447, 0x2e, 0x3b, 0x43b, 0x44e, 0x442,
-0x2e, 0x3b, 0x431, 0x435, 0x440, 0x2e, 0x3b, 0x43a, 0x432, 0x456, 0x442, 0x2e, 0x3b, 0x442, 0x440, 0x430, 0x432, 0x2e, 0x3b, 0x447,
-0x435, 0x440, 0x432, 0x2e, 0x3b, 0x43b, 0x438, 0x43f, 0x2e, 0x3b, 0x441, 0x435, 0x440, 0x43f, 0x2e, 0x3b, 0x432, 0x435, 0x440, 0x2e,
-0x3b, 0x436, 0x43e, 0x432, 0x442, 0x2e, 0x3b, 0x43b, 0x438, 0x441, 0x442, 0x2e, 0x3b, 0x433, 0x440, 0x443, 0x434, 0x2e, 0x3b, 0x441,
-0x456, 0x447, 0x43d, 0x44f, 0x3b, 0x43b, 0x44e, 0x442, 0x43e, 0x433, 0x43e, 0x3b, 0x431, 0x435, 0x440, 0x435, 0x437, 0x43d, 0x44f, 0x3b,
-0x43a, 0x432, 0x456, 0x442, 0x43d, 0x44f, 0x3b, 0x442, 0x440, 0x430, 0x432, 0x43d, 0x44f, 0x3b, 0x447, 0x435, 0x440, 0x432, 0x43d, 0x44f,
-0x3b, 0x43b, 0x438, 0x43f, 0x43d, 0x44f, 0x3b, 0x441, 0x435, 0x440, 0x43f, 0x43d, 0x44f, 0x3b, 0x432, 0x435, 0x440, 0x435, 0x441, 0x43d,
-0x44f, 0x3b, 0x436, 0x43e, 0x432, 0x442, 0x43d, 0x44f, 0x3b, 0x43b, 0x438, 0x441, 0x442, 0x43e, 0x43f, 0x430, 0x434, 0x430, 0x3b, 0x433,
-0x440, 0x443, 0x434, 0x43d, 0x44f, 0x3b, 0x441, 0x3b, 0x43b, 0x3b, 0x431, 0x3b, 0x43a, 0x3b, 0x442, 0x3b, 0x447, 0x3b, 0x43b, 0x3b,
-0x441, 0x3b, 0x432, 0x3b, 0x436, 0x3b, 0x43b, 0x3b, 0x433, 0x3b, 0x62c, 0x646, 0x648, 0x631, 0x6cc, 0x3b, 0x641, 0x631, 0x648, 0x631,
-0x6cc, 0x3b, 0x645, 0x627, 0x631, 0x686, 0x3b, 0x627, 0x67e, 0x631, 0x6cc, 0x644, 0x3b, 0x645, 0x626, 0x6cc, 0x3b, 0x62c, 0x648, 0x646,
-0x3b, 0x62c, 0x648, 0x644, 0x627, 0x626, 0x6cc, 0x3b, 0x627, 0x6af, 0x633, 0x62a, 0x3b, 0x633, 0x62a, 0x645, 0x628, 0x631, 0x3b, 0x627,
-0x6a9, 0x62a, 0x648, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x645, 0x628, 0x631, 0x3b, 0x62f, 0x633, 0x645, 0x628, 0x631, 0x3b, 0x59, 0x61,
-0x6e, 0x3b, 0x46, 0x65, 0x76, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x49, 0x79,
-0x6e, 0x3b, 0x49, 0x79, 0x6c, 0x3b, 0x41, 0x76, 0x67, 0x3b, 0x53, 0x65, 0x6e, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f,
-0x79, 0x3b, 0x44, 0x65, 0x6b, 0x3b, 0x59, 0x61, 0x6e, 0x76, 0x61, 0x72, 0x3b, 0x46, 0x65, 0x76, 0x72, 0x61, 0x6c, 0x3b,
-0x4d, 0x61, 0x72, 0x74, 0x3b, 0x41, 0x70, 0x72, 0x65, 0x6c, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x49, 0x79, 0x75, 0x6e, 0x3b,
-0x49, 0x79, 0x75, 0x6c, 0x3b, 0x41, 0x76, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x53, 0x65, 0x6e, 0x74, 0x61, 0x62, 0x72, 0x3b,
-0x4f, 0x6b, 0x74, 0x61, 0x62, 0x72, 0x3b, 0x4e, 0x6f, 0x79, 0x61, 0x62, 0x72, 0x3b, 0x44, 0x65, 0x6b, 0x61, 0x62, 0x72,
-0x3b, 0x59, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f,
-0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x79, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x76, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x61, 0x70, 0x72,
-0x3b, 0x6d, 0x61, 0x79, 0x3b, 0x69, 0x79, 0x6e, 0x3b, 0x69, 0x79, 0x6c, 0x3b, 0x61, 0x76, 0x67, 0x3b, 0x73, 0x65, 0x6e,
-0x3b, 0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x79, 0x3b, 0x64, 0x65, 0x6b, 0x3b, 0x79, 0x61, 0x6e, 0x76, 0x61, 0x72, 0x3b,
-0x66, 0x65, 0x76, 0x72, 0x61, 0x6c, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x3b, 0x61, 0x70, 0x72, 0x65, 0x6c, 0x3b, 0x6d, 0x61,
-0x79, 0x3b, 0x69, 0x79, 0x75, 0x6e, 0x3b, 0x69, 0x79, 0x75, 0x6c, 0x3b, 0x61, 0x76, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x73,
-0x65, 0x6e, 0x74, 0x61, 0x62, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0x61, 0x62, 0x72, 0x3b, 0x6e, 0x6f, 0x79, 0x61, 0x62, 0x72,
-0x3b, 0x64, 0x65, 0x6b, 0x61, 0x62, 0x72, 0x3b, 0x62c, 0x646, 0x648, 0x3b, 0x641, 0x628, 0x631, 0x3b, 0x645, 0x627, 0x631, 0x3b,
-0x627, 0x67e, 0x631, 0x3b, 0x645, 0x6cc, 0x3b, 0x62c, 0x648, 0x646, 0x3b, 0x62c, 0x648, 0x644, 0x3b, 0x627, 0x6af, 0x633, 0x3b, 0x633,
-0x67e, 0x62a, 0x3b, 0x627, 0x6a9, 0x62a, 0x3b, 0x646, 0x648, 0x645, 0x3b, 0x62f, 0x633, 0x645, 0x3b, 0x42f, 0x43d, 0x432, 0x430, 0x440,
-0x3b, 0x424, 0x435, 0x432, 0x440, 0x430, 0x43b, 0x3b, 0x41c, 0x430, 0x440, 0x442, 0x3b, 0x410, 0x43f, 0x440, 0x435, 0x43b, 0x3b, 0x41c,
-0x430, 0x439, 0x3b, 0x418, 0x44e, 0x43d, 0x3b, 0x418, 0x44e, 0x43b, 0x3b, 0x410, 0x432, 0x433, 0x443, 0x441, 0x442, 0x3b, 0x421, 0x435,
-0x43d, 0x442, 0x44f, 0x431, 0x440, 0x3b, 0x41e, 0x43a, 0x442, 0x44f, 0x431, 0x440, 0x3b, 0x41d, 0x43e, 0x44f, 0x431, 0x440, 0x3b, 0x414,
-0x435, 0x43a, 0x430, 0x431, 0x440, 0x3b, 0x44f, 0x43d, 0x432, 0x3b, 0x444, 0x435, 0x432, 0x3b, 0x43c, 0x430, 0x440, 0x3b, 0x430, 0x43f,
-0x440, 0x3b, 0x43c, 0x430, 0x439, 0x3b, 0x438, 0x44e, 0x43d, 0x3b, 0x438, 0x44e, 0x43b, 0x3b, 0x430, 0x432, 0x433, 0x3b, 0x441, 0x435,
-0x43d, 0x3b, 0x43e, 0x43a, 0x442, 0x3b, 0x43d, 0x43e, 0x44f, 0x3b, 0x434, 0x435, 0x43a, 0x3b, 0x44f, 0x43d, 0x432, 0x430, 0x440, 0x3b,
-0x444, 0x435, 0x432, 0x440, 0x430, 0x43b, 0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430, 0x43f, 0x440, 0x435, 0x43b, 0x3b, 0x43c, 0x430,
-0x439, 0x3b, 0x438, 0x44e, 0x43d, 0x3b, 0x438, 0x44e, 0x43b, 0x3b, 0x430, 0x432, 0x433, 0x443, 0x441, 0x442, 0x3b, 0x441, 0x435, 0x43d,
-0x442, 0x44f, 0x431, 0x440, 0x3b, 0x43e, 0x43a, 0x442, 0x44f, 0x431, 0x440, 0x3b, 0x43d, 0x43e, 0x44f, 0x431, 0x440, 0x3b, 0x434, 0x435,
-0x43a, 0x430, 0x431, 0x440, 0x3b, 0x54, 0x68, 0x67, 0x20, 0x31, 0x3b, 0x54, 0x68, 0x67, 0x20, 0x32, 0x3b, 0x54, 0x68, 0x67,
-0x20, 0x33, 0x3b, 0x54, 0x68, 0x67, 0x20, 0x34, 0x3b, 0x54, 0x68, 0x67, 0x20, 0x35, 0x3b, 0x54, 0x68, 0x67, 0x20, 0x36,
-0x3b, 0x54, 0x68, 0x67, 0x20, 0x37, 0x3b, 0x54, 0x68, 0x67, 0x20, 0x38, 0x3b, 0x54, 0x68, 0x67, 0x20, 0x39, 0x3b, 0x54,
-0x68, 0x67, 0x20, 0x31, 0x30, 0x3b, 0x54, 0x68, 0x67, 0x20, 0x31, 0x31, 0x3b, 0x54, 0x68, 0x67, 0x20, 0x31, 0x32, 0x3b,
-0x54, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x31, 0x3b, 0x54, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x32, 0x3b, 0x54, 0x68, 0xe1, 0x6e,
-0x67, 0x20, 0x33, 0x3b, 0x54, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x34, 0x3b, 0x54, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x35, 0x3b,
-0x54, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x36, 0x3b, 0x54, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x37, 0x3b, 0x54, 0x68, 0xe1, 0x6e,
-0x67, 0x20, 0x38, 0x3b, 0x54, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x39, 0x3b, 0x54, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x31, 0x30,
-0x3b, 0x54, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x31, 0x31, 0x3b, 0x54, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x31, 0x32, 0x3b, 0x74,
-0x68, 0x67, 0x20, 0x31, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x32, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x33, 0x3b, 0x74, 0x68, 0x67,
-0x20, 0x34, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x35, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x36, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x37,
-0x3b, 0x74, 0x68, 0x67, 0x20, 0x38, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x39, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x31, 0x30, 0x3b,
-0x74, 0x68, 0x67, 0x20, 0x31, 0x31, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x31, 0x32, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20,
-0x31, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x32, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x33, 0x3b, 0x74, 0x68,
-0xe1, 0x6e, 0x67, 0x20, 0x34, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x35, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20,
-0x36, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x37, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x38, 0x3b, 0x74, 0x68,
-0xe1, 0x6e, 0x67, 0x20, 0x39, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x31, 0x30, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67,
-0x20, 0x31, 0x31, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x31, 0x32, 0x3b, 0x49, 0x6f, 0x6e, 0x3b, 0x43, 0x68, 0x77,
-0x3b, 0x4d, 0x61, 0x77, 0x3b, 0x45, 0x62, 0x72, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4d, 0x65, 0x68, 0x3b, 0x47, 0x6f, 0x72,
-0x3b, 0x41, 0x77, 0x73, 0x74, 0x3b, 0x4d, 0x65, 0x64, 0x69, 0x3b, 0x48, 0x79, 0x64, 0x3b, 0x54, 0x61, 0x63, 0x68, 0x3b,
-0x52, 0x68, 0x61, 0x67, 0x3b, 0x49, 0x6f, 0x6e, 0x61, 0x77, 0x72, 0x3b, 0x43, 0x68, 0x77, 0x65, 0x66, 0x72, 0x6f, 0x72,
-0x3b, 0x4d, 0x61, 0x77, 0x72, 0x74, 0x68, 0x3b, 0x45, 0x62, 0x72, 0x69, 0x6c, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4d,
-0x65, 0x68, 0x65, 0x66, 0x69, 0x6e, 0x3b, 0x47, 0x6f, 0x72, 0x66, 0x66, 0x65, 0x6e, 0x6e, 0x61, 0x66, 0x3b, 0x41, 0x77,
-0x73, 0x74, 0x3b, 0x4d, 0x65, 0x64, 0x69, 0x3b, 0x48, 0x79, 0x64, 0x72, 0x65, 0x66, 0x3b, 0x54, 0x61, 0x63, 0x68, 0x77,
-0x65, 0x64, 0x64, 0x3b, 0x52, 0x68, 0x61, 0x67, 0x66, 0x79, 0x72, 0x3b, 0x49, 0x3b, 0x43, 0x68, 0x3b, 0x4d, 0x3b, 0x45,
-0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x47, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x48, 0x3b, 0x54, 0x3b, 0x52, 0x68, 0x3b, 0x49, 0x6f,
-0x6e, 0x3b, 0x43, 0x68, 0x77, 0x65, 0x66, 0x3b, 0x4d, 0x61, 0x77, 0x3b, 0x45, 0x62, 0x72, 0x69, 0x6c, 0x6c, 0x3b, 0x4d,
-0x61, 0x69, 0x3b, 0x4d, 0x65, 0x68, 0x3b, 0x47, 0x6f, 0x72, 0x66, 0x66, 0x3b, 0x41, 0x77, 0x73, 0x74, 0x3b, 0x4d, 0x65,
-0x64, 0x69, 0x3b, 0x48, 0x79, 0x64, 0x3b, 0x54, 0x61, 0x63, 0x68, 0x3b, 0x52, 0x68, 0x61, 0x67, 0x3b, 0x1e62, 0x1eb9, 0x301,
-0x72, 0x1eb9, 0x301, 0x3b, 0xc8, 0x72, 0xe8, 0x6c, 0xe8, 0x3b, 0x1eb8, 0x72, 0x1eb9, 0x300, 0x6e, 0xe0, 0x3b, 0xcc, 0x67, 0x62,
-0xe9, 0x3b, 0x1eb8, 0x300, 0x62, 0x69, 0x62, 0x69, 0x3b, 0xd2, 0x6b, 0xfa, 0x64, 0x75, 0x3b, 0x41, 0x67, 0x1eb9, 0x6d, 0x1ecd,
-0x3b, 0xd2, 0x67, 0xfa, 0x6e, 0x3b, 0x4f, 0x77, 0x65, 0x77, 0x65, 0x3b, 0x1ecc, 0x300, 0x77, 0xe0, 0x72, 0xe0, 0x3b, 0x42,
-0xe9, 0x6c, 0xfa, 0x3b, 0x1ecc, 0x300, 0x70, 0x1eb9, 0x300, 0x3b, 0x4f, 0x1e63, 0xf9, 0x20, 0x1e62, 0x1eb9, 0x301, 0x72, 0x1eb9, 0x301,
-0x3b, 0x4f, 0x1e63, 0xf9, 0x20, 0xc8, 0x72, 0xe8, 0x6c, 0xe8, 0x3b, 0x4f, 0x1e63, 0xf9, 0x20, 0x1eb8, 0x72, 0x1eb9, 0x300, 0x6e,
-0xe0, 0x3b, 0x4f, 0x1e63, 0xf9, 0x20, 0xcc, 0x67, 0x62, 0xe9, 0x3b, 0x4f, 0x1e63, 0xf9, 0x20, 0x1eb8, 0x300, 0x62, 0x69, 0x62,
-0x69, 0x3b, 0x4f, 0x1e63, 0xf9, 0x20, 0xd2, 0x6b, 0xfa, 0x64, 0x75, 0x3b, 0x4f, 0x1e63, 0xf9, 0x20, 0x41, 0x67, 0x1eb9, 0x6d,
-0x1ecd, 0x3b, 0x4f, 0x1e63, 0xf9, 0x20, 0xd2, 0x67, 0xfa, 0x6e, 0x3b, 0x4f, 0x1e63, 0xf9, 0x20, 0x4f, 0x77, 0x65, 0x77, 0x65,
-0x3b, 0x4f, 0x1e63, 0xf9, 0x20, 0x1ecc, 0x300, 0x77, 0xe0, 0x72, 0xe0, 0x3b, 0x4f, 0x1e63, 0xf9, 0x20, 0x42, 0xe9, 0x6c, 0xfa,
-0x3b, 0x4f, 0x1e63, 0xf9, 0x20, 0x1ecc, 0x300, 0x70, 0x1eb9, 0x300, 0x3b, 0x53, 0x68, 0x25b, 0x301, 0x72, 0x25b, 0x301, 0x3b, 0xc8,
-0x72, 0xe8, 0x6c, 0xe8, 0x3b, 0x190, 0x72, 0x25b, 0x300, 0x6e, 0xe0, 0x3b, 0xcc, 0x67, 0x62, 0xe9, 0x3b, 0x190, 0x300, 0x62,
-0x69, 0x62, 0x69, 0x3b, 0xd2, 0x6b, 0xfa, 0x64, 0x75, 0x3b, 0x41, 0x67, 0x25b, 0x6d, 0x254, 0x3b, 0xd2, 0x67, 0xfa, 0x6e,
-0x3b, 0x4f, 0x77, 0x65, 0x77, 0x65, 0x3b, 0x186, 0x300, 0x77, 0xe0, 0x72, 0xe0, 0x3b, 0x42, 0xe9, 0x6c, 0xfa, 0x3b, 0x186,
-0x300, 0x70, 0x25b, 0x300, 0x3b, 0x4f, 0x73, 0x68, 0xf9, 0x20, 0x53, 0x68, 0x25b, 0x301, 0x72, 0x25b, 0x301, 0x3b, 0x4f, 0x73,
-0x68, 0xf9, 0x20, 0xc8, 0x72, 0xe8, 0x6c, 0xe8, 0x3b, 0x4f, 0x73, 0x68, 0xf9, 0x20, 0x190, 0x72, 0x25b, 0x300, 0x6e, 0xe0,
-0x3b, 0x4f, 0x73, 0x68, 0xf9, 0x20, 0xcc, 0x67, 0x62, 0xe9, 0x3b, 0x4f, 0x73, 0x68, 0xf9, 0x20, 0x190, 0x300, 0x62, 0x69,
-0x62, 0x69, 0x3b, 0x4f, 0x73, 0x68, 0xf9, 0x20, 0xd2, 0x6b, 0xfa, 0x64, 0x75, 0x3b, 0x4f, 0x73, 0x68, 0xf9, 0x20, 0x41,
-0x67, 0x25b, 0x6d, 0x254, 0x3b, 0x4f, 0x73, 0x68, 0xf9, 0x20, 0xd2, 0x67, 0xfa, 0x6e, 0x3b, 0x4f, 0x73, 0x68, 0xf9, 0x20,
-0x4f, 0x77, 0x65, 0x77, 0x65, 0x3b, 0x4f, 0x73, 0x68, 0xf9, 0x20, 0x186, 0x300, 0x77, 0xe0, 0x72, 0xe0, 0x3b, 0x4f, 0x73,
-0x68, 0xf9, 0x20, 0x42, 0xe9, 0x6c, 0xfa, 0x3b, 0x4f, 0x73, 0x68, 0xf9, 0x20, 0x186, 0x300, 0x70, 0x25b, 0x300, 0x3b, 0x4a,
-0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x73, 0x3b, 0x45, 0x70, 0x68, 0x3b, 0x4d, 0x65, 0x79, 0x3b, 0x4a,
-0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x61, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e,
-0x6f, 0x76, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x77, 0x61, 0x72, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x72,
-0x75, 0x77, 0x61, 0x72, 0x69, 0x3b, 0x4d, 0x61, 0x73, 0x68, 0x69, 0x3b, 0x45, 0x70, 0x68, 0x72, 0x65, 0x6c, 0x69, 0x3b,
-0x4d, 0x65, 0x79, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x79, 0x69, 0x3b, 0x41, 0x67, 0x61,
-0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x68, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x68, 0x6f, 0x62,
-0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x55, 0x4d,
-0x61, 0x73, 0x69, 0x6e, 0x67, 0x61, 0x6e, 0x61, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x77, 0x61, 0x72, 0x69, 0x3b, 0x4d,
-0x61, 0x73, 0x68, 0x69, 0x3b, 0x45, 0x70, 0x68, 0x72, 0x65, 0x6c, 0x69, 0x3b, 0x4d, 0x65, 0x79, 0x69, 0x3b, 0x4a, 0x75,
-0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x79, 0x69, 0x3b, 0x41, 0x67, 0x61, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70,
-0x74, 0x68, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x68, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d,
-0x62, 0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x45, 0x3b, 0x4d,
-0x3b, 0x4a, 0x3b, 0x4a, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x6a, 0x61, 0x6e, 0x2e, 0x3b,
-0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b, 0x61, 0x70, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x69, 0x3b, 0x6a,
-0x75, 0x6e, 0x69, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x3b, 0x61, 0x75, 0x67, 0x2e, 0x3b, 0x73, 0x65, 0x70, 0x2e, 0x3b, 0x6f,
-0x6b, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x73, 0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0x61, 0x72,
-0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x3b, 0x61, 0x70, 0x72, 0x69, 0x6c, 0x3b,
-0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x69, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x3b, 0x61, 0x76, 0x67, 0x75, 0x73, 0x74,
-0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x72, 0x3b, 0x6e,
-0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x458, 0x430, 0x43d,
-0x443, 0x430, 0x440, 0x3b, 0x444, 0x435, 0x431, 0x440, 0x443, 0x430, 0x440, 0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430, 0x43f, 0x440,
-0x438, 0x43b, 0x3b, 0x43c, 0x430, 0x458, 0x3b, 0x458, 0x443, 0x43d, 0x438, 0x3b, 0x458, 0x443, 0x43b, 0x438, 0x3b, 0x430, 0x432, 0x433,
-0x443, 0x441, 0x442, 0x3b, 0x441, 0x435, 0x43f, 0x442, 0x435, 0x43c, 0x431, 0x430, 0x440, 0x3b, 0x43e, 0x43a, 0x442, 0x43e, 0x431, 0x430,
-0x440, 0x3b, 0x43d, 0x43e, 0x432, 0x435, 0x43c, 0x431, 0x430, 0x440, 0x3b, 0x434, 0x435, 0x446, 0x435, 0x43c, 0x431, 0x430, 0x440, 0x3b,
-0x4a, 0x2d, 0x67, 0x75, 0x65, 0x72, 0x3b, 0x54, 0x2d, 0x61, 0x72, 0x72, 0x65, 0x65, 0x3b, 0x4d, 0x61, 0x79, 0x72, 0x6e,
-0x74, 0x3b, 0x41, 0x76, 0x72, 0x72, 0x69, 0x6c, 0x3b, 0x42, 0x6f, 0x61, 0x6c, 0x64, 0x79, 0x6e, 0x3b, 0x4d, 0x2d, 0x73,
-0x6f, 0x75, 0x72, 0x65, 0x65, 0x3b, 0x4a, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x65, 0x65, 0x3b, 0x4c, 0x75, 0x61, 0x6e, 0x69,
-0x73, 0x74, 0x79, 0x6e, 0x3b, 0x4d, 0x2d, 0x66, 0x6f, 0x75, 0x79, 0x69, 0x72, 0x3b, 0x4a, 0x2d, 0x66, 0x6f, 0x75, 0x79,
-0x69, 0x72, 0x3b, 0x4d, 0x2d, 0x48, 0x6f, 0x75, 0x6e, 0x65, 0x79, 0x3b, 0x4d, 0x2d, 0x4e, 0x6f, 0x6c, 0x6c, 0x69, 0x63,
-0x6b, 0x3b, 0x4a, 0x65, 0x72, 0x72, 0x65, 0x79, 0x2d, 0x67, 0x65, 0x75, 0x72, 0x65, 0x65, 0x3b, 0x54, 0x6f, 0x73, 0x68,
-0x69, 0x61, 0x67, 0x68, 0x74, 0x2d, 0x61, 0x72, 0x72, 0x65, 0x65, 0x3b, 0x4d, 0x61, 0x79, 0x72, 0x6e, 0x74, 0x3b, 0x41,
-0x76, 0x65, 0x72, 0x69, 0x6c, 0x3b, 0x42, 0x6f, 0x61, 0x6c, 0x64, 0x79, 0x6e, 0x3b, 0x4d, 0x65, 0x61, 0x6e, 0x2d, 0x73,
-0x6f, 0x75, 0x72, 0x65, 0x65, 0x3b, 0x4a, 0x65, 0x72, 0x72, 0x65, 0x79, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x65, 0x65, 0x3b,
-0x4c, 0x75, 0x61, 0x6e, 0x69, 0x73, 0x74, 0x79, 0x6e, 0x3b, 0x4d, 0x65, 0x61, 0x6e, 0x2d, 0x66, 0x6f, 0x75, 0x79, 0x69,
-0x72, 0x3b, 0x4a, 0x65, 0x72, 0x72, 0x65, 0x79, 0x2d, 0x66, 0x6f, 0x75, 0x79, 0x69, 0x72, 0x3b, 0x4d, 0x65, 0x65, 0x20,
-0x48, 0x6f, 0x75, 0x6e, 0x65, 0x79, 0x3b, 0x4d, 0x65, 0x65, 0x20, 0x6e, 0x79, 0x20, 0x4e, 0x6f, 0x6c, 0x6c, 0x69, 0x63,
-0x6b, 0x3b, 0x47, 0x65, 0x6e, 0x3b, 0x48, 0x77, 0x65, 0x3b, 0x4d, 0x65, 0x75, 0x3b, 0x45, 0x62, 0x72, 0x3b, 0x4d, 0x65,
-0x3b, 0x4d, 0x65, 0x74, 0x3b, 0x47, 0x6f, 0x72, 0x3b, 0x45, 0x73, 0x74, 0x3b, 0x47, 0x77, 0x6e, 0x3b, 0x48, 0x65, 0x64,
-0x3b, 0x44, 0x75, 0x3b, 0x4b, 0x65, 0x76, 0x3b, 0x6d, 0x69, 0x73, 0x20, 0x47, 0x65, 0x6e, 0x76, 0x65, 0x72, 0x3b, 0x6d,
-0x69, 0x73, 0x20, 0x48, 0x77, 0x65, 0x76, 0x72, 0x65, 0x72, 0x3b, 0x6d, 0x69, 0x73, 0x20, 0x4d, 0x65, 0x75, 0x72, 0x74,
-0x68, 0x3b, 0x6d, 0x69, 0x73, 0x20, 0x45, 0x62, 0x72, 0x65, 0x6c, 0x3b, 0x6d, 0x69, 0x73, 0x20, 0x4d, 0x65, 0x3b, 0x6d,
-0x69, 0x73, 0x20, 0x4d, 0x65, 0x74, 0x68, 0x65, 0x76, 0x65, 0x6e, 0x3b, 0x6d, 0x69, 0x73, 0x20, 0x47, 0x6f, 0x72, 0x74,
-0x68, 0x65, 0x72, 0x65, 0x6e, 0x3b, 0x6d, 0x69, 0x73, 0x20, 0x45, 0x73, 0x74, 0x3b, 0x6d, 0x69, 0x73, 0x20, 0x47, 0x77,
-0x79, 0x6e, 0x6e, 0x67, 0x61, 0x6c, 0x61, 0x3b, 0x6d, 0x69, 0x73, 0x20, 0x48, 0x65, 0x64, 0x72, 0x61, 0x3b, 0x6d, 0x69,
-0x73, 0x20, 0x44, 0x75, 0x3b, 0x6d, 0x69, 0x73, 0x20, 0x4b, 0x65, 0x76, 0x61, 0x72, 0x64, 0x68, 0x75, 0x3b, 0x53, 0x2d,
-0x186, 0x3b, 0x4b, 0x2d, 0x186, 0x3b, 0x45, 0x2d, 0x186, 0x3b, 0x45, 0x2d, 0x4f, 0x3b, 0x45, 0x2d, 0x4b, 0x3b, 0x4f, 0x2d,
-0x41, 0x3b, 0x41, 0x2d, 0x4b, 0x3b, 0x44, 0x2d, 0x186, 0x3b, 0x46, 0x2d, 0x190, 0x3b, 0x186, 0x2d, 0x41, 0x3b, 0x186, 0x2d,
-0x4f, 0x3b, 0x4d, 0x2d, 0x186, 0x3b, 0x53, 0x61, 0x6e, 0x64, 0x61, 0x2d, 0x186, 0x70, 0x25b, 0x70, 0x254, 0x6e, 0x3b, 0x4b,
-0x77, 0x61, 0x6b, 0x77, 0x61, 0x72, 0x2d, 0x186, 0x67, 0x79, 0x65, 0x66, 0x75, 0x6f, 0x3b, 0x45, 0x62, 0x254, 0x77, 0x2d,
-0x186, 0x62, 0x65, 0x6e, 0x65, 0x6d, 0x3b, 0x45, 0x62, 0x254, 0x62, 0x69, 0x72, 0x61, 0x2d, 0x4f, 0x66, 0x6f, 0x72, 0x69,
-0x73, 0x75, 0x6f, 0x3b, 0x45, 0x73, 0x75, 0x73, 0x6f, 0x77, 0x20, 0x41, 0x6b, 0x65, 0x74, 0x73, 0x65, 0x61, 0x62, 0x61,
-0x2d, 0x4b, 0x254, 0x74, 0x254, 0x6e, 0x69, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x62, 0x69, 0x72, 0x61, 0x64, 0x65, 0x2d, 0x41,
-0x79, 0x25b, 0x77, 0x6f, 0x68, 0x6f, 0x6d, 0x75, 0x6d, 0x75, 0x3b, 0x41, 0x79, 0x25b, 0x77, 0x6f, 0x68, 0x6f, 0x2d, 0x4b,
-0x69, 0x74, 0x61, 0x77, 0x6f, 0x6e, 0x73, 0x61, 0x3b, 0x44, 0x69, 0x66, 0x75, 0x75, 0x2d, 0x186, 0x73, 0x61, 0x6e, 0x64,
-0x61, 0x61, 0x3b, 0x46, 0x61, 0x6e, 0x6b, 0x77, 0x61, 0x2d, 0x190, 0x62, 0x254, 0x3b, 0x186, 0x62, 0x25b, 0x73, 0x25b, 0x2d,
-0x41, 0x68, 0x69, 0x6e, 0x69, 0x6d, 0x65, 0x3b, 0x186, 0x62, 0x65, 0x72, 0x25b, 0x66, 0x25b, 0x77, 0x2d, 0x4f, 0x62, 0x75,
-0x62, 0x75, 0x6f, 0x3b, 0x4d, 0x75, 0x6d, 0x75, 0x2d, 0x186, 0x70, 0x25b, 0x6e, 0x69, 0x6d, 0x62, 0x61, 0x3b, 0x91c, 0x93e,
-0x928, 0x947, 0x935, 0x93e, 0x930, 0x940, 0x3b, 0x92b, 0x947, 0x92c, 0x94d, 0x930, 0x941, 0x935, 0x93e, 0x930, 0x940, 0x3b, 0x92e, 0x93e,
-0x930, 0x94d, 0x91a, 0x3b, 0x90f, 0x92a, 0x94d, 0x930, 0x93f, 0x932, 0x3b, 0x92e, 0x947, 0x3b, 0x91c, 0x942, 0x928, 0x3b, 0x91c, 0x941,
-0x932, 0x948, 0x3b, 0x913, 0x917, 0x938, 0x94d, 0x91f, 0x3b, 0x938, 0x947, 0x92a, 0x94d, 0x91f, 0x947, 0x902, 0x92c, 0x930, 0x3b, 0x913,
-0x915, 0x94d, 0x91f, 0x94b, 0x92c, 0x930, 0x3b, 0x928, 0x94b, 0x935, 0x94d, 0x939, 0x947, 0x902, 0x92c, 0x930, 0x3b, 0x921, 0x93f, 0x938,
-0x947, 0x902, 0x92c, 0x930, 0x3b, 0x4a, 0x65, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x61, 0x3b, 0x45, 0x70, 0x72,
-0x3b, 0x4d, 0x65, 0x65, 0x3b, 0x4a, 0x75, 0x75, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x1ecc, 0x67, 0x1ecd, 0x3b, 0x53, 0x65, 0x70,
-0x3b, 0x1ecc, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x65, 0x6e, 0x1ee5, 0x77, 0x61, 0x72,
-0x1ecb, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x1ee5, 0x77, 0x61, 0x72, 0x1ecb, 0x3b, 0x4d, 0x61, 0x61, 0x63, 0x68, 0x1ecb, 0x3b, 0x45,
-0x70, 0x72, 0x65, 0x6c, 0x3b, 0x4d, 0x65, 0x65, 0x3b, 0x4a, 0x75, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x1ecb, 0x3b,
-0x1ecc, 0x67, 0x1ecd, 0x1ecd, 0x73, 0x74, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x1ecc, 0x6b, 0x74, 0x6f,
-0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4d,
-0x62, 0x65, 0x3b, 0x4b, 0x65, 0x6c, 0x3b, 0x4b, 0x74, 0x169, 0x3b, 0x4b, 0x61, 0x6e, 0x3b, 0x4b, 0x74, 0x6e, 0x3b, 0x54,
-0x68, 0x61, 0x3b, 0x4d, 0x6f, 0x6f, 0x3b, 0x4e, 0x79, 0x61, 0x3b, 0x4b, 0x6e, 0x64, 0x3b, 0x128, 0x6b, 0x75, 0x3b, 0x128,
-0x6b, 0x6d, 0x3b, 0x128, 0x6b, 0x6c, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6d, 0x62, 0x65, 0x65, 0x3b,
-0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x65, 0x6c, 0x129, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61,
-0x20, 0x6b, 0x61, 0x74, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61,
-0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x77, 0x61, 0x69,
-0x20, 0x77, 0x61, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x74, 0x68, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77,
-0x61, 0x20, 0x6d, 0x75, 0x6f, 0x6e, 0x7a, 0x61, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6e, 0x79, 0x61,
-0x61, 0x6e, 0x79, 0x61, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4d,
-0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x129, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61,
-0x20, 0x129, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x129, 0x6d, 0x77, 0x65, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20,
-0x77, 0x61, 0x20, 0x129, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x69, 0x6c, 0x129, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b,
-0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x54, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x4b, 0x3b, 0x128, 0x3b, 0x128, 0x3b, 0x128, 0x3b,
-0x5a, 0x65, 0x6e, 0x3b, 0x46, 0x65, 0x76, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x76, 0x72, 0x3b, 0x4d, 0x61, 0x69, 0x3b,
-0x4a, 0x75, 0x67, 0x3b, 0x4c, 0x75, 0x69, 0x3b, 0x41, 0x76, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x74, 0x75, 0x3b,
-0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69, 0x63, 0x3b, 0x5a, 0x65, 0x6e, 0xe2, 0x72, 0x3b, 0x46, 0x65, 0x76, 0x72, 0xe2, 0x72,
-0x3b, 0x4d, 0x61, 0x72, 0xe7, 0x3b, 0x41, 0x76, 0x72, 0xee, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x67, 0x6e,
-0x3b, 0x4c, 0x75, 0x69, 0x3b, 0x41, 0x76, 0x6f, 0x73, 0x74, 0x3b, 0x53, 0x65, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b,
-0x4f, 0x74, 0x75, 0x62, 0x61, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x44, 0x69, 0x63, 0x65,
-0x6d, 0x62, 0x61, 0x72, 0x3b, 0x5a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x4c, 0x3b, 0x41,
-0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x64, 0x7a, 0x76, 0x3b, 0x64, 0x7a, 0x64, 0x3b, 0x74, 0x65, 0x64,
-0x3b, 0x61, 0x66, 0x254, 0x3b, 0x64, 0x61, 0x6d, 0x3b, 0x6d, 0x61, 0x73, 0x3b, 0x73, 0x69, 0x61, 0x3b, 0x64, 0x65, 0x61,
-0x3b, 0x61, 0x6e, 0x79, 0x3b, 0x6b, 0x65, 0x6c, 0x3b, 0x61, 0x64, 0x65, 0x3b, 0x64, 0x7a, 0x6d, 0x3b, 0x64, 0x7a, 0x6f,
-0x76, 0x65, 0x3b, 0x64, 0x7a, 0x6f, 0x64, 0x7a, 0x65, 0x3b, 0x74, 0x65, 0x64, 0x6f, 0x78, 0x65, 0x3b, 0x61, 0x66, 0x254,
-0x66, 0x129, 0x65, 0x3b, 0x64, 0x61, 0x6d, 0x61, 0x3b, 0x6d, 0x61, 0x73, 0x61, 0x3b, 0x73, 0x69, 0x61, 0x6d, 0x6c, 0x254,
-0x6d, 0x3b, 0x64, 0x65, 0x61, 0x73, 0x69, 0x61, 0x6d, 0x69, 0x6d, 0x65, 0x3b, 0x61, 0x6e, 0x79, 0x254, 0x6e, 0x79, 0x254,
-0x3b, 0x6b, 0x65, 0x6c, 0x65, 0x3b, 0x61, 0x64, 0x65, 0x25b, 0x6d, 0x65, 0x6b, 0x70, 0x254, 0x78, 0x65, 0x3b, 0x64, 0x7a,
-0x6f, 0x6d, 0x65, 0x3b, 0x64, 0x3b, 0x64, 0x3b, 0x74, 0x3b, 0x61, 0x3b, 0x64, 0x3b, 0x6d, 0x3b, 0x73, 0x3b, 0x64, 0x3b,
-0x61, 0x3b, 0x6b, 0x3b, 0x61, 0x3b, 0x64, 0x3b, 0x49, 0x61, 0x6e, 0x2e, 0x3b, 0x50, 0x65, 0x70, 0x2e, 0x3b, 0x4d, 0x61,
-0x6c, 0x2e, 0x3b, 0x2bb, 0x41, 0x70, 0x2e, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x49, 0x75, 0x6e, 0x2e, 0x3b, 0x49, 0x75, 0x6c,
-0x2e, 0x3b, 0x2bb, 0x41, 0x75, 0x2e, 0x3b, 0x4b, 0x65, 0x70, 0x2e, 0x3b, 0x2bb, 0x4f, 0x6b, 0x2e, 0x3b, 0x4e, 0x6f, 0x77,
-0x2e, 0x3b, 0x4b, 0x65, 0x6b, 0x2e, 0x3b, 0x49, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x50, 0x65, 0x70, 0x65, 0x6c,
-0x75, 0x61, 0x6c, 0x69, 0x3b, 0x4d, 0x61, 0x6c, 0x61, 0x6b, 0x69, 0x3b, 0x2bb, 0x41, 0x70, 0x65, 0x6c, 0x69, 0x6c, 0x61,
-0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x49, 0x75, 0x6e, 0x65, 0x3b, 0x49, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x2bb, 0x41, 0x75, 0x6b,
-0x61, 0x6b, 0x65, 0x3b, 0x4b, 0x65, 0x70, 0x61, 0x6b, 0x65, 0x6d, 0x61, 0x70, 0x61, 0x3b, 0x2bb, 0x4f, 0x6b, 0x61, 0x6b,
-0x6f, 0x70, 0x61, 0x3b, 0x4e, 0x6f, 0x77, 0x65, 0x6d, 0x61, 0x70, 0x61, 0x3b, 0x4b, 0x65, 0x6b, 0x65, 0x6d, 0x61, 0x70,
-0x61, 0x3b, 0x45, 0x6e, 0x65, 0x3b, 0x50, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x62, 0x72, 0x3b, 0x4d, 0x61,
-0x79, 0x3b, 0x48, 0x75, 0x6e, 0x3b, 0x48, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x6b,
-0x74, 0x3b, 0x4e, 0x6f, 0x62, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x45, 0x6e, 0x65, 0x72, 0x6f, 0x3b, 0x50, 0x65, 0x62, 0x72,
-0x65, 0x72, 0x6f, 0x3b, 0x4d, 0x61, 0x72, 0x73, 0x6f, 0x3b, 0x41, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x79, 0x6f,
-0x3b, 0x48, 0x75, 0x6e, 0x79, 0x6f, 0x3b, 0x48, 0x75, 0x6c, 0x79, 0x6f, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x6f, 0x3b,
-0x53, 0x65, 0x74, 0x79, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x4f, 0x6b, 0x74, 0x75, 0x62, 0x72, 0x65, 0x3b, 0x4e, 0x6f,
-0x62, 0x79, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x44, 0x69, 0x73, 0x79, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x45, 0x3b,
-0x50, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x48, 0x75, 0x6e, 0x3b, 0x48, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b,
-0x53, 0x65, 0x74, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x62, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x75,
-0x61, 0x72, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x4d, 0xe4, 0x72, 0x7a, 0x3b, 0x41, 0x70, 0x72, 0x69,
+0x75, 0x6e, 0x2e, 0x3b, 0x6a, 0x75, 0x6c, 0x2e, 0x3b, 0x61, 0x67, 0x6f, 0x2e, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x2e, 0x3b,
+0x6f, 0x63, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x69, 0x63, 0x2e, 0x3b, 0x65, 0x6e, 0x65, 0x72, 0x6f,
+0x3b, 0x66, 0x65, 0x62, 0x72, 0x65, 0x72, 0x6f, 0x3b, 0x6d, 0x61, 0x72, 0x7a, 0x6f, 0x3b, 0x61, 0x62, 0x72, 0x69, 0x6c,
+0x3b, 0x6d, 0x61, 0x79, 0x6f, 0x3b, 0x6a, 0x75, 0x6e, 0x69, 0x6f, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x6f, 0x3b, 0x61, 0x67,
+0x6f, 0x73, 0x74, 0x6f, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x69, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x6f, 0x63, 0x74, 0x75,
+0x62, 0x72, 0x65, 0x3b, 0x6e, 0x6f, 0x76, 0x69, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x64, 0x69, 0x63, 0x69, 0x65, 0x6d,
+0x62, 0x72, 0x65, 0x3b, 0x45, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x4a, 0x3b, 0x41, 0x3b,
+0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x65, 0x6e, 0x65, 0x2e, 0x3b, 0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61,
+0x72, 0x2e, 0x3b, 0x61, 0x62, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x79, 0x2e, 0x3b, 0x6a, 0x75, 0x6e, 0x2e, 0x3b, 0x6a, 0x75,
+0x6c, 0x2e, 0x3b, 0x61, 0x67, 0x6f, 0x2e, 0x3b, 0x73, 0x65, 0x70, 0x2e, 0x3b, 0x6f, 0x63, 0x74, 0x2e, 0x3b, 0x6e, 0x6f,
+0x76, 0x2e, 0x3b, 0x64, 0x69, 0x63, 0x2e, 0x3b, 0x65, 0x6e, 0x65, 0x3b, 0x66, 0x65, 0x62, 0x3b, 0x6d, 0x61, 0x72, 0x3b,
+0x61, 0x62, 0x72, 0x3b, 0x6d, 0x61, 0x79, 0x3b, 0x6a, 0x75, 0x6e, 0x3b, 0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x67, 0x6f, 0x3b,
+0x73, 0x65, 0x70, 0x3b, 0x6f, 0x63, 0x74, 0x3b, 0x6e, 0x6f, 0x76, 0x3b, 0x64, 0x69, 0x63, 0x3b, 0x45, 0x6e, 0x65, 0x2e,
+0x3b, 0x46, 0x65, 0x62, 0x2e, 0x3b, 0x4d, 0x61, 0x72, 0x2e, 0x3b, 0x41, 0x62, 0x72, 0x2e, 0x3b, 0x4d, 0x61, 0x79, 0x2e,
+0x3b, 0x4a, 0x75, 0x6e, 0x2e, 0x3b, 0x4a, 0x75, 0x6c, 0x2e, 0x3b, 0x41, 0x67, 0x6f, 0x2e, 0x3b, 0x53, 0x65, 0x74, 0x2e,
+0x3b, 0x4f, 0x63, 0x74, 0x2e, 0x3b, 0x4e, 0x6f, 0x76, 0x2e, 0x3b, 0x44, 0x69, 0x63, 0x2e, 0x3b, 0x65, 0x6e, 0x65, 0x2e,
+0x3b, 0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x2e, 0x3b, 0x61, 0x62, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x79, 0x2e,
+0x3b, 0x6a, 0x75, 0x6e, 0x2e, 0x3b, 0x6a, 0x75, 0x6c, 0x2e, 0x3b, 0x61, 0x67, 0x6f, 0x2e, 0x3b, 0x73, 0x65, 0x74, 0x2e,
+0x3b, 0x6f, 0x63, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x69, 0x63, 0x2e, 0x3b, 0x65, 0x6e, 0x65, 0x72,
+0x6f, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x65, 0x72, 0x6f, 0x3b, 0x6d, 0x61, 0x72, 0x7a, 0x6f, 0x3b, 0x61, 0x62, 0x72, 0x69,
+0x6c, 0x3b, 0x6d, 0x61, 0x79, 0x6f, 0x3b, 0x6a, 0x75, 0x6e, 0x69, 0x6f, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x6f, 0x3b, 0x61,
+0x67, 0x6f, 0x73, 0x74, 0x6f, 0x3b, 0x73, 0x65, 0x74, 0x69, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x6f, 0x63, 0x74, 0x75,
+0x62, 0x72, 0x65, 0x3b, 0x6e, 0x6f, 0x76, 0x69, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x64, 0x69, 0x63, 0x69, 0x65, 0x6d,
+0x62, 0x72, 0x65, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x63, 0x3b, 0x41, 0x70, 0x72, 0x3b,
+0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x70, 0x3b,
+0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x69, 0x3b,
+0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c,
+0x69, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x41, 0x67, 0x6f,
+0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x3b,
+0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x6a, 0x61, 0x6e, 0x2e,
+0x3b, 0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b, 0x61, 0x70, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x6a, 0x3b,
+0x6a, 0x75, 0x6e, 0x69, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x3b, 0x61, 0x75, 0x67, 0x2e, 0x3b, 0x73, 0x65, 0x70, 0x2e, 0x3b,
+0x6f, 0x6b, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x63, 0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0x61,
+0x72, 0x69, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b, 0x61, 0x70, 0x72,
+0x69, 0x6c, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x69, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x3b, 0x61, 0x75, 0x67,
+0x75, 0x73, 0x74, 0x69, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62,
+0x65, 0x72, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x65, 0x72,
+0x3b, 0x42f, 0x43d, 0x432, 0x430, 0x440, 0x3b, 0x424, 0x435, 0x432, 0x440, 0x430, 0x43b, 0x3b, 0x41c, 0x430, 0x440, 0x442, 0x3b, 0x410,
+0x43f, 0x440, 0x435, 0x43b, 0x3b, 0x41c, 0x430, 0x439, 0x3b, 0x418, 0x44e, 0x43d, 0x3b, 0x418, 0x44e, 0x43b, 0x3b, 0x410, 0x432, 0x433,
+0x443, 0x441, 0x442, 0x3b, 0x421, 0x435, 0x43d, 0x442, 0x44f, 0x431, 0x440, 0x3b, 0x41e, 0x43a, 0x442, 0x44f, 0x431, 0x440, 0x3b, 0x41d,
+0x43e, 0x44f, 0x431, 0x440, 0x3b, 0x414, 0x435, 0x43a, 0x430, 0x431, 0x440, 0x3b, 0xb9c, 0xba9, 0x2e, 0x3b, 0xbaa, 0xbbf, 0xbaa, 0xbcd,
+0x2e, 0x3b, 0xbae, 0xbbe, 0xbb0, 0xbcd, 0x2e, 0x3b, 0xb8f, 0xbaa, 0xbcd, 0x2e, 0x3b, 0xbae, 0xbc7, 0x3b, 0xb9c, 0xbc2, 0xba9, 0xbcd,
+0x3b, 0xb9c, 0xbc2, 0xbb2, 0xbc8, 0x3b, 0xb86, 0xb95, 0x2e, 0x3b, 0xb9a, 0xbc6, 0xbaa, 0xbcd, 0x2e, 0x3b, 0xb85, 0xb95, 0xbcd, 0x2e,
+0x3b, 0xba8, 0xbb5, 0x2e, 0x3b, 0xb9f, 0xbbf, 0xb9a, 0x2e, 0x3b, 0xb9c, 0xba9, 0xbb5, 0xbb0, 0xbbf, 0x3b, 0xbaa, 0xbbf, 0xbaa, 0xbcd,
+0xbb0, 0xbb5, 0xbb0, 0xbbf, 0x3b, 0xbae, 0xbbe, 0xbb0, 0xbcd, 0xb9a, 0xbcd, 0x3b, 0xb8f, 0xbaa, 0xbcd, 0xbb0, 0xbb2, 0xbcd, 0x3b, 0xbae,
+0xbc7, 0x3b, 0xb9c, 0xbc2, 0xba9, 0xbcd, 0x3b, 0xb9c, 0xbc2, 0xbb2, 0xbc8, 0x3b, 0xb86, 0xb95, 0xbb8, 0xbcd, 0xb9f, 0xbcd, 0x3b, 0xb9a,
+0xbc6, 0xbaa, 0xbcd, 0xb9f, 0xbae, 0xbcd, 0xbaa, 0xbb0, 0xbcd, 0x3b, 0xb85, 0xb95, 0xbcd, 0xb9f, 0xbcb, 0xbaa, 0xbb0, 0xbcd, 0x3b, 0xba8,
+0xbb5, 0xbae, 0xbcd, 0xbaa, 0xbb0, 0xbcd, 0x3b, 0xb9f, 0xbbf, 0xb9a, 0xbae, 0xbcd, 0xbaa, 0xbb0, 0xbcd, 0x3b, 0xb9c, 0x3b, 0xbaa, 0xbbf,
+0x3b, 0xbae, 0xbbe, 0x3b, 0xb8f, 0x3b, 0xbae, 0xbc7, 0x3b, 0xb9c, 0xbc2, 0x3b, 0xb9c, 0xbc2, 0x3b, 0xb86, 0x3b, 0xb9a, 0xbc6, 0x3b,
+0xb85, 0x3b, 0xba8, 0x3b, 0xb9f, 0xbbf, 0x3b, 0x433, 0x44b, 0x439, 0x43d, 0x2e, 0x3b, 0x444, 0x435, 0x432, 0x2e, 0x3b, 0x43c, 0x430,
+0x440, 0x2e, 0x3b, 0x430, 0x43f, 0x440, 0x2e, 0x3b, 0x43c, 0x430, 0x439, 0x3b, 0x438, 0x44e, 0x43d, 0x44c, 0x3b, 0x438, 0x44e, 0x43b,
+0x44c, 0x3b, 0x430, 0x432, 0x433, 0x2e, 0x3b, 0x441, 0x435, 0x43d, 0x442, 0x2e, 0x3b, 0x43e, 0x43a, 0x442, 0x2e, 0x3b, 0x43d, 0x43e,
+0x44f, 0x431, 0x2e, 0x3b, 0x434, 0x435, 0x43a, 0x2e, 0x3b, 0x433, 0x44b, 0x439, 0x43d, 0x432, 0x430, 0x440, 0x3b, 0x444, 0x435, 0x432,
+0x440, 0x430, 0x43b, 0x44c, 0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430, 0x43f, 0x440, 0x435, 0x43b, 0x44c, 0x3b, 0x43c, 0x430, 0x439,
+0x3b, 0x438, 0x44e, 0x43d, 0x44c, 0x3b, 0x438, 0x44e, 0x43b, 0x44c, 0x3b, 0x430, 0x432, 0x433, 0x443, 0x441, 0x442, 0x3b, 0x441, 0x435,
+0x43d, 0x442, 0x44f, 0x431, 0x440, 0x44c, 0x3b, 0x43e, 0x43a, 0x442, 0x44f, 0x431, 0x440, 0x44c, 0x3b, 0x43d, 0x43e, 0x44f, 0x431, 0x440,
+0x44c, 0x3b, 0x434, 0x435, 0x43a, 0x430, 0x431, 0x440, 0x44c, 0x3b, 0xc1c, 0xc28, 0x3b, 0xc2b, 0xc3f, 0xc2c, 0xc4d, 0xc30, 0x3b, 0xc2e,
+0xc3e, 0xc30, 0xc4d, 0xc1a, 0xc3f, 0x3b, 0xc0f, 0xc2a, 0xc4d, 0xc30, 0xc3f, 0x3b, 0xc2e, 0xc47, 0x3b, 0xc1c, 0xc42, 0xc28, 0xc4d, 0x3b,
+0xc1c, 0xc41, 0xc32, 0xc48, 0x3b, 0xc06, 0xc17, 0x3b, 0xc38, 0xc46, 0xc2a, 0xc4d, 0xc1f, 0xc46, 0xc02, 0x3b, 0xc05, 0xc15, 0xc4d, 0xc1f,
+0xc4b, 0x3b, 0xc28, 0xc35, 0xc02, 0x3b, 0xc21, 0xc3f, 0xc38, 0xc46, 0xc02, 0x3b, 0xc1c, 0xc28, 0xc35, 0xc30, 0xc3f, 0x3b, 0xc2b, 0xc3f,
+0xc2c, 0xc4d, 0xc30, 0xc35, 0xc30, 0xc3f, 0x3b, 0xc2e, 0xc3e, 0xc30, 0xc4d, 0xc1a, 0xc3f, 0x3b, 0xc0f, 0xc2a, 0xc4d, 0xc30, 0xc3f, 0xc32,
+0xc4d, 0x3b, 0xc2e, 0xc47, 0x3b, 0xc1c, 0xc42, 0xc28, 0xc4d, 0x3b, 0xc1c, 0xc41, 0xc32, 0xc48, 0x3b, 0xc06, 0xc17, 0xc38, 0xc4d, 0xc1f,
+0xc41, 0x3b, 0xc38, 0xc46, 0xc2a, 0xc4d, 0xc1f, 0xc46, 0xc02, 0xc2c, 0xc30, 0xc4d, 0x3b, 0xc05, 0xc15, 0xc4d, 0xc1f, 0xc4b, 0xc2c, 0xc30,
+0xc4d, 0x3b, 0xc28, 0xc35, 0xc02, 0xc2c, 0xc30, 0xc4d, 0x3b, 0xc21, 0xc3f, 0xc38, 0xc46, 0xc02, 0xc2c, 0xc30, 0xc4d, 0x3b, 0xc1c, 0x3b,
+0xc2b, 0xc3f, 0x3b, 0xc2e, 0xc3e, 0x3b, 0xc0f, 0x3b, 0xc2e, 0xc47, 0x3b, 0xc1c, 0xc42, 0x3b, 0xc1c, 0xc41, 0x3b, 0xc06, 0x3b, 0xc38,
+0xc46, 0x3b, 0xc05, 0x3b, 0xc28, 0x3b, 0xc21, 0xc3f, 0x3b, 0xe21, 0x2e, 0xe04, 0x2e, 0x3b, 0xe01, 0x2e, 0xe1e, 0x2e, 0x3b, 0xe21,
+0xe35, 0x2e, 0xe04, 0x2e, 0x3b, 0xe40, 0xe21, 0x2e, 0xe22, 0x2e, 0x3b, 0xe1e, 0x2e, 0xe04, 0x2e, 0x3b, 0xe21, 0xe34, 0x2e, 0xe22,
+0x2e, 0x3b, 0xe01, 0x2e, 0xe04, 0x2e, 0x3b, 0xe2a, 0x2e, 0xe04, 0x2e, 0x3b, 0xe01, 0x2e, 0xe22, 0x2e, 0x3b, 0xe15, 0x2e, 0xe04,
+0x2e, 0x3b, 0xe1e, 0x2e, 0xe22, 0x2e, 0x3b, 0xe18, 0x2e, 0xe04, 0x2e, 0x3b, 0xe21, 0xe01, 0xe23, 0xe32, 0xe04, 0xe21, 0x3b, 0xe01,
+0xe38, 0xe21, 0xe20, 0xe32, 0xe1e, 0xe31, 0xe19, 0xe18, 0xe4c, 0x3b, 0xe21, 0xe35, 0xe19, 0xe32, 0xe04, 0xe21, 0x3b, 0xe40, 0xe21, 0xe29,
+0xe32, 0xe22, 0xe19, 0x3b, 0xe1e, 0xe24, 0xe29, 0xe20, 0xe32, 0xe04, 0xe21, 0x3b, 0xe21, 0xe34, 0xe16, 0xe38, 0xe19, 0xe32, 0xe22, 0xe19,
+0x3b, 0xe01, 0xe23, 0xe01, 0xe0e, 0xe32, 0xe04, 0xe21, 0x3b, 0xe2a, 0xe34, 0xe07, 0xe2b, 0xe32, 0xe04, 0xe21, 0x3b, 0xe01, 0xe31, 0xe19,
+0xe22, 0xe32, 0xe22, 0xe19, 0x3b, 0xe15, 0xe38, 0xe25, 0xe32, 0xe04, 0xe21, 0x3b, 0xe1e, 0xe24, 0xe28, 0xe08, 0xe34, 0xe01, 0xe32, 0xe22,
+0xe19, 0x3b, 0xe18, 0xe31, 0xe19, 0xe27, 0xe32, 0xe04, 0xe21, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf51, 0xf44, 0xf0b, 0xf54, 0xf7c,
+0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf42, 0xf49, 0xf72, 0xf66, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b,
+0xf42, 0xf66, 0xf74, 0xf58, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf5e, 0xf72, 0xf0b, 0xf54, 0xf0b, 0x3b,
+0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf63, 0xf94, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf51, 0xfb2, 0xf74, 0xf42,
+0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf51, 0xf74, 0xf53, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b,
+0xf56, 0xf0b, 0xf56, 0xf62, 0xf92, 0xfb1, 0xf51, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf51, 0xf42, 0xf74, 0xf0b,
+0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b,
+0xf56, 0xf45, 0xf74, 0xf0b, 0xf42, 0xf45, 0xf72, 0xf42, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf45, 0xf74,
+0xf0b, 0xf42, 0xf49, 0xf72, 0xf66, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf51, 0xf44, 0xf0b, 0xf54, 0xf7c, 0x3b,
+0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf42, 0xf49, 0xf72, 0xf66, 0xf0b, 0xf54, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf42, 0xf66, 0xf74,
+0xf58, 0xf0b, 0xf54, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf5e, 0xf72, 0xf0b, 0xf54, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b,
+0xf63, 0xf94, 0xf0b, 0xf54, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf51, 0xfb2, 0xf74, 0xf42, 0xf0b, 0xf54, 0x3b, 0xf5f, 0xfb3, 0xf0b,
+0xf56, 0xf0b, 0xf56, 0xf51, 0xf74, 0xf53, 0xf0b, 0xf54, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf62, 0xf92, 0xfb1, 0xf51, 0xf0b,
+0xf54, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf51, 0xf42, 0xf74, 0xf0b, 0xf54, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf45,
+0xf74, 0xf0b, 0xf54, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf42, 0xf45, 0xf72, 0xf42, 0xf0b, 0xf54, 0x3b,
+0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf42, 0xf49, 0xf72, 0xf66, 0xf0b, 0xf54, 0x3b, 0x1325, 0x122a, 0x3b, 0x1208,
+0x12ab, 0x3b, 0x1218, 0x130b, 0x3b, 0x121a, 0x12eb, 0x3b, 0x130d, 0x1295, 0x3b, 0x1230, 0x1290, 0x3b, 0x1213, 0x121d, 0x3b, 0x1290, 0x1213, 0x3b,
+0x1218, 0x1235, 0x3b, 0x1325, 0x1245, 0x3b, 0x1215, 0x12f3, 0x3b, 0x1273, 0x1215, 0x3b, 0x1325, 0x122a, 0x3b, 0x1208, 0x12ab, 0x1272, 0x1275, 0x3b,
+0x1218, 0x130b, 0x1262, 0x1275, 0x3b, 0x121a, 0x12eb, 0x12dd, 0x12eb, 0x3b, 0x130d, 0x1295, 0x1266, 0x1275, 0x3b, 0x1230, 0x1290, 0x3b, 0x1213, 0x121d,
+0x1208, 0x3b, 0x1290, 0x1213, 0x1230, 0x3b, 0x1218, 0x1235, 0x12a8, 0x1228, 0x121d, 0x3b, 0x1325, 0x1245, 0x121d, 0x1272, 0x3b, 0x1215, 0x12f3, 0x122d,
+0x3b, 0x1273, 0x1215, 0x1233, 0x1235, 0x3b, 0x1325, 0x3b, 0x1208, 0x3b, 0x1218, 0x3b, 0x121a, 0x3b, 0x130d, 0x3b, 0x1230, 0x3b, 0x1213, 0x3b,
+0x1290, 0x3b, 0x1218, 0x3b, 0x1325, 0x3b, 0x1215, 0x3b, 0x1273, 0x3b, 0x53, 0x101, 0x6e, 0x3b, 0x46, 0x113, 0x70, 0x3b, 0x4d, 0x61,
+0x2bb, 0x61, 0x3b, 0x2bb, 0x45, 0x70, 0x65, 0x3b, 0x4d, 0x113, 0x3b, 0x53, 0x75, 0x6e, 0x3b, 0x53, 0x69, 0x75, 0x3b, 0x2bb,
+0x41, 0x6f, 0x6b, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x2bb, 0x4f, 0x6b, 0x61, 0x3b, 0x4e, 0x14d, 0x76, 0x3b, 0x54, 0x12b, 0x73,
+0x3b, 0x53, 0x101, 0x6e, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x46, 0x113, 0x70, 0x75, 0x65, 0x6c, 0x69, 0x3b, 0x4d, 0x61, 0x2bb,
+0x61, 0x73, 0x69, 0x3b, 0x2bb, 0x45, 0x70, 0x65, 0x6c, 0x65, 0x6c, 0x69, 0x3b, 0x4d, 0x113, 0x3b, 0x53, 0x75, 0x6e, 0x65,
+0x3b, 0x53, 0x69, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x2bb, 0x41, 0x6f, 0x6b, 0x6f, 0x73, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x69,
+0x74, 0x65, 0x6d, 0x61, 0x3b, 0x2bb, 0x4f, 0x6b, 0x61, 0x74, 0x6f, 0x70, 0x61, 0x3b, 0x4e, 0x14d, 0x76, 0x65, 0x6d, 0x61,
+0x3b, 0x54, 0x12b, 0x73, 0x65, 0x6d, 0x61, 0x3b, 0x53, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x45, 0x3b, 0x4d, 0x3b, 0x53, 0x3b,
+0x53, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x54, 0x3b, 0x4f, 0x63, 0x61, 0x3b, 0x15e, 0x75, 0x62, 0x3b,
+0x4d, 0x61, 0x72, 0x3b, 0x4e, 0x69, 0x73, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x48, 0x61, 0x7a, 0x3b, 0x54, 0x65, 0x6d, 0x3b,
+0x41, 0x11f, 0x75, 0x3b, 0x45, 0x79, 0x6c, 0x3b, 0x45, 0x6b, 0x69, 0x3b, 0x4b, 0x61, 0x73, 0x3b, 0x41, 0x72, 0x61, 0x3b,
+0x4f, 0x63, 0x61, 0x6b, 0x3b, 0x15e, 0x75, 0x62, 0x61, 0x74, 0x3b, 0x4d, 0x61, 0x72, 0x74, 0x3b, 0x4e, 0x69, 0x73, 0x61,
+0x6e, 0x3b, 0x4d, 0x61, 0x79, 0x131, 0x73, 0x3b, 0x48, 0x61, 0x7a, 0x69, 0x72, 0x61, 0x6e, 0x3b, 0x54, 0x65, 0x6d, 0x6d,
+0x75, 0x7a, 0x3b, 0x41, 0x11f, 0x75, 0x73, 0x74, 0x6f, 0x73, 0x3b, 0x45, 0x79, 0x6c, 0xfc, 0x6c, 0x3b, 0x45, 0x6b, 0x69,
+0x6d, 0x3b, 0x4b, 0x61, 0x73, 0x131, 0x6d, 0x3b, 0x41, 0x72, 0x61, 0x6c, 0x131, 0x6b, 0x3b, 0x4f, 0x3b, 0x15e, 0x3b, 0x4d,
+0x3b, 0x4e, 0x3b, 0x4d, 0x3b, 0x48, 0x3b, 0x54, 0x3b, 0x41, 0x3b, 0x45, 0x3b, 0x45, 0x3b, 0x4b, 0x3b, 0x41, 0x3b, 0xdd,
+0x61, 0x6e, 0x3b, 0x46, 0x65, 0x77, 0x3b, 0x4d, 0x61, 0x72, 0x74, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x61, 0xfd, 0x3b,
+0x49, 0xfd, 0x75, 0x6e, 0x3b, 0x49, 0xfd, 0x75, 0x6c, 0x3b, 0x41, 0x77, 0x67, 0x3b, 0x53, 0x65, 0x6e, 0x3b, 0x4f, 0x6b,
+0x74, 0x3b, 0x4e, 0x6f, 0xfd, 0x3b, 0x44, 0x65, 0x6b, 0x3b, 0xdd, 0x61, 0x6e, 0x77, 0x61, 0x72, 0x3b, 0x46, 0x65, 0x77,
+0x72, 0x61, 0x6c, 0x3b, 0x4d, 0x61, 0x72, 0x74, 0x3b, 0x41, 0x70, 0x72, 0x65, 0x6c, 0x3b, 0x4d, 0x61, 0xfd, 0x3b, 0x49,
+0xfd, 0x75, 0x6e, 0x3b, 0x49, 0xfd, 0x75, 0x6c, 0x3b, 0x41, 0x77, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x53, 0x65, 0x6e, 0x74,
+0xfd, 0x61, 0x62, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0xfd, 0x61, 0x62, 0x72, 0x3b, 0x4e, 0x6f, 0xfd, 0x61, 0x62, 0x72, 0x3b,
+0x44, 0x65, 0x6b, 0x61, 0x62, 0x72, 0x3b, 0xdd, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x49, 0x3b, 0x49,
+0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0xfd, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x77, 0x3b, 0x6d,
+0x61, 0x72, 0x74, 0x3b, 0x61, 0x70, 0x72, 0x3b, 0x6d, 0x61, 0xfd, 0x3b, 0x69, 0xfd, 0x75, 0x6e, 0x3b, 0x69, 0xfd, 0x75,
+0x6c, 0x3b, 0x61, 0x77, 0x67, 0x3b, 0x73, 0x65, 0x6e, 0x3b, 0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0xfd, 0x3b, 0x64, 0x65,
+0x6b, 0x3b, 0xfd, 0x61, 0x6e, 0x77, 0x61, 0x72, 0x3b, 0x66, 0x65, 0x77, 0x72, 0x61, 0x6c, 0x3b, 0x6d, 0x61, 0x72, 0x74,
+0x3b, 0x61, 0x70, 0x72, 0x65, 0x6c, 0x3b, 0x6d, 0x61, 0xfd, 0x3b, 0x69, 0xfd, 0x75, 0x6e, 0x3b, 0x69, 0xfd, 0x75, 0x6c,
+0x3b, 0x61, 0x77, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x73, 0x65, 0x6e, 0x74, 0xfd, 0x61, 0x62, 0x72, 0x3b, 0x6f, 0x6b, 0x74,
+0xfd, 0x61, 0x62, 0x72, 0x3b, 0x6e, 0x6f, 0xfd, 0x61, 0x62, 0x72, 0x3b, 0x64, 0x65, 0x6b, 0x61, 0x62, 0x72, 0x3b, 0x64a,
+0x627, 0x646, 0x6cb, 0x627, 0x631, 0x3b, 0x641, 0x6d0, 0x6cb, 0x631, 0x627, 0x644, 0x3b, 0x645, 0x627, 0x631, 0x62a, 0x3b, 0x626, 0x627,
+0x67e, 0x631, 0x6d0, 0x644, 0x3b, 0x645, 0x627, 0x64a, 0x3b, 0x626, 0x649, 0x64a, 0x6c7, 0x646, 0x3b, 0x626, 0x649, 0x64a, 0x6c7, 0x644,
+0x3b, 0x626, 0x627, 0x6cb, 0x63a, 0x6c7, 0x633, 0x62a, 0x3b, 0x633, 0x6d0, 0x646, 0x62a, 0x6d5, 0x628, 0x649, 0x631, 0x3b, 0x626, 0x6c6,
+0x643, 0x62a, 0x6d5, 0x628, 0x649, 0x631, 0x3b, 0x646, 0x648, 0x64a, 0x627, 0x628, 0x649, 0x631, 0x3b, 0x62f, 0x6d0, 0x643, 0x627, 0x628,
+0x649, 0x631, 0x3b, 0x441, 0x456, 0x447, 0x3b, 0x43b, 0x44e, 0x442, 0x3b, 0x431, 0x435, 0x440, 0x3b, 0x43a, 0x432, 0x456, 0x3b, 0x442,
+0x440, 0x430, 0x3b, 0x447, 0x435, 0x440, 0x3b, 0x43b, 0x438, 0x43f, 0x3b, 0x441, 0x435, 0x440, 0x3b, 0x432, 0x435, 0x440, 0x3b, 0x436,
+0x43e, 0x432, 0x3b, 0x43b, 0x438, 0x441, 0x3b, 0x433, 0x440, 0x443, 0x3b, 0x441, 0x456, 0x447, 0x435, 0x43d, 0x44c, 0x3b, 0x43b, 0x44e,
+0x442, 0x438, 0x439, 0x3b, 0x431, 0x435, 0x440, 0x435, 0x437, 0x435, 0x43d, 0x44c, 0x3b, 0x43a, 0x432, 0x456, 0x442, 0x435, 0x43d, 0x44c,
+0x3b, 0x442, 0x440, 0x430, 0x432, 0x435, 0x43d, 0x44c, 0x3b, 0x447, 0x435, 0x440, 0x432, 0x435, 0x43d, 0x44c, 0x3b, 0x43b, 0x438, 0x43f,
+0x435, 0x43d, 0x44c, 0x3b, 0x441, 0x435, 0x440, 0x43f, 0x435, 0x43d, 0x44c, 0x3b, 0x432, 0x435, 0x440, 0x435, 0x441, 0x435, 0x43d, 0x44c,
+0x3b, 0x436, 0x43e, 0x432, 0x442, 0x435, 0x43d, 0x44c, 0x3b, 0x43b, 0x438, 0x441, 0x442, 0x43e, 0x43f, 0x430, 0x434, 0x3b, 0x433, 0x440,
+0x443, 0x434, 0x435, 0x43d, 0x44c, 0x3b, 0x421, 0x3b, 0x41b, 0x3b, 0x411, 0x3b, 0x41a, 0x3b, 0x422, 0x3b, 0x427, 0x3b, 0x41b, 0x3b,
+0x421, 0x3b, 0x412, 0x3b, 0x416, 0x3b, 0x41b, 0x3b, 0x413, 0x3b, 0x441, 0x456, 0x447, 0x2e, 0x3b, 0x43b, 0x44e, 0x442, 0x2e, 0x3b,
+0x431, 0x435, 0x440, 0x2e, 0x3b, 0x43a, 0x432, 0x456, 0x442, 0x2e, 0x3b, 0x442, 0x440, 0x430, 0x432, 0x2e, 0x3b, 0x447, 0x435, 0x440,
+0x432, 0x2e, 0x3b, 0x43b, 0x438, 0x43f, 0x2e, 0x3b, 0x441, 0x435, 0x440, 0x43f, 0x2e, 0x3b, 0x432, 0x435, 0x440, 0x2e, 0x3b, 0x436,
+0x43e, 0x432, 0x442, 0x2e, 0x3b, 0x43b, 0x438, 0x441, 0x442, 0x2e, 0x3b, 0x433, 0x440, 0x443, 0x434, 0x2e, 0x3b, 0x441, 0x456, 0x447,
+0x43d, 0x44f, 0x3b, 0x43b, 0x44e, 0x442, 0x43e, 0x433, 0x43e, 0x3b, 0x431, 0x435, 0x440, 0x435, 0x437, 0x43d, 0x44f, 0x3b, 0x43a, 0x432,
+0x456, 0x442, 0x43d, 0x44f, 0x3b, 0x442, 0x440, 0x430, 0x432, 0x43d, 0x44f, 0x3b, 0x447, 0x435, 0x440, 0x432, 0x43d, 0x44f, 0x3b, 0x43b,
+0x438, 0x43f, 0x43d, 0x44f, 0x3b, 0x441, 0x435, 0x440, 0x43f, 0x43d, 0x44f, 0x3b, 0x432, 0x435, 0x440, 0x435, 0x441, 0x43d, 0x44f, 0x3b,
+0x436, 0x43e, 0x432, 0x442, 0x43d, 0x44f, 0x3b, 0x43b, 0x438, 0x441, 0x442, 0x43e, 0x43f, 0x430, 0x434, 0x430, 0x3b, 0x433, 0x440, 0x443,
+0x434, 0x43d, 0x44f, 0x3b, 0x441, 0x3b, 0x43b, 0x3b, 0x431, 0x3b, 0x43a, 0x3b, 0x442, 0x3b, 0x447, 0x3b, 0x43b, 0x3b, 0x441, 0x3b,
+0x432, 0x3b, 0x436, 0x3b, 0x43b, 0x3b, 0x433, 0x3b, 0x62c, 0x646, 0x648, 0x631, 0x6cc, 0x3b, 0x641, 0x631, 0x648, 0x631, 0x6cc, 0x3b,
+0x645, 0x627, 0x631, 0x686, 0x3b, 0x627, 0x67e, 0x631, 0x6cc, 0x644, 0x3b, 0x645, 0x626, 0x6cc, 0x3b, 0x62c, 0x648, 0x646, 0x3b, 0x62c,
+0x648, 0x644, 0x627, 0x626, 0x6cc, 0x3b, 0x627, 0x6af, 0x633, 0x62a, 0x3b, 0x633, 0x62a, 0x645, 0x628, 0x631, 0x3b, 0x627, 0x6a9, 0x62a,
+0x648, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x645, 0x628, 0x631, 0x3b, 0x62f, 0x633, 0x645, 0x628, 0x631, 0x3b, 0x59, 0x61, 0x6e, 0x3b,
+0x46, 0x65, 0x76, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x49, 0x79, 0x6e, 0x3b,
+0x49, 0x79, 0x6c, 0x3b, 0x41, 0x76, 0x67, 0x3b, 0x53, 0x65, 0x6e, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x79, 0x3b,
+0x44, 0x65, 0x6b, 0x3b, 0x59, 0x61, 0x6e, 0x76, 0x61, 0x72, 0x3b, 0x46, 0x65, 0x76, 0x72, 0x61, 0x6c, 0x3b, 0x4d, 0x61,
+0x72, 0x74, 0x3b, 0x41, 0x70, 0x72, 0x65, 0x6c, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x49, 0x79, 0x75, 0x6e, 0x3b, 0x49, 0x79,
+0x75, 0x6c, 0x3b, 0x41, 0x76, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x53, 0x65, 0x6e, 0x74, 0x61, 0x62, 0x72, 0x3b, 0x4f, 0x6b,
+0x74, 0x61, 0x62, 0x72, 0x3b, 0x4e, 0x6f, 0x79, 0x61, 0x62, 0x72, 0x3b, 0x44, 0x65, 0x6b, 0x61, 0x62, 0x72, 0x3b, 0x59,
+0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e,
+0x3b, 0x44, 0x3b, 0x79, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x76, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x61, 0x70, 0x72, 0x3b, 0x6d,
+0x61, 0x79, 0x3b, 0x69, 0x79, 0x6e, 0x3b, 0x69, 0x79, 0x6c, 0x3b, 0x61, 0x76, 0x67, 0x3b, 0x73, 0x65, 0x6e, 0x3b, 0x6f,
+0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x79, 0x3b, 0x64, 0x65, 0x6b, 0x3b, 0x79, 0x61, 0x6e, 0x76, 0x61, 0x72, 0x3b, 0x66, 0x65,
+0x76, 0x72, 0x61, 0x6c, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x3b, 0x61, 0x70, 0x72, 0x65, 0x6c, 0x3b, 0x6d, 0x61, 0x79, 0x3b,
+0x69, 0x79, 0x75, 0x6e, 0x3b, 0x69, 0x79, 0x75, 0x6c, 0x3b, 0x61, 0x76, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x73, 0x65, 0x6e,
+0x74, 0x61, 0x62, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0x61, 0x62, 0x72, 0x3b, 0x6e, 0x6f, 0x79, 0x61, 0x62, 0x72, 0x3b, 0x64,
+0x65, 0x6b, 0x61, 0x62, 0x72, 0x3b, 0x62c, 0x646, 0x648, 0x3b, 0x641, 0x628, 0x631, 0x3b, 0x645, 0x627, 0x631, 0x3b, 0x627, 0x67e,
+0x631, 0x3b, 0x645, 0x6cc, 0x3b, 0x62c, 0x648, 0x646, 0x3b, 0x62c, 0x648, 0x644, 0x3b, 0x627, 0x6af, 0x633, 0x3b, 0x633, 0x67e, 0x62a,
+0x3b, 0x627, 0x6a9, 0x62a, 0x3b, 0x646, 0x648, 0x645, 0x3b, 0x62f, 0x633, 0x645, 0x3b, 0x44f, 0x43d, 0x432, 0x3b, 0x444, 0x435, 0x432,
+0x3b, 0x43c, 0x430, 0x440, 0x3b, 0x430, 0x43f, 0x440, 0x3b, 0x43c, 0x430, 0x439, 0x3b, 0x438, 0x44e, 0x43d, 0x3b, 0x438, 0x44e, 0x43b,
+0x3b, 0x430, 0x432, 0x433, 0x3b, 0x441, 0x435, 0x43d, 0x3b, 0x43e, 0x43a, 0x442, 0x3b, 0x43d, 0x43e, 0x44f, 0x3b, 0x434, 0x435, 0x43a,
+0x3b, 0x44f, 0x43d, 0x432, 0x430, 0x440, 0x3b, 0x444, 0x435, 0x432, 0x440, 0x430, 0x43b, 0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430,
+0x43f, 0x440, 0x435, 0x43b, 0x3b, 0x43c, 0x430, 0x439, 0x3b, 0x438, 0x44e, 0x43d, 0x3b, 0x438, 0x44e, 0x43b, 0x3b, 0x430, 0x432, 0x433,
+0x443, 0x441, 0x442, 0x3b, 0x441, 0x435, 0x43d, 0x442, 0x44f, 0x431, 0x440, 0x3b, 0x43e, 0x43a, 0x442, 0x44f, 0x431, 0x440, 0x3b, 0x43d,
+0x43e, 0x44f, 0x431, 0x440, 0x3b, 0x434, 0x435, 0x43a, 0x430, 0x431, 0x440, 0x3b, 0x54, 0x68, 0x67, 0x20, 0x31, 0x3b, 0x54, 0x68,
+0x67, 0x20, 0x32, 0x3b, 0x54, 0x68, 0x67, 0x20, 0x33, 0x3b, 0x54, 0x68, 0x67, 0x20, 0x34, 0x3b, 0x54, 0x68, 0x67, 0x20,
+0x35, 0x3b, 0x54, 0x68, 0x67, 0x20, 0x36, 0x3b, 0x54, 0x68, 0x67, 0x20, 0x37, 0x3b, 0x54, 0x68, 0x67, 0x20, 0x38, 0x3b,
+0x54, 0x68, 0x67, 0x20, 0x39, 0x3b, 0x54, 0x68, 0x67, 0x20, 0x31, 0x30, 0x3b, 0x54, 0x68, 0x67, 0x20, 0x31, 0x31, 0x3b,
+0x54, 0x68, 0x67, 0x20, 0x31, 0x32, 0x3b, 0x54, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x31, 0x3b, 0x54, 0x68, 0xe1, 0x6e, 0x67,
+0x20, 0x32, 0x3b, 0x54, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x33, 0x3b, 0x54, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x34, 0x3b, 0x54,
+0x68, 0xe1, 0x6e, 0x67, 0x20, 0x35, 0x3b, 0x54, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x36, 0x3b, 0x54, 0x68, 0xe1, 0x6e, 0x67,
+0x20, 0x37, 0x3b, 0x54, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x38, 0x3b, 0x54, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x39, 0x3b, 0x54,
+0x68, 0xe1, 0x6e, 0x67, 0x20, 0x31, 0x30, 0x3b, 0x54, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x31, 0x31, 0x3b, 0x54, 0x68, 0xe1,
+0x6e, 0x67, 0x20, 0x31, 0x32, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x31, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x32, 0x3b, 0x74, 0x68,
+0x67, 0x20, 0x33, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x34, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x35, 0x3b, 0x74, 0x68, 0x67, 0x20,
+0x36, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x37, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x38, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x39, 0x3b,
+0x74, 0x68, 0x67, 0x20, 0x31, 0x30, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x31, 0x31, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x31, 0x32,
+0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x31, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x32, 0x3b, 0x74, 0x68, 0xe1,
+0x6e, 0x67, 0x20, 0x33, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x34, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x35,
+0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x36, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x37, 0x3b, 0x74, 0x68, 0xe1,
+0x6e, 0x67, 0x20, 0x38, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x39, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x31,
+0x30, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x31, 0x31, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x31, 0x32, 0x3b,
+0x49, 0x6f, 0x6e, 0x3b, 0x43, 0x68, 0x77, 0x3b, 0x4d, 0x61, 0x77, 0x3b, 0x45, 0x62, 0x72, 0x3b, 0x4d, 0x61, 0x69, 0x3b,
+0x4d, 0x65, 0x68, 0x3b, 0x47, 0x6f, 0x72, 0x3b, 0x41, 0x77, 0x73, 0x74, 0x3b, 0x4d, 0x65, 0x64, 0x69, 0x3b, 0x48, 0x79,
+0x64, 0x3b, 0x54, 0x61, 0x63, 0x68, 0x3b, 0x52, 0x68, 0x61, 0x67, 0x3b, 0x49, 0x6f, 0x6e, 0x61, 0x77, 0x72, 0x3b, 0x43,
+0x68, 0x77, 0x65, 0x66, 0x72, 0x6f, 0x72, 0x3b, 0x4d, 0x61, 0x77, 0x72, 0x74, 0x68, 0x3b, 0x45, 0x62, 0x72, 0x69, 0x6c,
+0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4d, 0x65, 0x68, 0x65, 0x66, 0x69, 0x6e, 0x3b, 0x47, 0x6f, 0x72, 0x66, 0x66, 0x65,
+0x6e, 0x6e, 0x61, 0x66, 0x3b, 0x41, 0x77, 0x73, 0x74, 0x3b, 0x4d, 0x65, 0x64, 0x69, 0x3b, 0x48, 0x79, 0x64, 0x72, 0x65,
+0x66, 0x3b, 0x54, 0x61, 0x63, 0x68, 0x77, 0x65, 0x64, 0x64, 0x3b, 0x52, 0x68, 0x61, 0x67, 0x66, 0x79, 0x72, 0x3b, 0x49,
+0x3b, 0x43, 0x68, 0x3b, 0x4d, 0x3b, 0x45, 0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x47, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x48, 0x3b,
+0x54, 0x3b, 0x52, 0x68, 0x3b, 0x49, 0x6f, 0x6e, 0x3b, 0x43, 0x68, 0x77, 0x65, 0x66, 0x3b, 0x4d, 0x61, 0x77, 0x3b, 0x45,
+0x62, 0x72, 0x69, 0x6c, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4d, 0x65, 0x68, 0x3b, 0x47, 0x6f, 0x72, 0x66, 0x66, 0x3b,
+0x41, 0x77, 0x73, 0x74, 0x3b, 0x4d, 0x65, 0x64, 0x69, 0x3b, 0x48, 0x79, 0x64, 0x3b, 0x54, 0x61, 0x63, 0x68, 0x3b, 0x52,
+0x68, 0x61, 0x67, 0x3b, 0x53, 0x61, 0x6d, 0x3b, 0x46, 0x65, 0x77, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x77, 0x72, 0x3b,
+0x4d, 0x65, 0x65, 0x3b, 0x53, 0x75, 0x77, 0x3b, 0x53, 0x75, 0x6c, 0x3b, 0x55, 0x74, 0x3b, 0x53, 0xe0, 0x74, 0x3b, 0x4f,
+0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x77, 0x3b, 0x44, 0x65, 0x73, 0x3b, 0x53, 0x61, 0x6d, 0x77, 0x69, 0x79, 0x65, 0x65, 0x3b,
+0x46, 0x65, 0x77, 0x72, 0x69, 0x79, 0x65, 0x65, 0x3b, 0x4d, 0x61, 0x72, 0x73, 0x3b, 0x41, 0x77, 0x72, 0x69, 0x6c, 0x3b,
+0x4d, 0x65, 0x65, 0x3b, 0x53, 0x75, 0x77, 0x65, 0x3b, 0x53, 0x75, 0x6c, 0x65, 0x74, 0x3b, 0x55, 0x74, 0x3b, 0x53, 0xe0,
+0x74, 0x74, 0x75, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x6f, 0x62, 0x61, 0x72, 0x3b, 0x4e, 0x6f, 0x77,
+0xe0, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x44, 0x65, 0x73, 0xe0, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x1e62, 0x1eb9, 0x301, 0x72, 0x1eb9,
+0x301, 0x3b, 0xc8, 0x72, 0xe8, 0x6c, 0xe8, 0x3b, 0x1eb8, 0x72, 0x1eb9, 0x300, 0x6e, 0xe0, 0x3b, 0xcc, 0x67, 0x62, 0xe9, 0x3b,
+0x1eb8, 0x300, 0x62, 0x69, 0x62, 0x69, 0x3b, 0xd2, 0x6b, 0xfa, 0x64, 0x75, 0x3b, 0x41, 0x67, 0x1eb9, 0x6d, 0x1ecd, 0x3b, 0xd2,
+0x67, 0xfa, 0x6e, 0x3b, 0x4f, 0x77, 0x65, 0x77, 0x65, 0x3b, 0x1ecc, 0x300, 0x77, 0xe0, 0x72, 0xe0, 0x3b, 0x42, 0xe9, 0x6c,
+0xfa, 0x3b, 0x1ecc, 0x300, 0x70, 0x1eb9, 0x300, 0x3b, 0x4f, 0x1e63, 0xf9, 0x20, 0x1e62, 0x1eb9, 0x301, 0x72, 0x1eb9, 0x301, 0x3b, 0x4f,
+0x1e63, 0xf9, 0x20, 0xc8, 0x72, 0xe8, 0x6c, 0xe8, 0x3b, 0x4f, 0x1e63, 0xf9, 0x20, 0x1eb8, 0x72, 0x1eb9, 0x300, 0x6e, 0xe0, 0x3b,
+0x4f, 0x1e63, 0xf9, 0x20, 0xcc, 0x67, 0x62, 0xe9, 0x3b, 0x4f, 0x1e63, 0xf9, 0x20, 0x1eb8, 0x300, 0x62, 0x69, 0x62, 0x69, 0x3b,
+0x4f, 0x1e63, 0xf9, 0x20, 0xd2, 0x6b, 0xfa, 0x64, 0x75, 0x3b, 0x4f, 0x1e63, 0xf9, 0x20, 0x41, 0x67, 0x1eb9, 0x6d, 0x1ecd, 0x3b,
+0x4f, 0x1e63, 0xf9, 0x20, 0xd2, 0x67, 0xfa, 0x6e, 0x3b, 0x4f, 0x1e63, 0xf9, 0x20, 0x4f, 0x77, 0x65, 0x77, 0x65, 0x3b, 0x4f,
+0x1e63, 0xf9, 0x20, 0x1ecc, 0x300, 0x77, 0xe0, 0x72, 0xe0, 0x3b, 0x4f, 0x1e63, 0xf9, 0x20, 0x42, 0xe9, 0x6c, 0xfa, 0x3b, 0x4f,
+0x1e63, 0xf9, 0x20, 0x1ecc, 0x300, 0x70, 0x1eb9, 0x300, 0x3b, 0x53, 0x68, 0x25b, 0x301, 0x72, 0x25b, 0x301, 0x3b, 0xc8, 0x72, 0xe8,
+0x6c, 0xe8, 0x3b, 0x190, 0x72, 0x25b, 0x300, 0x6e, 0xe0, 0x3b, 0xcc, 0x67, 0x62, 0xe9, 0x3b, 0x190, 0x300, 0x62, 0x69, 0x62,
+0x69, 0x3b, 0xd2, 0x6b, 0xfa, 0x64, 0x75, 0x3b, 0x41, 0x67, 0x25b, 0x6d, 0x254, 0x3b, 0xd2, 0x67, 0xfa, 0x6e, 0x3b, 0x4f,
+0x77, 0x65, 0x77, 0x65, 0x3b, 0x186, 0x300, 0x77, 0xe0, 0x72, 0xe0, 0x3b, 0x42, 0xe9, 0x6c, 0xfa, 0x3b, 0x186, 0x300, 0x70,
+0x25b, 0x300, 0x3b, 0x4f, 0x73, 0x68, 0xf9, 0x20, 0x53, 0x68, 0x25b, 0x301, 0x72, 0x25b, 0x301, 0x3b, 0x4f, 0x73, 0x68, 0xf9,
+0x20, 0xc8, 0x72, 0xe8, 0x6c, 0xe8, 0x3b, 0x4f, 0x73, 0x68, 0xf9, 0x20, 0x190, 0x72, 0x25b, 0x300, 0x6e, 0xe0, 0x3b, 0x4f,
+0x73, 0x68, 0xf9, 0x20, 0xcc, 0x67, 0x62, 0xe9, 0x3b, 0x4f, 0x73, 0x68, 0xf9, 0x20, 0x190, 0x300, 0x62, 0x69, 0x62, 0x69,
+0x3b, 0x4f, 0x73, 0x68, 0xf9, 0x20, 0xd2, 0x6b, 0xfa, 0x64, 0x75, 0x3b, 0x4f, 0x73, 0x68, 0xf9, 0x20, 0x41, 0x67, 0x25b,
+0x6d, 0x254, 0x3b, 0x4f, 0x73, 0x68, 0xf9, 0x20, 0xd2, 0x67, 0xfa, 0x6e, 0x3b, 0x4f, 0x73, 0x68, 0xf9, 0x20, 0x4f, 0x77,
+0x65, 0x77, 0x65, 0x3b, 0x4f, 0x73, 0x68, 0xf9, 0x20, 0x186, 0x300, 0x77, 0xe0, 0x72, 0xe0, 0x3b, 0x4f, 0x73, 0x68, 0xf9,
+0x20, 0x42, 0xe9, 0x6c, 0xfa, 0x3b, 0x4f, 0x73, 0x68, 0xf9, 0x20, 0x186, 0x300, 0x70, 0x25b, 0x300, 0x3b, 0x4a, 0x61, 0x6e,
+0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x73, 0x3b, 0x45, 0x70, 0x68, 0x3b, 0x4d, 0x65, 0x79, 0x3b, 0x4a, 0x75, 0x6e,
+0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x61, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76,
+0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x77, 0x61, 0x72, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x77,
+0x61, 0x72, 0x69, 0x3b, 0x4d, 0x61, 0x73, 0x68, 0x69, 0x3b, 0x45, 0x70, 0x68, 0x72, 0x65, 0x6c, 0x69, 0x3b, 0x4d, 0x65,
+0x79, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x79, 0x69, 0x3b, 0x41, 0x67, 0x61, 0x73, 0x74,
+0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x68, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x68, 0x6f, 0x62, 0x61, 0x3b,
+0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x3b, 0x46, 0x3b,
+0x4d, 0x3b, 0x45, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x4a, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b,
+0x6a, 0x61, 0x6e, 0x2e, 0x3b, 0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b, 0x61, 0x70, 0x72, 0x2e, 0x3b,
+0x6d, 0x61, 0x69, 0x3b, 0x6a, 0x75, 0x6e, 0x69, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x3b, 0x61, 0x75, 0x67, 0x2e, 0x3b, 0x73,
+0x65, 0x70, 0x2e, 0x3b, 0x6f, 0x6b, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x73, 0x2e, 0x3b, 0x6a,
+0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x3b, 0x61,
+0x70, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x69, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x3b, 0x61,
+0x76, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0x6f,
+0x62, 0x61, 0x72, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x61,
+0x72, 0x3b, 0x458, 0x430, 0x43d, 0x3b, 0x444, 0x435, 0x431, 0x3b, 0x43c, 0x430, 0x440, 0x3b, 0x430, 0x43f, 0x440, 0x3b, 0x43c, 0x430,
+0x458, 0x3b, 0x458, 0x443, 0x43d, 0x3b, 0x458, 0x443, 0x43b, 0x3b, 0x430, 0x443, 0x433, 0x3b, 0x441, 0x435, 0x43f, 0x3b, 0x43e, 0x43a,
+0x442, 0x3b, 0x43d, 0x43e, 0x432, 0x3b, 0x434, 0x435, 0x446, 0x3b, 0x458, 0x430, 0x43d, 0x443, 0x430, 0x440, 0x3b, 0x444, 0x435, 0x431,
+0x440, 0x443, 0x430, 0x440, 0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430, 0x43f, 0x440, 0x438, 0x43b, 0x3b, 0x43c, 0x430, 0x458, 0x3b,
+0x458, 0x443, 0x43d, 0x438, 0x3b, 0x458, 0x443, 0x43b, 0x438, 0x3b, 0x430, 0x443, 0x433, 0x443, 0x441, 0x442, 0x3b, 0x441, 0x435, 0x43f,
+0x442, 0x435, 0x43c, 0x431, 0x430, 0x440, 0x3b, 0x43e, 0x43a, 0x442, 0x43e, 0x431, 0x430, 0x440, 0x3b, 0x43d, 0x43e, 0x432, 0x435, 0x43c,
+0x431, 0x430, 0x440, 0x3b, 0x434, 0x435, 0x446, 0x435, 0x43c, 0x431, 0x430, 0x440, 0x3b, 0x4a, 0x2d, 0x67, 0x75, 0x65, 0x72, 0x3b,
+0x54, 0x2d, 0x61, 0x72, 0x72, 0x65, 0x65, 0x3b, 0x4d, 0x61, 0x79, 0x72, 0x6e, 0x74, 0x3b, 0x41, 0x76, 0x72, 0x72, 0x69,
+0x6c, 0x3b, 0x42, 0x6f, 0x61, 0x6c, 0x64, 0x79, 0x6e, 0x3b, 0x4d, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x65, 0x65, 0x3b, 0x4a,
+0x2d, 0x73, 0x6f, 0x75, 0x72, 0x65, 0x65, 0x3b, 0x4c, 0x75, 0x61, 0x6e, 0x69, 0x73, 0x74, 0x79, 0x6e, 0x3b, 0x4d, 0x2d,
+0x66, 0x6f, 0x75, 0x79, 0x69, 0x72, 0x3b, 0x4a, 0x2d, 0x66, 0x6f, 0x75, 0x79, 0x69, 0x72, 0x3b, 0x4d, 0x2d, 0x48, 0x6f,
+0x75, 0x6e, 0x65, 0x79, 0x3b, 0x4d, 0x2d, 0x4e, 0x6f, 0x6c, 0x6c, 0x69, 0x63, 0x6b, 0x3b, 0x4a, 0x65, 0x72, 0x72, 0x65,
+0x79, 0x2d, 0x67, 0x65, 0x75, 0x72, 0x65, 0x65, 0x3b, 0x54, 0x6f, 0x73, 0x68, 0x69, 0x61, 0x67, 0x68, 0x74, 0x2d, 0x61,
+0x72, 0x72, 0x65, 0x65, 0x3b, 0x4d, 0x61, 0x79, 0x72, 0x6e, 0x74, 0x3b, 0x41, 0x76, 0x65, 0x72, 0x69, 0x6c, 0x3b, 0x42,
+0x6f, 0x61, 0x6c, 0x64, 0x79, 0x6e, 0x3b, 0x4d, 0x65, 0x61, 0x6e, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x65, 0x65, 0x3b, 0x4a,
+0x65, 0x72, 0x72, 0x65, 0x79, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x65, 0x65, 0x3b, 0x4c, 0x75, 0x61, 0x6e, 0x69, 0x73, 0x74,
+0x79, 0x6e, 0x3b, 0x4d, 0x65, 0x61, 0x6e, 0x2d, 0x66, 0x6f, 0x75, 0x79, 0x69, 0x72, 0x3b, 0x4a, 0x65, 0x72, 0x72, 0x65,
+0x79, 0x2d, 0x66, 0x6f, 0x75, 0x79, 0x69, 0x72, 0x3b, 0x4d, 0x65, 0x65, 0x20, 0x48, 0x6f, 0x75, 0x6e, 0x65, 0x79, 0x3b,
+0x4d, 0x65, 0x65, 0x20, 0x6e, 0x79, 0x20, 0x4e, 0x6f, 0x6c, 0x6c, 0x69, 0x63, 0x6b, 0x3b, 0x47, 0x65, 0x6e, 0x3b, 0x48,
+0x77, 0x65, 0x3b, 0x4d, 0x65, 0x75, 0x3b, 0x45, 0x62, 0x72, 0x3b, 0x4d, 0x65, 0x3b, 0x4d, 0x65, 0x74, 0x3b, 0x47, 0x6f,
+0x72, 0x3b, 0x45, 0x73, 0x74, 0x3b, 0x47, 0x77, 0x6e, 0x3b, 0x48, 0x65, 0x64, 0x3b, 0x44, 0x75, 0x3b, 0x4b, 0x65, 0x76,
+0x3b, 0x6d, 0x69, 0x73, 0x20, 0x47, 0x65, 0x6e, 0x76, 0x65, 0x72, 0x3b, 0x6d, 0x69, 0x73, 0x20, 0x48, 0x77, 0x65, 0x76,
+0x72, 0x65, 0x72, 0x3b, 0x6d, 0x69, 0x73, 0x20, 0x4d, 0x65, 0x75, 0x72, 0x74, 0x68, 0x3b, 0x6d, 0x69, 0x73, 0x20, 0x45,
+0x62, 0x72, 0x65, 0x6c, 0x3b, 0x6d, 0x69, 0x73, 0x20, 0x4d, 0x65, 0x3b, 0x6d, 0x69, 0x73, 0x20, 0x4d, 0x65, 0x74, 0x68,
+0x65, 0x76, 0x65, 0x6e, 0x3b, 0x6d, 0x69, 0x73, 0x20, 0x47, 0x6f, 0x72, 0x74, 0x68, 0x65, 0x72, 0x65, 0x6e, 0x3b, 0x6d,
+0x69, 0x73, 0x20, 0x45, 0x73, 0x74, 0x3b, 0x6d, 0x69, 0x73, 0x20, 0x47, 0x77, 0x79, 0x6e, 0x6e, 0x67, 0x61, 0x6c, 0x61,
+0x3b, 0x6d, 0x69, 0x73, 0x20, 0x48, 0x65, 0x64, 0x72, 0x61, 0x3b, 0x6d, 0x69, 0x73, 0x20, 0x44, 0x75, 0x3b, 0x6d, 0x69,
+0x73, 0x20, 0x4b, 0x65, 0x76, 0x61, 0x72, 0x64, 0x68, 0x75, 0x3b, 0x53, 0x2d, 0x186, 0x3b, 0x4b, 0x2d, 0x186, 0x3b, 0x45,
+0x2d, 0x186, 0x3b, 0x45, 0x2d, 0x4f, 0x3b, 0x45, 0x2d, 0x4b, 0x3b, 0x4f, 0x2d, 0x41, 0x3b, 0x41, 0x2d, 0x4b, 0x3b, 0x44,
+0x2d, 0x186, 0x3b, 0x46, 0x2d, 0x190, 0x3b, 0x186, 0x2d, 0x41, 0x3b, 0x186, 0x2d, 0x4f, 0x3b, 0x4d, 0x2d, 0x186, 0x3b, 0x53,
+0x61, 0x6e, 0x64, 0x61, 0x2d, 0x186, 0x70, 0x25b, 0x70, 0x254, 0x6e, 0x3b, 0x4b, 0x77, 0x61, 0x6b, 0x77, 0x61, 0x72, 0x2d,
+0x186, 0x67, 0x79, 0x65, 0x66, 0x75, 0x6f, 0x3b, 0x45, 0x62, 0x254, 0x77, 0x2d, 0x186, 0x62, 0x65, 0x6e, 0x65, 0x6d, 0x3b,
+0x45, 0x62, 0x254, 0x62, 0x69, 0x72, 0x61, 0x2d, 0x4f, 0x66, 0x6f, 0x72, 0x69, 0x73, 0x75, 0x6f, 0x3b, 0x45, 0x73, 0x75,
+0x73, 0x6f, 0x77, 0x20, 0x41, 0x6b, 0x65, 0x74, 0x73, 0x65, 0x61, 0x62, 0x61, 0x2d, 0x4b, 0x254, 0x74, 0x254, 0x6e, 0x69,
+0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x62, 0x69, 0x72, 0x61, 0x64, 0x65, 0x2d, 0x41, 0x79, 0x25b, 0x77, 0x6f, 0x68, 0x6f, 0x6d,
+0x75, 0x6d, 0x75, 0x3b, 0x41, 0x79, 0x25b, 0x77, 0x6f, 0x68, 0x6f, 0x2d, 0x4b, 0x69, 0x74, 0x61, 0x77, 0x6f, 0x6e, 0x73,
+0x61, 0x3b, 0x44, 0x69, 0x66, 0x75, 0x75, 0x2d, 0x186, 0x73, 0x61, 0x6e, 0x64, 0x61, 0x61, 0x3b, 0x46, 0x61, 0x6e, 0x6b,
+0x77, 0x61, 0x2d, 0x190, 0x62, 0x254, 0x3b, 0x186, 0x62, 0x25b, 0x73, 0x25b, 0x2d, 0x41, 0x68, 0x69, 0x6e, 0x69, 0x6d, 0x65,
+0x3b, 0x186, 0x62, 0x65, 0x72, 0x25b, 0x66, 0x25b, 0x77, 0x2d, 0x4f, 0x62, 0x75, 0x62, 0x75, 0x6f, 0x3b, 0x4d, 0x75, 0x6d,
+0x75, 0x2d, 0x186, 0x70, 0x25b, 0x6e, 0x69, 0x6d, 0x62, 0x61, 0x3b, 0x91c, 0x93e, 0x928, 0x947, 0x935, 0x93e, 0x930, 0x940, 0x3b,
+0x92b, 0x947, 0x92c, 0x94d, 0x930, 0x941, 0x935, 0x93e, 0x930, 0x940, 0x3b, 0x92e, 0x93e, 0x930, 0x94d, 0x91a, 0x3b, 0x90f, 0x92a, 0x94d,
+0x930, 0x93f, 0x932, 0x3b, 0x92e, 0x947, 0x3b, 0x91c, 0x942, 0x928, 0x3b, 0x91c, 0x941, 0x932, 0x93e, 0x92f, 0x3b, 0x906, 0x917, 0x94b,
+0x938, 0x94d, 0x924, 0x3b, 0x938, 0x92a, 0x94d, 0x91f, 0x947, 0x902, 0x92c, 0x930, 0x3b, 0x911, 0x915, 0x94d, 0x91f, 0x94b, 0x92c, 0x930,
+0x3b, 0x928, 0x94b, 0x935, 0x94d, 0x939, 0x947, 0x902, 0x92c, 0x930, 0x3b, 0x921, 0x93f, 0x938, 0x947, 0x902, 0x92c, 0x930, 0x3b, 0x4a,
+0x65, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x61, 0x3b, 0x45, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x65, 0x3b, 0x4a,
+0x75, 0x75, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x1ecc, 0x67, 0x1ecd, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x1ecc, 0x6b, 0x74, 0x3b, 0x4e,
+0x6f, 0x76, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x65, 0x6e, 0x1ee5, 0x77, 0x61, 0x72, 0x1ecb, 0x3b, 0x46, 0x65, 0x62, 0x72,
+0x1ee5, 0x77, 0x61, 0x72, 0x1ecb, 0x3b, 0x4d, 0x61, 0x61, 0x63, 0x68, 0x1ecb, 0x3b, 0x45, 0x70, 0x72, 0x65, 0x6c, 0x3b, 0x4d,
+0x65, 0x65, 0x3b, 0x4a, 0x75, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x1ecb, 0x3b, 0x1ecc, 0x67, 0x1ecd, 0x1ecd, 0x73, 0x74,
+0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x1ecc, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76,
+0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4d, 0x62, 0x65, 0x3b, 0x4b, 0x65, 0x6c,
+0x3b, 0x4b, 0x74, 0x169, 0x3b, 0x4b, 0x61, 0x6e, 0x3b, 0x4b, 0x74, 0x6e, 0x3b, 0x54, 0x68, 0x61, 0x3b, 0x4d, 0x6f, 0x6f,
+0x3b, 0x4e, 0x79, 0x61, 0x3b, 0x4b, 0x6e, 0x64, 0x3b, 0x128, 0x6b, 0x75, 0x3b, 0x128, 0x6b, 0x6d, 0x3b, 0x128, 0x6b, 0x6c,
+0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6d, 0x62, 0x65, 0x65, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77,
+0x61, 0x20, 0x6b, 0x65, 0x6c, 0x129, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x74, 0x61, 0x74,
+0x169, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20,
+0x77, 0x61, 0x20, 0x6b, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x74, 0x68,
+0x61, 0x6e, 0x74, 0x68, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6d, 0x75, 0x6f, 0x6e,
+0x7a, 0x61, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6e, 0x79, 0x61, 0x61, 0x6e, 0x79, 0x61, 0x3b, 0x4d,
+0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61,
+0x20, 0x129, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x129, 0x6b, 0x75, 0x6d, 0x69,
+0x20, 0x6e, 0x61, 0x20, 0x129, 0x6d, 0x77, 0x65, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x129, 0x6b, 0x75,
+0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x69, 0x6c, 0x129, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b,
+0x54, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x4b, 0x3b, 0x128, 0x3b, 0x128, 0x3b, 0x128, 0x3b, 0x5a, 0x65, 0x6e, 0x3b, 0x46, 0x65,
+0x76, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x76, 0x72, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x67, 0x3b, 0x4c, 0x75,
+0x69, 0x3b, 0x41, 0x76, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x74, 0x75, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69,
+0x63, 0x3b, 0x5a, 0x65, 0x6e, 0xe2, 0x72, 0x3b, 0x46, 0x65, 0x76, 0x72, 0xe2, 0x72, 0x3b, 0x4d, 0x61, 0x72, 0xe7, 0x3b,
+0x41, 0x76, 0x72, 0xee, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x67, 0x6e, 0x3b, 0x4c, 0x75, 0x69, 0x3b, 0x41,
+0x76, 0x6f, 0x73, 0x74, 0x3b, 0x53, 0x65, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x4f, 0x74, 0x75, 0x62, 0x61, 0x72,
+0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x44, 0x69, 0x63, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x5a,
+0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x4c, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e,
+0x3b, 0x44, 0x3b, 0x64, 0x7a, 0x76, 0x3b, 0x64, 0x7a, 0x64, 0x3b, 0x74, 0x65, 0x64, 0x3b, 0x61, 0x66, 0x254, 0x3b, 0x64,
+0x61, 0x6d, 0x3b, 0x6d, 0x61, 0x73, 0x3b, 0x73, 0x69, 0x61, 0x3b, 0x64, 0x65, 0x61, 0x3b, 0x61, 0x6e, 0x79, 0x3b, 0x6b,
+0x65, 0x6c, 0x3b, 0x61, 0x64, 0x65, 0x3b, 0x64, 0x7a, 0x6d, 0x3b, 0x64, 0x7a, 0x6f, 0x76, 0x65, 0x3b, 0x64, 0x7a, 0x6f,
+0x64, 0x7a, 0x65, 0x3b, 0x74, 0x65, 0x64, 0x6f, 0x78, 0x65, 0x3b, 0x61, 0x66, 0x254, 0x66, 0x129, 0x65, 0x3b, 0x64, 0x61,
+0x6d, 0x61, 0x3b, 0x6d, 0x61, 0x73, 0x61, 0x3b, 0x73, 0x69, 0x61, 0x6d, 0x6c, 0x254, 0x6d, 0x3b, 0x64, 0x65, 0x61, 0x73,
+0x69, 0x61, 0x6d, 0x69, 0x6d, 0x65, 0x3b, 0x61, 0x6e, 0x79, 0x254, 0x6e, 0x79, 0x254, 0x3b, 0x6b, 0x65, 0x6c, 0x65, 0x3b,
+0x61, 0x64, 0x65, 0x25b, 0x6d, 0x65, 0x6b, 0x70, 0x254, 0x78, 0x65, 0x3b, 0x64, 0x7a, 0x6f, 0x6d, 0x65, 0x3b, 0x64, 0x3b,
+0x64, 0x3b, 0x74, 0x3b, 0x61, 0x3b, 0x64, 0x3b, 0x6d, 0x3b, 0x73, 0x3b, 0x64, 0x3b, 0x61, 0x3b, 0x6b, 0x3b, 0x61, 0x3b,
+0x64, 0x3b, 0x49, 0x61, 0x6e, 0x2e, 0x3b, 0x50, 0x65, 0x70, 0x2e, 0x3b, 0x4d, 0x61, 0x6c, 0x2e, 0x3b, 0x2bb, 0x41, 0x70,
+0x2e, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x49, 0x75, 0x6e, 0x2e, 0x3b, 0x49, 0x75, 0x6c, 0x2e, 0x3b, 0x2bb, 0x41, 0x75, 0x2e,
+0x3b, 0x4b, 0x65, 0x70, 0x2e, 0x3b, 0x2bb, 0x4f, 0x6b, 0x2e, 0x3b, 0x4e, 0x6f, 0x77, 0x2e, 0x3b, 0x4b, 0x65, 0x6b, 0x2e,
+0x3b, 0x49, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x50, 0x65, 0x70, 0x65, 0x6c, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x4d,
+0x61, 0x6c, 0x61, 0x6b, 0x69, 0x3b, 0x2bb, 0x41, 0x70, 0x65, 0x6c, 0x69, 0x6c, 0x61, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x49,
+0x75, 0x6e, 0x65, 0x3b, 0x49, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x2bb, 0x41, 0x75, 0x6b, 0x61, 0x6b, 0x65, 0x3b, 0x4b, 0x65,
+0x70, 0x61, 0x6b, 0x65, 0x6d, 0x61, 0x70, 0x61, 0x3b, 0x2bb, 0x4f, 0x6b, 0x61, 0x6b, 0x6f, 0x70, 0x61, 0x3b, 0x4e, 0x6f,
+0x77, 0x65, 0x6d, 0x61, 0x70, 0x61, 0x3b, 0x4b, 0x65, 0x6b, 0x65, 0x6d, 0x61, 0x70, 0x61, 0x3b, 0x45, 0x6e, 0x65, 0x3b,
+0x50, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x62, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x48, 0x75, 0x6e, 0x3b,
+0x48, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x62, 0x3b,
+0x44, 0x69, 0x73, 0x3b, 0x45, 0x6e, 0x65, 0x72, 0x6f, 0x3b, 0x50, 0x65, 0x62, 0x72, 0x65, 0x72, 0x6f, 0x3b, 0x4d, 0x61,
+0x72, 0x73, 0x6f, 0x3b, 0x41, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x79, 0x6f, 0x3b, 0x48, 0x75, 0x6e, 0x79, 0x6f,
+0x3b, 0x48, 0x75, 0x6c, 0x79, 0x6f, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x79, 0x65, 0x6d,
+0x62, 0x72, 0x65, 0x3b, 0x4f, 0x6b, 0x74, 0x75, 0x62, 0x72, 0x65, 0x3b, 0x4e, 0x6f, 0x62, 0x79, 0x65, 0x6d, 0x62, 0x72,
+0x65, 0x3b, 0x44, 0x69, 0x73, 0x79, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x45, 0x3b, 0x50, 0x3b, 0x4d, 0x3b, 0x41, 0x3b,
+0x4d, 0x3b, 0x48, 0x75, 0x6e, 0x3b, 0x48, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x6b,
+0x74, 0x3b, 0x4e, 0x6f, 0x62, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b, 0x46, 0x65, 0x62,
+0x72, 0x75, 0x61, 0x72, 0x3b, 0x4d, 0xe4, 0x72, 0x7a, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x3b,
+0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x69, 0x3b, 0x41, 0x75, 0x67, 0x75, 0x73, 0x63, 0x68, 0x74, 0x3b, 0x53,
+0x65, 0x70, 0x74, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x4e, 0x6f,
+0x76, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44, 0x65, 0x7a, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0xa2cd, 0xa1aa, 0x3b, 0xa44d,
+0xa1aa, 0x3b, 0xa315, 0xa1aa, 0x3b, 0xa1d6, 0xa1aa, 0x3b, 0xa26c, 0xa1aa, 0x3b, 0xa0d8, 0xa1aa, 0x3b, 0xa3c3, 0xa1aa, 0x3b, 0xa246, 0xa1aa, 0x3b,
+0xa22c, 0xa1aa, 0x3b, 0xa2b0, 0xa1aa, 0x3b, 0xa2b0, 0xa2aa, 0xa1aa, 0x3b, 0xa2b0, 0xa44b, 0xa1aa, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x61,
+0x72, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x61, 0x72, 0x3b, 0x4d, 0xe4, 0x72, 0x7a, 0x3b, 0x41, 0x70, 0x72, 0x69,
0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x69, 0x3b, 0x41, 0x75, 0x67, 0x75,
-0x73, 0x63, 0x68, 0x74, 0x3b, 0x53, 0x65, 0x70, 0x74, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x6f,
-0x62, 0x65, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44, 0x65, 0x7a, 0xe4, 0x6d, 0x62, 0x65,
-0x72, 0x3b, 0xa2cd, 0xa1aa, 0x3b, 0xa44d, 0xa1aa, 0x3b, 0xa315, 0xa1aa, 0x3b, 0xa1d6, 0xa1aa, 0x3b, 0xa26c, 0xa1aa, 0x3b, 0xa0d8, 0xa1aa, 0x3b,
-0xa3c3, 0xa1aa, 0x3b, 0xa246, 0xa1aa, 0x3b, 0xa22c, 0xa1aa, 0x3b, 0xa2b0, 0xa1aa, 0x3b, 0xa2b0, 0xa2aa, 0xa1aa, 0x3b, 0xa2b0, 0xa44b, 0xa1aa, 0x3b,
-0x4a, 0x61, 0x6e, 0x75, 0x61, 0x61, 0x72, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x61, 0x72, 0x3b, 0x4d, 0xe4, 0x72,
-0x7a, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c,
-0x69, 0x3b, 0x41, 0x75, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4f,
-0x6b, 0x74, 0x6f, 0x76, 0x65, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44, 0x65, 0x7a, 0x65,
-0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6f, 0x111, 0x111, 0x6a, 0x3b, 0x67, 0x75, 0x6f, 0x76, 0x3b, 0x6e, 0x6a, 0x75, 0x6b, 0x3b,
-0x63, 0x75, 0x6f, 0x3b, 0x6d, 0x69, 0x65, 0x73, 0x3b, 0x67, 0x65, 0x61, 0x73, 0x3b, 0x73, 0x75, 0x6f, 0x69, 0x3b, 0x62,
-0x6f, 0x72, 0x67, 0x3b, 0x10d, 0x61, 0x6b, 0x10d, 0x3b, 0x67, 0x6f, 0x6c, 0x67, 0x3b, 0x73, 0x6b, 0xe1, 0x62, 0x3b, 0x6a,
-0x75, 0x6f, 0x76, 0x3b, 0x6f, 0x111, 0x111, 0x61, 0x6a, 0x61, 0x67, 0x65, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x67, 0x75,
-0x6f, 0x76, 0x76, 0x61, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x6e, 0x6a, 0x75, 0x6b, 0x10d, 0x61, 0x6d, 0xe1, 0x6e, 0x6e,
-0x75, 0x3b, 0x63, 0x75, 0x6f, 0x14b, 0x6f, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x6d, 0x69, 0x65, 0x73, 0x73, 0x65, 0x6d,
-0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x67, 0x65, 0x61, 0x73, 0x73, 0x65, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x73, 0x75, 0x6f,
-0x69, 0x64, 0x6e, 0x65, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x62, 0x6f, 0x72, 0x67, 0x65, 0x6d, 0xe1, 0x6e, 0x6e, 0x75,
-0x3b, 0x10d, 0x61, 0x6b, 0x10d, 0x61, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x67, 0x6f, 0x6c, 0x67, 0x67, 0x6f, 0x74, 0x6d,
-0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x73, 0x6b, 0xe1, 0x62, 0x6d, 0x61, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x6a, 0x75, 0x6f,
-0x76, 0x6c, 0x61, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x4f, 0x3b, 0x47, 0x3b, 0x4e, 0x3b, 0x43, 0x3b, 0x4d, 0x3b, 0x47,
-0x3b, 0x53, 0x3b, 0x42, 0x3b, 0x10c, 0x3b, 0x47, 0x3b, 0x53, 0x3b, 0x4a, 0x3b, 0x43, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62,
-0x3b, 0x4d, 0x61, 0x63, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x43, 0x75, 0x6c,
-0x3b, 0x41, 0x67, 0x74, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x62, 0x3b, 0x44, 0x69, 0x73,
-0x3b, 0x43, 0x68, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x75, 0x72, 0x61, 0x72, 0x69, 0x3b, 0x4d,
-0x61, 0x63, 0x68, 0x69, 0x3b, 0x41, 0x70, 0x69, 0x72, 0x69, 0x72, 0x69, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e,
-0x69, 0x3b, 0x43, 0x68, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74,
-0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x69, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x62, 0x65, 0x6d, 0x62, 0x61,
-0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x43, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x4a,
-0x3b, 0x43, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x49, 0x6d, 0x62, 0x3b, 0x4b, 0x61, 0x77,
-0x3b, 0x4b, 0x61, 0x64, 0x3b, 0x4b, 0x61, 0x6e, 0x3b, 0x4b, 0x61, 0x73, 0x3b, 0x4b, 0x61, 0x72, 0x3b, 0x4d, 0x66, 0x75,
-0x3b, 0x57, 0x75, 0x6e, 0x3b, 0x49, 0x6b, 0x65, 0x3b, 0x49, 0x6b, 0x75, 0x3b, 0x49, 0x6d, 0x77, 0x3b, 0x49, 0x77, 0x69,
-0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x69, 0x6d, 0x62, 0x69, 0x72, 0x69, 0x3b, 0x4d, 0x6f,
-0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x77, 0x69, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68,
-0x77, 0x61, 0x20, 0x6b, 0x61, 0x64, 0x61, 0x64, 0x75, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20,
-0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x73, 0x61, 0x6e,
-0x75, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x64,
-0x75, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6d, 0x66, 0x75, 0x6e, 0x67, 0x61, 0x64, 0x65,
-0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x77, 0x75, 0x6e, 0x79, 0x61, 0x6e, 0x79, 0x61, 0x3b,
-0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4d, 0x6f, 0x72,
-0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68,
-0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x69, 0x6d, 0x77, 0x65, 0x72, 0x69, 0x3b, 0x4d,
-0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x69, 0x77,
-0x69, 0x3b, 0x49, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4d, 0x3b, 0x57, 0x3b, 0x49, 0x3b,
-0x49, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x73, 0x69, 0x69, 0x3b, 0x63, 0x6f, 0x6c, 0x3b, 0x6d, 0x62, 0x6f, 0x3b, 0x73, 0x65,
-0x65, 0x3b, 0x64, 0x75, 0x75, 0x3b, 0x6b, 0x6f, 0x72, 0x3b, 0x6d, 0x6f, 0x72, 0x3b, 0x6a, 0x75, 0x6b, 0x3b, 0x73, 0x6c,
-0x74, 0x3b, 0x79, 0x61, 0x72, 0x3b, 0x6a, 0x6f, 0x6c, 0x3b, 0x62, 0x6f, 0x77, 0x3b, 0x73, 0x69, 0x69, 0x6c, 0x6f, 0x3b,
-0x63, 0x6f, 0x6c, 0x74, 0x65, 0x3b, 0x6d, 0x62, 0x6f, 0x6f, 0x79, 0x3b, 0x73, 0x65, 0x65, 0x257, 0x74, 0x6f, 0x3b, 0x64,
-0x75, 0x75, 0x6a, 0x61, 0x6c, 0x3b, 0x6b, 0x6f, 0x72, 0x73, 0x65, 0x3b, 0x6d, 0x6f, 0x72, 0x73, 0x6f, 0x3b, 0x6a, 0x75,
-0x6b, 0x6f, 0x3b, 0x73, 0x69, 0x69, 0x6c, 0x74, 0x6f, 0x3b, 0x79, 0x61, 0x72, 0x6b, 0x6f, 0x6d, 0x61, 0x61, 0x3b, 0x6a,
-0x6f, 0x6c, 0x61, 0x6c, 0x3b, 0x62, 0x6f, 0x77, 0x74, 0x65, 0x3b, 0x73, 0x3b, 0x63, 0x3b, 0x6d, 0x3b, 0x73, 0x3b, 0x64,
-0x3b, 0x6b, 0x3b, 0x6d, 0x3b, 0x6a, 0x3b, 0x73, 0x3b, 0x79, 0x3b, 0x6a, 0x3b, 0x62, 0x3b, 0x4a, 0x45, 0x4e, 0x3b, 0x57,
-0x4b, 0x52, 0x3b, 0x57, 0x47, 0x54, 0x3b, 0x57, 0x4b, 0x4e, 0x3b, 0x57, 0x54, 0x4e, 0x3b, 0x57, 0x54, 0x44, 0x3b, 0x57,
-0x4d, 0x4a, 0x3b, 0x57, 0x4e, 0x4e, 0x3b, 0x57, 0x4b, 0x44, 0x3b, 0x57, 0x49, 0x4b, 0x3b, 0x57, 0x4d, 0x57, 0x3b, 0x44,
-0x49, 0x54, 0x3b, 0x4e, 0x6a, 0x65, 0x6e, 0x75, 0x61, 0x72, 0x129, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61,
-0x20, 0x6b, 0x65, 0x72, 0x129, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x74,
-0x169, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72,
-0x65, 0x20, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61,
-0x20, 0x67, 0x61, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20,
-0x6d, 0x169, 0x67, 0x77, 0x61, 0x6e, 0x6a, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61,
-0x6e, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x65, 0x6e, 0x64, 0x61, 0x3b,
-0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x169, 0x6d, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65,
-0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x169, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x169, 0x6d, 0x77, 0x65, 0x3b, 0x4e, 0x64,
-0x69, 0x74, 0x68, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x3b, 0x4b, 0x3b, 0x47, 0x3b, 0x4b, 0x3b, 0x47, 0x3b, 0x47, 0x3b,
-0x4d, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x44, 0x3b, 0x4f, 0x62, 0x6f, 0x3b, 0x57, 0x61, 0x61, 0x3b,
-0x4f, 0x6b, 0x75, 0x3b, 0x4f, 0x6e, 0x67, 0x3b, 0x49, 0x6d, 0x65, 0x3b, 0x49, 0x6c, 0x65, 0x3b, 0x53, 0x61, 0x70, 0x3b,
-0x49, 0x73, 0x69, 0x3b, 0x53, 0x61, 0x61, 0x3b, 0x54, 0x6f, 0x6d, 0x3b, 0x54, 0x6f, 0x62, 0x3b, 0x54, 0x6f, 0x77, 0x3b,
-0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x6f, 0x62, 0x6f, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20,
-0x77, 0x61, 0x61, 0x72, 0x65, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x6f, 0x6b, 0x75, 0x6e, 0x69, 0x3b,
-0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x6f, 0x6e, 0x67, 0x2019, 0x77, 0x61, 0x6e, 0x3b, 0x4c, 0x61, 0x70, 0x61,
-0x20, 0x6c, 0x65, 0x20, 0x69, 0x6d, 0x65, 0x74, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x69, 0x6c, 0x65,
-0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x73, 0x61, 0x70, 0x61, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c,
-0x65, 0x20, 0x69, 0x73, 0x69, 0x65, 0x74, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x73, 0x61, 0x61, 0x6c,
-0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x6d, 0x6f, 0x6e, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20,
-0x6c, 0x65, 0x20, 0x74, 0x6f, 0x6d, 0x6f, 0x6e, 0x20, 0x6f, 0x62, 0x6f, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65,
-0x20, 0x74, 0x6f, 0x6d, 0x6f, 0x6e, 0x20, 0x77, 0x61, 0x61, 0x72, 0x65, 0x3b, 0x4f, 0x3b, 0x57, 0x3b, 0x4f, 0x3b, 0x4f,
-0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x53, 0x3b, 0x49, 0x3b, 0x53, 0x3b, 0x54, 0x3b, 0x54, 0x3b, 0x54, 0x3b, 0x4a, 0x61, 0x6e,
-0x3b, 0x46, 0x65, 0x76, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x62, 0x72, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e,
-0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x75, 0x67, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x74, 0x75, 0x3b, 0x4e, 0x6f, 0x76,
-0x3b, 0x44, 0x65, 0x63, 0x3b, 0x4a, 0x61, 0x6e, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x46, 0x65, 0x76, 0x72, 0x65, 0x69, 0x72,
-0x6f, 0x3b, 0x4d, 0x61, 0x72, 0x63, 0x6f, 0x3b, 0x41, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x6f, 0x3b, 0x4a,
-0x75, 0x6e, 0x68, 0x6f, 0x3b, 0x4a, 0x75, 0x6c, 0x68, 0x6f, 0x3b, 0x41, 0x75, 0x67, 0x75, 0x73, 0x74, 0x6f, 0x3b, 0x53,
-0x65, 0x74, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x4f, 0x74, 0x75, 0x62, 0x72, 0x6f, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d,
-0x62, 0x72, 0x6f, 0x3b, 0x44, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x5a, 0x69, 0x62, 0x3b, 0x4e, 0x68, 0x6c,
-0x6f, 0x3b, 0x4d, 0x62, 0x69, 0x3b, 0x4d, 0x61, 0x62, 0x3b, 0x4e, 0x6b, 0x77, 0x3b, 0x4e, 0x68, 0x6c, 0x61, 0x3b, 0x4e,
-0x74, 0x75, 0x3b, 0x4e, 0x63, 0x77, 0x3b, 0x4d, 0x70, 0x61, 0x6e, 0x3b, 0x4d, 0x66, 0x75, 0x3b, 0x4c, 0x77, 0x65, 0x3b,
-0x4d, 0x70, 0x61, 0x6c, 0x3b, 0x5a, 0x69, 0x62, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x6c, 0x61, 0x3b, 0x4e, 0x68, 0x6c, 0x6f,
-0x6c, 0x61, 0x6e, 0x6a, 0x61, 0x3b, 0x4d, 0x62, 0x69, 0x6d, 0x62, 0x69, 0x74, 0x68, 0x6f, 0x3b, 0x4d, 0x61, 0x62, 0x61,
-0x73, 0x61, 0x3b, 0x4e, 0x6b, 0x77, 0x65, 0x6e, 0x6b, 0x77, 0x65, 0x7a, 0x69, 0x3b, 0x4e, 0x68, 0x6c, 0x61, 0x6e, 0x67,
-0x75, 0x6c, 0x61, 0x3b, 0x4e, 0x74, 0x75, 0x6c, 0x69, 0x6b, 0x61, 0x7a, 0x69, 0x3b, 0x4e, 0x63, 0x77, 0x61, 0x62, 0x61,
-0x6b, 0x61, 0x7a, 0x69, 0x3b, 0x4d, 0x70, 0x61, 0x6e, 0x64, 0x75, 0x6c, 0x61, 0x3b, 0x4d, 0x66, 0x75, 0x6d, 0x66, 0x75,
-0x3b, 0x4c, 0x77, 0x65, 0x7a, 0x69, 0x3b, 0x4d, 0x70, 0x61, 0x6c, 0x61, 0x6b, 0x61, 0x7a, 0x69, 0x3b, 0x5a, 0x3b, 0x4e,
-0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x4c, 0x3b, 0x4d,
-0x3b, 0x4d, 0x31, 0x3b, 0x4d, 0x32, 0x3b, 0x4d, 0x33, 0x3b, 0x4d, 0x34, 0x3b, 0x4d, 0x35, 0x3b, 0x4d, 0x36, 0x3b, 0x4d,
-0x37, 0x3b, 0x4d, 0x38, 0x3b, 0x4d, 0x39, 0x3b, 0x4d, 0x31, 0x30, 0x3b, 0x4d, 0x31, 0x31, 0x3b, 0x4d, 0x31, 0x32, 0x3b,
-0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x77, 0x61, 0x6e, 0x7a, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72,
-0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x69, 0x6c, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20,
-0x6b, 0x61, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x61, 0x6e,
-0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x74, 0x61, 0x6e, 0x75, 0x3b, 0x4d, 0x77, 0x65, 0x72,
-0x69, 0x20, 0x77, 0x61, 0x20, 0x73, 0x69, 0x74, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x73,
-0x61, 0x62, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6e, 0x61, 0x6e, 0x65, 0x3b, 0x4d, 0x77,
-0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x74, 0x69, 0x73, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61,
-0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d,
-0x69, 0x20, 0x6e, 0x61, 0x20, 0x6d, 0x6f, 0x6a, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x69,
-0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x6d, 0x62, 0x69, 0x6c, 0x69, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b,
-0x4b, 0x3b, 0x54, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x4e, 0x3b, 0x54, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x2d49, 0x2d4f,
-0x2d4f, 0x3b, 0x2d31, 0x2d55, 0x2d30, 0x3b, 0x2d4e, 0x2d30, 0x2d55, 0x3b, 0x2d49, 0x2d31, 0x2d54, 0x3b, 0x2d4e, 0x2d30, 0x2d62, 0x3b, 0x2d62, 0x2d53,
-0x2d4f, 0x3b, 0x2d62, 0x2d53, 0x2d4d, 0x3b, 0x2d56, 0x2d53, 0x2d5b, 0x3b, 0x2d5b, 0x2d53, 0x2d5c, 0x3b, 0x2d3d, 0x2d5c, 0x2d53, 0x3b, 0x2d4f, 0x2d53,
-0x2d61, 0x3b, 0x2d37, 0x2d53, 0x2d4a, 0x3b, 0x2d49, 0x2d4f, 0x2d4f, 0x2d30, 0x2d62, 0x2d54, 0x3b, 0x2d31, 0x2d55, 0x2d30, 0x2d62, 0x2d55, 0x3b, 0x2d4e,
-0x2d30, 0x2d55, 0x2d5a, 0x3b, 0x2d49, 0x2d31, 0x2d54, 0x2d49, 0x2d54, 0x3b, 0x2d4e, 0x2d30, 0x2d62, 0x2d62, 0x2d53, 0x3b, 0x2d62, 0x2d53, 0x2d4f, 0x2d62,
-0x2d53, 0x3b, 0x2d62, 0x2d53, 0x2d4d, 0x2d62, 0x2d53, 0x2d63, 0x3b, 0x2d56, 0x2d53, 0x2d5b, 0x2d5c, 0x3b, 0x2d5b, 0x2d53, 0x2d5c, 0x2d30, 0x2d4f, 0x2d31,
-0x2d49, 0x2d54, 0x3b, 0x2d3d, 0x2d5c, 0x2d53, 0x2d31, 0x2d54, 0x3b, 0x2d4f, 0x2d53, 0x2d61, 0x2d30, 0x2d4f, 0x2d31, 0x2d49, 0x2d54, 0x3b, 0x2d37, 0x2d53,
-0x2d4a, 0x2d30, 0x2d4f, 0x2d31, 0x2d49, 0x2d54, 0x3b, 0x2d49, 0x3b, 0x2d31, 0x3b, 0x2d4e, 0x3b, 0x2d49, 0x3b, 0x2d4e, 0x3b, 0x2d62, 0x3b, 0x2d62,
-0x3b, 0x2d56, 0x3b, 0x2d5b, 0x3b, 0x2d3d, 0x3b, 0x2d4f, 0x3b, 0x2d37, 0x3b, 0x69, 0x6e, 0x6e, 0x3b, 0x62, 0x1e5b, 0x61, 0x3b, 0x6d,
-0x61, 0x1e5b, 0x3b, 0x69, 0x62, 0x72, 0x3b, 0x6d, 0x61, 0x79, 0x3b, 0x79, 0x75, 0x6e, 0x3b, 0x79, 0x75, 0x6c, 0x3b, 0x263,
-0x75, 0x63, 0x3b, 0x63, 0x75, 0x74, 0x3b, 0x6b, 0x74, 0x75, 0x3b, 0x6e, 0x75, 0x77, 0x3b, 0x64, 0x75, 0x6a, 0x3b, 0x69,
-0x6e, 0x6e, 0x61, 0x79, 0x72, 0x3b, 0x62, 0x1e5b, 0x61, 0x79, 0x1e5b, 0x3b, 0x6d, 0x61, 0x1e5b, 0x1e63, 0x3b, 0x69, 0x62, 0x72,
-0x69, 0x72, 0x3b, 0x6d, 0x61, 0x79, 0x79, 0x75, 0x3b, 0x79, 0x75, 0x6e, 0x79, 0x75, 0x3b, 0x79, 0x75, 0x6c, 0x79, 0x75,
-0x7a, 0x3b, 0x263, 0x75, 0x63, 0x74, 0x3b, 0x63, 0x75, 0x74, 0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b, 0x6b, 0x74, 0x75, 0x62,
-0x72, 0x3b, 0x6e, 0x75, 0x77, 0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b, 0x64, 0x75, 0x6a, 0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b,
-0x69, 0x3b, 0x62, 0x3b, 0x6d, 0x3b, 0x69, 0x3b, 0x6d, 0x3b, 0x79, 0x3b, 0x79, 0x3b, 0x263, 0x3b, 0x63, 0x3b, 0x6b, 0x3b,
-0x6e, 0x3b, 0x64, 0x3b, 0x59, 0x65, 0x6e, 0x3b, 0x46, 0x75, 0x72, 0x3b, 0x4d, 0x65, 0x263, 0x3b, 0x59, 0x65, 0x62, 0x3b,
-0x4d, 0x61, 0x79, 0x3b, 0x59, 0x75, 0x6e, 0x3b, 0x59, 0x75, 0x6c, 0x3b, 0x194, 0x75, 0x63, 0x3b, 0x43, 0x74, 0x65, 0x3b,
-0x54, 0x75, 0x62, 0x3b, 0x4e, 0x75, 0x6e, 0x3b, 0x44, 0x75, 0x1e7, 0x3b, 0x59, 0x65, 0x6e, 0x6e, 0x61, 0x79, 0x65, 0x72,
-0x3b, 0x46, 0x75, 0x1e5b, 0x61, 0x72, 0x3b, 0x4d, 0x65, 0x263, 0x72, 0x65, 0x73, 0x3b, 0x59, 0x65, 0x62, 0x72, 0x69, 0x72,
-0x3b, 0x4d, 0x61, 0x79, 0x79, 0x75, 0x3b, 0x59, 0x75, 0x6e, 0x79, 0x75, 0x3b, 0x59, 0x75, 0x6c, 0x79, 0x75, 0x3b, 0x194,
-0x75, 0x63, 0x74, 0x3b, 0x43, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x1e5b, 0x3b, 0x54, 0x75, 0x62, 0x65, 0x1e5b, 0x3b, 0x4e, 0x75,
-0x6e, 0x65, 0x6d, 0x62, 0x65, 0x1e5b, 0x3b, 0x44, 0x75, 0x1e7, 0x65, 0x6d, 0x62, 0x65, 0x1e5b, 0x3b, 0x59, 0x3b, 0x46, 0x3b,
-0x4d, 0x3b, 0x59, 0x3b, 0x4d, 0x3b, 0x59, 0x3b, 0x59, 0x3b, 0x194, 0x3b, 0x43, 0x3b, 0x54, 0x3b, 0x4e, 0x3b, 0x44, 0x3b,
-0x4b, 0x42, 0x5a, 0x3b, 0x4b, 0x42, 0x52, 0x3b, 0x4b, 0x53, 0x54, 0x3b, 0x4b, 0x4b, 0x4e, 0x3b, 0x4b, 0x54, 0x4e, 0x3b,
-0x4b, 0x4d, 0x4b, 0x3b, 0x4b, 0x4d, 0x53, 0x3b, 0x4b, 0x4d, 0x4e, 0x3b, 0x4b, 0x4d, 0x57, 0x3b, 0x4b, 0x4b, 0x4d, 0x3b,
-0x4b, 0x4e, 0x4b, 0x3b, 0x4b, 0x4e, 0x42, 0x3b, 0x4f, 0x6b, 0x77, 0x6f, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x7a, 0x61, 0x3b,
-0x4f, 0x6b, 0x77, 0x61, 0x6b, 0x61, 0x62, 0x69, 0x72, 0x69, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6b, 0x61, 0x73, 0x68, 0x61,
-0x74, 0x75, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6b, 0x61, 0x74, 0x61,
-0x61, 0x6e, 0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6d, 0x75, 0x6b, 0x61, 0x61, 0x67, 0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61,
-0x6d, 0x75, 0x73, 0x68, 0x61, 0x6e, 0x6a, 0x75, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6d, 0x75, 0x6e, 0x61, 0x61, 0x6e, 0x61,
-0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6d, 0x77, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x69, 0x6b, 0x75, 0x6d,
-0x69, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x6b, 0x75, 0x6d, 0x77, 0x65,
-0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x69, 0x62, 0x69, 0x72, 0x69, 0x3b,
-0x48, 0x75, 0x74, 0x3b, 0x56, 0x69, 0x6c, 0x3b, 0x44, 0x61, 0x74, 0x3b, 0x54, 0x61, 0x69, 0x3b, 0x48, 0x61, 0x6e, 0x3b,
-0x53, 0x69, 0x74, 0x3b, 0x53, 0x61, 0x62, 0x3b, 0x4e, 0x61, 0x6e, 0x3b, 0x54, 0x69, 0x73, 0x3b, 0x4b, 0x75, 0x6d, 0x3b,
-0x4b, 0x6d, 0x6a, 0x3b, 0x4b, 0x6d, 0x62, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77,
-0x61, 0x20, 0x68, 0x75, 0x74, 0x61, 0x6c, 0x61, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67,
-0x77, 0x61, 0x20, 0x77, 0x75, 0x76, 0x69, 0x6c, 0x69, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20,
-0x67, 0x77, 0x61, 0x20, 0x77, 0x75, 0x64, 0x61, 0x74, 0x75, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69,
-0x20, 0x67, 0x77, 0x61, 0x20, 0x77, 0x75, 0x74, 0x61, 0x69, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69,
-0x20, 0x67, 0x77, 0x61, 0x20, 0x77, 0x75, 0x68, 0x61, 0x6e, 0x75, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a,
-0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x73, 0x69, 0x74, 0x61, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69,
-0x20, 0x67, 0x77, 0x61, 0x20, 0x73, 0x61, 0x62, 0x61, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20,
-0x67, 0x77, 0x61, 0x20, 0x6e, 0x61, 0x6e, 0x65, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67,
-0x77, 0x61, 0x20, 0x74, 0x69, 0x73, 0x61, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77,
-0x61, 0x20, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61,
-0x20, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x6d, 0x6f, 0x6a, 0x61, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65,
-0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x6d, 0x62, 0x69, 0x6c,
-0x69, 0x3b, 0x48, 0x3b, 0x56, 0x3b, 0x44, 0x3b, 0x54, 0x3b, 0x48, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x4e, 0x3b, 0x54, 0x3b,
-0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x61,
-0x72, 0x69, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c, 0x79, 0x69, 0x3b, 0x4d, 0x65, 0x69,
-0x3b, 0x4a, 0x75, 0x6e, 0x79, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x79, 0x61, 0x69, 0x3b, 0x41, 0x67, 0x75, 0x73, 0x74, 0x69,
-0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76,
-0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x7a, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x62,
-0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x61, 0x77, 0x69, 0x3b, 0x6d, 0x25b, 0x3b, 0x7a, 0x75, 0x77, 0x3b, 0x7a, 0x75, 0x6c, 0x3b,
-0x75, 0x74, 0x69, 0x3b, 0x73, 0x25b, 0x74, 0x3b, 0x254, 0x6b, 0x75, 0x3b, 0x6e, 0x6f, 0x77, 0x3b, 0x64, 0x65, 0x73, 0x3b,
-0x7a, 0x61, 0x6e, 0x77, 0x75, 0x79, 0x65, 0x3b, 0x66, 0x65, 0x62, 0x75, 0x72, 0x75, 0x79, 0x65, 0x3b, 0x6d, 0x61, 0x72,
-0x69, 0x73, 0x69, 0x3b, 0x61, 0x77, 0x69, 0x72, 0x69, 0x6c, 0x69, 0x3b, 0x6d, 0x25b, 0x3b, 0x7a, 0x75, 0x77, 0x25b, 0x6e,
-0x3b, 0x7a, 0x75, 0x6c, 0x75, 0x79, 0x65, 0x3b, 0x75, 0x74, 0x69, 0x3b, 0x73, 0x25b, 0x74, 0x61, 0x6e, 0x62, 0x75, 0x72,
-0x75, 0x3b, 0x254, 0x6b, 0x75, 0x74, 0x254, 0x62, 0x75, 0x72, 0x75, 0x3b, 0x6e, 0x6f, 0x77, 0x61, 0x6e, 0x62, 0x75, 0x72,
-0x75, 0x3b, 0x64, 0x65, 0x73, 0x61, 0x6e, 0x62, 0x75, 0x72, 0x75, 0x3b, 0x5a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b,
-0x4d, 0x3b, 0x5a, 0x3b, 0x5a, 0x3b, 0x55, 0x3b, 0x53, 0x3b, 0x186, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x4d, 0x62, 0x65, 0x3b,
-0x4b, 0x61, 0x69, 0x3b, 0x4b, 0x61, 0x74, 0x3b, 0x4b, 0x61, 0x6e, 0x3b, 0x47, 0x61, 0x74, 0x3b, 0x47, 0x61, 0x6e, 0x3b,
-0x4d, 0x75, 0x67, 0x3b, 0x4b, 0x6e, 0x6e, 0x3b, 0x4b, 0x65, 0x6e, 0x3b, 0x49, 0x6b, 0x75, 0x3b, 0x49, 0x6d, 0x77, 0x3b,
-0x49, 0x67, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6d, 0x62, 0x65, 0x72, 0x65, 0x3b, 0x4d,
-0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x129, 0x72, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20,
-0x77, 0x61, 0x20, 0x6b, 0x61, 0x74, 0x68, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20,
-0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x6e, 0x6f,
-0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x6e, 0x74, 0x61, 0x74, 0x169, 0x3b,
-0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6d, 0x169, 0x67, 0x77, 0x61, 0x6e, 0x6a, 0x61, 0x3b, 0x4d, 0x77,
-0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20,
-0x77, 0x61, 0x20, 0x6b, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b,
-0x169, 0x6d, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x169, 0x6d, 0x69, 0x20, 0x6e,
-0x61, 0x20, 0x169, 0x6d, 0x77, 0x65, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x169, 0x6d,
-0x69, 0x20, 0x6e, 0x61, 0x20, 0x4b, 0x61, 0x129, 0x72, 0x129, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x47,
-0x3b, 0x47, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x13a4, 0x13c3, 0x3b, 0x13a7, 0x13a6,
-0x3b, 0x13a0, 0x13c5, 0x3b, 0x13a7, 0x13ec, 0x3b, 0x13a0, 0x13c2, 0x3b, 0x13d5, 0x13ad, 0x3b, 0x13ab, 0x13f0, 0x3b, 0x13a6, 0x13b6, 0x3b, 0x13da,
-0x13b5, 0x3b, 0x13da, 0x13c2, 0x3b, 0x13c5, 0x13d3, 0x3b, 0x13a5, 0x13cd, 0x3b, 0x13a4, 0x13c3, 0x13b8, 0x13d4, 0x13c5, 0x3b, 0x13a7, 0x13a6, 0x13b5,
-0x3b, 0x13a0, 0x13c5, 0x13f1, 0x3b, 0x13a7, 0x13ec, 0x13c2, 0x3b, 0x13a0, 0x13c2, 0x13cd, 0x13ac, 0x13d8, 0x3b, 0x13d5, 0x13ad, 0x13b7, 0x13f1, 0x3b,
-0x13ab, 0x13f0, 0x13c9, 0x13c2, 0x3b, 0x13a6, 0x13b6, 0x13c2, 0x3b, 0x13da, 0x13b5, 0x13cd, 0x13d7, 0x3b, 0x13da, 0x13c2, 0x13c5, 0x13d7, 0x3b, 0x13c5,
-0x13d3, 0x13d5, 0x13c6, 0x3b, 0x13a5, 0x13cd, 0x13a9, 0x13f1, 0x3b, 0x13a4, 0x3b, 0x13a7, 0x3b, 0x13a0, 0x3b, 0x13a7, 0x3b, 0x13a0, 0x3b, 0x13d5,
-0x3b, 0x13ab, 0x3b, 0x13a6, 0x3b, 0x13da, 0x3b, 0x13da, 0x3b, 0x13c5, 0x3b, 0x13a5, 0x3b, 0x7a, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x76,
-0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x61, 0x76, 0x72, 0x3b, 0x6d, 0x65, 0x3b, 0x7a, 0x69, 0x6e, 0x3b, 0x7a, 0x69, 0x6c, 0x3b,
-0x6f, 0x75, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x3b, 0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x76, 0x3b, 0x64, 0x65, 0x73, 0x3b,
-0x7a, 0x61, 0x6e, 0x76, 0x69, 0x65, 0x3b, 0x66, 0x65, 0x76, 0x72, 0x69, 0x79, 0x65, 0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b,
-0x61, 0x76, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x65, 0x3b, 0x7a, 0x69, 0x6e, 0x3b, 0x7a, 0x69, 0x6c, 0x79, 0x65, 0x3b, 0x6f,
-0x75, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x61, 0x6d, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x3b, 0x6e, 0x6f, 0x76, 0x61,
-0x6d, 0x3b, 0x64, 0x65, 0x73, 0x61, 0x6d, 0x3b, 0x7a, 0x3b, 0x66, 0x3b, 0x6d, 0x3b, 0x61, 0x3b, 0x6d, 0x3b, 0x7a, 0x3b,
-0x7a, 0x3b, 0x6f, 0x3b, 0x73, 0x3b, 0x6f, 0x3b, 0x6e, 0x3b, 0x64, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x4e, 0x74,
-0x61, 0x6e, 0x64, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x50, 0x69, 0x6c, 0x69, 0x3b, 0x4d,
-0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x54, 0x61, 0x74, 0x75, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77,
-0x61, 0x20, 0x4e, 0x63, 0x68, 0x65, 0x63, 0x68, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e,
-0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e,
-0x6f, 0x20, 0x6e, 0x61, 0x20, 0x55, 0x6d, 0x6f, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e,
-0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4d, 0x69, 0x76, 0x69, 0x6c, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69,
-0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4d, 0x69, 0x74, 0x61, 0x74, 0x75,
-0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20,
-0x4e, 0x63, 0x68, 0x65, 0x63, 0x68, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79,
-0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20,
-0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20,
-0x6e, 0x61, 0x20, 0x55, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f,
-0x20, 0x6e, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4d, 0x3b, 0x46, 0xfa, 0x6e, 0x67,
-0x61, 0x74, 0x268, 0x3b, 0x4e, 0x61, 0x61, 0x6e, 0x268, 0x3b, 0x4b, 0x65, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x49, 0x6b, 0xfa,
-0x6d, 0x69, 0x3b, 0x49, 0x6e, 0x79, 0x61, 0x6d, 0x62, 0x61, 0x6c, 0x61, 0x3b, 0x49, 0x64, 0x77, 0x61, 0x61, 0x74, 0x61,
-0x3b, 0x4d, 0x289, 0x289, 0x6e, 0x63, 0x68, 0x268, 0x3b, 0x56, 0x268, 0x268, 0x72, 0x268, 0x3b, 0x53, 0x61, 0x61, 0x74, 0x289,
-0x3b, 0x49, 0x6e, 0x79, 0x69, 0x3b, 0x53, 0x61, 0x61, 0x6e, 0x6f, 0x3b, 0x53, 0x61, 0x73, 0x61, 0x74, 0x289, 0x3b, 0x4b,
-0x289, 0x66, 0xfa, 0x6e, 0x67, 0x61, 0x74, 0x268, 0x3b, 0x4b, 0x289, 0x6e, 0x61, 0x61, 0x6e, 0x268, 0x3b, 0x4b, 0x289, 0x6b,
-0x65, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4b, 0x77, 0x69, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x4b, 0x77, 0x69, 0x69, 0x6e,
-0x79, 0x61, 0x6d, 0x62, 0xe1, 0x6c, 0x61, 0x3b, 0x4b, 0x77, 0x69, 0x69, 0x64, 0x77, 0x61, 0x61, 0x74, 0x61, 0x3b, 0x4b,
-0x289, 0x6d, 0x289, 0x289, 0x6e, 0x63, 0x68, 0x268, 0x3b, 0x4b, 0x289, 0x76, 0x268, 0x268, 0x72, 0x268, 0x3b, 0x4b, 0x289, 0x73,
-0x61, 0x61, 0x74, 0x289, 0x3b, 0x4b, 0x77, 0x69, 0x69, 0x6e, 0x79, 0x69, 0x3b, 0x4b, 0x289, 0x73, 0x61, 0x61, 0x6e, 0x6f,
-0x3b, 0x4b, 0x289, 0x73, 0x61, 0x73, 0x61, 0x74, 0x289, 0x3b, 0x46, 0x3b, 0x4e, 0x3b, 0x4b, 0x3b, 0x49, 0x3b, 0x49, 0x3b,
-0x49, 0x3b, 0x4d, 0x3b, 0x56, 0x3b, 0x53, 0x3b, 0x49, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65,
-0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x70, 0x75, 0x3b, 0x4d, 0x61, 0x61, 0x3b, 0x4a, 0x75, 0x75, 0x3b, 0x4a, 0x75,
-0x6c, 0x3b, 0x41, 0x67, 0x75, 0x3b, 0x53, 0x65, 0x62, 0x3b, 0x4f, 0x6b, 0x69, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65,
-0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x77, 0x61, 0x6c, 0x69, 0x79, 0x6f, 0x3b, 0x46, 0x65, 0x62, 0x77, 0x61, 0x6c, 0x69, 0x79,
-0x6f, 0x3b, 0x4d, 0x61, 0x72, 0x69, 0x73, 0x69, 0x3b, 0x41, 0x70, 0x75, 0x6c, 0x69, 0x3b, 0x4d, 0x61, 0x61, 0x79, 0x69,
-0x3b, 0x4a, 0x75, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x61, 0x79, 0x69, 0x3b, 0x41, 0x67, 0x75, 0x73, 0x69,
-0x74, 0x6f, 0x3b, 0x53, 0x65, 0x62, 0x75, 0x74, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x69, 0x74, 0x6f, 0x62,
-0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a,
-0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x63, 0x3b, 0x45, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a,
-0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x4f, 0x67, 0x61, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e,
-0x6f, 0x76, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75,
-0x61, 0x72, 0x69, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x45, 0x70, 0x72, 0x65, 0x6f, 0x3b, 0x4d, 0x65, 0x69, 0x3b,
-0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x4f, 0x67, 0x61, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65,
-0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62,
-0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x45, 0x3b, 0x4d, 0x3b,
-0x4a, 0x3b, 0x4a, 0x3b, 0x4f, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65,
-0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x62, 0x72, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75,
-0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x74, 0x75, 0x3b, 0x4e, 0x75, 0x76, 0x3b, 0x44, 0x69,
-0x7a, 0x3b, 0x4a, 0x61, 0x6e, 0x65, 0x72, 0x75, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x65, 0x72, 0x75, 0x3b, 0x4d, 0x61, 0x72,
-0x73, 0x75, 0x3b, 0x41, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x75, 0x3b, 0x4a, 0x75, 0x6e, 0x68, 0x75, 0x3b,
-0x4a, 0x75, 0x6c, 0x68, 0x75, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x75, 0x3b, 0x53, 0x65, 0x74, 0x65, 0x6e, 0x62, 0x72,
-0x75, 0x3b, 0x4f, 0x74, 0x75, 0x62, 0x72, 0x75, 0x3b, 0x4e, 0x75, 0x76, 0x65, 0x6e, 0x62, 0x72, 0x75, 0x3b, 0x44, 0x69,
-0x7a, 0x65, 0x6e, 0x62, 0x72, 0x75, 0x3b, 0x4a, 0x41, 0x4e, 0x3b, 0x46, 0x45, 0x42, 0x3b, 0x4d, 0x41, 0x43, 0x3b, 0x128,
-0x50, 0x55, 0x3b, 0x4d, 0x128, 0x128, 0x3b, 0x4e, 0x4a, 0x55, 0x3b, 0x4e, 0x4a, 0x52, 0x3b, 0x41, 0x47, 0x41, 0x3b, 0x53,
-0x50, 0x54, 0x3b, 0x4f, 0x4b, 0x54, 0x3b, 0x4e, 0x4f, 0x56, 0x3b, 0x44, 0x45, 0x43, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61,
-0x72, 0x129, 0x3b, 0x46, 0x65, 0x62, 0x75, 0x72, 0x75, 0x61, 0x72, 0x129, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x128,
-0x70, 0x75, 0x72, 0x169, 0x3b, 0x4d, 0x129, 0x129, 0x3b, 0x4e, 0x6a, 0x75, 0x6e, 0x69, 0x3b, 0x4e, 0x6a, 0x75, 0x72, 0x61,
-0x129, 0x3b, 0x41, 0x67, 0x61, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b,
-0x74, 0x169, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x63, 0x65, 0x6d, 0x62, 0x61,
-0x3b, 0x4a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x128, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f,
-0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x4d, 0x75, 0x6c, 0x3b, 0x4e, 0x67, 0x61, 0x74, 0x3b, 0x54, 0x61, 0x61, 0x3b, 0x49, 0x77,
-0x6f, 0x3b, 0x4d, 0x61, 0x6d, 0x3b, 0x50, 0x61, 0x61, 0x3b, 0x4e, 0x67, 0x65, 0x3b, 0x52, 0x6f, 0x6f, 0x3b, 0x42, 0x75,
-0x72, 0x3b, 0x45, 0x70, 0x65, 0x3b, 0x4b, 0x70, 0x74, 0x3b, 0x4b, 0x70, 0x61, 0x3b, 0x4d, 0x75, 0x6c, 0x67, 0x75, 0x6c,
-0x3b, 0x4e, 0x67, 0x2019, 0x61, 0x74, 0x79, 0x61, 0x61, 0x74, 0x6f, 0x3b, 0x4b, 0x69, 0x70, 0x74, 0x61, 0x61, 0x6d, 0x6f,
-0x3b, 0x49, 0x77, 0x6f, 0x6f, 0x74, 0x6b, 0x75, 0x75, 0x74, 0x3b, 0x4d, 0x61, 0x6d, 0x75, 0x75, 0x74, 0x3b, 0x50, 0x61,
-0x61, 0x67, 0x69, 0x3b, 0x4e, 0x67, 0x2019, 0x65, 0x69, 0x79, 0x65, 0x65, 0x74, 0x3b, 0x52, 0x6f, 0x6f, 0x70, 0x74, 0x75,
-0x69, 0x3b, 0x42, 0x75, 0x72, 0x65, 0x65, 0x74, 0x3b, 0x45, 0x70, 0x65, 0x65, 0x73, 0x6f, 0x3b, 0x4b, 0x69, 0x70, 0x73,
-0x75, 0x75, 0x6e, 0x64, 0x65, 0x20, 0x6e, 0x65, 0x20, 0x74, 0x61, 0x61, 0x69, 0x3b, 0x4b, 0x69, 0x70, 0x73, 0x75, 0x75,
-0x6e, 0x64, 0x65, 0x20, 0x6e, 0x65, 0x62, 0x6f, 0x20, 0x61, 0x65, 0x6e, 0x67, 0x2019, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x54,
-0x3b, 0x49, 0x3b, 0x4d, 0x3b, 0x50, 0x3b, 0x4e, 0x3b, 0x52, 0x3b, 0x42, 0x3b, 0x45, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x1c3,
-0x4b, 0x68, 0x61, 0x6e, 0x6e, 0x69, 0x3b, 0x1c3, 0x4b, 0x68, 0x61, 0x6e, 0x1c0, 0x67, 0xf4, 0x61, 0x62, 0x3b, 0x1c0, 0x4b,
-0x68, 0x75, 0x75, 0x1c1, 0x6b, 0x68, 0xe2, 0x62, 0x3b, 0x1c3, 0x48, 0xf4, 0x61, 0x1c2, 0x6b, 0x68, 0x61, 0x69, 0x62, 0x3b,
-0x1c3, 0x4b, 0x68, 0x61, 0x69, 0x74, 0x73, 0xe2, 0x62, 0x3b, 0x47, 0x61, 0x6d, 0x61, 0x1c0, 0x61, 0x65, 0x62, 0x3b, 0x1c2,
-0x4b, 0x68, 0x6f, 0x65, 0x73, 0x61, 0x6f, 0x62, 0x3b, 0x41, 0x6f, 0x1c1, 0x6b, 0x68, 0x75, 0x75, 0x6d, 0xfb, 0x1c1, 0x6b,
-0x68, 0xe2, 0x62, 0x3b, 0x54, 0x61, 0x72, 0x61, 0x1c0, 0x6b, 0x68, 0x75, 0x75, 0x6d, 0xfb, 0x1c1, 0x6b, 0x68, 0xe2, 0x62,
-0x3b, 0x1c2, 0x4e, 0xfb, 0x1c1, 0x6e, 0xe2, 0x69, 0x73, 0x65, 0x62, 0x3b, 0x1c0, 0x48, 0x6f, 0x6f, 0x1c2, 0x67, 0x61, 0x65,
-0x62, 0x3b, 0x48, 0xf4, 0x61, 0x73, 0x6f, 0x72, 0x65, 0x1c1, 0x6b, 0x68, 0xe2, 0x62, 0x3b, 0x4a, 0x61, 0x6e, 0x2e, 0x3b,
-0x46, 0xe4, 0x62, 0x2e, 0x3b, 0x4d, 0xe4, 0x7a, 0x2e, 0x3b, 0x41, 0x70, 0x72, 0x2e, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a,
-0x75, 0x6e, 0x2e, 0x3b, 0x4a, 0x75, 0x6c, 0x2e, 0x3b, 0x4f, 0x75, 0x6a, 0x2e, 0x3b, 0x53, 0xe4, 0x70, 0x2e, 0x3b, 0x4f,
-0x6b, 0x74, 0x2e, 0x3b, 0x4e, 0x6f, 0x76, 0x2e, 0x3b, 0x44, 0x65, 0x7a, 0x2e, 0x3b, 0x4a, 0x61, 0x6e, 0x6e, 0x65, 0x77,
-0x61, 0x3b, 0x46, 0xe4, 0x62, 0x72, 0x6f, 0x77, 0x61, 0x3b, 0x4d, 0xe4, 0xe4, 0x7a, 0x3b, 0x41, 0x70, 0x72, 0x65, 0x6c,
-0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x75, 0x6c, 0x69, 0x3b, 0x4f, 0x75,
-0x6a, 0x6f, 0xdf, 0x3b, 0x53, 0x65, 0x70, 0x74, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x68, 0x62,
-0x65, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44, 0x65, 0x7a, 0xe4, 0x6d, 0x62, 0x65, 0x72,
-0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0xe4, 0x62, 0x3b, 0x4d, 0xe4, 0x7a, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x61, 0x69,
-0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x4f, 0x75, 0x6a, 0x3b, 0x53, 0xe4, 0x70, 0x3b, 0x4f, 0x6b, 0x74,
-0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x7a, 0x3b, 0x44, 0x61, 0x6c, 0x3b, 0x41, 0x72, 0xe1, 0x3b, 0x186, 0x25b, 0x6e,
-0x3b, 0x44, 0x6f, 0x79, 0x3b, 0x4c, 0xe9, 0x70, 0x3b, 0x52, 0x6f, 0x6b, 0x3b, 0x53, 0xe1, 0x73, 0x3b, 0x42, 0x254, 0x301,
-0x72, 0x3b, 0x4b, 0xfa, 0x73, 0x3b, 0x47, 0xed, 0x73, 0x3b, 0x53, 0x68, 0x289, 0x301, 0x3b, 0x4e, 0x74, 0x289, 0x301, 0x3b,
-0x4f, 0x6c, 0x61, 0x64, 0x61, 0x6c, 0x289, 0x301, 0x3b, 0x41, 0x72, 0xe1, 0x74, 0x3b, 0x186, 0x25b, 0x6e, 0x268, 0x301, 0x254,
-0x268, 0x14b, 0x254, 0x6b, 0x3b, 0x4f, 0x6c, 0x6f, 0x64, 0x6f, 0x79, 0xed, 0xf3, 0x72, 0xed, 0xea, 0x20, 0x69, 0x6e, 0x6b,
-0xf3, 0x6b, 0xfa, 0xe2, 0x3b, 0x4f, 0x6c, 0x6f, 0x69, 0x6c, 0xe9, 0x70, 0x16b, 0x6e, 0x79, 0x12b, 0x113, 0x20, 0x69, 0x6e,
-0x6b, 0xf3, 0x6b, 0xfa, 0xe2, 0x3b, 0x4b, 0xfa, 0x6a, 0xfa, 0x254, 0x72, 0x254, 0x6b, 0x3b, 0x4d, 0xf3, 0x72, 0x75, 0x73,
-0xe1, 0x73, 0x69, 0x6e, 0x3b, 0x186, 0x6c, 0x254, 0x301, 0x268, 0x301, 0x62, 0x254, 0x301, 0x72, 0xe1, 0x72, 0x25b, 0x3b, 0x4b,
-0xfa, 0x73, 0x68, 0xee, 0x6e, 0x3b, 0x4f, 0x6c, 0x67, 0xed, 0x73, 0x61, 0x6e, 0x3b, 0x50, 0x289, 0x73, 0x68, 0x289, 0x301,
-0x6b, 0x61, 0x3b, 0x4e, 0x74, 0x289, 0x301, 0x14b, 0x289, 0x301, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b,
-0x4d, 0x61, 0x72, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b,
-0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x73, 0x3b,
-0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x63, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x69, 0x3b,
+0x73, 0x74, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x76, 0x65, 0x72,
+0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44, 0x65, 0x7a, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6f,
+0x111, 0x111, 0x6a, 0x3b, 0x67, 0x75, 0x6f, 0x76, 0x3b, 0x6e, 0x6a, 0x75, 0x6b, 0x3b, 0x63, 0x75, 0x6f, 0x3b, 0x6d, 0x69,
+0x65, 0x73, 0x3b, 0x67, 0x65, 0x61, 0x73, 0x3b, 0x73, 0x75, 0x6f, 0x69, 0x3b, 0x62, 0x6f, 0x72, 0x67, 0x3b, 0x10d, 0x61,
+0x6b, 0x10d, 0x3b, 0x67, 0x6f, 0x6c, 0x67, 0x3b, 0x73, 0x6b, 0xe1, 0x62, 0x3b, 0x6a, 0x75, 0x6f, 0x76, 0x3b, 0x6f, 0x111,
+0x111, 0x61, 0x6a, 0x61, 0x67, 0x65, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x67, 0x75, 0x6f, 0x76, 0x76, 0x61, 0x6d, 0xe1,
+0x6e, 0x6e, 0x75, 0x3b, 0x6e, 0x6a, 0x75, 0x6b, 0x10d, 0x61, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x63, 0x75, 0x6f, 0x14b,
+0x6f, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x6d, 0x69, 0x65, 0x73, 0x73, 0x65, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x67,
+0x65, 0x61, 0x73, 0x73, 0x65, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x73, 0x75, 0x6f, 0x69, 0x64, 0x6e, 0x65, 0x6d, 0xe1,
+0x6e, 0x6e, 0x75, 0x3b, 0x62, 0x6f, 0x72, 0x67, 0x65, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x10d, 0x61, 0x6b, 0x10d, 0x61,
+0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x67, 0x6f, 0x6c, 0x67, 0x67, 0x6f, 0x74, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x73,
+0x6b, 0xe1, 0x62, 0x6d, 0x61, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x6a, 0x75, 0x6f, 0x76, 0x6c, 0x61, 0x6d, 0xe1, 0x6e,
+0x6e, 0x75, 0x3b, 0x4f, 0x3b, 0x47, 0x3b, 0x4e, 0x3b, 0x43, 0x3b, 0x4d, 0x3b, 0x47, 0x3b, 0x53, 0x3b, 0x42, 0x3b, 0x10c,
+0x3b, 0x47, 0x3b, 0x53, 0x3b, 0x4a, 0x3b, 0x6f, 0x111, 0x111, 0x6a, 0x3b, 0x67, 0x75, 0x6f, 0x76, 0x3b, 0x6e, 0x6a, 0x75,
+0x6b, 0x3b, 0x63, 0x75, 0x6f, 0x14b, 0x3b, 0x6d, 0x69, 0x65, 0x73, 0x3b, 0x67, 0x65, 0x61, 0x73, 0x3b, 0x73, 0x75, 0x6f,
+0x69, 0x3b, 0x62, 0x6f, 0x72, 0x67, 0x3b, 0x10d, 0x61, 0x6b, 0x10d, 0x3b, 0x67, 0x6f, 0x6c, 0x67, 0x3b, 0x73, 0x6b, 0xe1,
+0x62, 0x3b, 0x6a, 0x75, 0x6f, 0x76, 0x3b, 0x43, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x63, 0x3b, 0x41,
+0x70, 0x72, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x43, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x74, 0x3b, 0x53,
+0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x62, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x43, 0x68, 0x61, 0x6e, 0x75,
+0x61, 0x72, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x75, 0x72, 0x61, 0x72, 0x69, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x41,
+0x70, 0x69, 0x72, 0x69, 0x72, 0x69, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x43, 0x68, 0x75, 0x6c,
+0x61, 0x69, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f,
+0x6b, 0x69, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x62, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d,
+0x62, 0x61, 0x3b, 0x43, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x43, 0x3b, 0x41, 0x3b, 0x53,
+0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x49, 0x6d, 0x62, 0x3b, 0x4b, 0x61, 0x77, 0x3b, 0x4b, 0x61, 0x64, 0x3b, 0x4b,
+0x61, 0x6e, 0x3b, 0x4b, 0x61, 0x73, 0x3b, 0x4b, 0x61, 0x72, 0x3b, 0x4d, 0x66, 0x75, 0x3b, 0x57, 0x75, 0x6e, 0x3b, 0x49,
+0x6b, 0x65, 0x3b, 0x49, 0x6b, 0x75, 0x3b, 0x49, 0x6d, 0x77, 0x3b, 0x49, 0x77, 0x69, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20,
+0x67, 0x68, 0x77, 0x61, 0x20, 0x69, 0x6d, 0x62, 0x69, 0x72, 0x69, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77,
+0x61, 0x20, 0x6b, 0x61, 0x77, 0x69, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x64,
+0x61, 0x64, 0x75, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4d,
+0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x73, 0x61, 0x6e, 0x75, 0x3b, 0x4d, 0x6f, 0x72, 0x69,
+0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x64, 0x75, 0x3b, 0x4d, 0x6f, 0x72, 0x69,
+0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6d, 0x66, 0x75, 0x6e, 0x67, 0x61, 0x64, 0x65, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20,
+0x67, 0x68, 0x77, 0x61, 0x20, 0x77, 0x75, 0x6e, 0x79, 0x61, 0x6e, 0x79, 0x61, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67,
+0x68, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61,
+0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75,
+0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x69, 0x6d, 0x77, 0x65, 0x72, 0x69, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68,
+0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x69, 0x77, 0x69, 0x3b, 0x49, 0x3b, 0x4b, 0x3b,
+0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4d, 0x3b, 0x57, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x49, 0x3b,
+0x73, 0x69, 0x69, 0x3b, 0x63, 0x6f, 0x6c, 0x3b, 0x6d, 0x62, 0x6f, 0x3b, 0x73, 0x65, 0x65, 0x3b, 0x64, 0x75, 0x75, 0x3b,
+0x6b, 0x6f, 0x72, 0x3b, 0x6d, 0x6f, 0x72, 0x3b, 0x6a, 0x75, 0x6b, 0x3b, 0x73, 0x6c, 0x74, 0x3b, 0x79, 0x61, 0x72, 0x3b,
+0x6a, 0x6f, 0x6c, 0x3b, 0x62, 0x6f, 0x77, 0x3b, 0x73, 0x69, 0x69, 0x6c, 0x6f, 0x3b, 0x63, 0x6f, 0x6c, 0x74, 0x65, 0x3b,
+0x6d, 0x62, 0x6f, 0x6f, 0x79, 0x3b, 0x73, 0x65, 0x65, 0x257, 0x74, 0x6f, 0x3b, 0x64, 0x75, 0x75, 0x6a, 0x61, 0x6c, 0x3b,
+0x6b, 0x6f, 0x72, 0x73, 0x65, 0x3b, 0x6d, 0x6f, 0x72, 0x73, 0x6f, 0x3b, 0x6a, 0x75, 0x6b, 0x6f, 0x3b, 0x73, 0x69, 0x69,
+0x6c, 0x74, 0x6f, 0x3b, 0x79, 0x61, 0x72, 0x6b, 0x6f, 0x6d, 0x61, 0x61, 0x3b, 0x6a, 0x6f, 0x6c, 0x61, 0x6c, 0x3b, 0x62,
+0x6f, 0x77, 0x74, 0x65, 0x3b, 0x73, 0x3b, 0x63, 0x3b, 0x6d, 0x3b, 0x73, 0x3b, 0x64, 0x3b, 0x6b, 0x3b, 0x6d, 0x3b, 0x6a,
+0x3b, 0x73, 0x3b, 0x79, 0x3b, 0x6a, 0x3b, 0x62, 0x3b, 0x4a, 0x45, 0x4e, 0x3b, 0x57, 0x4b, 0x52, 0x3b, 0x57, 0x47, 0x54,
+0x3b, 0x57, 0x4b, 0x4e, 0x3b, 0x57, 0x54, 0x4e, 0x3b, 0x57, 0x54, 0x44, 0x3b, 0x57, 0x4d, 0x4a, 0x3b, 0x57, 0x4e, 0x4e,
+0x3b, 0x57, 0x4b, 0x44, 0x3b, 0x57, 0x49, 0x4b, 0x3b, 0x57, 0x4d, 0x57, 0x3b, 0x44, 0x49, 0x54, 0x3b, 0x4e, 0x6a, 0x65,
+0x6e, 0x75, 0x61, 0x72, 0x129, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x65, 0x72, 0x129, 0x3b,
+0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x65, 0x72,
+0x65, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x67,
+0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x6e,
+0x64, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x6d, 0x169, 0x67, 0x77, 0x61, 0x6e,
+0x6a, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x6e, 0x61, 0x3b, 0x4d,
+0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20,
+0x77, 0x61, 0x20, 0x69, 0x6b, 0x169, 0x6d, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b,
+0x169, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x169, 0x6d, 0x77, 0x65, 0x3b, 0x4e, 0x64, 0x69, 0x74, 0x68, 0x65, 0x6d, 0x62,
+0x61, 0x3b, 0x4a, 0x3b, 0x4b, 0x3b, 0x47, 0x3b, 0x4b, 0x3b, 0x47, 0x3b, 0x47, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b,
+0x49, 0x3b, 0x49, 0x3b, 0x44, 0x3b, 0x4f, 0x62, 0x6f, 0x3b, 0x57, 0x61, 0x61, 0x3b, 0x4f, 0x6b, 0x75, 0x3b, 0x4f, 0x6e,
+0x67, 0x3b, 0x49, 0x6d, 0x65, 0x3b, 0x49, 0x6c, 0x65, 0x3b, 0x53, 0x61, 0x70, 0x3b, 0x49, 0x73, 0x69, 0x3b, 0x53, 0x61,
+0x61, 0x3b, 0x54, 0x6f, 0x6d, 0x3b, 0x54, 0x6f, 0x62, 0x3b, 0x54, 0x6f, 0x77, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c,
+0x65, 0x20, 0x6f, 0x62, 0x6f, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x77, 0x61, 0x61, 0x72, 0x65, 0x3b,
+0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x6f, 0x6b, 0x75, 0x6e, 0x69, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c,
+0x65, 0x20, 0x6f, 0x6e, 0x67, 0x2019, 0x77, 0x61, 0x6e, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x69, 0x6d,
+0x65, 0x74, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x69, 0x6c, 0x65, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20,
+0x6c, 0x65, 0x20, 0x73, 0x61, 0x70, 0x61, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x69, 0x73, 0x69, 0x65,
+0x74, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x73, 0x61, 0x61, 0x6c, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20,
+0x6c, 0x65, 0x20, 0x74, 0x6f, 0x6d, 0x6f, 0x6e, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x6d,
+0x6f, 0x6e, 0x20, 0x6f, 0x62, 0x6f, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x6d, 0x6f, 0x6e,
+0x20, 0x77, 0x61, 0x61, 0x72, 0x65, 0x3b, 0x4f, 0x3b, 0x57, 0x3b, 0x4f, 0x3b, 0x4f, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x53,
+0x3b, 0x49, 0x3b, 0x53, 0x3b, 0x54, 0x3b, 0x54, 0x3b, 0x54, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x76, 0x3b, 0x4d,
+0x61, 0x72, 0x3b, 0x41, 0x62, 0x72, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41,
+0x75, 0x67, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x74, 0x75, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x63, 0x3b, 0x4a,
+0x61, 0x6e, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x46, 0x65, 0x76, 0x72, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x4d, 0x61, 0x72, 0x63,
+0x6f, 0x3b, 0x41, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x6f, 0x3b, 0x4a, 0x75, 0x6e, 0x68, 0x6f, 0x3b, 0x4a,
+0x75, 0x6c, 0x68, 0x6f, 0x3b, 0x41, 0x75, 0x67, 0x75, 0x73, 0x74, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x65, 0x6d, 0x62, 0x72,
+0x6f, 0x3b, 0x4f, 0x74, 0x75, 0x62, 0x72, 0x6f, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x44, 0x65,
+0x63, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x5a, 0x69, 0x62, 0x3b, 0x4e, 0x68, 0x6c, 0x6f, 0x3b, 0x4d, 0x62, 0x69, 0x3b,
+0x4d, 0x61, 0x62, 0x3b, 0x4e, 0x6b, 0x77, 0x3b, 0x4e, 0x68, 0x6c, 0x61, 0x3b, 0x4e, 0x74, 0x75, 0x3b, 0x4e, 0x63, 0x77,
+0x3b, 0x4d, 0x70, 0x61, 0x6e, 0x3b, 0x4d, 0x66, 0x75, 0x3b, 0x4c, 0x77, 0x65, 0x3b, 0x4d, 0x70, 0x61, 0x6c, 0x3b, 0x5a,
+0x69, 0x62, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x6c, 0x61, 0x3b, 0x4e, 0x68, 0x6c, 0x6f, 0x6c, 0x61, 0x6e, 0x6a, 0x61, 0x3b,
+0x4d, 0x62, 0x69, 0x6d, 0x62, 0x69, 0x74, 0x68, 0x6f, 0x3b, 0x4d, 0x61, 0x62, 0x61, 0x73, 0x61, 0x3b, 0x4e, 0x6b, 0x77,
+0x65, 0x6e, 0x6b, 0x77, 0x65, 0x7a, 0x69, 0x3b, 0x4e, 0x68, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x3b, 0x4e, 0x74,
+0x75, 0x6c, 0x69, 0x6b, 0x61, 0x7a, 0x69, 0x3b, 0x4e, 0x63, 0x77, 0x61, 0x62, 0x61, 0x6b, 0x61, 0x7a, 0x69, 0x3b, 0x4d,
+0x70, 0x61, 0x6e, 0x64, 0x75, 0x6c, 0x61, 0x3b, 0x4d, 0x66, 0x75, 0x6d, 0x66, 0x75, 0x3b, 0x4c, 0x77, 0x65, 0x7a, 0x69,
+0x3b, 0x4d, 0x70, 0x61, 0x6c, 0x61, 0x6b, 0x61, 0x7a, 0x69, 0x3b, 0x5a, 0x3b, 0x4e, 0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x4e,
+0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x4c, 0x3b, 0x4d, 0x3b, 0x4d, 0x31, 0x3b, 0x4d, 0x32,
+0x3b, 0x4d, 0x33, 0x3b, 0x4d, 0x34, 0x3b, 0x4d, 0x35, 0x3b, 0x4d, 0x36, 0x3b, 0x4d, 0x37, 0x3b, 0x4d, 0x38, 0x3b, 0x4d,
+0x39, 0x3b, 0x4d, 0x31, 0x30, 0x3b, 0x4d, 0x31, 0x31, 0x3b, 0x4d, 0x31, 0x32, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20,
+0x77, 0x61, 0x20, 0x6b, 0x77, 0x61, 0x6e, 0x7a, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b,
+0x61, 0x69, 0x6c, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x74, 0x61, 0x74, 0x75,
+0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72,
+0x69, 0x20, 0x77, 0x61, 0x20, 0x74, 0x61, 0x6e, 0x75, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x73,
+0x69, 0x74, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x73, 0x61, 0x62, 0x61, 0x3b, 0x4d, 0x77,
+0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6e, 0x61, 0x6e, 0x65, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61,
+0x20, 0x74, 0x69, 0x73, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69,
+0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x6d,
+0x6f, 0x6a, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e,
+0x61, 0x20, 0x6d, 0x62, 0x69, 0x6c, 0x69, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x54, 0x3b, 0x53, 0x3b,
+0x53, 0x3b, 0x4e, 0x3b, 0x54, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x2d49, 0x2d4f, 0x2d4f, 0x3b, 0x2d31, 0x2d55, 0x2d30, 0x3b,
+0x2d4e, 0x2d30, 0x2d55, 0x3b, 0x2d49, 0x2d31, 0x2d54, 0x3b, 0x2d4e, 0x2d30, 0x2d62, 0x3b, 0x2d62, 0x2d53, 0x2d4f, 0x3b, 0x2d62, 0x2d53, 0x2d4d, 0x3b,
+0x2d56, 0x2d53, 0x2d5b, 0x3b, 0x2d5b, 0x2d53, 0x2d5c, 0x3b, 0x2d3d, 0x2d5c, 0x2d53, 0x3b, 0x2d4f, 0x2d53, 0x2d61, 0x3b, 0x2d37, 0x2d53, 0x2d4a, 0x3b,
+0x2d49, 0x2d4f, 0x2d4f, 0x2d30, 0x2d62, 0x2d54, 0x3b, 0x2d31, 0x2d55, 0x2d30, 0x2d62, 0x2d55, 0x3b, 0x2d4e, 0x2d30, 0x2d55, 0x2d5a, 0x3b, 0x2d49, 0x2d31,
+0x2d54, 0x2d49, 0x2d54, 0x3b, 0x2d4e, 0x2d30, 0x2d62, 0x2d62, 0x2d53, 0x3b, 0x2d62, 0x2d53, 0x2d4f, 0x2d62, 0x2d53, 0x3b, 0x2d62, 0x2d53, 0x2d4d, 0x2d62,
+0x2d53, 0x2d63, 0x3b, 0x2d56, 0x2d53, 0x2d5b, 0x2d5c, 0x3b, 0x2d5b, 0x2d53, 0x2d5c, 0x2d30, 0x2d4f, 0x2d31, 0x2d49, 0x2d54, 0x3b, 0x2d3d, 0x2d5c, 0x2d53,
+0x2d31, 0x2d54, 0x3b, 0x2d4f, 0x2d53, 0x2d61, 0x2d30, 0x2d4f, 0x2d31, 0x2d49, 0x2d54, 0x3b, 0x2d37, 0x2d53, 0x2d4a, 0x2d30, 0x2d4f, 0x2d31, 0x2d49, 0x2d54,
+0x3b, 0x2d49, 0x3b, 0x2d31, 0x3b, 0x2d4e, 0x3b, 0x2d49, 0x3b, 0x2d4e, 0x3b, 0x2d62, 0x3b, 0x2d62, 0x3b, 0x2d56, 0x3b, 0x2d5b, 0x3b, 0x2d3d,
+0x3b, 0x2d4f, 0x3b, 0x2d37, 0x3b, 0x69, 0x6e, 0x6e, 0x3b, 0x62, 0x1e5b, 0x61, 0x3b, 0x6d, 0x61, 0x1e5b, 0x3b, 0x69, 0x62, 0x72,
+0x3b, 0x6d, 0x61, 0x79, 0x3b, 0x79, 0x75, 0x6e, 0x3b, 0x79, 0x75, 0x6c, 0x3b, 0x263, 0x75, 0x63, 0x3b, 0x63, 0x75, 0x74,
+0x3b, 0x6b, 0x74, 0x75, 0x3b, 0x6e, 0x75, 0x77, 0x3b, 0x64, 0x75, 0x6a, 0x3b, 0x69, 0x6e, 0x6e, 0x61, 0x79, 0x72, 0x3b,
+0x62, 0x1e5b, 0x61, 0x79, 0x1e5b, 0x3b, 0x6d, 0x61, 0x1e5b, 0x1e63, 0x3b, 0x69, 0x62, 0x72, 0x69, 0x72, 0x3b, 0x6d, 0x61, 0x79,
+0x79, 0x75, 0x3b, 0x79, 0x75, 0x6e, 0x79, 0x75, 0x3b, 0x79, 0x75, 0x6c, 0x79, 0x75, 0x7a, 0x3b, 0x263, 0x75, 0x63, 0x74,
+0x3b, 0x63, 0x75, 0x74, 0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b, 0x6b, 0x74, 0x75, 0x62, 0x72, 0x3b, 0x6e, 0x75, 0x77, 0x61,
+0x6e, 0x62, 0x69, 0x72, 0x3b, 0x64, 0x75, 0x6a, 0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b, 0x69, 0x3b, 0x62, 0x3b, 0x6d, 0x3b,
+0x69, 0x3b, 0x6d, 0x3b, 0x79, 0x3b, 0x79, 0x3b, 0x263, 0x3b, 0x63, 0x3b, 0x6b, 0x3b, 0x6e, 0x3b, 0x64, 0x3b, 0x59, 0x65,
+0x6e, 0x3b, 0x46, 0x75, 0x72, 0x3b, 0x4d, 0x65, 0x263, 0x3b, 0x59, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x59, 0x75,
+0x6e, 0x3b, 0x59, 0x75, 0x6c, 0x3b, 0x194, 0x75, 0x63, 0x3b, 0x43, 0x74, 0x65, 0x3b, 0x54, 0x75, 0x62, 0x3b, 0x57, 0x61,
+0x6d, 0x3b, 0x44, 0x75, 0x6a, 0x3b, 0x59, 0x65, 0x6e, 0x6e, 0x61, 0x79, 0x65, 0x72, 0x3b, 0x46, 0x75, 0x1e5b, 0x61, 0x72,
+0x3b, 0x4d, 0x65, 0x263, 0x72, 0x65, 0x73, 0x3b, 0x59, 0x65, 0x62, 0x72, 0x69, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x79, 0x75,
+0x3b, 0x59, 0x75, 0x6e, 0x79, 0x75, 0x3b, 0x59, 0x75, 0x6c, 0x79, 0x75, 0x3b, 0x194, 0x75, 0x63, 0x74, 0x3b, 0x43, 0x74,
+0x65, 0x6d, 0x62, 0x65, 0x1e5b, 0x3b, 0x54, 0x75, 0x62, 0x65, 0x1e5b, 0x3b, 0x57, 0x61, 0x6d, 0x62, 0x65, 0x1e5b, 0x3b, 0x44,
+0x75, 0x6a, 0x65, 0x6d, 0x62, 0x65, 0x1e5b, 0x3b, 0x59, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x59, 0x3b, 0x4d, 0x3b, 0x59, 0x3b,
+0x59, 0x3b, 0x194, 0x3b, 0x43, 0x3b, 0x54, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x59, 0x65, 0x6e, 0x3b, 0x46, 0x75, 0x72, 0x3b,
+0x4d, 0x65, 0x263, 0x3b, 0x59, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x59, 0x75, 0x6e, 0x3b, 0x59, 0x75, 0x6c, 0x3b,
+0x194, 0x75, 0x63, 0x3b, 0x43, 0x74, 0x65, 0x3b, 0x54, 0x75, 0x62, 0x3b, 0x4e, 0x75, 0x6e, 0x3b, 0x44, 0x75, 0x1e7, 0x3b,
+0x59, 0x65, 0x6e, 0x6e, 0x61, 0x79, 0x65, 0x72, 0x3b, 0x46, 0x75, 0x1e5b, 0x61, 0x72, 0x3b, 0x4d, 0x65, 0x263, 0x72, 0x65,
+0x73, 0x3b, 0x59, 0x65, 0x62, 0x72, 0x69, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x79, 0x75, 0x3b, 0x59, 0x75, 0x6e, 0x79, 0x75,
+0x3b, 0x59, 0x75, 0x6c, 0x79, 0x75, 0x3b, 0x194, 0x75, 0x63, 0x74, 0x3b, 0x43, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x1e5b, 0x3b,
+0x54, 0x75, 0x62, 0x65, 0x1e5b, 0x3b, 0x4e, 0x75, 0x6e, 0x65, 0x6d, 0x62, 0x65, 0x1e5b, 0x3b, 0x44, 0x75, 0x1e7, 0x65, 0x6d,
+0x62, 0x65, 0x1e5b, 0x3b, 0x59, 0x3b, 0x46, 0x3b, 0x194, 0x3b, 0x42, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x4c, 0x3b, 0x43, 0x3b,
+0x54, 0x3b, 0x52, 0x3b, 0x57, 0x3b, 0x44, 0x3b, 0x4b, 0x42, 0x5a, 0x3b, 0x4b, 0x42, 0x52, 0x3b, 0x4b, 0x53, 0x54, 0x3b,
+0x4b, 0x4b, 0x4e, 0x3b, 0x4b, 0x54, 0x4e, 0x3b, 0x4b, 0x4d, 0x4b, 0x3b, 0x4b, 0x4d, 0x53, 0x3b, 0x4b, 0x4d, 0x4e, 0x3b,
+0x4b, 0x4d, 0x57, 0x3b, 0x4b, 0x4b, 0x4d, 0x3b, 0x4b, 0x4e, 0x4b, 0x3b, 0x4b, 0x4e, 0x42, 0x3b, 0x4f, 0x6b, 0x77, 0x6f,
+0x6b, 0x75, 0x62, 0x61, 0x6e, 0x7a, 0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6b, 0x61, 0x62, 0x69, 0x72, 0x69, 0x3b, 0x4f,
+0x6b, 0x77, 0x61, 0x6b, 0x61, 0x73, 0x68, 0x61, 0x74, 0x75, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6b, 0x61, 0x6e, 0x61, 0x3b,
+0x4f, 0x6b, 0x77, 0x61, 0x6b, 0x61, 0x74, 0x61, 0x61, 0x6e, 0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6d, 0x75, 0x6b, 0x61,
+0x61, 0x67, 0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6d, 0x75, 0x73, 0x68, 0x61, 0x6e, 0x6a, 0x75, 0x3b, 0x4f, 0x6b, 0x77,
+0x61, 0x6d, 0x75, 0x6e, 0x61, 0x61, 0x6e, 0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6d, 0x77, 0x65, 0x6e, 0x64, 0x61, 0x3b,
+0x4f, 0x6b, 0x77, 0x61, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20,
+0x6e, 0x61, 0x20, 0x6b, 0x75, 0x6d, 0x77, 0x65, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e,
+0x61, 0x20, 0x69, 0x62, 0x69, 0x72, 0x69, 0x3b, 0x48, 0x75, 0x74, 0x3b, 0x56, 0x69, 0x6c, 0x3b, 0x44, 0x61, 0x74, 0x3b,
+0x54, 0x61, 0x69, 0x3b, 0x48, 0x61, 0x6e, 0x3b, 0x53, 0x69, 0x74, 0x3b, 0x53, 0x61, 0x62, 0x3b, 0x4e, 0x61, 0x6e, 0x3b,
+0x54, 0x69, 0x73, 0x3b, 0x4b, 0x75, 0x6d, 0x3b, 0x4b, 0x6d, 0x6a, 0x3b, 0x4b, 0x6d, 0x62, 0x3b, 0x70, 0x61, 0x20, 0x6d,
+0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x68, 0x75, 0x74, 0x61, 0x6c, 0x61, 0x3b, 0x70, 0x61, 0x20,
+0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x77, 0x75, 0x76, 0x69, 0x6c, 0x69, 0x3b, 0x70, 0x61,
+0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x77, 0x75, 0x64, 0x61, 0x74, 0x75, 0x3b, 0x70,
+0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x77, 0x75, 0x74, 0x61, 0x69, 0x3b, 0x70,
+0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x77, 0x75, 0x68, 0x61, 0x6e, 0x75, 0x3b,
+0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x73, 0x69, 0x74, 0x61, 0x3b, 0x70,
+0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x73, 0x61, 0x62, 0x61, 0x3b, 0x70, 0x61,
+0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x6e, 0x61, 0x6e, 0x65, 0x3b, 0x70, 0x61, 0x20,
+0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x74, 0x69, 0x73, 0x61, 0x3b, 0x70, 0x61, 0x20, 0x6d,
+0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77,
+0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x6d, 0x6f, 0x6a,
+0x61, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x6b, 0x75, 0x6d, 0x69,
+0x20, 0x6e, 0x61, 0x20, 0x6d, 0x62, 0x69, 0x6c, 0x69, 0x3b, 0x48, 0x3b, 0x56, 0x3b, 0x44, 0x3b, 0x54, 0x3b, 0x48, 0x3b,
+0x53, 0x3b, 0x53, 0x3b, 0x4e, 0x3b, 0x54, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72,
+0x69, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x41, 0x70, 0x72,
+0x69, 0x6c, 0x79, 0x69, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x79, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x79, 0x61,
+0x69, 0x3b, 0x41, 0x67, 0x75, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b,
+0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x61,
+0x3b, 0x7a, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x62, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x61, 0x77, 0x69, 0x3b, 0x6d, 0x25b, 0x3b,
+0x7a, 0x75, 0x77, 0x3b, 0x7a, 0x75, 0x6c, 0x3b, 0x75, 0x74, 0x69, 0x3b, 0x73, 0x25b, 0x74, 0x3b, 0x254, 0x6b, 0x75, 0x3b,
+0x6e, 0x6f, 0x77, 0x3b, 0x64, 0x65, 0x73, 0x3b, 0x7a, 0x61, 0x6e, 0x77, 0x75, 0x79, 0x65, 0x3b, 0x66, 0x65, 0x62, 0x75,
+0x72, 0x75, 0x79, 0x65, 0x3b, 0x6d, 0x61, 0x72, 0x69, 0x73, 0x69, 0x3b, 0x61, 0x77, 0x69, 0x72, 0x69, 0x6c, 0x69, 0x3b,
+0x6d, 0x25b, 0x3b, 0x7a, 0x75, 0x77, 0x25b, 0x6e, 0x3b, 0x7a, 0x75, 0x6c, 0x75, 0x79, 0x65, 0x3b, 0x75, 0x74, 0x69, 0x3b,
+0x73, 0x25b, 0x74, 0x61, 0x6e, 0x62, 0x75, 0x72, 0x75, 0x3b, 0x254, 0x6b, 0x75, 0x74, 0x254, 0x62, 0x75, 0x72, 0x75, 0x3b,
+0x6e, 0x6f, 0x77, 0x61, 0x6e, 0x62, 0x75, 0x72, 0x75, 0x3b, 0x64, 0x65, 0x73, 0x61, 0x6e, 0x62, 0x75, 0x72, 0x75, 0x3b,
+0x5a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x5a, 0x3b, 0x5a, 0x3b, 0x55, 0x3b, 0x53, 0x3b, 0x186, 0x3b,
+0x4e, 0x3b, 0x44, 0x3b, 0x4d, 0x62, 0x65, 0x3b, 0x4b, 0x61, 0x69, 0x3b, 0x4b, 0x61, 0x74, 0x3b, 0x4b, 0x61, 0x6e, 0x3b,
+0x47, 0x61, 0x74, 0x3b, 0x47, 0x61, 0x6e, 0x3b, 0x4d, 0x75, 0x67, 0x3b, 0x4b, 0x6e, 0x6e, 0x3b, 0x4b, 0x65, 0x6e, 0x3b,
+0x49, 0x6b, 0x75, 0x3b, 0x49, 0x6d, 0x77, 0x3b, 0x49, 0x67, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61,
+0x20, 0x6d, 0x62, 0x65, 0x72, 0x65, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x129, 0x72,
+0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x74, 0x68, 0x61, 0x74, 0x169, 0x3b, 0x4d,
+0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77,
+0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x67, 0x61,
+0x74, 0x61, 0x6e, 0x74, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6d, 0x169, 0x67,
+0x77, 0x61, 0x6e, 0x6a, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x6e,
+0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4d, 0x77, 0x65,
+0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x169, 0x6d, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61,
+0x20, 0x69, 0x6b, 0x169, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x169, 0x6d, 0x77, 0x65, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69,
+0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x169, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x4b, 0x61, 0x129, 0x72, 0x129, 0x3b, 0x4d,
+0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x47, 0x3b, 0x47, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x49, 0x3b, 0x49,
+0x3b, 0x49, 0x3b, 0x13a4, 0x13c3, 0x3b, 0x13a7, 0x13a6, 0x3b, 0x13a0, 0x13c5, 0x3b, 0x13a7, 0x13ec, 0x3b, 0x13a0, 0x13c2, 0x3b, 0x13d5, 0x13ad,
+0x3b, 0x13ab, 0x13f0, 0x3b, 0x13a6, 0x13b6, 0x3b, 0x13da, 0x13b5, 0x3b, 0x13da, 0x13c2, 0x3b, 0x13c5, 0x13d3, 0x3b, 0x13a5, 0x13cd, 0x3b, 0x13a4,
+0x13c3, 0x13b8, 0x13d4, 0x13c5, 0x3b, 0x13a7, 0x13a6, 0x13b5, 0x3b, 0x13a0, 0x13c5, 0x13f1, 0x3b, 0x13a7, 0x13ec, 0x13c2, 0x3b, 0x13a0, 0x13c2, 0x13cd,
+0x13ac, 0x13d8, 0x3b, 0x13d5, 0x13ad, 0x13b7, 0x13f1, 0x3b, 0x13ab, 0x13f0, 0x13c9, 0x13c2, 0x3b, 0x13a6, 0x13b6, 0x13c2, 0x3b, 0x13da, 0x13b5, 0x13cd,
+0x13d7, 0x3b, 0x13da, 0x13c2, 0x13c5, 0x13d7, 0x3b, 0x13c5, 0x13d3, 0x13d5, 0x13c6, 0x3b, 0x13a5, 0x13cd, 0x13a9, 0x13f1, 0x3b, 0x13a4, 0x3b, 0x13a7,
+0x3b, 0x13a0, 0x3b, 0x13a7, 0x3b, 0x13a0, 0x3b, 0x13d5, 0x3b, 0x13ab, 0x3b, 0x13a6, 0x3b, 0x13da, 0x3b, 0x13da, 0x3b, 0x13c5, 0x3b, 0x13a5,
+0x3b, 0x7a, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x76, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x61, 0x76, 0x72, 0x3b, 0x6d, 0x65, 0x3b,
+0x7a, 0x69, 0x6e, 0x3b, 0x7a, 0x69, 0x6c, 0x3b, 0x6f, 0x75, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x3b, 0x6f, 0x6b, 0x74, 0x3b,
+0x6e, 0x6f, 0x76, 0x3b, 0x64, 0x65, 0x73, 0x3b, 0x7a, 0x61, 0x6e, 0x76, 0x69, 0x65, 0x3b, 0x66, 0x65, 0x76, 0x72, 0x69,
+0x79, 0x65, 0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b, 0x61, 0x76, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x65, 0x3b, 0x7a, 0x69, 0x6e,
+0x3b, 0x7a, 0x69, 0x6c, 0x79, 0x65, 0x3b, 0x6f, 0x75, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x61, 0x6d, 0x3b, 0x6f, 0x6b,
+0x74, 0x6f, 0x62, 0x3b, 0x6e, 0x6f, 0x76, 0x61, 0x6d, 0x3b, 0x64, 0x65, 0x73, 0x61, 0x6d, 0x3b, 0x7a, 0x3b, 0x66, 0x3b,
+0x6d, 0x3b, 0x61, 0x3b, 0x6d, 0x3b, 0x7a, 0x3b, 0x7a, 0x3b, 0x6f, 0x3b, 0x73, 0x3b, 0x6f, 0x3b, 0x6e, 0x3b, 0x64, 0x3b,
+0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x4e, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77,
+0x61, 0x20, 0x50, 0x69, 0x6c, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x54, 0x61, 0x74, 0x75,
+0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x63, 0x68, 0x65, 0x63, 0x68, 0x69, 0x3b, 0x4d, 0x77,
+0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20,
+0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x55, 0x6d, 0x6f, 0x3b, 0x4d, 0x77, 0x65,
+0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4d, 0x69, 0x76, 0x69,
+0x6c, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e,
+0x61, 0x20, 0x4d, 0x69, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e,
+0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4e, 0x63, 0x68, 0x65, 0x63, 0x68, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x64,
+0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e,
+0x6f, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61,
+0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x55, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77,
+0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e,
+0x61, 0x20, 0x4d, 0x3b, 0x46, 0xfa, 0x6e, 0x67, 0x61, 0x74, 0x268, 0x3b, 0x4e, 0x61, 0x61, 0x6e, 0x268, 0x3b, 0x4b, 0x65,
+0x65, 0x6e, 0x64, 0x61, 0x3b, 0x49, 0x6b, 0xfa, 0x6d, 0x69, 0x3b, 0x49, 0x6e, 0x79, 0x61, 0x6d, 0x62, 0x61, 0x6c, 0x61,
+0x3b, 0x49, 0x64, 0x77, 0x61, 0x61, 0x74, 0x61, 0x3b, 0x4d, 0x289, 0x289, 0x6e, 0x63, 0x68, 0x268, 0x3b, 0x56, 0x268, 0x268,
+0x72, 0x268, 0x3b, 0x53, 0x61, 0x61, 0x74, 0x289, 0x3b, 0x49, 0x6e, 0x79, 0x69, 0x3b, 0x53, 0x61, 0x61, 0x6e, 0x6f, 0x3b,
+0x53, 0x61, 0x73, 0x61, 0x74, 0x289, 0x3b, 0x4b, 0x289, 0x66, 0xfa, 0x6e, 0x67, 0x61, 0x74, 0x268, 0x3b, 0x4b, 0x289, 0x6e,
+0x61, 0x61, 0x6e, 0x268, 0x3b, 0x4b, 0x289, 0x6b, 0x65, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4b, 0x77, 0x69, 0x69, 0x6b, 0x75,
+0x6d, 0x69, 0x3b, 0x4b, 0x77, 0x69, 0x69, 0x6e, 0x79, 0x61, 0x6d, 0x62, 0xe1, 0x6c, 0x61, 0x3b, 0x4b, 0x77, 0x69, 0x69,
+0x64, 0x77, 0x61, 0x61, 0x74, 0x61, 0x3b, 0x4b, 0x289, 0x6d, 0x289, 0x289, 0x6e, 0x63, 0x68, 0x268, 0x3b, 0x4b, 0x289, 0x76,
+0x268, 0x268, 0x72, 0x268, 0x3b, 0x4b, 0x289, 0x73, 0x61, 0x61, 0x74, 0x289, 0x3b, 0x4b, 0x77, 0x69, 0x69, 0x6e, 0x79, 0x69,
+0x3b, 0x4b, 0x289, 0x73, 0x61, 0x61, 0x6e, 0x6f, 0x3b, 0x4b, 0x289, 0x73, 0x61, 0x73, 0x61, 0x74, 0x289, 0x3b, 0x46, 0x3b,
+0x4e, 0x3b, 0x4b, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x4d, 0x3b, 0x56, 0x3b, 0x53, 0x3b, 0x49, 0x3b, 0x53, 0x3b,
+0x53, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x70, 0x75, 0x3b, 0x4d, 0x61,
+0x61, 0x3b, 0x4a, 0x75, 0x75, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x75, 0x3b, 0x53, 0x65, 0x62, 0x3b, 0x4f, 0x6b,
+0x69, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x77, 0x61, 0x6c, 0x69, 0x79, 0x6f, 0x3b,
+0x46, 0x65, 0x62, 0x77, 0x61, 0x6c, 0x69, 0x79, 0x6f, 0x3b, 0x4d, 0x61, 0x72, 0x69, 0x73, 0x69, 0x3b, 0x41, 0x70, 0x75,
+0x6c, 0x69, 0x3b, 0x4d, 0x61, 0x61, 0x79, 0x69, 0x3b, 0x4a, 0x75, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x61,
+0x79, 0x69, 0x3b, 0x41, 0x67, 0x75, 0x73, 0x69, 0x74, 0x6f, 0x3b, 0x53, 0x65, 0x62, 0x75, 0x74, 0x74, 0x65, 0x6d, 0x62,
+0x61, 0x3b, 0x4f, 0x6b, 0x69, 0x74, 0x6f, 0x62, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44,
+0x65, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x63, 0x3b, 0x45,
+0x70, 0x72, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x4f, 0x67, 0x61, 0x3b, 0x53,
+0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61,
+0x72, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x45, 0x70,
+0x72, 0x65, 0x6f, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x4f,
+0x67, 0x61, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62,
+0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x3b,
+0x46, 0x3b, 0x4d, 0x3b, 0x45, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x4a, 0x3b, 0x4f, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b,
+0x44, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x62, 0x72, 0x3b, 0x4d, 0x61,
+0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x74,
+0x75, 0x3b, 0x4e, 0x75, 0x76, 0x3b, 0x44, 0x69, 0x7a, 0x3b, 0x4a, 0x61, 0x6e, 0x65, 0x72, 0x75, 0x3b, 0x46, 0x65, 0x62,
+0x72, 0x65, 0x72, 0x75, 0x3b, 0x4d, 0x61, 0x72, 0x73, 0x75, 0x3b, 0x41, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x69,
+0x75, 0x3b, 0x4a, 0x75, 0x6e, 0x68, 0x75, 0x3b, 0x4a, 0x75, 0x6c, 0x68, 0x75, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x75,
+0x3b, 0x53, 0x65, 0x74, 0x65, 0x6e, 0x62, 0x72, 0x75, 0x3b, 0x4f, 0x74, 0x75, 0x62, 0x72, 0x75, 0x3b, 0x4e, 0x75, 0x76,
+0x65, 0x6e, 0x62, 0x72, 0x75, 0x3b, 0x44, 0x69, 0x7a, 0x65, 0x6e, 0x62, 0x72, 0x75, 0x3b, 0x4a, 0x41, 0x4e, 0x3b, 0x46,
+0x45, 0x42, 0x3b, 0x4d, 0x41, 0x43, 0x3b, 0x128, 0x50, 0x55, 0x3b, 0x4d, 0x128, 0x128, 0x3b, 0x4e, 0x4a, 0x55, 0x3b, 0x4e,
+0x4a, 0x52, 0x3b, 0x41, 0x47, 0x41, 0x3b, 0x53, 0x50, 0x54, 0x3b, 0x4f, 0x4b, 0x54, 0x3b, 0x4e, 0x4f, 0x56, 0x3b, 0x44,
+0x45, 0x43, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x129, 0x3b, 0x46, 0x65, 0x62, 0x75, 0x72, 0x75, 0x61, 0x72, 0x129,
+0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x128, 0x70, 0x75, 0x72, 0x169, 0x3b, 0x4d, 0x129, 0x129, 0x3b, 0x4e, 0x6a, 0x75,
+0x6e, 0x69, 0x3b, 0x4e, 0x6a, 0x75, 0x72, 0x61, 0x129, 0x3b, 0x41, 0x67, 0x61, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70,
+0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x169, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61,
+0x3b, 0x44, 0x69, 0x63, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x128, 0x3b, 0x4d, 0x3b, 0x4e,
+0x3b, 0x4e, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x4d, 0x75, 0x6c, 0x3b, 0x4e, 0x67, 0x61,
+0x74, 0x3b, 0x54, 0x61, 0x61, 0x3b, 0x49, 0x77, 0x6f, 0x3b, 0x4d, 0x61, 0x6d, 0x3b, 0x50, 0x61, 0x61, 0x3b, 0x4e, 0x67,
+0x65, 0x3b, 0x52, 0x6f, 0x6f, 0x3b, 0x42, 0x75, 0x72, 0x3b, 0x45, 0x70, 0x65, 0x3b, 0x4b, 0x70, 0x74, 0x3b, 0x4b, 0x70,
+0x61, 0x3b, 0x4d, 0x75, 0x6c, 0x67, 0x75, 0x6c, 0x3b, 0x4e, 0x67, 0x2019, 0x61, 0x74, 0x79, 0x61, 0x61, 0x74, 0x6f, 0x3b,
+0x4b, 0x69, 0x70, 0x74, 0x61, 0x61, 0x6d, 0x6f, 0x3b, 0x49, 0x77, 0x6f, 0x6f, 0x74, 0x6b, 0x75, 0x75, 0x74, 0x3b, 0x4d,
+0x61, 0x6d, 0x75, 0x75, 0x74, 0x3b, 0x50, 0x61, 0x61, 0x67, 0x69, 0x3b, 0x4e, 0x67, 0x2019, 0x65, 0x69, 0x79, 0x65, 0x65,
+0x74, 0x3b, 0x52, 0x6f, 0x6f, 0x70, 0x74, 0x75, 0x69, 0x3b, 0x42, 0x75, 0x72, 0x65, 0x65, 0x74, 0x3b, 0x45, 0x70, 0x65,
+0x65, 0x73, 0x6f, 0x3b, 0x4b, 0x69, 0x70, 0x73, 0x75, 0x75, 0x6e, 0x64, 0x65, 0x20, 0x6e, 0x65, 0x20, 0x74, 0x61, 0x61,
+0x69, 0x3b, 0x4b, 0x69, 0x70, 0x73, 0x75, 0x75, 0x6e, 0x64, 0x65, 0x20, 0x6e, 0x65, 0x62, 0x6f, 0x20, 0x61, 0x65, 0x6e,
+0x67, 0x2019, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x54, 0x3b, 0x49, 0x3b, 0x4d, 0x3b, 0x50, 0x3b, 0x4e, 0x3b, 0x52, 0x3b, 0x42,
+0x3b, 0x45, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x1c3, 0x4b, 0x68, 0x61, 0x6e, 0x6e, 0x69, 0x3b, 0x1c3, 0x4b, 0x68, 0x61, 0x6e,
+0x1c0, 0x67, 0xf4, 0x61, 0x62, 0x3b, 0x1c0, 0x4b, 0x68, 0x75, 0x75, 0x1c1, 0x6b, 0x68, 0xe2, 0x62, 0x3b, 0x1c3, 0x48, 0xf4,
+0x61, 0x1c2, 0x6b, 0x68, 0x61, 0x69, 0x62, 0x3b, 0x1c3, 0x4b, 0x68, 0x61, 0x69, 0x74, 0x73, 0xe2, 0x62, 0x3b, 0x47, 0x61,
+0x6d, 0x61, 0x1c0, 0x61, 0x65, 0x62, 0x3b, 0x1c2, 0x4b, 0x68, 0x6f, 0x65, 0x73, 0x61, 0x6f, 0x62, 0x3b, 0x41, 0x6f, 0x1c1,
+0x6b, 0x68, 0x75, 0x75, 0x6d, 0xfb, 0x1c1, 0x6b, 0x68, 0xe2, 0x62, 0x3b, 0x54, 0x61, 0x72, 0x61, 0x1c0, 0x6b, 0x68, 0x75,
+0x75, 0x6d, 0xfb, 0x1c1, 0x6b, 0x68, 0xe2, 0x62, 0x3b, 0x1c2, 0x4e, 0xfb, 0x1c1, 0x6e, 0xe2, 0x69, 0x73, 0x65, 0x62, 0x3b,
+0x1c0, 0x48, 0x6f, 0x6f, 0x1c2, 0x67, 0x61, 0x65, 0x62, 0x3b, 0x48, 0xf4, 0x61, 0x73, 0x6f, 0x72, 0x65, 0x1c1, 0x6b, 0x68,
+0xe2, 0x62, 0x3b, 0x4a, 0x61, 0x6e, 0x2e, 0x3b, 0x46, 0xe4, 0x62, 0x2e, 0x3b, 0x4d, 0xe4, 0x7a, 0x2e, 0x3b, 0x41, 0x70,
+0x72, 0x2e, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x2e, 0x3b, 0x4a, 0x75, 0x6c, 0x2e, 0x3b, 0x4f, 0x75, 0x6a,
+0x2e, 0x3b, 0x53, 0xe4, 0x70, 0x2e, 0x3b, 0x4f, 0x6b, 0x74, 0x2e, 0x3b, 0x4e, 0x6f, 0x76, 0x2e, 0x3b, 0x44, 0x65, 0x7a,
+0x2e, 0x3b, 0x4a, 0x61, 0x6e, 0x6e, 0x65, 0x77, 0x61, 0x3b, 0x46, 0xe4, 0x62, 0x72, 0x6f, 0x77, 0x61, 0x3b, 0x4d, 0xe4,
+0xe4, 0x7a, 0x3b, 0x41, 0x70, 0x72, 0x65, 0x6c, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x75, 0x6e, 0x69, 0x3b,
+0x4a, 0x75, 0x75, 0x6c, 0x69, 0x3b, 0x4f, 0x75, 0x6a, 0x6f, 0xdf, 0x3b, 0x53, 0x65, 0x70, 0x74, 0xe4, 0x6d, 0x62, 0x65,
+0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x68, 0x62, 0x65, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b,
+0x44, 0x65, 0x7a, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0xe4, 0x62, 0x3b, 0x4d, 0xe4, 0x7a,
+0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x4f, 0x75, 0x6a,
+0x3b, 0x53, 0xe4, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x7a, 0x3b, 0x44, 0x61, 0x6c,
+0x3b, 0x41, 0x72, 0xe1, 0x3b, 0x186, 0x25b, 0x6e, 0x3b, 0x44, 0x6f, 0x79, 0x3b, 0x4c, 0xe9, 0x70, 0x3b, 0x52, 0x6f, 0x6b,
+0x3b, 0x53, 0xe1, 0x73, 0x3b, 0x42, 0x254, 0x301, 0x72, 0x3b, 0x4b, 0xfa, 0x73, 0x3b, 0x47, 0xed, 0x73, 0x3b, 0x53, 0x68,
+0x289, 0x301, 0x3b, 0x4e, 0x74, 0x289, 0x301, 0x3b, 0x4f, 0x6c, 0x61, 0x64, 0x61, 0x6c, 0x289, 0x301, 0x3b, 0x41, 0x72, 0xe1,
+0x74, 0x3b, 0x186, 0x25b, 0x6e, 0x268, 0x301, 0x254, 0x268, 0x14b, 0x254, 0x6b, 0x3b, 0x4f, 0x6c, 0x6f, 0x64, 0x6f, 0x79, 0xed,
+0xf3, 0x72, 0xed, 0xea, 0x20, 0x69, 0x6e, 0x6b, 0xf3, 0x6b, 0xfa, 0xe2, 0x3b, 0x4f, 0x6c, 0x6f, 0x69, 0x6c, 0xe9, 0x70,
+0x16b, 0x6e, 0x79, 0x12b, 0x113, 0x20, 0x69, 0x6e, 0x6b, 0xf3, 0x6b, 0xfa, 0xe2, 0x3b, 0x4b, 0xfa, 0x6a, 0xfa, 0x254, 0x72,
+0x254, 0x6b, 0x3b, 0x4d, 0xf3, 0x72, 0x75, 0x73, 0xe1, 0x73, 0x69, 0x6e, 0x3b, 0x186, 0x6c, 0x254, 0x301, 0x268, 0x301, 0x62,
+0x254, 0x301, 0x72, 0xe1, 0x72, 0x25b, 0x3b, 0x4b, 0xfa, 0x73, 0x68, 0xee, 0x6e, 0x3b, 0x4f, 0x6c, 0x67, 0xed, 0x73, 0x61,
+0x6e, 0x3b, 0x50, 0x289, 0x73, 0x68, 0x289, 0x301, 0x6b, 0x61, 0x3b, 0x4e, 0x74, 0x289, 0x301, 0x14b, 0x289, 0x301, 0x73, 0x3b,
+0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x69, 0x3b,
0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b,
-0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x63, 0x3b, 0x52, 0x61, 0x72, 0x3b, 0x4d, 0x75, 0x6b, 0x3b, 0x4b, 0x77, 0x61, 0x3b,
-0x44, 0x75, 0x6e, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x4d, 0x6f, 0x64, 0x3b, 0x4a, 0x6f, 0x6c, 0x3b, 0x50, 0x65, 0x64, 0x3b,
-0x53, 0x6f, 0x6b, 0x3b, 0x54, 0x69, 0x62, 0x3b, 0x4c, 0x61, 0x62, 0x3b, 0x50, 0x6f, 0x6f, 0x3b, 0x4f, 0x72, 0x61, 0x72,
-0x61, 0x3b, 0x4f, 0x6d, 0x75, 0x6b, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6d, 0x67, 0x2019, 0x3b, 0x4f, 0x64, 0x75, 0x6e, 0x67,
-0x2019, 0x65, 0x6c, 0x3b, 0x4f, 0x6d, 0x61, 0x72, 0x75, 0x6b, 0x3b, 0x4f, 0x6d, 0x6f, 0x64, 0x6f, 0x6b, 0x2019, 0x6b, 0x69,
-0x6e, 0x67, 0x2019, 0x6f, 0x6c, 0x3b, 0x4f, 0x6a, 0x6f, 0x6c, 0x61, 0x3b, 0x4f, 0x70, 0x65, 0x64, 0x65, 0x6c, 0x3b, 0x4f,
-0x73, 0x6f, 0x6b, 0x6f, 0x73, 0x6f, 0x6b, 0x6f, 0x6d, 0x61, 0x3b, 0x4f, 0x74, 0x69, 0x62, 0x61, 0x72, 0x3b, 0x4f, 0x6c,
-0x61, 0x62, 0x6f, 0x72, 0x3b, 0x4f, 0x70, 0x6f, 0x6f, 0x3b, 0x52, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x44, 0x3b, 0x4d, 0x3b,
-0x4d, 0x3b, 0x4a, 0x3b, 0x50, 0x3b, 0x53, 0x3b, 0x54, 0x3b, 0x4c, 0x3b, 0x50, 0x3b, 0x17d, 0x61, 0x6e, 0x3b, 0x46, 0x65,
-0x65, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x77, 0x69, 0x3b, 0x4d, 0x65, 0x3b, 0x17d, 0x75, 0x77, 0x3b, 0x17d, 0x75, 0x79,
-0x3b, 0x55, 0x74, 0x3b, 0x53, 0x65, 0x6b, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x6f, 0x3b, 0x44, 0x65, 0x65, 0x3b,
-0x17d, 0x61, 0x6e, 0x77, 0x69, 0x79, 0x65, 0x3b, 0x46, 0x65, 0x65, 0x77, 0x69, 0x72, 0x69, 0x79, 0x65, 0x3b, 0x4d, 0x61,
-0x72, 0x73, 0x69, 0x3b, 0x41, 0x77, 0x69, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x65, 0x3b, 0x17d, 0x75, 0x77, 0x65, 0x14b, 0x3b,
-0x17d, 0x75, 0x79, 0x79, 0x65, 0x3b, 0x55, 0x74, 0x3b, 0x53, 0x65, 0x6b, 0x74, 0x61, 0x6e, 0x62, 0x75, 0x72, 0x3b, 0x4f,
-0x6b, 0x74, 0x6f, 0x6f, 0x62, 0x75, 0x72, 0x3b, 0x4e, 0x6f, 0x6f, 0x77, 0x61, 0x6e, 0x62, 0x75, 0x72, 0x3b, 0x44, 0x65,
-0x65, 0x73, 0x61, 0x6e, 0x62, 0x75, 0x72, 0x3b, 0x17d, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x17d, 0x3b,
-0x17d, 0x3b, 0x55, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x44, 0x41, 0x43, 0x3b, 0x44, 0x41, 0x52, 0x3b,
-0x44, 0x41, 0x44, 0x3b, 0x44, 0x41, 0x4e, 0x3b, 0x44, 0x41, 0x48, 0x3b, 0x44, 0x41, 0x55, 0x3b, 0x44, 0x41, 0x4f, 0x3b,
-0x44, 0x41, 0x42, 0x3b, 0x44, 0x4f, 0x43, 0x3b, 0x44, 0x41, 0x50, 0x3b, 0x44, 0x47, 0x49, 0x3b, 0x44, 0x41, 0x47, 0x3b,
-0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x63, 0x68, 0x69, 0x65, 0x6c, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d,
-0x61, 0x72, 0x20, 0x41, 0x72, 0x69, 0x79, 0x6f, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x64, 0x65,
-0x6b, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x6e, 0x67, 0x2019, 0x77, 0x65, 0x6e, 0x3b, 0x44, 0x77,
-0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x62, 0x69, 0x63, 0x68, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20,
-0x41, 0x75, 0x63, 0x68, 0x69, 0x65, 0x6c, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x62, 0x69, 0x72,
-0x69, 0x79, 0x6f, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x62, 0x6f, 0x72, 0x6f, 0x3b, 0x44, 0x77,
-0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x4f, 0x63, 0x68, 0x69, 0x6b, 0x6f, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72,
-0x20, 0x41, 0x70, 0x61, 0x72, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x67, 0x69, 0x20, 0x61, 0x63, 0x68,
-0x69, 0x65, 0x6c, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x70, 0x61, 0x72, 0x20, 0x67, 0x69, 0x20,
-0x61, 0x72, 0x69, 0x79, 0x6f, 0x3b, 0x43, 0x3b, 0x52, 0x3b, 0x44, 0x3b, 0x4e, 0x3b, 0x42, 0x3b, 0x55, 0x3b, 0x42, 0x3b,
-0x42, 0x3b, 0x43, 0x3b, 0x50, 0x3b, 0x43, 0x3b, 0x50, 0x3b, 0x59, 0x65, 0x6e, 0x3b, 0x59, 0x65, 0x62, 0x3b, 0x4d, 0x61,
-0x72, 0x3b, 0x49, 0x62, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x59, 0x75, 0x6e, 0x3b, 0x59, 0x75, 0x6c, 0x3b, 0x194, 0x75,
-0x63, 0x3b, 0x43, 0x75, 0x74, 0x3b, 0x4b, 0x1e6d, 0x75, 0x3b, 0x4e, 0x77, 0x61, 0x3b, 0x44, 0x75, 0x6a, 0x3b, 0x59, 0x65,
-0x6e, 0x6e, 0x61, 0x79, 0x65, 0x72, 0x3b, 0x59, 0x65, 0x62, 0x72, 0x61, 0x79, 0x65, 0x72, 0x3b, 0x4d, 0x61, 0x72, 0x73,
-0x3b, 0x49, 0x62, 0x72, 0x69, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x79, 0x75, 0x3b, 0x59, 0x75, 0x6e, 0x79, 0x75, 0x3b, 0x59,
-0x75, 0x6c, 0x79, 0x75, 0x7a, 0x3b, 0x194, 0x75, 0x63, 0x74, 0x3b, 0x43, 0x75, 0x74, 0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b,
-0x4b, 0x1e6d, 0x75, 0x62, 0x65, 0x72, 0x3b, 0x4e, 0x77, 0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b, 0x44, 0x75, 0x6a, 0x61, 0x6e,
-0x62, 0x69, 0x72, 0x3b, 0x59, 0x3b, 0x59, 0x3b, 0x4d, 0x3b, 0x49, 0x3b, 0x4d, 0x3b, 0x59, 0x3b, 0x59, 0x3b, 0x194, 0x3b,
-0x43, 0x3b, 0x4b, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x6c,
-0x75, 0x61, 0x6c, 0x69, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x41, 0x70, 0x6c, 0x69, 0x6c, 0x69, 0x3b, 0x4d, 0x65,
-0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x69, 0x3b,
-0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65,
-0x6d, 0x62, 0x61, 0x3b, 0x44, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x91c, 0x93e, 0x928, 0x941, 0x935, 0x93e, 0x930, 0x940,
-0x3b, 0x92b, 0x947, 0x92c, 0x94d, 0x930, 0x941, 0x935, 0x93e, 0x930, 0x940, 0x3b, 0x92e, 0x93e, 0x930, 0x94d, 0x938, 0x3b, 0x90f, 0x92b,
-0x94d, 0x930, 0x93f, 0x932, 0x3b, 0x92e, 0x947, 0x3b, 0x91c, 0x941, 0x928, 0x3b, 0x91c, 0x941, 0x932, 0x93e, 0x907, 0x3b, 0x906, 0x917,
-0x938, 0x94d, 0x925, 0x3b, 0x938, 0x947, 0x92c, 0x925, 0x947, 0x91c, 0x94d, 0x92c, 0x93c, 0x930, 0x3b, 0x905, 0x916, 0x925, 0x92c, 0x930,
-0x3b, 0x928, 0x92c, 0x947, 0x91c, 0x94d, 0x92c, 0x93c, 0x930, 0x3b, 0x926, 0x93f, 0x938, 0x947, 0x91c, 0x94d, 0x92c, 0x93c, 0x930, 0x3b,
-0x91c, 0x3b, 0x92b, 0x947, 0x3b, 0x92e, 0x93e, 0x3b, 0x90f, 0x3b, 0x92e, 0x947, 0x3b, 0x91c, 0x941, 0x3b, 0x91c, 0x941, 0x3b, 0x906,
-0x3b, 0x938, 0x947, 0x3b, 0x905, 0x3b, 0x928, 0x3b, 0x926, 0x93f, 0x3b, 0x456, 0x486, 0x430, 0x2de9, 0x487, 0x3b, 0x444, 0x435, 0x2de1,
-0x487, 0x3b, 0x43c, 0x430, 0x2dec, 0x487, 0x3b, 0x430, 0x486, 0x43f, 0x2dec, 0x487, 0x3b, 0x43c, 0x430, 0xa675, 0x3b, 0x456, 0x486, 0xa64b,
-0x2de9, 0x487, 0x3b, 0x456, 0x486, 0xa64b, 0x2de7, 0x487, 0x3b, 0x430, 0x486, 0x301, 0x475, 0x2de2, 0x487, 0x3b, 0x441, 0x435, 0x2deb, 0x487,
-0x3b, 0x47b, 0x486, 0x43a, 0x2dee, 0x3b, 0x43d, 0x43e, 0x435, 0x2de8, 0x3b, 0x434, 0x435, 0x2de6, 0x487, 0x3b, 0x456, 0x486, 0x430, 0x43d,
-0x43d, 0xa64b, 0x430, 0x301, 0x440, 0x457, 0x439, 0x3b, 0x444, 0x435, 0x432, 0x440, 0xa64b, 0x430, 0x301, 0x440, 0x457, 0x439, 0x3b, 0x43c,
-0x430, 0x301, 0x440, 0x442, 0x44a, 0x3b, 0x430, 0x486, 0x43f, 0x440, 0x456, 0x301, 0x43b, 0x43b, 0x457, 0x439, 0x3b, 0x43c, 0x430, 0x301,
-0x457, 0x439, 0x3b, 0x456, 0x486, 0xa64b, 0x301, 0x43d, 0x457, 0x439, 0x3b, 0x456, 0x486, 0xa64b, 0x301, 0x43b, 0x457, 0x439, 0x3b, 0x430,
-0x486, 0x301, 0x475, 0x433, 0xa64b, 0x441, 0x442, 0x44a, 0x3b, 0x441, 0x435, 0x43f, 0x442, 0x435, 0x301, 0x43c, 0x432, 0x440, 0x457, 0x439,
-0x3b, 0x47b, 0x486, 0x43a, 0x442, 0x461, 0x301, 0x432, 0x440, 0x457, 0x439, 0x3b, 0x43d, 0x43e, 0x435, 0x301, 0x43c, 0x432, 0x440, 0x457,
-0x439, 0x3b, 0x434, 0x435, 0x43a, 0x435, 0x301, 0x43c, 0x432, 0x440, 0x457, 0x439, 0x3b, 0x406, 0x486, 0x3b, 0x424, 0x3b, 0x41c, 0x3b,
-0x410, 0x486, 0x3b, 0x41c, 0x3b, 0x406, 0x486, 0x3b, 0x406, 0x486, 0x3b, 0x410, 0x486, 0x3b, 0x421, 0x3b, 0x47a, 0x486, 0x3b, 0x41d,
-0x3b, 0x414, 0x3b, 0x456, 0x486, 0x430, 0x43d, 0x43d, 0xa64b, 0x430, 0x301, 0x440, 0x457, 0x430, 0x3b, 0x444, 0x435, 0x432, 0x440, 0xa64b,
-0x430, 0x301, 0x440, 0x457, 0x430, 0x3b, 0x43c, 0x430, 0x301, 0x440, 0x442, 0x430, 0x3b, 0x430, 0x486, 0x43f, 0x440, 0x456, 0x301, 0x43b,
-0x43b, 0x457, 0x430, 0x3b, 0x43c, 0x430, 0x301, 0x457, 0x430, 0x3b, 0x456, 0x486, 0xa64b, 0x301, 0x43d, 0x457, 0x430, 0x3b, 0x456, 0x486,
-0xa64b, 0x301, 0x43b, 0x457, 0x430, 0x3b, 0x430, 0x486, 0x301, 0x475, 0x433, 0xa64b, 0x441, 0x442, 0x430, 0x3b, 0x441, 0x435, 0x43f, 0x442,
-0x435, 0x301, 0x43c, 0x432, 0x440, 0x457, 0x430, 0x3b, 0x47b, 0x486, 0x43a, 0x442, 0x461, 0x301, 0x432, 0x440, 0x457, 0x430, 0x3b, 0x43d,
-0x43e, 0x435, 0x301, 0x43c, 0x432, 0x440, 0x457, 0x430, 0x3b, 0x434, 0x435, 0x43a, 0x435, 0x301, 0x43c, 0x432, 0x440, 0x457, 0x430, 0x3b,
-0x43, 0x69, 0x6f, 0x3b, 0x4c, 0x75, 0x69, 0x3b, 0x4c, 0x75, 0x73, 0x3b, 0x4d, 0x75, 0x75, 0x3b, 0x4c, 0x75, 0x6d, 0x3b,
-0x4c, 0x75, 0x66, 0x3b, 0x4b, 0x61, 0x62, 0x3b, 0x4c, 0x75, 0x73, 0x68, 0x3b, 0x4c, 0x75, 0x74, 0x3b, 0x4c, 0x75, 0x6e,
-0x3b, 0x4b, 0x61, 0x73, 0x3b, 0x43, 0x69, 0x73, 0x3b, 0x43, 0x69, 0x6f, 0x6e, 0x67, 0x6f, 0x3b, 0x4c, 0xf9, 0x69, 0x73,
-0x68, 0x69, 0x3b, 0x4c, 0x75, 0x73, 0xf2, 0x6c, 0x6f, 0x3b, 0x4d, 0xf9, 0x75, 0x79, 0xe0, 0x3b, 0x4c, 0x75, 0x6d, 0xf9,
-0x6e, 0x67, 0xf9, 0x6c, 0xf9, 0x3b, 0x4c, 0x75, 0x66, 0x75, 0x69, 0x6d, 0x69, 0x3b, 0x4b, 0x61, 0x62, 0xe0, 0x6c, 0xe0,
-0x73, 0x68, 0xec, 0x70, 0xf9, 0x3b, 0x4c, 0xf9, 0x73, 0x68, 0xec, 0x6b, 0xe0, 0x3b, 0x4c, 0x75, 0x74, 0x6f, 0x6e, 0x67,
-0x6f, 0x6c, 0x6f, 0x3b, 0x4c, 0x75, 0x6e, 0x67, 0xf9, 0x64, 0x69, 0x3b, 0x4b, 0x61, 0x73, 0x77, 0xe8, 0x6b, 0xe8, 0x73,
-0xe8, 0x3b, 0x43, 0x69, 0x73, 0x77, 0xe0, 0x3b, 0x43, 0x3b, 0x4c, 0x3b, 0x4c, 0x3b, 0x4d, 0x3b, 0x4c, 0x3b, 0x4c, 0x3b,
-0x4b, 0x3b, 0x4c, 0x3b, 0x4c, 0x3b, 0x4c, 0x3b, 0x4b, 0x3b, 0x43, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b,
-0x4d, 0xe4, 0x65, 0x3b, 0x41, 0x62, 0x72, 0x3b, 0x4d, 0x65, 0x65, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b,
-0x41, 0x75, 0x67, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x7a, 0x3b,
-0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x4d, 0xe4, 0x65, 0x72, 0x7a,
-0x3b, 0x41, 0x62, 0x72, 0xeb, 0x6c, 0x6c, 0x3b, 0x4d, 0x65, 0x65, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c,
-0x69, 0x3b, 0x41, 0x75, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4f,
-0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44, 0x65, 0x7a, 0x65,
-0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4a, 0x61, 0x6e, 0x2e, 0x3b, 0x46, 0x65, 0x62, 0x2e, 0x3b, 0x4d, 0xe4, 0x65, 0x2e, 0x3b,
-0x41, 0x62, 0x72, 0x2e, 0x3b, 0x4d, 0x65, 0x65, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x69, 0x3b, 0x41,
-0x75, 0x67, 0x2e, 0x3b, 0x53, 0x65, 0x70, 0x2e, 0x3b, 0x4f, 0x6b, 0x74, 0x2e, 0x3b, 0x4e, 0x6f, 0x76, 0x2e, 0x3b, 0x44,
-0x65, 0x7a, 0x2e, 0x3b, 0x6e, 0xf9, 0x6d, 0x3b, 0x6b, 0x268, 0x7a, 0x3b, 0x74, 0x268, 0x64, 0x3b, 0x74, 0x61, 0x61, 0x3b,
-0x73, 0x65, 0x65, 0x3b, 0x6e, 0x7a, 0x75, 0x3b, 0x64, 0x75, 0x6d, 0x3b, 0x66, 0x254, 0x65, 0x3b, 0x64, 0x7a, 0x75, 0x3b,
-0x6c, 0x254, 0x6d, 0x3b, 0x6b, 0x61, 0x61, 0x3b, 0x66, 0x77, 0x6f, 0x3b, 0x6e, 0x64, 0x7a, 0x254, 0x300, 0x14b, 0x254, 0x300,
-0x6e, 0xf9, 0x6d, 0x3b, 0x6e, 0x64, 0x7a, 0x254, 0x300, 0x14b, 0x254, 0x300, 0x6b, 0x197, 0x300, 0x7a, 0xf9, 0x294, 0x3b, 0x6e,
-0x64, 0x7a, 0x254, 0x300, 0x14b, 0x254, 0x300, 0x74, 0x197, 0x300, 0x64, 0x289, 0x300, 0x67, 0x68, 0xe0, 0x3b, 0x6e, 0x64, 0x7a,
-0x254, 0x300, 0x14b, 0x254, 0x300, 0x74, 0x1ce, 0x61, 0x66, 0x289, 0x304, 0x67, 0x68, 0x101, 0x3b, 0x6e, 0x64, 0x7a, 0x254, 0x300,
-0x14b, 0xe8, 0x73, 0xe8, 0x65, 0x3b, 0x6e, 0x64, 0x7a, 0x254, 0x300, 0x14b, 0x254, 0x300, 0x6e, 0x7a, 0xf9, 0x67, 0x68, 0xf2,
-0x3b, 0x6e, 0x64, 0x7a, 0x254, 0x300, 0x14b, 0x254, 0x300, 0x64, 0xf9, 0x6d, 0x6c, 0x6f, 0x3b, 0x6e, 0x64, 0x7a, 0x254, 0x300,
-0x14b, 0x254, 0x300, 0x6b, 0x77, 0xee, 0x66, 0x254, 0x300, 0x65, 0x3b, 0x6e, 0x64, 0x7a, 0x254, 0x300, 0x14b, 0x254, 0x300, 0x74,
-0x197, 0x300, 0x66, 0x289, 0x300, 0x67, 0x68, 0xe0, 0x64, 0x7a, 0x75, 0x67, 0x68, 0xf9, 0x3b, 0x6e, 0x64, 0x7a, 0x254, 0x300,
-0x14b, 0x254, 0x300, 0x67, 0x68, 0x1d4, 0x75, 0x77, 0x65, 0x6c, 0x254, 0x300, 0x6d, 0x3b, 0x6e, 0x64, 0x7a, 0x254, 0x300, 0x14b,
-0x254, 0x300, 0x63, 0x68, 0x77, 0x61, 0x294, 0xe0, 0x6b, 0x61, 0x61, 0x20, 0x77, 0x6f, 0x3b, 0x6e, 0x64, 0x7a, 0x254, 0x300,
-0x14b, 0xe8, 0x66, 0x77, 0xf2, 0x6f, 0x3b, 0x6e, 0x3b, 0x6b, 0x3b, 0x74, 0x3b, 0x74, 0x3b, 0x73, 0x3b, 0x7a, 0x3b, 0x6b,
-0x3b, 0x66, 0x3b, 0x64, 0x3b, 0x6c, 0x3b, 0x63, 0x3b, 0x66, 0x3b, 0x6b, 0x254, 0x6e, 0x3b, 0x6d, 0x61, 0x63, 0x3b, 0x6d,
-0x61, 0x74, 0x3b, 0x6d, 0x74, 0x6f, 0x3b, 0x6d, 0x70, 0x75, 0x3b, 0x68, 0x69, 0x6c, 0x3b, 0x6e, 0x6a, 0x65, 0x3b, 0x68,
-0x69, 0x6b, 0x3b, 0x64, 0x69, 0x70, 0x3b, 0x62, 0x69, 0x6f, 0x3b, 0x6d, 0x61, 0x79, 0x3b, 0x6c, 0x69, 0x253, 0x3b, 0x4b,
-0x254, 0x6e, 0x64, 0x254, 0x14b, 0x3b, 0x4d, 0xe0, 0x63, 0x25b, 0x302, 0x6c, 0x3b, 0x4d, 0xe0, 0x74, 0xf9, 0x6d, 0x62, 0x3b,
-0x4d, 0xe0, 0x74, 0x6f, 0x70, 0x3b, 0x4d, 0x300, 0x70, 0x75, 0x79, 0x25b, 0x3b, 0x48, 0xec, 0x6c, 0xf2, 0x6e, 0x64, 0x25b,
-0x300, 0x3b, 0x4e, 0x6a, 0xe8, 0x62, 0xe0, 0x3b, 0x48, 0xec, 0x6b, 0x61, 0x14b, 0x3b, 0x44, 0xec, 0x70, 0x254, 0x300, 0x73,
-0x3b, 0x42, 0xec, 0xf2, 0xf4, 0x6d, 0x3b, 0x4d, 0xe0, 0x79, 0x25b, 0x73, 0xe8, 0x70, 0x3b, 0x4c, 0xec, 0x62, 0x75, 0x79,
-0x20, 0x6c, 0x69, 0x20, 0x144, 0x79, 0xe8, 0x65, 0x3b, 0x6b, 0x3b, 0x6d, 0x3b, 0x6d, 0x3b, 0x6d, 0x3b, 0x6d, 0x3b, 0x68,
-0x3b, 0x6e, 0x3b, 0x68, 0x3b, 0x64, 0x3b, 0x62, 0x3b, 0x6d, 0x3b, 0x6c, 0x3b, 0x64, 0x69, 0x3b, 0x14b, 0x67, 0x254, 0x6e,
-0x3b, 0x73, 0x254, 0x14b, 0x3b, 0x64, 0x69, 0x253, 0x3b, 0x65, 0x6d, 0x69, 0x3b, 0x65, 0x73, 0x254, 0x3b, 0x6d, 0x61, 0x64,
-0x3b, 0x64, 0x69, 0x14b, 0x3b, 0x6e, 0x79, 0x25b, 0x74, 0x3b, 0x6d, 0x61, 0x79, 0x3b, 0x74, 0x69, 0x6e, 0x3b, 0x65, 0x6c,
-0xe1, 0x3b, 0x64, 0x69, 0x6d, 0x254, 0x301, 0x64, 0x69, 0x3b, 0x14b, 0x67, 0x254, 0x6e, 0x64, 0x25b, 0x3b, 0x73, 0x254, 0x14b,
-0x25b, 0x3b, 0x64, 0x69, 0x253, 0xe1, 0x253, 0xe1, 0x3b, 0x65, 0x6d, 0x69, 0x61, 0x73, 0x65, 0x6c, 0x65, 0x3b, 0x65, 0x73,
-0x254, 0x70, 0x25b, 0x73, 0x254, 0x70, 0x25b, 0x3b, 0x6d, 0x61, 0x64, 0x69, 0x253, 0x25b, 0x301, 0x64, 0xed, 0x253, 0x25b, 0x301,
-0x3b, 0x64, 0x69, 0x14b, 0x67, 0x69, 0x6e, 0x64, 0x69, 0x3b, 0x6e, 0x79, 0x25b, 0x74, 0x25b, 0x6b, 0x69, 0x3b, 0x6d, 0x61,
-0x79, 0xe9, 0x73, 0x25b, 0x301, 0x3b, 0x74, 0x69, 0x6e, 0xed, 0x6e, 0xed, 0x3b, 0x65, 0x6c, 0xe1, 0x14b, 0x67, 0x25b, 0x301,
-0x3b, 0x64, 0x3b, 0x14b, 0x3b, 0x73, 0x3b, 0x64, 0x3b, 0x65, 0x3b, 0x65, 0x3b, 0x6d, 0x3b, 0x64, 0x3b, 0x6e, 0x3b, 0x6d,
-0x3b, 0x74, 0x3b, 0x65, 0x3b, 0x53, 0x61, 0x3b, 0x46, 0x65, 0x3b, 0x4d, 0x61, 0x3b, 0x41, 0x62, 0x3b, 0x4d, 0x65, 0x3b,
-0x53, 0x75, 0x3b, 0x53, 0xfa, 0x3b, 0x55, 0x74, 0x3b, 0x53, 0x65, 0x3b, 0x4f, 0x6b, 0x3b, 0x4e, 0x6f, 0x3b, 0x44, 0x65,
-0x3b, 0x53, 0x61, 0x6e, 0x76, 0x69, 0x65, 0x3b, 0x46, 0xe9, 0x62, 0x69, 0x72, 0x69, 0x65, 0x3b, 0x4d, 0x61, 0x72, 0x73,
-0x3b, 0x41, 0x62, 0x75, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x65, 0x65, 0x3b, 0x53, 0x75, 0x65, 0x14b, 0x3b, 0x53, 0xfa, 0x75,
-0x79, 0x65, 0x65, 0x3b, 0x55, 0x74, 0x3b, 0x53, 0x65, 0x74, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x4f, 0x6b, 0x74,
-0x6f, 0x62, 0x61, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x44, 0x69, 0x73, 0x61, 0x6d, 0x62,
-0x61, 0x72, 0x3b, 0x53, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x55, 0x3b, 0x53,
-0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x6e, 0x67, 0x6f, 0x3b, 0x6e, 0x67, 0x62, 0x3b, 0x6e, 0x67, 0x6c, 0x3b, 0x6e,
-0x67, 0x6e, 0x3b, 0x6e, 0x67, 0x74, 0x3b, 0x6e, 0x67, 0x73, 0x3b, 0x6e, 0x67, 0x7a, 0x3b, 0x6e, 0x67, 0x6d, 0x3b, 0x6e,
-0x67, 0x65, 0x3b, 0x6e, 0x67, 0x61, 0x3b, 0x6e, 0x67, 0x61, 0x64, 0x3b, 0x6e, 0x67, 0x61, 0x62, 0x3b, 0x6e, 0x67, 0x254,
-0x6e, 0x20, 0x6f, 0x73, 0xfa, 0x3b, 0x6e, 0x67, 0x254, 0x6e, 0x20, 0x62, 0x25b, 0x30c, 0x3b, 0x6e, 0x67, 0x254, 0x6e, 0x20,
-0x6c, 0xe1, 0x6c, 0x61, 0x3b, 0x6e, 0x67, 0x254, 0x6e, 0x20, 0x6e, 0x79, 0x69, 0x6e, 0x61, 0x3b, 0x6e, 0x67, 0x254, 0x6e,
-0x20, 0x74, 0xe1, 0x6e, 0x61, 0x3b, 0x6e, 0x67, 0x254, 0x6e, 0x20, 0x73, 0x61, 0x6d, 0x259, 0x6e, 0x61, 0x3b, 0x6e, 0x67,
-0x254, 0x6e, 0x20, 0x7a, 0x61, 0x6d, 0x67, 0x62, 0xe1, 0x6c, 0x61, 0x3b, 0x6e, 0x67, 0x254, 0x6e, 0x20, 0x6d, 0x77, 0x6f,
-0x6d, 0x3b, 0x6e, 0x67, 0x254, 0x6e, 0x20, 0x65, 0x62, 0x75, 0x6c, 0xfa, 0x3b, 0x6e, 0x67, 0x254, 0x6e, 0x20, 0x61, 0x77,
-0xf3, 0x6d, 0x3b, 0x6e, 0x67, 0x254, 0x6e, 0x20, 0x61, 0x77, 0xf3, 0x6d, 0x20, 0x61, 0x69, 0x20, 0x64, 0x7a, 0x69, 0xe1,
-0x3b, 0x6e, 0x67, 0x254, 0x6e, 0x20, 0x61, 0x77, 0xf3, 0x6d, 0x20, 0x61, 0x69, 0x20, 0x62, 0x25b, 0x30c, 0x3b, 0x6f, 0x3b,
-0x62, 0x3b, 0x6c, 0x3b, 0x6e, 0x3b, 0x74, 0x3b, 0x73, 0x3b, 0x7a, 0x3b, 0x6d, 0x3b, 0x65, 0x3b, 0x61, 0x3b, 0x64, 0x3b,
-0x62, 0x3b, 0x14b, 0x31, 0x3b, 0x14b, 0x32, 0x3b, 0x14b, 0x33, 0x3b, 0x14b, 0x34, 0x3b, 0x14b, 0x35, 0x3b, 0x14b, 0x36, 0x3b,
-0x14b, 0x37, 0x3b, 0x14b, 0x38, 0x3b, 0x14b, 0x39, 0x3b, 0x14b, 0x31, 0x30, 0x3b, 0x14b, 0x31, 0x31, 0x3b, 0x14b, 0x31, 0x32,
-0x3b, 0x14b, 0x77, 0xed, 0xed, 0x20, 0x61, 0x20, 0x6e, 0x74, 0x254, 0x301, 0x6e, 0x74, 0x254, 0x3b, 0x14b, 0x77, 0xed, 0xed,
-0x20, 0x61, 0x6b, 0x1dd, 0x20, 0x62, 0x25b, 0x301, 0x25b, 0x3b, 0x14b, 0x77, 0xed, 0xed, 0x20, 0x61, 0x6b, 0x1dd, 0x20, 0x72,
-0xe1, 0xe1, 0x3b, 0x14b, 0x77, 0xed, 0xed, 0x20, 0x61, 0x6b, 0x1dd, 0x20, 0x6e, 0x69, 0x6e, 0x3b, 0x14b, 0x77, 0xed, 0xed,
-0x20, 0x61, 0x6b, 0x1dd, 0x20, 0x74, 0xe1, 0x61, 0x6e, 0x3b, 0x14b, 0x77, 0xed, 0xed, 0x20, 0x61, 0x6b, 0x1dd, 0x20, 0x74,
-0xe1, 0x61, 0x66, 0x254, 0x6b, 0x3b, 0x14b, 0x77, 0xed, 0xed, 0x20, 0x61, 0x6b, 0x1dd, 0x20, 0x74, 0xe1, 0x61, 0x62, 0x25b,
-0x25b, 0x3b, 0x14b, 0x77, 0xed, 0xed, 0x20, 0x61, 0x6b, 0x1dd, 0x20, 0x74, 0xe1, 0x61, 0x72, 0x61, 0x61, 0x3b, 0x14b, 0x77,
-0xed, 0xed, 0x20, 0x61, 0x6b, 0x1dd, 0x20, 0x74, 0xe1, 0x61, 0x6e, 0x69, 0x6e, 0x3b, 0x14b, 0x77, 0xed, 0xed, 0x20, 0x61,
-0x6b, 0x1dd, 0x20, 0x6e, 0x74, 0x25b, 0x6b, 0x3b, 0x14b, 0x77, 0xed, 0xed, 0x20, 0x61, 0x6b, 0x1dd, 0x20, 0x6e, 0x74, 0x25b,
-0x6b, 0x20, 0x64, 0x69, 0x20, 0x62, 0x254, 0x301, 0x6b, 0x3b, 0x14b, 0x77, 0xed, 0xed, 0x20, 0x61, 0x6b, 0x1dd, 0x20, 0x6e,
-0x74, 0x25b, 0x6b, 0x20, 0x64, 0x69, 0x20, 0x62, 0x25b, 0x301, 0x25b, 0x3b, 0x4b, 0x77, 0x61, 0x3b, 0x55, 0x6e, 0x61, 0x3b,
-0x52, 0x61, 0x72, 0x3b, 0x43, 0x68, 0x65, 0x3b, 0x54, 0x68, 0x61, 0x3b, 0x4d, 0x6f, 0x63, 0x3b, 0x53, 0x61, 0x62, 0x3b,
-0x4e, 0x61, 0x6e, 0x3b, 0x54, 0x69, 0x73, 0x3b, 0x4b, 0x75, 0x6d, 0x3b, 0x4d, 0x6f, 0x6a, 0x3b, 0x59, 0x65, 0x6c, 0x3b,
-0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x6f, 0x20, 0x6b, 0x77, 0x61, 0x6e, 0x7a, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72,
-0x69, 0x20, 0x77, 0x6f, 0x20, 0x75, 0x6e, 0x61, 0x79, 0x65, 0x6c, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77,
-0x6f, 0x20, 0x75, 0x6e, 0x65, 0x72, 0x61, 0x72, 0x75, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x6f, 0x20, 0x75,
-0x6e, 0x65, 0x63, 0x68, 0x65, 0x73, 0x68, 0x65, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x6f, 0x20, 0x75, 0x6e,
-0x65, 0x74, 0x68, 0x61, 0x6e, 0x75, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x6f, 0x20, 0x74, 0x68, 0x61, 0x6e,
-0x75, 0x20, 0x6e, 0x61, 0x20, 0x6d, 0x6f, 0x63, 0x68, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x6f, 0x20,
-0x73, 0x61, 0x62, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x6f, 0x20, 0x6e, 0x61, 0x6e, 0x65, 0x3b, 0x4d,
-0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x6f, 0x20, 0x74, 0x69, 0x73, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77,
-0x6f, 0x20, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x6f, 0x20, 0x6b, 0x75, 0x6d, 0x69,
-0x20, 0x6e, 0x61, 0x20, 0x6d, 0x6f, 0x6a, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x6f, 0x20, 0x6b, 0x75,
-0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x79, 0x65, 0x6c, 0x2019, 0x6c, 0x69, 0x3b, 0x4b, 0x3b, 0x55, 0x3b, 0x52, 0x3b, 0x43,
-0x3b, 0x54, 0x3b, 0x4d, 0x3b, 0x53, 0x3b, 0x4e, 0x3b, 0x54, 0x3b, 0x4b, 0x3b, 0x4d, 0x3b, 0x59, 0x3b, 0x46, 0x4c, 0x4f,
-0x3b, 0x43, 0x4c, 0x41, 0x3b, 0x43, 0x4b, 0x49, 0x3b, 0x46, 0x4d, 0x46, 0x3b, 0x4d, 0x41, 0x44, 0x3b, 0x4d, 0x42, 0x49,
-0x3b, 0x4d, 0x4c, 0x49, 0x3b, 0x4d, 0x41, 0x4d, 0x3b, 0x46, 0x44, 0x45, 0x3b, 0x46, 0x4d, 0x55, 0x3b, 0x46, 0x47, 0x57,
-0x3b, 0x46, 0x59, 0x55, 0x3b, 0x46, 0x129, 0x69, 0x20, 0x4c, 0x6f, 0x6f, 0x3b, 0x43, 0x6f, 0x6b, 0x63, 0x77, 0x61, 0x6b,
-0x6c, 0x61, 0x14b, 0x6e, 0x65, 0x3b, 0x43, 0x6f, 0x6b, 0x63, 0x77, 0x61, 0x6b, 0x6c, 0x69, 0x69, 0x3b, 0x46, 0x129, 0x69,
-0x20, 0x4d, 0x61, 0x72, 0x66, 0x6f, 0x6f, 0x3b, 0x4d, 0x61, 0x64, 0x1dd, 0x1dd, 0x75, 0x75, 0x74, 0x1dd, 0x62, 0x69, 0x6a,
-0x61, 0x14b, 0x3b, 0x4d, 0x61, 0x6d, 0x1dd, 0x14b, 0x67, 0x77, 0xe3, 0x61, 0x66, 0x61, 0x68, 0x62, 0x69, 0x69, 0x3b, 0x4d,
-0x61, 0x6d, 0x1dd, 0x14b, 0x67, 0x77, 0xe3, 0x61, 0x6c, 0x69, 0x69, 0x3b, 0x4d, 0x61, 0x64, 0x1dd, 0x6d, 0x62, 0x69, 0x69,
-0x3b, 0x46, 0x129, 0x69, 0x20, 0x44, 0x1dd, 0x253, 0x6c, 0x69, 0x69, 0x3b, 0x46, 0x129, 0x69, 0x20, 0x4d, 0x75, 0x6e, 0x64,
-0x61, 0x14b, 0x3b, 0x46, 0x129, 0x69, 0x20, 0x47, 0x77, 0x61, 0x68, 0x6c, 0x6c, 0x65, 0x3b, 0x46, 0x129, 0x69, 0x20, 0x59,
-0x75, 0x72, 0x75, 0x3b, 0x4f, 0x3b, 0x41, 0x3b, 0x49, 0x3b, 0x46, 0x3b, 0x44, 0x3b, 0x42, 0x3b, 0x4c, 0x3b, 0x4d, 0x3b,
-0x45, 0x3b, 0x55, 0x3b, 0x57, 0x3b, 0x59, 0x3b, 0x6e, 0x67, 0x31, 0x3b, 0x6e, 0x67, 0x32, 0x3b, 0x6e, 0x67, 0x33, 0x3b,
-0x6e, 0x67, 0x34, 0x3b, 0x6e, 0x67, 0x35, 0x3b, 0x6e, 0x67, 0x36, 0x3b, 0x6e, 0x67, 0x37, 0x3b, 0x6e, 0x67, 0x38, 0x3b,
-0x6e, 0x67, 0x39, 0x3b, 0x6e, 0x67, 0x31, 0x30, 0x3b, 0x6e, 0x67, 0x31, 0x31, 0x3b, 0x6b, 0x72, 0x69, 0x73, 0x3b, 0x6e,
-0x67, 0x77, 0x25b, 0x6e, 0x20, 0x6d, 0x61, 0x74, 0xe1, 0x68, 0x72, 0x61, 0x3b, 0x6e, 0x67, 0x77, 0x25b, 0x6e, 0x20, 0x144,
-0x6d, 0x62, 0x61, 0x3b, 0x6e, 0x67, 0x77, 0x25b, 0x6e, 0x20, 0x144, 0x6c, 0x61, 0x6c, 0x3b, 0x6e, 0x67, 0x77, 0x25b, 0x6e,
-0x20, 0x144, 0x6e, 0x61, 0x3b, 0x6e, 0x67, 0x77, 0x25b, 0x6e, 0x20, 0x144, 0x74, 0x61, 0x6e, 0x3b, 0x6e, 0x67, 0x77, 0x25b,
-0x6e, 0x20, 0x144, 0x74, 0x75, 0xf3, 0x3b, 0x6e, 0x67, 0x77, 0x25b, 0x6e, 0x20, 0x68, 0x25b, 0x6d, 0x62, 0x75, 0x25b, 0x72,
-0xed, 0x3b, 0x6e, 0x67, 0x77, 0x25b, 0x6e, 0x20, 0x6c, 0x254, 0x6d, 0x62, 0x69, 0x3b, 0x6e, 0x67, 0x77, 0x25b, 0x6e, 0x20,
-0x72, 0x25b, 0x62, 0x76, 0x75, 0xe2, 0x3b, 0x6e, 0x67, 0x77, 0x25b, 0x6e, 0x20, 0x77, 0x75, 0x6d, 0x3b, 0x6e, 0x67, 0x77,
-0x25b, 0x6e, 0x20, 0x77, 0x75, 0x6d, 0x20, 0x6e, 0x61, 0x76, 0x1d4, 0x72, 0x3b, 0x6b, 0x72, 0xed, 0x73, 0x69, 0x6d, 0x69,
-0x6e, 0x3b, 0x54, 0x69, 0x6f, 0x70, 0x3b, 0x50, 0x25b, 0x74, 0x3b, 0x44, 0x75, 0x254, 0x331, 0x254, 0x331, 0x3b, 0x47, 0x75,
-0x61, 0x6b, 0x3b, 0x44, 0x75, 0xe4, 0x3b, 0x4b, 0x6f, 0x72, 0x3b, 0x50, 0x61, 0x79, 0x3b, 0x54, 0x68, 0x6f, 0x6f, 0x3b,
-0x54, 0x25b, 0x25b, 0x3b, 0x4c, 0x61, 0x61, 0x3b, 0x4b, 0x75, 0x72, 0x3b, 0x54, 0x69, 0x64, 0x3b, 0x54, 0x69, 0x6f, 0x70,
-0x20, 0x74, 0x68, 0x61, 0x72, 0x20, 0x70, 0x25b, 0x74, 0x3b, 0x50, 0x25b, 0x74, 0x3b, 0x44, 0x75, 0x254, 0x331, 0x254, 0x331,
-0x14b, 0x3b, 0x47, 0x75, 0x61, 0x6b, 0x3b, 0x44, 0x75, 0xe4, 0x74, 0x3b, 0x4b, 0x6f, 0x72, 0x6e, 0x79, 0x6f, 0x6f, 0x74,
-0x3b, 0x50, 0x61, 0x79, 0x20, 0x79, 0x69, 0x65, 0x331, 0x74, 0x6e, 0x69, 0x3b, 0x54, 0x68, 0x6f, 0x331, 0x6f, 0x331, 0x72,
-0x3b, 0x54, 0x25b, 0x25b, 0x72, 0x3b, 0x4c, 0x61, 0x61, 0x74, 0x68, 0x3b, 0x4b, 0x75, 0x72, 0x3b, 0x54, 0x69, 0x6f, 0x331,
-0x70, 0x20, 0x69, 0x6e, 0x20, 0x64, 0x69, 0x331, 0x69, 0x331, 0x74, 0x3b, 0x54, 0x3b, 0x50, 0x3b, 0x44, 0x3b, 0x47, 0x3b,
-0x44, 0x3b, 0x4b, 0x3b, 0x50, 0x3b, 0x54, 0x3b, 0x54, 0x3b, 0x4c, 0x3b, 0x4b, 0x3b, 0x54, 0x3b, 0x422, 0x43e, 0x445, 0x441,
-0x3b, 0x41e, 0x43b, 0x443, 0x43d, 0x3b, 0x41a, 0x43b, 0x43d, 0x3b, 0x41c, 0x441, 0x443, 0x3b, 0x42b, 0x430, 0x43c, 0x3b, 0x411, 0x44d,
-0x441, 0x3b, 0x41e, 0x442, 0x439, 0x3b, 0x410, 0x442, 0x440, 0x3b, 0x411, 0x43b, 0x495, 0x3b, 0x410, 0x43b, 0x442, 0x3b, 0x421, 0x44d,
-0x442, 0x3b, 0x410, 0x445, 0x441, 0x3b, 0x442, 0x43e, 0x445, 0x441, 0x443, 0x43d, 0x43d, 0x44c, 0x443, 0x3b, 0x43e, 0x43b, 0x443, 0x43d,
-0x43d, 0x44c, 0x443, 0x3b, 0x43a, 0x443, 0x43b, 0x443, 0x43d, 0x20, 0x442, 0x443, 0x442, 0x430, 0x440, 0x3b, 0x43c, 0x443, 0x443, 0x441,
-0x20, 0x443, 0x441, 0x442, 0x430, 0x440, 0x3b, 0x44b, 0x430, 0x43c, 0x20, 0x44b, 0x439, 0x430, 0x3b, 0x431, 0x44d, 0x441, 0x20, 0x44b,
-0x439, 0x430, 0x3b, 0x43e, 0x442, 0x20, 0x44b, 0x439, 0x430, 0x3b, 0x430, 0x442, 0x44b, 0x440, 0x434, 0x44c, 0x44b, 0x445, 0x20, 0x44b,
-0x439, 0x430, 0x3b, 0x431, 0x430, 0x43b, 0x430, 0x495, 0x430, 0x43d, 0x20, 0x44b, 0x439, 0x430, 0x3b, 0x430, 0x43b, 0x442, 0x44b, 0x43d,
-0x43d, 0x44c, 0x44b, 0x3b, 0x441, 0x44d, 0x442, 0x438, 0x43d, 0x43d, 0x44c, 0x438, 0x3b, 0x430, 0x445, 0x441, 0x44b, 0x43d, 0x43d, 0x44c,
-0x44b, 0x3b, 0x422, 0x3b, 0x41e, 0x3b, 0x41a, 0x3b, 0x41c, 0x3b, 0x42b, 0x3b, 0x411, 0x3b, 0x41e, 0x3b, 0x410, 0x3b, 0x411, 0x3b,
-0x410, 0x3b, 0x421, 0x3b, 0x410, 0x3b, 0x422, 0x43e, 0x445, 0x441, 0x443, 0x43d, 0x43d, 0x44c, 0x443, 0x3b, 0x41e, 0x43b, 0x443, 0x43d,
-0x43d, 0x44c, 0x443, 0x3b, 0x41a, 0x443, 0x43b, 0x443, 0x43d, 0x20, 0x442, 0x443, 0x442, 0x430, 0x440, 0x3b, 0x41c, 0x443, 0x443, 0x441,
-0x20, 0x443, 0x441, 0x442, 0x430, 0x440, 0x3b, 0x42b, 0x430, 0x43c, 0x20, 0x44b, 0x439, 0x44b, 0x43d, 0x3b, 0x411, 0x44d, 0x441, 0x20,
-0x44b, 0x439, 0x44b, 0x43d, 0x3b, 0x41e, 0x442, 0x20, 0x44b, 0x439, 0x44b, 0x43d, 0x3b, 0x410, 0x442, 0x44b, 0x440, 0x434, 0x44c, 0x44b,
-0x445, 0x20, 0x44b, 0x439, 0x44b, 0x43d, 0x3b, 0x411, 0x430, 0x43b, 0x430, 0x495, 0x430, 0x43d, 0x20, 0x44b, 0x439, 0x44b, 0x43d, 0x3b,
-0x410, 0x43b, 0x442, 0x44b, 0x43d, 0x43d, 0x44c, 0x44b, 0x3b, 0x421, 0x44d, 0x442, 0x438, 0x43d, 0x43d, 0x44c, 0x438, 0x3b, 0x430, 0x445,
-0x441, 0x44b, 0x43d, 0x43d, 0x44c, 0x44b, 0x3b, 0x4d, 0x75, 0x70, 0x3b, 0x4d, 0x77, 0x69, 0x3b, 0x4d, 0x73, 0x68, 0x3b, 0x4d,
-0x75, 0x6e, 0x3b, 0x4d, 0x61, 0x67, 0x3b, 0x4d, 0x75, 0x6a, 0x3b, 0x4d, 0x73, 0x70, 0x3b, 0x4d, 0x70, 0x67, 0x3b, 0x4d,
-0x79, 0x65, 0x3b, 0x4d, 0x6f, 0x6b, 0x3b, 0x4d, 0x75, 0x73, 0x3b, 0x4d, 0x75, 0x68, 0x3b, 0x4d, 0x75, 0x70, 0x61, 0x6c,
-0x61, 0x6e, 0x67, 0x75, 0x6c, 0x77, 0x61, 0x3b, 0x4d, 0x77, 0x69, 0x74, 0x6f, 0x70, 0x65, 0x3b, 0x4d, 0x75, 0x73, 0x68,
-0x65, 0x6e, 0x64, 0x65, 0x3b, 0x4d, 0x75, 0x6e, 0x79, 0x69, 0x3b, 0x4d, 0x75, 0x73, 0x68, 0x65, 0x6e, 0x64, 0x65, 0x20,
-0x4d, 0x61, 0x67, 0x61, 0x6c, 0x69, 0x3b, 0x4d, 0x75, 0x6a, 0x69, 0x6d, 0x62, 0x69, 0x3b, 0x4d, 0x75, 0x73, 0x68, 0x69,
-0x70, 0x65, 0x70, 0x6f, 0x3b, 0x4d, 0x75, 0x70, 0x75, 0x67, 0x75, 0x74, 0x6f, 0x3b, 0x4d, 0x75, 0x6e, 0x79, 0x65, 0x6e,
-0x73, 0x65, 0x3b, 0x4d, 0x6f, 0x6b, 0x68, 0x75, 0x3b, 0x4d, 0x75, 0x73, 0x6f, 0x6e, 0x67, 0x61, 0x6e, 0x64, 0x65, 0x6d,
-0x62, 0x77, 0x65, 0x3b, 0x4d, 0x75, 0x68, 0x61, 0x61, 0x6e, 0x6f, 0x3b, 0xa5a8, 0xa56a, 0xa583, 0x20, 0xa51e, 0xa56e, 0x3b, 0xa552,
-0xa561, 0xa59d, 0xa595, 0x3b, 0xa57e, 0xa5ba, 0x3b, 0xa5a2, 0xa595, 0x3b, 0xa591, 0xa571, 0x3b, 0x36, 0x3b, 0x37, 0x3b, 0xa5db, 0xa515, 0x3b,
-0xa562, 0xa54c, 0x3b, 0xa56d, 0xa583, 0x3b, 0xa51e, 0xa60b, 0xa554, 0xa57f, 0x20, 0xa578, 0xa583, 0xa5cf, 0x3b, 0xa5a8, 0xa56a, 0xa571, 0x20, 0xa5cf,
-0xa56e, 0x3b, 0x6c, 0x75, 0x75, 0x6b, 0x61, 0x6f, 0x20, 0x6b, 0x65, 0x6d, 0xe3, 0x3b, 0x253, 0x61, 0x6e, 0x64, 0x61, 0x253,
-0x75, 0x3b, 0x76, 0x254, 0x254, 0x3b, 0x66, 0x75, 0x6c, 0x75, 0x3b, 0x67, 0x6f, 0x6f, 0x3b, 0x36, 0x3b, 0x37, 0x3b, 0x6b,
-0x254, 0x6e, 0x64, 0x65, 0x3b, 0x73, 0x61, 0x61, 0x68, 0x3b, 0x67, 0x61, 0x6c, 0x6f, 0x3b, 0x6b, 0x65, 0x6e, 0x70, 0x6b,
-0x61, 0x74, 0x6f, 0x20, 0x253, 0x6f, 0x6c, 0x6f, 0x6c, 0x254, 0x3b, 0x6c, 0x75, 0x75, 0x6b, 0x61, 0x6f, 0x20, 0x6c, 0x254,
-0x6d, 0x61, 0x3b, 0x4a, 0x65, 0x6e, 0x3b, 0x48, 0x6f, 0x72, 0x3b, 0x4d, 0xe4, 0x72, 0x3b, 0x41, 0x62, 0x72, 0x3b, 0x4d,
-0x65, 0x69, 0x3b, 0x42, 0x72, 0xe1, 0x3b, 0x48, 0x65, 0x69, 0x3b, 0xd6, 0x69, 0x67, 0x3b, 0x48, 0x65, 0x72, 0x3b, 0x57,
-0xed, 0x6d, 0x3b, 0x57, 0x69, 0x6e, 0x3b, 0x43, 0x68, 0x72, 0x3b, 0x4a, 0x65, 0x6e, 0x6e, 0x65, 0x72, 0x3b, 0x48, 0x6f,
-0x72, 0x6e, 0x69, 0x67, 0x3b, 0x4d, 0xe4, 0x72, 0x7a, 0x65, 0x3b, 0x41, 0x62, 0x72, 0x69, 0x6c, 0x6c, 0x65, 0x3b, 0x4d,
-0x65, 0x69, 0x6a, 0x65, 0x3b, 0x42, 0x72, 0xe1, 0x10d, 0x65, 0x74, 0x3b, 0x48, 0x65, 0x69, 0x77, 0x65, 0x74, 0x3b, 0xd6,
-0x69, 0x67, 0x161, 0x74, 0x65, 0x3b, 0x48, 0x65, 0x72, 0x62, 0x161, 0x74, 0x6d, 0xe1, 0x6e, 0x65, 0x74, 0x3b, 0x57, 0xed,
-0x6d, 0xe1, 0x6e, 0x65, 0x74, 0x3b, 0x57, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0xe1, 0x6e, 0x65, 0x74, 0x3b, 0x43, 0x68,
-0x72, 0x69, 0x161, 0x74, 0x6d, 0xe1, 0x6e, 0x65, 0x74, 0x3b, 0x4a, 0x3b, 0x48, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b,
-0x42, 0x3b, 0x48, 0x3b, 0xd6, 0x3b, 0x48, 0x3b, 0x57, 0x3b, 0x57, 0x3b, 0x43, 0x3b, 0x6f, 0x2e, 0x31, 0x3b, 0x6f, 0x2e,
-0x32, 0x3b, 0x6f, 0x2e, 0x33, 0x3b, 0x6f, 0x2e, 0x34, 0x3b, 0x6f, 0x2e, 0x35, 0x3b, 0x6f, 0x2e, 0x36, 0x3b, 0x6f, 0x2e,
-0x37, 0x3b, 0x6f, 0x2e, 0x38, 0x3b, 0x6f, 0x2e, 0x39, 0x3b, 0x6f, 0x2e, 0x31, 0x30, 0x3b, 0x6f, 0x2e, 0x31, 0x31, 0x3b,
-0x6f, 0x2e, 0x31, 0x32, 0x3b, 0x70, 0x69, 0x6b, 0xed, 0x74, 0xed, 0x6b, 0xed, 0x74, 0x69, 0x65, 0x2c, 0x20, 0x6f, 0xf3,
-0x6c, 0xed, 0x20, 0xfa, 0x20, 0x6b, 0x75, 0x74, 0xfa, 0x61, 0x6e, 0x3b, 0x73, 0x69, 0x25b, 0x79, 0x25b, 0x301, 0x2c, 0x20,
-0x6f, 0xf3, 0x6c, 0x69, 0x20, 0xfa, 0x20, 0x6b, 0xe1, 0x6e, 0x64, 0xed, 0x25b, 0x3b, 0x254, 0x6e, 0x73, 0xfa, 0x6d, 0x62,
-0x254, 0x6c, 0x2c, 0x20, 0x6f, 0xf3, 0x6c, 0x69, 0x20, 0xfa, 0x20, 0x6b, 0xe1, 0x74, 0xe1, 0x74, 0xfa, 0x25b, 0x3b, 0x6d,
-0x65, 0x73, 0x69, 0x14b, 0x2c, 0x20, 0x6f, 0xf3, 0x6c, 0x69, 0x20, 0xfa, 0x20, 0x6b, 0xe9, 0x6e, 0x69, 0x65, 0x3b, 0x65,
-0x6e, 0x73, 0x69, 0x6c, 0x2c, 0x20, 0x6f, 0xf3, 0x6c, 0x69, 0x20, 0xfa, 0x20, 0x6b, 0xe1, 0x74, 0xe1, 0x6e, 0x75, 0x25b,
-0x3b, 0x254, 0x73, 0x254, 0x6e, 0x3b, 0x65, 0x66, 0x75, 0x74, 0x65, 0x3b, 0x70, 0x69, 0x73, 0x75, 0x79, 0xfa, 0x3b, 0x69,
-0x6d, 0x25b, 0x14b, 0x20, 0x69, 0x20, 0x70, 0x75, 0x254, 0x73, 0x3b, 0x69, 0x6d, 0x25b, 0x14b, 0x20, 0x69, 0x20, 0x70, 0x75,
-0x74, 0xfa, 0x6b, 0x2c, 0x6f, 0xf3, 0x6c, 0x69, 0x20, 0xfa, 0x20, 0x6b, 0xe1, 0x74, 0xed, 0x25b, 0x3b, 0x6d, 0x61, 0x6b,
-0x61, 0x6e, 0x64, 0x69, 0x6b, 0x25b, 0x3b, 0x70, 0x69, 0x6c, 0x254, 0x6e, 0x64, 0x254, 0x301, 0x3b, 0x58, 0x69, 0x6e, 0x3b,
-0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x62, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x58, 0x75, 0x6e, 0x3b,
-0x58, 0x6e, 0x74, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x63, 0x68, 0x3b, 0x50, 0x61, 0x79, 0x3b,
-0x41, 0x76, 0x69, 0x3b, 0x78, 0x69, 0x6e, 0x65, 0x72, 0x75, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x65, 0x72, 0x75, 0x3b, 0x6d,
-0x61, 0x72, 0x7a, 0x75, 0x3b, 0x61, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x61, 0x79, 0x75, 0x3b, 0x78, 0x75, 0x6e, 0x75,
-0x3b, 0x78, 0x75, 0x6e, 0x65, 0x74, 0x75, 0x3b, 0x61, 0x67, 0x6f, 0x73, 0x74, 0x75, 0x3b, 0x73, 0x65, 0x74, 0x69, 0x65,
-0x6d, 0x62, 0x72, 0x65, 0x3b, 0x6f, 0x63, 0x68, 0x6f, 0x62, 0x72, 0x65, 0x3b, 0x70, 0x61, 0x79, 0x61, 0x72, 0x65, 0x73,
-0x3b, 0x61, 0x76, 0x69, 0x65, 0x6e, 0x74, 0x75, 0x3b, 0x58, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x58,
-0x3b, 0x58, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x50, 0x3b, 0x41, 0x3b, 0x78, 0x69, 0x6e, 0x3b, 0x66, 0x65, 0x62,
-0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x61, 0x62, 0x72, 0x3b, 0x6d, 0x61, 0x79, 0x3b, 0x78, 0x75, 0x6e, 0x3b, 0x78, 0x6e, 0x74,
-0x3b, 0x61, 0x67, 0x6f, 0x3b, 0x73, 0x65, 0x74, 0x3b, 0x6f, 0x63, 0x68, 0x3b, 0x70, 0x61, 0x79, 0x3b, 0x61, 0x76, 0x69,
-0x3b, 0x64, 0x65, 0x20, 0x78, 0x69, 0x6e, 0x65, 0x72, 0x75, 0x3b, 0x64, 0x65, 0x20, 0x66, 0x65, 0x62, 0x72, 0x65, 0x72,
-0x75, 0x3b, 0x64, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x7a, 0x75, 0x3b, 0x64, 0x2019, 0x61, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x64,
-0x65, 0x20, 0x6d, 0x61, 0x79, 0x75, 0x3b, 0x64, 0x65, 0x20, 0x78, 0x75, 0x6e, 0x75, 0x3b, 0x64, 0x65, 0x20, 0x78, 0x75,
-0x6e, 0x65, 0x74, 0x75, 0x3b, 0x64, 0x2019, 0x61, 0x67, 0x6f, 0x73, 0x74, 0x75, 0x3b, 0x64, 0x65, 0x20, 0x73, 0x65, 0x74,
-0x69, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x64, 0x2019, 0x6f, 0x63, 0x68, 0x6f, 0x62, 0x72, 0x65, 0x3b, 0x64, 0x65, 0x20,
-0x70, 0x61, 0x79, 0x61, 0x72, 0x65, 0x73, 0x3b, 0x64, 0x2019, 0x61, 0x76, 0x69, 0x65, 0x6e, 0x74, 0x75, 0x3b, 0x4e, 0x64,
-0x75, 0x14b, 0x6d, 0x62, 0x69, 0x20, 0x53, 0x61, 0x14b, 0x3b, 0x50, 0x25b, 0x73, 0x61, 0x14b, 0x20, 0x50, 0x25b, 0x301, 0x70,
-0xe1, 0x3b, 0x50, 0x25b, 0x73, 0x61, 0x14b, 0x20, 0x50, 0x25b, 0x301, 0x74, 0xe1, 0x74, 0x3b, 0x50, 0x25b, 0x73, 0x61, 0x14b,
-0x20, 0x50, 0x25b, 0x301, 0x6e, 0x25b, 0x301, 0x6b, 0x77, 0x61, 0x3b, 0x50, 0x25b, 0x73, 0x61, 0x14b, 0x20, 0x50, 0x61, 0x74,
-0x61, 0x61, 0x3b, 0x50, 0x25b, 0x73, 0x61, 0x14b, 0x20, 0x50, 0x25b, 0x301, 0x6e, 0x25b, 0x301, 0x6e, 0x74, 0xfa, 0x6b, 0xfa,
-0x3b, 0x50, 0x25b, 0x73, 0x61, 0x14b, 0x20, 0x53, 0x61, 0x61, 0x6d, 0x62, 0xe1, 0x3b, 0x50, 0x25b, 0x73, 0x61, 0x14b, 0x20,
-0x50, 0x25b, 0x301, 0x6e, 0x25b, 0x301, 0x66, 0x254, 0x6d, 0x3b, 0x50, 0x25b, 0x73, 0x61, 0x14b, 0x20, 0x50, 0x25b, 0x301, 0x6e,
-0x25b, 0x301, 0x70, 0x66, 0xfa, 0xa78b, 0xfa, 0x3b, 0x50, 0x25b, 0x73, 0x61, 0x14b, 0x20, 0x4e, 0x25b, 0x67, 0x25b, 0x301, 0x6d,
-0x3b, 0x50, 0x25b, 0x73, 0x61, 0x14b, 0x20, 0x4e, 0x74, 0x73, 0x254, 0x30c, 0x70, 0x6d, 0x254, 0x301, 0x3b, 0x50, 0x25b, 0x73,
-0x61, 0x14b, 0x20, 0x4e, 0x74, 0x73, 0x254, 0x30c, 0x70, 0x70, 0xe1, 0x3b, 0x70, 0x61, 0x6d, 0x62, 0x61, 0x3b, 0x77, 0x61,
-0x6e, 0x6a, 0x61, 0x3b, 0x6d, 0x62, 0x69, 0x79, 0x254, 0x20, 0x6d, 0x25b, 0x6e, 0x64, 0x6f, 0x14b, 0x67, 0x254, 0x3b, 0x4e,
-0x79, 0x254, 0x6c, 0x254, 0x6d, 0x62, 0x254, 0x14b, 0x67, 0x254, 0x3b, 0x4d, 0x254, 0x6e, 0x254, 0x20, 0x14b, 0x67, 0x62, 0x61,
-0x6e, 0x6a, 0x61, 0x3b, 0x4e, 0x79, 0x61, 0x14b, 0x67, 0x77, 0x25b, 0x20, 0x14b, 0x67, 0x62, 0x61, 0x6e, 0x6a, 0x61, 0x3b,
-0x6b, 0x75, 0x14b, 0x67, 0x77, 0x25b, 0x3b, 0x66, 0x25b, 0x3b, 0x6e, 0x6a, 0x61, 0x70, 0x69, 0x3b, 0x6e, 0x79, 0x75, 0x6b,
-0x75, 0x6c, 0x3b, 0x31, 0x31, 0x3b, 0x253, 0x75, 0x6c, 0x253, 0x75, 0x73, 0x25b, 0x3b, 0x6d, 0x62, 0x65, 0x67, 0x74, 0x75,
-0x67, 0x3b, 0x69, 0x6d, 0x65, 0x67, 0x20, 0xe0, 0x62, 0xf9, 0x62, 0xec, 0x3b, 0x69, 0x6d, 0x65, 0x67, 0x20, 0x6d, 0x62,
-0x259, 0x14b, 0x63, 0x68, 0x75, 0x62, 0x69, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20, 0x6e, 0x67, 0x77, 0x259, 0x300, 0x74, 0x3b,
-0x69, 0x6d, 0x259, 0x67, 0x20, 0x66, 0x6f, 0x67, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20, 0x69, 0x63, 0x68, 0x69, 0x69, 0x62,
-0x254, 0x64, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20, 0xe0, 0x64, 0xf9, 0x6d, 0x62, 0x259, 0x300, 0x14b, 0x3b, 0x69, 0x6d, 0x259,
-0x67, 0x20, 0x69, 0x63, 0x68, 0x69, 0x6b, 0x61, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20, 0x6b, 0x75, 0x64, 0x3b, 0x69, 0x6d,
-0x259, 0x67, 0x20, 0x74, 0xe8, 0x73, 0x69, 0x2bc, 0x65, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20, 0x7a, 0xf2, 0x3b, 0x69, 0x6d,
-0x259, 0x67, 0x20, 0x6b, 0x72, 0x69, 0x7a, 0x6d, 0x65, 0x64, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20, 0x6d, 0x62, 0x65, 0x67,
-0x74, 0x75, 0x67, 0x3b, 0x69, 0x6d, 0x65, 0x67, 0x20, 0xe0, 0x62, 0xf9, 0x62, 0xec, 0x3b, 0x69, 0x6d, 0x65, 0x67, 0x20,
-0x6d, 0x62, 0x259, 0x14b, 0x63, 0x68, 0x75, 0x62, 0x69, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20, 0x6e, 0x67, 0x77, 0x259, 0x300,
-0x74, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20, 0x66, 0x6f, 0x67, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20, 0x69, 0x63, 0x68, 0x69,
-0x69, 0x62, 0x254, 0x64, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20, 0xe0, 0x64, 0xf9, 0x6d, 0x62, 0x259, 0x300, 0x14b, 0x3b, 0x69,
-0x6d, 0x259, 0x67, 0x20, 0x69, 0x63, 0x68, 0x69, 0x6b, 0x61, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20, 0x6b, 0x75, 0x64, 0x3b,
-0x69, 0x6d, 0x259, 0x67, 0x20, 0x74, 0xe8, 0x73, 0x69, 0x2bc, 0x65, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20, 0x7a, 0xf2, 0x3b,
-0x69, 0x6d, 0x259, 0x67, 0x20, 0x6b, 0x72, 0x69, 0x7a, 0x6d, 0x65, 0x64, 0x3b, 0x4d, 0x31, 0x3b, 0x41, 0x32, 0x3b, 0x4d,
-0x33, 0x3b, 0x4e, 0x34, 0x3b, 0x46, 0x35, 0x3b, 0x49, 0x36, 0x3b, 0x41, 0x37, 0x3b, 0x49, 0x38, 0x3b, 0x4b, 0x39, 0x3b,
-0x31, 0x30, 0x3b, 0x31, 0x31, 0x3b, 0x31, 0x32, 0x3b, 0x73, 0x61, 0x14b, 0x20, 0x74, 0x73, 0x65, 0x74, 0x73, 0x25b, 0x300,
-0x25b, 0x20, 0x6c, 0xf9, 0x6d, 0x3b, 0x73, 0x61, 0x14b, 0x20, 0x6b, 0xe0, 0x67, 0x20, 0x6e, 0x67, 0x77, 0xf3, 0x14b, 0x3b,
-0x73, 0x61, 0x14b, 0x20, 0x6c, 0x65, 0x70, 0x79, 0xe8, 0x20, 0x73, 0x68, 0xfa, 0x6d, 0x3b, 0x73, 0x61, 0x14b, 0x20, 0x63,
-0xff, 0xf3, 0x3b, 0x73, 0x61, 0x14b, 0x20, 0x74, 0x73, 0x25b, 0x300, 0x25b, 0x20, 0x63, 0xff, 0xf3, 0x3b, 0x73, 0x61, 0x14b,
-0x20, 0x6e, 0x6a, 0xff, 0x6f, 0x6c, 0xe1, 0x2bc, 0x3b, 0x73, 0x61, 0x14b, 0x20, 0x74, 0x79, 0x25b, 0x300, 0x62, 0x20, 0x74,
-0x79, 0x25b, 0x300, 0x62, 0x20, 0x6d, 0x62, 0x289, 0x300, 0x14b, 0x3b, 0x73, 0x61, 0x14b, 0x20, 0x6d, 0x62, 0x289, 0x300, 0x14b,
-0x3b, 0x73, 0x61, 0x14b, 0x20, 0x6e, 0x67, 0x77, 0x254, 0x300, 0x2bc, 0x20, 0x6d, 0x62, 0xff, 0x25b, 0x3b, 0x73, 0x61, 0x14b,
-0x20, 0x74, 0xe0, 0x14b, 0x61, 0x20, 0x74, 0x73, 0x65, 0x74, 0x73, 0xe1, 0x2bc, 0x3b, 0x73, 0x61, 0x14b, 0x20, 0x6d, 0x65,
-0x6a, 0x77, 0x6f, 0x14b, 0xf3, 0x3b, 0x73, 0x61, 0x14b, 0x20, 0x6c, 0xf9, 0x6d, 0x3b, 0x57, 0x69, 0xf3, 0x74, 0x68, 0x65,
-0x21f, 0x69, 0x6b, 0x61, 0x20, 0x57, 0xed, 0x3b, 0x54, 0x68, 0x69, 0x79, 0xf3, 0x21f, 0x65, 0x79, 0x75, 0x14b, 0x6b, 0x61,
-0x20, 0x57, 0xed, 0x3b, 0x49, 0x161, 0x74, 0xe1, 0x77, 0x69, 0x10d, 0x68, 0x61, 0x79, 0x61, 0x7a, 0x61, 0x14b, 0x20, 0x57,
-0xed, 0x3b, 0x50, 0x21f, 0x65, 0x17e, 0xed, 0x74, 0x21f, 0x6f, 0x20, 0x57, 0xed, 0x3b, 0x10c, 0x68, 0x61, 0x14b, 0x77, 0xe1,
-0x70, 0x65, 0x74, 0x21f, 0x6f, 0x20, 0x57, 0xed, 0x3b, 0x57, 0xed, 0x70, 0x61, 0x7a, 0x75, 0x6b, 0x21f, 0x61, 0x2d, 0x77,
-0x61, 0x161, 0x74, 0xe9, 0x20, 0x57, 0xed, 0x3b, 0x10c, 0x68, 0x61, 0x14b, 0x70, 0x21f, 0xe1, 0x73, 0x61, 0x70, 0x61, 0x20,
-0x57, 0xed, 0x3b, 0x57, 0x61, 0x73, 0xfa, 0x74, 0x21f, 0x75, 0x14b, 0x20, 0x57, 0xed, 0x3b, 0x10c, 0x68, 0x61, 0x14b, 0x77,
-0xe1, 0x70, 0x65, 0x1e7, 0x69, 0x20, 0x57, 0xed, 0x3b, 0x10c, 0x68, 0x61, 0x14b, 0x77, 0xe1, 0x70, 0x65, 0x2d, 0x6b, 0x61,
-0x73, 0x6e, 0xe1, 0x20, 0x57, 0xed, 0x3b, 0x57, 0x61, 0x6e, 0xed, 0x79, 0x65, 0x74, 0x75, 0x20, 0x57, 0xed, 0x3b, 0x54,
-0x21f, 0x61, 0x68, 0xe9, 0x6b, 0x61, 0x70, 0x161, 0x75, 0x14b, 0x20, 0x57, 0xed, 0x3b, 0x6a9, 0x627, 0x646, 0x648, 0x648, 0x646,
-0x6cc, 0x20, 0x62f, 0x648, 0x648, 0x6d5, 0x645, 0x3b, 0x634, 0x648, 0x628, 0x627, 0x62a, 0x3b, 0x626, 0x627, 0x632, 0x627, 0x631, 0x3b,
-0x646, 0x6cc, 0x633, 0x627, 0x646, 0x3b, 0x626, 0x627, 0x6cc, 0x627, 0x631, 0x3b, 0x62d, 0x648, 0x632, 0x6d5, 0x6cc, 0x631, 0x627, 0x646,
-0x3b, 0x62a, 0x6d5, 0x645, 0x648, 0x648, 0x632, 0x3b, 0x626, 0x627, 0x628, 0x3b, 0x626, 0x6d5, 0x6cc, 0x644, 0x648, 0x648, 0x644, 0x3b,
-0x62a, 0x634, 0x631, 0x6cc, 0x646, 0x6cc, 0x20, 0x6cc, 0x6d5, 0x6a9, 0x6d5, 0x645, 0x3b, 0x62a, 0x634, 0x631, 0x6cc, 0x646, 0x6cc, 0x20,
-0x62f, 0x648, 0x648, 0x6d5, 0x645, 0x3b, 0x6a9, 0x627, 0x646, 0x648, 0x646, 0x6cc, 0x20, 0x6cc, 0x6d5, 0x6a9, 0x6d5, 0x645, 0x3b, 0x6a9,
-0x3b, 0x634, 0x3b, 0x626, 0x3b, 0x646, 0x3b, 0x626, 0x3b, 0x62d, 0x3b, 0x62a, 0x3b, 0x626, 0x3b, 0x626, 0x3b, 0x62a, 0x3b, 0x62a,
-0x3b, 0x6a9, 0x3b, 0x6a, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x62, 0x3b, 0x6d, 0x11b, 0x72, 0x3b, 0x61, 0x70, 0x72, 0x3b, 0x6d,
-0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x3b, 0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x77, 0x67, 0x3b, 0x73, 0x65, 0x70, 0x3b, 0x6f,
-0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x77, 0x3b, 0x64, 0x65, 0x63, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b, 0x66, 0x65,
-0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x6d, 0x11b, 0x72, 0x63, 0x3b, 0x61, 0x70, 0x72, 0x79, 0x6c, 0x3b, 0x6d, 0x61, 0x6a,
-0x3b, 0x6a, 0x75, 0x6e, 0x69, 0x6a, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x6a, 0x3b, 0x61, 0x77, 0x67, 0x75, 0x73, 0x74, 0x3b,
-0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x6e, 0x6f,
-0x77, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6a, 0x61, 0x6e, 0x2e,
-0x3b, 0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x11b, 0x72, 0x2e, 0x3b, 0x61, 0x70, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x6a, 0x2e,
-0x3b, 0x6a, 0x75, 0x6e, 0x2e, 0x3b, 0x6a, 0x75, 0x6c, 0x2e, 0x3b, 0x61, 0x77, 0x67, 0x2e, 0x3b, 0x73, 0x65, 0x70, 0x2e,
-0x3b, 0x6f, 0x6b, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x77, 0x2e, 0x3b, 0x64, 0x65, 0x63, 0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0x75,
-0x61, 0x72, 0x61, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x61, 0x3b, 0x6d, 0x11b, 0x72, 0x63, 0x61, 0x3b, 0x61,
-0x70, 0x72, 0x79, 0x6c, 0x61, 0x3b, 0x6d, 0x61, 0x6a, 0x61, 0x3b, 0x6a, 0x75, 0x6e, 0x69, 0x6a, 0x61, 0x3b, 0x6a, 0x75,
-0x6c, 0x69, 0x6a, 0x61, 0x3b, 0x61, 0x77, 0x67, 0x75, 0x73, 0x74, 0x61, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62,
-0x72, 0x61, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x72, 0x61, 0x3b, 0x6e, 0x6f, 0x77, 0x65, 0x6d, 0x62, 0x72, 0x61, 0x3b,
-0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x72, 0x61, 0x3b, 0x6a, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x62, 0x3b, 0x6d, 0x11b, 0x72,
-0x3b, 0x61, 0x70, 0x72, 0x3b, 0x6d, 0x65, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x3b, 0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x77, 0x67,
-0x3b, 0x73, 0x65, 0x70, 0x3b, 0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x77, 0x3b, 0x64, 0x65, 0x63, 0x3b, 0x6a, 0x61, 0x6e,
-0x75, 0x61, 0x72, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x6d, 0x11b, 0x72, 0x63, 0x3b, 0x61, 0x70, 0x72,
-0x79, 0x6c, 0x3b, 0x6d, 0x65, 0x6a, 0x61, 0x3b, 0x6a, 0x75, 0x6e, 0x69, 0x6a, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x6a, 0x3b,
-0x61, 0x77, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6f, 0x6b, 0x74,
-0x6f, 0x62, 0x65, 0x72, 0x3b, 0x6e, 0x6f, 0x77, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62,
-0x65, 0x72, 0x3b, 0x6a, 0x61, 0x6e, 0x2e, 0x3b, 0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x11b, 0x72, 0x2e, 0x3b, 0x61, 0x70,
-0x72, 0x2e, 0x3b, 0x6d, 0x65, 0x6a, 0x2e, 0x3b, 0x6a, 0x75, 0x6e, 0x2e, 0x3b, 0x6a, 0x75, 0x6c, 0x2e, 0x3b, 0x61, 0x77,
-0x67, 0x2e, 0x3b, 0x73, 0x65, 0x70, 0x2e, 0x3b, 0x6f, 0x6b, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x77, 0x2e, 0x3b, 0x64, 0x65,
-0x63, 0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x61, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x61, 0x3b,
-0x6d, 0x11b, 0x72, 0x63, 0x61, 0x3b, 0x61, 0x70, 0x72, 0x79, 0x6c, 0x61, 0x3b, 0x6d, 0x65, 0x6a, 0x65, 0x3b, 0x6a, 0x75,
-0x6e, 0x69, 0x6a, 0x61, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x6a, 0x61, 0x3b, 0x61, 0x77, 0x67, 0x75, 0x73, 0x74, 0x61, 0x3b,
-0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x72, 0x61, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x72, 0x61, 0x3b, 0x6e, 0x6f,
-0x77, 0x65, 0x6d, 0x62, 0x72, 0x61, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x72, 0x61, 0x3b, 0x75, 0x111, 0x69, 0x76,
-0x3b, 0x6b, 0x75, 0x6f, 0x76, 0xe2, 0x3b, 0x6e, 0x6a, 0x75, 0x68, 0x10d, 0xe2, 0x3b, 0x63, 0x75, 0xe1, 0x14b, 0x75, 0x69,
-0x3b, 0x76, 0x79, 0x65, 0x73, 0x69, 0x3b, 0x6b, 0x65, 0x73, 0x69, 0x3b, 0x73, 0x79, 0x65, 0x69, 0x6e, 0x69, 0x3b, 0x70,
-0x6f, 0x72, 0x67, 0x65, 0x3b, 0x10d, 0x6f, 0x68, 0x10d, 0xe2, 0x3b, 0x72, 0x6f, 0x6f, 0x76, 0x76, 0xe2, 0x64, 0x3b, 0x73,
-0x6b, 0x61, 0x6d, 0x6d, 0xe2, 0x3b, 0x6a, 0x75, 0x6f, 0x76, 0x6c, 0xe2, 0x3b, 0x75, 0x111, 0x111, 0xe2, 0x69, 0x76, 0x65,
-0x6d, 0xe1, 0xe1, 0x6e, 0x75, 0x3b, 0x6b, 0x75, 0x6f, 0x76, 0xe2, 0x6d, 0xe1, 0xe1, 0x6e, 0x75, 0x3b, 0x6e, 0x6a, 0x75,
-0x68, 0x10d, 0xe2, 0x6d, 0xe1, 0xe1, 0x6e, 0x75, 0x3b, 0x63, 0x75, 0xe1, 0x14b, 0x75, 0x69, 0x6d, 0xe1, 0xe1, 0x6e, 0x75,
-0x3b, 0x76, 0x79, 0x65, 0x73, 0x69, 0x6d, 0xe1, 0xe1, 0x6e, 0x75, 0x3b, 0x6b, 0x65, 0x73, 0x69, 0x6d, 0xe1, 0xe1, 0x6e,
-0x75, 0x3b, 0x73, 0x79, 0x65, 0x69, 0x6e, 0x69, 0x6d, 0xe1, 0xe1, 0x6e, 0x75, 0x3b, 0x70, 0x6f, 0x72, 0x67, 0x65, 0x6d,
-0xe1, 0xe1, 0x6e, 0x75, 0x3b, 0x10d, 0x6f, 0x68, 0x10d, 0xe2, 0x6d, 0xe1, 0xe1, 0x6e, 0x75, 0x3b, 0x72, 0x6f, 0x6f, 0x76,
-0x76, 0xe2, 0x64, 0x6d, 0xe1, 0xe1, 0x6e, 0x75, 0x3b, 0x73, 0x6b, 0x61, 0x6d, 0x6d, 0xe2, 0x6d, 0xe1, 0xe1, 0x6e, 0x75,
-0x3b, 0x6a, 0x75, 0x6f, 0x76, 0x6c, 0xe2, 0x6d, 0xe1, 0xe1, 0x6e, 0x75, 0x3b, 0x55, 0x3b, 0x4b, 0x3b, 0x4e, 0x4a, 0x3b,
-0x43, 0x3b, 0x56, 0x3b, 0x4b, 0x3b, 0x53, 0x3b, 0x50, 0x3b, 0x10c, 0x3b, 0x52, 0x3b, 0x53, 0x3b, 0x4a, 0x3b, 0x62c, 0x627,
-0x646, 0x6a4, 0x6cc, 0x6d5, 0x3b, 0x641, 0x626, 0x6a4, 0x631, 0x6cc, 0x6d5, 0x3b, 0x645, 0x627, 0x631, 0x633, 0x3b, 0x622, 0x6a4, 0x631,
-0x6cc, 0x644, 0x3b, 0x645, 0x626, 0x6cc, 0x3b, 0x62c, 0x648, 0x659, 0x623, 0x646, 0x3b, 0x62c, 0x648, 0x659, 0x644, 0x627, 0x3b, 0x622,
-0x6af, 0x648, 0x633, 0x62a, 0x3b, 0x633, 0x626, 0x67e, 0x62a, 0x627, 0x645, 0x631, 0x3b, 0x626, 0x648, 0x6a9, 0x62a, 0x648, 0x6a4, 0x631,
-0x3b, 0x646, 0x648, 0x6a4, 0x627, 0x645, 0x631, 0x3b, 0x62f, 0x626, 0x633, 0x627, 0x645, 0x631, 0x3b
+0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x63, 0x3b,
+0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b,
+0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x63, 0x3b, 0x52, 0x61, 0x72, 0x3b,
+0x4d, 0x75, 0x6b, 0x3b, 0x4b, 0x77, 0x61, 0x3b, 0x44, 0x75, 0x6e, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x4d, 0x6f, 0x64, 0x3b,
+0x4a, 0x6f, 0x6c, 0x3b, 0x50, 0x65, 0x64, 0x3b, 0x53, 0x6f, 0x6b, 0x3b, 0x54, 0x69, 0x62, 0x3b, 0x4c, 0x61, 0x62, 0x3b,
+0x50, 0x6f, 0x6f, 0x3b, 0x4f, 0x72, 0x61, 0x72, 0x61, 0x3b, 0x4f, 0x6d, 0x75, 0x6b, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6d,
+0x67, 0x2019, 0x3b, 0x4f, 0x64, 0x75, 0x6e, 0x67, 0x2019, 0x65, 0x6c, 0x3b, 0x4f, 0x6d, 0x61, 0x72, 0x75, 0x6b, 0x3b, 0x4f,
+0x6d, 0x6f, 0x64, 0x6f, 0x6b, 0x2019, 0x6b, 0x69, 0x6e, 0x67, 0x2019, 0x6f, 0x6c, 0x3b, 0x4f, 0x6a, 0x6f, 0x6c, 0x61, 0x3b,
+0x4f, 0x70, 0x65, 0x64, 0x65, 0x6c, 0x3b, 0x4f, 0x73, 0x6f, 0x6b, 0x6f, 0x73, 0x6f, 0x6b, 0x6f, 0x6d, 0x61, 0x3b, 0x4f,
+0x74, 0x69, 0x62, 0x61, 0x72, 0x3b, 0x4f, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x3b, 0x4f, 0x70, 0x6f, 0x6f, 0x3b, 0x52, 0x3b,
+0x4d, 0x3b, 0x4b, 0x3b, 0x44, 0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x50, 0x3b, 0x53, 0x3b, 0x54, 0x3b, 0x4c, 0x3b,
+0x50, 0x3b, 0x17d, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x65, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x77, 0x69, 0x3b, 0x4d, 0x65,
+0x3b, 0x17d, 0x75, 0x77, 0x3b, 0x17d, 0x75, 0x79, 0x3b, 0x55, 0x74, 0x3b, 0x53, 0x65, 0x6b, 0x3b, 0x4f, 0x6b, 0x74, 0x3b,
+0x4e, 0x6f, 0x6f, 0x3b, 0x44, 0x65, 0x65, 0x3b, 0x17d, 0x61, 0x6e, 0x77, 0x69, 0x79, 0x65, 0x3b, 0x46, 0x65, 0x65, 0x77,
+0x69, 0x72, 0x69, 0x79, 0x65, 0x3b, 0x4d, 0x61, 0x72, 0x73, 0x69, 0x3b, 0x41, 0x77, 0x69, 0x72, 0x69, 0x6c, 0x3b, 0x4d,
+0x65, 0x3b, 0x17d, 0x75, 0x77, 0x65, 0x14b, 0x3b, 0x17d, 0x75, 0x79, 0x79, 0x65, 0x3b, 0x55, 0x74, 0x3b, 0x53, 0x65, 0x6b,
+0x74, 0x61, 0x6e, 0x62, 0x75, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x6f, 0x62, 0x75, 0x72, 0x3b, 0x4e, 0x6f, 0x6f, 0x77,
+0x61, 0x6e, 0x62, 0x75, 0x72, 0x3b, 0x44, 0x65, 0x65, 0x73, 0x61, 0x6e, 0x62, 0x75, 0x72, 0x3b, 0x17d, 0x3b, 0x46, 0x3b,
+0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x17d, 0x3b, 0x17d, 0x3b, 0x55, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b,
+0x44, 0x41, 0x43, 0x3b, 0x44, 0x41, 0x52, 0x3b, 0x44, 0x41, 0x44, 0x3b, 0x44, 0x41, 0x4e, 0x3b, 0x44, 0x41, 0x48, 0x3b,
+0x44, 0x41, 0x55, 0x3b, 0x44, 0x41, 0x4f, 0x3b, 0x44, 0x41, 0x42, 0x3b, 0x44, 0x4f, 0x43, 0x3b, 0x44, 0x41, 0x50, 0x3b,
+0x44, 0x47, 0x49, 0x3b, 0x44, 0x41, 0x47, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x63, 0x68, 0x69,
+0x65, 0x6c, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x72, 0x69, 0x79, 0x6f, 0x3b, 0x44, 0x77, 0x65,
+0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x64, 0x65, 0x6b, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x6e,
+0x67, 0x2019, 0x77, 0x65, 0x6e, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x62, 0x69, 0x63, 0x68, 0x3b,
+0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x75, 0x63, 0x68, 0x69, 0x65, 0x6c, 0x3b, 0x44, 0x77, 0x65, 0x20,
+0x6d, 0x61, 0x72, 0x20, 0x41, 0x62, 0x69, 0x72, 0x69, 0x79, 0x6f, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20,
+0x41, 0x62, 0x6f, 0x72, 0x6f, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x4f, 0x63, 0x68, 0x69, 0x6b, 0x6f,
+0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x70, 0x61, 0x72, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61,
+0x72, 0x20, 0x67, 0x69, 0x20, 0x61, 0x63, 0x68, 0x69, 0x65, 0x6c, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20,
+0x41, 0x70, 0x61, 0x72, 0x20, 0x67, 0x69, 0x20, 0x61, 0x72, 0x69, 0x79, 0x6f, 0x3b, 0x43, 0x3b, 0x52, 0x3b, 0x44, 0x3b,
+0x4e, 0x3b, 0x42, 0x3b, 0x55, 0x3b, 0x42, 0x3b, 0x42, 0x3b, 0x43, 0x3b, 0x50, 0x3b, 0x43, 0x3b, 0x50, 0x3b, 0x59, 0x65,
+0x6e, 0x3b, 0x59, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x49, 0x62, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x59, 0x75,
+0x6e, 0x3b, 0x59, 0x75, 0x6c, 0x3b, 0x194, 0x75, 0x63, 0x3b, 0x43, 0x75, 0x74, 0x3b, 0x4b, 0x1e6d, 0x75, 0x3b, 0x4e, 0x77,
+0x61, 0x3b, 0x44, 0x75, 0x6a, 0x3b, 0x59, 0x65, 0x6e, 0x6e, 0x61, 0x79, 0x65, 0x72, 0x3b, 0x59, 0x65, 0x62, 0x72, 0x61,
+0x79, 0x65, 0x72, 0x3b, 0x4d, 0x61, 0x72, 0x73, 0x3b, 0x49, 0x62, 0x72, 0x69, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x79, 0x75,
+0x3b, 0x59, 0x75, 0x6e, 0x79, 0x75, 0x3b, 0x59, 0x75, 0x6c, 0x79, 0x75, 0x7a, 0x3b, 0x194, 0x75, 0x63, 0x74, 0x3b, 0x43,
+0x75, 0x74, 0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b, 0x4b, 0x1e6d, 0x75, 0x62, 0x65, 0x72, 0x3b, 0x4e, 0x77, 0x61, 0x6e, 0x62,
+0x69, 0x72, 0x3b, 0x44, 0x75, 0x6a, 0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b, 0x59, 0x3b, 0x59, 0x3b, 0x4d, 0x3b, 0x49, 0x3b,
+0x4d, 0x3b, 0x59, 0x3b, 0x59, 0x3b, 0x194, 0x3b, 0x43, 0x3b, 0x4b, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x4a, 0x61, 0x6e, 0x75,
+0x61, 0x6c, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x6c, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x41,
+0x70, 0x6c, 0x69, 0x6c, 0x69, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x69,
+0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74,
+0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b,
+0x91c, 0x93e, 0x928, 0x941, 0x935, 0x93e, 0x930, 0x940, 0x3b, 0x92b, 0x947, 0x92c, 0x94d, 0x930, 0x941, 0x935, 0x93e, 0x930, 0x940, 0x3b,
+0x92e, 0x93e, 0x930, 0x94d, 0x938, 0x3b, 0x90f, 0x92b, 0x94d, 0x930, 0x93f, 0x932, 0x3b, 0x92e, 0x947, 0x3b, 0x91c, 0x941, 0x928, 0x3b,
+0x91c, 0x941, 0x932, 0x93e, 0x907, 0x3b, 0x906, 0x917, 0x938, 0x94d, 0x925, 0x3b, 0x938, 0x947, 0x92c, 0x925, 0x947, 0x91c, 0x94d, 0x92c,
+0x93c, 0x930, 0x3b, 0x905, 0x916, 0x925, 0x92c, 0x930, 0x3b, 0x928, 0x92c, 0x947, 0x91c, 0x94d, 0x92c, 0x93c, 0x930, 0x3b, 0x926, 0x93f,
+0x938, 0x947, 0x91c, 0x94d, 0x92c, 0x93c, 0x930, 0x3b, 0x91c, 0x3b, 0x92b, 0x947, 0x3b, 0x92e, 0x93e, 0x3b, 0x90f, 0x3b, 0x92e, 0x947,
+0x3b, 0x91c, 0x941, 0x3b, 0x91c, 0x941, 0x3b, 0x906, 0x3b, 0x938, 0x947, 0x3b, 0x905, 0x3b, 0x928, 0x3b, 0x926, 0x93f, 0x3b, 0x456,
+0x486, 0x430, 0x2de9, 0x487, 0x3b, 0x444, 0x435, 0x2de1, 0x487, 0x3b, 0x43c, 0x430, 0x2dec, 0x487, 0x3b, 0x430, 0x486, 0x43f, 0x2dec, 0x487,
+0x3b, 0x43c, 0x430, 0xa675, 0x3b, 0x456, 0x486, 0xa64b, 0x2de9, 0x487, 0x3b, 0x456, 0x486, 0xa64b, 0x2de7, 0x487, 0x3b, 0x430, 0x486, 0x301,
+0x475, 0x2de2, 0x487, 0x3b, 0x441, 0x435, 0x2deb, 0x487, 0x3b, 0x47b, 0x486, 0x43a, 0x2dee, 0x3b, 0x43d, 0x43e, 0x435, 0x2de8, 0x3b, 0x434,
+0x435, 0x2de6, 0x487, 0x3b, 0x456, 0x486, 0x430, 0x43d, 0x43d, 0xa64b, 0x430, 0x301, 0x440, 0x457, 0x439, 0x3b, 0x444, 0x435, 0x432, 0x440,
+0xa64b, 0x430, 0x301, 0x440, 0x457, 0x439, 0x3b, 0x43c, 0x430, 0x301, 0x440, 0x442, 0x44a, 0x3b, 0x430, 0x486, 0x43f, 0x440, 0x456, 0x301,
+0x43b, 0x43b, 0x457, 0x439, 0x3b, 0x43c, 0x430, 0x301, 0x457, 0x439, 0x3b, 0x456, 0x486, 0xa64b, 0x301, 0x43d, 0x457, 0x439, 0x3b, 0x456,
+0x486, 0xa64b, 0x301, 0x43b, 0x457, 0x439, 0x3b, 0x430, 0x486, 0x301, 0x475, 0x433, 0xa64b, 0x441, 0x442, 0x44a, 0x3b, 0x441, 0x435, 0x43f,
+0x442, 0x435, 0x301, 0x43c, 0x432, 0x440, 0x457, 0x439, 0x3b, 0x47b, 0x486, 0x43a, 0x442, 0x461, 0x301, 0x432, 0x440, 0x457, 0x439, 0x3b,
+0x43d, 0x43e, 0x435, 0x301, 0x43c, 0x432, 0x440, 0x457, 0x439, 0x3b, 0x434, 0x435, 0x43a, 0x435, 0x301, 0x43c, 0x432, 0x440, 0x457, 0x439,
+0x3b, 0x406, 0x486, 0x3b, 0x424, 0x3b, 0x41c, 0x3b, 0x410, 0x486, 0x3b, 0x41c, 0x3b, 0x406, 0x486, 0x3b, 0x406, 0x486, 0x3b, 0x410,
+0x486, 0x3b, 0x421, 0x3b, 0x47a, 0x486, 0x3b, 0x41d, 0x3b, 0x414, 0x3b, 0x456, 0x486, 0x430, 0x43d, 0x43d, 0xa64b, 0x430, 0x301, 0x440,
+0x457, 0x430, 0x3b, 0x444, 0x435, 0x432, 0x440, 0xa64b, 0x430, 0x301, 0x440, 0x457, 0x430, 0x3b, 0x43c, 0x430, 0x301, 0x440, 0x442, 0x430,
+0x3b, 0x430, 0x486, 0x43f, 0x440, 0x456, 0x301, 0x43b, 0x43b, 0x457, 0x430, 0x3b, 0x43c, 0x430, 0x301, 0x457, 0x430, 0x3b, 0x456, 0x486,
+0xa64b, 0x301, 0x43d, 0x457, 0x430, 0x3b, 0x456, 0x486, 0xa64b, 0x301, 0x43b, 0x457, 0x430, 0x3b, 0x430, 0x486, 0x301, 0x475, 0x433, 0xa64b,
+0x441, 0x442, 0x430, 0x3b, 0x441, 0x435, 0x43f, 0x442, 0x435, 0x301, 0x43c, 0x432, 0x440, 0x457, 0x430, 0x3b, 0x47b, 0x486, 0x43a, 0x442,
+0x461, 0x301, 0x432, 0x440, 0x457, 0x430, 0x3b, 0x43d, 0x43e, 0x435, 0x301, 0x43c, 0x432, 0x440, 0x457, 0x430, 0x3b, 0x434, 0x435, 0x43a,
+0x435, 0x301, 0x43c, 0x432, 0x440, 0x457, 0x430, 0x3b, 0x43, 0x69, 0x6f, 0x3b, 0x4c, 0x75, 0x69, 0x3b, 0x4c, 0x75, 0x73, 0x3b,
+0x4d, 0x75, 0x75, 0x3b, 0x4c, 0x75, 0x6d, 0x3b, 0x4c, 0x75, 0x66, 0x3b, 0x4b, 0x61, 0x62, 0x3b, 0x4c, 0x75, 0x73, 0x68,
+0x3b, 0x4c, 0x75, 0x74, 0x3b, 0x4c, 0x75, 0x6e, 0x3b, 0x4b, 0x61, 0x73, 0x3b, 0x43, 0x69, 0x73, 0x3b, 0x43, 0x69, 0x6f,
+0x6e, 0x67, 0x6f, 0x3b, 0x4c, 0xf9, 0x69, 0x73, 0x68, 0x69, 0x3b, 0x4c, 0x75, 0x73, 0xf2, 0x6c, 0x6f, 0x3b, 0x4d, 0xf9,
+0x75, 0x79, 0xe0, 0x3b, 0x4c, 0x75, 0x6d, 0xf9, 0x6e, 0x67, 0xf9, 0x6c, 0xf9, 0x3b, 0x4c, 0x75, 0x66, 0x75, 0x69, 0x6d,
+0x69, 0x3b, 0x4b, 0x61, 0x62, 0xe0, 0x6c, 0xe0, 0x73, 0x68, 0xec, 0x70, 0xf9, 0x3b, 0x4c, 0xf9, 0x73, 0x68, 0xec, 0x6b,
+0xe0, 0x3b, 0x4c, 0x75, 0x74, 0x6f, 0x6e, 0x67, 0x6f, 0x6c, 0x6f, 0x3b, 0x4c, 0x75, 0x6e, 0x67, 0xf9, 0x64, 0x69, 0x3b,
+0x4b, 0x61, 0x73, 0x77, 0xe8, 0x6b, 0xe8, 0x73, 0xe8, 0x3b, 0x43, 0x69, 0x73, 0x77, 0xe0, 0x3b, 0x43, 0x3b, 0x4c, 0x3b,
+0x4c, 0x3b, 0x4d, 0x3b, 0x4c, 0x3b, 0x4c, 0x3b, 0x4b, 0x3b, 0x4c, 0x3b, 0x4c, 0x3b, 0x4c, 0x3b, 0x4b, 0x3b, 0x43, 0x3b,
+0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0xe4, 0x65, 0x3b, 0x41, 0x62, 0x72, 0x3b, 0x4d, 0x65, 0x65, 0x3b,
+0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x75, 0x67, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b,
+0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x7a, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75,
+0x61, 0x72, 0x3b, 0x4d, 0xe4, 0x65, 0x72, 0x7a, 0x3b, 0x41, 0x62, 0x72, 0xeb, 0x6c, 0x6c, 0x3b, 0x4d, 0x65, 0x65, 0x3b,
+0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x69, 0x3b, 0x41, 0x75, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x53, 0x65, 0x70,
+0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d,
+0x62, 0x65, 0x72, 0x3b, 0x44, 0x65, 0x7a, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4a, 0x61, 0x6e, 0x2e, 0x3b, 0x46, 0x65,
+0x62, 0x2e, 0x3b, 0x4d, 0xe4, 0x65, 0x2e, 0x3b, 0x41, 0x62, 0x72, 0x2e, 0x3b, 0x4d, 0x65, 0x65, 0x3b, 0x4a, 0x75, 0x6e,
+0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x69, 0x3b, 0x41, 0x75, 0x67, 0x2e, 0x3b, 0x53, 0x65, 0x70, 0x2e, 0x3b, 0x4f, 0x6b, 0x74,
+0x2e, 0x3b, 0x4e, 0x6f, 0x76, 0x2e, 0x3b, 0x44, 0x65, 0x7a, 0x2e, 0x3b, 0x6e, 0xf9, 0x6d, 0x3b, 0x6b, 0x268, 0x7a, 0x3b,
+0x74, 0x268, 0x64, 0x3b, 0x74, 0x61, 0x61, 0x3b, 0x73, 0x65, 0x65, 0x3b, 0x6e, 0x7a, 0x75, 0x3b, 0x64, 0x75, 0x6d, 0x3b,
+0x66, 0x254, 0x65, 0x3b, 0x64, 0x7a, 0x75, 0x3b, 0x6c, 0x254, 0x6d, 0x3b, 0x6b, 0x61, 0x61, 0x3b, 0x66, 0x77, 0x6f, 0x3b,
+0x6e, 0x64, 0x7a, 0x254, 0x300, 0x14b, 0x254, 0x300, 0x6e, 0xf9, 0x6d, 0x3b, 0x6e, 0x64, 0x7a, 0x254, 0x300, 0x14b, 0x254, 0x300,
+0x6b, 0x197, 0x300, 0x7a, 0xf9, 0x294, 0x3b, 0x6e, 0x64, 0x7a, 0x254, 0x300, 0x14b, 0x254, 0x300, 0x74, 0x197, 0x300, 0x64, 0x289,
+0x300, 0x67, 0x68, 0xe0, 0x3b, 0x6e, 0x64, 0x7a, 0x254, 0x300, 0x14b, 0x254, 0x300, 0x74, 0x1ce, 0x61, 0x66, 0x289, 0x304, 0x67,
+0x68, 0x101, 0x3b, 0x6e, 0x64, 0x7a, 0x254, 0x300, 0x14b, 0xe8, 0x73, 0xe8, 0x65, 0x3b, 0x6e, 0x64, 0x7a, 0x254, 0x300, 0x14b,
+0x254, 0x300, 0x6e, 0x7a, 0xf9, 0x67, 0x68, 0xf2, 0x3b, 0x6e, 0x64, 0x7a, 0x254, 0x300, 0x14b, 0x254, 0x300, 0x64, 0xf9, 0x6d,
+0x6c, 0x6f, 0x3b, 0x6e, 0x64, 0x7a, 0x254, 0x300, 0x14b, 0x254, 0x300, 0x6b, 0x77, 0xee, 0x66, 0x254, 0x300, 0x65, 0x3b, 0x6e,
+0x64, 0x7a, 0x254, 0x300, 0x14b, 0x254, 0x300, 0x74, 0x197, 0x300, 0x66, 0x289, 0x300, 0x67, 0x68, 0xe0, 0x64, 0x7a, 0x75, 0x67,
+0x68, 0xf9, 0x3b, 0x6e, 0x64, 0x7a, 0x254, 0x300, 0x14b, 0x254, 0x300, 0x67, 0x68, 0x1d4, 0x75, 0x77, 0x65, 0x6c, 0x254, 0x300,
+0x6d, 0x3b, 0x6e, 0x64, 0x7a, 0x254, 0x300, 0x14b, 0x254, 0x300, 0x63, 0x68, 0x77, 0x61, 0x294, 0xe0, 0x6b, 0x61, 0x61, 0x20,
+0x77, 0x6f, 0x3b, 0x6e, 0x64, 0x7a, 0x254, 0x300, 0x14b, 0xe8, 0x66, 0x77, 0xf2, 0x6f, 0x3b, 0x6e, 0x3b, 0x6b, 0x3b, 0x74,
+0x3b, 0x74, 0x3b, 0x73, 0x3b, 0x7a, 0x3b, 0x6b, 0x3b, 0x66, 0x3b, 0x64, 0x3b, 0x6c, 0x3b, 0x63, 0x3b, 0x66, 0x3b, 0x6b,
+0x254, 0x6e, 0x3b, 0x6d, 0x61, 0x63, 0x3b, 0x6d, 0x61, 0x74, 0x3b, 0x6d, 0x74, 0x6f, 0x3b, 0x6d, 0x70, 0x75, 0x3b, 0x68,
+0x69, 0x6c, 0x3b, 0x6e, 0x6a, 0x65, 0x3b, 0x68, 0x69, 0x6b, 0x3b, 0x64, 0x69, 0x70, 0x3b, 0x62, 0x69, 0x6f, 0x3b, 0x6d,
+0x61, 0x79, 0x3b, 0x6c, 0x69, 0x253, 0x3b, 0x4b, 0x254, 0x6e, 0x64, 0x254, 0x14b, 0x3b, 0x4d, 0xe0, 0x63, 0x25b, 0x302, 0x6c,
+0x3b, 0x4d, 0xe0, 0x74, 0xf9, 0x6d, 0x62, 0x3b, 0x4d, 0xe0, 0x74, 0x6f, 0x70, 0x3b, 0x4d, 0x300, 0x70, 0x75, 0x79, 0x25b,
+0x3b, 0x48, 0xec, 0x6c, 0xf2, 0x6e, 0x64, 0x25b, 0x300, 0x3b, 0x4e, 0x6a, 0xe8, 0x62, 0xe0, 0x3b, 0x48, 0xec, 0x6b, 0x61,
+0x14b, 0x3b, 0x44, 0xec, 0x70, 0x254, 0x300, 0x73, 0x3b, 0x42, 0xec, 0xf2, 0xf4, 0x6d, 0x3b, 0x4d, 0xe0, 0x79, 0x25b, 0x73,
+0xe8, 0x70, 0x3b, 0x4c, 0xec, 0x62, 0x75, 0x79, 0x20, 0x6c, 0x69, 0x20, 0x144, 0x79, 0xe8, 0x65, 0x3b, 0x6b, 0x3b, 0x6d,
+0x3b, 0x6d, 0x3b, 0x6d, 0x3b, 0x6d, 0x3b, 0x68, 0x3b, 0x6e, 0x3b, 0x68, 0x3b, 0x64, 0x3b, 0x62, 0x3b, 0x6d, 0x3b, 0x6c,
+0x3b, 0x64, 0x69, 0x3b, 0x14b, 0x67, 0x254, 0x6e, 0x3b, 0x73, 0x254, 0x14b, 0x3b, 0x64, 0x69, 0x253, 0x3b, 0x65, 0x6d, 0x69,
+0x3b, 0x65, 0x73, 0x254, 0x3b, 0x6d, 0x61, 0x64, 0x3b, 0x64, 0x69, 0x14b, 0x3b, 0x6e, 0x79, 0x25b, 0x74, 0x3b, 0x6d, 0x61,
+0x79, 0x3b, 0x74, 0x69, 0x6e, 0x3b, 0x65, 0x6c, 0xe1, 0x3b, 0x64, 0x69, 0x6d, 0x254, 0x301, 0x64, 0x69, 0x3b, 0x14b, 0x67,
+0x254, 0x6e, 0x64, 0x25b, 0x3b, 0x73, 0x254, 0x14b, 0x25b, 0x3b, 0x64, 0x69, 0x253, 0xe1, 0x253, 0xe1, 0x3b, 0x65, 0x6d, 0x69,
+0x61, 0x73, 0x65, 0x6c, 0x65, 0x3b, 0x65, 0x73, 0x254, 0x70, 0x25b, 0x73, 0x254, 0x70, 0x25b, 0x3b, 0x6d, 0x61, 0x64, 0x69,
+0x253, 0x25b, 0x301, 0x64, 0xed, 0x253, 0x25b, 0x301, 0x3b, 0x64, 0x69, 0x14b, 0x67, 0x69, 0x6e, 0x64, 0x69, 0x3b, 0x6e, 0x79,
+0x25b, 0x74, 0x25b, 0x6b, 0x69, 0x3b, 0x6d, 0x61, 0x79, 0xe9, 0x73, 0x25b, 0x301, 0x3b, 0x74, 0x69, 0x6e, 0xed, 0x6e, 0xed,
+0x3b, 0x65, 0x6c, 0xe1, 0x14b, 0x67, 0x25b, 0x301, 0x3b, 0x64, 0x3b, 0x14b, 0x3b, 0x73, 0x3b, 0x64, 0x3b, 0x65, 0x3b, 0x65,
+0x3b, 0x6d, 0x3b, 0x64, 0x3b, 0x6e, 0x3b, 0x6d, 0x3b, 0x74, 0x3b, 0x65, 0x3b, 0x53, 0x61, 0x3b, 0x46, 0x65, 0x3b, 0x4d,
+0x61, 0x3b, 0x41, 0x62, 0x3b, 0x4d, 0x65, 0x3b, 0x53, 0x75, 0x3b, 0x53, 0xfa, 0x3b, 0x55, 0x74, 0x3b, 0x53, 0x65, 0x3b,
+0x4f, 0x6b, 0x3b, 0x4e, 0x6f, 0x3b, 0x44, 0x65, 0x3b, 0x53, 0x61, 0x6e, 0x76, 0x69, 0x65, 0x3b, 0x46, 0xe9, 0x62, 0x69,
+0x72, 0x69, 0x65, 0x3b, 0x4d, 0x61, 0x72, 0x73, 0x3b, 0x41, 0x62, 0x75, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x65, 0x65, 0x3b,
+0x53, 0x75, 0x65, 0x14b, 0x3b, 0x53, 0xfa, 0x75, 0x79, 0x65, 0x65, 0x3b, 0x55, 0x74, 0x3b, 0x53, 0x65, 0x74, 0x74, 0x65,
+0x6d, 0x62, 0x61, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61,
+0x72, 0x3b, 0x44, 0x69, 0x73, 0x61, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x53, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d,
+0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x55, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x6e, 0x67, 0x6f, 0x3b, 0x6e,
+0x67, 0x62, 0x3b, 0x6e, 0x67, 0x6c, 0x3b, 0x6e, 0x67, 0x6e, 0x3b, 0x6e, 0x67, 0x74, 0x3b, 0x6e, 0x67, 0x73, 0x3b, 0x6e,
+0x67, 0x7a, 0x3b, 0x6e, 0x67, 0x6d, 0x3b, 0x6e, 0x67, 0x65, 0x3b, 0x6e, 0x67, 0x61, 0x3b, 0x6e, 0x67, 0x61, 0x64, 0x3b,
+0x6e, 0x67, 0x61, 0x62, 0x3b, 0x6e, 0x67, 0x254, 0x6e, 0x20, 0x6f, 0x73, 0xfa, 0x3b, 0x6e, 0x67, 0x254, 0x6e, 0x20, 0x62,
+0x25b, 0x30c, 0x3b, 0x6e, 0x67, 0x254, 0x6e, 0x20, 0x6c, 0xe1, 0x6c, 0x61, 0x3b, 0x6e, 0x67, 0x254, 0x6e, 0x20, 0x6e, 0x79,
+0x69, 0x6e, 0x61, 0x3b, 0x6e, 0x67, 0x254, 0x6e, 0x20, 0x74, 0xe1, 0x6e, 0x61, 0x3b, 0x6e, 0x67, 0x254, 0x6e, 0x20, 0x73,
+0x61, 0x6d, 0x259, 0x6e, 0x61, 0x3b, 0x6e, 0x67, 0x254, 0x6e, 0x20, 0x7a, 0x61, 0x6d, 0x67, 0x62, 0xe1, 0x6c, 0x61, 0x3b,
+0x6e, 0x67, 0x254, 0x6e, 0x20, 0x6d, 0x77, 0x6f, 0x6d, 0x3b, 0x6e, 0x67, 0x254, 0x6e, 0x20, 0x65, 0x62, 0x75, 0x6c, 0xfa,
+0x3b, 0x6e, 0x67, 0x254, 0x6e, 0x20, 0x61, 0x77, 0xf3, 0x6d, 0x3b, 0x6e, 0x67, 0x254, 0x6e, 0x20, 0x61, 0x77, 0xf3, 0x6d,
+0x20, 0x61, 0x69, 0x20, 0x64, 0x7a, 0x69, 0xe1, 0x3b, 0x6e, 0x67, 0x254, 0x6e, 0x20, 0x61, 0x77, 0xf3, 0x6d, 0x20, 0x61,
+0x69, 0x20, 0x62, 0x25b, 0x30c, 0x3b, 0x6f, 0x3b, 0x62, 0x3b, 0x6c, 0x3b, 0x6e, 0x3b, 0x74, 0x3b, 0x73, 0x3b, 0x7a, 0x3b,
+0x6d, 0x3b, 0x65, 0x3b, 0x61, 0x3b, 0x64, 0x3b, 0x62, 0x3b, 0x14b, 0x31, 0x3b, 0x14b, 0x32, 0x3b, 0x14b, 0x33, 0x3b, 0x14b,
+0x34, 0x3b, 0x14b, 0x35, 0x3b, 0x14b, 0x36, 0x3b, 0x14b, 0x37, 0x3b, 0x14b, 0x38, 0x3b, 0x14b, 0x39, 0x3b, 0x14b, 0x31, 0x30,
+0x3b, 0x14b, 0x31, 0x31, 0x3b, 0x14b, 0x31, 0x32, 0x3b, 0x14b, 0x77, 0xed, 0xed, 0x20, 0x61, 0x20, 0x6e, 0x74, 0x254, 0x301,
+0x6e, 0x74, 0x254, 0x3b, 0x14b, 0x77, 0xed, 0xed, 0x20, 0x61, 0x6b, 0x1dd, 0x20, 0x62, 0x25b, 0x301, 0x25b, 0x3b, 0x14b, 0x77,
+0xed, 0xed, 0x20, 0x61, 0x6b, 0x1dd, 0x20, 0x72, 0xe1, 0xe1, 0x3b, 0x14b, 0x77, 0xed, 0xed, 0x20, 0x61, 0x6b, 0x1dd, 0x20,
+0x6e, 0x69, 0x6e, 0x3b, 0x14b, 0x77, 0xed, 0xed, 0x20, 0x61, 0x6b, 0x1dd, 0x20, 0x74, 0xe1, 0x61, 0x6e, 0x3b, 0x14b, 0x77,
+0xed, 0xed, 0x20, 0x61, 0x6b, 0x1dd, 0x20, 0x74, 0xe1, 0x61, 0x66, 0x254, 0x6b, 0x3b, 0x14b, 0x77, 0xed, 0xed, 0x20, 0x61,
+0x6b, 0x1dd, 0x20, 0x74, 0xe1, 0x61, 0x62, 0x25b, 0x25b, 0x3b, 0x14b, 0x77, 0xed, 0xed, 0x20, 0x61, 0x6b, 0x1dd, 0x20, 0x74,
+0xe1, 0x61, 0x72, 0x61, 0x61, 0x3b, 0x14b, 0x77, 0xed, 0xed, 0x20, 0x61, 0x6b, 0x1dd, 0x20, 0x74, 0xe1, 0x61, 0x6e, 0x69,
+0x6e, 0x3b, 0x14b, 0x77, 0xed, 0xed, 0x20, 0x61, 0x6b, 0x1dd, 0x20, 0x6e, 0x74, 0x25b, 0x6b, 0x3b, 0x14b, 0x77, 0xed, 0xed,
+0x20, 0x61, 0x6b, 0x1dd, 0x20, 0x6e, 0x74, 0x25b, 0x6b, 0x20, 0x64, 0x69, 0x20, 0x62, 0x254, 0x301, 0x6b, 0x3b, 0x14b, 0x77,
+0xed, 0xed, 0x20, 0x61, 0x6b, 0x1dd, 0x20, 0x6e, 0x74, 0x25b, 0x6b, 0x20, 0x64, 0x69, 0x20, 0x62, 0x25b, 0x301, 0x25b, 0x3b,
+0x4b, 0x77, 0x61, 0x3b, 0x55, 0x6e, 0x61, 0x3b, 0x52, 0x61, 0x72, 0x3b, 0x43, 0x68, 0x65, 0x3b, 0x54, 0x68, 0x61, 0x3b,
+0x4d, 0x6f, 0x63, 0x3b, 0x53, 0x61, 0x62, 0x3b, 0x4e, 0x61, 0x6e, 0x3b, 0x54, 0x69, 0x73, 0x3b, 0x4b, 0x75, 0x6d, 0x3b,
+0x4d, 0x6f, 0x6a, 0x3b, 0x59, 0x65, 0x6c, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x6f, 0x20, 0x6b, 0x77, 0x61,
+0x6e, 0x7a, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x6f, 0x20, 0x75, 0x6e, 0x61, 0x79, 0x65, 0x6c, 0x69,
+0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x6f, 0x20, 0x75, 0x6e, 0x65, 0x72, 0x61, 0x72, 0x75, 0x3b, 0x4d, 0x77,
+0x65, 0x72, 0x69, 0x20, 0x77, 0x6f, 0x20, 0x75, 0x6e, 0x65, 0x63, 0x68, 0x65, 0x73, 0x68, 0x65, 0x3b, 0x4d, 0x77, 0x65,
+0x72, 0x69, 0x20, 0x77, 0x6f, 0x20, 0x75, 0x6e, 0x65, 0x74, 0x68, 0x61, 0x6e, 0x75, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69,
+0x20, 0x77, 0x6f, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x75, 0x20, 0x6e, 0x61, 0x20, 0x6d, 0x6f, 0x63, 0x68, 0x61, 0x3b, 0x4d,
+0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x6f, 0x20, 0x73, 0x61, 0x62, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77,
+0x6f, 0x20, 0x6e, 0x61, 0x6e, 0x65, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x6f, 0x20, 0x74, 0x69, 0x73, 0x61,
+0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x6f, 0x20, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69,
+0x20, 0x77, 0x6f, 0x20, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x6d, 0x6f, 0x6a, 0x61, 0x3b, 0x4d, 0x77, 0x65,
+0x72, 0x69, 0x20, 0x77, 0x6f, 0x20, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x79, 0x65, 0x6c, 0x2019, 0x6c, 0x69,
+0x3b, 0x4b, 0x3b, 0x55, 0x3b, 0x52, 0x3b, 0x43, 0x3b, 0x54, 0x3b, 0x4d, 0x3b, 0x53, 0x3b, 0x4e, 0x3b, 0x54, 0x3b, 0x4b,
+0x3b, 0x4d, 0x3b, 0x59, 0x3b, 0x46, 0x4c, 0x4f, 0x3b, 0x43, 0x4c, 0x41, 0x3b, 0x43, 0x4b, 0x49, 0x3b, 0x46, 0x4d, 0x46,
+0x3b, 0x4d, 0x41, 0x44, 0x3b, 0x4d, 0x42, 0x49, 0x3b, 0x4d, 0x4c, 0x49, 0x3b, 0x4d, 0x41, 0x4d, 0x3b, 0x46, 0x44, 0x45,
+0x3b, 0x46, 0x4d, 0x55, 0x3b, 0x46, 0x47, 0x57, 0x3b, 0x46, 0x59, 0x55, 0x3b, 0x46, 0x129, 0x69, 0x20, 0x4c, 0x6f, 0x6f,
+0x3b, 0x43, 0x6f, 0x6b, 0x63, 0x77, 0x61, 0x6b, 0x6c, 0x61, 0x14b, 0x6e, 0x65, 0x3b, 0x43, 0x6f, 0x6b, 0x63, 0x77, 0x61,
+0x6b, 0x6c, 0x69, 0x69, 0x3b, 0x46, 0x129, 0x69, 0x20, 0x4d, 0x61, 0x72, 0x66, 0x6f, 0x6f, 0x3b, 0x4d, 0x61, 0x64, 0x1dd,
+0x1dd, 0x75, 0x75, 0x74, 0x1dd, 0x62, 0x69, 0x6a, 0x61, 0x14b, 0x3b, 0x4d, 0x61, 0x6d, 0x1dd, 0x14b, 0x67, 0x77, 0xe3, 0x61,
+0x66, 0x61, 0x68, 0x62, 0x69, 0x69, 0x3b, 0x4d, 0x61, 0x6d, 0x1dd, 0x14b, 0x67, 0x77, 0xe3, 0x61, 0x6c, 0x69, 0x69, 0x3b,
+0x4d, 0x61, 0x64, 0x1dd, 0x6d, 0x62, 0x69, 0x69, 0x3b, 0x46, 0x129, 0x69, 0x20, 0x44, 0x1dd, 0x253, 0x6c, 0x69, 0x69, 0x3b,
+0x46, 0x129, 0x69, 0x20, 0x4d, 0x75, 0x6e, 0x64, 0x61, 0x14b, 0x3b, 0x46, 0x129, 0x69, 0x20, 0x47, 0x77, 0x61, 0x68, 0x6c,
+0x6c, 0x65, 0x3b, 0x46, 0x129, 0x69, 0x20, 0x59, 0x75, 0x72, 0x75, 0x3b, 0x4f, 0x3b, 0x41, 0x3b, 0x49, 0x3b, 0x46, 0x3b,
+0x44, 0x3b, 0x42, 0x3b, 0x4c, 0x3b, 0x4d, 0x3b, 0x45, 0x3b, 0x55, 0x3b, 0x57, 0x3b, 0x59, 0x3b, 0x6e, 0x67, 0x31, 0x3b,
+0x6e, 0x67, 0x32, 0x3b, 0x6e, 0x67, 0x33, 0x3b, 0x6e, 0x67, 0x34, 0x3b, 0x6e, 0x67, 0x35, 0x3b, 0x6e, 0x67, 0x36, 0x3b,
+0x6e, 0x67, 0x37, 0x3b, 0x6e, 0x67, 0x38, 0x3b, 0x6e, 0x67, 0x39, 0x3b, 0x6e, 0x67, 0x31, 0x30, 0x3b, 0x6e, 0x67, 0x31,
+0x31, 0x3b, 0x6b, 0x72, 0x69, 0x73, 0x3b, 0x6e, 0x67, 0x77, 0x25b, 0x6e, 0x20, 0x6d, 0x61, 0x74, 0xe1, 0x68, 0x72, 0x61,
+0x3b, 0x6e, 0x67, 0x77, 0x25b, 0x6e, 0x20, 0x144, 0x6d, 0x62, 0x61, 0x3b, 0x6e, 0x67, 0x77, 0x25b, 0x6e, 0x20, 0x144, 0x6c,
+0x61, 0x6c, 0x3b, 0x6e, 0x67, 0x77, 0x25b, 0x6e, 0x20, 0x144, 0x6e, 0x61, 0x3b, 0x6e, 0x67, 0x77, 0x25b, 0x6e, 0x20, 0x144,
+0x74, 0x61, 0x6e, 0x3b, 0x6e, 0x67, 0x77, 0x25b, 0x6e, 0x20, 0x144, 0x74, 0x75, 0xf3, 0x3b, 0x6e, 0x67, 0x77, 0x25b, 0x6e,
+0x20, 0x68, 0x25b, 0x6d, 0x62, 0x75, 0x25b, 0x72, 0xed, 0x3b, 0x6e, 0x67, 0x77, 0x25b, 0x6e, 0x20, 0x6c, 0x254, 0x6d, 0x62,
+0x69, 0x3b, 0x6e, 0x67, 0x77, 0x25b, 0x6e, 0x20, 0x72, 0x25b, 0x62, 0x76, 0x75, 0xe2, 0x3b, 0x6e, 0x67, 0x77, 0x25b, 0x6e,
+0x20, 0x77, 0x75, 0x6d, 0x3b, 0x6e, 0x67, 0x77, 0x25b, 0x6e, 0x20, 0x77, 0x75, 0x6d, 0x20, 0x6e, 0x61, 0x76, 0x1d4, 0x72,
+0x3b, 0x6b, 0x72, 0xed, 0x73, 0x69, 0x6d, 0x69, 0x6e, 0x3b, 0x54, 0x69, 0x6f, 0x70, 0x3b, 0x50, 0x25b, 0x74, 0x3b, 0x44,
+0x75, 0x254, 0x331, 0x254, 0x331, 0x3b, 0x47, 0x75, 0x61, 0x6b, 0x3b, 0x44, 0x75, 0xe4, 0x3b, 0x4b, 0x6f, 0x72, 0x3b, 0x50,
+0x61, 0x79, 0x3b, 0x54, 0x68, 0x6f, 0x6f, 0x3b, 0x54, 0x25b, 0x25b, 0x3b, 0x4c, 0x61, 0x61, 0x3b, 0x4b, 0x75, 0x72, 0x3b,
+0x54, 0x69, 0x64, 0x3b, 0x54, 0x69, 0x6f, 0x70, 0x20, 0x74, 0x68, 0x61, 0x72, 0x20, 0x70, 0x25b, 0x74, 0x3b, 0x50, 0x25b,
+0x74, 0x3b, 0x44, 0x75, 0x254, 0x331, 0x254, 0x331, 0x14b, 0x3b, 0x47, 0x75, 0x61, 0x6b, 0x3b, 0x44, 0x75, 0xe4, 0x74, 0x3b,
+0x4b, 0x6f, 0x72, 0x6e, 0x79, 0x6f, 0x6f, 0x74, 0x3b, 0x50, 0x61, 0x79, 0x20, 0x79, 0x69, 0x65, 0x331, 0x74, 0x6e, 0x69,
+0x3b, 0x54, 0x68, 0x6f, 0x331, 0x6f, 0x331, 0x72, 0x3b, 0x54, 0x25b, 0x25b, 0x72, 0x3b, 0x4c, 0x61, 0x61, 0x74, 0x68, 0x3b,
+0x4b, 0x75, 0x72, 0x3b, 0x54, 0x69, 0x6f, 0x331, 0x70, 0x20, 0x69, 0x6e, 0x20, 0x64, 0x69, 0x331, 0x69, 0x331, 0x74, 0x3b,
+0x54, 0x3b, 0x50, 0x3b, 0x44, 0x3b, 0x47, 0x3b, 0x44, 0x3b, 0x4b, 0x3b, 0x50, 0x3b, 0x54, 0x3b, 0x54, 0x3b, 0x4c, 0x3b,
+0x4b, 0x3b, 0x54, 0x3b, 0x422, 0x43e, 0x445, 0x441, 0x3b, 0x41e, 0x43b, 0x443, 0x43d, 0x3b, 0x41a, 0x43b, 0x43d, 0x3b, 0x41c, 0x441,
+0x443, 0x3b, 0x42b, 0x430, 0x43c, 0x3b, 0x411, 0x44d, 0x441, 0x3b, 0x41e, 0x442, 0x439, 0x3b, 0x410, 0x442, 0x440, 0x3b, 0x411, 0x43b,
+0x495, 0x3b, 0x410, 0x43b, 0x442, 0x3b, 0x421, 0x44d, 0x442, 0x3b, 0x410, 0x445, 0x441, 0x3b, 0x442, 0x43e, 0x445, 0x441, 0x443, 0x43d,
+0x43d, 0x44c, 0x443, 0x3b, 0x43e, 0x43b, 0x443, 0x43d, 0x43d, 0x44c, 0x443, 0x3b, 0x43a, 0x443, 0x43b, 0x443, 0x43d, 0x20, 0x442, 0x443,
+0x442, 0x430, 0x440, 0x3b, 0x43c, 0x443, 0x443, 0x441, 0x20, 0x443, 0x441, 0x442, 0x430, 0x440, 0x3b, 0x44b, 0x430, 0x43c, 0x20, 0x44b,
+0x439, 0x430, 0x3b, 0x431, 0x44d, 0x441, 0x20, 0x44b, 0x439, 0x430, 0x3b, 0x43e, 0x442, 0x20, 0x44b, 0x439, 0x430, 0x3b, 0x430, 0x442,
+0x44b, 0x440, 0x434, 0x44c, 0x44b, 0x445, 0x20, 0x44b, 0x439, 0x430, 0x3b, 0x431, 0x430, 0x43b, 0x430, 0x495, 0x430, 0x43d, 0x20, 0x44b,
+0x439, 0x430, 0x3b, 0x430, 0x43b, 0x442, 0x44b, 0x43d, 0x43d, 0x44c, 0x44b, 0x3b, 0x441, 0x44d, 0x442, 0x438, 0x43d, 0x43d, 0x44c, 0x438,
+0x3b, 0x430, 0x445, 0x441, 0x44b, 0x43d, 0x43d, 0x44c, 0x44b, 0x3b, 0x422, 0x3b, 0x41e, 0x3b, 0x41a, 0x3b, 0x41c, 0x3b, 0x42b, 0x3b,
+0x411, 0x3b, 0x41e, 0x3b, 0x410, 0x3b, 0x411, 0x3b, 0x410, 0x3b, 0x421, 0x3b, 0x410, 0x3b, 0x422, 0x43e, 0x445, 0x441, 0x443, 0x43d,
+0x43d, 0x44c, 0x443, 0x3b, 0x41e, 0x43b, 0x443, 0x43d, 0x43d, 0x44c, 0x443, 0x3b, 0x41a, 0x443, 0x43b, 0x443, 0x43d, 0x20, 0x442, 0x443,
+0x442, 0x430, 0x440, 0x3b, 0x41c, 0x443, 0x443, 0x441, 0x20, 0x443, 0x441, 0x442, 0x430, 0x440, 0x3b, 0x42b, 0x430, 0x43c, 0x20, 0x44b,
+0x439, 0x44b, 0x43d, 0x3b, 0x411, 0x44d, 0x441, 0x20, 0x44b, 0x439, 0x44b, 0x43d, 0x3b, 0x41e, 0x442, 0x20, 0x44b, 0x439, 0x44b, 0x43d,
+0x3b, 0x410, 0x442, 0x44b, 0x440, 0x434, 0x44c, 0x44b, 0x445, 0x20, 0x44b, 0x439, 0x44b, 0x43d, 0x3b, 0x411, 0x430, 0x43b, 0x430, 0x495,
+0x430, 0x43d, 0x20, 0x44b, 0x439, 0x44b, 0x43d, 0x3b, 0x410, 0x43b, 0x442, 0x44b, 0x43d, 0x43d, 0x44c, 0x44b, 0x3b, 0x421, 0x44d, 0x442,
+0x438, 0x43d, 0x43d, 0x44c, 0x438, 0x3b, 0x430, 0x445, 0x441, 0x44b, 0x43d, 0x43d, 0x44c, 0x44b, 0x3b, 0x4d, 0x75, 0x70, 0x3b, 0x4d,
+0x77, 0x69, 0x3b, 0x4d, 0x73, 0x68, 0x3b, 0x4d, 0x75, 0x6e, 0x3b, 0x4d, 0x61, 0x67, 0x3b, 0x4d, 0x75, 0x6a, 0x3b, 0x4d,
+0x73, 0x70, 0x3b, 0x4d, 0x70, 0x67, 0x3b, 0x4d, 0x79, 0x65, 0x3b, 0x4d, 0x6f, 0x6b, 0x3b, 0x4d, 0x75, 0x73, 0x3b, 0x4d,
+0x75, 0x68, 0x3b, 0x4d, 0x75, 0x70, 0x61, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x6c, 0x77, 0x61, 0x3b, 0x4d, 0x77, 0x69, 0x74,
+0x6f, 0x70, 0x65, 0x3b, 0x4d, 0x75, 0x73, 0x68, 0x65, 0x6e, 0x64, 0x65, 0x3b, 0x4d, 0x75, 0x6e, 0x79, 0x69, 0x3b, 0x4d,
+0x75, 0x73, 0x68, 0x65, 0x6e, 0x64, 0x65, 0x20, 0x4d, 0x61, 0x67, 0x61, 0x6c, 0x69, 0x3b, 0x4d, 0x75, 0x6a, 0x69, 0x6d,
+0x62, 0x69, 0x3b, 0x4d, 0x75, 0x73, 0x68, 0x69, 0x70, 0x65, 0x70, 0x6f, 0x3b, 0x4d, 0x75, 0x70, 0x75, 0x67, 0x75, 0x74,
+0x6f, 0x3b, 0x4d, 0x75, 0x6e, 0x79, 0x65, 0x6e, 0x73, 0x65, 0x3b, 0x4d, 0x6f, 0x6b, 0x68, 0x75, 0x3b, 0x4d, 0x75, 0x73,
+0x6f, 0x6e, 0x67, 0x61, 0x6e, 0x64, 0x65, 0x6d, 0x62, 0x77, 0x65, 0x3b, 0x4d, 0x75, 0x68, 0x61, 0x61, 0x6e, 0x6f, 0x3b,
+0xa5a8, 0xa595, 0xa51e, 0x3b, 0xa552, 0xa561, 0x3b, 0xa57e, 0xa5ba, 0x3b, 0xa5a2, 0xa595, 0x3b, 0xa591, 0xa571, 0x3b, 0xa5b1, 0xa60b, 0x3b, 0xa5b1,
+0xa55e, 0x3b, 0xa5db, 0xa515, 0x3b, 0xa562, 0xa54c, 0x3b, 0xa56d, 0xa583, 0x3b, 0xa51e, 0xa60b, 0x3b, 0xa5a8, 0xa595, 0xa5cf, 0x3b, 0xa5a8, 0xa595,
+0x20, 0xa56a, 0xa574, 0x20, 0xa51e, 0xa500, 0xa56e, 0xa54a, 0x3b, 0xa552, 0xa561, 0xa59d, 0xa595, 0x3b, 0xa57e, 0xa5ba, 0x3b, 0xa5a2, 0xa595, 0x3b,
+0xa591, 0xa571, 0x3b, 0xa5b1, 0xa60b, 0x3b, 0xa5b1, 0xa55e, 0xa524, 0x3b, 0xa5db, 0xa515, 0x3b, 0xa562, 0xa54c, 0x3b, 0xa56d, 0xa583, 0x3b, 0xa51e,
+0xa60b, 0xa554, 0xa57f, 0x20, 0xa578, 0xa583, 0xa5cf, 0x3b, 0xa5a8, 0xa595, 0x20, 0xa56a, 0xa574, 0x20, 0xa5cf, 0xa5ba, 0xa56e, 0xa54a, 0x3b, 0x6c,
+0x75, 0x75, 0x6b, 0x61, 0x6f, 0x20, 0x6b, 0x65, 0x6d, 0xe3, 0x3b, 0x253, 0x61, 0x6e, 0x64, 0x61, 0x253, 0x75, 0x3b, 0x76,
+0x254, 0x254, 0x3b, 0x66, 0x75, 0x6c, 0x75, 0x3b, 0x67, 0x6f, 0x6f, 0x3b, 0x36, 0x3b, 0x37, 0x3b, 0x6b, 0x254, 0x6e, 0x64,
+0x65, 0x3b, 0x73, 0x61, 0x61, 0x68, 0x3b, 0x67, 0x61, 0x6c, 0x6f, 0x3b, 0x6b, 0x65, 0x6e, 0x70, 0x6b, 0x61, 0x74, 0x6f,
+0x20, 0x253, 0x6f, 0x6c, 0x6f, 0x6c, 0x254, 0x3b, 0x6c, 0x75, 0x75, 0x6b, 0x61, 0x6f, 0x20, 0x6c, 0x254, 0x6d, 0x61, 0x3b,
+0x4a, 0x65, 0x6e, 0x3b, 0x48, 0x6f, 0x72, 0x3b, 0x4d, 0xe4, 0x72, 0x3b, 0x41, 0x62, 0x72, 0x3b, 0x4d, 0x65, 0x69, 0x3b,
+0x42, 0x72, 0xe1, 0x3b, 0x48, 0x65, 0x69, 0x3b, 0xd6, 0x69, 0x67, 0x3b, 0x48, 0x65, 0x72, 0x3b, 0x57, 0xed, 0x6d, 0x3b,
+0x57, 0x69, 0x6e, 0x3b, 0x43, 0x68, 0x72, 0x3b, 0x4a, 0x65, 0x6e, 0x6e, 0x65, 0x72, 0x3b, 0x48, 0x6f, 0x72, 0x6e, 0x69,
+0x67, 0x3b, 0x4d, 0xe4, 0x72, 0x7a, 0x65, 0x3b, 0x41, 0x62, 0x72, 0x69, 0x6c, 0x6c, 0x65, 0x3b, 0x4d, 0x65, 0x69, 0x6a,
+0x65, 0x3b, 0x42, 0x72, 0xe1, 0x10d, 0x65, 0x74, 0x3b, 0x48, 0x65, 0x69, 0x77, 0x65, 0x74, 0x3b, 0xd6, 0x69, 0x67, 0x161,
+0x74, 0x65, 0x3b, 0x48, 0x65, 0x72, 0x62, 0x161, 0x74, 0x6d, 0xe1, 0x6e, 0x65, 0x74, 0x3b, 0x57, 0xed, 0x6d, 0xe1, 0x6e,
+0x65, 0x74, 0x3b, 0x57, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0xe1, 0x6e, 0x65, 0x74, 0x3b, 0x43, 0x68, 0x72, 0x69, 0x161,
+0x74, 0x6d, 0xe1, 0x6e, 0x65, 0x74, 0x3b, 0x4a, 0x3b, 0x48, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x42, 0x3b, 0x48,
+0x3b, 0xd6, 0x3b, 0x48, 0x3b, 0x57, 0x3b, 0x57, 0x3b, 0x43, 0x3b, 0x6f, 0x2e, 0x31, 0x3b, 0x6f, 0x2e, 0x32, 0x3b, 0x6f,
+0x2e, 0x33, 0x3b, 0x6f, 0x2e, 0x34, 0x3b, 0x6f, 0x2e, 0x35, 0x3b, 0x6f, 0x2e, 0x36, 0x3b, 0x6f, 0x2e, 0x37, 0x3b, 0x6f,
+0x2e, 0x38, 0x3b, 0x6f, 0x2e, 0x39, 0x3b, 0x6f, 0x2e, 0x31, 0x30, 0x3b, 0x6f, 0x2e, 0x31, 0x31, 0x3b, 0x6f, 0x2e, 0x31,
+0x32, 0x3b, 0x70, 0x69, 0x6b, 0xed, 0x74, 0xed, 0x6b, 0xed, 0x74, 0x69, 0x65, 0x2c, 0x20, 0x6f, 0xf3, 0x6c, 0xed, 0x20,
+0xfa, 0x20, 0x6b, 0x75, 0x74, 0xfa, 0x61, 0x6e, 0x3b, 0x73, 0x69, 0x25b, 0x79, 0x25b, 0x301, 0x2c, 0x20, 0x6f, 0xf3, 0x6c,
+0x69, 0x20, 0xfa, 0x20, 0x6b, 0xe1, 0x6e, 0x64, 0xed, 0x25b, 0x3b, 0x254, 0x6e, 0x73, 0xfa, 0x6d, 0x62, 0x254, 0x6c, 0x2c,
+0x20, 0x6f, 0xf3, 0x6c, 0x69, 0x20, 0xfa, 0x20, 0x6b, 0xe1, 0x74, 0xe1, 0x74, 0xfa, 0x25b, 0x3b, 0x6d, 0x65, 0x73, 0x69,
+0x14b, 0x2c, 0x20, 0x6f, 0xf3, 0x6c, 0x69, 0x20, 0xfa, 0x20, 0x6b, 0xe9, 0x6e, 0x69, 0x65, 0x3b, 0x65, 0x6e, 0x73, 0x69,
+0x6c, 0x2c, 0x20, 0x6f, 0xf3, 0x6c, 0x69, 0x20, 0xfa, 0x20, 0x6b, 0xe1, 0x74, 0xe1, 0x6e, 0x75, 0x25b, 0x3b, 0x254, 0x73,
+0x254, 0x6e, 0x3b, 0x65, 0x66, 0x75, 0x74, 0x65, 0x3b, 0x70, 0x69, 0x73, 0x75, 0x79, 0xfa, 0x3b, 0x69, 0x6d, 0x25b, 0x14b,
+0x20, 0x69, 0x20, 0x70, 0x75, 0x254, 0x73, 0x3b, 0x69, 0x6d, 0x25b, 0x14b, 0x20, 0x69, 0x20, 0x70, 0x75, 0x74, 0xfa, 0x6b,
+0x2c, 0x6f, 0xf3, 0x6c, 0x69, 0x20, 0xfa, 0x20, 0x6b, 0xe1, 0x74, 0xed, 0x25b, 0x3b, 0x6d, 0x61, 0x6b, 0x61, 0x6e, 0x64,
+0x69, 0x6b, 0x25b, 0x3b, 0x70, 0x69, 0x6c, 0x254, 0x6e, 0x64, 0x254, 0x301, 0x3b, 0x58, 0x69, 0x6e, 0x3b, 0x46, 0x65, 0x62,
+0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x62, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x58, 0x75, 0x6e, 0x3b, 0x58, 0x6e, 0x74,
+0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x63, 0x68, 0x3b, 0x50, 0x61, 0x79, 0x3b, 0x41, 0x76, 0x69,
+0x3b, 0x78, 0x69, 0x6e, 0x65, 0x72, 0x75, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x65, 0x72, 0x75, 0x3b, 0x6d, 0x61, 0x72, 0x7a,
+0x75, 0x3b, 0x61, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x61, 0x79, 0x75, 0x3b, 0x78, 0x75, 0x6e, 0x75, 0x3b, 0x78, 0x75,
+0x6e, 0x65, 0x74, 0x75, 0x3b, 0x61, 0x67, 0x6f, 0x73, 0x74, 0x75, 0x3b, 0x73, 0x65, 0x74, 0x69, 0x65, 0x6d, 0x62, 0x72,
+0x65, 0x3b, 0x6f, 0x63, 0x68, 0x6f, 0x62, 0x72, 0x65, 0x3b, 0x70, 0x61, 0x79, 0x61, 0x72, 0x65, 0x73, 0x3b, 0x61, 0x76,
+0x69, 0x65, 0x6e, 0x74, 0x75, 0x3b, 0x58, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x58, 0x3b, 0x58, 0x3b,
+0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x50, 0x3b, 0x41, 0x3b, 0x78, 0x69, 0x6e, 0x3b, 0x66, 0x65, 0x62, 0x3b, 0x6d, 0x61,
+0x72, 0x3b, 0x61, 0x62, 0x72, 0x3b, 0x6d, 0x61, 0x79, 0x3b, 0x78, 0x75, 0x6e, 0x3b, 0x78, 0x6e, 0x74, 0x3b, 0x61, 0x67,
+0x6f, 0x3b, 0x73, 0x65, 0x74, 0x3b, 0x6f, 0x63, 0x68, 0x3b, 0x70, 0x61, 0x79, 0x3b, 0x61, 0x76, 0x69, 0x3b, 0x64, 0x65,
+0x20, 0x78, 0x69, 0x6e, 0x65, 0x72, 0x75, 0x3b, 0x64, 0x65, 0x20, 0x66, 0x65, 0x62, 0x72, 0x65, 0x72, 0x75, 0x3b, 0x64,
+0x65, 0x20, 0x6d, 0x61, 0x72, 0x7a, 0x75, 0x3b, 0x64, 0x2019, 0x61, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x64, 0x65, 0x20, 0x6d,
+0x61, 0x79, 0x75, 0x3b, 0x64, 0x65, 0x20, 0x78, 0x75, 0x6e, 0x75, 0x3b, 0x64, 0x65, 0x20, 0x78, 0x75, 0x6e, 0x65, 0x74,
+0x75, 0x3b, 0x64, 0x2019, 0x61, 0x67, 0x6f, 0x73, 0x74, 0x75, 0x3b, 0x64, 0x65, 0x20, 0x73, 0x65, 0x74, 0x69, 0x65, 0x6d,
+0x62, 0x72, 0x65, 0x3b, 0x64, 0x2019, 0x6f, 0x63, 0x68, 0x6f, 0x62, 0x72, 0x65, 0x3b, 0x64, 0x65, 0x20, 0x70, 0x61, 0x79,
+0x61, 0x72, 0x65, 0x73, 0x3b, 0x64, 0x2019, 0x61, 0x76, 0x69, 0x65, 0x6e, 0x74, 0x75, 0x3b, 0x4e, 0x64, 0x75, 0x14b, 0x6d,
+0x62, 0x69, 0x20, 0x53, 0x61, 0x14b, 0x3b, 0x50, 0x25b, 0x73, 0x61, 0x14b, 0x20, 0x50, 0x25b, 0x301, 0x70, 0xe1, 0x3b, 0x50,
+0x25b, 0x73, 0x61, 0x14b, 0x20, 0x50, 0x25b, 0x301, 0x74, 0xe1, 0x74, 0x3b, 0x50, 0x25b, 0x73, 0x61, 0x14b, 0x20, 0x50, 0x25b,
+0x301, 0x6e, 0x25b, 0x301, 0x6b, 0x77, 0x61, 0x3b, 0x50, 0x25b, 0x73, 0x61, 0x14b, 0x20, 0x50, 0x61, 0x74, 0x61, 0x61, 0x3b,
+0x50, 0x25b, 0x73, 0x61, 0x14b, 0x20, 0x50, 0x25b, 0x301, 0x6e, 0x25b, 0x301, 0x6e, 0x74, 0xfa, 0x6b, 0xfa, 0x3b, 0x50, 0x25b,
+0x73, 0x61, 0x14b, 0x20, 0x53, 0x61, 0x61, 0x6d, 0x62, 0xe1, 0x3b, 0x50, 0x25b, 0x73, 0x61, 0x14b, 0x20, 0x50, 0x25b, 0x301,
+0x6e, 0x25b, 0x301, 0x66, 0x254, 0x6d, 0x3b, 0x50, 0x25b, 0x73, 0x61, 0x14b, 0x20, 0x50, 0x25b, 0x301, 0x6e, 0x25b, 0x301, 0x70,
+0x66, 0xfa, 0xa78b, 0xfa, 0x3b, 0x50, 0x25b, 0x73, 0x61, 0x14b, 0x20, 0x4e, 0x25b, 0x67, 0x25b, 0x301, 0x6d, 0x3b, 0x50, 0x25b,
+0x73, 0x61, 0x14b, 0x20, 0x4e, 0x74, 0x73, 0x254, 0x30c, 0x70, 0x6d, 0x254, 0x301, 0x3b, 0x50, 0x25b, 0x73, 0x61, 0x14b, 0x20,
+0x4e, 0x74, 0x73, 0x254, 0x30c, 0x70, 0x70, 0xe1, 0x3b, 0x70, 0x61, 0x6d, 0x62, 0x61, 0x3b, 0x77, 0x61, 0x6e, 0x6a, 0x61,
+0x3b, 0x6d, 0x62, 0x69, 0x79, 0x254, 0x20, 0x6d, 0x25b, 0x6e, 0x64, 0x6f, 0x14b, 0x67, 0x254, 0x3b, 0x4e, 0x79, 0x254, 0x6c,
+0x254, 0x6d, 0x62, 0x254, 0x14b, 0x67, 0x254, 0x3b, 0x4d, 0x254, 0x6e, 0x254, 0x20, 0x14b, 0x67, 0x62, 0x61, 0x6e, 0x6a, 0x61,
+0x3b, 0x4e, 0x79, 0x61, 0x14b, 0x67, 0x77, 0x25b, 0x20, 0x14b, 0x67, 0x62, 0x61, 0x6e, 0x6a, 0x61, 0x3b, 0x6b, 0x75, 0x14b,
+0x67, 0x77, 0x25b, 0x3b, 0x66, 0x25b, 0x3b, 0x6e, 0x6a, 0x61, 0x70, 0x69, 0x3b, 0x6e, 0x79, 0x75, 0x6b, 0x75, 0x6c, 0x3b,
+0x31, 0x31, 0x3b, 0x253, 0x75, 0x6c, 0x253, 0x75, 0x73, 0x25b, 0x3b, 0x6d, 0x62, 0x65, 0x67, 0x74, 0x75, 0x67, 0x3b, 0x69,
+0x6d, 0x65, 0x67, 0x20, 0xe0, 0x62, 0xf9, 0x62, 0xec, 0x3b, 0x69, 0x6d, 0x65, 0x67, 0x20, 0x6d, 0x62, 0x259, 0x14b, 0x63,
+0x68, 0x75, 0x62, 0x69, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20, 0x6e, 0x67, 0x77, 0x259, 0x300, 0x74, 0x3b, 0x69, 0x6d, 0x259,
+0x67, 0x20, 0x66, 0x6f, 0x67, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20, 0x69, 0x63, 0x68, 0x69, 0x69, 0x62, 0x254, 0x64, 0x3b,
+0x69, 0x6d, 0x259, 0x67, 0x20, 0xe0, 0x64, 0xf9, 0x6d, 0x62, 0x259, 0x300, 0x14b, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20, 0x69,
+0x63, 0x68, 0x69, 0x6b, 0x61, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20, 0x6b, 0x75, 0x64, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20,
+0x74, 0xe8, 0x73, 0x69, 0x2bc, 0x65, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20, 0x7a, 0xf2, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20,
+0x6b, 0x72, 0x69, 0x7a, 0x6d, 0x65, 0x64, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20, 0x6d, 0x62, 0x65, 0x67, 0x74, 0x75, 0x67,
+0x3b, 0x69, 0x6d, 0x65, 0x67, 0x20, 0xe0, 0x62, 0xf9, 0x62, 0xec, 0x3b, 0x69, 0x6d, 0x65, 0x67, 0x20, 0x6d, 0x62, 0x259,
+0x14b, 0x63, 0x68, 0x75, 0x62, 0x69, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20, 0x6e, 0x67, 0x77, 0x259, 0x300, 0x74, 0x3b, 0x69,
+0x6d, 0x259, 0x67, 0x20, 0x66, 0x6f, 0x67, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20, 0x69, 0x63, 0x68, 0x69, 0x69, 0x62, 0x254,
+0x64, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20, 0xe0, 0x64, 0xf9, 0x6d, 0x62, 0x259, 0x300, 0x14b, 0x3b, 0x69, 0x6d, 0x259, 0x67,
+0x20, 0x69, 0x63, 0x68, 0x69, 0x6b, 0x61, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20, 0x6b, 0x75, 0x64, 0x3b, 0x69, 0x6d, 0x259,
+0x67, 0x20, 0x74, 0xe8, 0x73, 0x69, 0x2bc, 0x65, 0x3b, 0x69, 0x6d, 0x259, 0x67, 0x20, 0x7a, 0xf2, 0x3b, 0x69, 0x6d, 0x259,
+0x67, 0x20, 0x6b, 0x72, 0x69, 0x7a, 0x6d, 0x65, 0x64, 0x3b, 0x4d, 0x31, 0x3b, 0x41, 0x32, 0x3b, 0x4d, 0x33, 0x3b, 0x4e,
+0x34, 0x3b, 0x46, 0x35, 0x3b, 0x49, 0x36, 0x3b, 0x41, 0x37, 0x3b, 0x49, 0x38, 0x3b, 0x4b, 0x39, 0x3b, 0x31, 0x30, 0x3b,
+0x31, 0x31, 0x3b, 0x31, 0x32, 0x3b, 0x73, 0x61, 0x14b, 0x20, 0x74, 0x73, 0x65, 0x74, 0x73, 0x25b, 0x300, 0x25b, 0x20, 0x6c,
+0xf9, 0x6d, 0x3b, 0x73, 0x61, 0x14b, 0x20, 0x6b, 0xe0, 0x67, 0x20, 0x6e, 0x67, 0x77, 0xf3, 0x14b, 0x3b, 0x73, 0x61, 0x14b,
+0x20, 0x6c, 0x65, 0x70, 0x79, 0xe8, 0x20, 0x73, 0x68, 0xfa, 0x6d, 0x3b, 0x73, 0x61, 0x14b, 0x20, 0x63, 0xff, 0xf3, 0x3b,
+0x73, 0x61, 0x14b, 0x20, 0x74, 0x73, 0x25b, 0x300, 0x25b, 0x20, 0x63, 0xff, 0xf3, 0x3b, 0x73, 0x61, 0x14b, 0x20, 0x6e, 0x6a,
+0xff, 0x6f, 0x6c, 0xe1, 0x2bc, 0x3b, 0x73, 0x61, 0x14b, 0x20, 0x74, 0x79, 0x25b, 0x300, 0x62, 0x20, 0x74, 0x79, 0x25b, 0x300,
+0x62, 0x20, 0x6d, 0x62, 0x289, 0x300, 0x14b, 0x3b, 0x73, 0x61, 0x14b, 0x20, 0x6d, 0x62, 0x289, 0x300, 0x14b, 0x3b, 0x73, 0x61,
+0x14b, 0x20, 0x6e, 0x67, 0x77, 0x254, 0x300, 0x2bc, 0x20, 0x6d, 0x62, 0xff, 0x25b, 0x3b, 0x73, 0x61, 0x14b, 0x20, 0x74, 0xe0,
+0x14b, 0x61, 0x20, 0x74, 0x73, 0x65, 0x74, 0x73, 0xe1, 0x2bc, 0x3b, 0x73, 0x61, 0x14b, 0x20, 0x6d, 0x65, 0x6a, 0x77, 0x6f,
+0x14b, 0xf3, 0x3b, 0x73, 0x61, 0x14b, 0x20, 0x6c, 0xf9, 0x6d, 0x3b, 0x57, 0x69, 0xf3, 0x74, 0x68, 0x65, 0x21f, 0x69, 0x6b,
+0x61, 0x20, 0x57, 0xed, 0x3b, 0x54, 0x68, 0x69, 0x79, 0xf3, 0x21f, 0x65, 0x79, 0x75, 0x14b, 0x6b, 0x61, 0x20, 0x57, 0xed,
+0x3b, 0x49, 0x161, 0x74, 0xe1, 0x77, 0x69, 0x10d, 0x68, 0x61, 0x79, 0x61, 0x7a, 0x61, 0x14b, 0x20, 0x57, 0xed, 0x3b, 0x50,
+0x21f, 0x65, 0x17e, 0xed, 0x74, 0x21f, 0x6f, 0x20, 0x57, 0xed, 0x3b, 0x10c, 0x68, 0x61, 0x14b, 0x77, 0xe1, 0x70, 0x65, 0x74,
+0x21f, 0x6f, 0x20, 0x57, 0xed, 0x3b, 0x57, 0xed, 0x70, 0x61, 0x7a, 0x75, 0x6b, 0x21f, 0x61, 0x2d, 0x77, 0x61, 0x161, 0x74,
+0xe9, 0x20, 0x57, 0xed, 0x3b, 0x10c, 0x68, 0x61, 0x14b, 0x70, 0x21f, 0xe1, 0x73, 0x61, 0x70, 0x61, 0x20, 0x57, 0xed, 0x3b,
+0x57, 0x61, 0x73, 0xfa, 0x74, 0x21f, 0x75, 0x14b, 0x20, 0x57, 0xed, 0x3b, 0x10c, 0x68, 0x61, 0x14b, 0x77, 0xe1, 0x70, 0x65,
+0x1e7, 0x69, 0x20, 0x57, 0xed, 0x3b, 0x10c, 0x68, 0x61, 0x14b, 0x77, 0xe1, 0x70, 0x65, 0x2d, 0x6b, 0x61, 0x73, 0x6e, 0xe1,
+0x20, 0x57, 0xed, 0x3b, 0x57, 0x61, 0x6e, 0xed, 0x79, 0x65, 0x74, 0x75, 0x20, 0x57, 0xed, 0x3b, 0x54, 0x21f, 0x61, 0x68,
+0xe9, 0x6b, 0x61, 0x70, 0x161, 0x75, 0x14b, 0x20, 0x57, 0xed, 0x3b, 0x6a9, 0x627, 0x646, 0x648, 0x648, 0x646, 0x6cc, 0x20, 0x62f,
+0x648, 0x648, 0x6d5, 0x645, 0x3b, 0x634, 0x648, 0x628, 0x627, 0x62a, 0x3b, 0x626, 0x627, 0x632, 0x627, 0x631, 0x3b, 0x646, 0x6cc, 0x633,
+0x627, 0x646, 0x3b, 0x626, 0x627, 0x6cc, 0x627, 0x631, 0x3b, 0x62d, 0x648, 0x632, 0x6d5, 0x6cc, 0x631, 0x627, 0x646, 0x3b, 0x62a, 0x6d5,
+0x645, 0x648, 0x648, 0x632, 0x3b, 0x626, 0x627, 0x628, 0x3b, 0x626, 0x6d5, 0x6cc, 0x644, 0x648, 0x648, 0x644, 0x3b, 0x62a, 0x634, 0x631,
+0x6cc, 0x646, 0x6cc, 0x20, 0x6cc, 0x6d5, 0x6a9, 0x6d5, 0x645, 0x3b, 0x62a, 0x634, 0x631, 0x6cc, 0x646, 0x6cc, 0x20, 0x62f, 0x648, 0x648,
+0x6d5, 0x645, 0x3b, 0x6a9, 0x627, 0x646, 0x648, 0x646, 0x6cc, 0x20, 0x6cc, 0x6d5, 0x6a9, 0x6d5, 0x645, 0x3b, 0x6a9, 0x3b, 0x634, 0x3b,
+0x626, 0x3b, 0x646, 0x3b, 0x626, 0x3b, 0x62d, 0x3b, 0x62a, 0x3b, 0x626, 0x3b, 0x626, 0x3b, 0x62a, 0x3b, 0x62a, 0x3b, 0x6a9, 0x3b,
+0x6a, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x62, 0x3b, 0x6d, 0x11b, 0x72, 0x3b, 0x61, 0x70, 0x72, 0x3b, 0x6d, 0x61, 0x6a, 0x3b,
+0x6a, 0x75, 0x6e, 0x3b, 0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x77, 0x67, 0x3b, 0x73, 0x65, 0x70, 0x3b, 0x6f, 0x6b, 0x74, 0x3b,
+0x6e, 0x6f, 0x77, 0x3b, 0x64, 0x65, 0x63, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75,
+0x61, 0x72, 0x3b, 0x6d, 0x11b, 0x72, 0x63, 0x3b, 0x61, 0x70, 0x72, 0x79, 0x6c, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75,
+0x6e, 0x69, 0x6a, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x6a, 0x3b, 0x61, 0x77, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x73, 0x65, 0x70,
+0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x6e, 0x6f, 0x77, 0x65, 0x6d,
+0x62, 0x65, 0x72, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6a, 0x61, 0x6e, 0x2e, 0x3b, 0x66, 0x65,
+0x62, 0x2e, 0x3b, 0x6d, 0x11b, 0x72, 0x2e, 0x3b, 0x61, 0x70, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x6a, 0x2e, 0x3b, 0x6a, 0x75,
+0x6e, 0x2e, 0x3b, 0x6a, 0x75, 0x6c, 0x2e, 0x3b, 0x61, 0x77, 0x67, 0x2e, 0x3b, 0x73, 0x65, 0x70, 0x2e, 0x3b, 0x6f, 0x6b,
+0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x77, 0x2e, 0x3b, 0x64, 0x65, 0x63, 0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x61,
+0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x61, 0x3b, 0x6d, 0x11b, 0x72, 0x63, 0x61, 0x3b, 0x61, 0x70, 0x72, 0x79,
+0x6c, 0x61, 0x3b, 0x6d, 0x61, 0x6a, 0x61, 0x3b, 0x6a, 0x75, 0x6e, 0x69, 0x6a, 0x61, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x6a,
+0x61, 0x3b, 0x61, 0x77, 0x67, 0x75, 0x73, 0x74, 0x61, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x72, 0x61, 0x3b,
+0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x72, 0x61, 0x3b, 0x6e, 0x6f, 0x77, 0x65, 0x6d, 0x62, 0x72, 0x61, 0x3b, 0x64, 0x65, 0x63,
+0x65, 0x6d, 0x62, 0x72, 0x61, 0x3b, 0x6a, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x62, 0x3b, 0x6d, 0x11b, 0x72, 0x3b, 0x61, 0x70,
+0x72, 0x3b, 0x6d, 0x65, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x3b, 0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x77, 0x67, 0x3b, 0x73, 0x65,
+0x70, 0x3b, 0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x77, 0x3b, 0x64, 0x65, 0x63, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0x61, 0x72,
+0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x6d, 0x11b, 0x72, 0x63, 0x3b, 0x61, 0x70, 0x72, 0x79, 0x6c, 0x3b,
+0x6d, 0x65, 0x6a, 0x61, 0x3b, 0x6a, 0x75, 0x6e, 0x69, 0x6a, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x6a, 0x3b, 0x61, 0x77, 0x67,
+0x75, 0x73, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x65,
+0x72, 0x3b, 0x6e, 0x6f, 0x77, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b,
+0x6a, 0x61, 0x6e, 0x2e, 0x3b, 0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x11b, 0x72, 0x2e, 0x3b, 0x61, 0x70, 0x72, 0x2e, 0x3b,
+0x6d, 0x65, 0x6a, 0x2e, 0x3b, 0x6a, 0x75, 0x6e, 0x2e, 0x3b, 0x6a, 0x75, 0x6c, 0x2e, 0x3b, 0x61, 0x77, 0x67, 0x2e, 0x3b,
+0x73, 0x65, 0x70, 0x2e, 0x3b, 0x6f, 0x6b, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x77, 0x2e, 0x3b, 0x64, 0x65, 0x63, 0x2e, 0x3b,
+0x6a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x61, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x61, 0x3b, 0x6d, 0x11b, 0x72,
+0x63, 0x61, 0x3b, 0x61, 0x70, 0x72, 0x79, 0x6c, 0x61, 0x3b, 0x6d, 0x65, 0x6a, 0x65, 0x3b, 0x6a, 0x75, 0x6e, 0x69, 0x6a,
+0x61, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x6a, 0x61, 0x3b, 0x61, 0x77, 0x67, 0x75, 0x73, 0x74, 0x61, 0x3b, 0x73, 0x65, 0x70,
+0x74, 0x65, 0x6d, 0x62, 0x72, 0x61, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x72, 0x61, 0x3b, 0x6e, 0x6f, 0x77, 0x65, 0x6d,
+0x62, 0x72, 0x61, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x72, 0x61, 0x3b, 0x75, 0x111, 0x69, 0x76, 0x3b, 0x6b, 0x75,
+0x6f, 0x76, 0xe2, 0x3b, 0x6e, 0x6a, 0x75, 0x68, 0x10d, 0xe2, 0x3b, 0x63, 0x75, 0xe1, 0x14b, 0x75, 0x69, 0x3b, 0x76, 0x79,
+0x65, 0x73, 0x69, 0x3b, 0x6b, 0x65, 0x73, 0x69, 0x3b, 0x73, 0x79, 0x65, 0x69, 0x6e, 0x69, 0x3b, 0x70, 0x6f, 0x72, 0x67,
+0x65, 0x3b, 0x10d, 0x6f, 0x68, 0x10d, 0xe2, 0x3b, 0x72, 0x6f, 0x6f, 0x76, 0x76, 0xe2, 0x64, 0x3b, 0x73, 0x6b, 0x61, 0x6d,
+0x6d, 0xe2, 0x3b, 0x6a, 0x75, 0x6f, 0x76, 0x6c, 0xe2, 0x3b, 0x75, 0x111, 0x111, 0xe2, 0x69, 0x76, 0x65, 0x6d, 0xe1, 0xe1,
+0x6e, 0x75, 0x3b, 0x6b, 0x75, 0x6f, 0x76, 0xe2, 0x6d, 0xe1, 0xe1, 0x6e, 0x75, 0x3b, 0x6e, 0x6a, 0x75, 0x68, 0x10d, 0xe2,
+0x6d, 0xe1, 0xe1, 0x6e, 0x75, 0x3b, 0x63, 0x75, 0xe1, 0x14b, 0x75, 0x69, 0x6d, 0xe1, 0xe1, 0x6e, 0x75, 0x3b, 0x76, 0x79,
+0x65, 0x73, 0x69, 0x6d, 0xe1, 0xe1, 0x6e, 0x75, 0x3b, 0x6b, 0x65, 0x73, 0x69, 0x6d, 0xe1, 0xe1, 0x6e, 0x75, 0x3b, 0x73,
+0x79, 0x65, 0x69, 0x6e, 0x69, 0x6d, 0xe1, 0xe1, 0x6e, 0x75, 0x3b, 0x70, 0x6f, 0x72, 0x67, 0x65, 0x6d, 0xe1, 0xe1, 0x6e,
+0x75, 0x3b, 0x10d, 0x6f, 0x68, 0x10d, 0xe2, 0x6d, 0xe1, 0xe1, 0x6e, 0x75, 0x3b, 0x72, 0x6f, 0x6f, 0x76, 0x76, 0xe2, 0x64,
+0x6d, 0xe1, 0xe1, 0x6e, 0x75, 0x3b, 0x73, 0x6b, 0x61, 0x6d, 0x6d, 0xe2, 0x6d, 0xe1, 0xe1, 0x6e, 0x75, 0x3b, 0x6a, 0x75,
+0x6f, 0x76, 0x6c, 0xe2, 0x6d, 0xe1, 0xe1, 0x6e, 0x75, 0x3b, 0x55, 0x3b, 0x4b, 0x3b, 0x4e, 0x4a, 0x3b, 0x43, 0x3b, 0x56,
+0x3b, 0x4b, 0x3b, 0x53, 0x3b, 0x50, 0x3b, 0x10c, 0x3b, 0x52, 0x3b, 0x53, 0x3b, 0x4a, 0x3b, 0x62c, 0x627, 0x646, 0x6a4, 0x6cc,
+0x6d5, 0x3b, 0x641, 0x626, 0x6a4, 0x631, 0x6cc, 0x6d5, 0x3b, 0x645, 0x627, 0x631, 0x633, 0x3b, 0x622, 0x6a4, 0x631, 0x6cc, 0x644, 0x3b,
+0x645, 0x626, 0x6cc, 0x3b, 0x62c, 0x648, 0x659, 0x623, 0x646, 0x3b, 0x62c, 0x648, 0x659, 0x644, 0x627, 0x3b, 0x622, 0x6af, 0x648, 0x633,
+0x62a, 0x3b, 0x633, 0x626, 0x67e, 0x62a, 0x627, 0x645, 0x631, 0x3b, 0x626, 0x648, 0x6a9, 0x62a, 0x648, 0x6a4, 0x631, 0x3b, 0x646, 0x648,
+0x6a4, 0x627, 0x645, 0x631, 0x3b, 0x62f, 0x626, 0x633, 0x627, 0x645, 0x631, 0x3b
};
static const ushort days_data[] = {
@@ -3845,997 +3888,1026 @@ static const ushort days_data[] = {
0x64, 0x69, 0x65, 0x6c, 0x3b, 0x45, 0x20, 0x68, 0xeb, 0x6e, 0xeb, 0x3b, 0x45, 0x20, 0x6d, 0x61, 0x72, 0x74, 0xeb, 0x3b,
0x45, 0x20, 0x6d, 0xeb, 0x72, 0x6b, 0x75, 0x72, 0xeb, 0x3b, 0x45, 0x20, 0x65, 0x6e, 0x6a, 0x74, 0x65, 0x3b, 0x45, 0x20,
0x70, 0x72, 0x65, 0x6d, 0x74, 0x65, 0x3b, 0x45, 0x20, 0x73, 0x68, 0x74, 0x75, 0x6e, 0xeb, 0x3b, 0x44, 0x3b, 0x48, 0x3b,
-0x4d, 0x3b, 0x4d, 0x3b, 0x45, 0x3b, 0x50, 0x3b, 0x53, 0x3b, 0x65, 0x20, 0x64, 0x69, 0x65, 0x6c, 0x3b, 0x65, 0x20, 0x68,
-0xeb, 0x6e, 0xeb, 0x3b, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x74, 0xeb, 0x3b, 0x65, 0x20, 0x6d, 0xeb, 0x72, 0x6b, 0x75, 0x72,
-0xeb, 0x3b, 0x65, 0x20, 0x65, 0x6e, 0x6a, 0x74, 0x65, 0x3b, 0x65, 0x20, 0x70, 0x72, 0x65, 0x6d, 0x74, 0x65, 0x3b, 0x65,
-0x20, 0x73, 0x68, 0x74, 0x75, 0x6e, 0xeb, 0x3b, 0x12a5, 0x1211, 0x12f5, 0x3b, 0x1230, 0x129e, 0x3b, 0x121b, 0x12ad, 0x1230, 0x3b, 0x1228,
-0x1261, 0x12d5, 0x3b, 0x1210, 0x1219, 0x1235, 0x3b, 0x12d3, 0x122d, 0x1265, 0x3b, 0x1245, 0x12f3, 0x121c, 0x3b, 0x12a5, 0x1211, 0x12f5, 0x3b, 0x1230,
-0x129e, 0x3b, 0x121b, 0x12ad, 0x1230, 0x129e, 0x3b, 0x1228, 0x1261, 0x12d5, 0x3b, 0x1210, 0x1219, 0x1235, 0x3b, 0x12d3, 0x122d, 0x1265, 0x3b, 0x1245,
-0x12f3, 0x121c, 0x3b, 0x12a5, 0x3b, 0x1230, 0x3b, 0x121b, 0x3b, 0x1228, 0x3b, 0x1210, 0x3b, 0x12d3, 0x3b, 0x1245, 0x3b, 0x627, 0x644, 0x623,
-0x62d, 0x62f, 0x3b, 0x627, 0x644, 0x627, 0x62b, 0x646, 0x64a, 0x646, 0x3b, 0x627, 0x644, 0x62b, 0x644, 0x627, 0x62b, 0x627, 0x621, 0x3b,
-0x627, 0x644, 0x623, 0x631, 0x628, 0x639, 0x627, 0x621, 0x3b, 0x627, 0x644, 0x62e, 0x645, 0x64a, 0x633, 0x3b, 0x627, 0x644, 0x62c, 0x645,
-0x639, 0x629, 0x3b, 0x627, 0x644, 0x633, 0x628, 0x62a, 0x3b, 0x62d, 0x3b, 0x646, 0x3b, 0x62b, 0x3b, 0x631, 0x3b, 0x62e, 0x3b, 0x62c,
-0x3b, 0x633, 0x3b, 0x56f, 0x56b, 0x580, 0x3b, 0x565, 0x580, 0x56f, 0x3b, 0x565, 0x580, 0x584, 0x3b, 0x579, 0x580, 0x584, 0x3b, 0x570,
-0x576, 0x563, 0x3b, 0x578, 0x582, 0x580, 0x3b, 0x577, 0x562, 0x569, 0x3b, 0x56f, 0x56b, 0x580, 0x561, 0x56f, 0x56b, 0x3b, 0x565, 0x580,
-0x56f, 0x578, 0x582, 0x577, 0x561, 0x562, 0x569, 0x56b, 0x3b, 0x565, 0x580, 0x565, 0x584, 0x577, 0x561, 0x562, 0x569, 0x56b, 0x3b, 0x579,
-0x578, 0x580, 0x565, 0x584, 0x577, 0x561, 0x562, 0x569, 0x56b, 0x3b, 0x570, 0x56b, 0x576, 0x563, 0x577, 0x561, 0x562, 0x569, 0x56b, 0x3b,
-0x578, 0x582, 0x580, 0x562, 0x561, 0x569, 0x3b, 0x577, 0x561, 0x562, 0x561, 0x569, 0x3b, 0x53f, 0x3b, 0x535, 0x3b, 0x535, 0x3b, 0x549,
-0x3b, 0x540, 0x3b, 0x548, 0x3b, 0x547, 0x3b, 0x9f0, 0x9ac, 0x9bf, 0x3b, 0x9b8, 0x9cb, 0x9ae, 0x3b, 0x9ae, 0x999, 0x9cd, 0x997, 0x9b2,
-0x3b, 0x9ac, 0x9c1, 0x9a7, 0x3b, 0x9ac, 0x9c3, 0x9b9, 0x9b7, 0x9cd, 0x9aa, 0x9a4, 0x9bf, 0x3b, 0x9b6, 0x9c1, 0x995, 0x9cd, 0x9f0, 0x3b,
-0x9b6, 0x9a8, 0x9bf, 0x3b, 0x9a6, 0x9c7, 0x993, 0x9ac, 0x9be, 0x9f0, 0x3b, 0x9b8, 0x9cb, 0x9ae, 0x9ac, 0x9be, 0x9f0, 0x3b, 0x9ae, 0x999,
-0x9cd, 0x997, 0x9b2, 0x9ac, 0x9be, 0x9f0, 0x3b, 0x9ac, 0x9c1, 0x9a7, 0x9ac, 0x9be, 0x9f0, 0x3b, 0x9ac, 0x9c3, 0x9b9, 0x9b7, 0x9cd, 0x9aa,
-0x9a4, 0x9bf, 0x9ac, 0x9be, 0x9f0, 0x3b, 0x9b6, 0x9c1, 0x995, 0x9cd, 0x9f0, 0x9ac, 0x9be, 0x9f0, 0x3b, 0x9b6, 0x9a8, 0x9bf, 0x9ac, 0x9be,
-0x9f0, 0x3b, 0x42, 0x2e, 0x3b, 0x42, 0x2e, 0x45, 0x2e, 0x3b, 0xc7, 0x2e, 0x41, 0x2e, 0x3b, 0xc7, 0x2e, 0x3b, 0x43, 0x2e,
-0x41, 0x2e, 0x3b, 0x43, 0x2e, 0x3b, 0x15e, 0x2e, 0x3b, 0x62, 0x61, 0x7a, 0x61, 0x72, 0x3b, 0x62, 0x61, 0x7a, 0x61, 0x72,
-0x20, 0x65, 0x72, 0x74, 0x259, 0x73, 0x69, 0x3b, 0xe7, 0x259, 0x72, 0x15f, 0x259, 0x6e, 0x62, 0x259, 0x20, 0x61, 0x78, 0x15f,
-0x61, 0x6d, 0x131, 0x3b, 0xe7, 0x259, 0x72, 0x15f, 0x259, 0x6e, 0x62, 0x259, 0x3b, 0x63, 0xfc, 0x6d, 0x259, 0x20, 0x61, 0x78,
-0x15f, 0x61, 0x6d, 0x131, 0x3b, 0x63, 0xfc, 0x6d, 0x259, 0x3b, 0x15f, 0x259, 0x6e, 0x62, 0x259, 0x3b, 0x411, 0x2e, 0x3b, 0x411,
-0x2e, 0x415, 0x2e, 0x3b, 0x427, 0x2e, 0x410, 0x2e, 0x3b, 0x427, 0x2e, 0x3b, 0x4b8, 0x2e, 0x410, 0x2e, 0x3b, 0x4b8, 0x2e, 0x3b,
-0x428, 0x2e, 0x3b, 0x431, 0x430, 0x437, 0x430, 0x440, 0x3b, 0x431, 0x430, 0x437, 0x430, 0x440, 0x20, 0x435, 0x440, 0x442, 0x4d9, 0x441,
-0x438, 0x3b, 0x447, 0x4d9, 0x440, 0x448, 0x4d9, 0x43d, 0x431, 0x4d9, 0x20, 0x430, 0x445, 0x448, 0x430, 0x43c, 0x44b, 0x3b, 0x447, 0x4d9,
-0x440, 0x448, 0x4d9, 0x43d, 0x431, 0x4d9, 0x3b, 0x4b9, 0x4af, 0x43c, 0x4d9, 0x20, 0x430, 0x445, 0x448, 0x430, 0x43c, 0x44b, 0x3b, 0x4b9,
-0x4af, 0x43c, 0x4d9, 0x3b, 0x448, 0x4d9, 0x43d, 0x431, 0x4d9, 0x3b, 0x69, 0x67, 0x2e, 0x3b, 0x61, 0x6c, 0x2e, 0x3b, 0x61, 0x72,
-0x2e, 0x3b, 0x61, 0x7a, 0x2e, 0x3b, 0x6f, 0x67, 0x2e, 0x3b, 0x6f, 0x72, 0x2e, 0x3b, 0x6c, 0x72, 0x2e, 0x3b, 0x49, 0x67,
-0x61, 0x6e, 0x64, 0x65, 0x61, 0x3b, 0x41, 0x73, 0x74, 0x65, 0x6c, 0x65, 0x68, 0x65, 0x6e, 0x61, 0x3b, 0x41, 0x73, 0x74,
-0x65, 0x61, 0x72, 0x74, 0x65, 0x61, 0x3b, 0x41, 0x73, 0x74, 0x65, 0x61, 0x7a, 0x6b, 0x65, 0x6e, 0x61, 0x3b, 0x4f, 0x73,
-0x74, 0x65, 0x67, 0x75, 0x6e, 0x61, 0x3b, 0x4f, 0x73, 0x74, 0x69, 0x72, 0x61, 0x6c, 0x61, 0x3b, 0x4c, 0x61, 0x72, 0x75,
-0x6e, 0x62, 0x61, 0x74, 0x61, 0x3b, 0x49, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x4f, 0x3b, 0x4f, 0x3b, 0x4c, 0x3b,
-0x69, 0x67, 0x61, 0x6e, 0x64, 0x65, 0x61, 0x3b, 0x61, 0x73, 0x74, 0x65, 0x6c, 0x65, 0x68, 0x65, 0x6e, 0x61, 0x3b, 0x61,
-0x73, 0x74, 0x65, 0x61, 0x72, 0x74, 0x65, 0x61, 0x3b, 0x61, 0x73, 0x74, 0x65, 0x61, 0x7a, 0x6b, 0x65, 0x6e, 0x61, 0x3b,
-0x6f, 0x73, 0x74, 0x65, 0x67, 0x75, 0x6e, 0x61, 0x3b, 0x6f, 0x73, 0x74, 0x69, 0x72, 0x61, 0x6c, 0x61, 0x3b, 0x6c, 0x61,
-0x72, 0x75, 0x6e, 0x62, 0x61, 0x74, 0x61, 0x3b, 0x9b0, 0x9ac, 0x9bf, 0x3b, 0x9b8, 0x9cb, 0x9ae, 0x3b, 0x9ae, 0x999, 0x9cd, 0x997,
-0x9b2, 0x3b, 0x9ac, 0x9c1, 0x9a7, 0x3b, 0x9ac, 0x9c3, 0x9b9, 0x9b8, 0x9cd, 0x9aa, 0x9a4, 0x9bf, 0x3b, 0x9b6, 0x9c1, 0x995, 0x9cd, 0x9b0,
-0x3b, 0x9b6, 0x9a8, 0x9bf, 0x3b, 0x9b0, 0x9ac, 0x9bf, 0x9ac, 0x9be, 0x9b0, 0x3b, 0x9b8, 0x9cb, 0x9ae, 0x9ac, 0x9be, 0x9b0, 0x3b, 0x9ae,
-0x999, 0x9cd, 0x997, 0x9b2, 0x9ac, 0x9be, 0x9b0, 0x3b, 0x9ac, 0x9c1, 0x9a7, 0x9ac, 0x9be, 0x9b0, 0x3b, 0x9ac, 0x9c3, 0x9b9, 0x9b7, 0x9cd,
-0x9aa, 0x9a4, 0x9bf, 0x9ac, 0x9be, 0x9b0, 0x3b, 0x9b6, 0x9c1, 0x995, 0x9cd, 0x9b0, 0x9ac, 0x9be, 0x9b0, 0x3b, 0x9b6, 0x9a8, 0x9bf, 0x9ac,
-0x9be, 0x9b0, 0x3b, 0x9b0, 0x3b, 0x9b8, 0x9cb, 0x3b, 0x9ae, 0x3b, 0x9ac, 0x9c1, 0x3b, 0x9ac, 0x9c3, 0x3b, 0x9b6, 0x9c1, 0x3b, 0x9b6,
-0x3b, 0x9b0, 0x9ac, 0x9bf, 0x9ac, 0x9be, 0x9b0, 0x3b, 0x9b8, 0x9cb, 0x9ae, 0x9ac, 0x9be, 0x9b0, 0x3b, 0x9ae, 0x999, 0x9cd, 0x997, 0x9b2,
-0x9ac, 0x9be, 0x9b0, 0x3b, 0x9ac, 0x9c1, 0x9a7, 0x9ac, 0x9be, 0x9b0, 0x3b, 0x9ac, 0x9c3, 0x9b9, 0x9b8, 0x9cd, 0x9aa, 0x9a4, 0x9bf, 0x9ac,
-0x9be, 0x9b0, 0x3b, 0x9b6, 0x9c1, 0x995, 0x9cd, 0x9b0, 0x9ac, 0x9be, 0x9b0, 0x3b, 0x9b6, 0x9a8, 0x9bf, 0x9ac, 0x9be, 0x9b0, 0x3b, 0xf5f,
-0xfb3, 0xf0b, 0x3b, 0xf58, 0xf72, 0xf62, 0xf0b, 0x3b, 0xf63, 0xfb7, 0xf42, 0xf0b, 0x3b, 0xf55, 0xf74, 0xf62, 0xf0b, 0x3b, 0xf66, 0xf44,
-0xf66, 0xf0b, 0x3b, 0xf66, 0xfa4, 0xf7a, 0xf53, 0xf0b, 0x3b, 0xf49, 0xf72, 0xf0b, 0x3b, 0xf42, 0xf5f, 0xf60, 0xf0b, 0xf5f, 0xfb3, 0xf0b,
-0xf56, 0xf0b, 0x3b, 0xf42, 0xf5f, 0xf60, 0xf0b, 0xf58, 0xf72, 0xf42, 0xf0b, 0xf51, 0xf58, 0xf62, 0xf0b, 0x3b, 0xf42, 0xf5f, 0xf60, 0xf0b,
-0xf63, 0xfb7, 0xf42, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf42, 0xf5f, 0xf60, 0xf0b, 0xf55, 0xf74, 0xf62, 0xf0b, 0xf56, 0xf74, 0xf0b, 0x3b, 0xf42,
-0xf5f, 0xf60, 0xf0b, 0xf54, 0xf0b, 0xf66, 0xf44, 0xf66, 0xf0b, 0x3b, 0xf42, 0xf5f, 0xf60, 0xf0b, 0xf66, 0xfa4, 0xf7a, 0xf53, 0xf0b, 0xf54,
-0xf0b, 0x3b, 0xf42, 0xf5f, 0xf60, 0xf0b, 0xf49, 0xf72, 0xf0b, 0xf58, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0x3b, 0xf58, 0xf72, 0xf62, 0x3b, 0xf63,
-0xfb7, 0xf42, 0x3b, 0xf55, 0xf74, 0xf62, 0x3b, 0xf66, 0xf44, 0xfb6, 0x3b, 0xf66, 0xfa4, 0xf7a, 0xf53, 0x3b, 0xf49, 0xf72, 0x3b, 0x53,
-0x75, 0x6c, 0x3b, 0x4c, 0x75, 0x6e, 0x3b, 0x4d, 0x65, 0x75, 0x2e, 0x3b, 0x4d, 0x65, 0x72, 0x2e, 0x3b, 0x59, 0x61, 0x6f,
-0x75, 0x3b, 0x47, 0x77, 0x65, 0x2e, 0x3b, 0x53, 0x61, 0x64, 0x2e, 0x3b, 0x53, 0x75, 0x6c, 0x3b, 0x4c, 0x75, 0x6e, 0x3b,
-0x4d, 0x65, 0x75, 0x72, 0x7a, 0x68, 0x3b, 0x4d, 0x65, 0x72, 0x63, 0x2bc, 0x68, 0x65, 0x72, 0x3b, 0x59, 0x61, 0x6f, 0x75,
-0x3b, 0x47, 0x77, 0x65, 0x6e, 0x65, 0x72, 0x3b, 0x53, 0x61, 0x64, 0x6f, 0x72, 0x6e, 0x3b, 0x53, 0x75, 0x3b, 0x4c, 0x3b,
-0x4d, 0x7a, 0x3b, 0x4d, 0x63, 0x3b, 0x59, 0x3b, 0x47, 0x3b, 0x53, 0x61, 0x3b, 0x43d, 0x434, 0x3b, 0x43f, 0x43d, 0x3b, 0x432,
-0x442, 0x3b, 0x441, 0x440, 0x3b, 0x447, 0x442, 0x3b, 0x43f, 0x442, 0x3b, 0x441, 0x431, 0x3b, 0x43d, 0x435, 0x434, 0x435, 0x43b, 0x44f,
-0x3b, 0x43f, 0x43e, 0x43d, 0x435, 0x434, 0x435, 0x43b, 0x43d, 0x438, 0x43a, 0x3b, 0x432, 0x442, 0x43e, 0x440, 0x43d, 0x438, 0x43a, 0x3b,
-0x441, 0x440, 0x44f, 0x434, 0x430, 0x3b, 0x447, 0x435, 0x442, 0x432, 0x44a, 0x440, 0x442, 0x44a, 0x43a, 0x3b, 0x43f, 0x435, 0x442, 0x44a,
-0x43a, 0x3b, 0x441, 0x44a, 0x431, 0x43e, 0x442, 0x430, 0x3b, 0x43d, 0x3b, 0x43f, 0x3b, 0x432, 0x3b, 0x441, 0x3b, 0x447, 0x3b, 0x43f,
-0x3b, 0x441, 0x3b, 0x1010, 0x1014, 0x1004, 0x103a, 0x1039, 0x1002, 0x1014, 0x103d, 0x1031, 0x3b, 0x1010, 0x1014, 0x1004, 0x103a, 0x1039, 0x101c, 0x102c,
-0x3b, 0x1021, 0x1004, 0x103a, 0x1039, 0x1002, 0x102b, 0x3b, 0x1017, 0x102f, 0x1012, 0x1039, 0x1013, 0x101f, 0x1030, 0x1038, 0x3b, 0x1000, 0x103c, 0x102c,
-0x101e, 0x1015, 0x1010, 0x1031, 0x1038, 0x3b, 0x101e, 0x1031, 0x102c, 0x1000, 0x103c, 0x102c, 0x3b, 0x1005, 0x1014, 0x1031, 0x3b, 0x1010, 0x3b, 0x1010,
-0x3b, 0x1021, 0x3b, 0x1017, 0x3b, 0x1000, 0x3b, 0x101e, 0x3b, 0x1005, 0x3b, 0x43d, 0x434, 0x3b, 0x43f, 0x43d, 0x3b, 0x430, 0x45e, 0x3b,
-0x441, 0x440, 0x3b, 0x447, 0x446, 0x3b, 0x43f, 0x442, 0x3b, 0x441, 0x431, 0x3b, 0x43d, 0x44f, 0x434, 0x437, 0x435, 0x43b, 0x44f, 0x3b,
-0x43f, 0x430, 0x43d, 0x44f, 0x434, 0x437, 0x435, 0x43b, 0x430, 0x43a, 0x3b, 0x430, 0x45e, 0x442, 0x43e, 0x440, 0x430, 0x43a, 0x3b, 0x441,
-0x435, 0x440, 0x430, 0x434, 0x430, 0x3b, 0x447, 0x430, 0x446, 0x432, 0x435, 0x440, 0x3b, 0x43f, 0x44f, 0x442, 0x43d, 0x456, 0x446, 0x430,
-0x3b, 0x441, 0x443, 0x431, 0x43e, 0x442, 0x430, 0x3b, 0x43d, 0x3b, 0x43f, 0x3b, 0x430, 0x3b, 0x441, 0x3b, 0x447, 0x3b, 0x43f, 0x3b,
-0x441, 0x3b, 0x17a2, 0x17b6, 0x1791, 0x17b7, 0x178f, 0x17d2, 0x1799, 0x3b, 0x1785, 0x17d0, 0x1793, 0x17d2, 0x1791, 0x3b, 0x17a2, 0x1784, 0x17d2, 0x1782,
-0x17b6, 0x179a, 0x3b, 0x1796, 0x17bb, 0x1792, 0x3b, 0x1796, 0x17d2, 0x179a, 0x17a0, 0x179f, 0x17d2, 0x1794, 0x178f, 0x17b7, 0x17cd, 0x3b, 0x179f, 0x17bb,
-0x1780, 0x17d2, 0x179a, 0x3b, 0x179f, 0x17c5, 0x179a, 0x17cd, 0x3b, 0x17a2, 0x3b, 0x1785, 0x3b, 0x17a2, 0x3b, 0x1796, 0x3b, 0x1796, 0x3b, 0x179f,
-0x3b, 0x179f, 0x3b, 0x64, 0x67, 0x2e, 0x3b, 0x64, 0x6c, 0x2e, 0x3b, 0x64, 0x74, 0x2e, 0x3b, 0x64, 0x63, 0x2e, 0x3b, 0x64,
-0x6a, 0x2e, 0x3b, 0x64, 0x76, 0x2e, 0x3b, 0x64, 0x73, 0x2e, 0x3b, 0x64, 0x69, 0x75, 0x6d, 0x65, 0x6e, 0x67, 0x65, 0x3b,
-0x64, 0x69, 0x6c, 0x6c, 0x75, 0x6e, 0x73, 0x3b, 0x64, 0x69, 0x6d, 0x61, 0x72, 0x74, 0x73, 0x3b, 0x64, 0x69, 0x6d, 0x65,
-0x63, 0x72, 0x65, 0x73, 0x3b, 0x64, 0x69, 0x6a, 0x6f, 0x75, 0x73, 0x3b, 0x64, 0x69, 0x76, 0x65, 0x6e, 0x64, 0x72, 0x65,
-0x73, 0x3b, 0x64, 0x69, 0x73, 0x73, 0x61, 0x62, 0x74, 0x65, 0x3b, 0x64, 0x67, 0x3b, 0x64, 0x6c, 0x3b, 0x64, 0x74, 0x3b,
-0x64, 0x63, 0x3b, 0x64, 0x6a, 0x3b, 0x64, 0x76, 0x3b, 0x64, 0x73, 0x3b, 0x5468, 0x65e5, 0x3b, 0x5468, 0x4e00, 0x3b, 0x5468, 0x4e8c,
-0x3b, 0x5468, 0x4e09, 0x3b, 0x5468, 0x56db, 0x3b, 0x5468, 0x4e94, 0x3b, 0x5468, 0x516d, 0x3b, 0x661f, 0x671f, 0x65e5, 0x3b, 0x661f, 0x671f, 0x4e00,
-0x3b, 0x661f, 0x671f, 0x4e8c, 0x3b, 0x661f, 0x671f, 0x4e09, 0x3b, 0x661f, 0x671f, 0x56db, 0x3b, 0x661f, 0x671f, 0x4e94, 0x3b, 0x661f, 0x671f, 0x516d,
-0x3b, 0x65e5, 0x3b, 0x4e00, 0x3b, 0x4e8c, 0x3b, 0x4e09, 0x3b, 0x56db, 0x3b, 0x4e94, 0x3b, 0x516d, 0x3b, 0x9031, 0x65e5, 0x3b, 0x9031, 0x4e00,
-0x3b, 0x9031, 0x4e8c, 0x3b, 0x9031, 0x4e09, 0x3b, 0x9031, 0x56db, 0x3b, 0x9031, 0x4e94, 0x3b, 0x9031, 0x516d, 0x3b, 0x6e, 0x65, 0x64, 0x3b,
-0x70, 0x6f, 0x6e, 0x3b, 0x75, 0x74, 0x6f, 0x3b, 0x73, 0x72, 0x69, 0x3b, 0x10d, 0x65, 0x74, 0x3b, 0x70, 0x65, 0x74, 0x3b,
-0x73, 0x75, 0x62, 0x3b, 0x6e, 0x65, 0x64, 0x6a, 0x65, 0x6c, 0x6a, 0x61, 0x3b, 0x70, 0x6f, 0x6e, 0x65, 0x64, 0x6a, 0x65,
-0x6c, 0x6a, 0x61, 0x6b, 0x3b, 0x75, 0x74, 0x6f, 0x72, 0x61, 0x6b, 0x3b, 0x73, 0x72, 0x69, 0x6a, 0x65, 0x64, 0x61, 0x3b,
-0x10d, 0x65, 0x74, 0x76, 0x72, 0x74, 0x61, 0x6b, 0x3b, 0x70, 0x65, 0x74, 0x61, 0x6b, 0x3b, 0x73, 0x75, 0x62, 0x6f, 0x74,
-0x61, 0x3b, 0x6e, 0x3b, 0x70, 0x3b, 0x75, 0x3b, 0x73, 0x3b, 0x10d, 0x3b, 0x70, 0x3b, 0x73, 0x3b, 0x4e, 0x3b, 0x50, 0x3b,
-0x55, 0x3b, 0x53, 0x3b, 0x10c, 0x3b, 0x50, 0x3b, 0x53, 0x3b, 0x6e, 0x65, 0x3b, 0x70, 0x6f, 0x3b, 0xfa, 0x74, 0x3b, 0x73,
-0x74, 0x3b, 0x10d, 0x74, 0x3b, 0x70, 0xe1, 0x3b, 0x73, 0x6f, 0x3b, 0x6e, 0x65, 0x64, 0x11b, 0x6c, 0x65, 0x3b, 0x70, 0x6f,
-0x6e, 0x64, 0x11b, 0x6c, 0xed, 0x3b, 0xfa, 0x74, 0x65, 0x72, 0xfd, 0x3b, 0x73, 0x74, 0x159, 0x65, 0x64, 0x61, 0x3b, 0x10d,
-0x74, 0x76, 0x72, 0x74, 0x65, 0x6b, 0x3b, 0x70, 0xe1, 0x74, 0x65, 0x6b, 0x3b, 0x73, 0x6f, 0x62, 0x6f, 0x74, 0x61, 0x3b,
-0x4e, 0x3b, 0x50, 0x3b, 0xda, 0x3b, 0x53, 0x3b, 0x10c, 0x3b, 0x50, 0x3b, 0x53, 0x3b, 0x73, 0xf8, 0x6e, 0x3b, 0x6d, 0x61,
-0x6e, 0x3b, 0x74, 0x69, 0x72, 0x3b, 0x6f, 0x6e, 0x73, 0x3b, 0x74, 0x6f, 0x72, 0x3b, 0x66, 0x72, 0x65, 0x3b, 0x6c, 0xf8,
-0x72, 0x3b, 0x73, 0xf8, 0x6e, 0x64, 0x61, 0x67, 0x3b, 0x6d, 0x61, 0x6e, 0x64, 0x61, 0x67, 0x3b, 0x74, 0x69, 0x72, 0x73,
-0x64, 0x61, 0x67, 0x3b, 0x6f, 0x6e, 0x73, 0x64, 0x61, 0x67, 0x3b, 0x74, 0x6f, 0x72, 0x73, 0x64, 0x61, 0x67, 0x3b, 0x66,
-0x72, 0x65, 0x64, 0x61, 0x67, 0x3b, 0x6c, 0xf8, 0x72, 0x64, 0x61, 0x67, 0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0x54, 0x3b, 0x4f,
-0x3b, 0x54, 0x3b, 0x46, 0x3b, 0x4c, 0x3b, 0x73, 0xf8, 0x6e, 0x2e, 0x3b, 0x6d, 0x61, 0x6e, 0x2e, 0x3b, 0x74, 0x69, 0x72,
-0x2e, 0x3b, 0x6f, 0x6e, 0x73, 0x2e, 0x3b, 0x74, 0x6f, 0x72, 0x2e, 0x3b, 0x66, 0x72, 0x65, 0x2e, 0x3b, 0x6c, 0xf8, 0x72,
-0x2e, 0x3b, 0x7a, 0x6f, 0x3b, 0x6d, 0x61, 0x3b, 0x64, 0x69, 0x3b, 0x77, 0x6f, 0x3b, 0x64, 0x6f, 0x3b, 0x76, 0x72, 0x3b,
-0x7a, 0x61, 0x3b, 0x7a, 0x6f, 0x6e, 0x64, 0x61, 0x67, 0x3b, 0x6d, 0x61, 0x61, 0x6e, 0x64, 0x61, 0x67, 0x3b, 0x64, 0x69,
-0x6e, 0x73, 0x64, 0x61, 0x67, 0x3b, 0x77, 0x6f, 0x65, 0x6e, 0x73, 0x64, 0x61, 0x67, 0x3b, 0x64, 0x6f, 0x6e, 0x64, 0x65,
-0x72, 0x64, 0x61, 0x67, 0x3b, 0x76, 0x72, 0x69, 0x6a, 0x64, 0x61, 0x67, 0x3b, 0x7a, 0x61, 0x74, 0x65, 0x72, 0x64, 0x61,
-0x67, 0x3b, 0x5a, 0x3b, 0x4d, 0x3b, 0x44, 0x3b, 0x57, 0x3b, 0x44, 0x3b, 0x56, 0x3b, 0x5a, 0x3b, 0x53, 0x75, 0x6e, 0x2e,
-0x3b, 0x4d, 0x6f, 0x6e, 0x2e, 0x3b, 0x54, 0x75, 0x65, 0x2e, 0x3b, 0x57, 0x65, 0x64, 0x2e, 0x3b, 0x54, 0x68, 0x75, 0x2e,
-0x3b, 0x46, 0x72, 0x69, 0x2e, 0x3b, 0x53, 0x61, 0x74, 0x2e, 0x3b, 0x53, 0x75, 0x2e, 0x3b, 0x4d, 0x2e, 0x3b, 0x54, 0x75,
-0x2e, 0x3b, 0x57, 0x2e, 0x3b, 0x54, 0x68, 0x2e, 0x3b, 0x46, 0x2e, 0x3b, 0x53, 0x61, 0x2e, 0x3b, 0x50, 0x3b, 0x45, 0x3b,
-0x54, 0x3b, 0x4b, 0x3b, 0x4e, 0x3b, 0x52, 0x3b, 0x4c, 0x3b, 0x70, 0xfc, 0x68, 0x61, 0x70, 0xe4, 0x65, 0x76, 0x3b, 0x65,
-0x73, 0x6d, 0x61, 0x73, 0x70, 0xe4, 0x65, 0x76, 0x3b, 0x74, 0x65, 0x69, 0x73, 0x69, 0x70, 0xe4, 0x65, 0x76, 0x3b, 0x6b,
-0x6f, 0x6c, 0x6d, 0x61, 0x70, 0xe4, 0x65, 0x76, 0x3b, 0x6e, 0x65, 0x6c, 0x6a, 0x61, 0x70, 0xe4, 0x65, 0x76, 0x3b, 0x72,
-0x65, 0x65, 0x64, 0x65, 0x3b, 0x6c, 0x61, 0x75, 0x70, 0xe4, 0x65, 0x76, 0x3b, 0x73, 0x75, 0x6e, 0x3b, 0x6d, 0xe1, 0x6e,
-0x3b, 0x74, 0xfd, 0x73, 0x3b, 0x6d, 0x69, 0x6b, 0x3b, 0x68, 0xf3, 0x73, 0x3b, 0x66, 0x72, 0xed, 0x3b, 0x6c, 0x65, 0x79,
-0x3b, 0x73, 0x75, 0x6e, 0x6e, 0x75, 0x64, 0x61, 0x67, 0x75, 0x72, 0x3b, 0x6d, 0xe1, 0x6e, 0x61, 0x64, 0x61, 0x67, 0x75,
-0x72, 0x3b, 0x74, 0xfd, 0x73, 0x64, 0x61, 0x67, 0x75, 0x72, 0x3b, 0x6d, 0x69, 0x6b, 0x75, 0x64, 0x61, 0x67, 0x75, 0x72,
-0x3b, 0x68, 0xf3, 0x73, 0x64, 0x61, 0x67, 0x75, 0x72, 0x3b, 0x66, 0x72, 0xed, 0x67, 0x67, 0x6a, 0x61, 0x64, 0x61, 0x67,
-0x75, 0x72, 0x3b, 0x6c, 0x65, 0x79, 0x67, 0x61, 0x72, 0x64, 0x61, 0x67, 0x75, 0x72, 0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0x54,
-0x3b, 0x4d, 0x3b, 0x48, 0x3b, 0x46, 0x3b, 0x4c, 0x3b, 0x73, 0x75, 0x6e, 0x2e, 0x3b, 0x6d, 0xe1, 0x6e, 0x2e, 0x3b, 0x74,
-0xfd, 0x73, 0x2e, 0x3b, 0x6d, 0x69, 0x6b, 0x2e, 0x3b, 0x68, 0xf3, 0x73, 0x2e, 0x3b, 0x66, 0x72, 0xed, 0x2e, 0x3b, 0x6c,
-0x65, 0x79, 0x2e, 0x3b, 0x73, 0x75, 0x3b, 0x6d, 0x61, 0x3b, 0x74, 0x69, 0x3b, 0x6b, 0x65, 0x3b, 0x74, 0x6f, 0x3b, 0x70,
-0x65, 0x3b, 0x6c, 0x61, 0x3b, 0x73, 0x75, 0x6e, 0x6e, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x3b, 0x6d, 0x61, 0x61, 0x6e, 0x61,
-0x6e, 0x74, 0x61, 0x69, 0x3b, 0x74, 0x69, 0x69, 0x73, 0x74, 0x61, 0x69, 0x3b, 0x6b, 0x65, 0x73, 0x6b, 0x69, 0x76, 0x69,
-0x69, 0x6b, 0x6b, 0x6f, 0x3b, 0x74, 0x6f, 0x72, 0x73, 0x74, 0x61, 0x69, 0x3b, 0x70, 0x65, 0x72, 0x6a, 0x61, 0x6e, 0x74,
-0x61, 0x69, 0x3b, 0x6c, 0x61, 0x75, 0x61, 0x6e, 0x74, 0x61, 0x69, 0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0x54, 0x3b, 0x4b, 0x3b,
-0x54, 0x3b, 0x50, 0x3b, 0x4c, 0x3b, 0x73, 0x75, 0x6e, 0x6e, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x61, 0x3b, 0x6d, 0x61,
-0x61, 0x6e, 0x61, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x61, 0x3b, 0x74, 0x69, 0x69, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x61, 0x3b,
-0x6b, 0x65, 0x73, 0x6b, 0x69, 0x76, 0x69, 0x69, 0x6b, 0x6b, 0x6f, 0x6e, 0x61, 0x3b, 0x74, 0x6f, 0x72, 0x73, 0x74, 0x61,
-0x69, 0x6e, 0x61, 0x3b, 0x70, 0x65, 0x72, 0x6a, 0x61, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x61, 0x3b, 0x6c, 0x61, 0x75, 0x61,
-0x6e, 0x74, 0x61, 0x69, 0x6e, 0x61, 0x3b, 0x64, 0x69, 0x6d, 0x2e, 0x3b, 0x6c, 0x75, 0x6e, 0x2e, 0x3b, 0x6d, 0x61, 0x72,
-0x2e, 0x3b, 0x6d, 0x65, 0x72, 0x2e, 0x3b, 0x6a, 0x65, 0x75, 0x2e, 0x3b, 0x76, 0x65, 0x6e, 0x2e, 0x3b, 0x73, 0x61, 0x6d,
-0x2e, 0x3b, 0x64, 0x69, 0x6d, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x3b, 0x6c, 0x75, 0x6e, 0x64, 0x69, 0x3b, 0x6d, 0x61, 0x72,
-0x64, 0x69, 0x3b, 0x6d, 0x65, 0x72, 0x63, 0x72, 0x65, 0x64, 0x69, 0x3b, 0x6a, 0x65, 0x75, 0x64, 0x69, 0x3b, 0x76, 0x65,
-0x6e, 0x64, 0x72, 0x65, 0x64, 0x69, 0x3b, 0x73, 0x61, 0x6d, 0x65, 0x64, 0x69, 0x3b, 0x44, 0x3b, 0x4c, 0x3b, 0x4d, 0x3b,
-0x4d, 0x3b, 0x4a, 0x3b, 0x56, 0x3b, 0x53, 0x3b, 0x73, 0x69, 0x3b, 0x6d, 0x6f, 0x3b, 0x74, 0x69, 0x3b, 0x77, 0x6f, 0x3b,
-0x74, 0x6f, 0x3b, 0x66, 0x72, 0x3b, 0x73, 0x6f, 0x3b, 0x73, 0x6e, 0x65, 0x69, 0x6e, 0x3b, 0x6d, 0x6f, 0x61, 0x6e, 0x64,
-0x65, 0x69, 0x3b, 0x74, 0x69, 0x69, 0x73, 0x64, 0x65, 0x69, 0x3b, 0x77, 0x6f, 0x61, 0x6e, 0x73, 0x64, 0x65, 0x69, 0x3b,
-0x74, 0x6f, 0x6e, 0x67, 0x65, 0x72, 0x73, 0x64, 0x65, 0x69, 0x3b, 0x66, 0x72, 0x65, 0x65, 0x64, 0x3b, 0x73, 0x6e, 0x65,
-0x6f, 0x6e, 0x3b, 0x44, 0x69, 0x44, 0x3b, 0x44, 0x69, 0x4c, 0x3b, 0x44, 0x69, 0x4d, 0x3b, 0x44, 0x69, 0x43, 0x3b, 0x44,
-0x69, 0x61, 0x3b, 0x44, 0x69, 0x68, 0x3b, 0x44, 0x69, 0x53, 0x3b, 0x44, 0x69, 0x44, 0xf2, 0x6d, 0x68, 0x6e, 0x61, 0x69,
-0x63, 0x68, 0x3b, 0x44, 0x69, 0x4c, 0x75, 0x61, 0x69, 0x6e, 0x3b, 0x44, 0x69, 0x4d, 0xe0, 0x69, 0x72, 0x74, 0x3b, 0x44,
-0x69, 0x43, 0x69, 0x61, 0x64, 0x61, 0x69, 0x6e, 0x3b, 0x44, 0x69, 0x61, 0x72, 0x44, 0x61, 0x6f, 0x69, 0x6e, 0x3b, 0x44,
-0x69, 0x68, 0x41, 0x6f, 0x69, 0x6e, 0x65, 0x3b, 0x44, 0x69, 0x53, 0x61, 0x74, 0x68, 0x61, 0x69, 0x72, 0x6e, 0x65, 0x3b,
-0x44, 0x3b, 0x4c, 0x3b, 0x4d, 0x3b, 0x43, 0x3b, 0x41, 0x3b, 0x48, 0x3b, 0x53, 0x3b, 0x44, 0x6f, 0x6d, 0x2e, 0x3b, 0x4c,
-0x75, 0x6e, 0x73, 0x3b, 0x4d, 0x61, 0x72, 0x2e, 0x3b, 0x4d, 0xe9, 0x72, 0x2e, 0x3b, 0x58, 0x6f, 0x76, 0x2e, 0x3b, 0x56,
-0x65, 0x6e, 0x2e, 0x3b, 0x53, 0xe1, 0x62, 0x2e, 0x3b, 0x44, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x6f, 0x3b, 0x4c, 0x75, 0x6e,
-0x73, 0x3b, 0x4d, 0x61, 0x72, 0x74, 0x65, 0x73, 0x3b, 0x4d, 0xe9, 0x72, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x3b, 0x58, 0x6f,
-0x76, 0x65, 0x73, 0x3b, 0x56, 0x65, 0x6e, 0x72, 0x65, 0x73, 0x3b, 0x53, 0xe1, 0x62, 0x61, 0x64, 0x6f, 0x3b, 0x44, 0x3b,
-0x4c, 0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x58, 0x3b, 0x56, 0x3b, 0x53, 0x3b, 0x64, 0x6f, 0x6d, 0x2e, 0x3b, 0x6c, 0x75, 0x6e,
-0x73, 0x3b, 0x6d, 0x61, 0x72, 0x2e, 0x3b, 0x6d, 0xe9, 0x72, 0x2e, 0x3b, 0x78, 0x6f, 0x76, 0x2e, 0x3b, 0x76, 0x65, 0x6e,
-0x2e, 0x3b, 0x73, 0xe1, 0x62, 0x2e, 0x3b, 0x64, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x6f, 0x3b, 0x6c, 0x75, 0x6e, 0x73, 0x3b,
-0x6d, 0x61, 0x72, 0x74, 0x65, 0x73, 0x3b, 0x6d, 0xe9, 0x72, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x3b, 0x78, 0x6f, 0x76, 0x65,
-0x73, 0x3b, 0x76, 0x65, 0x6e, 0x72, 0x65, 0x73, 0x3b, 0x73, 0xe1, 0x62, 0x61, 0x64, 0x6f, 0x3b, 0x64, 0x2e, 0x3b, 0x6c,
-0x2e, 0x3b, 0x6d, 0x2e, 0x3b, 0x6d, 0x2e, 0x3b, 0x78, 0x2e, 0x3b, 0x76, 0x2e, 0x3b, 0x73, 0x2e, 0x3b, 0x10d9, 0x10d5, 0x10d8,
-0x3b, 0x10dd, 0x10e0, 0x10e8, 0x3b, 0x10e1, 0x10d0, 0x10db, 0x3b, 0x10dd, 0x10d7, 0x10ee, 0x3b, 0x10ee, 0x10e3, 0x10d7, 0x3b, 0x10de, 0x10d0, 0x10e0,
-0x3b, 0x10e8, 0x10d0, 0x10d1, 0x3b, 0x10d9, 0x10d5, 0x10d8, 0x10e0, 0x10d0, 0x3b, 0x10dd, 0x10e0, 0x10e8, 0x10d0, 0x10d1, 0x10d0, 0x10d7, 0x10d8, 0x3b,
-0x10e1, 0x10d0, 0x10db, 0x10e8, 0x10d0, 0x10d1, 0x10d0, 0x10d7, 0x10d8, 0x3b, 0x10dd, 0x10d7, 0x10ee, 0x10e8, 0x10d0, 0x10d1, 0x10d0, 0x10d7, 0x10d8, 0x3b,
-0x10ee, 0x10e3, 0x10d7, 0x10e8, 0x10d0, 0x10d1, 0x10d0, 0x10d7, 0x10d8, 0x3b, 0x10de, 0x10d0, 0x10e0, 0x10d0, 0x10e1, 0x10d9, 0x10d4, 0x10d5, 0x10d8, 0x3b,
-0x10e8, 0x10d0, 0x10d1, 0x10d0, 0x10d7, 0x10d8, 0x3b, 0x10d9, 0x3b, 0x10dd, 0x3b, 0x10e1, 0x3b, 0x10dd, 0x3b, 0x10ee, 0x3b, 0x10de, 0x3b, 0x10e8,
-0x3b, 0x53, 0x6f, 0x3b, 0x4d, 0x6f, 0x3b, 0x44, 0x69, 0x3b, 0x4d, 0x69, 0x3b, 0x44, 0x6f, 0x3b, 0x46, 0x72, 0x3b, 0x53,
-0x61, 0x3b, 0x53, 0x6f, 0x6e, 0x6e, 0x74, 0x61, 0x67, 0x3b, 0x4d, 0x6f, 0x6e, 0x74, 0x61, 0x67, 0x3b, 0x44, 0x69, 0x65,
-0x6e, 0x73, 0x74, 0x61, 0x67, 0x3b, 0x4d, 0x69, 0x74, 0x74, 0x77, 0x6f, 0x63, 0x68, 0x3b, 0x44, 0x6f, 0x6e, 0x6e, 0x65,
-0x72, 0x73, 0x74, 0x61, 0x67, 0x3b, 0x46, 0x72, 0x65, 0x69, 0x74, 0x61, 0x67, 0x3b, 0x53, 0x61, 0x6d, 0x73, 0x74, 0x61,
-0x67, 0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0x44, 0x3b, 0x4d, 0x3b, 0x44, 0x3b, 0x46, 0x3b, 0x53, 0x3b, 0x53, 0x6f, 0x2e, 0x3b,
-0x4d, 0x6f, 0x2e, 0x3b, 0x44, 0x69, 0x2e, 0x3b, 0x4d, 0x69, 0x2e, 0x3b, 0x44, 0x6f, 0x2e, 0x3b, 0x46, 0x72, 0x2e, 0x3b,
-0x53, 0x61, 0x2e, 0x3b, 0x39a, 0x3c5, 0x3c1, 0x3b, 0x394, 0x3b5, 0x3c5, 0x3b, 0x3a4, 0x3c1, 0x3af, 0x3b, 0x3a4, 0x3b5, 0x3c4, 0x3b,
-0x3a0, 0x3ad, 0x3bc, 0x3b, 0x3a0, 0x3b1, 0x3c1, 0x3b, 0x3a3, 0x3ac, 0x3b2, 0x3b, 0x39a, 0x3c5, 0x3c1, 0x3b9, 0x3b1, 0x3ba, 0x3ae, 0x3b,
-0x394, 0x3b5, 0x3c5, 0x3c4, 0x3ad, 0x3c1, 0x3b1, 0x3b, 0x3a4, 0x3c1, 0x3af, 0x3c4, 0x3b7, 0x3b, 0x3a4, 0x3b5, 0x3c4, 0x3ac, 0x3c1, 0x3c4,
-0x3b7, 0x3b, 0x3a0, 0x3ad, 0x3bc, 0x3c0, 0x3c4, 0x3b7, 0x3b, 0x3a0, 0x3b1, 0x3c1, 0x3b1, 0x3c3, 0x3ba, 0x3b5, 0x3c5, 0x3ae, 0x3b, 0x3a3,
-0x3ac, 0x3b2, 0x3b2, 0x3b1, 0x3c4, 0x3bf, 0x3b, 0x39a, 0x3b, 0x394, 0x3b, 0x3a4, 0x3b, 0x3a4, 0x3b, 0x3a0, 0x3b, 0x3a0, 0x3b, 0x3a3,
-0x3b, 0x73, 0x61, 0x62, 0x3b, 0x61, 0x74, 0x61, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x70, 0x69, 0x6e, 0x3b, 0x73, 0x69, 0x73,
-0x3b, 0x74, 0x61, 0x6c, 0x3b, 0x61, 0x72, 0x66, 0x3b, 0x73, 0x61, 0x62, 0x61, 0x61, 0x74, 0x3b, 0x61, 0x74, 0x61, 0x61,
-0x73, 0x69, 0x6e, 0x6e, 0x67, 0x6f, 0x72, 0x6e, 0x65, 0x71, 0x3b, 0x6d, 0x61, 0x72, 0x6c, 0x75, 0x6e, 0x6e, 0x67, 0x6f,
-0x72, 0x6e, 0x65, 0x71, 0x3b, 0x70, 0x69, 0x6e, 0x67, 0x61, 0x73, 0x75, 0x6e, 0x6e, 0x67, 0x6f, 0x72, 0x6e, 0x65, 0x71,
-0x3b, 0x73, 0x69, 0x73, 0x61, 0x6d, 0x61, 0x6e, 0x6e, 0x67, 0x6f, 0x72, 0x6e, 0x65, 0x71, 0x3b, 0x74, 0x61, 0x6c, 0x6c,
-0x69, 0x6d, 0x61, 0x6e, 0x6e, 0x67, 0x6f, 0x72, 0x6e, 0x65, 0x71, 0x3b, 0x61, 0x72, 0x66, 0x69, 0x6e, 0x69, 0x6e, 0x6e,
-0x67, 0x6f, 0x72, 0x6e, 0x65, 0x71, 0x3b, 0x53, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x50, 0x3b, 0x53, 0x3b, 0x54, 0x3b, 0x41,
-0x3b, 0xab0, 0xab5, 0xabf, 0x3b, 0xab8, 0xacb, 0xaae, 0x3b, 0xaae, 0xa82, 0xa97, 0xab3, 0x3b, 0xaac, 0xac1, 0xaa7, 0x3b, 0xa97, 0xac1,
-0xab0, 0xac1, 0x3b, 0xab6, 0xac1, 0xa95, 0xacd, 0xab0, 0x3b, 0xab6, 0xaa8, 0xabf, 0x3b, 0xab0, 0xab5, 0xabf, 0xab5, 0xabe, 0xab0, 0x3b,
-0xab8, 0xacb, 0xaae, 0xab5, 0xabe, 0xab0, 0x3b, 0xaae, 0xa82, 0xa97, 0xab3, 0xab5, 0xabe, 0xab0, 0x3b, 0xaac, 0xac1, 0xaa7, 0xab5, 0xabe,
-0xab0, 0x3b, 0xa97, 0xac1, 0xab0, 0xac1, 0xab5, 0xabe, 0xab0, 0x3b, 0xab6, 0xac1, 0xa95, 0xacd, 0xab0, 0xab5, 0xabe, 0xab0, 0x3b, 0xab6,
-0xaa8, 0xabf, 0xab5, 0xabe, 0xab0, 0x3b, 0xab0, 0x3b, 0xab8, 0xacb, 0x3b, 0xaae, 0xa82, 0x3b, 0xaac, 0xac1, 0x3b, 0xa97, 0xac1, 0x3b,
-0xab6, 0xac1, 0x3b, 0xab6, 0x3b, 0x4c, 0x61, 0x68, 0x3b, 0x4c, 0x69, 0x74, 0x3b, 0x54, 0x61, 0x6c, 0x3b, 0x4c, 0x61, 0x72,
-0x3b, 0x41, 0x6c, 0x68, 0x3b, 0x4a, 0x75, 0x6d, 0x3b, 0x41, 0x73, 0x61, 0x3b, 0x4c, 0x61, 0x68, 0x61, 0x64, 0x69, 0x3b,
-0x4c, 0x69, 0x74, 0x69, 0x6e, 0x69, 0x6e, 0x3b, 0x54, 0x61, 0x6c, 0x61, 0x74, 0x61, 0x3b, 0x4c, 0x61, 0x72, 0x61, 0x62,
-0x61, 0x3b, 0x41, 0x6c, 0x68, 0x61, 0x6d, 0x69, 0x73, 0x3b, 0x4a, 0x75, 0x6d, 0x6d, 0x61, 0x2bc, 0x61, 0x3b, 0x41, 0x73,
-0x61, 0x62, 0x61, 0x72, 0x3b, 0x4c, 0x3b, 0x4c, 0x3b, 0x54, 0x3b, 0x4c, 0x3b, 0x41, 0x3b, 0x4a, 0x3b, 0x41, 0x3b, 0x5d9,
-0x5d5, 0x5dd, 0x20, 0x5d0, 0x5f3, 0x3b, 0x5d9, 0x5d5, 0x5dd, 0x20, 0x5d1, 0x5f3, 0x3b, 0x5d9, 0x5d5, 0x5dd, 0x20, 0x5d2, 0x5f3, 0x3b,
-0x5d9, 0x5d5, 0x5dd, 0x20, 0x5d3, 0x5f3, 0x3b, 0x5d9, 0x5d5, 0x5dd, 0x20, 0x5d4, 0x5f3, 0x3b, 0x5d9, 0x5d5, 0x5dd, 0x20, 0x5d5, 0x5f3,
-0x3b, 0x5e9, 0x5d1, 0x5ea, 0x3b, 0x5d9, 0x5d5, 0x5dd, 0x20, 0x5e8, 0x5d0, 0x5e9, 0x5d5, 0x5df, 0x3b, 0x5d9, 0x5d5, 0x5dd, 0x20, 0x5e9,
-0x5e0, 0x5d9, 0x3b, 0x5d9, 0x5d5, 0x5dd, 0x20, 0x5e9, 0x5dc, 0x5d9, 0x5e9, 0x5d9, 0x3b, 0x5d9, 0x5d5, 0x5dd, 0x20, 0x5e8, 0x5d1, 0x5d9,
-0x5e2, 0x5d9, 0x3b, 0x5d9, 0x5d5, 0x5dd, 0x20, 0x5d7, 0x5de, 0x5d9, 0x5e9, 0x5d9, 0x3b, 0x5d9, 0x5d5, 0x5dd, 0x20, 0x5e9, 0x5d9, 0x5e9,
-0x5d9, 0x3b, 0x5d9, 0x5d5, 0x5dd, 0x20, 0x5e9, 0x5d1, 0x5ea, 0x3b, 0x5d0, 0x5f3, 0x3b, 0x5d1, 0x5f3, 0x3b, 0x5d2, 0x5f3, 0x3b, 0x5d3,
-0x5f3, 0x3b, 0x5d4, 0x5f3, 0x3b, 0x5d5, 0x5f3, 0x3b, 0x5e9, 0x5f3, 0x3b, 0x930, 0x935, 0x93f, 0x3b, 0x938, 0x94b, 0x92e, 0x3b, 0x92e,
-0x902, 0x917, 0x932, 0x3b, 0x92c, 0x941, 0x927, 0x3b, 0x917, 0x941, 0x930, 0x941, 0x3b, 0x936, 0x941, 0x915, 0x94d, 0x930, 0x3b, 0x936,
-0x928, 0x93f, 0x3b, 0x930, 0x935, 0x93f, 0x935, 0x93e, 0x930, 0x3b, 0x938, 0x94b, 0x92e, 0x935, 0x93e, 0x930, 0x3b, 0x92e, 0x902, 0x917,
-0x932, 0x935, 0x93e, 0x930, 0x3b, 0x92c, 0x941, 0x927, 0x935, 0x93e, 0x930, 0x3b, 0x917, 0x941, 0x930, 0x941, 0x935, 0x93e, 0x930, 0x3b,
-0x936, 0x941, 0x915, 0x94d, 0x930, 0x935, 0x93e, 0x930, 0x3b, 0x936, 0x928, 0x93f, 0x935, 0x93e, 0x930, 0x3b, 0x930, 0x3b, 0x938, 0x94b,
-0x3b, 0x92e, 0x902, 0x3b, 0x92c, 0x941, 0x3b, 0x917, 0x941, 0x3b, 0x936, 0x941, 0x3b, 0x936, 0x3b, 0x56, 0x3b, 0x48, 0x3b, 0x4b,
-0x3b, 0x53, 0x7a, 0x65, 0x3b, 0x43, 0x73, 0x3b, 0x50, 0x3b, 0x53, 0x7a, 0x6f, 0x3b, 0x76, 0x61, 0x73, 0xe1, 0x72, 0x6e,
-0x61, 0x70, 0x3b, 0x68, 0xe9, 0x74, 0x66, 0x151, 0x3b, 0x6b, 0x65, 0x64, 0x64, 0x3b, 0x73, 0x7a, 0x65, 0x72, 0x64, 0x61,
-0x3b, 0x63, 0x73, 0xfc, 0x74, 0xf6, 0x72, 0x74, 0xf6, 0x6b, 0x3b, 0x70, 0xe9, 0x6e, 0x74, 0x65, 0x6b, 0x3b, 0x73, 0x7a,
-0x6f, 0x6d, 0x62, 0x61, 0x74, 0x3b, 0x56, 0x3b, 0x48, 0x3b, 0x4b, 0x3b, 0x53, 0x7a, 0x3b, 0x43, 0x73, 0x3b, 0x50, 0x3b,
-0x53, 0x7a, 0x3b, 0x73, 0x75, 0x6e, 0x2e, 0x3b, 0x6d, 0xe1, 0x6e, 0x2e, 0x3b, 0xfe, 0x72, 0x69, 0x2e, 0x3b, 0x6d, 0x69,
-0xf0, 0x2e, 0x3b, 0x66, 0x69, 0x6d, 0x2e, 0x3b, 0x66, 0xf6, 0x73, 0x2e, 0x3b, 0x6c, 0x61, 0x75, 0x2e, 0x3b, 0x73, 0x75,
-0x6e, 0x6e, 0x75, 0x64, 0x61, 0x67, 0x75, 0x72, 0x3b, 0x6d, 0xe1, 0x6e, 0x75, 0x64, 0x61, 0x67, 0x75, 0x72, 0x3b, 0xfe,
-0x72, 0x69, 0xf0, 0x6a, 0x75, 0x64, 0x61, 0x67, 0x75, 0x72, 0x3b, 0x6d, 0x69, 0xf0, 0x76, 0x69, 0x6b, 0x75, 0x64, 0x61,
-0x67, 0x75, 0x72, 0x3b, 0x66, 0x69, 0x6d, 0x6d, 0x74, 0x75, 0x64, 0x61, 0x67, 0x75, 0x72, 0x3b, 0x66, 0xf6, 0x73, 0x74,
-0x75, 0x64, 0x61, 0x67, 0x75, 0x72, 0x3b, 0x6c, 0x61, 0x75, 0x67, 0x61, 0x72, 0x64, 0x61, 0x67, 0x75, 0x72, 0x3b, 0x53,
-0x3b, 0x4d, 0x3b, 0xde, 0x3b, 0x4d, 0x3b, 0x46, 0x3b, 0x46, 0x3b, 0x4c, 0x3b, 0x4d, 0x69, 0x6e, 0x3b, 0x53, 0x65, 0x6e,
-0x3b, 0x53, 0x65, 0x6c, 0x3b, 0x52, 0x61, 0x62, 0x3b, 0x4b, 0x61, 0x6d, 0x3b, 0x4a, 0x75, 0x6d, 0x3b, 0x53, 0x61, 0x62,
-0x3b, 0x4d, 0x69, 0x6e, 0x67, 0x67, 0x75, 0x3b, 0x53, 0x65, 0x6e, 0x69, 0x6e, 0x3b, 0x53, 0x65, 0x6c, 0x61, 0x73, 0x61,
-0x3b, 0x52, 0x61, 0x62, 0x75, 0x3b, 0x4b, 0x61, 0x6d, 0x69, 0x73, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x74, 0x3b, 0x53, 0x61,
-0x62, 0x74, 0x75, 0x3b, 0x4d, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x52, 0x3b, 0x4b, 0x3b, 0x4a, 0x3b, 0x53, 0x3b, 0x44, 0x6f,
-0x6d, 0x68, 0x3b, 0x4c, 0x75, 0x61, 0x6e, 0x3b, 0x4d, 0xe1, 0x69, 0x72, 0x74, 0x3b, 0x43, 0xe9, 0x61, 0x64, 0x3b, 0x44,
-0xe9, 0x61, 0x72, 0x3b, 0x41, 0x6f, 0x69, 0x6e, 0x65, 0x3b, 0x53, 0x61, 0x74, 0x68, 0x3b, 0x44, 0xe9, 0x20, 0x44, 0x6f,
-0x6d, 0x68, 0x6e, 0x61, 0x69, 0x67, 0x68, 0x3b, 0x44, 0xe9, 0x20, 0x4c, 0x75, 0x61, 0x69, 0x6e, 0x3b, 0x44, 0xe9, 0x20,
-0x4d, 0xe1, 0x69, 0x72, 0x74, 0x3b, 0x44, 0xe9, 0x20, 0x43, 0xe9, 0x61, 0x64, 0x61, 0x6f, 0x69, 0x6e, 0x3b, 0x44, 0xe9,
-0x61, 0x72, 0x64, 0x61, 0x6f, 0x69, 0x6e, 0x3b, 0x44, 0xe9, 0x20, 0x68, 0x41, 0x6f, 0x69, 0x6e, 0x65, 0x3b, 0x44, 0xe9,
-0x20, 0x53, 0x61, 0x74, 0x68, 0x61, 0x69, 0x72, 0x6e, 0x3b, 0x44, 0x3b, 0x4c, 0x3b, 0x4d, 0x3b, 0x43, 0x3b, 0x44, 0x3b,
-0x41, 0x3b, 0x53, 0x3b, 0x64, 0x6f, 0x6d, 0x3b, 0x6c, 0x75, 0x6e, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x6d, 0x65, 0x72, 0x3b,
-0x67, 0x69, 0x6f, 0x3b, 0x76, 0x65, 0x6e, 0x3b, 0x73, 0x61, 0x62, 0x3b, 0x64, 0x6f, 0x6d, 0x65, 0x6e, 0x69, 0x63, 0x61,
-0x3b, 0x6c, 0x75, 0x6e, 0x65, 0x64, 0xec, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x65, 0x64, 0xec, 0x3b, 0x6d, 0x65, 0x72, 0x63,
-0x6f, 0x6c, 0x65, 0x64, 0xec, 0x3b, 0x67, 0x69, 0x6f, 0x76, 0x65, 0x64, 0xec, 0x3b, 0x76, 0x65, 0x6e, 0x65, 0x72, 0x64,
-0xec, 0x3b, 0x73, 0x61, 0x62, 0x61, 0x74, 0x6f, 0x3b, 0x44, 0x3b, 0x4c, 0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x47, 0x3b, 0x56,
-0x3b, 0x53, 0x3b, 0x65e5, 0x3b, 0x6708, 0x3b, 0x706b, 0x3b, 0x6c34, 0x3b, 0x6728, 0x3b, 0x91d1, 0x3b, 0x571f, 0x3b, 0x65e5, 0x66dc, 0x65e5,
-0x3b, 0x6708, 0x66dc, 0x65e5, 0x3b, 0x706b, 0x66dc, 0x65e5, 0x3b, 0x6c34, 0x66dc, 0x65e5, 0x3b, 0x6728, 0x66dc, 0x65e5, 0x3b, 0x91d1, 0x66dc, 0x65e5,
-0x3b, 0x571f, 0x66dc, 0x65e5, 0x3b, 0xcad, 0xcbe, 0xca8, 0xcc1, 0x3b, 0xcb8, 0xccb, 0xcae, 0x3b, 0xcae, 0xc82, 0xc97, 0xcb3, 0x3b, 0xcac,
-0xcc1, 0xca7, 0x3b, 0xc97, 0xcc1, 0xcb0, 0xcc1, 0x3b, 0xcb6, 0xcc1, 0xc95, 0xccd, 0xcb0, 0x3b, 0xcb6, 0xca8, 0xcbf, 0x3b, 0xcad, 0xcbe,
-0xca8, 0xcc1, 0xcb5, 0xcbe, 0xcb0, 0x3b, 0xcb8, 0xccb, 0xcae, 0xcb5, 0xcbe, 0xcb0, 0x3b, 0xcae, 0xc82, 0xc97, 0xcb3, 0xcb5, 0xcbe, 0xcb0,
-0x3b, 0xcac, 0xcc1, 0xca7, 0xcb5, 0xcbe, 0xcb0, 0x3b, 0xc97, 0xcc1, 0xcb0, 0xcc1, 0xcb5, 0xcbe, 0xcb0, 0x3b, 0xcb6, 0xcc1, 0xc95, 0xccd,
-0xcb0, 0xcb5, 0xcbe, 0xcb0, 0x3b, 0xcb6, 0xca8, 0xcbf, 0xcb5, 0xcbe, 0xcb0, 0x3b, 0xcad, 0xcbe, 0x3b, 0xcb8, 0xccb, 0x3b, 0xcae, 0xc82,
-0x3b, 0xcac, 0xcc1, 0x3b, 0xc97, 0xcc1, 0x3b, 0xcb6, 0xcc1, 0x3b, 0xcb6, 0x3b, 0x622, 0x62a, 0x6be, 0x648, 0x627, 0x631, 0x3b, 0x698,
-0x654, 0x646, 0x65b, 0x62f, 0x655, 0x631, 0x648, 0x627, 0x631, 0x3b, 0x628, 0x648, 0x65a, 0x645, 0x648, 0x627, 0x631, 0x3b, 0x628, 0x648,
-0x62f, 0x648, 0x627, 0x631, 0x3b, 0x628, 0x631, 0x65b, 0x66e, 0x6ea, 0x633, 0x648, 0x627, 0x631, 0x3b, 0x62c, 0x64f, 0x645, 0x6c1, 0x3b,
-0x628, 0x679, 0x648, 0x627, 0x631, 0x3b, 0x627, 0x64e, 0x62a, 0x6be, 0x648, 0x627, 0x631, 0x3b, 0x698, 0x654, 0x646, 0x65b, 0x62f, 0x631,
-0x655, 0x631, 0x648, 0x627, 0x631, 0x3b, 0x628, 0x648, 0x65a, 0x645, 0x648, 0x627, 0x631, 0x3b, 0x628, 0x648, 0x62f, 0x648, 0x627, 0x631,
-0x3b, 0x628, 0x631, 0x65b, 0x66e, 0x6ea, 0x633, 0x648, 0x627, 0x631, 0x3b, 0x62c, 0x64f, 0x645, 0x6c1, 0x3b, 0x628, 0x679, 0x648, 0x627,
-0x631, 0x3b, 0x627, 0x3b, 0x698, 0x3b, 0x628, 0x3b, 0x628, 0x3b, 0x628, 0x3b, 0x62c, 0x3b, 0x628, 0x3b, 0x416, 0x441, 0x3b, 0x414,
-0x441, 0x3b, 0x421, 0x441, 0x3b, 0x421, 0x440, 0x3b, 0x411, 0x441, 0x3b, 0x416, 0x43c, 0x3b, 0x421, 0x431, 0x3b, 0x416, 0x435, 0x43a,
-0x441, 0x435, 0x43d, 0x431, 0x456, 0x3b, 0x414, 0x4af, 0x439, 0x441, 0x435, 0x43d, 0x431, 0x456, 0x3b, 0x421, 0x435, 0x439, 0x441, 0x435,
-0x43d, 0x431, 0x456, 0x3b, 0x421, 0x4d9, 0x440, 0x441, 0x435, 0x43d, 0x431, 0x456, 0x3b, 0x411, 0x435, 0x439, 0x441, 0x435, 0x43d, 0x431,
-0x456, 0x3b, 0x416, 0x4b1, 0x43c, 0x430, 0x3b, 0x421, 0x435, 0x43d, 0x431, 0x456, 0x3b, 0x416, 0x3b, 0x414, 0x3b, 0x421, 0x3b, 0x421,
-0x3b, 0x411, 0x3b, 0x416, 0x3b, 0x421, 0x3b, 0x436, 0x435, 0x43a, 0x441, 0x435, 0x43d, 0x431, 0x456, 0x3b, 0x434, 0x4af, 0x439, 0x441,
-0x435, 0x43d, 0x431, 0x456, 0x3b, 0x441, 0x435, 0x439, 0x441, 0x435, 0x43d, 0x431, 0x456, 0x3b, 0x441, 0x4d9, 0x440, 0x441, 0x435, 0x43d,
-0x431, 0x456, 0x3b, 0x431, 0x435, 0x439, 0x441, 0x435, 0x43d, 0x431, 0x456, 0x3b, 0x436, 0x4b1, 0x43c, 0x430, 0x3b, 0x441, 0x435, 0x43d,
-0x431, 0x456, 0x3b, 0x63, 0x79, 0x75, 0x2e, 0x3b, 0x6d, 0x62, 0x65, 0x2e, 0x3b, 0x6b, 0x61, 0x62, 0x2e, 0x3b, 0x67, 0x74,
-0x75, 0x2e, 0x3b, 0x6b, 0x61, 0x6e, 0x2e, 0x3b, 0x67, 0x6e, 0x75, 0x2e, 0x3b, 0x67, 0x6e, 0x64, 0x2e, 0x3b, 0x4b, 0x75,
-0x20, 0x63, 0x79, 0x75, 0x6d, 0x77, 0x65, 0x72, 0x75, 0x3b, 0x4b, 0x75, 0x77, 0x61, 0x20, 0x6d, 0x62, 0x65, 0x72, 0x65,
-0x3b, 0x4b, 0x75, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x62, 0x69, 0x72, 0x69, 0x3b, 0x4b, 0x75, 0x77, 0x61, 0x20, 0x67, 0x61,
-0x74, 0x61, 0x74, 0x75, 0x3b, 0x4b, 0x75, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x65, 0x3b, 0x4b, 0x75, 0x77, 0x61, 0x20,
-0x67, 0x61, 0x74, 0x61, 0x6e, 0x75, 0x3b, 0x4b, 0x75, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x74,
-0x75, 0x3b, 0x436, 0x435, 0x43a, 0x2e, 0x3b, 0x434, 0x4af, 0x439, 0x2e, 0x3b, 0x448, 0x435, 0x439, 0x448, 0x2e, 0x3b, 0x448, 0x430,
-0x440, 0x448, 0x2e, 0x3b, 0x431, 0x435, 0x439, 0x448, 0x2e, 0x3b, 0x436, 0x443, 0x43c, 0x430, 0x3b, 0x438, 0x448, 0x43c, 0x2e, 0x3b,
-0x436, 0x435, 0x43a, 0x448, 0x435, 0x43c, 0x431, 0x438, 0x3b, 0x434, 0x4af, 0x439, 0x448, 0x4e9, 0x43c, 0x431, 0x4af, 0x3b, 0x448, 0x435,
-0x439, 0x448, 0x435, 0x43c, 0x431, 0x438, 0x3b, 0x448, 0x430, 0x440, 0x448, 0x435, 0x43c, 0x431, 0x438, 0x3b, 0x431, 0x435, 0x439, 0x448,
-0x435, 0x43c, 0x431, 0x438, 0x3b, 0x436, 0x443, 0x43c, 0x430, 0x3b, 0x438, 0x448, 0x435, 0x43c, 0x431, 0x438, 0x3b, 0x416, 0x3b, 0x414,
-0x3b, 0x428, 0x3b, 0x428, 0x3b, 0x411, 0x3b, 0x416, 0x3b, 0x418, 0x3b, 0xc77c, 0x3b, 0xc6d4, 0x3b, 0xd654, 0x3b, 0xc218, 0x3b, 0xbaa9,
-0x3b, 0xae08, 0x3b, 0xd1a0, 0x3b, 0xc77c, 0xc694, 0xc77c, 0x3b, 0xc6d4, 0xc694, 0xc77c, 0x3b, 0xd654, 0xc694, 0xc77c, 0x3b, 0xc218, 0xc694, 0xc77c,
-0x3b, 0xbaa9, 0xc694, 0xc77c, 0x3b, 0xae08, 0xc694, 0xc77c, 0x3b, 0xd1a0, 0xc694, 0xc77c, 0x3b, 0x63, 0x75, 0x2e, 0x3b, 0x6d, 0x62, 0x65,
-0x2e, 0x3b, 0x6b, 0x61, 0x62, 0x2e, 0x3b, 0x67, 0x74, 0x75, 0x2e, 0x3b, 0x6b, 0x61, 0x6e, 0x2e, 0x3b, 0x67, 0x6e, 0x75,
-0x2e, 0x3b, 0x67, 0x6e, 0x64, 0x2e, 0x3b, 0x4b, 0x75, 0x20, 0x77, 0x2019, 0x69, 0x6e, 0x64, 0x77, 0x69, 0x3b, 0x4b, 0x75,
-0x20, 0x77, 0x61, 0x20, 0x6d, 0x62, 0x65, 0x72, 0x65, 0x3b, 0x4b, 0x75, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x62, 0x69,
-0x72, 0x69, 0x3b, 0x4b, 0x75, 0x20, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x4b, 0x75, 0x20, 0x77,
-0x61, 0x20, 0x6b, 0x61, 0x6e, 0x65, 0x3b, 0x4b, 0x75, 0x20, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x6e, 0x75, 0x3b,
-0x4b, 0x75, 0x20, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x74, 0x75, 0x3b, 0xead, 0xeb2, 0xe97, 0xeb4,
-0xe94, 0x3b, 0xe88, 0xeb1, 0xe99, 0x3b, 0xead, 0xeb1, 0xe87, 0xe84, 0xeb2, 0xe99, 0x3b, 0xe9e, 0xeb8, 0xe94, 0x3b, 0xe9e, 0xeb0, 0xeab,
-0xeb1, 0xe94, 0x3b, 0xeaa, 0xeb8, 0xe81, 0x3b, 0xec0, 0xeaa, 0xebb, 0xeb2, 0x3b, 0xea7, 0xeb1, 0xe99, 0xead, 0xeb2, 0xe97, 0xeb4, 0xe94,
-0x3b, 0xea7, 0xeb1, 0xe99, 0xe88, 0xeb1, 0xe99, 0x3b, 0xea7, 0xeb1, 0xe99, 0xead, 0xeb1, 0xe87, 0xe84, 0xeb2, 0xe99, 0x3b, 0xea7, 0xeb1,
-0xe99, 0xe9e, 0xeb8, 0xe94, 0x3b, 0xea7, 0xeb1, 0xe99, 0xe9e, 0xeb0, 0xeab, 0xeb1, 0xe94, 0x3b, 0xea7, 0xeb1, 0xe99, 0xeaa, 0xeb8, 0xe81,
-0x3b, 0xea7, 0xeb1, 0xe99, 0xec0, 0xeaa, 0xebb, 0xeb2, 0x3b, 0xead, 0xeb2, 0x3b, 0xe88, 0x3b, 0xead, 0x3b, 0xe9e, 0x3b, 0xe9e, 0xeab,
-0x3b, 0xeaa, 0xeb8, 0x3b, 0xeaa, 0x3b, 0x53, 0x76, 0x113, 0x74, 0x64, 0x2e, 0x3b, 0x50, 0x69, 0x72, 0x6d, 0x64, 0x2e, 0x3b,
-0x4f, 0x74, 0x72, 0x64, 0x2e, 0x3b, 0x54, 0x72, 0x65, 0x161, 0x64, 0x2e, 0x3b, 0x43, 0x65, 0x74, 0x75, 0x72, 0x74, 0x64,
-0x2e, 0x3b, 0x50, 0x69, 0x65, 0x6b, 0x74, 0x64, 0x2e, 0x3b, 0x53, 0x65, 0x73, 0x74, 0x64, 0x2e, 0x3b, 0x53, 0x76, 0x113,
-0x74, 0x64, 0x69, 0x65, 0x6e, 0x61, 0x3b, 0x50, 0x69, 0x72, 0x6d, 0x64, 0x69, 0x65, 0x6e, 0x61, 0x3b, 0x4f, 0x74, 0x72,
-0x64, 0x69, 0x65, 0x6e, 0x61, 0x3b, 0x54, 0x72, 0x65, 0x161, 0x64, 0x69, 0x65, 0x6e, 0x61, 0x3b, 0x43, 0x65, 0x74, 0x75,
-0x72, 0x74, 0x64, 0x69, 0x65, 0x6e, 0x61, 0x3b, 0x50, 0x69, 0x65, 0x6b, 0x74, 0x64, 0x69, 0x65, 0x6e, 0x61, 0x3b, 0x53,
-0x65, 0x73, 0x74, 0x64, 0x69, 0x65, 0x6e, 0x61, 0x3b, 0x53, 0x3b, 0x50, 0x3b, 0x4f, 0x3b, 0x54, 0x3b, 0x43, 0x3b, 0x50,
-0x3b, 0x53, 0x3b, 0x73, 0x76, 0x113, 0x74, 0x64, 0x2e, 0x3b, 0x70, 0x69, 0x72, 0x6d, 0x64, 0x2e, 0x3b, 0x6f, 0x74, 0x72,
-0x64, 0x2e, 0x3b, 0x74, 0x72, 0x65, 0x161, 0x64, 0x2e, 0x3b, 0x63, 0x65, 0x74, 0x75, 0x72, 0x74, 0x64, 0x2e, 0x3b, 0x70,
-0x69, 0x65, 0x6b, 0x74, 0x64, 0x2e, 0x3b, 0x73, 0x65, 0x73, 0x74, 0x64, 0x2e, 0x3b, 0x73, 0x76, 0x113, 0x74, 0x64, 0x69,
-0x65, 0x6e, 0x61, 0x3b, 0x70, 0x69, 0x72, 0x6d, 0x64, 0x69, 0x65, 0x6e, 0x61, 0x3b, 0x6f, 0x74, 0x72, 0x64, 0x69, 0x65,
-0x6e, 0x61, 0x3b, 0x74, 0x72, 0x65, 0x161, 0x64, 0x69, 0x65, 0x6e, 0x61, 0x3b, 0x63, 0x65, 0x74, 0x75, 0x72, 0x74, 0x64,
-0x69, 0x65, 0x6e, 0x61, 0x3b, 0x70, 0x69, 0x65, 0x6b, 0x74, 0x64, 0x69, 0x65, 0x6e, 0x61, 0x3b, 0x73, 0x65, 0x73, 0x74,
-0x64, 0x69, 0x65, 0x6e, 0x61, 0x3b, 0x65, 0x79, 0x65, 0x3b, 0x79, 0x62, 0x6f, 0x3b, 0x6d, 0x62, 0x6c, 0x3b, 0x6d, 0x73,
-0x74, 0x3b, 0x6d, 0x69, 0x6e, 0x3b, 0x6d, 0x74, 0x6e, 0x3b, 0x6d, 0x70, 0x73, 0x3b, 0x65, 0x79, 0x65, 0x6e, 0x67, 0x61,
-0x3b, 0x6d, 0x6f, 0x6b, 0x254, 0x6c, 0x254, 0x20, 0x6d, 0x77, 0x61, 0x20, 0x79, 0x61, 0x6d, 0x62, 0x6f, 0x3b, 0x6d, 0x6f,
-0x6b, 0x254, 0x6c, 0x254, 0x20, 0x6d, 0x77, 0x61, 0x20, 0x6d, 0xed, 0x62, 0x61, 0x6c, 0xe9, 0x3b, 0x6d, 0x6f, 0x6b, 0x254,
-0x6c, 0x254, 0x20, 0x6d, 0x77, 0x61, 0x20, 0x6d, 0xed, 0x73, 0xe1, 0x74, 0x6f, 0x3b, 0x6d, 0x6f, 0x6b, 0x254, 0x6c, 0x254,
-0x20, 0x79, 0x61, 0x20, 0x6d, 0xed, 0x6e, 0xe9, 0x69, 0x3b, 0x6d, 0x6f, 0x6b, 0x254, 0x6c, 0x254, 0x20, 0x79, 0x61, 0x20,
-0x6d, 0xed, 0x74, 0xe1, 0x6e, 0x6f, 0x3b, 0x6d, 0x70, 0x254, 0x301, 0x73, 0x254, 0x3b, 0x65, 0x3b, 0x79, 0x3b, 0x6d, 0x3b,
-0x6d, 0x3b, 0x6d, 0x3b, 0x6d, 0x3b, 0x70, 0x3b, 0x73, 0x6b, 0x3b, 0x70, 0x72, 0x3b, 0x61, 0x6e, 0x3b, 0x74, 0x72, 0x3b,
-0x6b, 0x74, 0x3b, 0x70, 0x6e, 0x3b, 0x161, 0x74, 0x3b, 0x73, 0x65, 0x6b, 0x6d, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x69, 0x73,
-0x3b, 0x70, 0x69, 0x72, 0x6d, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x69, 0x73, 0x3b, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x64, 0x69,
-0x65, 0x6e, 0x69, 0x73, 0x3b, 0x74, 0x72, 0x65, 0x10d, 0x69, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x69, 0x73, 0x3b, 0x6b, 0x65,
-0x74, 0x76, 0x69, 0x72, 0x74, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x69, 0x73, 0x3b, 0x70, 0x65, 0x6e, 0x6b, 0x74, 0x61, 0x64,
-0x69, 0x65, 0x6e, 0x69, 0x73, 0x3b, 0x161, 0x65, 0x161, 0x74, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x69, 0x73, 0x3b, 0x53, 0x3b,
-0x50, 0x3b, 0x41, 0x3b, 0x54, 0x3b, 0x4b, 0x3b, 0x50, 0x3b, 0x160, 0x3b, 0x43d, 0x435, 0x434, 0x2e, 0x3b, 0x43f, 0x43e, 0x43d,
-0x2e, 0x3b, 0x432, 0x442, 0x43e, 0x2e, 0x3b, 0x441, 0x440, 0x435, 0x2e, 0x3b, 0x447, 0x435, 0x442, 0x2e, 0x3b, 0x43f, 0x435, 0x442,
-0x2e, 0x3b, 0x441, 0x430, 0x431, 0x2e, 0x3b, 0x43d, 0x435, 0x434, 0x435, 0x43b, 0x430, 0x3b, 0x43f, 0x43e, 0x43d, 0x435, 0x434, 0x435,
-0x43b, 0x43d, 0x438, 0x43a, 0x3b, 0x432, 0x442, 0x43e, 0x440, 0x43d, 0x438, 0x43a, 0x3b, 0x441, 0x440, 0x435, 0x434, 0x430, 0x3b, 0x447,
-0x435, 0x442, 0x432, 0x440, 0x442, 0x43e, 0x43a, 0x3b, 0x43f, 0x435, 0x442, 0x43e, 0x43a, 0x3b, 0x441, 0x430, 0x431, 0x43e, 0x442, 0x430,
-0x3b, 0x43d, 0x435, 0x434, 0x2e, 0x3b, 0x43f, 0x43e, 0x43d, 0x2e, 0x3b, 0x432, 0x442, 0x2e, 0x3b, 0x441, 0x440, 0x435, 0x2e, 0x3b,
-0x447, 0x435, 0x442, 0x2e, 0x3b, 0x43f, 0x435, 0x442, 0x2e, 0x3b, 0x441, 0x430, 0x431, 0x2e, 0x3b, 0x41, 0x6c, 0x61, 0x68, 0x3b,
-0x41, 0x6c, 0x61, 0x74, 0x73, 0x3b, 0x54, 0x61, 0x6c, 0x3b, 0x41, 0x6c, 0x61, 0x72, 0x3b, 0x41, 0x6c, 0x61, 0x6b, 0x3b,
-0x5a, 0x6f, 0x6d, 0x3b, 0x41, 0x73, 0x61, 0x62, 0x3b, 0x41, 0x6c, 0x61, 0x68, 0x61, 0x64, 0x79, 0x3b, 0x41, 0x6c, 0x61,
-0x74, 0x73, 0x69, 0x6e, 0x61, 0x69, 0x6e, 0x79, 0x3b, 0x54, 0x61, 0x6c, 0x61, 0x74, 0x61, 0x3b, 0x41, 0x6c, 0x61, 0x72,
-0x6f, 0x62, 0x69, 0x61, 0x3b, 0x41, 0x6c, 0x61, 0x6b, 0x61, 0x6d, 0x69, 0x73, 0x79, 0x3b, 0x5a, 0x6f, 0x6d, 0x61, 0x3b,
-0x41, 0x73, 0x61, 0x62, 0x6f, 0x74, 0x73, 0x79, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x54, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x5a,
-0x3b, 0x41, 0x3b, 0x41, 0x68, 0x64, 0x3b, 0x49, 0x73, 0x6e, 0x3b, 0x53, 0x65, 0x6c, 0x3b, 0x52, 0x61, 0x62, 0x3b, 0x4b,
-0x68, 0x61, 0x3b, 0x4a, 0x75, 0x6d, 0x3b, 0x53, 0x61, 0x62, 0x3b, 0x41, 0x68, 0x61, 0x64, 0x3b, 0x49, 0x73, 0x6e, 0x69,
-0x6e, 0x3b, 0x53, 0x65, 0x6c, 0x61, 0x73, 0x61, 0x3b, 0x52, 0x61, 0x62, 0x75, 0x3b, 0x4b, 0x68, 0x61, 0x6d, 0x69, 0x73,
-0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x61, 0x74, 0x3b, 0x53, 0x61, 0x62, 0x74, 0x75, 0x3b, 0x41, 0x3b, 0x49, 0x3b, 0x53, 0x3b,
-0x52, 0x3b, 0x4b, 0x3b, 0x4a, 0x3b, 0x53, 0x3b, 0xd1e, 0xd3e, 0xd2f, 0xd7c, 0x3b, 0xd24, 0xd3f, 0xd19, 0xd4d, 0xd15, 0xd7e, 0x3b,
-0xd1a, 0xd4a, 0xd35, 0xd4d, 0xd35, 0x3b, 0xd2c, 0xd41, 0xd27, 0xd7b, 0x3b, 0xd35, 0xd4d, 0xd2f, 0xd3e, 0xd34, 0xd02, 0x3b, 0xd35, 0xd46,
-0xd33, 0xd4d, 0xd33, 0xd3f, 0x3b, 0xd36, 0xd28, 0xd3f, 0x3b, 0xd1e, 0xd3e, 0xd2f, 0xd31, 0xd3e, 0xd34, 0xd4d, 0x200c, 0xd1a, 0x3b, 0xd24,
-0xd3f, 0xd19, 0xd4d, 0xd15, 0xd33, 0xd3e, 0xd34, 0xd4d, 0x200c, 0xd1a, 0x3b, 0xd1a, 0xd4a, 0xd35, 0xd4d, 0xd35, 0xd3e, 0xd34, 0xd4d, 0x200c,
-0xd1a, 0x3b, 0xd2c, 0xd41, 0xd27, 0xd28, 0xd3e, 0xd34, 0xd4d, 0x200c, 0xd1a, 0x3b, 0xd35, 0xd4d, 0xd2f, 0xd3e, 0xd34, 0xd3e, 0xd34, 0xd4d,
-0x200c, 0xd1a, 0x3b, 0xd35, 0xd46, 0xd33, 0xd4d, 0xd33, 0xd3f, 0xd2f, 0xd3e, 0xd34, 0xd4d, 0x200c, 0xd1a, 0x3b, 0xd36, 0xd28, 0xd3f, 0xd2f,
-0xd3e, 0xd34, 0xd4d, 0x200c, 0xd1a, 0x3b, 0xd1e, 0xd3e, 0x3b, 0xd24, 0xd3f, 0x3b, 0xd1a, 0xd4a, 0x3b, 0xd2c, 0xd41, 0x3b, 0xd35, 0xd4d,
-0xd2f, 0xd3e, 0x3b, 0xd35, 0xd46, 0x3b, 0xd36, 0x3b, 0xd1e, 0xd3e, 0xd2f, 0xd31, 0xd3e, 0xd34, 0xd4d, 0x200c, 0xd1a, 0x3b, 0xd24, 0xd3f,
-0xd19, 0xd4d, 0xd15, 0xd33, 0xd3e, 0xd34, 0xd4d, 0x200c, 0xd1a, 0x3b, 0xd1a, 0xd4a, 0xd35, 0xd4d, 0xd35, 0xd3e, 0xd34, 0xd4d, 0xd1a, 0x3b,
-0xd2c, 0xd41, 0xd27, 0xd28, 0xd3e, 0xd34, 0xd4d, 0x200c, 0xd1a, 0x3b, 0xd35, 0xd4d, 0xd2f, 0xd3e, 0xd34, 0xd3e, 0xd34, 0xd4d, 0x200c, 0xd1a,
-0x3b, 0xd35, 0xd46, 0xd33, 0xd4d, 0xd33, 0xd3f, 0xd2f, 0xd3e, 0xd34, 0xd4d, 0x200c, 0xd1a, 0x3b, 0xd36, 0xd28, 0xd3f, 0xd2f, 0xd3e, 0xd34,
-0xd4d, 0x200c, 0xd1a, 0x3b, 0xd1e, 0x3b, 0xd24, 0xd3f, 0x3b, 0xd1a, 0xd4a, 0x3b, 0xd2c, 0xd41, 0x3b, 0xd35, 0xd4d, 0xd2f, 0xd3e, 0x3b,
-0xd35, 0xd46, 0x3b, 0xd36, 0x3b, 0x126, 0x61, 0x64, 0x3b, 0x54, 0x6e, 0x65, 0x3b, 0x54, 0x6c, 0x69, 0x3b, 0x45, 0x72, 0x62,
-0x3b, 0x126, 0x61, 0x6d, 0x3b, 0x120, 0x69, 0x6d, 0x3b, 0x53, 0x69, 0x62, 0x3b, 0x49, 0x6c, 0x2d, 0x126, 0x61, 0x64, 0x64,
-0x3b, 0x49, 0x74, 0x2d, 0x54, 0x6e, 0x65, 0x6a, 0x6e, 0x3b, 0x49, 0x74, 0x2d, 0x54, 0x6c, 0x69, 0x65, 0x74, 0x61, 0x3b,
-0x4c, 0x2d, 0x45, 0x72, 0x62, 0x67, 0x127, 0x61, 0x3b, 0x49, 0x6c, 0x2d, 0x126, 0x61, 0x6d, 0x69, 0x73, 0x3b, 0x49, 0x6c,
-0x2d, 0x120, 0x69, 0x6d, 0x67, 0x127, 0x61, 0x3b, 0x49, 0x73, 0x2d, 0x53, 0x69, 0x62, 0x74, 0x3b, 0x126, 0x64, 0x3b, 0x54,
-0x6e, 0x3b, 0x54, 0x6c, 0x3b, 0x45, 0x72, 0x3b, 0x126, 0x6d, 0x3b, 0x120, 0x6d, 0x3b, 0x53, 0x62, 0x3b, 0x126, 0x64, 0x3b,
-0x54, 0x3b, 0x54, 0x6c, 0x3b, 0x45, 0x72, 0x3b, 0x126, 0x6d, 0x3b, 0x120, 0x6d, 0x3b, 0x53, 0x62, 0x3b, 0x930, 0x935, 0x93f,
-0x3b, 0x938, 0x94b, 0x92e, 0x3b, 0x92e, 0x902, 0x917, 0x933, 0x3b, 0x92c, 0x941, 0x927, 0x3b, 0x917, 0x941, 0x930, 0x941, 0x3b, 0x936,
-0x941, 0x915, 0x94d, 0x930, 0x3b, 0x936, 0x928, 0x93f, 0x3b, 0x930, 0x935, 0x93f, 0x935, 0x93e, 0x930, 0x3b, 0x938, 0x94b, 0x92e, 0x935,
-0x93e, 0x930, 0x3b, 0x92e, 0x902, 0x917, 0x933, 0x935, 0x93e, 0x930, 0x3b, 0x92c, 0x941, 0x927, 0x935, 0x93e, 0x930, 0x3b, 0x917, 0x941,
-0x930, 0x941, 0x935, 0x93e, 0x930, 0x3b, 0x936, 0x941, 0x915, 0x94d, 0x930, 0x935, 0x93e, 0x930, 0x3b, 0x936, 0x928, 0x93f, 0x935, 0x93e,
-0x930, 0x3b, 0x41d, 0x44f, 0x3b, 0x414, 0x430, 0x3b, 0x41c, 0x44f, 0x3b, 0x41b, 0x445, 0x3b, 0x41f, 0x4af, 0x3b, 0x411, 0x430, 0x3b,
-0x411, 0x44f, 0x3b, 0x43d, 0x44f, 0x43c, 0x3b, 0x434, 0x430, 0x432, 0x430, 0x430, 0x3b, 0x43c, 0x44f, 0x433, 0x43c, 0x430, 0x440, 0x3b,
-0x43b, 0x445, 0x430, 0x433, 0x432, 0x430, 0x3b, 0x43f, 0x4af, 0x440, 0x44d, 0x432, 0x3b, 0x431, 0x430, 0x430, 0x441, 0x430, 0x43d, 0x3b,
-0x431, 0x44f, 0x43c, 0x431, 0x430, 0x3b, 0x906, 0x907, 0x924, 0x3b, 0x938, 0x94b, 0x92e, 0x3b, 0x92e, 0x919, 0x94d, 0x917, 0x932, 0x3b,
-0x92c, 0x941, 0x927, 0x3b, 0x92c, 0x93f, 0x939, 0x93f, 0x3b, 0x936, 0x941, 0x915, 0x94d, 0x930, 0x3b, 0x936, 0x928, 0x93f, 0x3b, 0x906,
-0x907, 0x924, 0x92c, 0x93e, 0x930, 0x3b, 0x938, 0x94b, 0x92e, 0x92c, 0x93e, 0x930, 0x3b, 0x92e, 0x919, 0x94d, 0x917, 0x932, 0x92c, 0x93e,
-0x930, 0x3b, 0x92c, 0x941, 0x927, 0x92c, 0x93e, 0x930, 0x3b, 0x92c, 0x93f, 0x939, 0x93f, 0x92c, 0x93e, 0x930, 0x3b, 0x936, 0x941, 0x915,
-0x94d, 0x930, 0x92c, 0x93e, 0x930, 0x3b, 0x936, 0x928, 0x93f, 0x92c, 0x93e, 0x930, 0x3b, 0x906, 0x3b, 0x938, 0x94b, 0x3b, 0x92e, 0x3b,
-0x92c, 0x941, 0x3b, 0x92c, 0x93f, 0x3b, 0x936, 0x941, 0x3b, 0x936, 0x3b, 0xb30, 0xb2c, 0xb3f, 0x3b, 0xb38, 0xb4b, 0xb2e, 0x3b, 0xb2e,
-0xb19, 0xb4d, 0xb17, 0xb33, 0x3b, 0xb2c, 0xb41, 0xb27, 0x3b, 0xb17, 0xb41, 0xb30, 0xb41, 0x3b, 0xb36, 0xb41, 0xb15, 0xb4d, 0xb30, 0x3b,
-0xb36, 0xb28, 0xb3f, 0x3b, 0xb30, 0xb2c, 0xb3f, 0xb2c, 0xb3e, 0xb30, 0x3b, 0xb38, 0xb4b, 0xb2e, 0xb2c, 0xb3e, 0xb30, 0x3b, 0xb2e, 0xb19,
-0xb4d, 0xb17, 0xb33, 0xb2c, 0xb3e, 0xb30, 0x3b, 0xb2c, 0xb41, 0xb27, 0xb2c, 0xb3e, 0xb30, 0x3b, 0xb17, 0xb41, 0xb30, 0xb41, 0xb2c, 0xb3e,
-0xb30, 0x3b, 0xb36, 0xb41, 0xb15, 0xb4d, 0xb30, 0xb2c, 0xb3e, 0xb30, 0x3b, 0xb36, 0xb28, 0xb3f, 0xb2c, 0xb3e, 0xb30, 0x3b, 0xb30, 0x3b,
-0xb38, 0xb4b, 0x3b, 0xb2e, 0x3b, 0xb2c, 0xb41, 0x3b, 0xb17, 0xb41, 0x3b, 0xb36, 0xb41, 0x3b, 0xb36, 0x3b, 0x6cc, 0x6a9, 0x634, 0x646,
-0x628, 0x647, 0x3b, 0x62f, 0x648, 0x634, 0x646, 0x628, 0x647, 0x3b, 0x633, 0x647, 0x200c, 0x634, 0x646, 0x628, 0x647, 0x3b, 0x686, 0x647,
-0x627, 0x631, 0x634, 0x646, 0x628, 0x647, 0x3b, 0x67e, 0x646, 0x62c, 0x634, 0x646, 0x628, 0x647, 0x3b, 0x62c, 0x645, 0x639, 0x647, 0x3b,
-0x634, 0x646, 0x628, 0x647, 0x3b, 0x6cc, 0x3b, 0x62f, 0x3b, 0x633, 0x3b, 0x686, 0x3b, 0x67e, 0x3b, 0x62c, 0x3b, 0x634, 0x3b, 0x6e,
-0x69, 0x65, 0x64, 0x7a, 0x2e, 0x3b, 0x70, 0x6f, 0x6e, 0x2e, 0x3b, 0x77, 0x74, 0x2e, 0x3b, 0x15b, 0x72, 0x2e, 0x3b, 0x63,
-0x7a, 0x77, 0x2e, 0x3b, 0x70, 0x74, 0x2e, 0x3b, 0x73, 0x6f, 0x62, 0x2e, 0x3b, 0x6e, 0x69, 0x65, 0x64, 0x7a, 0x69, 0x65,
-0x6c, 0x61, 0x3b, 0x70, 0x6f, 0x6e, 0x69, 0x65, 0x64, 0x7a, 0x69, 0x61, 0x142, 0x65, 0x6b, 0x3b, 0x77, 0x74, 0x6f, 0x72,
-0x65, 0x6b, 0x3b, 0x15b, 0x72, 0x6f, 0x64, 0x61, 0x3b, 0x63, 0x7a, 0x77, 0x61, 0x72, 0x74, 0x65, 0x6b, 0x3b, 0x70, 0x69,
-0x105, 0x74, 0x65, 0x6b, 0x3b, 0x73, 0x6f, 0x62, 0x6f, 0x74, 0x61, 0x3b, 0x4e, 0x3b, 0x50, 0x3b, 0x57, 0x3b, 0x15a, 0x3b,
-0x43, 0x3b, 0x50, 0x3b, 0x53, 0x3b, 0x6e, 0x3b, 0x70, 0x3b, 0x77, 0x3b, 0x15b, 0x3b, 0x63, 0x3b, 0x70, 0x3b, 0x73, 0x3b,
-0x64, 0x6f, 0x6d, 0x3b, 0x73, 0x65, 0x67, 0x3b, 0x74, 0x65, 0x72, 0x3b, 0x71, 0x75, 0x61, 0x3b, 0x71, 0x75, 0x69, 0x3b,
-0x73, 0x65, 0x78, 0x3b, 0x73, 0xe1, 0x62, 0x3b, 0x64, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x6f, 0x3b, 0x73, 0x65, 0x67, 0x75,
-0x6e, 0x64, 0x61, 0x2d, 0x66, 0x65, 0x69, 0x72, 0x61, 0x3b, 0x74, 0x65, 0x72, 0xe7, 0x61, 0x2d, 0x66, 0x65, 0x69, 0x72,
-0x61, 0x3b, 0x71, 0x75, 0x61, 0x72, 0x74, 0x61, 0x2d, 0x66, 0x65, 0x69, 0x72, 0x61, 0x3b, 0x71, 0x75, 0x69, 0x6e, 0x74,
-0x61, 0x2d, 0x66, 0x65, 0x69, 0x72, 0x61, 0x3b, 0x73, 0x65, 0x78, 0x74, 0x61, 0x2d, 0x66, 0x65, 0x69, 0x72, 0x61, 0x3b,
-0x73, 0xe1, 0x62, 0x61, 0x64, 0x6f, 0x3b, 0x44, 0x3b, 0x53, 0x3b, 0x54, 0x3b, 0x51, 0x3b, 0x51, 0x3b, 0x53, 0x3b, 0x53,
-0x3b, 0x64, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x6f, 0x3b, 0x73, 0x65, 0x67, 0x75, 0x6e, 0x64, 0x61, 0x3b, 0x74, 0x65, 0x72,
-0xe7, 0x61, 0x3b, 0x71, 0x75, 0x61, 0x72, 0x74, 0x61, 0x3b, 0x71, 0x75, 0x69, 0x6e, 0x74, 0x61, 0x3b, 0x73, 0x65, 0x78,
-0x74, 0x61, 0x3b, 0x73, 0xe1, 0x62, 0x61, 0x64, 0x6f, 0x3b, 0xa10, 0xa24, 0x3b, 0xa38, 0xa4b, 0xa2e, 0x3b, 0xa2e, 0xa70, 0xa17,
-0xa32, 0x3b, 0xa2c, 0xa41, 0xa71, 0xa27, 0x3b, 0xa35, 0xa40, 0xa30, 0x3b, 0xa38, 0xa3c, 0xa41, 0xa71, 0xa15, 0xa30, 0x3b, 0xa38, 0xa3c,
-0xa28, 0xa3f, 0xa71, 0xa1a, 0xa30, 0x3b, 0xa10, 0xa24, 0xa35, 0xa3e, 0xa30, 0x3b, 0xa38, 0xa4b, 0xa2e, 0xa35, 0xa3e, 0xa30, 0x3b, 0xa2e,
-0xa70, 0xa17, 0xa32, 0xa35, 0xa3e, 0xa30, 0x3b, 0xa2c, 0xa41, 0xa71, 0xa27, 0xa35, 0xa3e, 0xa30, 0x3b, 0xa35, 0xa40, 0xa30, 0xa35, 0xa3e,
-0xa30, 0x3b, 0xa38, 0xa3c, 0xa41, 0xa71, 0xa15, 0xa30, 0xa35, 0xa3e, 0xa30, 0x3b, 0xa38, 0xa3c, 0xa28, 0xa3f, 0xa71, 0xa1a, 0xa30, 0xa35,
-0xa3e, 0xa30, 0x3b, 0xa10, 0x3b, 0xa38, 0xa4b, 0x3b, 0xa2e, 0xa70, 0x3b, 0xa2c, 0xa41, 0xa71, 0x3b, 0xa35, 0xa40, 0x3b, 0xa38, 0xa3c,
-0xa41, 0xa71, 0x3b, 0xa38, 0xa3c, 0x3b, 0x627, 0x62a, 0x648, 0x627, 0x631, 0x3b, 0x67e, 0x6cc, 0x631, 0x3b, 0x645, 0x646, 0x6af, 0x644,
-0x3b, 0x628, 0x64f, 0x62f, 0x6be, 0x3b, 0x62c, 0x645, 0x639, 0x631, 0x627, 0x62a, 0x3b, 0x62c, 0x645, 0x639, 0x6c1, 0x3b, 0x6c1, 0x641,
-0x62a, 0x6c1, 0x3b, 0x44, 0x6f, 0x6d, 0x3b, 0x4c, 0x75, 0x6e, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x4d, 0x69, 0xe9, 0x3b, 0x4a,
-0x75, 0x65, 0x3b, 0x56, 0x69, 0x65, 0x3b, 0x53, 0x61, 0x62, 0x3b, 0x44, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x6f, 0x3b, 0x4c,
-0x75, 0x6e, 0x65, 0x73, 0x3b, 0x4d, 0x61, 0x72, 0x74, 0x65, 0x73, 0x3b, 0x4d, 0x69, 0xe9, 0x72, 0x63, 0x6f, 0x6c, 0x65,
-0x73, 0x3b, 0x4a, 0x75, 0x65, 0x76, 0x65, 0x73, 0x3b, 0x56, 0x69, 0x65, 0x72, 0x6e, 0x65, 0x73, 0x3b, 0x53, 0xe1, 0x62,
-0x61, 0x64, 0x6f, 0x3b, 0x44, 0x3b, 0x4c, 0x3b, 0x4d, 0x3b, 0x58, 0x3b, 0x4a, 0x3b, 0x56, 0x3b, 0x53, 0x3b, 0x64, 0x75,
-0x3b, 0x67, 0x6c, 0x69, 0x3b, 0x6d, 0x61, 0x3b, 0x6d, 0x65, 0x3b, 0x67, 0x69, 0x65, 0x3b, 0x76, 0x65, 0x3b, 0x73, 0x6f,
-0x3b, 0x64, 0x75, 0x6d, 0x65, 0x6e, 0x67, 0x69, 0x61, 0x3b, 0x67, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x73, 0x64, 0x69, 0x3b,
-0x6d, 0x61, 0x72, 0x64, 0x69, 0x3b, 0x6d, 0x65, 0x73, 0x65, 0x6d, 0x6e, 0x61, 0x3b, 0x67, 0x69, 0x65, 0x76, 0x67, 0x69,
-0x61, 0x3b, 0x76, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x64, 0x69, 0x3b, 0x73, 0x6f, 0x6e, 0x64, 0x61, 0x3b, 0x44, 0x3b, 0x47,
-0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x47, 0x3b, 0x56, 0x3b, 0x53, 0x3b, 0x64, 0x75, 0x6d, 0x2e, 0x3b, 0x6c, 0x75, 0x6e, 0x2e,
-0x3b, 0x6d, 0x61, 0x72, 0x2e, 0x3b, 0x6d, 0x69, 0x65, 0x2e, 0x3b, 0x6a, 0x6f, 0x69, 0x3b, 0x76, 0x69, 0x6e, 0x2e, 0x3b,
-0x73, 0xe2, 0x6d, 0x2e, 0x3b, 0x64, 0x75, 0x6d, 0x69, 0x6e, 0x69, 0x63, 0x103, 0x3b, 0x6c, 0x75, 0x6e, 0x69, 0x3b, 0x6d,
-0x61, 0x72, 0x21b, 0x69, 0x3b, 0x6d, 0x69, 0x65, 0x72, 0x63, 0x75, 0x72, 0x69, 0x3b, 0x6a, 0x6f, 0x69, 0x3b, 0x76, 0x69,
-0x6e, 0x65, 0x72, 0x69, 0x3b, 0x73, 0xe2, 0x6d, 0x62, 0x103, 0x74, 0x103, 0x3b, 0x44, 0x75, 0x6d, 0x3b, 0x4c, 0x75, 0x6e,
-0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x4d, 0x69, 0x65, 0x3b, 0x4a, 0x6f, 0x69, 0x3b, 0x56, 0x69, 0x6e, 0x3b, 0x53, 0xe2, 0x6d,
-0x3b, 0x44, 0x3b, 0x4c, 0x3b, 0x4d, 0x61, 0x3b, 0x4d, 0x69, 0x3b, 0x4a, 0x3b, 0x56, 0x3b, 0x53, 0x3b, 0x432, 0x441, 0x3b,
-0x43f, 0x43d, 0x3b, 0x432, 0x442, 0x3b, 0x441, 0x440, 0x3b, 0x447, 0x442, 0x3b, 0x43f, 0x442, 0x3b, 0x441, 0x431, 0x3b, 0x432, 0x43e,
-0x441, 0x43a, 0x440, 0x435, 0x441, 0x435, 0x43d, 0x44c, 0x435, 0x3b, 0x43f, 0x43e, 0x43d, 0x435, 0x434, 0x435, 0x43b, 0x44c, 0x43d, 0x438,
-0x43a, 0x3b, 0x432, 0x442, 0x43e, 0x440, 0x43d, 0x438, 0x43a, 0x3b, 0x441, 0x440, 0x435, 0x434, 0x430, 0x3b, 0x447, 0x435, 0x442, 0x432,
-0x435, 0x440, 0x433, 0x3b, 0x43f, 0x44f, 0x442, 0x43d, 0x438, 0x446, 0x430, 0x3b, 0x441, 0x443, 0x431, 0x431, 0x43e, 0x442, 0x430, 0x3b,
-0x412, 0x3b, 0x41f, 0x3b, 0x412, 0x3b, 0x421, 0x3b, 0x427, 0x3b, 0x41f, 0x3b, 0x421, 0x3b, 0x42, 0x6b, 0x31, 0x3b, 0x42, 0x6b,
-0x32, 0x3b, 0x42, 0x6b, 0x33, 0x3b, 0x42, 0x6b, 0x34, 0x3b, 0x42, 0x6b, 0x35, 0x3b, 0x4c, 0xe2, 0x70, 0x3b, 0x4c, 0xe2,
-0x79, 0x3b, 0x42, 0x69, 0x6b, 0x75, 0x61, 0x2d, 0xf4, 0x6b, 0x6f, 0x3b, 0x42, 0xef, 0x6b, 0x75, 0x61, 0x2d, 0xfb, 0x73,
-0x65, 0x3b, 0x42, 0xef, 0x6b, 0x75, 0x61, 0x2d, 0x70, 0x74, 0xe2, 0x3b, 0x42, 0xef, 0x6b, 0x75, 0x61, 0x2d, 0x75, 0x73,
-0xef, 0xf6, 0x3b, 0x42, 0xef, 0x6b, 0x75, 0x61, 0x2d, 0x6f, 0x6b, 0xfc, 0x3b, 0x4c, 0xe2, 0x70, 0xf4, 0x73, 0xf6, 0x3b,
-0x4c, 0xe2, 0x79, 0x65, 0x6e, 0x67, 0x61, 0x3b, 0x4b, 0x3b, 0x53, 0x3b, 0x54, 0x3b, 0x53, 0x3b, 0x4b, 0x3b, 0x50, 0x3b,
-0x59, 0x3b, 0x43d, 0x435, 0x434, 0x3b, 0x43f, 0x43e, 0x43d, 0x3b, 0x443, 0x442, 0x43e, 0x3b, 0x441, 0x440, 0x435, 0x3b, 0x447, 0x435,
-0x442, 0x3b, 0x43f, 0x435, 0x442, 0x3b, 0x441, 0x443, 0x431, 0x3b, 0x43d, 0x435, 0x434, 0x435, 0x459, 0x430, 0x3b, 0x43f, 0x43e, 0x43d,
-0x435, 0x434, 0x435, 0x459, 0x430, 0x43a, 0x3b, 0x443, 0x442, 0x43e, 0x440, 0x430, 0x43a, 0x3b, 0x441, 0x440, 0x435, 0x434, 0x430, 0x3b,
-0x447, 0x435, 0x442, 0x432, 0x440, 0x442, 0x430, 0x43a, 0x3b, 0x43f, 0x435, 0x442, 0x430, 0x43a, 0x3b, 0x441, 0x443, 0x431, 0x43e, 0x442,
-0x430, 0x3b, 0x43d, 0x3b, 0x43f, 0x3b, 0x443, 0x3b, 0x441, 0x3b, 0x447, 0x3b, 0x43f, 0x3b, 0x441, 0x3b, 0x43d, 0x435, 0x434, 0x2e,
-0x3b, 0x43f, 0x43e, 0x43d, 0x2e, 0x3b, 0x443, 0x442, 0x2e, 0x3b, 0x441, 0x440, 0x2e, 0x3b, 0x447, 0x435, 0x442, 0x2e, 0x3b, 0x43f,
-0x435, 0x442, 0x2e, 0x3b, 0x441, 0x443, 0x431, 0x2e, 0x3b, 0x43d, 0x435, 0x434, 0x458, 0x435, 0x459, 0x430, 0x3b, 0x43f, 0x43e, 0x43d,
-0x435, 0x434, 0x435, 0x459, 0x430, 0x43a, 0x3b, 0x443, 0x442, 0x43e, 0x440, 0x430, 0x43a, 0x3b, 0x441, 0x440, 0x438, 0x458, 0x435, 0x434,
-0x430, 0x3b, 0x447, 0x435, 0x442, 0x432, 0x440, 0x442, 0x430, 0x43a, 0x3b, 0x43f, 0x435, 0x442, 0x430, 0x43a, 0x3b, 0x441, 0x443, 0x431,
-0x43e, 0x442, 0x430, 0x3b, 0x6e, 0x65, 0x64, 0x2e, 0x3b, 0x70, 0x6f, 0x6e, 0x2e, 0x3b, 0x75, 0x74, 0x2e, 0x3b, 0x73, 0x72,
-0x2e, 0x3b, 0x10d, 0x65, 0x74, 0x2e, 0x3b, 0x70, 0x65, 0x74, 0x2e, 0x3b, 0x73, 0x75, 0x62, 0x2e, 0x3b, 0x6e, 0x65, 0x64,
-0x6a, 0x65, 0x6c, 0x6a, 0x61, 0x3b, 0x70, 0x6f, 0x6e, 0x65, 0x64, 0x65, 0x6c, 0x6a, 0x61, 0x6b, 0x3b, 0x75, 0x74, 0x6f,
-0x72, 0x61, 0x6b, 0x3b, 0x73, 0x72, 0x69, 0x6a, 0x65, 0x64, 0x61, 0x3b, 0x10d, 0x65, 0x74, 0x76, 0x72, 0x74, 0x61, 0x6b,
-0x3b, 0x70, 0x65, 0x74, 0x61, 0x6b, 0x3b, 0x73, 0x75, 0x62, 0x6f, 0x74, 0x61, 0x3b, 0x6e, 0x65, 0x64, 0x3b, 0x70, 0x6f,
-0x6e, 0x3b, 0x75, 0x74, 0x6f, 0x3b, 0x73, 0x72, 0x65, 0x3b, 0x10d, 0x65, 0x74, 0x3b, 0x70, 0x65, 0x74, 0x3b, 0x73, 0x75,
-0x62, 0x3b, 0x6e, 0x65, 0x64, 0x65, 0x6c, 0x6a, 0x61, 0x3b, 0x70, 0x6f, 0x6e, 0x65, 0x64, 0x65, 0x6c, 0x6a, 0x61, 0x6b,
-0x3b, 0x75, 0x74, 0x6f, 0x72, 0x61, 0x6b, 0x3b, 0x73, 0x72, 0x65, 0x64, 0x61, 0x3b, 0x10d, 0x65, 0x74, 0x76, 0x72, 0x74,
-0x61, 0x6b, 0x3b, 0x70, 0x65, 0x74, 0x61, 0x6b, 0x3b, 0x73, 0x75, 0x62, 0x6f, 0x74, 0x61, 0x3b, 0x425, 0x446, 0x431, 0x3b,
-0x41a, 0x440, 0x441, 0x3b, 0x414, 0x446, 0x433, 0x3b, 0x4d4, 0x440, 0x442, 0x3b, 0x426, 0x43f, 0x440, 0x3b, 0x41c, 0x440, 0x431, 0x3b,
-0x421, 0x431, 0x442, 0x3b, 0x425, 0x443, 0x44b, 0x446, 0x430, 0x443, 0x431, 0x43e, 0x43d, 0x3b, 0x41a, 0x44a, 0x443, 0x44b, 0x440, 0x438,
-0x441, 0x4d5, 0x440, 0x3b, 0x414, 0x44b, 0x446, 0x446, 0x4d5, 0x433, 0x3b, 0x4d4, 0x440, 0x442, 0x44b, 0x446, 0x446, 0x4d5, 0x433, 0x3b,
-0x426, 0x44b, 0x43f, 0x43f, 0x4d5, 0x440, 0x4d5, 0x43c, 0x3b, 0x41c, 0x430, 0x439, 0x440, 0x4d5, 0x43c, 0x431, 0x43e, 0x43d, 0x3b, 0x421,
-0x430, 0x431, 0x430, 0x442, 0x3b, 0x425, 0x3b, 0x41a, 0x3b, 0x414, 0x3b, 0x4d4, 0x3b, 0x426, 0x3b, 0x41c, 0x3b, 0x421, 0x3b, 0x445,
-0x446, 0x431, 0x3b, 0x43a, 0x440, 0x441, 0x3b, 0x434, 0x446, 0x433, 0x3b, 0x4d5, 0x440, 0x442, 0x3b, 0x446, 0x43f, 0x440, 0x3b, 0x43c,
-0x440, 0x431, 0x3b, 0x441, 0x431, 0x442, 0x3b, 0x445, 0x443, 0x44b, 0x446, 0x430, 0x443, 0x431, 0x43e, 0x43d, 0x3b, 0x43a, 0x44a, 0x443,
-0x44b, 0x440, 0x438, 0x441, 0x4d5, 0x440, 0x3b, 0x434, 0x44b, 0x446, 0x446, 0x4d5, 0x433, 0x3b, 0x4d5, 0x440, 0x442, 0x44b, 0x446, 0x446,
-0x4d5, 0x433, 0x3b, 0x446, 0x44b, 0x43f, 0x43f, 0x4d5, 0x440, 0x4d5, 0x43c, 0x3b, 0x43c, 0x430, 0x439, 0x440, 0x4d5, 0x43c, 0x431, 0x43e,
-0x43d, 0x3b, 0x441, 0x430, 0x431, 0x430, 0x442, 0x3b, 0x53, 0x76, 0x6f, 0x3b, 0x4d, 0x75, 0x76, 0x3b, 0x43, 0x68, 0x70, 0x3b,
-0x43, 0x68, 0x74, 0x3b, 0x43, 0x68, 0x6e, 0x3b, 0x43, 0x68, 0x73, 0x3b, 0x4d, 0x75, 0x67, 0x3b, 0x53, 0x76, 0x6f, 0x6e,
-0x64, 0x6f, 0x3b, 0x4d, 0x75, 0x76, 0x68, 0x75, 0x72, 0x6f, 0x3b, 0x43, 0x68, 0x69, 0x70, 0x69, 0x72, 0x69, 0x3b, 0x43,
-0x68, 0x69, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x43, 0x68, 0x69, 0x6e, 0x61, 0x3b, 0x43, 0x68, 0x69, 0x73, 0x68, 0x61, 0x6e,
-0x75, 0x3b, 0x4d, 0x75, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0x43, 0x3b, 0x43, 0x3b, 0x43,
-0x3b, 0x43, 0x3b, 0x4d, 0x3b, 0xd89, 0xdbb, 0xdd2, 0xdaf, 0xdcf, 0x3b, 0xdc3, 0xdb3, 0xdd4, 0xdaf, 0xdcf, 0x3b, 0xd85, 0xd9f, 0xdc4,
-0x3b, 0xdb6, 0xdaf, 0xdcf, 0xdaf, 0xdcf, 0x3b, 0xdb6, 0xdca, 0x200d, 0xdbb, 0xdc4, 0xdc3, 0xdca, 0x3b, 0xdc3, 0xdd2, 0xd9a, 0xdd4, 0x3b,
-0xdc3, 0xdd9, 0xdb1, 0x3b, 0xd89, 0xdbb, 0xdd2, 0xdaf, 0xdcf, 0x3b, 0xdc3, 0xdb3, 0xdd4, 0xdaf, 0xdcf, 0x3b, 0xd85, 0xd9f, 0xdc4, 0xdbb,
-0xdd4, 0xdc0, 0xdcf, 0xdaf, 0xdcf, 0x3b, 0xdb6, 0xdaf, 0xdcf, 0xdaf, 0xdcf, 0x3b, 0xdb6, 0xdca, 0x200d, 0xdbb, 0xdc4, 0xdc3, 0xdca, 0xdb4,
-0xdad, 0xdd2, 0xdb1, 0xdca, 0xdaf, 0xdcf, 0x3b, 0xdc3, 0xdd2, 0xd9a, 0xdd4, 0xdbb, 0xdcf, 0xdaf, 0xdcf, 0x3b, 0xdc3, 0xdd9, 0xdb1, 0xdc3,
-0xdd4, 0xdbb, 0xdcf, 0xdaf, 0xdcf, 0x3b, 0xd89, 0x3b, 0xdc3, 0x3b, 0xd85, 0x3b, 0xdb6, 0x3b, 0xdb6, 0xdca, 0x200d, 0xdbb, 0x3b, 0xdc3,
-0xdd2, 0x3b, 0xdc3, 0xdd9, 0x3b, 0x6e, 0x65, 0x3b, 0x70, 0x6f, 0x3b, 0x75, 0x74, 0x3b, 0x73, 0x74, 0x3b, 0x161, 0x74, 0x3b,
-0x70, 0x69, 0x3b, 0x73, 0x6f, 0x3b, 0x6e, 0x65, 0x64, 0x65, 0x13e, 0x61, 0x3b, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x6c, 0x6f,
-0x6b, 0x3b, 0x75, 0x74, 0x6f, 0x72, 0x6f, 0x6b, 0x3b, 0x73, 0x74, 0x72, 0x65, 0x64, 0x61, 0x3b, 0x161, 0x74, 0x76, 0x72,
-0x74, 0x6f, 0x6b, 0x3b, 0x70, 0x69, 0x61, 0x74, 0x6f, 0x6b, 0x3b, 0x73, 0x6f, 0x62, 0x6f, 0x74, 0x61, 0x3b, 0x6e, 0x3b,
-0x70, 0x3b, 0x75, 0x3b, 0x73, 0x3b, 0x161, 0x3b, 0x70, 0x3b, 0x73, 0x3b, 0x6e, 0x65, 0x64, 0x2e, 0x3b, 0x70, 0x6f, 0x6e,
-0x2e, 0x3b, 0x74, 0x6f, 0x72, 0x2e, 0x3b, 0x73, 0x72, 0x65, 0x2e, 0x3b, 0x10d, 0x65, 0x74, 0x2e, 0x3b, 0x70, 0x65, 0x74,
-0x2e, 0x3b, 0x73, 0x6f, 0x62, 0x2e, 0x3b, 0x6e, 0x65, 0x64, 0x65, 0x6c, 0x6a, 0x61, 0x3b, 0x70, 0x6f, 0x6e, 0x65, 0x64,
-0x65, 0x6c, 0x6a, 0x65, 0x6b, 0x3b, 0x74, 0x6f, 0x72, 0x65, 0x6b, 0x3b, 0x73, 0x72, 0x65, 0x64, 0x61, 0x3b, 0x10d, 0x65,
-0x74, 0x72, 0x74, 0x65, 0x6b, 0x3b, 0x70, 0x65, 0x74, 0x65, 0x6b, 0x3b, 0x73, 0x6f, 0x62, 0x6f, 0x74, 0x61, 0x3b, 0x6e,
-0x3b, 0x70, 0x3b, 0x74, 0x3b, 0x73, 0x3b, 0x10d, 0x3b, 0x70, 0x3b, 0x73, 0x3b, 0x41, 0x78, 0x64, 0x3b, 0x49, 0x73, 0x6e,
-0x3b, 0x54, 0x61, 0x6c, 0x3b, 0x41, 0x72, 0x62, 0x3b, 0x4b, 0x68, 0x61, 0x3b, 0x4a, 0x69, 0x6d, 0x3b, 0x53, 0x61, 0x62,
-0x3b, 0x41, 0x78, 0x61, 0x64, 0x3b, 0x49, 0x73, 0x6e, 0x69, 0x69, 0x6e, 0x3b, 0x54, 0x61, 0x6c, 0x61, 0x61, 0x64, 0x6f,
-0x3b, 0x41, 0x72, 0x62, 0x61, 0x63, 0x6f, 0x3b, 0x4b, 0x68, 0x61, 0x6d, 0x69, 0x69, 0x73, 0x3b, 0x4a, 0x69, 0x6d, 0x63,
-0x6f, 0x3b, 0x53, 0x61, 0x62, 0x74, 0x69, 0x3b, 0x41, 0x3b, 0x49, 0x3b, 0x54, 0x3b, 0x41, 0x3b, 0x4b, 0x68, 0x3b, 0x4a,
-0x3b, 0x53, 0x3b, 0x64, 0x6f, 0x6d, 0x2e, 0x3b, 0x6c, 0x75, 0x6e, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x2e, 0x3b, 0x6d, 0x69,
-0xe9, 0x2e, 0x3b, 0x6a, 0x75, 0x65, 0x2e, 0x3b, 0x76, 0x69, 0x65, 0x2e, 0x3b, 0x73, 0xe1, 0x62, 0x2e, 0x3b, 0x64, 0x6f,
-0x6d, 0x69, 0x6e, 0x67, 0x6f, 0x3b, 0x6c, 0x75, 0x6e, 0x65, 0x73, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x65, 0x73, 0x3b, 0x6d,
-0x69, 0xe9, 0x72, 0x63, 0x6f, 0x6c, 0x65, 0x73, 0x3b, 0x6a, 0x75, 0x65, 0x76, 0x65, 0x73, 0x3b, 0x76, 0x69, 0x65, 0x72,
-0x6e, 0x65, 0x73, 0x3b, 0x73, 0xe1, 0x62, 0x61, 0x64, 0x6f, 0x3b, 0x64, 0x3b, 0x6c, 0x3b, 0x6d, 0x3b, 0x6d, 0x3b, 0x6a,
-0x3b, 0x76, 0x3b, 0x73, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x70, 0x69, 0x6c, 0x69, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x74, 0x61,
-0x74, 0x75, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x6e, 0x6e, 0x65, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b,
-0x41, 0x6c, 0x68, 0x61, 0x6d, 0x69, 0x73, 0x69, 0x3b, 0x49, 0x6a, 0x75, 0x6d, 0x61, 0x61, 0x3b, 0x4a, 0x75, 0x6d, 0x61,
-0x6d, 0x6f, 0x73, 0x69, 0x3b, 0x73, 0xf6, 0x6e, 0x3b, 0x6d, 0xe5, 0x6e, 0x3b, 0x74, 0x69, 0x73, 0x3b, 0x6f, 0x6e, 0x73,
-0x3b, 0x74, 0x6f, 0x72, 0x73, 0x3b, 0x66, 0x72, 0x65, 0x3b, 0x6c, 0xf6, 0x72, 0x3b, 0x73, 0xf6, 0x6e, 0x64, 0x61, 0x67,
-0x3b, 0x6d, 0xe5, 0x6e, 0x64, 0x61, 0x67, 0x3b, 0x74, 0x69, 0x73, 0x64, 0x61, 0x67, 0x3b, 0x6f, 0x6e, 0x73, 0x64, 0x61,
-0x67, 0x3b, 0x74, 0x6f, 0x72, 0x73, 0x64, 0x61, 0x67, 0x3b, 0x66, 0x72, 0x65, 0x64, 0x61, 0x67, 0x3b, 0x6c, 0xf6, 0x72,
-0x64, 0x61, 0x67, 0x3b, 0xb9e, 0xbbe, 0xbaf, 0xbbf, 0x2e, 0x3b, 0xba4, 0xbbf, 0xb99, 0xbcd, 0x2e, 0x3b, 0xb9a, 0xbc6, 0xbb5, 0xbcd,
-0x2e, 0x3b, 0xbaa, 0xbc1, 0xba4, 0x2e, 0x3b, 0xbb5, 0xbbf, 0xbaf, 0xbbe, 0x2e, 0x3b, 0xbb5, 0xbc6, 0xbb3, 0xbcd, 0x2e, 0x3b, 0xb9a,
-0xba9, 0xbbf, 0x3b, 0xb9e, 0xbbe, 0xbaf, 0xbbf, 0xbb1, 0xbc1, 0x3b, 0xba4, 0xbbf, 0xb99, 0xbcd, 0xb95, 0xbb3, 0xbcd, 0x3b, 0xb9a, 0xbc6,
-0xbb5, 0xbcd, 0xbb5, 0xbbe, 0xbaf, 0xbcd, 0x3b, 0xbaa, 0xbc1, 0xba4, 0xba9, 0xbcd, 0x3b, 0xbb5, 0xbbf, 0xbaf, 0xbbe, 0xbb4, 0xba9, 0xbcd,
-0x3b, 0xbb5, 0xbc6, 0xbb3, 0xbcd, 0xbb3, 0xbbf, 0x3b, 0xb9a, 0xba9, 0xbbf, 0x3b, 0xb9e, 0xbbe, 0x3b, 0xba4, 0xbbf, 0x3b, 0xb9a, 0xbc6,
-0x3b, 0xbaa, 0xbc1, 0x3b, 0xbb5, 0xbbf, 0x3b, 0xbb5, 0xbc6, 0x3b, 0xb9a, 0x3b, 0xc06, 0xc26, 0xc3f, 0x3b, 0xc38, 0xc4b, 0xc2e, 0x3b,
-0xc2e, 0xc02, 0xc17, 0xc33, 0x3b, 0xc2c, 0xc41, 0xc27, 0x3b, 0xc17, 0xc41, 0xc30, 0xc41, 0x3b, 0xc36, 0xc41, 0xc15, 0xc4d, 0xc30, 0x3b,
-0xc36, 0xc28, 0xc3f, 0x3b, 0xc06, 0xc26, 0xc3f, 0xc35, 0xc3e, 0xc30, 0xc02, 0x3b, 0xc38, 0xc4b, 0xc2e, 0xc35, 0xc3e, 0xc30, 0xc02, 0x3b,
-0xc2e, 0xc02, 0xc17, 0xc33, 0xc35, 0xc3e, 0xc30, 0xc02, 0x3b, 0xc2c, 0xc41, 0xc27, 0xc35, 0xc3e, 0xc30, 0xc02, 0x3b, 0xc17, 0xc41, 0xc30,
-0xc41, 0xc35, 0xc3e, 0xc30, 0xc02, 0x3b, 0xc36, 0xc41, 0xc15, 0xc4d, 0xc30, 0xc35, 0xc3e, 0xc30, 0xc02, 0x3b, 0xc36, 0xc28, 0xc3f, 0xc35,
-0xc3e, 0xc30, 0xc02, 0x3b, 0xc06, 0x3b, 0xc38, 0xc4b, 0x3b, 0xc2e, 0x3b, 0xc2c, 0xc41, 0x3b, 0xc17, 0xc41, 0x3b, 0xc36, 0xc41, 0x3b,
-0xc36, 0x3b, 0xe2d, 0xe32, 0x2e, 0x3b, 0xe08, 0x2e, 0x3b, 0xe2d, 0x2e, 0x3b, 0xe1e, 0x2e, 0x3b, 0xe1e, 0xe24, 0x2e, 0x3b, 0xe28,
-0x2e, 0x3b, 0xe2a, 0x2e, 0x3b, 0xe27, 0xe31, 0xe19, 0xe2d, 0xe32, 0xe17, 0xe34, 0xe15, 0xe22, 0xe4c, 0x3b, 0xe27, 0xe31, 0xe19, 0xe08,
-0xe31, 0xe19, 0xe17, 0xe23, 0xe4c, 0x3b, 0xe27, 0xe31, 0xe19, 0xe2d, 0xe31, 0xe07, 0xe04, 0xe32, 0xe23, 0x3b, 0xe27, 0xe31, 0xe19, 0xe1e,
-0xe38, 0xe18, 0x3b, 0xe27, 0xe31, 0xe19, 0xe1e, 0xe24, 0xe2b, 0xe31, 0xe2a, 0xe1a, 0xe14, 0xe35, 0x3b, 0xe27, 0xe31, 0xe19, 0xe28, 0xe38,
-0xe01, 0xe23, 0xe4c, 0x3b, 0xe27, 0xe31, 0xe19, 0xe40, 0xe2a, 0xe32, 0xe23, 0xe4c, 0x3b, 0xe2d, 0xe32, 0x3b, 0xe08, 0x3b, 0xe2d, 0x3b,
-0xe1e, 0x3b, 0xe1e, 0xe24, 0x3b, 0xe28, 0x3b, 0xe2a, 0x3b, 0xf49, 0xf72, 0xf0b, 0xf58, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b,
-0x3b, 0xf58, 0xf72, 0xf42, 0xf0b, 0xf51, 0xf58, 0xf62, 0xf0b, 0x3b, 0xf63, 0xfb7, 0xf42, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf55, 0xf74, 0xf62,
-0xf0b, 0xf56, 0xf74, 0xf0b, 0x3b, 0xf54, 0xf0b, 0xf66, 0xf44, 0xf66, 0xf0b, 0x3b, 0xf66, 0xfa4, 0xf7a, 0xf53, 0xf0b, 0xf54, 0xf0b, 0x3b,
-0xf42, 0xf5f, 0xf60, 0xf0b, 0xf49, 0xf72, 0xf0b, 0xf58, 0xf0b, 0x3b, 0xf42, 0xf5f, 0xf60, 0xf0b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0x3b,
-0xf42, 0xf5f, 0xf60, 0xf0b, 0xf58, 0xf72, 0xf42, 0xf0b, 0xf51, 0xf58, 0xf62, 0xf0b, 0x3b, 0xf42, 0xf5f, 0xf60, 0xf0b, 0xf63, 0xfb7, 0xf42,
-0xf0b, 0xf54, 0xf0b, 0x3b, 0xf42, 0xf5f, 0xf60, 0xf0b, 0xf55, 0xf74, 0xf62, 0xf0b, 0xf56, 0xf74, 0xf0b, 0x3b, 0xf42, 0xf5f, 0xf60, 0xf0b,
-0xf54, 0xf0b, 0xf66, 0xf44, 0xf66, 0xf0b, 0x3b, 0xf42, 0xf5f, 0xf60, 0xf0b, 0xf66, 0xfa4, 0xf7a, 0xf53, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf49,
-0xf72, 0x3b, 0xf5f, 0xfb3, 0x3b, 0xf58, 0xf72, 0xf42, 0x3b, 0xf63, 0xfb7, 0xf42, 0x3b, 0xf55, 0xf74, 0xf62, 0x3b, 0xf66, 0xf44, 0xf66,
-0x3b, 0xf66, 0xfa4, 0xf7a, 0xf53, 0x3b, 0x1230, 0x1295, 0x3b, 0x1230, 0x1291, 0x3b, 0x1230, 0x1209, 0x3b, 0x1228, 0x1261, 0x3b, 0x1213, 0x1219,
-0x3b, 0x12d3, 0x122d, 0x3b, 0x1240, 0x12f3, 0x3b, 0x1230, 0x1295, 0x1260, 0x1275, 0x3b, 0x1230, 0x1291, 0x12ed, 0x3b, 0x1230, 0x1209, 0x1235, 0x3b,
-0x1228, 0x1261, 0x12d5, 0x3b, 0x1213, 0x1219, 0x1235, 0x3b, 0x12d3, 0x122d, 0x1262, 0x3b, 0x1240, 0x12f3, 0x121d, 0x3b, 0x1230, 0x3b, 0x1230, 0x3b,
-0x1220, 0x3b, 0x1228, 0x3b, 0x1213, 0x3b, 0x12d3, 0x3b, 0x1240, 0x3b, 0x1230, 0x1295, 0x1260, 0x1275, 0x3b, 0x1230, 0x1291, 0x12ed, 0x3b, 0x1220,
-0x1209, 0x1235, 0x3b, 0x1228, 0x1261, 0x12d5, 0x3b, 0x1283, 0x1219, 0x1235, 0x3b, 0x12d3, 0x122d, 0x1262, 0x3b, 0x1240, 0x12f3, 0x121d, 0x3b, 0x1230,
-0x3b, 0x1230, 0x3b, 0x1230, 0x3b, 0x1228, 0x3b, 0x1213, 0x3b, 0x12d3, 0x3b, 0x1240, 0x3b, 0x53, 0x101, 0x70, 0x3b, 0x4d, 0x14d, 0x6e,
-0x3b, 0x54, 0x16b, 0x73, 0x3b, 0x50, 0x75, 0x6c, 0x3b, 0x54, 0x75, 0x2bb, 0x61, 0x3b, 0x46, 0x61, 0x6c, 0x3b, 0x54, 0x6f,
-0x6b, 0x3b, 0x53, 0x101, 0x70, 0x61, 0x74, 0x65, 0x3b, 0x4d, 0x14d, 0x6e, 0x69, 0x74, 0x65, 0x3b, 0x54, 0x16b, 0x73, 0x69,
-0x74, 0x65, 0x3b, 0x50, 0x75, 0x6c, 0x65, 0x6c, 0x75, 0x6c, 0x75, 0x3b, 0x54, 0x75, 0x2bb, 0x61, 0x70, 0x75, 0x6c, 0x65,
-0x6c, 0x75, 0x6c, 0x75, 0x3b, 0x46, 0x61, 0x6c, 0x61, 0x69, 0x74, 0x65, 0x3b, 0x54, 0x6f, 0x6b, 0x6f, 0x6e, 0x61, 0x6b,
-0x69, 0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0x54, 0x3b, 0x50, 0x3b, 0x54, 0x3b, 0x46, 0x3b, 0x54, 0x3b, 0x50, 0x61, 0x7a, 0x3b,
-0x50, 0x7a, 0x74, 0x3b, 0x53, 0x61, 0x6c, 0x3b, 0xc7, 0x61, 0x72, 0x3b, 0x50, 0x65, 0x72, 0x3b, 0x43, 0x75, 0x6d, 0x3b,
-0x43, 0x6d, 0x74, 0x3b, 0x50, 0x61, 0x7a, 0x61, 0x72, 0x3b, 0x50, 0x61, 0x7a, 0x61, 0x72, 0x74, 0x65, 0x73, 0x69, 0x3b,
-0x53, 0x61, 0x6c, 0x131, 0x3b, 0xc7, 0x61, 0x72, 0x15f, 0x61, 0x6d, 0x62, 0x61, 0x3b, 0x50, 0x65, 0x72, 0x15f, 0x65, 0x6d,
-0x62, 0x65, 0x3b, 0x43, 0x75, 0x6d, 0x61, 0x3b, 0x43, 0x75, 0x6d, 0x61, 0x72, 0x74, 0x65, 0x73, 0x69, 0x3b, 0x50, 0x3b,
-0x50, 0x3b, 0x53, 0x3b, 0xc7, 0x3b, 0x50, 0x3b, 0x43, 0x3b, 0x43, 0x3b, 0xfd, 0x62, 0x3b, 0x64, 0x62, 0x3b, 0x73, 0x62,
-0x3b, 0xe7, 0x62, 0x3b, 0x70, 0x62, 0x3b, 0x61, 0x6e, 0x3b, 0x15f, 0x62, 0x3b, 0xfd, 0x65, 0x6b, 0x15f, 0x65, 0x6e, 0x62,
-0x65, 0x3b, 0x64, 0x75, 0x15f, 0x65, 0x6e, 0x62, 0x65, 0x3b, 0x73, 0x69, 0x15f, 0x65, 0x6e, 0x62, 0x65, 0x3b, 0xe7, 0x61,
-0x72, 0x15f, 0x65, 0x6e, 0x62, 0x65, 0x3b, 0x70, 0x65, 0x6e, 0x15f, 0x65, 0x6e, 0x62, 0x65, 0x3b, 0x61, 0x6e, 0x6e, 0x61,
-0x3b, 0x15f, 0x65, 0x6e, 0x62, 0x65, 0x3b, 0xdd, 0x3b, 0x44, 0x3b, 0x53, 0x3b, 0xc7, 0x3b, 0x50, 0x3b, 0x41, 0x3b, 0x15e,
-0x3b, 0x64a, 0x6d5, 0x3b, 0x62f, 0x6c8, 0x3b, 0x633, 0x6d5, 0x3b, 0x686, 0x627, 0x3b, 0x67e, 0x6d5, 0x3b, 0x62c, 0x6c8, 0x3b, 0x634,
-0x6d5, 0x3b, 0x64a, 0x6d5, 0x643, 0x634, 0x6d5, 0x646, 0x628, 0x6d5, 0x3b, 0x62f, 0x6c8, 0x634, 0x6d5, 0x646, 0x628, 0x6d5, 0x3b, 0x633,
-0x6d5, 0x64a, 0x634, 0x6d5, 0x646, 0x628, 0x6d5, 0x3b, 0x686, 0x627, 0x631, 0x634, 0x6d5, 0x646, 0x628, 0x6d5, 0x3b, 0x67e, 0x6d5, 0x64a,
-0x634, 0x6d5, 0x646, 0x628, 0x6d5, 0x3b, 0x62c, 0x6c8, 0x645, 0x6d5, 0x3b, 0x634, 0x6d5, 0x646, 0x628, 0x6d5, 0x3b, 0x64a, 0x3b, 0x62f,
-0x3b, 0x633, 0x3b, 0x686, 0x3b, 0x67e, 0x3b, 0x62c, 0x3b, 0x634, 0x3b, 0x43d, 0x435, 0x434, 0x456, 0x43b, 0x44f, 0x3b, 0x43f, 0x43e,
-0x43d, 0x435, 0x434, 0x456, 0x43b, 0x43e, 0x43a, 0x3b, 0x432, 0x456, 0x432, 0x442, 0x43e, 0x440, 0x43e, 0x43a, 0x3b, 0x441, 0x435, 0x440,
-0x435, 0x434, 0x430, 0x3b, 0x447, 0x435, 0x442, 0x432, 0x435, 0x440, 0x3b, 0x43f, 0x2bc, 0x44f, 0x442, 0x43d, 0x438, 0x446, 0x44f, 0x3b,
-0x441, 0x443, 0x431, 0x43e, 0x442, 0x430, 0x3b, 0x41d, 0x3b, 0x41f, 0x3b, 0x412, 0x3b, 0x421, 0x3b, 0x427, 0x3b, 0x41f, 0x3b, 0x421,
-0x3b, 0x627, 0x62a, 0x648, 0x627, 0x631, 0x3b, 0x633, 0x648, 0x645, 0x648, 0x627, 0x631, 0x3b, 0x645, 0x646, 0x6af, 0x644, 0x3b, 0x628,
-0x62f, 0x6be, 0x3b, 0x62c, 0x645, 0x639, 0x631, 0x627, 0x62a, 0x3b, 0x62c, 0x645, 0x639, 0x6c1, 0x3b, 0x6c1, 0x641, 0x62a, 0x6c1, 0x3b,
-0x627, 0x62a, 0x648, 0x627, 0x631, 0x3b, 0x67e, 0x6cc, 0x631, 0x3b, 0x645, 0x646, 0x6af, 0x644, 0x3b, 0x628, 0x62f, 0x6be, 0x3b, 0x62c,
-0x645, 0x639, 0x631, 0x627, 0x62a, 0x3b, 0x62c, 0x645, 0x639, 0x6c1, 0x3b, 0x6c1, 0x641, 0x62a, 0x6c1, 0x3b, 0x59, 0x61, 0x6b, 0x3b,
-0x44, 0x75, 0x73, 0x68, 0x3b, 0x53, 0x65, 0x73, 0x68, 0x3b, 0x43, 0x68, 0x6f, 0x72, 0x3b, 0x50, 0x61, 0x79, 0x3b, 0x4a,
-0x75, 0x6d, 0x3b, 0x53, 0x68, 0x61, 0x6e, 0x3b, 0x79, 0x61, 0x6b, 0x73, 0x68, 0x61, 0x6e, 0x62, 0x61, 0x3b, 0x64, 0x75,
-0x73, 0x68, 0x61, 0x6e, 0x62, 0x61, 0x3b, 0x73, 0x65, 0x73, 0x68, 0x61, 0x6e, 0x62, 0x61, 0x3b, 0x63, 0x68, 0x6f, 0x72,
-0x73, 0x68, 0x61, 0x6e, 0x62, 0x61, 0x3b, 0x70, 0x61, 0x79, 0x73, 0x68, 0x61, 0x6e, 0x62, 0x61, 0x3b, 0x6a, 0x75, 0x6d,
-0x61, 0x3b, 0x73, 0x68, 0x61, 0x6e, 0x62, 0x61, 0x3b, 0x59, 0x3b, 0x44, 0x3b, 0x53, 0x3b, 0x43, 0x3b, 0x50, 0x3b, 0x4a,
-0x3b, 0x53, 0x3b, 0x6cc, 0x2e, 0x3b, 0x62f, 0x2e, 0x3b, 0x633, 0x2e, 0x3b, 0x686, 0x2e, 0x3b, 0x67e, 0x2e, 0x3b, 0x62c, 0x2e,
-0x3b, 0x634, 0x2e, 0x3b, 0x42f, 0x43a, 0x448, 0x3b, 0x414, 0x443, 0x448, 0x3b, 0x421, 0x435, 0x448, 0x3b, 0x427, 0x43e, 0x440, 0x3b,
-0x41f, 0x430, 0x439, 0x3b, 0x416, 0x443, 0x43c, 0x3b, 0x428, 0x430, 0x43d, 0x3b, 0x42f, 0x43a, 0x448, 0x430, 0x43d, 0x431, 0x430, 0x3b,
-0x414, 0x443, 0x448, 0x430, 0x43d, 0x431, 0x430, 0x3b, 0x421, 0x435, 0x448, 0x430, 0x43d, 0x431, 0x430, 0x3b, 0x427, 0x43e, 0x440, 0x448,
-0x430, 0x43d, 0x431, 0x430, 0x3b, 0x41f, 0x430, 0x439, 0x448, 0x430, 0x43d, 0x431, 0x430, 0x3b, 0x416, 0x443, 0x43c, 0x430, 0x3b, 0x428,
-0x430, 0x43d, 0x431, 0x430, 0x3b, 0x42f, 0x3b, 0x414, 0x3b, 0x421, 0x3b, 0x427, 0x3b, 0x41f, 0x3b, 0x416, 0x3b, 0x428, 0x3b, 0x44f,
-0x43a, 0x448, 0x3b, 0x434, 0x443, 0x448, 0x3b, 0x441, 0x435, 0x448, 0x3b, 0x447, 0x43e, 0x440, 0x3b, 0x43f, 0x430, 0x439, 0x3b, 0x436,
-0x443, 0x43c, 0x3b, 0x448, 0x430, 0x43d, 0x3b, 0x44f, 0x43a, 0x448, 0x430, 0x43d, 0x431, 0x430, 0x3b, 0x434, 0x443, 0x448, 0x430, 0x43d,
-0x431, 0x430, 0x3b, 0x441, 0x435, 0x448, 0x430, 0x43d, 0x431, 0x430, 0x3b, 0x447, 0x43e, 0x440, 0x448, 0x430, 0x43d, 0x431, 0x430, 0x3b,
-0x43f, 0x430, 0x439, 0x448, 0x430, 0x43d, 0x431, 0x430, 0x3b, 0x436, 0x443, 0x43c, 0x430, 0x3b, 0x448, 0x430, 0x43d, 0x431, 0x430, 0x3b,
-0x43, 0x4e, 0x3b, 0x54, 0x68, 0x20, 0x32, 0x3b, 0x54, 0x68, 0x20, 0x33, 0x3b, 0x54, 0x68, 0x20, 0x34, 0x3b, 0x54, 0x68,
-0x20, 0x35, 0x3b, 0x54, 0x68, 0x20, 0x36, 0x3b, 0x54, 0x68, 0x20, 0x37, 0x3b, 0x43, 0x68, 0x1ee7, 0x20, 0x4e, 0x68, 0x1ead,
-0x74, 0x3b, 0x54, 0x68, 0x1ee9, 0x20, 0x48, 0x61, 0x69, 0x3b, 0x54, 0x68, 0x1ee9, 0x20, 0x42, 0x61, 0x3b, 0x54, 0x68, 0x1ee9,
-0x20, 0x54, 0x1b0, 0x3b, 0x54, 0x68, 0x1ee9, 0x20, 0x4e, 0x103, 0x6d, 0x3b, 0x54, 0x68, 0x1ee9, 0x20, 0x53, 0xe1, 0x75, 0x3b,
-0x54, 0x68, 0x1ee9, 0x20, 0x42, 0x1ea3, 0x79, 0x3b, 0x43, 0x4e, 0x3b, 0x54, 0x32, 0x3b, 0x54, 0x33, 0x3b, 0x54, 0x34, 0x3b,
-0x54, 0x35, 0x3b, 0x54, 0x36, 0x3b, 0x54, 0x37, 0x3b, 0x53, 0x75, 0x6c, 0x3b, 0x4c, 0x6c, 0x75, 0x6e, 0x3b, 0x4d, 0x61,
-0x77, 0x3b, 0x4d, 0x65, 0x72, 0x3b, 0x49, 0x61, 0x75, 0x3b, 0x47, 0x77, 0x65, 0x3b, 0x53, 0x61, 0x64, 0x3b, 0x44, 0x79,
-0x64, 0x64, 0x20, 0x53, 0x75, 0x6c, 0x3b, 0x44, 0x79, 0x64, 0x64, 0x20, 0x4c, 0x6c, 0x75, 0x6e, 0x3b, 0x44, 0x79, 0x64,
-0x64, 0x20, 0x4d, 0x61, 0x77, 0x72, 0x74, 0x68, 0x3b, 0x44, 0x79, 0x64, 0x64, 0x20, 0x4d, 0x65, 0x72, 0x63, 0x68, 0x65,
-0x72, 0x3b, 0x44, 0x79, 0x64, 0x64, 0x20, 0x49, 0x61, 0x75, 0x3b, 0x44, 0x79, 0x64, 0x64, 0x20, 0x47, 0x77, 0x65, 0x6e,
-0x65, 0x72, 0x3b, 0x44, 0x79, 0x64, 0x64, 0x20, 0x53, 0x61, 0x64, 0x77, 0x72, 0x6e, 0x3b, 0x53, 0x3b, 0x4c, 0x6c, 0x3b,
-0x4d, 0x3b, 0x4d, 0x3b, 0x49, 0x3b, 0x47, 0x3b, 0x53, 0x3b, 0x53, 0x75, 0x6c, 0x3b, 0x4c, 0x6c, 0x75, 0x6e, 0x3b, 0x4d,
-0x61, 0x77, 0x3b, 0x4d, 0x65, 0x72, 0x3b, 0x49, 0x61, 0x75, 0x3b, 0x47, 0x77, 0x65, 0x6e, 0x3b, 0x53, 0x61, 0x64, 0x3b,
-0xc0, 0xec, 0x6b, 0xfa, 0x3b, 0x41, 0x6a, 0xe9, 0x3b, 0xcc, 0x73, 0x1eb9, 0x301, 0x67, 0x75, 0x6e, 0x3b, 0x1ecc, 0x6a, 0x1ecd,
-0x301, 0x72, 0xfa, 0x3b, 0x1ecc, 0x6a, 0x1ecd, 0x301, 0x62, 0x1ecd, 0x3b, 0x1eb8, 0x74, 0xec, 0x3b, 0xc0, 0x62, 0xe1, 0x6d, 0x1eb9,
-0x301, 0x74, 0x61, 0x3b, 0x1ecc, 0x6a, 0x1ecd, 0x301, 0x20, 0xc0, 0xec, 0x6b, 0xfa, 0x3b, 0x1ecc, 0x6a, 0x1ecd, 0x301, 0x20, 0x41,
-0x6a, 0xe9, 0x3b, 0x1ecc, 0x6a, 0x1ecd, 0x301, 0x20, 0xcc, 0x73, 0x1eb9, 0x301, 0x67, 0x75, 0x6e, 0x3b, 0x1ecc, 0x6a, 0x1ecd, 0x301,
-0x72, 0xfa, 0x3b, 0x1ecc, 0x6a, 0x1ecd, 0x301, 0x62, 0x1ecd, 0x3b, 0x1ecc, 0x6a, 0x1ecd, 0x301, 0x20, 0x1eb8, 0x74, 0xec, 0x3b, 0x1ecc,
-0x6a, 0x1ecd, 0x301, 0x20, 0xc0, 0x62, 0xe1, 0x6d, 0x1eb9, 0x301, 0x74, 0x61, 0x3b, 0xc0, 0xec, 0x6b, 0xfa, 0x3b, 0x41, 0x6a,
-0xe9, 0x3b, 0xcc, 0x73, 0x25b, 0x301, 0x67, 0x75, 0x6e, 0x3b, 0x186, 0x6a, 0x254, 0x301, 0x72, 0xfa, 0x3b, 0x186, 0x6a, 0x254,
-0x301, 0x62, 0x254, 0x3b, 0x190, 0x74, 0xec, 0x3b, 0xc0, 0x62, 0xe1, 0x6d, 0x25b, 0x301, 0x74, 0x61, 0x3b, 0x186, 0x6a, 0x254,
-0x301, 0x20, 0xc0, 0xec, 0x6b, 0xfa, 0x3b, 0x186, 0x6a, 0x254, 0x301, 0x20, 0x41, 0x6a, 0xe9, 0x3b, 0x186, 0x6a, 0x254, 0x301,
-0x20, 0xcc, 0x73, 0x25b, 0x301, 0x67, 0x75, 0x6e, 0x3b, 0x186, 0x6a, 0x254, 0x301, 0x72, 0xfa, 0x3b, 0x186, 0x6a, 0x254, 0x301,
-0x62, 0x254, 0x3b, 0x186, 0x6a, 0x254, 0x301, 0x20, 0x190, 0x74, 0xec, 0x3b, 0x186, 0x6a, 0x254, 0x301, 0x20, 0xc0, 0x62, 0xe1,
-0x6d, 0x25b, 0x301, 0x74, 0x61, 0x3b, 0x53, 0x6f, 0x6e, 0x3b, 0x4d, 0x73, 0x6f, 0x3b, 0x42, 0x69, 0x6c, 0x3b, 0x54, 0x68,
-0x61, 0x3b, 0x53, 0x69, 0x6e, 0x3b, 0x48, 0x6c, 0x61, 0x3b, 0x4d, 0x67, 0x71, 0x3b, 0x49, 0x53, 0x6f, 0x6e, 0x74, 0x6f,
-0x3b, 0x55, 0x4d, 0x73, 0x6f, 0x6d, 0x62, 0x75, 0x6c, 0x75, 0x6b, 0x6f, 0x3b, 0x55, 0x4c, 0x77, 0x65, 0x73, 0x69, 0x62,
-0x69, 0x6c, 0x69, 0x3b, 0x55, 0x4c, 0x77, 0x65, 0x73, 0x69, 0x74, 0x68, 0x61, 0x74, 0x68, 0x75, 0x3b, 0x55, 0x4c, 0x77,
-0x65, 0x73, 0x69, 0x6e, 0x65, 0x3b, 0x55, 0x4c, 0x77, 0x65, 0x73, 0x69, 0x68, 0x6c, 0x61, 0x6e, 0x75, 0x3b, 0x55, 0x4d,
-0x67, 0x71, 0x69, 0x62, 0x65, 0x6c, 0x6f, 0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0x42, 0x3b, 0x54, 0x3b, 0x53, 0x3b, 0x48, 0x3b,
-0x4d, 0x3b, 0x73, 0xf8, 0x6e, 0x3b, 0x6d, 0xe5, 0x6e, 0x3b, 0x74, 0x79, 0x73, 0x3b, 0x6f, 0x6e, 0x73, 0x3b, 0x74, 0x6f,
-0x72, 0x3b, 0x66, 0x72, 0x65, 0x3b, 0x6c, 0x61, 0x75, 0x3b, 0x73, 0xf8, 0x6e, 0x64, 0x61, 0x67, 0x3b, 0x6d, 0xe5, 0x6e,
-0x64, 0x61, 0x67, 0x3b, 0x74, 0x79, 0x73, 0x64, 0x61, 0x67, 0x3b, 0x6f, 0x6e, 0x73, 0x64, 0x61, 0x67, 0x3b, 0x74, 0x6f,
-0x72, 0x73, 0x64, 0x61, 0x67, 0x3b, 0x66, 0x72, 0x65, 0x64, 0x61, 0x67, 0x3b, 0x6c, 0x61, 0x75, 0x72, 0x64, 0x61, 0x67,
-0x3b, 0x73, 0xf8, 0x2e, 0x3b, 0x6d, 0xe5, 0x2e, 0x3b, 0x74, 0x79, 0x2e, 0x3b, 0x6f, 0x6e, 0x2e, 0x3b, 0x74, 0x6f, 0x2e,
-0x3b, 0x66, 0x72, 0x2e, 0x3b, 0x6c, 0x61, 0x2e, 0x3b, 0x43d, 0x435, 0x434, 0x3b, 0x43f, 0x43e, 0x43d, 0x3b, 0x443, 0x442, 0x43e,
-0x3b, 0x441, 0x440, 0x438, 0x3b, 0x447, 0x435, 0x442, 0x3b, 0x43f, 0x435, 0x442, 0x3b, 0x441, 0x443, 0x431, 0x3b, 0x43d, 0x435, 0x434,
-0x435, 0x459, 0x430, 0x3b, 0x43f, 0x43e, 0x43d, 0x435, 0x434, 0x435, 0x459, 0x430, 0x43a, 0x3b, 0x443, 0x442, 0x43e, 0x440, 0x430, 0x43a,
-0x3b, 0x441, 0x440, 0x438, 0x458, 0x435, 0x434, 0x430, 0x3b, 0x447, 0x435, 0x442, 0x432, 0x440, 0x442, 0x430, 0x43a, 0x3b, 0x43f, 0x435,
-0x442, 0x430, 0x43a, 0x3b, 0x441, 0x443, 0x431, 0x43e, 0x442, 0x430, 0x3b, 0x4a, 0x65, 0x64, 0x3b, 0x4a, 0x65, 0x6c, 0x3b, 0x4a,
-0x65, 0x6d, 0x3b, 0x4a, 0x65, 0x72, 0x63, 0x3b, 0x4a, 0x65, 0x72, 0x64, 0x3b, 0x4a, 0x65, 0x68, 0x3b, 0x4a, 0x65, 0x73,
-0x3b, 0x4a, 0x65, 0x64, 0x6f, 0x6f, 0x6e, 0x65, 0x65, 0x3b, 0x4a, 0x65, 0x6c, 0x68, 0x65, 0x69, 0x6e, 0x3b, 0x4a, 0x65,
-0x6d, 0x61, 0x79, 0x72, 0x74, 0x3b, 0x4a, 0x65, 0x72, 0x63, 0x65, 0x61, 0x6e, 0x3b, 0x4a, 0x65, 0x72, 0x64, 0x65, 0x69,
-0x6e, 0x3b, 0x4a, 0x65, 0x68, 0x65, 0x69, 0x6e, 0x65, 0x79, 0x3b, 0x4a, 0x65, 0x73, 0x61, 0x72, 0x6e, 0x3b, 0x53, 0x75,
-0x6c, 0x3b, 0x4c, 0x75, 0x6e, 0x3b, 0x4d, 0x74, 0x68, 0x3b, 0x4d, 0x68, 0x72, 0x3b, 0x59, 0x6f, 0x77, 0x3b, 0x47, 0x77,
-0x65, 0x3b, 0x53, 0x61, 0x64, 0x3b, 0x64, 0x79, 0x20, 0x53, 0x75, 0x6c, 0x3b, 0x64, 0x79, 0x20, 0x4c, 0x75, 0x6e, 0x3b,
-0x64, 0x79, 0x20, 0x4d, 0x65, 0x75, 0x72, 0x74, 0x68, 0x3b, 0x64, 0x79, 0x20, 0x4d, 0x65, 0x72, 0x68, 0x65, 0x72, 0x3b,
-0x64, 0x79, 0x20, 0x59, 0x6f, 0x77, 0x3b, 0x64, 0x79, 0x20, 0x47, 0x77, 0x65, 0x6e, 0x65, 0x72, 0x3b, 0x64, 0x79, 0x20,
-0x53, 0x61, 0x64, 0x6f, 0x72, 0x6e, 0x3b, 0x4b, 0x77, 0x65, 0x3b, 0x44, 0x77, 0x6f, 0x3b, 0x42, 0x65, 0x6e, 0x3b, 0x57,
-0x75, 0x6b, 0x3b, 0x59, 0x61, 0x77, 0x3b, 0x46, 0x69, 0x61, 0x3b, 0x4d, 0x65, 0x6d, 0x3b, 0x4b, 0x77, 0x65, 0x73, 0x69,
-0x64, 0x61, 0x3b, 0x44, 0x77, 0x6f, 0x77, 0x64, 0x61, 0x3b, 0x42, 0x65, 0x6e, 0x61, 0x64, 0x61, 0x3b, 0x57, 0x75, 0x6b,
-0x75, 0x64, 0x61, 0x3b, 0x59, 0x61, 0x77, 0x64, 0x61, 0x3b, 0x46, 0x69, 0x64, 0x61, 0x3b, 0x4d, 0x65, 0x6d, 0x65, 0x6e,
-0x65, 0x64, 0x61, 0x3b, 0x4b, 0x3b, 0x44, 0x3b, 0x42, 0x3b, 0x57, 0x3b, 0x59, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x906, 0x926,
-0x93f, 0x924, 0x94d, 0x92f, 0x935, 0x93e, 0x930, 0x3b, 0x938, 0x94b, 0x92e, 0x935, 0x93e, 0x930, 0x3b, 0x92e, 0x902, 0x917, 0x933, 0x93e,
-0x930, 0x3b, 0x92c, 0x941, 0x927, 0x935, 0x93e, 0x930, 0x3b, 0x917, 0x941, 0x930, 0x941, 0x935, 0x93e, 0x930, 0x3b, 0x936, 0x941, 0x915,
-0x94d, 0x930, 0x935, 0x93e, 0x930, 0x3b, 0x936, 0x928, 0x93f, 0x935, 0x93e, 0x930, 0x3b, 0x1ee4, 0x6b, 0x61, 0x3b, 0x4d, 0x1ecd, 0x6e,
-0x3b, 0x54, 0x69, 0x75, 0x3b, 0x57, 0x65, 0x6e, 0x3b, 0x54, 0x1ecd, 0x1ecd, 0x3b, 0x46, 0x72, 0x61, 0x1ecb, 0x3b, 0x53, 0x61,
-0x74, 0x3b, 0x4d, 0x62, 0x1ecd, 0x73, 0x1ecb, 0x20, 0x1ee4, 0x6b, 0x61, 0x3b, 0x4d, 0x1ecd, 0x6e, 0x64, 0x65, 0x3b, 0x54, 0x69,
-0x75, 0x7a, 0x64, 0x65, 0x65, 0x3b, 0x57, 0x65, 0x6e, 0x65, 0x7a, 0x64, 0x65, 0x65, 0x3b, 0x54, 0x1ecd, 0x1ecd, 0x7a, 0x64,
-0x65, 0x65, 0x3b, 0x46, 0x72, 0x61, 0x1ecb, 0x64, 0x65, 0x65, 0x3b, 0x53, 0x61, 0x74, 0x1ecd, 0x64, 0x65, 0x65, 0x3b, 0x57,
-0x6b, 0x79, 0x3b, 0x57, 0x6b, 0x77, 0x3b, 0x57, 0x6b, 0x6c, 0x3b, 0x57, 0x74, 0x169, 0x3b, 0x57, 0x6b, 0x6e, 0x3b, 0x57,
-0x74, 0x6e, 0x3b, 0x57, 0x74, 0x68, 0x3b, 0x57, 0x61, 0x20, 0x6b, 0x79, 0x75, 0x6d, 0x77, 0x61, 0x3b, 0x57, 0x61, 0x20,
-0x6b, 0x77, 0x61, 0x6d, 0x62, 0x129, 0x6c, 0x129, 0x6c, 0x79, 0x61, 0x3b, 0x57, 0x61, 0x20, 0x6b, 0x65, 0x6c, 0x129, 0x3b,
-0x57, 0x61, 0x20, 0x6b, 0x61, 0x74, 0x61, 0x74, 0x169, 0x3b, 0x57, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x57, 0x61,
-0x20, 0x6b, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x57, 0x61, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x74, 0x68, 0x61, 0x74, 0x169,
-0x3b, 0x59, 0x3b, 0x57, 0x3b, 0x45, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x64, 0x6f, 0x6d, 0x3b, 0x6c,
-0x75, 0x6e, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x6d, 0x69, 0x65, 0x3b, 0x6a, 0x6f, 0x69, 0x3b, 0x76, 0x69, 0x6e, 0x3b, 0x73,
-0x61, 0x62, 0x3b, 0x64, 0x6f, 0x6d, 0x65, 0x6e, 0x69, 0x65, 0x3b, 0x6c, 0x75, 0x6e, 0x69, 0x73, 0x3b, 0x6d, 0x61, 0x72,
-0x74, 0x61, 0x72, 0x73, 0x3b, 0x6d, 0x69, 0x65, 0x72, 0x63, 0x75, 0x73, 0x3b, 0x6a, 0x6f, 0x69, 0x62, 0x65, 0x3b, 0x76,
-0x69, 0x6e, 0x61, 0x72, 0x73, 0x3b, 0x73, 0x61, 0x62, 0x69, 0x64, 0x65, 0x3b, 0x6b, 0x254, 0x73, 0x3b, 0x64, 0x7a, 0x6f,
-0x3b, 0x62, 0x6c, 0x61, 0x3b, 0x6b, 0x75, 0x256, 0x3b, 0x79, 0x61, 0x77, 0x3b, 0x66, 0x69, 0x256, 0x3b, 0x6d, 0x65, 0x6d,
-0x3b, 0x6b, 0x254, 0x73, 0x69, 0x256, 0x61, 0x3b, 0x64, 0x7a, 0x6f, 0x256, 0x61, 0x3b, 0x62, 0x6c, 0x61, 0x256, 0x61, 0x3b,
-0x6b, 0x75, 0x256, 0x61, 0x3b, 0x79, 0x61, 0x77, 0x6f, 0x256, 0x61, 0x3b, 0x66, 0x69, 0x256, 0x61, 0x3b, 0x6d, 0x65, 0x6d,
-0x6c, 0x65, 0x256, 0x61, 0x3b, 0x6b, 0x3b, 0x64, 0x3b, 0x62, 0x3b, 0x6b, 0x3b, 0x79, 0x3b, 0x66, 0x3b, 0x6d, 0x3b, 0x4c,
-0x50, 0x3b, 0x50, 0x31, 0x3b, 0x50, 0x32, 0x3b, 0x50, 0x33, 0x3b, 0x50, 0x34, 0x3b, 0x50, 0x35, 0x3b, 0x50, 0x36, 0x3b,
-0x4c, 0x101, 0x70, 0x75, 0x6c, 0x65, 0x3b, 0x50, 0x6f, 0x2bb, 0x61, 0x6b, 0x61, 0x68, 0x69, 0x3b, 0x50, 0x6f, 0x2bb, 0x61,
-0x6c, 0x75, 0x61, 0x3b, 0x50, 0x6f, 0x2bb, 0x61, 0x6b, 0x6f, 0x6c, 0x75, 0x3b, 0x50, 0x6f, 0x2bb, 0x61, 0x68, 0x101, 0x3b,
-0x50, 0x6f, 0x2bb, 0x61, 0x6c, 0x69, 0x6d, 0x61, 0x3b, 0x50, 0x6f, 0x2bb, 0x61, 0x6f, 0x6e, 0x6f, 0x3b, 0x4c, 0x69, 0x6e,
-0x3b, 0x4c, 0x75, 0x6e, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x4d, 0x69, 0x79, 0x3b, 0x48, 0x75, 0x77, 0x3b, 0x42, 0x69, 0x79,
-0x3b, 0x53, 0x61, 0x62, 0x3b, 0x4c, 0x69, 0x6e, 0x67, 0x67, 0x6f, 0x3b, 0x4c, 0x75, 0x6e, 0x65, 0x73, 0x3b, 0x4d, 0x61,
-0x72, 0x74, 0x65, 0x73, 0x3b, 0x4d, 0x69, 0x79, 0x65, 0x72, 0x6b, 0x75, 0x6c, 0x65, 0x73, 0x3b, 0x48, 0x75, 0x77, 0x65,
-0x62, 0x65, 0x73, 0x3b, 0x42, 0x69, 0x79, 0x65, 0x72, 0x6e, 0x65, 0x73, 0x3b, 0x53, 0x61, 0x62, 0x61, 0x64, 0x6f, 0x3b,
-0x53, 0x75, 0x2e, 0x3b, 0x4d, 0xe4, 0x2e, 0x3b, 0x5a, 0x69, 0x2e, 0x3b, 0x4d, 0x69, 0x2e, 0x3b, 0x44, 0x75, 0x2e, 0x3b,
-0x46, 0x72, 0x2e, 0x3b, 0x53, 0x61, 0x2e, 0x3b, 0x53, 0x75, 0x6e, 0x6e, 0x74, 0x69, 0x67, 0x3b, 0x4d, 0xe4, 0xe4, 0x6e,
-0x74, 0x69, 0x67, 0x3b, 0x5a, 0x69, 0x69, 0x73, 0x63, 0x68, 0x74, 0x69, 0x67, 0x3b, 0x4d, 0x69, 0x74, 0x74, 0x77, 0x75,
-0x63, 0x68, 0x3b, 0x44, 0x75, 0x6e, 0x73, 0x63, 0x68, 0x74, 0x69, 0x67, 0x3b, 0x46, 0x72, 0x69, 0x69, 0x74, 0x69, 0x67,
-0x3b, 0x53, 0x61, 0x6d, 0x73, 0x63, 0x68, 0x74, 0x69, 0x67, 0x3b, 0xa46d, 0xa18f, 0x3b, 0xa18f, 0xa2cd, 0x3b, 0xa18f, 0xa44d, 0x3b,
-0xa18f, 0xa315, 0x3b, 0xa18f, 0xa1d6, 0x3b, 0xa18f, 0xa26c, 0x3b, 0xa18f, 0xa0d8, 0x3b, 0xa46d, 0xa18f, 0xa44d, 0x3b, 0xa18f, 0xa282, 0xa2cd, 0x3b,
-0xa18f, 0xa282, 0xa44d, 0x3b, 0xa18f, 0xa282, 0xa315, 0x3b, 0xa18f, 0xa282, 0xa1d6, 0x3b, 0xa18f, 0xa282, 0xa26c, 0x3b, 0xa18f, 0xa282, 0xa0d8, 0x3b,
-0xa18f, 0x3b, 0xa2cd, 0x3b, 0xa44d, 0x3b, 0xa315, 0x3b, 0xa1d6, 0x3b, 0xa26c, 0x3b, 0xa0d8, 0x3b, 0x53, 0xfc, 0x2e, 0x3b, 0x4d, 0x61,
-0x2e, 0x3b, 0x44, 0x69, 0x2e, 0x3b, 0x4d, 0x69, 0x2e, 0x3b, 0x44, 0x75, 0x2e, 0x3b, 0x46, 0x72, 0x2e, 0x3b, 0x53, 0x61,
-0x2e, 0x3b, 0x53, 0xfc, 0x6e, 0x6e, 0x64, 0x61, 0x67, 0x3b, 0x4d, 0x61, 0x61, 0x6e, 0x64, 0x61, 0x67, 0x3b, 0x44, 0x69,
-0x6e, 0x67, 0x73, 0x64, 0x61, 0x67, 0x3b, 0x4d, 0x69, 0x64, 0x64, 0x65, 0x77, 0x65, 0x6b, 0x65, 0x6e, 0x3b, 0x44, 0x75,
-0x6e, 0x6e, 0x65, 0x72, 0x73, 0x64, 0x61, 0x67, 0x3b, 0x46, 0x72, 0x65, 0x65, 0x64, 0x61, 0x67, 0x3b, 0x53, 0xfc, 0x6e,
-0x6e, 0x61, 0x76, 0x65, 0x6e, 0x64, 0x3b, 0x73, 0x6f, 0x74, 0x6e, 0x3b, 0x76, 0x75, 0x6f, 0x73, 0x3b, 0x6d, 0x61, 0x14b,
-0x3b, 0x67, 0x61, 0x73, 0x6b, 0x3b, 0x64, 0x75, 0x6f, 0x72, 0x3b, 0x62, 0x65, 0x61, 0x72, 0x3b, 0x6c, 0xe1, 0x76, 0x3b,
-0x73, 0x6f, 0x74, 0x6e, 0x61, 0x62, 0x65, 0x61, 0x69, 0x76, 0x69, 0x3b, 0x76, 0x75, 0x6f, 0x73, 0x73, 0xe1, 0x72, 0x67,
-0x61, 0x3b, 0x6d, 0x61, 0x14b, 0x14b, 0x65, 0x62, 0xe1, 0x72, 0x67, 0x61, 0x3b, 0x67, 0x61, 0x73, 0x6b, 0x61, 0x76, 0x61,
-0x68, 0x6b, 0x6b, 0x75, 0x3b, 0x64, 0x75, 0x6f, 0x72, 0x61, 0x73, 0x64, 0x61, 0x74, 0x3b, 0x62, 0x65, 0x61, 0x72, 0x6a,
-0x61, 0x64, 0x61, 0x74, 0x3b, 0x6c, 0xe1, 0x76, 0x76, 0x61, 0x72, 0x64, 0x61, 0x74, 0x3b, 0x53, 0x3b, 0x56, 0x3b, 0x4d,
-0x3b, 0x47, 0x3b, 0x44, 0x3b, 0x42, 0x3b, 0x4c, 0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0x44, 0x3b, 0x47, 0x3b, 0x44, 0x3b, 0x42,
-0x3b, 0x4c, 0x3b, 0x73, 0x6f, 0x74, 0x6e, 0x61, 0x62, 0x65, 0x61, 0x69, 0x76, 0x69, 0x3b, 0x76, 0x75, 0x6f, 0x73, 0x73,
-0xe1, 0x72, 0x67, 0x67, 0x61, 0x3b, 0x6d, 0x61, 0x14b, 0x14b, 0x65, 0x62, 0xe1, 0x72, 0x67, 0x67, 0x61, 0x3b, 0x67, 0x61,
-0x73, 0x6b, 0x61, 0x76, 0x61, 0x68, 0x6b, 0x75, 0x3b, 0x64, 0x75, 0x6f, 0x72, 0x61, 0x73, 0x74, 0x61, 0x67, 0x61, 0x3b,
-0x62, 0x65, 0x61, 0x72, 0x6a, 0x61, 0x64, 0x61, 0x67, 0x61, 0x3b, 0x6c, 0xe1, 0x76, 0x76, 0x61, 0x72, 0x64, 0x61, 0x67,
-0x61, 0x3b, 0x43, 0x70, 0x72, 0x3b, 0x43, 0x74, 0x74, 0x3b, 0x43, 0x6d, 0x6e, 0x3b, 0x43, 0x6d, 0x74, 0x3b, 0x41, 0x72,
-0x73, 0x3b, 0x49, 0x63, 0x6d, 0x3b, 0x45, 0x73, 0x74, 0x3b, 0x43, 0x68, 0x75, 0x6d, 0x61, 0x70, 0x69, 0x72, 0x69, 0x3b,
-0x43, 0x68, 0x75, 0x6d, 0x61, 0x74, 0x61, 0x74, 0x6f, 0x3b, 0x43, 0x68, 0x75, 0x6d, 0x61, 0x69, 0x6e, 0x65, 0x3b, 0x43,
-0x68, 0x75, 0x6d, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x41, 0x72, 0x61, 0x6d, 0x69, 0x73, 0x69, 0x3b, 0x49, 0x63, 0x68,
-0x75, 0x6d, 0x61, 0x3b, 0x45, 0x73, 0x61, 0x62, 0x61, 0x74, 0x6f, 0x3b, 0x43, 0x3b, 0x43, 0x3b, 0x43, 0x3b, 0x43, 0x3b,
-0x41, 0x3b, 0x49, 0x3b, 0x45, 0x3b, 0x4a, 0x75, 0x6d, 0x3b, 0x4a, 0x69, 0x6d, 0x3b, 0x4b, 0x61, 0x77, 0x3b, 0x4b, 0x61,
-0x64, 0x3b, 0x4b, 0x61, 0x6e, 0x3b, 0x4b, 0x61, 0x73, 0x3b, 0x4e, 0x67, 0x75, 0x3b, 0x49, 0x74, 0x75, 0x6b, 0x75, 0x20,
-0x6a, 0x61, 0x20, 0x6a, 0x75, 0x6d, 0x77, 0x61, 0x3b, 0x4b, 0x75, 0x72, 0x61, 0x6d, 0x75, 0x6b, 0x61, 0x20, 0x6a, 0x69,
-0x6d, 0x77, 0x65, 0x72, 0x69, 0x3b, 0x4b, 0x75, 0x72, 0x61, 0x6d, 0x75, 0x6b, 0x61, 0x20, 0x6b, 0x61, 0x77, 0x69, 0x3b,
-0x4b, 0x75, 0x72, 0x61, 0x6d, 0x75, 0x6b, 0x61, 0x20, 0x6b, 0x61, 0x64, 0x61, 0x64, 0x75, 0x3b, 0x4b, 0x75, 0x72, 0x61,
-0x6d, 0x75, 0x6b, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4b, 0x75, 0x72, 0x61, 0x6d, 0x75, 0x6b, 0x61, 0x20, 0x6b,
-0x61, 0x73, 0x61, 0x6e, 0x75, 0x3b, 0x4b, 0x69, 0x66, 0x75, 0x6c, 0x61, 0x20, 0x6e, 0x67, 0x75, 0x77, 0x6f, 0x3b, 0x4a,
-0x3b, 0x4a, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4e, 0x3b, 0x64, 0x65, 0x77, 0x3b, 0x61, 0x61, 0x253,
-0x3b, 0x6d, 0x61, 0x77, 0x3b, 0x6e, 0x6a, 0x65, 0x3b, 0x6e, 0x61, 0x61, 0x3b, 0x6d, 0x77, 0x64, 0x3b, 0x68, 0x62, 0x69,
-0x3b, 0x64, 0x65, 0x77, 0x6f, 0x3b, 0x61, 0x61, 0x253, 0x6e, 0x64, 0x65, 0x3b, 0x6d, 0x61, 0x77, 0x62, 0x61, 0x61, 0x72,
-0x65, 0x3b, 0x6e, 0x6a, 0x65, 0x73, 0x6c, 0x61, 0x61, 0x72, 0x65, 0x3b, 0x6e, 0x61, 0x61, 0x73, 0x61, 0x61, 0x6e, 0x64,
-0x65, 0x3b, 0x6d, 0x61, 0x77, 0x6e, 0x64, 0x65, 0x3b, 0x68, 0x6f, 0x6f, 0x72, 0x65, 0x2d, 0x62, 0x69, 0x69, 0x72, 0x3b,
-0x64, 0x3b, 0x61, 0x3b, 0x6d, 0x3b, 0x6e, 0x3b, 0x6e, 0x3b, 0x6d, 0x3b, 0x68, 0x3b, 0x4b, 0x4d, 0x41, 0x3b, 0x4e, 0x54,
-0x54, 0x3b, 0x4e, 0x4d, 0x4e, 0x3b, 0x4e, 0x4d, 0x54, 0x3b, 0x41, 0x52, 0x54, 0x3b, 0x4e, 0x4d, 0x41, 0x3b, 0x4e, 0x4d,
-0x4d, 0x3b, 0x4b, 0x69, 0x75, 0x6d, 0x69, 0x61, 0x3b, 0x4e, 0x6a, 0x75, 0x6d, 0x61, 0x74, 0x61, 0x74, 0x169, 0x3b, 0x4e,
-0x6a, 0x75, 0x6d, 0x61, 0x69, 0x6e, 0x65, 0x3b, 0x4e, 0x6a, 0x75, 0x6d, 0x61, 0x74, 0x61, 0x6e, 0x61, 0x3b, 0x41, 0x72,
-0x61, 0x6d, 0x69, 0x74, 0x68, 0x69, 0x3b, 0x4e, 0x6a, 0x75, 0x6d, 0x61, 0x61, 0x3b, 0x4e, 0x6a, 0x75, 0x6d, 0x61, 0x6d,
-0x6f, 0x74, 0x68, 0x69, 0x3b, 0x4b, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x41, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x41,
-0x72, 0x65, 0x3b, 0x4b, 0x75, 0x6e, 0x3b, 0x4f, 0x6e, 0x67, 0x3b, 0x49, 0x6e, 0x65, 0x3b, 0x49, 0x6c, 0x65, 0x3b, 0x53,
-0x61, 0x70, 0x3b, 0x4b, 0x77, 0x65, 0x3b, 0x4d, 0x64, 0x65, 0x72, 0x6f, 0x74, 0x20, 0x65, 0x65, 0x20, 0x61, 0x72, 0x65,
-0x3b, 0x4d, 0x64, 0x65, 0x72, 0x6f, 0x74, 0x20, 0x65, 0x65, 0x20, 0x6b, 0x75, 0x6e, 0x69, 0x3b, 0x4d, 0x64, 0x65, 0x72,
-0x6f, 0x74, 0x20, 0x65, 0x65, 0x20, 0x6f, 0x6e, 0x67, 0x2019, 0x77, 0x61, 0x6e, 0x3b, 0x4d, 0x64, 0x65, 0x72, 0x6f, 0x74,
-0x20, 0x65, 0x65, 0x20, 0x69, 0x6e, 0x65, 0x74, 0x3b, 0x4d, 0x64, 0x65, 0x72, 0x6f, 0x74, 0x20, 0x65, 0x65, 0x20, 0x69,
-0x6c, 0x65, 0x3b, 0x4d, 0x64, 0x65, 0x72, 0x6f, 0x74, 0x20, 0x65, 0x65, 0x20, 0x73, 0x61, 0x70, 0x61, 0x3b, 0x4d, 0x64,
-0x65, 0x72, 0x6f, 0x74, 0x20, 0x65, 0x65, 0x20, 0x6b, 0x77, 0x65, 0x3b, 0x41, 0x3b, 0x4b, 0x3b, 0x4f, 0x3b, 0x49, 0x3b,
-0x49, 0x3b, 0x53, 0x3b, 0x4b, 0x3b, 0x44, 0x69, 0x6d, 0x3b, 0x50, 0x6f, 0x73, 0x3b, 0x50, 0x69, 0x72, 0x3b, 0x54, 0x61,
-0x74, 0x3b, 0x4e, 0x61, 0x69, 0x3b, 0x53, 0x68, 0x61, 0x3b, 0x53, 0x61, 0x62, 0x3b, 0x44, 0x69, 0x6d, 0x69, 0x6e, 0x67,
-0x75, 0x3b, 0x43, 0x68, 0x69, 0x70, 0x6f, 0x73, 0x69, 0x3b, 0x43, 0x68, 0x69, 0x70, 0x69, 0x72, 0x69, 0x3b, 0x43, 0x68,
-0x69, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x43, 0x68, 0x69, 0x6e, 0x61, 0x69, 0x3b, 0x43, 0x68, 0x69, 0x73, 0x68, 0x61, 0x6e,
-0x75, 0x3b, 0x53, 0x61, 0x62, 0x75, 0x64, 0x75, 0x3b, 0x44, 0x3b, 0x50, 0x3b, 0x43, 0x3b, 0x54, 0x3b, 0x4e, 0x3b, 0x53,
-0x3b, 0x53, 0x3b, 0x53, 0x6f, 0x6e, 0x3b, 0x4d, 0x76, 0x75, 0x3b, 0x53, 0x69, 0x62, 0x3b, 0x53, 0x69, 0x74, 0x3b, 0x53,
-0x69, 0x6e, 0x3b, 0x53, 0x69, 0x68, 0x3b, 0x4d, 0x67, 0x71, 0x3b, 0x53, 0x6f, 0x6e, 0x74, 0x6f, 0x3b, 0x4d, 0x76, 0x75,
-0x6c, 0x6f, 0x3b, 0x53, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x3b, 0x53, 0x69, 0x74, 0x68, 0x61, 0x74, 0x68, 0x75, 0x3b, 0x53,
-0x69, 0x6e, 0x65, 0x3b, 0x53, 0x69, 0x68, 0x6c, 0x61, 0x6e, 0x75, 0x3b, 0x4d, 0x67, 0x71, 0x69, 0x62, 0x65, 0x6c, 0x6f,
-0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0x49, 0x6a, 0x70, 0x3b, 0x49,
-0x6a, 0x74, 0x3b, 0x49, 0x6a, 0x6e, 0x3b, 0x49, 0x6a, 0x74, 0x6e, 0x3b, 0x41, 0x6c, 0x68, 0x3b, 0x49, 0x6a, 0x75, 0x3b,
-0x49, 0x6a, 0x6d, 0x3b, 0x49, 0x6a, 0x75, 0x6d, 0x61, 0x70, 0x69, 0x6c, 0x69, 0x3b, 0x49, 0x6a, 0x75, 0x6d, 0x61, 0x74,
-0x61, 0x74, 0x75, 0x3b, 0x49, 0x6a, 0x75, 0x6d, 0x61, 0x6e, 0x6e, 0x65, 0x3b, 0x49, 0x6a, 0x75, 0x6d, 0x61, 0x74, 0x61,
-0x6e, 0x6f, 0x3b, 0x41, 0x6c, 0x68, 0x61, 0x6d, 0x69, 0x73, 0x69, 0x3b, 0x49, 0x6a, 0x75, 0x6d, 0x61, 0x61, 0x3b, 0x49,
-0x6a, 0x75, 0x6d, 0x61, 0x6d, 0x6f, 0x73, 0x69, 0x3b, 0x32, 0x3b, 0x33, 0x3b, 0x34, 0x3b, 0x35, 0x3b, 0x36, 0x3b, 0x37,
-0x3b, 0x31, 0x3b, 0x2d30, 0x2d59, 0x2d30, 0x3b, 0x2d30, 0x2d62, 0x2d4f, 0x3b, 0x2d30, 0x2d59, 0x2d49, 0x3b, 0x2d30, 0x2d3d, 0x2d55, 0x3b, 0x2d30,
-0x2d3d, 0x2d61, 0x3b, 0x2d30, 0x2d59, 0x2d49, 0x2d4e, 0x3b, 0x2d30, 0x2d59, 0x2d49, 0x2d39, 0x3b, 0x2d30, 0x2d59, 0x2d30, 0x2d4e, 0x2d30, 0x2d59, 0x3b,
-0x2d30, 0x2d62, 0x2d4f, 0x2d30, 0x2d59, 0x3b, 0x2d30, 0x2d59, 0x2d49, 0x2d4f, 0x2d30, 0x2d59, 0x3b, 0x2d30, 0x2d3d, 0x2d55, 0x2d30, 0x2d59, 0x3b, 0x2d30,
-0x2d3d, 0x2d61, 0x2d30, 0x2d59, 0x3b, 0x2d59, 0x2d49, 0x2d4e, 0x2d61, 0x2d30, 0x2d59, 0x3b, 0x2d30, 0x2d59, 0x2d49, 0x2d39, 0x2d62, 0x2d30, 0x2d59, 0x3b,
-0x61, 0x73, 0x61, 0x3b, 0x61, 0x79, 0x6e, 0x3b, 0x61, 0x73, 0x69, 0x3b, 0x61, 0x6b, 0x1e5b, 0x3b, 0x61, 0x6b, 0x77, 0x3b,
-0x61, 0x73, 0x69, 0x6d, 0x3b, 0x61, 0x73, 0x69, 0x1e0d, 0x3b, 0x61, 0x73, 0x61, 0x6d, 0x61, 0x73, 0x3b, 0x61, 0x79, 0x6e,
-0x61, 0x73, 0x3b, 0x61, 0x73, 0x69, 0x6e, 0x61, 0x73, 0x3b, 0x61, 0x6b, 0x1e5b, 0x61, 0x73, 0x3b, 0x61, 0x6b, 0x77, 0x61,
-0x73, 0x3b, 0x61, 0x73, 0x69, 0x6d, 0x77, 0x61, 0x73, 0x3b, 0x61, 0x73, 0x69, 0x1e0d, 0x79, 0x61, 0x73, 0x3b, 0x59, 0x61,
-0x6e, 0x3b, 0x53, 0x61, 0x6e, 0x3b, 0x4b, 0x72, 0x61, 0x1e0d, 0x3b, 0x4b, 0x75, 0x1e93, 0x3b, 0x53, 0x61, 0x6d, 0x3b, 0x53,
-0x1e0d, 0x69, 0x73, 0x3b, 0x53, 0x61, 0x79, 0x3b, 0x59, 0x61, 0x6e, 0x61, 0x73, 0x73, 0x3b, 0x53, 0x61, 0x6e, 0x61, 0x73,
-0x73, 0x3b, 0x4b, 0x72, 0x61, 0x1e0d, 0x61, 0x73, 0x73, 0x3b, 0x4b, 0x75, 0x1e93, 0x61, 0x73, 0x73, 0x3b, 0x53, 0x61, 0x6d,
-0x61, 0x73, 0x73, 0x3b, 0x53, 0x1e0d, 0x69, 0x73, 0x61, 0x73, 0x73, 0x3b, 0x53, 0x61, 0x79, 0x61, 0x73, 0x73, 0x3b, 0x59,
-0x3b, 0x53, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x53, 0x41, 0x4e, 0x3b, 0x4f, 0x52, 0x4b,
-0x3b, 0x4f, 0x4b, 0x42, 0x3b, 0x4f, 0x4b, 0x53, 0x3b, 0x4f, 0x4b, 0x4e, 0x3b, 0x4f, 0x4b, 0x54, 0x3b, 0x4f, 0x4d, 0x4b,
-0x3b, 0x53, 0x61, 0x6e, 0x64, 0x65, 0x3b, 0x4f, 0x72, 0x77, 0x6f, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x7a, 0x61, 0x3b, 0x4f,
-0x72, 0x77, 0x61, 0x6b, 0x61, 0x62, 0x69, 0x72, 0x69, 0x3b, 0x4f, 0x72, 0x77, 0x61, 0x6b, 0x61, 0x73, 0x68, 0x61, 0x74,
-0x75, 0x3b, 0x4f, 0x72, 0x77, 0x61, 0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4f, 0x72, 0x77, 0x61, 0x6b, 0x61, 0x74, 0x61, 0x61,
-0x6e, 0x6f, 0x3b, 0x4f, 0x72, 0x77, 0x61, 0x6d, 0x75, 0x6b, 0x61, 0x61, 0x67, 0x61, 0x3b, 0x53, 0x3b, 0x4b, 0x3b, 0x52,
-0x3b, 0x53, 0x3b, 0x4e, 0x3b, 0x54, 0x3b, 0x4d, 0x3b, 0x4d, 0x75, 0x6c, 0x3b, 0x56, 0x69, 0x6c, 0x3b, 0x48, 0x69, 0x76,
-0x3b, 0x48, 0x69, 0x64, 0x3b, 0x48, 0x69, 0x74, 0x3b, 0x48, 0x69, 0x68, 0x3b, 0x4c, 0x65, 0x6d, 0x3b, 0x70, 0x61, 0x20,
-0x6d, 0x75, 0x6c, 0x75, 0x6e, 0x67, 0x75, 0x3b, 0x70, 0x61, 0x20, 0x73, 0x68, 0x61, 0x68, 0x75, 0x76, 0x69, 0x6c, 0x75,
-0x68, 0x61, 0x3b, 0x70, 0x61, 0x20, 0x68, 0x69, 0x76, 0x69, 0x6c, 0x69, 0x3b, 0x70, 0x61, 0x20, 0x68, 0x69, 0x64, 0x61,
-0x74, 0x75, 0x3b, 0x70, 0x61, 0x20, 0x68, 0x69, 0x74, 0x61, 0x79, 0x69, 0x3b, 0x70, 0x61, 0x20, 0x68, 0x69, 0x68, 0x61,
-0x6e, 0x75, 0x3b, 0x70, 0x61, 0x20, 0x73, 0x68, 0x61, 0x68, 0x75, 0x6c, 0x65, 0x6d, 0x62, 0x65, 0x6c, 0x61, 0x3b, 0x4d,
-0x3b, 0x4a, 0x3b, 0x48, 0x3b, 0x48, 0x3b, 0x48, 0x3b, 0x57, 0x3b, 0x4a, 0x3b, 0x4a, 0x70, 0x69, 0x3b, 0x4a, 0x74, 0x74,
-0x3b, 0x4a, 0x6e, 0x6e, 0x3b, 0x4a, 0x74, 0x6e, 0x3b, 0x41, 0x6c, 0x68, 0x3b, 0x49, 0x6a, 0x75, 0x3b, 0x4a, 0x6d, 0x6f,
-0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x70, 0x69, 0x6c, 0x79, 0x69, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x74, 0x61, 0x74, 0x75, 0x75,
-0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x6e, 0x6e, 0x65, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x74, 0x61, 0x6e, 0x75, 0x3b, 0x41, 0x6c,
-0x68, 0x61, 0x6d, 0x69, 0x73, 0x69, 0x3b, 0x49, 0x6a, 0x75, 0x6d, 0x61, 0x61, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x6d, 0x6f,
-0x73, 0x69, 0x3b, 0x4a, 0x3b, 0x4a, 0x3b, 0x4a, 0x3b, 0x4a, 0x3b, 0x41, 0x3b, 0x49, 0x3b, 0x4a, 0x3b, 0x6b, 0x61, 0x72,
-0x3b, 0x6e, 0x74, 0x25b, 0x3b, 0x74, 0x61, 0x72, 0x3b, 0x61, 0x72, 0x61, 0x3b, 0x61, 0x6c, 0x61, 0x3b, 0x6a, 0x75, 0x6d,
-0x3b, 0x73, 0x69, 0x62, 0x3b, 0x6b, 0x61, 0x72, 0x69, 0x3b, 0x6e, 0x74, 0x25b, 0x6e, 0x25b, 0x3b, 0x74, 0x61, 0x72, 0x61,
-0x74, 0x61, 0x3b, 0x61, 0x72, 0x61, 0x62, 0x61, 0x3b, 0x61, 0x6c, 0x61, 0x6d, 0x69, 0x73, 0x61, 0x3b, 0x6a, 0x75, 0x6d,
-0x61, 0x3b, 0x73, 0x69, 0x62, 0x69, 0x72, 0x69, 0x3b, 0x4b, 0x3b, 0x4e, 0x3b, 0x54, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x4a,
-0x3b, 0x53, 0x3b, 0x4b, 0x6d, 0x61, 0x3b, 0x54, 0x61, 0x74, 0x3b, 0x49, 0x6e, 0x65, 0x3b, 0x54, 0x61, 0x6e, 0x3b, 0x41,
-0x72, 0x6d, 0x3b, 0x4d, 0x61, 0x61, 0x3b, 0x4e, 0x4d, 0x4d, 0x3b, 0x4b, 0x69, 0x75, 0x6d, 0x69, 0x61, 0x3b, 0x4e, 0x6a,
-0x75, 0x6d, 0x61, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x4e, 0x6a, 0x75, 0x6d, 0x61, 0x69, 0x6e, 0x65, 0x3b, 0x4e, 0x6a, 0x75,
-0x6d, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x41, 0x72, 0x61, 0x6d, 0x69, 0x74, 0x68, 0x69, 0x3b, 0x4e, 0x6a, 0x75, 0x6d,
-0x61, 0x61, 0x3b, 0x4e, 0x4a, 0x75, 0x6d, 0x61, 0x6d, 0x6f, 0x74, 0x68, 0x69, 0x69, 0x3b, 0x4b, 0x3b, 0x4e, 0x3b, 0x4e,
-0x3b, 0x4e, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x13c6, 0x13cd, 0x13ac, 0x3b, 0x13c9, 0x13c5, 0x13af, 0x3b, 0x13d4, 0x13b5, 0x13c1,
-0x3b, 0x13e6, 0x13a2, 0x13c1, 0x3b, 0x13c5, 0x13a9, 0x13c1, 0x3b, 0x13e7, 0x13be, 0x13a9, 0x3b, 0x13c8, 0x13d5, 0x13be, 0x3b, 0x13a4, 0x13be, 0x13d9,
-0x13d3, 0x13c6, 0x13cd, 0x13ac, 0x3b, 0x13a4, 0x13be, 0x13d9, 0x13d3, 0x13c9, 0x13c5, 0x13af, 0x3b, 0x13d4, 0x13b5, 0x13c1, 0x13a2, 0x13a6, 0x3b, 0x13e6,
-0x13a2, 0x13c1, 0x13a2, 0x13a6, 0x3b, 0x13c5, 0x13a9, 0x13c1, 0x13a2, 0x13a6, 0x3b, 0x13e7, 0x13be, 0x13a9, 0x13b6, 0x13cd, 0x13d7, 0x3b, 0x13a4, 0x13be,
-0x13d9, 0x13d3, 0x13c8, 0x13d5, 0x13be, 0x3b, 0x13c6, 0x3b, 0x13c9, 0x3b, 0x13d4, 0x3b, 0x13e6, 0x3b, 0x13c5, 0x3b, 0x13e7, 0x3b, 0x13a4, 0x3b,
-0x64, 0x69, 0x6d, 0x3b, 0x6c, 0x69, 0x6e, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x6d, 0x65, 0x72, 0x3b, 0x7a, 0x65, 0x3b, 0x76,
-0x61, 0x6e, 0x3b, 0x73, 0x61, 0x6d, 0x3b, 0x64, 0x69, 0x6d, 0x61, 0x6e, 0x73, 0x3b, 0x6c, 0x69, 0x6e, 0x64, 0x69, 0x3b,
-0x6d, 0x61, 0x72, 0x64, 0x69, 0x3b, 0x6d, 0x65, 0x72, 0x6b, 0x72, 0x65, 0x64, 0x69, 0x3b, 0x7a, 0x65, 0x64, 0x69, 0x3b,
-0x76, 0x61, 0x6e, 0x64, 0x72, 0x65, 0x64, 0x69, 0x3b, 0x73, 0x61, 0x6d, 0x64, 0x69, 0x3b, 0x64, 0x3b, 0x6c, 0x3b, 0x6d,
-0x3b, 0x6d, 0x3b, 0x7a, 0x3b, 0x76, 0x3b, 0x73, 0x3b, 0x4c, 0x6c, 0x32, 0x3b, 0x4c, 0x6c, 0x33, 0x3b, 0x4c, 0x6c, 0x34,
-0x3b, 0x4c, 0x6c, 0x35, 0x3b, 0x4c, 0x6c, 0x36, 0x3b, 0x4c, 0x6c, 0x37, 0x3b, 0x4c, 0x6c, 0x31, 0x3b, 0x4c, 0x69, 0x64,
-0x75, 0x76, 0x61, 0x20, 0x6c, 0x79, 0x61, 0x70, 0x69, 0x6c, 0x69, 0x3b, 0x4c, 0x69, 0x64, 0x75, 0x76, 0x61, 0x20, 0x6c,
-0x79, 0x61, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x4c, 0x69, 0x64, 0x75, 0x76, 0x61, 0x20, 0x6c, 0x79, 0x61, 0x6e, 0x63, 0x68,
-0x65, 0x63, 0x68, 0x69, 0x3b, 0x4c, 0x69, 0x64, 0x75, 0x76, 0x61, 0x20, 0x6c, 0x79, 0x61, 0x6e, 0x6e, 0x79, 0x61, 0x6e,
-0x6f, 0x3b, 0x4c, 0x69, 0x64, 0x75, 0x76, 0x61, 0x20, 0x6c, 0x79, 0x61, 0x6e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e,
-0x61, 0x20, 0x6c, 0x69, 0x6e, 0x6a, 0x69, 0x3b, 0x4c, 0x69, 0x64, 0x75, 0x76, 0x61, 0x20, 0x6c, 0x79, 0x61, 0x6e, 0x6e,
-0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x6d, 0x61, 0x76, 0x69, 0x6c, 0x69, 0x3b, 0x4c, 0x69, 0x64, 0x75, 0x76,
-0x61, 0x20, 0x6c, 0x69, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x3b, 0x50, 0xed, 0x69, 0x6c, 0x69, 0x3b, 0x54, 0xe1, 0x61, 0x74,
-0x75, 0x3b, 0xcd, 0x6e, 0x65, 0x3b, 0x54, 0xe1, 0x61, 0x6e, 0x6f, 0x3b, 0x41, 0x6c, 0x68, 0x3b, 0x49, 0x6a, 0x6d, 0x3b,
-0x4d, 0xf3, 0x6f, 0x73, 0x69, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x70, 0xed, 0x69, 0x72, 0x69, 0x3b, 0x4a, 0x75, 0x6d, 0x61,
-0x74, 0xe1, 0x74, 0x75, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0xed, 0x6e, 0x65, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x74, 0xe1, 0x61,
-0x6e, 0x6f, 0x3b, 0x41, 0x6c, 0x61, 0x6d, 0xed, 0x69, 0x73, 0x69, 0x3b, 0x49, 0x6a, 0x75, 0x6d, 0xe1, 0x61, 0x3b, 0x4a,
-0x75, 0x6d, 0x61, 0x6d, 0xf3, 0x6f, 0x73, 0x69, 0x3b, 0x50, 0x3b, 0x54, 0x3b, 0x45, 0x3b, 0x4f, 0x3b, 0x41, 0x3b, 0x49,
-0x3b, 0x4d, 0x3b, 0x53, 0x61, 0x62, 0x3b, 0x42, 0x61, 0x6c, 0x3b, 0x4c, 0x77, 0x32, 0x3b, 0x4c, 0x77, 0x33, 0x3b, 0x4c,
-0x77, 0x34, 0x3b, 0x4c, 0x77, 0x35, 0x3b, 0x4c, 0x77, 0x36, 0x3b, 0x53, 0x61, 0x62, 0x62, 0x69, 0x69, 0x74, 0x69, 0x3b,
-0x42, 0x61, 0x6c, 0x61, 0x7a, 0x61, 0x3b, 0x4c, 0x77, 0x61, 0x6b, 0x75, 0x62, 0x69, 0x72, 0x69, 0x3b, 0x4c, 0x77, 0x61,
-0x6b, 0x75, 0x73, 0x61, 0x74, 0x75, 0x3b, 0x4c, 0x77, 0x61, 0x6b, 0x75, 0x6e, 0x61, 0x3b, 0x4c, 0x77, 0x61, 0x6b, 0x75,
-0x74, 0x61, 0x61, 0x6e, 0x6f, 0x3b, 0x4c, 0x77, 0x61, 0x6d, 0x75, 0x6b, 0x61, 0x61, 0x67, 0x61, 0x3b, 0x53, 0x3b, 0x42,
-0x3b, 0x4c, 0x3b, 0x4c, 0x3b, 0x4c, 0x3b, 0x4c, 0x3b, 0x4c, 0x3b, 0x50, 0x61, 0x20, 0x4d, 0x75, 0x6c, 0x75, 0x6e, 0x67,
-0x75, 0x3b, 0x50, 0x61, 0x6c, 0x69, 0x63, 0x68, 0x69, 0x6d, 0x6f, 0x3b, 0x50, 0x61, 0x6c, 0x69, 0x63, 0x68, 0x69, 0x62,
-0x75, 0x6c, 0x69, 0x3b, 0x50, 0x61, 0x6c, 0x69, 0x63, 0x68, 0x69, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x50, 0x61, 0x6c, 0x69,
-0x63, 0x68, 0x69, 0x6e, 0x65, 0x3b, 0x50, 0x61, 0x6c, 0x69, 0x63, 0x68, 0x69, 0x73, 0x61, 0x6e, 0x6f, 0x3b, 0x50, 0x61,
-0x63, 0x68, 0x69, 0x62, 0x65, 0x6c, 0x75, 0x73, 0x68, 0x69, 0x3b, 0x64, 0x75, 0x6d, 0x3b, 0x73, 0x69, 0x67, 0x3b, 0x74,
-0x65, 0x72, 0x3b, 0x6b, 0x75, 0x61, 0x3b, 0x6b, 0x69, 0x6e, 0x3b, 0x73, 0x65, 0x73, 0x3b, 0x73, 0x61, 0x62, 0x3b, 0x64,
-0x75, 0x6d, 0x69, 0x6e, 0x67, 0x75, 0x3b, 0x73, 0x69, 0x67, 0x75, 0x6e, 0x64, 0x61, 0x2d, 0x66, 0x65, 0x72, 0x61, 0x3b,
-0x74, 0x65, 0x72, 0x73, 0x61, 0x2d, 0x66, 0x65, 0x72, 0x61, 0x3b, 0x6b, 0x75, 0x61, 0x72, 0x74, 0x61, 0x2d, 0x66, 0x65,
-0x72, 0x61, 0x3b, 0x6b, 0x69, 0x6e, 0x74, 0x61, 0x2d, 0x66, 0x65, 0x72, 0x61, 0x3b, 0x73, 0x65, 0x73, 0x74, 0x61, 0x2d,
-0x66, 0x65, 0x72, 0x61, 0x3b, 0x73, 0xe1, 0x62, 0x61, 0x64, 0x75, 0x3b, 0x44, 0x3b, 0x53, 0x3b, 0x54, 0x3b, 0x4b, 0x3b,
-0x4b, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x64, 0x75, 0x6d, 0x69, 0x6e, 0x67, 0x75, 0x3b, 0x73, 0x69, 0x67, 0x75, 0x6e, 0x64,
-0x61, 0x2d, 0x66, 0x65, 0x72, 0x61, 0x3b, 0x74, 0x65, 0x72, 0x73, 0x61, 0x2d, 0x66, 0x65, 0x72, 0x61, 0x3b, 0x6b, 0x75,
-0x61, 0x72, 0x74, 0x61, 0x2d, 0x66, 0x65, 0x72, 0x61, 0x3b, 0x6b, 0x69, 0x6e, 0x74, 0x61, 0x2d, 0x66, 0x65, 0x72, 0x61,
-0x3b, 0x73, 0x65, 0x73, 0x74, 0x61, 0x2d, 0x66, 0x65, 0x72, 0x61, 0x3b, 0x73, 0x61, 0x62, 0x61, 0x64, 0x75, 0x3b, 0x4b,
-0x49, 0x55, 0x3b, 0x4d, 0x52, 0x41, 0x3b, 0x57, 0x41, 0x49, 0x3b, 0x57, 0x45, 0x54, 0x3b, 0x57, 0x45, 0x4e, 0x3b, 0x57,
-0x54, 0x4e, 0x3b, 0x4a, 0x55, 0x4d, 0x3b, 0x4b, 0x69, 0x75, 0x6d, 0x69, 0x61, 0x3b, 0x4d, 0x75, 0x72, 0x61, 0x6d, 0x75,
-0x6b, 0x6f, 0x3b, 0x57, 0x61, 0x69, 0x72, 0x69, 0x3b, 0x57, 0x65, 0x74, 0x68, 0x61, 0x74, 0x75, 0x3b, 0x57, 0x65, 0x6e,
-0x61, 0x3b, 0x57, 0x65, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x6d, 0x6f, 0x73, 0x69, 0x3b, 0x4b, 0x3b,
-0x4d, 0x3b, 0x57, 0x3b, 0x57, 0x3b, 0x57, 0x3b, 0x57, 0x3b, 0x4a, 0x3b, 0x4b, 0x74, 0x73, 0x3b, 0x4b, 0x6f, 0x74, 0x3b,
-0x4b, 0x6f, 0x6f, 0x3b, 0x4b, 0x6f, 0x73, 0x3b, 0x4b, 0x6f, 0x61, 0x3b, 0x4b, 0x6f, 0x6d, 0x3b, 0x4b, 0x6f, 0x6c, 0x3b,
-0x4b, 0x6f, 0x74, 0x69, 0x73, 0x61, 0x70, 0x3b, 0x4b, 0x6f, 0x74, 0x61, 0x61, 0x69, 0x3b, 0x4b, 0x6f, 0x61, 0x65, 0x6e,
-0x67, 0x2019, 0x3b, 0x4b, 0x6f, 0x73, 0x6f, 0x6d, 0x6f, 0x6b, 0x3b, 0x4b, 0x6f, 0x61, 0x6e, 0x67, 0x2019, 0x77, 0x61, 0x6e,
-0x3b, 0x4b, 0x6f, 0x6d, 0x75, 0x75, 0x74, 0x3b, 0x4b, 0x6f, 0x6c, 0x6f, 0x3b, 0x54, 0x3b, 0x54, 0x3b, 0x4f, 0x3b, 0x53,
-0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x4c, 0x3b, 0x53, 0x6f, 0x6e, 0x3b, 0x4d, 0x61, 0x3b, 0x44, 0x65, 0x3b, 0x57, 0x75, 0x3b,
-0x44, 0x6f, 0x3b, 0x46, 0x72, 0x3b, 0x53, 0x61, 0x74, 0x3b, 0x53, 0x6f, 0x6e, 0x74, 0x61, 0x78, 0x74, 0x73, 0x65, 0x65,
-0x73, 0x3b, 0x4d, 0x61, 0x6e, 0x74, 0x61, 0x78, 0x74, 0x73, 0x65, 0x65, 0x73, 0x3b, 0x44, 0x65, 0x6e, 0x73, 0x74, 0x61,
-0x78, 0x74, 0x73, 0x65, 0x65, 0x73, 0x3b, 0x57, 0x75, 0x6e, 0x73, 0x74, 0x61, 0x78, 0x74, 0x73, 0x65, 0x65, 0x73, 0x3b,
-0x44, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x74, 0x61, 0x78, 0x74, 0x73, 0x65, 0x65, 0x73, 0x3b, 0x46, 0x72, 0x61, 0x69, 0x74,
-0x61, 0x78, 0x74, 0x73, 0x65, 0x65, 0x73, 0x3b, 0x53, 0x61, 0x74, 0x65, 0x72, 0x74, 0x61, 0x78, 0x74, 0x73, 0x65, 0x65,
-0x73, 0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0x45, 0x3b, 0x57, 0x3b, 0x44, 0x3b, 0x46, 0x3b, 0x41, 0x3b, 0x53, 0x75, 0x2e, 0x3b,
-0x4d, 0x6f, 0x2e, 0x3b, 0x44, 0x69, 0x2e, 0x3b, 0x4d, 0x65, 0x2e, 0x3b, 0x44, 0x75, 0x2e, 0x3b, 0x46, 0x72, 0x2e, 0x3b,
-0x53, 0x61, 0x2e, 0x3b, 0x53, 0x75, 0x6e, 0x6e, 0x64, 0x61, 0x61, 0x63, 0x68, 0x3b, 0x4d, 0x6f, 0x68, 0x6e, 0x64, 0x61,
-0x61, 0x63, 0x68, 0x3b, 0x44, 0x69, 0x6e, 0x6e, 0x73, 0x64, 0x61, 0x61, 0x63, 0x68, 0x3b, 0x4d, 0x65, 0x74, 0x77, 0x6f,
-0x63, 0x68, 0x3b, 0x44, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x73, 0x64, 0x61, 0x61, 0x63, 0x68, 0x3b, 0x46, 0x72, 0x69, 0x69,
-0x64, 0x61, 0x61, 0x63, 0x68, 0x3b, 0x53, 0x61, 0x6d, 0x73, 0x64, 0x61, 0x61, 0x63, 0x68, 0x3b, 0x4a, 0x75, 0x6d, 0x61,
-0x70, 0xed, 0x6c, 0xed, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x74, 0xe1, 0x74, 0x75, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x6e, 0x65,
-0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x74, 0xe1, 0x6e, 0x254, 0x3b, 0x41, 0x6c, 0x61, 0xe1, 0x6d, 0x69, 0x73, 0x69, 0x3b, 0x4a,
-0x75, 0x6d, 0xe1, 0x61, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x6d, 0xf3, 0x73, 0x69, 0x3b, 0x53, 0x61, 0x62, 0x69, 0x3b, 0x42,
-0x61, 0x6c, 0x61, 0x3b, 0x4b, 0x75, 0x62, 0x69, 0x3b, 0x4b, 0x75, 0x73, 0x61, 0x3b, 0x4b, 0x75, 0x6e, 0x61, 0x3b, 0x4b,
-0x75, 0x74, 0x61, 0x3b, 0x4d, 0x75, 0x6b, 0x61, 0x3b, 0x53, 0x61, 0x62, 0x69, 0x69, 0x74, 0x69, 0x3b, 0x42, 0x61, 0x6c,
-0x61, 0x7a, 0x61, 0x3b, 0x4f, 0x77, 0x6f, 0x6b, 0x75, 0x62, 0x69, 0x6c, 0x69, 0x3b, 0x4f, 0x77, 0x6f, 0x6b, 0x75, 0x73,
-0x61, 0x74, 0x75, 0x3b, 0x4f, 0x6c, 0x6f, 0x6b, 0x75, 0x6e, 0x61, 0x3b, 0x4f, 0x6c, 0x6f, 0x6b, 0x75, 0x74, 0x61, 0x61,
-0x6e, 0x75, 0x3b, 0x4f, 0x6c, 0x6f, 0x6d, 0x75, 0x6b, 0x61, 0x61, 0x67, 0x61, 0x3b, 0x53, 0x3b, 0x42, 0x3b, 0x42, 0x3b,
-0x53, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4d, 0x3b, 0x4a, 0x32, 0x3b, 0x4a, 0x33, 0x3b, 0x4a, 0x34, 0x3b, 0x4a, 0x35, 0x3b,
-0x41, 0x6c, 0x3b, 0x49, 0x6a, 0x3b, 0x4a, 0x31, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x70, 0x69, 0x72, 0x69, 0x3b, 0x4a, 0x75,
-0x6d, 0x61, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x6e, 0x6e, 0x65, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x74,
-0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x75, 0x72, 0x77, 0x61, 0x20, 0x77, 0x61, 0x20, 0x4b, 0x61, 0x6e, 0x6e, 0x65, 0x3b, 0x4d,
-0x75, 0x72, 0x77, 0x61, 0x20, 0x77, 0x61, 0x20, 0x4b, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x6d,
-0x6f, 0x73, 0x69, 0x3b, 0x4a, 0x70, 0x69, 0x3b, 0x4a, 0x74, 0x74, 0x3b, 0x4a, 0x6e, 0x6e, 0x3b, 0x4a, 0x74, 0x6e, 0x3b,
-0x41, 0x6c, 0x68, 0x3b, 0x49, 0x6a, 0x6d, 0x3b, 0x4a, 0x6d, 0x6f, 0x3b, 0x4a, 0x75, 0x6d, 0x3b, 0x42, 0x61, 0x72, 0x3b,
-0x41, 0x61, 0x72, 0x3b, 0x55, 0x6e, 0x69, 0x3b, 0x55, 0x6e, 0x67, 0x3b, 0x4b, 0x61, 0x6e, 0x3b, 0x53, 0x61, 0x62, 0x3b,
-0x4e, 0x61, 0x6b, 0x61, 0x65, 0x6a, 0x75, 0x6d, 0x61, 0x3b, 0x4e, 0x61, 0x6b, 0x61, 0x65, 0x62, 0x61, 0x72, 0x61, 0x73,
-0x61, 0x3b, 0x4e, 0x61, 0x6b, 0x61, 0x61, 0x72, 0x65, 0x3b, 0x4e, 0x61, 0x6b, 0x61, 0x75, 0x6e, 0x69, 0x3b, 0x4e, 0x61,
-0x6b, 0x61, 0x75, 0x6e, 0x67, 0x2019, 0x6f, 0x6e, 0x3b, 0x4e, 0x61, 0x6b, 0x61, 0x6b, 0x61, 0x6e, 0x79, 0x3b, 0x4e, 0x61,
-0x6b, 0x61, 0x73, 0x61, 0x62, 0x69, 0x74, 0x69, 0x3b, 0x4a, 0x3b, 0x42, 0x3b, 0x41, 0x3b, 0x55, 0x3b, 0x55, 0x3b, 0x4b,
-0x3b, 0x53, 0x3b, 0x41, 0x6c, 0x68, 0x3b, 0x41, 0x74, 0x69, 0x3b, 0x41, 0x74, 0x61, 0x3b, 0x41, 0x6c, 0x61, 0x3b, 0x41,
-0x6c, 0x6d, 0x3b, 0x41, 0x6c, 0x6a, 0x3b, 0x41, 0x73, 0x73, 0x3b, 0x41, 0x6c, 0x68, 0x61, 0x64, 0x69, 0x3b, 0x41, 0x74,
-0x69, 0x6e, 0x69, 0x3b, 0x41, 0x74, 0x61, 0x6c, 0x61, 0x74, 0x61, 0x3b, 0x41, 0x6c, 0x61, 0x72, 0x62, 0x61, 0x3b, 0x41,
-0x6c, 0x68, 0x61, 0x6d, 0x69, 0x69, 0x73, 0x61, 0x3b, 0x41, 0x6c, 0x6a, 0x75, 0x6d, 0x61, 0x3b, 0x41, 0x73, 0x73, 0x61,
-0x62, 0x64, 0x75, 0x3b, 0x48, 0x3b, 0x54, 0x3b, 0x54, 0x3b, 0x4c, 0x3b, 0x4c, 0x3b, 0x4c, 0x3b, 0x53, 0x3b, 0x4a, 0x4d,
-0x50, 0x3b, 0x57, 0x55, 0x54, 0x3b, 0x54, 0x41, 0x52, 0x3b, 0x54, 0x41, 0x44, 0x3b, 0x54, 0x41, 0x4e, 0x3b, 0x54, 0x41,
-0x42, 0x3b, 0x4e, 0x47, 0x53, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x70, 0x69, 0x6c, 0x3b, 0x57, 0x75, 0x6f, 0x6b, 0x20, 0x54,
-0x69, 0x63, 0x68, 0x3b, 0x54, 0x69, 0x63, 0x68, 0x20, 0x41, 0x72, 0x69, 0x79, 0x6f, 0x3b, 0x54, 0x69, 0x63, 0x68, 0x20,
-0x41, 0x64, 0x65, 0x6b, 0x3b, 0x54, 0x69, 0x63, 0x68, 0x20, 0x41, 0x6e, 0x67, 0x2019, 0x77, 0x65, 0x6e, 0x3b, 0x54, 0x69,
-0x63, 0x68, 0x20, 0x41, 0x62, 0x69, 0x63, 0x68, 0x3b, 0x4e, 0x67, 0x65, 0x73, 0x6f, 0x3b, 0x4a, 0x3b, 0x57, 0x3b, 0x54,
-0x3b, 0x54, 0x3b, 0x54, 0x3b, 0x54, 0x3b, 0x4e, 0x3b, 0x41, 0x73, 0x61, 0x3b, 0x41, 0x79, 0x6e, 0x3b, 0x41, 0x73, 0x6e,
-0x3b, 0x41, 0x6b, 0x72, 0x3b, 0x41, 0x6b, 0x77, 0x3b, 0x41, 0x73, 0x6d, 0x3b, 0x41, 0x73, 0x1e0d, 0x3b, 0x41, 0x73, 0x61,
-0x6d, 0x61, 0x73, 0x3b, 0x41, 0x79, 0x6e, 0x61, 0x73, 0x3b, 0x41, 0x73, 0x69, 0x6e, 0x61, 0x73, 0x3b, 0x41, 0x6b, 0x72,
-0x61, 0x73, 0x3b, 0x41, 0x6b, 0x77, 0x61, 0x73, 0x3b, 0x41, 0x73, 0x69, 0x6d, 0x77, 0x61, 0x73, 0x3b, 0x41, 0x73, 0x69,
-0x1e0d, 0x79, 0x61, 0x73, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x41,
-0x6c, 0x68, 0x3b, 0x41, 0x74, 0x69, 0x3b, 0x41, 0x74, 0x61, 0x3b, 0x41, 0x6c, 0x61, 0x3b, 0x41, 0x6c, 0x6d, 0x3b, 0x41,
-0x6c, 0x7a, 0x3b, 0x41, 0x73, 0x69, 0x3b, 0x41, 0x6c, 0x68, 0x61, 0x64, 0x69, 0x3b, 0x41, 0x74, 0x69, 0x6e, 0x6e, 0x69,
-0x3b, 0x41, 0x74, 0x61, 0x6c, 0x61, 0x61, 0x74, 0x61, 0x3b, 0x41, 0x6c, 0x61, 0x72, 0x62, 0x61, 0x3b, 0x41, 0x6c, 0x68,
-0x61, 0x6d, 0x69, 0x69, 0x73, 0x61, 0x3b, 0x41, 0x6c, 0x7a, 0x75, 0x6d, 0x61, 0x3b, 0x41, 0x73, 0x69, 0x62, 0x74, 0x69,
-0x3b, 0x4a, 0x70, 0x69, 0x3b, 0x4a, 0x74, 0x74, 0x3b, 0x4a, 0x6d, 0x6e, 0x3b, 0x4a, 0x74, 0x6e, 0x3b, 0x41, 0x6c, 0x68,
-0x3b, 0x49, 0x6a, 0x75, 0x3b, 0x4a, 0x6d, 0x6f, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x61, 0x70, 0x69, 0x69, 0x3b, 0x4a, 0x75,
-0x6d, 0x61, 0x61, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x61, 0x6e, 0x65, 0x3b, 0x4a, 0x75, 0x6d, 0x61,
-0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x41, 0x6c, 0x68, 0x61, 0x6d, 0x69, 0x73, 0x69, 0x3b, 0x49, 0x6a, 0x75, 0x6d, 0x61,
-0x61, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x61, 0x6d, 0x6f, 0x73, 0x69, 0x3b, 0x32, 0x3b, 0x33, 0x3b, 0x34, 0x3b, 0x35, 0x3b,
-0x41, 0x3b, 0x49, 0x3b, 0x31, 0x3b, 0x930, 0x92c, 0x93f, 0x3b, 0x938, 0x92e, 0x3b, 0x92e, 0x902, 0x917, 0x932, 0x3b, 0x92c, 0x941,
-0x926, 0x3b, 0x92c, 0x93f, 0x938, 0x925, 0x93f, 0x3b, 0x938, 0x941, 0x916, 0x941, 0x930, 0x3b, 0x938, 0x941, 0x928, 0x93f, 0x3b, 0x930,
-0x92c, 0x93f, 0x92c, 0x93e, 0x930, 0x3b, 0x938, 0x92e, 0x92c, 0x93e, 0x930, 0x3b, 0x92e, 0x902, 0x917, 0x932, 0x92c, 0x93e, 0x930, 0x3b,
-0x92c, 0x941, 0x926, 0x92c, 0x93e, 0x930, 0x3b, 0x92c, 0x93f, 0x938, 0x925, 0x93f, 0x92c, 0x93e, 0x930, 0x3b, 0x938, 0x941, 0x916, 0x941,
-0x930, 0x92c, 0x93e, 0x930, 0x3b, 0x938, 0x941, 0x928, 0x93f, 0x92c, 0x93e, 0x930, 0x3b, 0x930, 0x3b, 0x938, 0x3b, 0x92e, 0x902, 0x3b,
-0x92c, 0x941, 0x3b, 0x92c, 0x93f, 0x3b, 0x938, 0x941, 0x3b, 0x938, 0x941, 0x3b, 0x43a, 0x4c0, 0x438, 0x440, 0x430, 0x43d, 0x430, 0x43d,
-0x20, 0x434, 0x435, 0x3b, 0x43e, 0x440, 0x448, 0x43e, 0x442, 0x430, 0x43d, 0x20, 0x434, 0x435, 0x3b, 0x448, 0x438, 0x43d, 0x430, 0x440,
-0x438, 0x43d, 0x20, 0x434, 0x435, 0x3b, 0x43a, 0x445, 0x430, 0x430, 0x440, 0x438, 0x43d, 0x20, 0x434, 0x435, 0x3b, 0x435, 0x430, 0x440,
-0x438, 0x43d, 0x20, 0x434, 0x435, 0x3b, 0x43f, 0x4c0, 0x435, 0x440, 0x430, 0x441, 0x43a, 0x430, 0x43d, 0x20, 0x434, 0x435, 0x3b, 0x448,
-0x43e, 0x442, 0x20, 0x434, 0x435, 0x3b, 0x43d, 0x434, 0x2de7, 0x487, 0x467, 0x3b, 0x43f, 0x43d, 0x2de3, 0x435, 0x3b, 0x432, 0x442, 0x43e,
-0x2dec, 0x487, 0x3b, 0x441, 0x440, 0x2de3, 0x435, 0x3b, 0x447, 0x435, 0x2de6, 0x487, 0x3b, 0x43f, 0x467, 0x2de6, 0x487, 0x3b, 0x441, 0xa64b,
-0x2de0, 0x487, 0x3b, 0x43d, 0x435, 0x434, 0x463, 0x301, 0x43b, 0x467, 0x3b, 0x43f, 0x43e, 0x43d, 0x435, 0x434, 0x463, 0x301, 0x43b, 0x44c,
-0x43d, 0x438, 0x43a, 0x44a, 0x3b, 0x432, 0x442, 0x43e, 0x301, 0x440, 0x43d, 0x438, 0x43a, 0x44a, 0x3b, 0x441, 0x440, 0x435, 0x434, 0x430,
-0x300, 0x3b, 0x447, 0x435, 0x442, 0x432, 0x435, 0x440, 0x442, 0x43e, 0x301, 0x43a, 0x44a, 0x3b, 0x43f, 0x467, 0x442, 0x43e, 0x301, 0x43a,
-0x44a, 0x3b, 0x441, 0xa64b, 0x431, 0x431, 0x461, 0x301, 0x442, 0x430, 0x3b, 0x4c, 0x75, 0x6d, 0x3b, 0x4e, 0x6b, 0x6f, 0x3b, 0x4e,
-0x64, 0x79, 0x3b, 0x4e, 0x64, 0x67, 0x3b, 0x4e, 0x6a, 0x77, 0x3b, 0x4e, 0x67, 0x76, 0x3b, 0x4c, 0x75, 0x62, 0x3b, 0x4c,
-0x75, 0x6d, 0x69, 0x6e, 0x67, 0x75, 0x3b, 0x4e, 0x6b, 0x6f, 0x64, 0x79, 0x61, 0x3b, 0x4e, 0x64, 0xe0, 0x61, 0x79, 0xe0,
-0x3b, 0x4e, 0x64, 0x61, 0x6e, 0x67, 0xf9, 0x3b, 0x4e, 0x6a, 0xf2, 0x77, 0x61, 0x3b, 0x4e, 0x67, 0xf2, 0x76, 0x79, 0x61,
-0x3b, 0x4c, 0x75, 0x62, 0x69, 0x6e, 0x67, 0x75, 0x3b, 0x4c, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4e,
-0x3b, 0x4c, 0x3b, 0x53, 0x6f, 0x6e, 0x3b, 0x4d, 0xe9, 0x69, 0x3b, 0x44, 0xeb, 0x6e, 0x3b, 0x4d, 0xeb, 0x74, 0x3b, 0x44,
-0x6f, 0x6e, 0x3b, 0x46, 0x72, 0x65, 0x3b, 0x53, 0x61, 0x6d, 0x3b, 0x53, 0x6f, 0x6e, 0x6e, 0x64, 0x65, 0x67, 0x3b, 0x4d,
-0xe9, 0x69, 0x6e, 0x64, 0x65, 0x67, 0x3b, 0x44, 0xeb, 0x6e, 0x73, 0x63, 0x68, 0x64, 0x65, 0x67, 0x3b, 0x4d, 0xeb, 0x74,
-0x74, 0x77, 0x6f, 0x63, 0x68, 0x3b, 0x44, 0x6f, 0x6e, 0x6e, 0x65, 0x73, 0x63, 0x68, 0x64, 0x65, 0x67, 0x3b, 0x46, 0x72,
-0x65, 0x69, 0x64, 0x65, 0x67, 0x3b, 0x53, 0x61, 0x6d, 0x73, 0x63, 0x68, 0x64, 0x65, 0x67, 0x3b, 0x53, 0x6f, 0x6e, 0x2e,
-0x3b, 0x4d, 0xe9, 0x69, 0x2e, 0x3b, 0x44, 0xeb, 0x6e, 0x2e, 0x3b, 0x4d, 0xeb, 0x74, 0x2e, 0x3b, 0x44, 0x6f, 0x6e, 0x2e,
-0x3b, 0x46, 0x72, 0x65, 0x2e, 0x3b, 0x53, 0x61, 0x6d, 0x2e, 0x3b, 0x6e, 0x74, 0x73, 0x3b, 0x6b, 0x70, 0x61, 0x3b, 0x67,
-0x68, 0x254, 0x3b, 0x74, 0x254, 0x6d, 0x3b, 0x75, 0x6d, 0x65, 0x3b, 0x67, 0x68, 0x268, 0x3b, 0x64, 0x7a, 0x6b, 0x3b, 0x74,
-0x73, 0x75, 0x294, 0x6e, 0x74, 0x73, 0x268, 0x3b, 0x74, 0x73, 0x75, 0x294, 0x75, 0x6b, 0x70, 0xe0, 0x3b, 0x74, 0x73, 0x75,
-0x294, 0x75, 0x67, 0x68, 0x254, 0x65, 0x3b, 0x74, 0x73, 0x75, 0x294, 0x75, 0x74, 0x254, 0x300, 0x6d, 0x6c, 0xf2, 0x3b, 0x74,
-0x73, 0x75, 0x294, 0x75, 0x6d, 0xe8, 0x3b, 0x74, 0x73, 0x75, 0x294, 0x75, 0x67, 0x68, 0x268, 0x302, 0x6d, 0x3b, 0x74, 0x73,
-0x75, 0x294, 0x6e, 0x64, 0x7a, 0x268, 0x6b, 0x254, 0x294, 0x254, 0x3b, 0x6e, 0x3b, 0x6b, 0x3b, 0x67, 0x3b, 0x74, 0x3b, 0x75,
-0x3b, 0x67, 0x3b, 0x64, 0x3b, 0x6e, 0x254, 0x79, 0x3b, 0x6e, 0x6a, 0x61, 0x3b, 0x75, 0x75, 0x6d, 0x3b, 0x14b, 0x67, 0x65,
-0x3b, 0x6d, 0x62, 0x254, 0x3b, 0x6b, 0x254, 0x254, 0x3b, 0x6a, 0x6f, 0x6e, 0x3b, 0x14b, 0x67, 0x77, 0xe0, 0x20, 0x6e, 0x254,
-0x302, 0x79, 0x3b, 0x14b, 0x67, 0x77, 0xe0, 0x20, 0x6e, 0x6a, 0x61, 0x14b, 0x67, 0x75, 0x6d, 0x62, 0x61, 0x3b, 0x14b, 0x67,
-0x77, 0xe0, 0x20, 0xfb, 0x6d, 0x3b, 0x14b, 0x67, 0x77, 0xe0, 0x20, 0x14b, 0x67, 0xea, 0x3b, 0x14b, 0x67, 0x77, 0xe0, 0x20,
-0x6d, 0x62, 0x254, 0x6b, 0x3b, 0x14b, 0x67, 0x77, 0xe0, 0x20, 0x6b, 0x254, 0x254, 0x3b, 0x14b, 0x67, 0x77, 0xe0, 0x20, 0x6a,
-0xf4, 0x6e, 0x3b, 0x6e, 0x3b, 0x6e, 0x3b, 0x75, 0x3b, 0x14b, 0x3b, 0x6d, 0x3b, 0x6b, 0x3b, 0x6a, 0x3b, 0x41, 0x6c, 0x68,
-0x61, 0x64, 0x69, 0x3b, 0x41, 0x74, 0x69, 0x6e, 0x6e, 0x69, 0x3b, 0x41, 0x74, 0x61, 0x6c, 0x61, 0x61, 0x74, 0x61, 0x3b,
-0x41, 0x6c, 0x61, 0x72, 0x62, 0x61, 0x3b, 0x41, 0x6c, 0x68, 0x61, 0x6d, 0x69, 0x73, 0x69, 0x3b, 0x41, 0x6c, 0x7a, 0x75,
-0x6d, 0x61, 0x3b, 0x41, 0x73, 0x69, 0x62, 0x74, 0x69, 0x3b, 0x48, 0x3b, 0x54, 0x3b, 0x54, 0x3b, 0x4c, 0x3b, 0x4d, 0x3b,
-0x5a, 0x3b, 0x53, 0x3b, 0xe9, 0x74, 0x3b, 0x6d, 0x254, 0x301, 0x73, 0x3b, 0x6b, 0x77, 0x61, 0x3b, 0x6d, 0x75, 0x6b, 0x3b,
-0x14b, 0x67, 0x69, 0x3b, 0x257, 0xf3, 0x6e, 0x3b, 0x65, 0x73, 0x61, 0x3b, 0xe9, 0x74, 0x69, 0x3b, 0x6d, 0x254, 0x301, 0x73,
-0xfa, 0x3b, 0x6b, 0x77, 0x61, 0x73, 0xfa, 0x3b, 0x6d, 0x75, 0x6b, 0x254, 0x301, 0x73, 0xfa, 0x3b, 0x14b, 0x67, 0x69, 0x73,
-0xfa, 0x3b, 0x257, 0xf3, 0x6e, 0x25b, 0x73, 0xfa, 0x3b, 0x65, 0x73, 0x61, 0x253, 0x61, 0x73, 0xfa, 0x3b, 0x65, 0x3b, 0x6d,
-0x3b, 0x6b, 0x3b, 0x6d, 0x3b, 0x14b, 0x3b, 0x257, 0x3b, 0x65, 0x3b, 0x44, 0x69, 0x6d, 0x3b, 0x54, 0x65, 0x6e, 0x3b, 0x54,
-0x61, 0x6c, 0x3b, 0x41, 0x6c, 0x61, 0x3b, 0x41, 0x72, 0x61, 0x3b, 0x41, 0x72, 0x6a, 0x3b, 0x53, 0x69, 0x62, 0x3b, 0x44,
-0x69, 0x6d, 0x61, 0x73, 0x3b, 0x54, 0x65, 0x6e, 0x65, 0x14b, 0x3b, 0x54, 0x61, 0x6c, 0x61, 0x74, 0x61, 0x3b, 0x41, 0x6c,
-0x61, 0x72, 0x62, 0x61, 0x79, 0x3b, 0x41, 0x72, 0x61, 0x6d, 0x69, 0x73, 0x61, 0x79, 0x3b, 0x41, 0x72, 0x6a, 0x75, 0x6d,
-0x61, 0x3b, 0x53, 0x69, 0x62, 0x69, 0x74, 0x69, 0x3b, 0x44, 0x3b, 0x54, 0x3b, 0x54, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x41,
-0x3b, 0x53, 0x3b, 0x73, 0x254, 0x301, 0x6e, 0x3b, 0x6d, 0x254, 0x301, 0x6e, 0x3b, 0x73, 0x6d, 0x62, 0x3b, 0x73, 0x6d, 0x6c,
-0x3b, 0x73, 0x6d, 0x6e, 0x3b, 0x66, 0xfa, 0x6c, 0x3b, 0x73, 0xe9, 0x72, 0x3b, 0x73, 0x254, 0x301, 0x6e, 0x64, 0x254, 0x3b,
-0x6d, 0x254, 0x301, 0x6e, 0x64, 0x69, 0x3b, 0x73, 0x254, 0x301, 0x6e, 0x64, 0x254, 0x20, 0x6d, 0x259, 0x6c, 0xfa, 0x20, 0x6d,
-0x259, 0x301, 0x62, 0x25b, 0x30c, 0x3b, 0x73, 0x254, 0x301, 0x6e, 0x64, 0x254, 0x20, 0x6d, 0x259, 0x6c, 0xfa, 0x20, 0x6d, 0x259,
-0x301, 0x6c, 0x25b, 0x301, 0x3b, 0x73, 0x254, 0x301, 0x6e, 0x64, 0x254, 0x20, 0x6d, 0x259, 0x6c, 0xfa, 0x20, 0x6d, 0x259, 0x301,
-0x6e, 0x79, 0x69, 0x3b, 0x66, 0xfa, 0x6c, 0x61, 0x64, 0xe9, 0x3b, 0x73, 0xe9, 0x72, 0x61, 0x64, 0xe9, 0x3b, 0x73, 0x3b,
-0x6d, 0x3b, 0x73, 0x3b, 0x73, 0x3b, 0x73, 0x3b, 0x66, 0x3b, 0x73, 0x3b, 0x73, 0x254, 0x301, 0x6e, 0x3b, 0x6c, 0x1dd, 0x6e,
-0x3b, 0x6d, 0x61, 0x61, 0x3b, 0x6d, 0x25b, 0x6b, 0x3b, 0x6a, 0x1dd, 0x1dd, 0x3b, 0x6a, 0xfa, 0x6d, 0x3b, 0x73, 0x61, 0x6d,
-0x3b, 0x73, 0x254, 0x301, 0x6e, 0x64, 0x1dd, 0x3b, 0x6c, 0x1dd, 0x6e, 0x64, 0xed, 0x3b, 0x6d, 0x61, 0x61, 0x64, 0xed, 0x3b,
-0x6d, 0x25b, 0x6b, 0x72, 0x25b, 0x64, 0xed, 0x3b, 0x6a, 0x1dd, 0x1dd, 0x64, 0xed, 0x3b, 0x6a, 0xfa, 0x6d, 0x62, 0xe1, 0x3b,
-0x73, 0x61, 0x6d, 0x64, 0xed, 0x3b, 0x73, 0x3b, 0x6c, 0x3b, 0x6d, 0x3b, 0x6d, 0x3b, 0x6a, 0x3b, 0x6a, 0x3b, 0x73, 0x3b,
-0x53, 0x61, 0x62, 0x3b, 0x4a, 0x74, 0x74, 0x3b, 0x4a, 0x6e, 0x6e, 0x3b, 0x4a, 0x74, 0x6e, 0x3b, 0x41, 0x72, 0x61, 0x3b,
-0x49, 0x6a, 0x75, 0x3b, 0x4a, 0x6d, 0x6f, 0x3b, 0x53, 0x61, 0x62, 0x61, 0x74, 0x6f, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x74,
-0x61, 0x74, 0x75, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x6e, 0x6e, 0x65, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x74, 0x61, 0x6e, 0x6f,
-0x3b, 0x41, 0x72, 0x61, 0x68, 0x61, 0x6d, 0x69, 0x73, 0x69, 0x3b, 0x49, 0x6a, 0x75, 0x6d, 0x61, 0x61, 0x3b, 0x4a, 0x75,
-0x6d, 0x61, 0x6d, 0x6f, 0x73, 0x69, 0x3b, 0x53, 0x3b, 0x4a, 0x3b, 0x4a, 0x3b, 0x4a, 0x3b, 0x41, 0x3b, 0x49, 0x3b, 0x4a,
-0x3b, 0x43, 0x79, 0x61, 0x3b, 0x43, 0x6c, 0x61, 0x3b, 0x43, 0x7a, 0x69, 0x3b, 0x43, 0x6b, 0x6f, 0x3b, 0x43, 0x6b, 0x61,
-0x3b, 0x43, 0x67, 0x61, 0x3b, 0x43, 0x7a, 0x65, 0x3b, 0x43, 0x6f, 0x6d, 0x2019, 0x79, 0x61, 0x6b, 0x6b, 0x65, 0x3b, 0x43,
-0x6f, 0x6d, 0x6c, 0x61, 0x61, 0x257, 0x69, 0x69, 0x3b, 0x43, 0x6f, 0x6d, 0x7a, 0x79, 0x69, 0x69, 0x257, 0x69, 0x69, 0x3b,
-0x43, 0x6f, 0x6d, 0x6b, 0x6f, 0x6c, 0x6c, 0x65, 0x3b, 0x43, 0x6f, 0x6d, 0x6b, 0x61, 0x6c, 0x64, 0x1dd, 0x253, 0x6c, 0x69,
-0x69, 0x3b, 0x43, 0x6f, 0x6d, 0x67, 0x61, 0x69, 0x73, 0x75, 0x75, 0x3b, 0x43, 0x6f, 0x6d, 0x7a, 0x79, 0x65, 0x253, 0x73,
-0x75, 0x75, 0x3b, 0x59, 0x3b, 0x4c, 0x3b, 0x5a, 0x3b, 0x4f, 0x3b, 0x41, 0x3b, 0x47, 0x3b, 0x45, 0x3b, 0x73, 0x254, 0x301,
-0x6e, 0x3b, 0x6d, 0x254, 0x301, 0x6e, 0x3b, 0x73, 0x6d, 0x62, 0x3b, 0x73, 0x6d, 0x6c, 0x3b, 0x73, 0x6d, 0x6e, 0x3b, 0x6d,
-0x62, 0x73, 0x3b, 0x73, 0x61, 0x73, 0x3b, 0x73, 0x254, 0x301, 0x6e, 0x64, 0x254, 0x3b, 0x6d, 0x254, 0x301, 0x6e, 0x64, 0x254,
-0x3b, 0x73, 0x254, 0x301, 0x6e, 0x64, 0x254, 0x20, 0x6d, 0x61, 0x66, 0xfa, 0x20, 0x6d, 0xe1, 0x62, 0x61, 0x3b, 0x73, 0x254,
-0x301, 0x6e, 0x64, 0x254, 0x20, 0x6d, 0x61, 0x66, 0xfa, 0x20, 0x6d, 0xe1, 0x6c, 0x61, 0x6c, 0x3b, 0x73, 0x254, 0x301, 0x6e,
-0x64, 0x254, 0x20, 0x6d, 0x61, 0x66, 0xfa, 0x20, 0x6d, 0xe1, 0x6e, 0x61, 0x3b, 0x6d, 0x61, 0x62, 0xe1, 0x67, 0xe1, 0x20,
-0x6d, 0xe1, 0x20, 0x73, 0x75, 0x6b, 0x75, 0x6c, 0x3b, 0x73, 0xe1, 0x73, 0x61, 0x64, 0x69, 0x3b, 0x73, 0x3b, 0x6d, 0x3b,
-0x73, 0x3b, 0x73, 0x3b, 0x73, 0x3b, 0x6d, 0x3b, 0x73, 0x3b, 0x43, 0xe4, 0x14b, 0x3b, 0x4a, 0x69, 0x65, 0x63, 0x3b, 0x52,
-0x25b, 0x77, 0x3b, 0x44, 0x69, 0x254, 0x331, 0x6b, 0x3b, 0x14a, 0x75, 0x61, 0x61, 0x6e, 0x3b, 0x44, 0x68, 0x69, 0x65, 0x65,
-0x63, 0x3b, 0x42, 0xe4, 0x6b, 0x25b, 0x6c, 0x3b, 0x43, 0xe4, 0x14b, 0x20, 0x6b, 0x75, 0x254, 0x74, 0x68, 0x3b, 0x4a, 0x69,
-0x65, 0x63, 0x20, 0x6c, 0x61, 0x331, 0x74, 0x3b, 0x52, 0x25b, 0x77, 0x20, 0x6c, 0xe4, 0x74, 0x6e, 0x69, 0x3b, 0x44, 0x69,
-0x254, 0x331, 0x6b, 0x20, 0x6c, 0xe4, 0x74, 0x6e, 0x69, 0x3b, 0x14a, 0x75, 0x61, 0x61, 0x6e, 0x20, 0x6c, 0xe4, 0x74, 0x6e,
-0x69, 0x3b, 0x44, 0x68, 0x69, 0x65, 0x65, 0x63, 0x20, 0x6c, 0xe4, 0x74, 0x6e, 0x69, 0x3b, 0x42, 0xe4, 0x6b, 0x25b, 0x6c,
-0x20, 0x6c, 0xe4, 0x74, 0x6e, 0x69, 0x3b, 0x43, 0x3b, 0x4a, 0x3b, 0x52, 0x3b, 0x44, 0x3b, 0x14a, 0x3b, 0x44, 0x3b, 0x42,
-0x3b, 0x431, 0x441, 0x3b, 0x431, 0x43d, 0x3b, 0x43e, 0x43f, 0x3b, 0x441, 0x44d, 0x3b, 0x447, 0x43f, 0x3b, 0x431, 0x44d, 0x3b, 0x441,
-0x431, 0x3b, 0x431, 0x430, 0x441, 0x43a, 0x44b, 0x4bb, 0x44b, 0x430, 0x43d, 0x43d, 0x44c, 0x430, 0x3b, 0x431, 0x44d, 0x43d, 0x438, 0x434,
-0x438, 0x44d, 0x43d, 0x43d, 0x44c, 0x438, 0x43a, 0x3b, 0x43e, 0x43f, 0x442, 0x443, 0x43e, 0x440, 0x443, 0x43d, 0x43d, 0x44c, 0x443, 0x43a,
-0x3b, 0x441, 0x44d, 0x440, 0x44d, 0x434, 0x44d, 0x3b, 0x447, 0x44d, 0x43f, 0x43f, 0x438, 0x44d, 0x440, 0x3b, 0x411, 0x44d, 0x44d, 0x442,
-0x438, 0x4a5, 0x441, 0x44d, 0x3b, 0x441, 0x443, 0x431, 0x443, 0x43e, 0x442, 0x430, 0x3b, 0x411, 0x3b, 0x411, 0x3b, 0x41e, 0x3b, 0x421,
-0x3b, 0x427, 0x3b, 0x411, 0x3b, 0x421, 0x3b, 0x4d, 0x75, 0x6c, 0x3b, 0x4a, 0x74, 0x74, 0x3b, 0x4a, 0x6e, 0x6e, 0x3b, 0x4a,
-0x74, 0x6e, 0x3b, 0x41, 0x6c, 0x68, 0x3b, 0x49, 0x6a, 0x75, 0x3b, 0x4a, 0x6d, 0x6f, 0x3b, 0x4d, 0x75, 0x6c, 0x75, 0x6e,
-0x67, 0x75, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x6e, 0x6e, 0x65, 0x3b,
-0x4a, 0x75, 0x6d, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x41, 0x6c, 0x61, 0x68, 0x61, 0x6d, 0x69, 0x73, 0x69, 0x3b, 0x49,
-0x6a, 0x75, 0x6d, 0x61, 0x61, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x6d, 0x6f, 0x73, 0x69, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x4a,
-0x3b, 0x4a, 0x3b, 0x41, 0x3b, 0x49, 0x3b, 0x4a, 0x3b, 0xa55e, 0xa54c, 0xa535, 0x3b, 0xa5f3, 0xa5e1, 0xa609, 0x3b, 0xa55a, 0xa55e, 0xa55a,
-0x3b, 0xa549, 0xa55e, 0xa552, 0x3b, 0xa549, 0xa524, 0xa546, 0xa562, 0x3b, 0xa549, 0xa524, 0xa540, 0xa56e, 0x3b, 0xa53b, 0xa52c, 0xa533, 0x3b, 0x6c,
-0x61, 0x68, 0x61, 0x64, 0x69, 0x3b, 0x74, 0x25b, 0x25b, 0x6e, 0x25b, 0x25b, 0x3b, 0x74, 0x61, 0x6c, 0x61, 0x74, 0x61, 0x3b,
-0x61, 0x6c, 0x61, 0x62, 0x61, 0x3b, 0x61, 0x69, 0x6d, 0x69, 0x73, 0x61, 0x3b, 0x61, 0x69, 0x6a, 0x69, 0x6d, 0x61, 0x3b,
-0x73, 0x69, 0x253, 0x69, 0x74, 0x69, 0x3b, 0x53, 0x75, 0x6e, 0x3b, 0x4d, 0xe4, 0x6e, 0x3b, 0x5a, 0x69, 0x161, 0x3b, 0x4d,
-0x69, 0x74, 0x3b, 0x46, 0x72, 0xf3, 0x3b, 0x46, 0x72, 0x69, 0x3b, 0x53, 0x61, 0x6d, 0x3b, 0x53, 0x75, 0x6e, 0x6e, 0x74,
-0x61, 0x67, 0x3b, 0x4d, 0xe4, 0x6e, 0x74, 0x61, 0x67, 0x3b, 0x5a, 0x69, 0x161, 0x74, 0x61, 0x67, 0x3b, 0x4d, 0x69, 0x74,
-0x74, 0x77, 0x75, 0x10d, 0x3b, 0x46, 0x72, 0xf3, 0x6e, 0x74, 0x61, 0x67, 0x3b, 0x46, 0x72, 0x69, 0x74, 0x61, 0x67, 0x3b,
-0x53, 0x61, 0x6d, 0x161, 0x74, 0x61, 0x67, 0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0x5a, 0x3b, 0x4d, 0x3b, 0x46, 0x3b, 0x46, 0x3b,
-0x53, 0x3b, 0x73, 0x64, 0x3b, 0x6d, 0x64, 0x3b, 0x6d, 0x77, 0x3b, 0x65, 0x74, 0x3b, 0x6b, 0x6c, 0x3b, 0x66, 0x6c, 0x3b,
-0x73, 0x73, 0x3b, 0x73, 0x254, 0x301, 0x6e, 0x64, 0x69, 0x25b, 0x3b, 0x6d, 0xf3, 0x6e, 0x64, 0x69, 0x65, 0x3b, 0x6d, 0x75,
-0xe1, 0x6e, 0x79, 0xe1, 0x14b, 0x6d, 0xf3, 0x6e, 0x64, 0x69, 0x65, 0x3b, 0x6d, 0x65, 0x74, 0xfa, 0x6b, 0x70, 0xed, 0xe1,
-0x70, 0x25b, 0x3b, 0x6b, 0xfa, 0x70, 0xe9, 0x6c, 0x69, 0x6d, 0x65, 0x74, 0xfa, 0x6b, 0x70, 0x69, 0x61, 0x70, 0x25b, 0x3b,
-0x66, 0x65, 0x6c, 0xe9, 0x74, 0x65, 0x3b, 0x73, 0xe9, 0x73, 0x65, 0x6c, 0xe9, 0x3b, 0x73, 0x3b, 0x6d, 0x3b, 0x6d, 0x3b,
-0x65, 0x3b, 0x6b, 0x3b, 0x66, 0x3b, 0x73, 0x3b, 0x64, 0x6f, 0x6d, 0x3b, 0x6c, 0x6c, 0x75, 0x3b, 0x6d, 0x61, 0x72, 0x3b,
-0x6d, 0x69, 0xe9, 0x3b, 0x78, 0x75, 0x65, 0x3b, 0x76, 0x69, 0x65, 0x3b, 0x73, 0xe1, 0x62, 0x3b, 0x64, 0x6f, 0x6d, 0x69,
-0x6e, 0x67, 0x75, 0x3b, 0x6c, 0x6c, 0x75, 0x6e, 0x65, 0x73, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x65, 0x73, 0x3b, 0x6d, 0x69,
-0xe9, 0x72, 0x63, 0x6f, 0x6c, 0x65, 0x73, 0x3b, 0x78, 0x75, 0x65, 0x76, 0x65, 0x73, 0x3b, 0x76, 0x69, 0x65, 0x6e, 0x72,
-0x65, 0x73, 0x3b, 0x73, 0xe1, 0x62, 0x61, 0x64, 0x75, 0x3b, 0x53, 0x254, 0x301, 0x6e, 0x64, 0x69, 0x3b, 0x4d, 0x254, 0x301,
-0x6e, 0x64, 0x69, 0x3b, 0xc1, 0x70, 0x74, 0x61, 0x20, 0x4d, 0x254, 0x301, 0x6e, 0x64, 0x69, 0x3b, 0x57, 0x25b, 0x301, 0x6e,
-0x25b, 0x73, 0x25b, 0x64, 0x25b, 0x3b, 0x54, 0x254, 0x301, 0x73, 0x25b, 0x64, 0x25b, 0x3b, 0x46, 0x25b, 0x6c, 0xe2, 0x79, 0x25b,
-0x64, 0x25b, 0x3b, 0x53, 0xe1, 0x73, 0x69, 0x64, 0x25b, 0x3b, 0x53, 0x254, 0x301, 0x3b, 0x4d, 0x254, 0x301, 0x3b, 0xc1, 0x4d,
-0x3b, 0x57, 0x25b, 0x301, 0x3b, 0x54, 0x254, 0x301, 0x3b, 0x46, 0x25b, 0x3b, 0x53, 0xe1, 0x3b, 0x73, 0x254, 0x6e, 0x64, 0x69,
-0x3b, 0x6c, 0x75, 0x6e, 0x64, 0x69, 0x3b, 0x6d, 0x61, 0x72, 0x64, 0x69, 0x3b, 0x6d, 0x25b, 0x72, 0x6b, 0x25b, 0x72, 0x25b,
-0x64, 0x69, 0x3b, 0x79, 0x65, 0x64, 0x69, 0x3b, 0x76, 0x61, 0x14b, 0x64, 0x25b, 0x72, 0x25b, 0x64, 0x69, 0x3b, 0x6d, 0x254,
-0x6e, 0x254, 0x20, 0x73, 0x254, 0x6e, 0x64, 0x69, 0x3b, 0x73, 0x6f, 0x3b, 0x6c, 0x75, 0x3b, 0x6d, 0x61, 0x3b, 0x6d, 0x25b,
-0x3b, 0x79, 0x65, 0x3b, 0x76, 0x61, 0x3b, 0x6d, 0x73, 0x3b, 0x41, 0x6e, 0x65, 0x67, 0x20, 0x31, 0x3b, 0x41, 0x6e, 0x65,
-0x67, 0x20, 0x32, 0x3b, 0x41, 0x6e, 0x65, 0x67, 0x20, 0x33, 0x3b, 0x41, 0x6e, 0x65, 0x67, 0x20, 0x34, 0x3b, 0x41, 0x6e,
-0x65, 0x67, 0x20, 0x35, 0x3b, 0x41, 0x6e, 0x65, 0x67, 0x20, 0x36, 0x3b, 0x41, 0x6e, 0x65, 0x67, 0x20, 0x37, 0x3b, 0x41,
-0x31, 0x3b, 0x41, 0x32, 0x3b, 0x41, 0x33, 0x3b, 0x41, 0x34, 0x3b, 0x41, 0x35, 0x3b, 0x41, 0x36, 0x3b, 0x41, 0x37, 0x3b,
-0x6c, 0x79, 0x25b, 0x2bc, 0x25b, 0x301, 0x20, 0x73, 0x1e85, 0xed, 0x14b, 0x74, 0xe8, 0x3b, 0x6d, 0x76, 0x66, 0xf2, 0x20, 0x6c,
-0x79, 0x25b, 0x30c, 0x2bc, 0x3b, 0x6d, 0x62, 0x254, 0x301, 0x254, 0x6e, 0x74, 0xe8, 0x20, 0x6d, 0x76, 0x66, 0xf2, 0x20, 0x6c,
-0x79, 0x25b, 0x30c, 0x2bc, 0x3b, 0x74, 0x73, 0xe8, 0x74, 0x73, 0x25b, 0x300, 0x25b, 0x20, 0x6c, 0x79, 0x25b, 0x30c, 0x2bc, 0x3b,
-0x6d, 0x62, 0x254, 0x301, 0x254, 0x6e, 0x74, 0xe8, 0x20, 0x74, 0x73, 0x65, 0x74, 0x73, 0x25b, 0x300, 0x25b, 0x20, 0x6c, 0x79,
-0x25b, 0x30c, 0x2bc, 0x3b, 0x6d, 0x76, 0x66, 0xf2, 0x20, 0x6d, 0xe0, 0x67, 0x61, 0x20, 0x6c, 0x79, 0x25b, 0x30c, 0x2bc, 0x3b,
-0x6d, 0xe0, 0x67, 0x61, 0x20, 0x6c, 0x79, 0x25b, 0x30c, 0x2bc, 0x3b, 0x41, 0x14b, 0x70, 0xe9, 0x74, 0x75, 0x77, 0x61, 0x6b,
-0x21f, 0x61, 0x14b, 0x3b, 0x41, 0x14b, 0x70, 0xe9, 0x74, 0x75, 0x77, 0x61, 0x14b, 0x17e, 0x69, 0x3b, 0x41, 0x14b, 0x70, 0xe9,
-0x74, 0x75, 0x6e, 0x75, 0x14b, 0x70, 0x61, 0x3b, 0x41, 0x14b, 0x70, 0xe9, 0x74, 0x75, 0x79, 0x61, 0x6d, 0x6e, 0x69, 0x3b,
-0x41, 0x14b, 0x70, 0xe9, 0x74, 0x75, 0x74, 0x6f, 0x70, 0x61, 0x3b, 0x41, 0x14b, 0x70, 0xe9, 0x74, 0x75, 0x7a, 0x61, 0x70,
-0x74, 0x61, 0x14b, 0x3b, 0x4f, 0x77, 0xe1, 0x14b, 0x67, 0x79, 0x75, 0x17e, 0x61, 0x17e, 0x61, 0x70, 0x69, 0x3b, 0x41, 0x3b,
-0x57, 0x3b, 0x4e, 0x3b, 0x59, 0x3b, 0x54, 0x3b, 0x5a, 0x3b, 0x4f, 0x3b, 0x2d30, 0x2d59, 0x2d30, 0x2d4e, 0x2d30, 0x2d59, 0x3b, 0x2d30,
-0x2d62, 0x2d4f, 0x2d30, 0x2d59, 0x3b, 0x2d30, 0x2d59, 0x2d49, 0x2d4f, 0x2d30, 0x2d59, 0x3b, 0x2d30, 0x2d3d, 0x2d55, 0x2d30, 0x2d59, 0x3b, 0x2d30, 0x2d3d,
-0x2d61, 0x2d30, 0x2d59, 0x3b, 0x2d30, 0x2d59, 0x2d49, 0x2d4e, 0x2d61, 0x2d30, 0x2d59, 0x3b, 0x2d30, 0x2d59, 0x2d49, 0x2d39, 0x2d62, 0x2d30, 0x2d59, 0x3b,
-0x6cc, 0x6d5, 0x6a9, 0x634, 0x6d5, 0x645, 0x645, 0x6d5, 0x3b, 0x62f, 0x648, 0x648, 0x634, 0x6d5, 0x645, 0x645, 0x6d5, 0x3b, 0x633, 0x6ce,
-0x634, 0x6d5, 0x645, 0x645, 0x6d5, 0x3b, 0x686, 0x648, 0x627, 0x631, 0x634, 0x6d5, 0x645, 0x645, 0x6d5, 0x3b, 0x67e, 0x6ce, 0x646, 0x62c,
-0x634, 0x6d5, 0x645, 0x645, 0x6d5, 0x3b, 0x6be, 0x6d5, 0x6cc, 0x646, 0x6cc, 0x3b, 0x634, 0x6d5, 0x645, 0x645, 0x6d5, 0x3b, 0x6cc, 0x3b,
-0x62f, 0x3b, 0x633, 0x3b, 0x686, 0x3b, 0x67e, 0x3b, 0x6be, 0x3b, 0x634, 0x3b, 0x6e, 0x6a, 0x65, 0x3b, 0x70, 0xf3, 0x6e, 0x3b,
-0x77, 0x61, 0x142, 0x3b, 0x73, 0x72, 0x6a, 0x3b, 0x73, 0x74, 0x77, 0x3b, 0x70, 0x11b, 0x74, 0x3b, 0x73, 0x6f, 0x62, 0x3b,
-0x6e, 0x6a, 0x65, 0x17a, 0x65, 0x6c, 0x61, 0x3b, 0x70, 0xf3, 0x6e, 0x6a, 0x65, 0x17a, 0x65, 0x6c, 0x65, 0x3b, 0x77, 0x61,
-0x142, 0x74, 0x6f, 0x72, 0x61, 0x3b, 0x73, 0x72, 0x6a, 0x6f, 0x64, 0x61, 0x3b, 0x73, 0x74, 0x77, 0xf3, 0x72, 0x74, 0x6b,
-0x3b, 0x70, 0x11b, 0x74, 0x6b, 0x3b, 0x73, 0x6f, 0x62, 0x6f, 0x74, 0x61, 0x3b, 0x6e, 0x3b, 0x70, 0x3b, 0x77, 0x3b, 0x73,
-0x3b, 0x73, 0x3b, 0x70, 0x3b, 0x73, 0x3b, 0x6e, 0x6a, 0x65, 0x3b, 0x70, 0xf3, 0x6e, 0x3b, 0x77, 0x75, 0x74, 0x3b, 0x73,
-0x72, 0x6a, 0x3b, 0x161, 0x74, 0x77, 0x3b, 0x70, 0x6a, 0x61, 0x3b, 0x73, 0x6f, 0x62, 0x3b, 0x6e, 0x6a, 0x65, 0x64, 0x17a,
-0x65, 0x6c, 0x61, 0x3b, 0x70, 0xf3, 0x6e, 0x64, 0x17a, 0x65, 0x6c, 0x61, 0x3b, 0x77, 0x75, 0x74, 0x6f, 0x72, 0x61, 0x3b,
-0x73, 0x72, 0x6a, 0x65, 0x64, 0x61, 0x3b, 0x161, 0x74, 0x77, 0xf3, 0x72, 0x74, 0x6b, 0x3b, 0x70, 0x6a, 0x61, 0x74, 0x6b,
-0x3b, 0x73, 0x6f, 0x62, 0x6f, 0x74, 0x61, 0x3b, 0x6e, 0x3b, 0x70, 0x3b, 0x77, 0x3b, 0x73, 0x3b, 0x161, 0x3b, 0x70, 0x3b,
-0x73, 0x3b, 0x70, 0x61, 0x73, 0x3b, 0x76, 0x75, 0x6f, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6b, 0x6f, 0x73, 0x3b, 0x74, 0x75,
-0x6f, 0x3b, 0x76, 0xe1, 0x73, 0x3b, 0x6c, 0xe1, 0x76, 0x3b, 0x70, 0x61, 0x73, 0x65, 0x70, 0x65, 0x69, 0x76, 0x69, 0x3b,
-0x76, 0x75, 0x6f, 0x73, 0x73, 0x61, 0x72, 0x67, 0xe2, 0x3b, 0x6d, 0x61, 0x6a, 0x65, 0x62, 0x61, 0x72, 0x67, 0xe2, 0x3b,
-0x6b, 0x6f, 0x73, 0x6b, 0x6f, 0x6b, 0x6b, 0x6f, 0x3b, 0x74, 0x75, 0x6f, 0x72, 0xe2, 0x73, 0x74, 0xe2, 0x68, 0x3b, 0x76,
-0xe1, 0x73, 0x74, 0x75, 0x70, 0x70, 0x65, 0x69, 0x76, 0x69, 0x3b, 0x6c, 0xe1, 0x76, 0x75, 0x72, 0x64, 0xe2, 0x68, 0x3b,
-0x70, 0x61, 0x73, 0x65, 0x70, 0x65, 0x65, 0x69, 0x76, 0x69, 0x3b, 0x76, 0x75, 0x6f, 0x73, 0x73, 0x61, 0x61, 0x72, 0x67,
-0xe2, 0x3b, 0x6d, 0x61, 0x6a, 0x65, 0x62, 0x61, 0x61, 0x72, 0x67, 0xe2, 0x3b, 0x6b, 0x6f, 0x73, 0x6b, 0x6f, 0x68, 0x6f,
-0x3b, 0x74, 0x75, 0x6f, 0x72, 0xe2, 0x73, 0x74, 0x75, 0x76, 0x3b, 0x76, 0xe1, 0x73, 0x74, 0x75, 0x70, 0x70, 0x65, 0x65,
-0x69, 0x76, 0x69, 0x3b, 0x6c, 0xe1, 0x76, 0x75, 0x72, 0x64, 0x75, 0x76, 0x3b, 0x70, 0x3b, 0x56, 0x3b, 0x4d, 0x3b, 0x4b,
-0x3b, 0x54, 0x3b, 0x56, 0x3b, 0x4c, 0x3b
+0x4d, 0x3b, 0x4d, 0x3b, 0x45, 0x3b, 0x50, 0x3b, 0x53, 0x68, 0x3b, 0x65, 0x20, 0x64, 0x69, 0x65, 0x6c, 0x3b, 0x65, 0x20,
+0x68, 0xeb, 0x6e, 0xeb, 0x3b, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x74, 0xeb, 0x3b, 0x65, 0x20, 0x6d, 0xeb, 0x72, 0x6b, 0x75,
+0x72, 0xeb, 0x3b, 0x65, 0x20, 0x65, 0x6e, 0x6a, 0x74, 0x65, 0x3b, 0x65, 0x20, 0x70, 0x72, 0x65, 0x6d, 0x74, 0x65, 0x3b,
+0x65, 0x20, 0x73, 0x68, 0x74, 0x75, 0x6e, 0xeb, 0x3b, 0x12a5, 0x1211, 0x12f5, 0x3b, 0x1230, 0x129e, 0x3b, 0x121b, 0x12ad, 0x1230, 0x3b,
+0x1228, 0x1261, 0x12d5, 0x3b, 0x1210, 0x1219, 0x1235, 0x3b, 0x12d3, 0x122d, 0x1265, 0x3b, 0x1245, 0x12f3, 0x121c, 0x3b, 0x12a5, 0x1211, 0x12f5, 0x3b,
+0x1230, 0x129e, 0x3b, 0x121b, 0x12ad, 0x1230, 0x129e, 0x3b, 0x1228, 0x1261, 0x12d5, 0x3b, 0x1210, 0x1219, 0x1235, 0x3b, 0x12d3, 0x122d, 0x1265, 0x3b,
+0x1245, 0x12f3, 0x121c, 0x3b, 0x12a5, 0x3b, 0x1230, 0x3b, 0x121b, 0x3b, 0x1228, 0x3b, 0x1210, 0x3b, 0x12d3, 0x3b, 0x1245, 0x3b, 0x627, 0x644,
+0x623, 0x62d, 0x62f, 0x3b, 0x627, 0x644, 0x627, 0x62b, 0x646, 0x64a, 0x646, 0x3b, 0x627, 0x644, 0x62b, 0x644, 0x627, 0x62b, 0x627, 0x621,
+0x3b, 0x627, 0x644, 0x623, 0x631, 0x628, 0x639, 0x627, 0x621, 0x3b, 0x627, 0x644, 0x62e, 0x645, 0x64a, 0x633, 0x3b, 0x627, 0x644, 0x62c,
+0x645, 0x639, 0x629, 0x3b, 0x627, 0x644, 0x633, 0x628, 0x62a, 0x3b, 0x62d, 0x3b, 0x646, 0x3b, 0x62b, 0x3b, 0x631, 0x3b, 0x62e, 0x3b,
+0x62c, 0x3b, 0x633, 0x3b, 0x56f, 0x56b, 0x580, 0x3b, 0x565, 0x580, 0x56f, 0x3b, 0x565, 0x580, 0x584, 0x3b, 0x579, 0x580, 0x584, 0x3b,
+0x570, 0x576, 0x563, 0x3b, 0x578, 0x582, 0x580, 0x3b, 0x577, 0x562, 0x569, 0x3b, 0x56f, 0x56b, 0x580, 0x561, 0x56f, 0x56b, 0x3b, 0x565,
+0x580, 0x56f, 0x578, 0x582, 0x577, 0x561, 0x562, 0x569, 0x56b, 0x3b, 0x565, 0x580, 0x565, 0x584, 0x577, 0x561, 0x562, 0x569, 0x56b, 0x3b,
+0x579, 0x578, 0x580, 0x565, 0x584, 0x577, 0x561, 0x562, 0x569, 0x56b, 0x3b, 0x570, 0x56b, 0x576, 0x563, 0x577, 0x561, 0x562, 0x569, 0x56b,
+0x3b, 0x578, 0x582, 0x580, 0x562, 0x561, 0x569, 0x3b, 0x577, 0x561, 0x562, 0x561, 0x569, 0x3b, 0x53f, 0x3b, 0x535, 0x3b, 0x535, 0x3b,
+0x549, 0x3b, 0x540, 0x3b, 0x548, 0x3b, 0x547, 0x3b, 0x9a6, 0x9c7, 0x993, 0x3b, 0x9b8, 0x9cb, 0x9ae, 0x3b, 0x9ae, 0x999, 0x9cd, 0x997,
+0x9b2, 0x3b, 0x9ac, 0x9c1, 0x9a7, 0x3b, 0x9ac, 0x9c3, 0x9b9, 0x3b, 0x9b6, 0x9c1, 0x995, 0x9cd, 0x9f0, 0x3b, 0x9b6, 0x9a8, 0x9bf, 0x3b,
+0x9a6, 0x9c7, 0x993, 0x9ac, 0x9be, 0x9f0, 0x3b, 0x9b8, 0x9cb, 0x9ae, 0x9ac, 0x9be, 0x9f0, 0x3b, 0x9ae, 0x999, 0x9cd, 0x997, 0x9b2, 0x9ac,
+0x9be, 0x9f0, 0x3b, 0x9ac, 0x9c1, 0x9a7, 0x9ac, 0x9be, 0x9f0, 0x3b, 0x9ac, 0x9c3, 0x9b9, 0x9b8, 0x9cd, 0x9aa, 0x9a4, 0x9bf, 0x9ac, 0x9be,
+0x9f0, 0x3b, 0x9b6, 0x9c1, 0x995, 0x9cd, 0x9f0, 0x9ac, 0x9be, 0x9f0, 0x3b, 0x9b6, 0x9a8, 0x9bf, 0x9ac, 0x9be, 0x9f0, 0x3b, 0x9a6, 0x3b,
+0x9b8, 0x3b, 0x9ae, 0x3b, 0x9ac, 0x3b, 0x9ac, 0x3b, 0x9b6, 0x3b, 0x9b6, 0x3b, 0x42, 0x2e, 0x3b, 0x42, 0x2e, 0x45, 0x2e, 0x3b,
+0xc7, 0x2e, 0x41, 0x2e, 0x3b, 0xc7, 0x2e, 0x3b, 0x43, 0x2e, 0x41, 0x2e, 0x3b, 0x43, 0x2e, 0x3b, 0x15e, 0x2e, 0x3b, 0x62,
+0x61, 0x7a, 0x61, 0x72, 0x3b, 0x62, 0x61, 0x7a, 0x61, 0x72, 0x20, 0x65, 0x72, 0x74, 0x259, 0x73, 0x69, 0x3b, 0xe7, 0x259,
+0x72, 0x15f, 0x259, 0x6e, 0x62, 0x259, 0x20, 0x61, 0x78, 0x15f, 0x61, 0x6d, 0x131, 0x3b, 0xe7, 0x259, 0x72, 0x15f, 0x259, 0x6e,
+0x62, 0x259, 0x3b, 0x63, 0xfc, 0x6d, 0x259, 0x20, 0x61, 0x78, 0x15f, 0x61, 0x6d, 0x131, 0x3b, 0x63, 0xfc, 0x6d, 0x259, 0x3b,
+0x15f, 0x259, 0x6e, 0x62, 0x259, 0x3b, 0x411, 0x2e, 0x3b, 0x411, 0x2e, 0x415, 0x2e, 0x3b, 0x427, 0x2e, 0x410, 0x2e, 0x3b, 0x427,
+0x2e, 0x3b, 0x4b8, 0x2e, 0x410, 0x2e, 0x3b, 0x4b8, 0x2e, 0x3b, 0x428, 0x2e, 0x3b, 0x431, 0x430, 0x437, 0x430, 0x440, 0x3b, 0x431,
+0x430, 0x437, 0x430, 0x440, 0x20, 0x435, 0x440, 0x442, 0x4d9, 0x441, 0x438, 0x3b, 0x447, 0x4d9, 0x440, 0x448, 0x4d9, 0x43d, 0x431, 0x4d9,
+0x20, 0x430, 0x445, 0x448, 0x430, 0x43c, 0x44b, 0x3b, 0x447, 0x4d9, 0x440, 0x448, 0x4d9, 0x43d, 0x431, 0x4d9, 0x3b, 0x4b9, 0x4af, 0x43c,
+0x4d9, 0x20, 0x430, 0x445, 0x448, 0x430, 0x43c, 0x44b, 0x3b, 0x4b9, 0x4af, 0x43c, 0x4d9, 0x3b, 0x448, 0x4d9, 0x43d, 0x431, 0x4d9, 0x3b,
+0x69, 0x67, 0x2e, 0x3b, 0x61, 0x6c, 0x2e, 0x3b, 0x61, 0x72, 0x2e, 0x3b, 0x61, 0x7a, 0x2e, 0x3b, 0x6f, 0x67, 0x2e, 0x3b,
+0x6f, 0x72, 0x2e, 0x3b, 0x6c, 0x72, 0x2e, 0x3b, 0x49, 0x67, 0x61, 0x6e, 0x64, 0x65, 0x61, 0x3b, 0x41, 0x73, 0x74, 0x65,
+0x6c, 0x65, 0x68, 0x65, 0x6e, 0x61, 0x3b, 0x41, 0x73, 0x74, 0x65, 0x61, 0x72, 0x74, 0x65, 0x61, 0x3b, 0x41, 0x73, 0x74,
+0x65, 0x61, 0x7a, 0x6b, 0x65, 0x6e, 0x61, 0x3b, 0x4f, 0x73, 0x74, 0x65, 0x67, 0x75, 0x6e, 0x61, 0x3b, 0x4f, 0x73, 0x74,
+0x69, 0x72, 0x61, 0x6c, 0x61, 0x3b, 0x4c, 0x61, 0x72, 0x75, 0x6e, 0x62, 0x61, 0x74, 0x61, 0x3b, 0x49, 0x3b, 0x41, 0x3b,
+0x41, 0x3b, 0x41, 0x3b, 0x4f, 0x3b, 0x4f, 0x3b, 0x4c, 0x3b, 0x69, 0x67, 0x61, 0x6e, 0x64, 0x65, 0x61, 0x3b, 0x61, 0x73,
+0x74, 0x65, 0x6c, 0x65, 0x68, 0x65, 0x6e, 0x61, 0x3b, 0x61, 0x73, 0x74, 0x65, 0x61, 0x72, 0x74, 0x65, 0x61, 0x3b, 0x61,
+0x73, 0x74, 0x65, 0x61, 0x7a, 0x6b, 0x65, 0x6e, 0x61, 0x3b, 0x6f, 0x73, 0x74, 0x65, 0x67, 0x75, 0x6e, 0x61, 0x3b, 0x6f,
+0x73, 0x74, 0x69, 0x72, 0x61, 0x6c, 0x61, 0x3b, 0x6c, 0x61, 0x72, 0x75, 0x6e, 0x62, 0x61, 0x74, 0x61, 0x3b, 0x9b0, 0x9ac,
+0x9bf, 0x3b, 0x9b8, 0x9cb, 0x9ae, 0x3b, 0x9ae, 0x999, 0x9cd, 0x997, 0x9b2, 0x3b, 0x9ac, 0x9c1, 0x9a7, 0x3b, 0x9ac, 0x9c3, 0x9b9, 0x9b8,
+0x9cd, 0x9aa, 0x9a4, 0x9bf, 0x3b, 0x9b6, 0x9c1, 0x995, 0x9cd, 0x9b0, 0x3b, 0x9b6, 0x9a8, 0x9bf, 0x3b, 0x9b0, 0x9ac, 0x9bf, 0x9ac, 0x9be,
+0x9b0, 0x3b, 0x9b8, 0x9cb, 0x9ae, 0x9ac, 0x9be, 0x9b0, 0x3b, 0x9ae, 0x999, 0x9cd, 0x997, 0x9b2, 0x9ac, 0x9be, 0x9b0, 0x3b, 0x9ac, 0x9c1,
+0x9a7, 0x9ac, 0x9be, 0x9b0, 0x3b, 0x9ac, 0x9c3, 0x9b9, 0x9b7, 0x9cd, 0x9aa, 0x9a4, 0x9bf, 0x9ac, 0x9be, 0x9b0, 0x3b, 0x9b6, 0x9c1, 0x995,
+0x9cd, 0x9b0, 0x9ac, 0x9be, 0x9b0, 0x3b, 0x9b6, 0x9a8, 0x9bf, 0x9ac, 0x9be, 0x9b0, 0x3b, 0x9b0, 0x3b, 0x9b8, 0x9cb, 0x3b, 0x9ae, 0x3b,
+0x9ac, 0x9c1, 0x3b, 0x9ac, 0x9c3, 0x3b, 0x9b6, 0x9c1, 0x3b, 0x9b6, 0x3b, 0x9b0, 0x9ac, 0x9bf, 0x9ac, 0x9be, 0x9b0, 0x3b, 0x9b8, 0x9cb,
+0x9ae, 0x9ac, 0x9be, 0x9b0, 0x3b, 0x9ae, 0x999, 0x9cd, 0x997, 0x9b2, 0x9ac, 0x9be, 0x9b0, 0x3b, 0x9ac, 0x9c1, 0x9a7, 0x9ac, 0x9be, 0x9b0,
+0x3b, 0x9ac, 0x9c3, 0x9b9, 0x9b8, 0x9cd, 0x9aa, 0x9a4, 0x9bf, 0x9ac, 0x9be, 0x9b0, 0x3b, 0x9b6, 0x9c1, 0x995, 0x9cd, 0x9b0, 0x9ac, 0x9be,
+0x9b0, 0x3b, 0x9b6, 0x9a8, 0x9bf, 0x9ac, 0x9be, 0x9b0, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0x3b, 0xf58, 0xf72, 0xf62, 0xf0b, 0x3b, 0xf63, 0xfb7,
+0xf42, 0xf0b, 0x3b, 0xf55, 0xf74, 0xf62, 0xf0b, 0x3b, 0xf66, 0xf44, 0xf66, 0xf0b, 0x3b, 0xf66, 0xfa4, 0xf7a, 0xf53, 0xf0b, 0x3b, 0xf49,
+0xf72, 0xf0b, 0x3b, 0xf42, 0xf5f, 0xf60, 0xf0b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0x3b, 0xf42, 0xf5f, 0xf60, 0xf0b, 0xf58, 0xf72, 0xf42,
+0xf0b, 0xf51, 0xf58, 0xf62, 0xf0b, 0x3b, 0xf42, 0xf5f, 0xf60, 0xf0b, 0xf63, 0xfb7, 0xf42, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf42, 0xf5f, 0xf60,
+0xf0b, 0xf55, 0xf74, 0xf62, 0xf0b, 0xf56, 0xf74, 0xf0b, 0x3b, 0xf42, 0xf5f, 0xf60, 0xf0b, 0xf54, 0xf0b, 0xf66, 0xf44, 0xf66, 0xf0b, 0x3b,
+0xf42, 0xf5f, 0xf60, 0xf0b, 0xf66, 0xfa4, 0xf7a, 0xf53, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf42, 0xf5f, 0xf60, 0xf0b, 0xf49, 0xf72, 0xf0b, 0xf58,
+0xf0b, 0x3b, 0xf5f, 0xfb3, 0x3b, 0xf58, 0xf72, 0xf62, 0x3b, 0xf63, 0xfb7, 0xf42, 0x3b, 0xf55, 0xf74, 0xf62, 0x3b, 0xf66, 0xf44, 0xfb6,
+0x3b, 0xf66, 0xfa4, 0xf7a, 0xf53, 0x3b, 0xf49, 0xf72, 0x3b, 0x53, 0x75, 0x6c, 0x3b, 0x4c, 0x75, 0x6e, 0x3b, 0x4d, 0x65, 0x75,
+0x2e, 0x3b, 0x4d, 0x65, 0x72, 0x2e, 0x3b, 0x59, 0x61, 0x6f, 0x75, 0x3b, 0x47, 0x77, 0x65, 0x2e, 0x3b, 0x53, 0x61, 0x64,
+0x2e, 0x3b, 0x53, 0x75, 0x6c, 0x3b, 0x4c, 0x75, 0x6e, 0x3b, 0x4d, 0x65, 0x75, 0x72, 0x7a, 0x68, 0x3b, 0x4d, 0x65, 0x72,
+0x63, 0x2bc, 0x68, 0x65, 0x72, 0x3b, 0x59, 0x61, 0x6f, 0x75, 0x3b, 0x47, 0x77, 0x65, 0x6e, 0x65, 0x72, 0x3b, 0x53, 0x61,
+0x64, 0x6f, 0x72, 0x6e, 0x3b, 0x53, 0x75, 0x3b, 0x4c, 0x3b, 0x4d, 0x7a, 0x3b, 0x4d, 0x63, 0x3b, 0x59, 0x3b, 0x47, 0x3b,
+0x53, 0x61, 0x3b, 0x43d, 0x434, 0x3b, 0x43f, 0x43d, 0x3b, 0x432, 0x442, 0x3b, 0x441, 0x440, 0x3b, 0x447, 0x442, 0x3b, 0x43f, 0x442,
+0x3b, 0x441, 0x431, 0x3b, 0x43d, 0x435, 0x434, 0x435, 0x43b, 0x44f, 0x3b, 0x43f, 0x43e, 0x43d, 0x435, 0x434, 0x435, 0x43b, 0x43d, 0x438,
+0x43a, 0x3b, 0x432, 0x442, 0x43e, 0x440, 0x43d, 0x438, 0x43a, 0x3b, 0x441, 0x440, 0x44f, 0x434, 0x430, 0x3b, 0x447, 0x435, 0x442, 0x432,
+0x44a, 0x440, 0x442, 0x44a, 0x43a, 0x3b, 0x43f, 0x435, 0x442, 0x44a, 0x43a, 0x3b, 0x441, 0x44a, 0x431, 0x43e, 0x442, 0x430, 0x3b, 0x43d,
+0x3b, 0x43f, 0x3b, 0x432, 0x3b, 0x441, 0x3b, 0x447, 0x3b, 0x43f, 0x3b, 0x441, 0x3b, 0x1010, 0x1014, 0x1004, 0x103a, 0x1039, 0x1002, 0x1014,
+0x103d, 0x1031, 0x3b, 0x1010, 0x1014, 0x1004, 0x103a, 0x1039, 0x101c, 0x102c, 0x3b, 0x1021, 0x1004, 0x103a, 0x1039, 0x1002, 0x102b, 0x3b, 0x1017, 0x102f,
+0x1012, 0x1039, 0x1013, 0x101f, 0x1030, 0x1038, 0x3b, 0x1000, 0x103c, 0x102c, 0x101e, 0x1015, 0x1010, 0x1031, 0x1038, 0x3b, 0x101e, 0x1031, 0x102c, 0x1000,
+0x103c, 0x102c, 0x3b, 0x1005, 0x1014, 0x1031, 0x3b, 0x1010, 0x3b, 0x1010, 0x3b, 0x1021, 0x3b, 0x1017, 0x3b, 0x1000, 0x3b, 0x101e, 0x3b, 0x1005,
+0x3b, 0x43d, 0x434, 0x3b, 0x43f, 0x43d, 0x3b, 0x430, 0x45e, 0x3b, 0x441, 0x440, 0x3b, 0x447, 0x446, 0x3b, 0x43f, 0x442, 0x3b, 0x441,
+0x431, 0x3b, 0x43d, 0x44f, 0x434, 0x437, 0x435, 0x43b, 0x44f, 0x3b, 0x43f, 0x430, 0x43d, 0x44f, 0x434, 0x437, 0x435, 0x43b, 0x430, 0x43a,
+0x3b, 0x430, 0x45e, 0x442, 0x43e, 0x440, 0x430, 0x43a, 0x3b, 0x441, 0x435, 0x440, 0x430, 0x434, 0x430, 0x3b, 0x447, 0x430, 0x446, 0x432,
+0x435, 0x440, 0x3b, 0x43f, 0x44f, 0x442, 0x43d, 0x456, 0x446, 0x430, 0x3b, 0x441, 0x443, 0x431, 0x43e, 0x442, 0x430, 0x3b, 0x43d, 0x3b,
+0x43f, 0x3b, 0x430, 0x3b, 0x441, 0x3b, 0x447, 0x3b, 0x43f, 0x3b, 0x441, 0x3b, 0x17a2, 0x17b6, 0x1791, 0x17b7, 0x178f, 0x17d2, 0x1799, 0x3b,
+0x1785, 0x17d0, 0x1793, 0x17d2, 0x1791, 0x3b, 0x17a2, 0x1784, 0x17d2, 0x1782, 0x17b6, 0x179a, 0x3b, 0x1796, 0x17bb, 0x1792, 0x3b, 0x1796, 0x17d2, 0x179a,
+0x17a0, 0x179f, 0x17d2, 0x1794, 0x178f, 0x17b7, 0x17cd, 0x3b, 0x179f, 0x17bb, 0x1780, 0x17d2, 0x179a, 0x3b, 0x179f, 0x17c5, 0x179a, 0x17cd, 0x3b, 0x17a2,
+0x3b, 0x1785, 0x3b, 0x17a2, 0x3b, 0x1796, 0x3b, 0x1796, 0x3b, 0x179f, 0x3b, 0x179f, 0x3b, 0x64, 0x67, 0x2e, 0x3b, 0x64, 0x6c, 0x2e,
+0x3b, 0x64, 0x74, 0x2e, 0x3b, 0x64, 0x63, 0x2e, 0x3b, 0x64, 0x6a, 0x2e, 0x3b, 0x64, 0x76, 0x2e, 0x3b, 0x64, 0x73, 0x2e,
+0x3b, 0x64, 0x69, 0x75, 0x6d, 0x65, 0x6e, 0x67, 0x65, 0x3b, 0x64, 0x69, 0x6c, 0x6c, 0x75, 0x6e, 0x73, 0x3b, 0x64, 0x69,
+0x6d, 0x61, 0x72, 0x74, 0x73, 0x3b, 0x64, 0x69, 0x6d, 0x65, 0x63, 0x72, 0x65, 0x73, 0x3b, 0x64, 0x69, 0x6a, 0x6f, 0x75,
+0x73, 0x3b, 0x64, 0x69, 0x76, 0x65, 0x6e, 0x64, 0x72, 0x65, 0x73, 0x3b, 0x64, 0x69, 0x73, 0x73, 0x61, 0x62, 0x74, 0x65,
+0x3b, 0x64, 0x67, 0x3b, 0x64, 0x6c, 0x3b, 0x64, 0x74, 0x3b, 0x64, 0x63, 0x3b, 0x64, 0x6a, 0x3b, 0x64, 0x76, 0x3b, 0x64,
+0x73, 0x3b, 0x5468, 0x65e5, 0x3b, 0x5468, 0x4e00, 0x3b, 0x5468, 0x4e8c, 0x3b, 0x5468, 0x4e09, 0x3b, 0x5468, 0x56db, 0x3b, 0x5468, 0x4e94, 0x3b,
+0x5468, 0x516d, 0x3b, 0x661f, 0x671f, 0x65e5, 0x3b, 0x661f, 0x671f, 0x4e00, 0x3b, 0x661f, 0x671f, 0x4e8c, 0x3b, 0x661f, 0x671f, 0x4e09, 0x3b, 0x661f,
+0x671f, 0x56db, 0x3b, 0x661f, 0x671f, 0x4e94, 0x3b, 0x661f, 0x671f, 0x516d, 0x3b, 0x65e5, 0x3b, 0x4e00, 0x3b, 0x4e8c, 0x3b, 0x4e09, 0x3b, 0x56db,
+0x3b, 0x4e94, 0x3b, 0x516d, 0x3b, 0x9031, 0x65e5, 0x3b, 0x9031, 0x4e00, 0x3b, 0x9031, 0x4e8c, 0x3b, 0x9031, 0x4e09, 0x3b, 0x9031, 0x56db, 0x3b,
+0x9031, 0x4e94, 0x3b, 0x9031, 0x516d, 0x3b, 0x6e, 0x65, 0x64, 0x3b, 0x70, 0x6f, 0x6e, 0x3b, 0x75, 0x74, 0x6f, 0x3b, 0x73, 0x72,
+0x69, 0x3b, 0x10d, 0x65, 0x74, 0x3b, 0x70, 0x65, 0x74, 0x3b, 0x73, 0x75, 0x62, 0x3b, 0x6e, 0x65, 0x64, 0x6a, 0x65, 0x6c,
+0x6a, 0x61, 0x3b, 0x70, 0x6f, 0x6e, 0x65, 0x64, 0x6a, 0x65, 0x6c, 0x6a, 0x61, 0x6b, 0x3b, 0x75, 0x74, 0x6f, 0x72, 0x61,
+0x6b, 0x3b, 0x73, 0x72, 0x69, 0x6a, 0x65, 0x64, 0x61, 0x3b, 0x10d, 0x65, 0x74, 0x76, 0x72, 0x74, 0x61, 0x6b, 0x3b, 0x70,
+0x65, 0x74, 0x61, 0x6b, 0x3b, 0x73, 0x75, 0x62, 0x6f, 0x74, 0x61, 0x3b, 0x6e, 0x3b, 0x70, 0x3b, 0x75, 0x3b, 0x73, 0x3b,
+0x10d, 0x3b, 0x70, 0x3b, 0x73, 0x3b, 0x4e, 0x3b, 0x50, 0x3b, 0x55, 0x3b, 0x53, 0x3b, 0x10c, 0x3b, 0x50, 0x3b, 0x53, 0x3b,
+0x6e, 0x65, 0x3b, 0x70, 0x6f, 0x3b, 0xfa, 0x74, 0x3b, 0x73, 0x74, 0x3b, 0x10d, 0x74, 0x3b, 0x70, 0xe1, 0x3b, 0x73, 0x6f,
+0x3b, 0x6e, 0x65, 0x64, 0x11b, 0x6c, 0x65, 0x3b, 0x70, 0x6f, 0x6e, 0x64, 0x11b, 0x6c, 0xed, 0x3b, 0xfa, 0x74, 0x65, 0x72,
+0xfd, 0x3b, 0x73, 0x74, 0x159, 0x65, 0x64, 0x61, 0x3b, 0x10d, 0x74, 0x76, 0x72, 0x74, 0x65, 0x6b, 0x3b, 0x70, 0xe1, 0x74,
+0x65, 0x6b, 0x3b, 0x73, 0x6f, 0x62, 0x6f, 0x74, 0x61, 0x3b, 0x4e, 0x3b, 0x50, 0x3b, 0xda, 0x3b, 0x53, 0x3b, 0x10c, 0x3b,
+0x50, 0x3b, 0x53, 0x3b, 0x73, 0xf8, 0x6e, 0x3b, 0x6d, 0x61, 0x6e, 0x3b, 0x74, 0x69, 0x72, 0x3b, 0x6f, 0x6e, 0x73, 0x3b,
+0x74, 0x6f, 0x72, 0x3b, 0x66, 0x72, 0x65, 0x3b, 0x6c, 0xf8, 0x72, 0x3b, 0x73, 0xf8, 0x6e, 0x64, 0x61, 0x67, 0x3b, 0x6d,
+0x61, 0x6e, 0x64, 0x61, 0x67, 0x3b, 0x74, 0x69, 0x72, 0x73, 0x64, 0x61, 0x67, 0x3b, 0x6f, 0x6e, 0x73, 0x64, 0x61, 0x67,
+0x3b, 0x74, 0x6f, 0x72, 0x73, 0x64, 0x61, 0x67, 0x3b, 0x66, 0x72, 0x65, 0x64, 0x61, 0x67, 0x3b, 0x6c, 0xf8, 0x72, 0x64,
+0x61, 0x67, 0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0x54, 0x3b, 0x4f, 0x3b, 0x54, 0x3b, 0x46, 0x3b, 0x4c, 0x3b, 0x73, 0xf8, 0x6e,
+0x2e, 0x3b, 0x6d, 0x61, 0x6e, 0x2e, 0x3b, 0x74, 0x69, 0x72, 0x2e, 0x3b, 0x6f, 0x6e, 0x73, 0x2e, 0x3b, 0x74, 0x6f, 0x72,
+0x2e, 0x3b, 0x66, 0x72, 0x65, 0x2e, 0x3b, 0x6c, 0xf8, 0x72, 0x2e, 0x3b, 0x7a, 0x6f, 0x3b, 0x6d, 0x61, 0x3b, 0x64, 0x69,
+0x3b, 0x77, 0x6f, 0x3b, 0x64, 0x6f, 0x3b, 0x76, 0x72, 0x3b, 0x7a, 0x61, 0x3b, 0x7a, 0x6f, 0x6e, 0x64, 0x61, 0x67, 0x3b,
+0x6d, 0x61, 0x61, 0x6e, 0x64, 0x61, 0x67, 0x3b, 0x64, 0x69, 0x6e, 0x73, 0x64, 0x61, 0x67, 0x3b, 0x77, 0x6f, 0x65, 0x6e,
+0x73, 0x64, 0x61, 0x67, 0x3b, 0x64, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x64, 0x61, 0x67, 0x3b, 0x76, 0x72, 0x69, 0x6a, 0x64,
+0x61, 0x67, 0x3b, 0x7a, 0x61, 0x74, 0x65, 0x72, 0x64, 0x61, 0x67, 0x3b, 0x5a, 0x3b, 0x4d, 0x3b, 0x44, 0x3b, 0x57, 0x3b,
+0x44, 0x3b, 0x56, 0x3b, 0x5a, 0x3b, 0x53, 0x75, 0x6e, 0x2e, 0x3b, 0x4d, 0x6f, 0x6e, 0x2e, 0x3b, 0x54, 0x75, 0x65, 0x2e,
+0x3b, 0x57, 0x65, 0x64, 0x2e, 0x3b, 0x54, 0x68, 0x75, 0x2e, 0x3b, 0x46, 0x72, 0x69, 0x2e, 0x3b, 0x53, 0x61, 0x74, 0x2e,
+0x3b, 0x53, 0x75, 0x2e, 0x3b, 0x4d, 0x2e, 0x3b, 0x54, 0x75, 0x2e, 0x3b, 0x57, 0x2e, 0x3b, 0x54, 0x68, 0x2e, 0x3b, 0x46,
+0x2e, 0x3b, 0x53, 0x61, 0x2e, 0x3b, 0x50, 0x3b, 0x45, 0x3b, 0x54, 0x3b, 0x4b, 0x3b, 0x4e, 0x3b, 0x52, 0x3b, 0x4c, 0x3b,
+0x70, 0xfc, 0x68, 0x61, 0x70, 0xe4, 0x65, 0x76, 0x3b, 0x65, 0x73, 0x6d, 0x61, 0x73, 0x70, 0xe4, 0x65, 0x76, 0x3b, 0x74,
+0x65, 0x69, 0x73, 0x69, 0x70, 0xe4, 0x65, 0x76, 0x3b, 0x6b, 0x6f, 0x6c, 0x6d, 0x61, 0x70, 0xe4, 0x65, 0x76, 0x3b, 0x6e,
+0x65, 0x6c, 0x6a, 0x61, 0x70, 0xe4, 0x65, 0x76, 0x3b, 0x72, 0x65, 0x65, 0x64, 0x65, 0x3b, 0x6c, 0x61, 0x75, 0x70, 0xe4,
+0x65, 0x76, 0x3b, 0x73, 0x75, 0x6e, 0x3b, 0x6d, 0xe1, 0x6e, 0x3b, 0x74, 0xfd, 0x73, 0x3b, 0x6d, 0x69, 0x6b, 0x3b, 0x68,
+0xf3, 0x73, 0x3b, 0x66, 0x72, 0xed, 0x3b, 0x6c, 0x65, 0x79, 0x3b, 0x73, 0x75, 0x6e, 0x6e, 0x75, 0x64, 0x61, 0x67, 0x75,
+0x72, 0x3b, 0x6d, 0xe1, 0x6e, 0x61, 0x64, 0x61, 0x67, 0x75, 0x72, 0x3b, 0x74, 0xfd, 0x73, 0x64, 0x61, 0x67, 0x75, 0x72,
+0x3b, 0x6d, 0x69, 0x6b, 0x75, 0x64, 0x61, 0x67, 0x75, 0x72, 0x3b, 0x68, 0xf3, 0x73, 0x64, 0x61, 0x67, 0x75, 0x72, 0x3b,
+0x66, 0x72, 0xed, 0x67, 0x67, 0x6a, 0x61, 0x64, 0x61, 0x67, 0x75, 0x72, 0x3b, 0x6c, 0x65, 0x79, 0x67, 0x61, 0x72, 0x64,
+0x61, 0x67, 0x75, 0x72, 0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0x54, 0x3b, 0x4d, 0x3b, 0x48, 0x3b, 0x46, 0x3b, 0x4c, 0x3b, 0x73,
+0x75, 0x6e, 0x2e, 0x3b, 0x6d, 0xe1, 0x6e, 0x2e, 0x3b, 0x74, 0xfd, 0x73, 0x2e, 0x3b, 0x6d, 0x69, 0x6b, 0x2e, 0x3b, 0x68,
+0xf3, 0x73, 0x2e, 0x3b, 0x66, 0x72, 0xed, 0x2e, 0x3b, 0x6c, 0x65, 0x79, 0x2e, 0x3b, 0x73, 0x75, 0x3b, 0x6d, 0x61, 0x3b,
+0x74, 0x69, 0x3b, 0x6b, 0x65, 0x3b, 0x74, 0x6f, 0x3b, 0x70, 0x65, 0x3b, 0x6c, 0x61, 0x3b, 0x73, 0x75, 0x6e, 0x6e, 0x75,
+0x6e, 0x74, 0x61, 0x69, 0x3b, 0x6d, 0x61, 0x61, 0x6e, 0x61, 0x6e, 0x74, 0x61, 0x69, 0x3b, 0x74, 0x69, 0x69, 0x73, 0x74,
+0x61, 0x69, 0x3b, 0x6b, 0x65, 0x73, 0x6b, 0x69, 0x76, 0x69, 0x69, 0x6b, 0x6b, 0x6f, 0x3b, 0x74, 0x6f, 0x72, 0x73, 0x74,
+0x61, 0x69, 0x3b, 0x70, 0x65, 0x72, 0x6a, 0x61, 0x6e, 0x74, 0x61, 0x69, 0x3b, 0x6c, 0x61, 0x75, 0x61, 0x6e, 0x74, 0x61,
+0x69, 0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0x54, 0x3b, 0x4b, 0x3b, 0x54, 0x3b, 0x50, 0x3b, 0x4c, 0x3b, 0x73, 0x75, 0x6e, 0x6e,
+0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x61, 0x3b, 0x6d, 0x61, 0x61, 0x6e, 0x61, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x61, 0x3b,
+0x74, 0x69, 0x69, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x61, 0x3b, 0x6b, 0x65, 0x73, 0x6b, 0x69, 0x76, 0x69, 0x69, 0x6b, 0x6b,
+0x6f, 0x6e, 0x61, 0x3b, 0x74, 0x6f, 0x72, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x61, 0x3b, 0x70, 0x65, 0x72, 0x6a, 0x61, 0x6e,
+0x74, 0x61, 0x69, 0x6e, 0x61, 0x3b, 0x6c, 0x61, 0x75, 0x61, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x61, 0x3b, 0x64, 0x69, 0x6d,
+0x2e, 0x3b, 0x6c, 0x75, 0x6e, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x2e, 0x3b, 0x6d, 0x65, 0x72, 0x2e, 0x3b, 0x6a, 0x65, 0x75,
+0x2e, 0x3b, 0x76, 0x65, 0x6e, 0x2e, 0x3b, 0x73, 0x61, 0x6d, 0x2e, 0x3b, 0x64, 0x69, 0x6d, 0x61, 0x6e, 0x63, 0x68, 0x65,
+0x3b, 0x6c, 0x75, 0x6e, 0x64, 0x69, 0x3b, 0x6d, 0x61, 0x72, 0x64, 0x69, 0x3b, 0x6d, 0x65, 0x72, 0x63, 0x72, 0x65, 0x64,
+0x69, 0x3b, 0x6a, 0x65, 0x75, 0x64, 0x69, 0x3b, 0x76, 0x65, 0x6e, 0x64, 0x72, 0x65, 0x64, 0x69, 0x3b, 0x73, 0x61, 0x6d,
+0x65, 0x64, 0x69, 0x3b, 0x44, 0x3b, 0x4c, 0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x56, 0x3b, 0x53, 0x3b, 0x73, 0x69,
+0x3b, 0x6d, 0x6f, 0x3b, 0x74, 0x69, 0x3b, 0x77, 0x6f, 0x3b, 0x74, 0x6f, 0x3b, 0x66, 0x72, 0x3b, 0x73, 0x6f, 0x3b, 0x73,
+0x6e, 0x65, 0x69, 0x6e, 0x3b, 0x6d, 0x6f, 0x61, 0x6e, 0x64, 0x65, 0x69, 0x3b, 0x74, 0x69, 0x69, 0x73, 0x64, 0x65, 0x69,
+0x3b, 0x77, 0x6f, 0x61, 0x6e, 0x73, 0x64, 0x65, 0x69, 0x3b, 0x74, 0x6f, 0x6e, 0x67, 0x65, 0x72, 0x73, 0x64, 0x65, 0x69,
+0x3b, 0x66, 0x72, 0x65, 0x65, 0x64, 0x3b, 0x73, 0x6e, 0x65, 0x6f, 0x6e, 0x3b, 0x44, 0x69, 0x44, 0x3b, 0x44, 0x69, 0x4c,
+0x3b, 0x44, 0x69, 0x4d, 0x3b, 0x44, 0x69, 0x43, 0x3b, 0x44, 0x69, 0x61, 0x3b, 0x44, 0x69, 0x68, 0x3b, 0x44, 0x69, 0x53,
+0x3b, 0x44, 0x69, 0x44, 0xf2, 0x6d, 0x68, 0x6e, 0x61, 0x69, 0x63, 0x68, 0x3b, 0x44, 0x69, 0x4c, 0x75, 0x61, 0x69, 0x6e,
+0x3b, 0x44, 0x69, 0x4d, 0xe0, 0x69, 0x72, 0x74, 0x3b, 0x44, 0x69, 0x43, 0x69, 0x61, 0x64, 0x61, 0x69, 0x6e, 0x3b, 0x44,
+0x69, 0x61, 0x72, 0x44, 0x61, 0x6f, 0x69, 0x6e, 0x3b, 0x44, 0x69, 0x68, 0x41, 0x6f, 0x69, 0x6e, 0x65, 0x3b, 0x44, 0x69,
+0x53, 0x61, 0x74, 0x68, 0x61, 0x69, 0x72, 0x6e, 0x65, 0x3b, 0x44, 0x3b, 0x4c, 0x3b, 0x4d, 0x3b, 0x43, 0x3b, 0x41, 0x3b,
+0x48, 0x3b, 0x53, 0x3b, 0x44, 0x6f, 0x6d, 0x2e, 0x3b, 0x4c, 0x75, 0x6e, 0x73, 0x3b, 0x4d, 0x61, 0x72, 0x2e, 0x3b, 0x4d,
+0xe9, 0x72, 0x2e, 0x3b, 0x58, 0x6f, 0x76, 0x2e, 0x3b, 0x56, 0x65, 0x6e, 0x2e, 0x3b, 0x53, 0xe1, 0x62, 0x2e, 0x3b, 0x44,
+0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x6f, 0x3b, 0x4c, 0x75, 0x6e, 0x73, 0x3b, 0x4d, 0x61, 0x72, 0x74, 0x65, 0x73, 0x3b, 0x4d,
+0xe9, 0x72, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x3b, 0x58, 0x6f, 0x76, 0x65, 0x73, 0x3b, 0x56, 0x65, 0x6e, 0x72, 0x65, 0x73,
+0x3b, 0x53, 0xe1, 0x62, 0x61, 0x64, 0x6f, 0x3b, 0x44, 0x3b, 0x4c, 0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x58, 0x3b, 0x56, 0x3b,
+0x53, 0x3b, 0x64, 0x6f, 0x6d, 0x2e, 0x3b, 0x6c, 0x75, 0x6e, 0x73, 0x3b, 0x6d, 0x61, 0x72, 0x2e, 0x3b, 0x6d, 0xe9, 0x72,
+0x2e, 0x3b, 0x78, 0x6f, 0x76, 0x2e, 0x3b, 0x76, 0x65, 0x6e, 0x2e, 0x3b, 0x73, 0xe1, 0x62, 0x2e, 0x3b, 0x64, 0x6f, 0x6d,
+0x69, 0x6e, 0x67, 0x6f, 0x3b, 0x6c, 0x75, 0x6e, 0x73, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x65, 0x73, 0x3b, 0x6d, 0xe9, 0x72,
+0x63, 0x6f, 0x72, 0x65, 0x73, 0x3b, 0x78, 0x6f, 0x76, 0x65, 0x73, 0x3b, 0x76, 0x65, 0x6e, 0x72, 0x65, 0x73, 0x3b, 0x73,
+0xe1, 0x62, 0x61, 0x64, 0x6f, 0x3b, 0x64, 0x2e, 0x3b, 0x6c, 0x2e, 0x3b, 0x6d, 0x2e, 0x3b, 0x6d, 0x2e, 0x3b, 0x78, 0x2e,
+0x3b, 0x76, 0x2e, 0x3b, 0x73, 0x2e, 0x3b, 0x10d9, 0x10d5, 0x10d8, 0x3b, 0x10dd, 0x10e0, 0x10e8, 0x3b, 0x10e1, 0x10d0, 0x10db, 0x3b, 0x10dd,
+0x10d7, 0x10ee, 0x3b, 0x10ee, 0x10e3, 0x10d7, 0x3b, 0x10de, 0x10d0, 0x10e0, 0x3b, 0x10e8, 0x10d0, 0x10d1, 0x3b, 0x10d9, 0x10d5, 0x10d8, 0x10e0, 0x10d0,
+0x3b, 0x10dd, 0x10e0, 0x10e8, 0x10d0, 0x10d1, 0x10d0, 0x10d7, 0x10d8, 0x3b, 0x10e1, 0x10d0, 0x10db, 0x10e8, 0x10d0, 0x10d1, 0x10d0, 0x10d7, 0x10d8, 0x3b,
+0x10dd, 0x10d7, 0x10ee, 0x10e8, 0x10d0, 0x10d1, 0x10d0, 0x10d7, 0x10d8, 0x3b, 0x10ee, 0x10e3, 0x10d7, 0x10e8, 0x10d0, 0x10d1, 0x10d0, 0x10d7, 0x10d8, 0x3b,
+0x10de, 0x10d0, 0x10e0, 0x10d0, 0x10e1, 0x10d9, 0x10d4, 0x10d5, 0x10d8, 0x3b, 0x10e8, 0x10d0, 0x10d1, 0x10d0, 0x10d7, 0x10d8, 0x3b, 0x10d9, 0x3b, 0x10dd,
+0x3b, 0x10e1, 0x3b, 0x10dd, 0x3b, 0x10ee, 0x3b, 0x10de, 0x3b, 0x10e8, 0x3b, 0x53, 0x6f, 0x3b, 0x4d, 0x6f, 0x3b, 0x44, 0x69, 0x3b,
+0x4d, 0x69, 0x3b, 0x44, 0x6f, 0x3b, 0x46, 0x72, 0x3b, 0x53, 0x61, 0x3b, 0x53, 0x6f, 0x6e, 0x6e, 0x74, 0x61, 0x67, 0x3b,
+0x4d, 0x6f, 0x6e, 0x74, 0x61, 0x67, 0x3b, 0x44, 0x69, 0x65, 0x6e, 0x73, 0x74, 0x61, 0x67, 0x3b, 0x4d, 0x69, 0x74, 0x74,
+0x77, 0x6f, 0x63, 0x68, 0x3b, 0x44, 0x6f, 0x6e, 0x6e, 0x65, 0x72, 0x73, 0x74, 0x61, 0x67, 0x3b, 0x46, 0x72, 0x65, 0x69,
+0x74, 0x61, 0x67, 0x3b, 0x53, 0x61, 0x6d, 0x73, 0x74, 0x61, 0x67, 0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0x44, 0x3b, 0x4d, 0x3b,
+0x44, 0x3b, 0x46, 0x3b, 0x53, 0x3b, 0x53, 0x6f, 0x2e, 0x3b, 0x4d, 0x6f, 0x2e, 0x3b, 0x44, 0x69, 0x2e, 0x3b, 0x4d, 0x69,
+0x2e, 0x3b, 0x44, 0x6f, 0x2e, 0x3b, 0x46, 0x72, 0x2e, 0x3b, 0x53, 0x61, 0x2e, 0x3b, 0x39a, 0x3c5, 0x3c1, 0x3b, 0x394, 0x3b5,
+0x3c5, 0x3b, 0x3a4, 0x3c1, 0x3af, 0x3b, 0x3a4, 0x3b5, 0x3c4, 0x3b, 0x3a0, 0x3ad, 0x3bc, 0x3b, 0x3a0, 0x3b1, 0x3c1, 0x3b, 0x3a3, 0x3ac,
+0x3b2, 0x3b, 0x39a, 0x3c5, 0x3c1, 0x3b9, 0x3b1, 0x3ba, 0x3ae, 0x3b, 0x394, 0x3b5, 0x3c5, 0x3c4, 0x3ad, 0x3c1, 0x3b1, 0x3b, 0x3a4, 0x3c1,
+0x3af, 0x3c4, 0x3b7, 0x3b, 0x3a4, 0x3b5, 0x3c4, 0x3ac, 0x3c1, 0x3c4, 0x3b7, 0x3b, 0x3a0, 0x3ad, 0x3bc, 0x3c0, 0x3c4, 0x3b7, 0x3b, 0x3a0,
+0x3b1, 0x3c1, 0x3b1, 0x3c3, 0x3ba, 0x3b5, 0x3c5, 0x3ae, 0x3b, 0x3a3, 0x3ac, 0x3b2, 0x3b2, 0x3b1, 0x3c4, 0x3bf, 0x3b, 0x39a, 0x3b, 0x394,
+0x3b, 0x3a4, 0x3b, 0x3a4, 0x3b, 0x3a0, 0x3b, 0x3a0, 0x3b, 0x3a3, 0x3b, 0x73, 0x61, 0x62, 0x3b, 0x61, 0x74, 0x61, 0x3b, 0x6d,
+0x61, 0x72, 0x3b, 0x70, 0x69, 0x6e, 0x3b, 0x73, 0x69, 0x73, 0x3b, 0x74, 0x61, 0x6c, 0x3b, 0x61, 0x72, 0x66, 0x3b, 0x73,
+0x61, 0x62, 0x61, 0x61, 0x74, 0x3b, 0x61, 0x74, 0x61, 0x61, 0x73, 0x69, 0x6e, 0x6e, 0x67, 0x6f, 0x72, 0x6e, 0x65, 0x71,
+0x3b, 0x6d, 0x61, 0x72, 0x6c, 0x75, 0x6e, 0x6e, 0x67, 0x6f, 0x72, 0x6e, 0x65, 0x71, 0x3b, 0x70, 0x69, 0x6e, 0x67, 0x61,
+0x73, 0x75, 0x6e, 0x6e, 0x67, 0x6f, 0x72, 0x6e, 0x65, 0x71, 0x3b, 0x73, 0x69, 0x73, 0x61, 0x6d, 0x61, 0x6e, 0x6e, 0x67,
+0x6f, 0x72, 0x6e, 0x65, 0x71, 0x3b, 0x74, 0x61, 0x6c, 0x6c, 0x69, 0x6d, 0x61, 0x6e, 0x6e, 0x67, 0x6f, 0x72, 0x6e, 0x65,
+0x71, 0x3b, 0x61, 0x72, 0x66, 0x69, 0x6e, 0x69, 0x6e, 0x6e, 0x67, 0x6f, 0x72, 0x6e, 0x65, 0x71, 0x3b, 0x53, 0x3b, 0x41,
+0x3b, 0x4d, 0x3b, 0x50, 0x3b, 0x53, 0x3b, 0x54, 0x3b, 0x41, 0x3b, 0xab0, 0xab5, 0xabf, 0x3b, 0xab8, 0xacb, 0xaae, 0x3b, 0xaae,
+0xa82, 0xa97, 0xab3, 0x3b, 0xaac, 0xac1, 0xaa7, 0x3b, 0xa97, 0xac1, 0xab0, 0xac1, 0x3b, 0xab6, 0xac1, 0xa95, 0xacd, 0xab0, 0x3b, 0xab6,
+0xaa8, 0xabf, 0x3b, 0xab0, 0xab5, 0xabf, 0xab5, 0xabe, 0xab0, 0x3b, 0xab8, 0xacb, 0xaae, 0xab5, 0xabe, 0xab0, 0x3b, 0xaae, 0xa82, 0xa97,
+0xab3, 0xab5, 0xabe, 0xab0, 0x3b, 0xaac, 0xac1, 0xaa7, 0xab5, 0xabe, 0xab0, 0x3b, 0xa97, 0xac1, 0xab0, 0xac1, 0xab5, 0xabe, 0xab0, 0x3b,
+0xab6, 0xac1, 0xa95, 0xacd, 0xab0, 0xab5, 0xabe, 0xab0, 0x3b, 0xab6, 0xaa8, 0xabf, 0xab5, 0xabe, 0xab0, 0x3b, 0xab0, 0x3b, 0xab8, 0xacb,
+0x3b, 0xaae, 0xa82, 0x3b, 0xaac, 0xac1, 0x3b, 0xa97, 0xac1, 0x3b, 0xab6, 0xac1, 0x3b, 0xab6, 0x3b, 0x4c, 0x61, 0x68, 0x3b, 0x4c,
+0x69, 0x74, 0x3b, 0x54, 0x61, 0x6c, 0x3b, 0x4c, 0x61, 0x72, 0x3b, 0x41, 0x6c, 0x68, 0x3b, 0x4a, 0x75, 0x6d, 0x3b, 0x41,
+0x73, 0x61, 0x3b, 0x4c, 0x61, 0x68, 0x61, 0x64, 0x69, 0x3b, 0x4c, 0x69, 0x74, 0x69, 0x6e, 0x69, 0x6e, 0x3b, 0x54, 0x61,
+0x6c, 0x61, 0x74, 0x61, 0x3b, 0x4c, 0x61, 0x72, 0x61, 0x62, 0x61, 0x3b, 0x41, 0x6c, 0x68, 0x61, 0x6d, 0x69, 0x73, 0x3b,
+0x4a, 0x75, 0x6d, 0x6d, 0x61, 0x2bc, 0x61, 0x3b, 0x41, 0x73, 0x61, 0x62, 0x61, 0x72, 0x3b, 0x4c, 0x3b, 0x4c, 0x3b, 0x54,
+0x3b, 0x4c, 0x3b, 0x41, 0x3b, 0x4a, 0x3b, 0x41, 0x3b, 0x5d9, 0x5d5, 0x5dd, 0x20, 0x5d0, 0x5f3, 0x3b, 0x5d9, 0x5d5, 0x5dd, 0x20,
+0x5d1, 0x5f3, 0x3b, 0x5d9, 0x5d5, 0x5dd, 0x20, 0x5d2, 0x5f3, 0x3b, 0x5d9, 0x5d5, 0x5dd, 0x20, 0x5d3, 0x5f3, 0x3b, 0x5d9, 0x5d5, 0x5dd,
+0x20, 0x5d4, 0x5f3, 0x3b, 0x5d9, 0x5d5, 0x5dd, 0x20, 0x5d5, 0x5f3, 0x3b, 0x5e9, 0x5d1, 0x5ea, 0x3b, 0x5d9, 0x5d5, 0x5dd, 0x20, 0x5e8,
+0x5d0, 0x5e9, 0x5d5, 0x5df, 0x3b, 0x5d9, 0x5d5, 0x5dd, 0x20, 0x5e9, 0x5e0, 0x5d9, 0x3b, 0x5d9, 0x5d5, 0x5dd, 0x20, 0x5e9, 0x5dc, 0x5d9,
+0x5e9, 0x5d9, 0x3b, 0x5d9, 0x5d5, 0x5dd, 0x20, 0x5e8, 0x5d1, 0x5d9, 0x5e2, 0x5d9, 0x3b, 0x5d9, 0x5d5, 0x5dd, 0x20, 0x5d7, 0x5de, 0x5d9,
+0x5e9, 0x5d9, 0x3b, 0x5d9, 0x5d5, 0x5dd, 0x20, 0x5e9, 0x5d9, 0x5e9, 0x5d9, 0x3b, 0x5d9, 0x5d5, 0x5dd, 0x20, 0x5e9, 0x5d1, 0x5ea, 0x3b,
+0x5d0, 0x5f3, 0x3b, 0x5d1, 0x5f3, 0x3b, 0x5d2, 0x5f3, 0x3b, 0x5d3, 0x5f3, 0x3b, 0x5d4, 0x5f3, 0x3b, 0x5d5, 0x5f3, 0x3b, 0x5e9, 0x5f3,
+0x3b, 0x930, 0x935, 0x93f, 0x3b, 0x938, 0x94b, 0x92e, 0x3b, 0x92e, 0x902, 0x917, 0x932, 0x3b, 0x92c, 0x941, 0x927, 0x3b, 0x917, 0x941,
+0x930, 0x941, 0x3b, 0x936, 0x941, 0x915, 0x94d, 0x930, 0x3b, 0x936, 0x928, 0x93f, 0x3b, 0x930, 0x935, 0x93f, 0x935, 0x93e, 0x930, 0x3b,
+0x938, 0x94b, 0x92e, 0x935, 0x93e, 0x930, 0x3b, 0x92e, 0x902, 0x917, 0x932, 0x935, 0x93e, 0x930, 0x3b, 0x92c, 0x941, 0x927, 0x935, 0x93e,
+0x930, 0x3b, 0x917, 0x941, 0x930, 0x941, 0x935, 0x93e, 0x930, 0x3b, 0x936, 0x941, 0x915, 0x94d, 0x930, 0x935, 0x93e, 0x930, 0x3b, 0x936,
+0x928, 0x93f, 0x935, 0x93e, 0x930, 0x3b, 0x930, 0x3b, 0x938, 0x94b, 0x3b, 0x92e, 0x902, 0x3b, 0x92c, 0x941, 0x3b, 0x917, 0x941, 0x3b,
+0x936, 0x941, 0x3b, 0x936, 0x3b, 0x56, 0x3b, 0x48, 0x3b, 0x4b, 0x3b, 0x53, 0x7a, 0x65, 0x3b, 0x43, 0x73, 0x3b, 0x50, 0x3b,
+0x53, 0x7a, 0x6f, 0x3b, 0x76, 0x61, 0x73, 0xe1, 0x72, 0x6e, 0x61, 0x70, 0x3b, 0x68, 0xe9, 0x74, 0x66, 0x151, 0x3b, 0x6b,
+0x65, 0x64, 0x64, 0x3b, 0x73, 0x7a, 0x65, 0x72, 0x64, 0x61, 0x3b, 0x63, 0x73, 0xfc, 0x74, 0xf6, 0x72, 0x74, 0xf6, 0x6b,
+0x3b, 0x70, 0xe9, 0x6e, 0x74, 0x65, 0x6b, 0x3b, 0x73, 0x7a, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x3b, 0x56, 0x3b, 0x48, 0x3b,
+0x4b, 0x3b, 0x53, 0x7a, 0x3b, 0x43, 0x73, 0x3b, 0x50, 0x3b, 0x53, 0x7a, 0x3b, 0x73, 0x75, 0x6e, 0x2e, 0x3b, 0x6d, 0xe1,
+0x6e, 0x2e, 0x3b, 0xfe, 0x72, 0x69, 0x2e, 0x3b, 0x6d, 0x69, 0xf0, 0x2e, 0x3b, 0x66, 0x69, 0x6d, 0x2e, 0x3b, 0x66, 0xf6,
+0x73, 0x2e, 0x3b, 0x6c, 0x61, 0x75, 0x2e, 0x3b, 0x73, 0x75, 0x6e, 0x6e, 0x75, 0x64, 0x61, 0x67, 0x75, 0x72, 0x3b, 0x6d,
+0xe1, 0x6e, 0x75, 0x64, 0x61, 0x67, 0x75, 0x72, 0x3b, 0xfe, 0x72, 0x69, 0xf0, 0x6a, 0x75, 0x64, 0x61, 0x67, 0x75, 0x72,
+0x3b, 0x6d, 0x69, 0xf0, 0x76, 0x69, 0x6b, 0x75, 0x64, 0x61, 0x67, 0x75, 0x72, 0x3b, 0x66, 0x69, 0x6d, 0x6d, 0x74, 0x75,
+0x64, 0x61, 0x67, 0x75, 0x72, 0x3b, 0x66, 0xf6, 0x73, 0x74, 0x75, 0x64, 0x61, 0x67, 0x75, 0x72, 0x3b, 0x6c, 0x61, 0x75,
+0x67, 0x61, 0x72, 0x64, 0x61, 0x67, 0x75, 0x72, 0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0xde, 0x3b, 0x4d, 0x3b, 0x46, 0x3b, 0x46,
+0x3b, 0x4c, 0x3b, 0x4d, 0x69, 0x6e, 0x3b, 0x53, 0x65, 0x6e, 0x3b, 0x53, 0x65, 0x6c, 0x3b, 0x52, 0x61, 0x62, 0x3b, 0x4b,
+0x61, 0x6d, 0x3b, 0x4a, 0x75, 0x6d, 0x3b, 0x53, 0x61, 0x62, 0x3b, 0x4d, 0x69, 0x6e, 0x67, 0x67, 0x75, 0x3b, 0x53, 0x65,
+0x6e, 0x69, 0x6e, 0x3b, 0x53, 0x65, 0x6c, 0x61, 0x73, 0x61, 0x3b, 0x52, 0x61, 0x62, 0x75, 0x3b, 0x4b, 0x61, 0x6d, 0x69,
+0x73, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x74, 0x3b, 0x53, 0x61, 0x62, 0x74, 0x75, 0x3b, 0x4d, 0x3b, 0x53, 0x3b, 0x53, 0x3b,
+0x52, 0x3b, 0x4b, 0x3b, 0x4a, 0x3b, 0x53, 0x3b, 0x44, 0x6f, 0x6d, 0x68, 0x3b, 0x4c, 0x75, 0x61, 0x6e, 0x3b, 0x4d, 0xe1,
+0x69, 0x72, 0x74, 0x3b, 0x43, 0xe9, 0x61, 0x64, 0x3b, 0x44, 0xe9, 0x61, 0x72, 0x3b, 0x41, 0x6f, 0x69, 0x6e, 0x65, 0x3b,
+0x53, 0x61, 0x74, 0x68, 0x3b, 0x44, 0xe9, 0x20, 0x44, 0x6f, 0x6d, 0x68, 0x6e, 0x61, 0x69, 0x67, 0x68, 0x3b, 0x44, 0xe9,
+0x20, 0x4c, 0x75, 0x61, 0x69, 0x6e, 0x3b, 0x44, 0xe9, 0x20, 0x4d, 0xe1, 0x69, 0x72, 0x74, 0x3b, 0x44, 0xe9, 0x20, 0x43,
+0xe9, 0x61, 0x64, 0x61, 0x6f, 0x69, 0x6e, 0x3b, 0x44, 0xe9, 0x61, 0x72, 0x64, 0x61, 0x6f, 0x69, 0x6e, 0x3b, 0x44, 0xe9,
+0x20, 0x68, 0x41, 0x6f, 0x69, 0x6e, 0x65, 0x3b, 0x44, 0xe9, 0x20, 0x53, 0x61, 0x74, 0x68, 0x61, 0x69, 0x72, 0x6e, 0x3b,
+0x44, 0x3b, 0x4c, 0x3b, 0x4d, 0x3b, 0x43, 0x3b, 0x44, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x64, 0x6f, 0x6d, 0x3b, 0x6c, 0x75,
+0x6e, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x6d, 0x65, 0x72, 0x3b, 0x67, 0x69, 0x6f, 0x3b, 0x76, 0x65, 0x6e, 0x3b, 0x73, 0x61,
+0x62, 0x3b, 0x64, 0x6f, 0x6d, 0x65, 0x6e, 0x69, 0x63, 0x61, 0x3b, 0x6c, 0x75, 0x6e, 0x65, 0x64, 0xec, 0x3b, 0x6d, 0x61,
+0x72, 0x74, 0x65, 0x64, 0xec, 0x3b, 0x6d, 0x65, 0x72, 0x63, 0x6f, 0x6c, 0x65, 0x64, 0xec, 0x3b, 0x67, 0x69, 0x6f, 0x76,
+0x65, 0x64, 0xec, 0x3b, 0x76, 0x65, 0x6e, 0x65, 0x72, 0x64, 0xec, 0x3b, 0x73, 0x61, 0x62, 0x61, 0x74, 0x6f, 0x3b, 0x44,
+0x3b, 0x4c, 0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x47, 0x3b, 0x56, 0x3b, 0x53, 0x3b, 0x65e5, 0x3b, 0x6708, 0x3b, 0x706b, 0x3b, 0x6c34,
+0x3b, 0x6728, 0x3b, 0x91d1, 0x3b, 0x571f, 0x3b, 0x65e5, 0x66dc, 0x65e5, 0x3b, 0x6708, 0x66dc, 0x65e5, 0x3b, 0x706b, 0x66dc, 0x65e5, 0x3b, 0x6c34,
+0x66dc, 0x65e5, 0x3b, 0x6728, 0x66dc, 0x65e5, 0x3b, 0x91d1, 0x66dc, 0x65e5, 0x3b, 0x571f, 0x66dc, 0x65e5, 0x3b, 0xcad, 0xcbe, 0xca8, 0xcc1, 0x3b,
+0xcb8, 0xccb, 0xcae, 0x3b, 0xcae, 0xc82, 0xc97, 0xcb3, 0x3b, 0xcac, 0xcc1, 0xca7, 0x3b, 0xc97, 0xcc1, 0xcb0, 0xcc1, 0x3b, 0xcb6, 0xcc1,
+0xc95, 0xccd, 0xcb0, 0x3b, 0xcb6, 0xca8, 0xcbf, 0x3b, 0xcad, 0xcbe, 0xca8, 0xcc1, 0xcb5, 0xcbe, 0xcb0, 0x3b, 0xcb8, 0xccb, 0xcae, 0xcb5,
+0xcbe, 0xcb0, 0x3b, 0xcae, 0xc82, 0xc97, 0xcb3, 0xcb5, 0xcbe, 0xcb0, 0x3b, 0xcac, 0xcc1, 0xca7, 0xcb5, 0xcbe, 0xcb0, 0x3b, 0xc97, 0xcc1,
+0xcb0, 0xcc1, 0xcb5, 0xcbe, 0xcb0, 0x3b, 0xcb6, 0xcc1, 0xc95, 0xccd, 0xcb0, 0xcb5, 0xcbe, 0xcb0, 0x3b, 0xcb6, 0xca8, 0xcbf, 0xcb5, 0xcbe,
+0xcb0, 0x3b, 0xcad, 0xcbe, 0x3b, 0xcb8, 0xccb, 0x3b, 0xcae, 0xc82, 0x3b, 0xcac, 0xcc1, 0x3b, 0xc97, 0xcc1, 0x3b, 0xcb6, 0xcc1, 0x3b,
+0xcb6, 0x3b, 0x622, 0x62a, 0x6be, 0x648, 0x627, 0x631, 0x3b, 0x698, 0x654, 0x646, 0x65b, 0x62f, 0x655, 0x631, 0x648, 0x627, 0x631, 0x3b,
+0x628, 0x648, 0x65a, 0x645, 0x648, 0x627, 0x631, 0x3b, 0x628, 0x648, 0x62f, 0x648, 0x627, 0x631, 0x3b, 0x628, 0x631, 0x65b, 0x66e, 0x6ea,
+0x633, 0x648, 0x627, 0x631, 0x3b, 0x62c, 0x64f, 0x645, 0x6c1, 0x3b, 0x628, 0x679, 0x648, 0x627, 0x631, 0x3b, 0x627, 0x64e, 0x62a, 0x6be,
+0x648, 0x627, 0x631, 0x3b, 0x698, 0x654, 0x646, 0x65b, 0x62f, 0x631, 0x655, 0x631, 0x648, 0x627, 0x631, 0x3b, 0x628, 0x648, 0x65a, 0x645,
+0x648, 0x627, 0x631, 0x3b, 0x628, 0x648, 0x62f, 0x648, 0x627, 0x631, 0x3b, 0x628, 0x631, 0x65b, 0x66e, 0x6ea, 0x633, 0x648, 0x627, 0x631,
+0x3b, 0x62c, 0x64f, 0x645, 0x6c1, 0x3b, 0x628, 0x679, 0x648, 0x627, 0x631, 0x3b, 0x627, 0x3b, 0x698, 0x3b, 0x628, 0x3b, 0x628, 0x3b,
+0x628, 0x3b, 0x62c, 0x3b, 0x628, 0x3b, 0x416, 0x441, 0x3b, 0x414, 0x441, 0x3b, 0x421, 0x441, 0x3b, 0x421, 0x440, 0x3b, 0x411, 0x441,
+0x3b, 0x416, 0x43c, 0x3b, 0x421, 0x431, 0x3b, 0x416, 0x435, 0x43a, 0x441, 0x435, 0x43d, 0x431, 0x456, 0x3b, 0x414, 0x4af, 0x439, 0x441,
+0x435, 0x43d, 0x431, 0x456, 0x3b, 0x421, 0x435, 0x439, 0x441, 0x435, 0x43d, 0x431, 0x456, 0x3b, 0x421, 0x4d9, 0x440, 0x441, 0x435, 0x43d,
+0x431, 0x456, 0x3b, 0x411, 0x435, 0x439, 0x441, 0x435, 0x43d, 0x431, 0x456, 0x3b, 0x416, 0x4b1, 0x43c, 0x430, 0x3b, 0x421, 0x435, 0x43d,
+0x431, 0x456, 0x3b, 0x416, 0x3b, 0x414, 0x3b, 0x421, 0x3b, 0x421, 0x3b, 0x411, 0x3b, 0x416, 0x3b, 0x421, 0x3b, 0x436, 0x435, 0x43a,
+0x441, 0x435, 0x43d, 0x431, 0x456, 0x3b, 0x434, 0x4af, 0x439, 0x441, 0x435, 0x43d, 0x431, 0x456, 0x3b, 0x441, 0x435, 0x439, 0x441, 0x435,
+0x43d, 0x431, 0x456, 0x3b, 0x441, 0x4d9, 0x440, 0x441, 0x435, 0x43d, 0x431, 0x456, 0x3b, 0x431, 0x435, 0x439, 0x441, 0x435, 0x43d, 0x431,
+0x456, 0x3b, 0x436, 0x4b1, 0x43c, 0x430, 0x3b, 0x441, 0x435, 0x43d, 0x431, 0x456, 0x3b, 0x63, 0x79, 0x75, 0x2e, 0x3b, 0x6d, 0x62,
+0x65, 0x2e, 0x3b, 0x6b, 0x61, 0x62, 0x2e, 0x3b, 0x67, 0x74, 0x75, 0x2e, 0x3b, 0x6b, 0x61, 0x6e, 0x2e, 0x3b, 0x67, 0x6e,
+0x75, 0x2e, 0x3b, 0x67, 0x6e, 0x64, 0x2e, 0x3b, 0x4b, 0x75, 0x20, 0x63, 0x79, 0x75, 0x6d, 0x77, 0x65, 0x72, 0x75, 0x3b,
+0x4b, 0x75, 0x77, 0x61, 0x20, 0x6d, 0x62, 0x65, 0x72, 0x65, 0x3b, 0x4b, 0x75, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x62, 0x69,
+0x72, 0x69, 0x3b, 0x4b, 0x75, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x4b, 0x75, 0x77, 0x61, 0x20,
+0x6b, 0x61, 0x6e, 0x65, 0x3b, 0x4b, 0x75, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x6e, 0x75, 0x3b, 0x4b, 0x75, 0x77,
+0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x74, 0x75, 0x3b, 0x436, 0x435, 0x43a, 0x2e, 0x3b, 0x434, 0x4af, 0x439,
+0x2e, 0x3b, 0x448, 0x435, 0x439, 0x448, 0x2e, 0x3b, 0x448, 0x430, 0x440, 0x448, 0x2e, 0x3b, 0x431, 0x435, 0x439, 0x448, 0x2e, 0x3b,
+0x436, 0x443, 0x43c, 0x430, 0x3b, 0x438, 0x448, 0x43c, 0x2e, 0x3b, 0x436, 0x435, 0x43a, 0x448, 0x435, 0x43c, 0x431, 0x438, 0x3b, 0x434,
+0x4af, 0x439, 0x448, 0x4e9, 0x43c, 0x431, 0x4af, 0x3b, 0x448, 0x435, 0x439, 0x448, 0x435, 0x43c, 0x431, 0x438, 0x3b, 0x448, 0x430, 0x440,
+0x448, 0x435, 0x43c, 0x431, 0x438, 0x3b, 0x431, 0x435, 0x439, 0x448, 0x435, 0x43c, 0x431, 0x438, 0x3b, 0x436, 0x443, 0x43c, 0x430, 0x3b,
+0x438, 0x448, 0x435, 0x43c, 0x431, 0x438, 0x3b, 0x416, 0x3b, 0x414, 0x3b, 0x428, 0x3b, 0x428, 0x3b, 0x411, 0x3b, 0x416, 0x3b, 0x418,
+0x3b, 0xc77c, 0x3b, 0xc6d4, 0x3b, 0xd654, 0x3b, 0xc218, 0x3b, 0xbaa9, 0x3b, 0xae08, 0x3b, 0xd1a0, 0x3b, 0xc77c, 0xc694, 0xc77c, 0x3b, 0xc6d4,
+0xc694, 0xc77c, 0x3b, 0xd654, 0xc694, 0xc77c, 0x3b, 0xc218, 0xc694, 0xc77c, 0x3b, 0xbaa9, 0xc694, 0xc77c, 0x3b, 0xae08, 0xc694, 0xc77c, 0x3b, 0xd1a0,
+0xc694, 0xc77c, 0x3b, 0x63, 0x75, 0x2e, 0x3b, 0x6d, 0x62, 0x65, 0x2e, 0x3b, 0x6b, 0x61, 0x62, 0x2e, 0x3b, 0x67, 0x74, 0x75,
+0x2e, 0x3b, 0x6b, 0x61, 0x6e, 0x2e, 0x3b, 0x67, 0x6e, 0x75, 0x2e, 0x3b, 0x67, 0x6e, 0x64, 0x2e, 0x3b, 0x4b, 0x75, 0x20,
+0x77, 0x2019, 0x69, 0x6e, 0x64, 0x77, 0x69, 0x3b, 0x4b, 0x75, 0x20, 0x77, 0x61, 0x20, 0x6d, 0x62, 0x65, 0x72, 0x65, 0x3b,
+0x4b, 0x75, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x62, 0x69, 0x72, 0x69, 0x3b, 0x4b, 0x75, 0x20, 0x77, 0x61, 0x20, 0x67,
+0x61, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x4b, 0x75, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x65, 0x3b, 0x4b, 0x75, 0x20,
+0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x6e, 0x75, 0x3b, 0x4b, 0x75, 0x20, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61,
+0x6e, 0x64, 0x61, 0x74, 0x75, 0x3b, 0xead, 0xeb2, 0xe97, 0xeb4, 0xe94, 0x3b, 0xe88, 0xeb1, 0xe99, 0x3b, 0xead, 0xeb1, 0xe87, 0xe84,
+0xeb2, 0xe99, 0x3b, 0xe9e, 0xeb8, 0xe94, 0x3b, 0xe9e, 0xeb0, 0xeab, 0xeb1, 0xe94, 0x3b, 0xeaa, 0xeb8, 0xe81, 0x3b, 0xec0, 0xeaa, 0xebb,
+0xeb2, 0x3b, 0xea7, 0xeb1, 0xe99, 0xead, 0xeb2, 0xe97, 0xeb4, 0xe94, 0x3b, 0xea7, 0xeb1, 0xe99, 0xe88, 0xeb1, 0xe99, 0x3b, 0xea7, 0xeb1,
+0xe99, 0xead, 0xeb1, 0xe87, 0xe84, 0xeb2, 0xe99, 0x3b, 0xea7, 0xeb1, 0xe99, 0xe9e, 0xeb8, 0xe94, 0x3b, 0xea7, 0xeb1, 0xe99, 0xe9e, 0xeb0,
+0xeab, 0xeb1, 0xe94, 0x3b, 0xea7, 0xeb1, 0xe99, 0xeaa, 0xeb8, 0xe81, 0x3b, 0xea7, 0xeb1, 0xe99, 0xec0, 0xeaa, 0xebb, 0xeb2, 0x3b, 0xead,
+0xeb2, 0x3b, 0xe88, 0x3b, 0xead, 0x3b, 0xe9e, 0x3b, 0xe9e, 0xeab, 0x3b, 0xeaa, 0xeb8, 0x3b, 0xeaa, 0x3b, 0x53, 0x76, 0x113, 0x74,
+0x64, 0x2e, 0x3b, 0x50, 0x69, 0x72, 0x6d, 0x64, 0x2e, 0x3b, 0x4f, 0x74, 0x72, 0x64, 0x2e, 0x3b, 0x54, 0x72, 0x65, 0x161,
+0x64, 0x2e, 0x3b, 0x43, 0x65, 0x74, 0x75, 0x72, 0x74, 0x64, 0x2e, 0x3b, 0x50, 0x69, 0x65, 0x6b, 0x74, 0x64, 0x2e, 0x3b,
+0x53, 0x65, 0x73, 0x74, 0x64, 0x2e, 0x3b, 0x53, 0x76, 0x113, 0x74, 0x64, 0x69, 0x65, 0x6e, 0x61, 0x3b, 0x50, 0x69, 0x72,
+0x6d, 0x64, 0x69, 0x65, 0x6e, 0x61, 0x3b, 0x4f, 0x74, 0x72, 0x64, 0x69, 0x65, 0x6e, 0x61, 0x3b, 0x54, 0x72, 0x65, 0x161,
+0x64, 0x69, 0x65, 0x6e, 0x61, 0x3b, 0x43, 0x65, 0x74, 0x75, 0x72, 0x74, 0x64, 0x69, 0x65, 0x6e, 0x61, 0x3b, 0x50, 0x69,
+0x65, 0x6b, 0x74, 0x64, 0x69, 0x65, 0x6e, 0x61, 0x3b, 0x53, 0x65, 0x73, 0x74, 0x64, 0x69, 0x65, 0x6e, 0x61, 0x3b, 0x53,
+0x3b, 0x50, 0x3b, 0x4f, 0x3b, 0x54, 0x3b, 0x43, 0x3b, 0x50, 0x3b, 0x53, 0x3b, 0x73, 0x76, 0x113, 0x74, 0x64, 0x2e, 0x3b,
+0x70, 0x69, 0x72, 0x6d, 0x64, 0x2e, 0x3b, 0x6f, 0x74, 0x72, 0x64, 0x2e, 0x3b, 0x74, 0x72, 0x65, 0x161, 0x64, 0x2e, 0x3b,
+0x63, 0x65, 0x74, 0x75, 0x72, 0x74, 0x64, 0x2e, 0x3b, 0x70, 0x69, 0x65, 0x6b, 0x74, 0x64, 0x2e, 0x3b, 0x73, 0x65, 0x73,
+0x74, 0x64, 0x2e, 0x3b, 0x73, 0x76, 0x113, 0x74, 0x64, 0x69, 0x65, 0x6e, 0x61, 0x3b, 0x70, 0x69, 0x72, 0x6d, 0x64, 0x69,
+0x65, 0x6e, 0x61, 0x3b, 0x6f, 0x74, 0x72, 0x64, 0x69, 0x65, 0x6e, 0x61, 0x3b, 0x74, 0x72, 0x65, 0x161, 0x64, 0x69, 0x65,
+0x6e, 0x61, 0x3b, 0x63, 0x65, 0x74, 0x75, 0x72, 0x74, 0x64, 0x69, 0x65, 0x6e, 0x61, 0x3b, 0x70, 0x69, 0x65, 0x6b, 0x74,
+0x64, 0x69, 0x65, 0x6e, 0x61, 0x3b, 0x73, 0x65, 0x73, 0x74, 0x64, 0x69, 0x65, 0x6e, 0x61, 0x3b, 0x65, 0x79, 0x65, 0x3b,
+0x79, 0x62, 0x6f, 0x3b, 0x6d, 0x62, 0x6c, 0x3b, 0x6d, 0x73, 0x74, 0x3b, 0x6d, 0x69, 0x6e, 0x3b, 0x6d, 0x74, 0x6e, 0x3b,
+0x6d, 0x70, 0x73, 0x3b, 0x65, 0x79, 0x65, 0x6e, 0x67, 0x61, 0x3b, 0x6d, 0x6f, 0x6b, 0x254, 0x6c, 0x254, 0x20, 0x6d, 0x77,
+0x61, 0x20, 0x79, 0x61, 0x6d, 0x62, 0x6f, 0x3b, 0x6d, 0x6f, 0x6b, 0x254, 0x6c, 0x254, 0x20, 0x6d, 0x77, 0x61, 0x20, 0x6d,
+0xed, 0x62, 0x61, 0x6c, 0xe9, 0x3b, 0x6d, 0x6f, 0x6b, 0x254, 0x6c, 0x254, 0x20, 0x6d, 0x77, 0x61, 0x20, 0x6d, 0xed, 0x73,
+0xe1, 0x74, 0x6f, 0x3b, 0x6d, 0x6f, 0x6b, 0x254, 0x6c, 0x254, 0x20, 0x79, 0x61, 0x20, 0x6d, 0xed, 0x6e, 0xe9, 0x69, 0x3b,
+0x6d, 0x6f, 0x6b, 0x254, 0x6c, 0x254, 0x20, 0x79, 0x61, 0x20, 0x6d, 0xed, 0x74, 0xe1, 0x6e, 0x6f, 0x3b, 0x6d, 0x70, 0x254,
+0x301, 0x73, 0x254, 0x3b, 0x65, 0x3b, 0x79, 0x3b, 0x6d, 0x3b, 0x6d, 0x3b, 0x6d, 0x3b, 0x6d, 0x3b, 0x70, 0x3b, 0x73, 0x6b,
+0x3b, 0x70, 0x72, 0x3b, 0x61, 0x6e, 0x3b, 0x74, 0x72, 0x3b, 0x6b, 0x74, 0x3b, 0x70, 0x6e, 0x3b, 0x161, 0x74, 0x3b, 0x73,
+0x65, 0x6b, 0x6d, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x69, 0x73, 0x3b, 0x70, 0x69, 0x72, 0x6d, 0x61, 0x64, 0x69, 0x65, 0x6e,
+0x69, 0x73, 0x3b, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x69, 0x73, 0x3b, 0x74, 0x72, 0x65, 0x10d, 0x69,
+0x61, 0x64, 0x69, 0x65, 0x6e, 0x69, 0x73, 0x3b, 0x6b, 0x65, 0x74, 0x76, 0x69, 0x72, 0x74, 0x61, 0x64, 0x69, 0x65, 0x6e,
+0x69, 0x73, 0x3b, 0x70, 0x65, 0x6e, 0x6b, 0x74, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x69, 0x73, 0x3b, 0x161, 0x65, 0x161, 0x74,
+0x61, 0x64, 0x69, 0x65, 0x6e, 0x69, 0x73, 0x3b, 0x53, 0x3b, 0x50, 0x3b, 0x41, 0x3b, 0x54, 0x3b, 0x4b, 0x3b, 0x50, 0x3b,
+0x160, 0x3b, 0x43d, 0x435, 0x434, 0x2e, 0x3b, 0x43f, 0x43e, 0x43d, 0x2e, 0x3b, 0x432, 0x442, 0x43e, 0x2e, 0x3b, 0x441, 0x440, 0x435,
+0x2e, 0x3b, 0x447, 0x435, 0x442, 0x2e, 0x3b, 0x43f, 0x435, 0x442, 0x2e, 0x3b, 0x441, 0x430, 0x431, 0x2e, 0x3b, 0x43d, 0x435, 0x434,
+0x435, 0x43b, 0x430, 0x3b, 0x43f, 0x43e, 0x43d, 0x435, 0x434, 0x435, 0x43b, 0x43d, 0x438, 0x43a, 0x3b, 0x432, 0x442, 0x43e, 0x440, 0x43d,
+0x438, 0x43a, 0x3b, 0x441, 0x440, 0x435, 0x434, 0x430, 0x3b, 0x447, 0x435, 0x442, 0x432, 0x440, 0x442, 0x43e, 0x43a, 0x3b, 0x43f, 0x435,
+0x442, 0x43e, 0x43a, 0x3b, 0x441, 0x430, 0x431, 0x43e, 0x442, 0x430, 0x3b, 0x43d, 0x435, 0x434, 0x2e, 0x3b, 0x43f, 0x43e, 0x43d, 0x2e,
+0x3b, 0x432, 0x442, 0x2e, 0x3b, 0x441, 0x440, 0x435, 0x2e, 0x3b, 0x447, 0x435, 0x442, 0x2e, 0x3b, 0x43f, 0x435, 0x442, 0x2e, 0x3b,
+0x441, 0x430, 0x431, 0x2e, 0x3b, 0x41, 0x6c, 0x61, 0x68, 0x3b, 0x41, 0x6c, 0x61, 0x74, 0x73, 0x3b, 0x54, 0x61, 0x6c, 0x3b,
+0x41, 0x6c, 0x61, 0x72, 0x3b, 0x41, 0x6c, 0x61, 0x6b, 0x3b, 0x5a, 0x6f, 0x6d, 0x3b, 0x41, 0x73, 0x61, 0x62, 0x3b, 0x41,
+0x6c, 0x61, 0x68, 0x61, 0x64, 0x79, 0x3b, 0x41, 0x6c, 0x61, 0x74, 0x73, 0x69, 0x6e, 0x61, 0x69, 0x6e, 0x79, 0x3b, 0x54,
+0x61, 0x6c, 0x61, 0x74, 0x61, 0x3b, 0x41, 0x6c, 0x61, 0x72, 0x6f, 0x62, 0x69, 0x61, 0x3b, 0x41, 0x6c, 0x61, 0x6b, 0x61,
+0x6d, 0x69, 0x73, 0x79, 0x3b, 0x5a, 0x6f, 0x6d, 0x61, 0x3b, 0x41, 0x73, 0x61, 0x62, 0x6f, 0x74, 0x73, 0x79, 0x3b, 0x41,
+0x3b, 0x41, 0x3b, 0x54, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x5a, 0x3b, 0x41, 0x3b, 0x41, 0x68, 0x64, 0x3b, 0x49, 0x73, 0x6e,
+0x3b, 0x53, 0x65, 0x6c, 0x3b, 0x52, 0x61, 0x62, 0x3b, 0x4b, 0x68, 0x61, 0x3b, 0x4a, 0x75, 0x6d, 0x3b, 0x53, 0x61, 0x62,
+0x3b, 0x41, 0x68, 0x61, 0x64, 0x3b, 0x49, 0x73, 0x6e, 0x69, 0x6e, 0x3b, 0x53, 0x65, 0x6c, 0x61, 0x73, 0x61, 0x3b, 0x52,
+0x61, 0x62, 0x75, 0x3b, 0x4b, 0x68, 0x61, 0x6d, 0x69, 0x73, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x61, 0x74, 0x3b, 0x53, 0x61,
+0x62, 0x74, 0x75, 0x3b, 0x41, 0x3b, 0x49, 0x3b, 0x53, 0x3b, 0x52, 0x3b, 0x4b, 0x3b, 0x4a, 0x3b, 0x53, 0x3b, 0xd1e, 0xd3e,
+0xd2f, 0xd7c, 0x3b, 0xd24, 0xd3f, 0xd19, 0xd4d, 0xd15, 0xd7e, 0x3b, 0xd1a, 0xd4a, 0xd35, 0xd4d, 0xd35, 0x3b, 0xd2c, 0xd41, 0xd27, 0xd7b,
+0x3b, 0xd35, 0xd4d, 0xd2f, 0xd3e, 0xd34, 0xd02, 0x3b, 0xd35, 0xd46, 0xd33, 0xd4d, 0xd33, 0xd3f, 0x3b, 0xd36, 0xd28, 0xd3f, 0x3b, 0xd1e,
+0xd3e, 0xd2f, 0xd31, 0xd3e, 0xd34, 0xd4d, 0x200c, 0xd1a, 0x3b, 0xd24, 0xd3f, 0xd19, 0xd4d, 0xd15, 0xd33, 0xd3e, 0xd34, 0xd4d, 0x200c, 0xd1a,
+0x3b, 0xd1a, 0xd4a, 0xd35, 0xd4d, 0xd35, 0xd3e, 0xd34, 0xd4d, 0x200c, 0xd1a, 0x3b, 0xd2c, 0xd41, 0xd27, 0xd28, 0xd3e, 0xd34, 0xd4d, 0x200c,
+0xd1a, 0x3b, 0xd35, 0xd4d, 0xd2f, 0xd3e, 0xd34, 0xd3e, 0xd34, 0xd4d, 0x200c, 0xd1a, 0x3b, 0xd35, 0xd46, 0xd33, 0xd4d, 0xd33, 0xd3f, 0xd2f,
+0xd3e, 0xd34, 0xd4d, 0x200c, 0xd1a, 0x3b, 0xd36, 0xd28, 0xd3f, 0xd2f, 0xd3e, 0xd34, 0xd4d, 0x200c, 0xd1a, 0x3b, 0xd1e, 0xd3e, 0x3b, 0xd24,
+0xd3f, 0x3b, 0xd1a, 0xd4a, 0x3b, 0xd2c, 0xd41, 0x3b, 0xd35, 0xd4d, 0xd2f, 0xd3e, 0x3b, 0xd35, 0xd46, 0x3b, 0xd36, 0x3b, 0xd1e, 0xd3e,
+0xd2f, 0xd31, 0xd3e, 0xd34, 0xd4d, 0x200c, 0xd1a, 0x3b, 0xd24, 0xd3f, 0xd19, 0xd4d, 0xd15, 0xd33, 0xd3e, 0xd34, 0xd4d, 0x200c, 0xd1a, 0x3b,
+0xd1a, 0xd4a, 0xd35, 0xd4d, 0xd35, 0xd3e, 0xd34, 0xd4d, 0xd1a, 0x3b, 0xd2c, 0xd41, 0xd27, 0xd28, 0xd3e, 0xd34, 0xd4d, 0x200c, 0xd1a, 0x3b,
+0xd35, 0xd4d, 0xd2f, 0xd3e, 0xd34, 0xd3e, 0xd34, 0xd4d, 0x200c, 0xd1a, 0x3b, 0xd35, 0xd46, 0xd33, 0xd4d, 0xd33, 0xd3f, 0xd2f, 0xd3e, 0xd34,
+0xd4d, 0x200c, 0xd1a, 0x3b, 0xd36, 0xd28, 0xd3f, 0xd2f, 0xd3e, 0xd34, 0xd4d, 0x200c, 0xd1a, 0x3b, 0xd1e, 0x3b, 0xd24, 0xd3f, 0x3b, 0xd1a,
+0xd4a, 0x3b, 0xd2c, 0xd41, 0x3b, 0xd35, 0xd4d, 0xd2f, 0xd3e, 0x3b, 0xd35, 0xd46, 0x3b, 0xd36, 0x3b, 0x126, 0x61, 0x64, 0x3b, 0x54,
+0x6e, 0x65, 0x3b, 0x54, 0x6c, 0x69, 0x3b, 0x45, 0x72, 0x62, 0x3b, 0x126, 0x61, 0x6d, 0x3b, 0x120, 0x69, 0x6d, 0x3b, 0x53,
+0x69, 0x62, 0x3b, 0x49, 0x6c, 0x2d, 0x126, 0x61, 0x64, 0x64, 0x3b, 0x49, 0x74, 0x2d, 0x54, 0x6e, 0x65, 0x6a, 0x6e, 0x3b,
+0x49, 0x74, 0x2d, 0x54, 0x6c, 0x69, 0x65, 0x74, 0x61, 0x3b, 0x4c, 0x2d, 0x45, 0x72, 0x62, 0x67, 0x127, 0x61, 0x3b, 0x49,
+0x6c, 0x2d, 0x126, 0x61, 0x6d, 0x69, 0x73, 0x3b, 0x49, 0x6c, 0x2d, 0x120, 0x69, 0x6d, 0x67, 0x127, 0x61, 0x3b, 0x49, 0x73,
+0x2d, 0x53, 0x69, 0x62, 0x74, 0x3b, 0x126, 0x64, 0x3b, 0x54, 0x6e, 0x3b, 0x54, 0x6c, 0x3b, 0x45, 0x72, 0x3b, 0x126, 0x6d,
+0x3b, 0x120, 0x6d, 0x3b, 0x53, 0x62, 0x3b, 0x126, 0x64, 0x3b, 0x54, 0x3b, 0x54, 0x6c, 0x3b, 0x45, 0x72, 0x3b, 0x126, 0x6d,
+0x3b, 0x120, 0x6d, 0x3b, 0x53, 0x62, 0x3b, 0x930, 0x935, 0x93f, 0x3b, 0x938, 0x94b, 0x92e, 0x3b, 0x92e, 0x902, 0x917, 0x933, 0x3b,
+0x92c, 0x941, 0x927, 0x3b, 0x917, 0x941, 0x930, 0x941, 0x3b, 0x936, 0x941, 0x915, 0x94d, 0x930, 0x3b, 0x936, 0x928, 0x93f, 0x3b, 0x930,
+0x935, 0x93f, 0x935, 0x93e, 0x930, 0x3b, 0x938, 0x94b, 0x92e, 0x935, 0x93e, 0x930, 0x3b, 0x92e, 0x902, 0x917, 0x933, 0x935, 0x93e, 0x930,
+0x3b, 0x92c, 0x941, 0x927, 0x935, 0x93e, 0x930, 0x3b, 0x917, 0x941, 0x930, 0x941, 0x935, 0x93e, 0x930, 0x3b, 0x936, 0x941, 0x915, 0x94d,
+0x930, 0x935, 0x93e, 0x930, 0x3b, 0x936, 0x928, 0x93f, 0x935, 0x93e, 0x930, 0x3b, 0x41d, 0x44f, 0x3b, 0x414, 0x430, 0x3b, 0x41c, 0x44f,
+0x3b, 0x41b, 0x445, 0x3b, 0x41f, 0x4af, 0x3b, 0x411, 0x430, 0x3b, 0x411, 0x44f, 0x3b, 0x43d, 0x44f, 0x43c, 0x3b, 0x434, 0x430, 0x432,
+0x430, 0x430, 0x3b, 0x43c, 0x44f, 0x433, 0x43c, 0x430, 0x440, 0x3b, 0x43b, 0x445, 0x430, 0x433, 0x432, 0x430, 0x3b, 0x43f, 0x4af, 0x440,
+0x44d, 0x432, 0x3b, 0x431, 0x430, 0x430, 0x441, 0x430, 0x43d, 0x3b, 0x431, 0x44f, 0x43c, 0x431, 0x430, 0x3b, 0x906, 0x907, 0x924, 0x3b,
+0x938, 0x94b, 0x92e, 0x3b, 0x92e, 0x919, 0x94d, 0x917, 0x932, 0x3b, 0x92c, 0x941, 0x927, 0x3b, 0x92c, 0x93f, 0x939, 0x93f, 0x3b, 0x936,
+0x941, 0x915, 0x94d, 0x930, 0x3b, 0x936, 0x928, 0x93f, 0x3b, 0x906, 0x907, 0x924, 0x92c, 0x93e, 0x930, 0x3b, 0x938, 0x94b, 0x92e, 0x92c,
+0x93e, 0x930, 0x3b, 0x92e, 0x919, 0x94d, 0x917, 0x932, 0x92c, 0x93e, 0x930, 0x3b, 0x92c, 0x941, 0x927, 0x92c, 0x93e, 0x930, 0x3b, 0x92c,
+0x93f, 0x939, 0x93f, 0x92c, 0x93e, 0x930, 0x3b, 0x936, 0x941, 0x915, 0x94d, 0x930, 0x92c, 0x93e, 0x930, 0x3b, 0x936, 0x928, 0x93f, 0x92c,
+0x93e, 0x930, 0x3b, 0x906, 0x3b, 0x938, 0x94b, 0x3b, 0x92e, 0x3b, 0x92c, 0x941, 0x3b, 0x92c, 0x93f, 0x3b, 0x936, 0x941, 0x3b, 0x936,
+0x3b, 0xb30, 0xb2c, 0xb3f, 0x3b, 0xb38, 0xb4b, 0xb2e, 0x3b, 0xb2e, 0xb19, 0xb4d, 0xb17, 0xb33, 0x3b, 0xb2c, 0xb41, 0xb27, 0x3b, 0xb17,
+0xb41, 0xb30, 0xb41, 0x3b, 0xb36, 0xb41, 0xb15, 0xb4d, 0xb30, 0x3b, 0xb36, 0xb28, 0xb3f, 0x3b, 0xb30, 0xb2c, 0xb3f, 0xb2c, 0xb3e, 0xb30,
+0x3b, 0xb38, 0xb4b, 0xb2e, 0xb2c, 0xb3e, 0xb30, 0x3b, 0xb2e, 0xb19, 0xb4d, 0xb17, 0xb33, 0xb2c, 0xb3e, 0xb30, 0x3b, 0xb2c, 0xb41, 0xb27,
+0xb2c, 0xb3e, 0xb30, 0x3b, 0xb17, 0xb41, 0xb30, 0xb41, 0xb2c, 0xb3e, 0xb30, 0x3b, 0xb36, 0xb41, 0xb15, 0xb4d, 0xb30, 0xb2c, 0xb3e, 0xb30,
+0x3b, 0xb36, 0xb28, 0xb3f, 0xb2c, 0xb3e, 0xb30, 0x3b, 0xb30, 0x3b, 0xb38, 0xb4b, 0x3b, 0xb2e, 0x3b, 0xb2c, 0xb41, 0x3b, 0xb17, 0xb41,
+0x3b, 0xb36, 0xb41, 0x3b, 0xb36, 0x3b, 0x64a, 0x648, 0x646, 0x6cd, 0x3b, 0x62f, 0x648, 0x646, 0x6cd, 0x3b, 0x62f, 0x631, 0x6d0, 0x646,
+0x6cd, 0x3b, 0x685, 0x644, 0x631, 0x646, 0x6cd, 0x3b, 0x67e, 0x64a, 0x646, 0x681, 0x646, 0x6cd, 0x3b, 0x62c, 0x645, 0x639, 0x647, 0x3b,
+0x627, 0x648, 0x646, 0x6cd, 0x3b, 0x6cc, 0x6a9, 0x634, 0x646, 0x628, 0x647, 0x3b, 0x62f, 0x648, 0x634, 0x646, 0x628, 0x647, 0x3b, 0x633,
+0x647, 0x200c, 0x634, 0x646, 0x628, 0x647, 0x3b, 0x686, 0x647, 0x627, 0x631, 0x634, 0x646, 0x628, 0x647, 0x3b, 0x67e, 0x646, 0x62c, 0x634,
+0x646, 0x628, 0x647, 0x3b, 0x62c, 0x645, 0x639, 0x647, 0x3b, 0x634, 0x646, 0x628, 0x647, 0x3b, 0x6cc, 0x3b, 0x62f, 0x3b, 0x633, 0x3b,
+0x686, 0x3b, 0x67e, 0x3b, 0x62c, 0x3b, 0x634, 0x3b, 0x6e, 0x69, 0x65, 0x64, 0x7a, 0x2e, 0x3b, 0x70, 0x6f, 0x6e, 0x2e, 0x3b,
+0x77, 0x74, 0x2e, 0x3b, 0x15b, 0x72, 0x2e, 0x3b, 0x63, 0x7a, 0x77, 0x2e, 0x3b, 0x70, 0x74, 0x2e, 0x3b, 0x73, 0x6f, 0x62,
+0x2e, 0x3b, 0x6e, 0x69, 0x65, 0x64, 0x7a, 0x69, 0x65, 0x6c, 0x61, 0x3b, 0x70, 0x6f, 0x6e, 0x69, 0x65, 0x64, 0x7a, 0x69,
+0x61, 0x142, 0x65, 0x6b, 0x3b, 0x77, 0x74, 0x6f, 0x72, 0x65, 0x6b, 0x3b, 0x15b, 0x72, 0x6f, 0x64, 0x61, 0x3b, 0x63, 0x7a,
+0x77, 0x61, 0x72, 0x74, 0x65, 0x6b, 0x3b, 0x70, 0x69, 0x105, 0x74, 0x65, 0x6b, 0x3b, 0x73, 0x6f, 0x62, 0x6f, 0x74, 0x61,
+0x3b, 0x4e, 0x3b, 0x50, 0x3b, 0x57, 0x3b, 0x15a, 0x3b, 0x43, 0x3b, 0x50, 0x3b, 0x53, 0x3b, 0x6e, 0x3b, 0x70, 0x3b, 0x77,
+0x3b, 0x15b, 0x3b, 0x63, 0x3b, 0x70, 0x3b, 0x73, 0x3b, 0x64, 0x6f, 0x6d, 0x3b, 0x73, 0x65, 0x67, 0x3b, 0x74, 0x65, 0x72,
+0x3b, 0x71, 0x75, 0x61, 0x3b, 0x71, 0x75, 0x69, 0x3b, 0x73, 0x65, 0x78, 0x3b, 0x73, 0xe1, 0x62, 0x3b, 0x64, 0x6f, 0x6d,
+0x69, 0x6e, 0x67, 0x6f, 0x3b, 0x73, 0x65, 0x67, 0x75, 0x6e, 0x64, 0x61, 0x2d, 0x66, 0x65, 0x69, 0x72, 0x61, 0x3b, 0x74,
+0x65, 0x72, 0xe7, 0x61, 0x2d, 0x66, 0x65, 0x69, 0x72, 0x61, 0x3b, 0x71, 0x75, 0x61, 0x72, 0x74, 0x61, 0x2d, 0x66, 0x65,
+0x69, 0x72, 0x61, 0x3b, 0x71, 0x75, 0x69, 0x6e, 0x74, 0x61, 0x2d, 0x66, 0x65, 0x69, 0x72, 0x61, 0x3b, 0x73, 0x65, 0x78,
+0x74, 0x61, 0x2d, 0x66, 0x65, 0x69, 0x72, 0x61, 0x3b, 0x73, 0xe1, 0x62, 0x61, 0x64, 0x6f, 0x3b, 0x44, 0x3b, 0x53, 0x3b,
+0x54, 0x3b, 0x51, 0x3b, 0x51, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x64, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x6f, 0x3b, 0x73, 0x65,
+0x67, 0x75, 0x6e, 0x64, 0x61, 0x3b, 0x74, 0x65, 0x72, 0xe7, 0x61, 0x3b, 0x71, 0x75, 0x61, 0x72, 0x74, 0x61, 0x3b, 0x71,
+0x75, 0x69, 0x6e, 0x74, 0x61, 0x3b, 0x73, 0x65, 0x78, 0x74, 0x61, 0x3b, 0x73, 0xe1, 0x62, 0x61, 0x64, 0x6f, 0x3b, 0xa10,
+0xa24, 0x3b, 0xa38, 0xa4b, 0xa2e, 0x3b, 0xa2e, 0xa70, 0xa17, 0xa32, 0x3b, 0xa2c, 0xa41, 0xa71, 0xa27, 0x3b, 0xa35, 0xa40, 0xa30, 0x3b,
+0xa38, 0xa3c, 0xa41, 0xa71, 0xa15, 0xa30, 0x3b, 0xa38, 0xa3c, 0xa28, 0xa3f, 0xa71, 0xa1a, 0xa30, 0x3b, 0xa10, 0xa24, 0xa35, 0xa3e, 0xa30,
+0x3b, 0xa38, 0xa4b, 0xa2e, 0xa35, 0xa3e, 0xa30, 0x3b, 0xa2e, 0xa70, 0xa17, 0xa32, 0xa35, 0xa3e, 0xa30, 0x3b, 0xa2c, 0xa41, 0xa71, 0xa27,
+0xa35, 0xa3e, 0xa30, 0x3b, 0xa35, 0xa40, 0xa30, 0xa35, 0xa3e, 0xa30, 0x3b, 0xa38, 0xa3c, 0xa41, 0xa71, 0xa15, 0xa30, 0xa35, 0xa3e, 0xa30,
+0x3b, 0xa38, 0xa3c, 0xa28, 0xa3f, 0xa71, 0xa1a, 0xa30, 0xa35, 0xa3e, 0xa30, 0x3b, 0xa10, 0x3b, 0xa38, 0xa4b, 0x3b, 0xa2e, 0xa70, 0x3b,
+0xa2c, 0xa41, 0xa71, 0x3b, 0xa35, 0xa40, 0x3b, 0xa38, 0xa3c, 0xa41, 0xa71, 0x3b, 0xa38, 0xa3c, 0x3b, 0x627, 0x62a, 0x648, 0x627, 0x631,
+0x3b, 0x67e, 0x6cc, 0x631, 0x3b, 0x645, 0x646, 0x6af, 0x644, 0x3b, 0x628, 0x64f, 0x62f, 0x6be, 0x3b, 0x62c, 0x645, 0x639, 0x631, 0x627,
+0x62a, 0x3b, 0x62c, 0x645, 0x639, 0x6c1, 0x3b, 0x6c1, 0x641, 0x62a, 0x6c1, 0x3b, 0x44, 0x6f, 0x6d, 0x3b, 0x4c, 0x75, 0x6e, 0x3b,
+0x4d, 0x61, 0x72, 0x3b, 0x4d, 0x69, 0xe9, 0x3b, 0x4a, 0x75, 0x65, 0x3b, 0x56, 0x69, 0x65, 0x3b, 0x53, 0x61, 0x62, 0x3b,
+0x44, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x6f, 0x3b, 0x4c, 0x75, 0x6e, 0x65, 0x73, 0x3b, 0x4d, 0x61, 0x72, 0x74, 0x65, 0x73,
+0x3b, 0x4d, 0x69, 0xe9, 0x72, 0x63, 0x6f, 0x6c, 0x65, 0x73, 0x3b, 0x4a, 0x75, 0x65, 0x76, 0x65, 0x73, 0x3b, 0x56, 0x69,
+0x65, 0x72, 0x6e, 0x65, 0x73, 0x3b, 0x53, 0xe1, 0x62, 0x61, 0x64, 0x6f, 0x3b, 0x44, 0x3b, 0x4c, 0x3b, 0x4d, 0x3b, 0x58,
+0x3b, 0x4a, 0x3b, 0x56, 0x3b, 0x53, 0x3b, 0x64, 0x75, 0x3b, 0x67, 0x6c, 0x69, 0x3b, 0x6d, 0x61, 0x3b, 0x6d, 0x65, 0x3b,
+0x67, 0x69, 0x65, 0x3b, 0x76, 0x65, 0x3b, 0x73, 0x6f, 0x3b, 0x64, 0x75, 0x6d, 0x65, 0x6e, 0x67, 0x69, 0x61, 0x3b, 0x67,
+0x6c, 0x69, 0x6e, 0x64, 0x65, 0x73, 0x64, 0x69, 0x3b, 0x6d, 0x61, 0x72, 0x64, 0x69, 0x3b, 0x6d, 0x65, 0x73, 0x65, 0x6d,
+0x6e, 0x61, 0x3b, 0x67, 0x69, 0x65, 0x76, 0x67, 0x69, 0x61, 0x3b, 0x76, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x64, 0x69, 0x3b,
+0x73, 0x6f, 0x6e, 0x64, 0x61, 0x3b, 0x44, 0x3b, 0x47, 0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x47, 0x3b, 0x56, 0x3b, 0x53, 0x3b,
+0x64, 0x75, 0x6d, 0x2e, 0x3b, 0x6c, 0x75, 0x6e, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x2e, 0x3b, 0x6d, 0x69, 0x65, 0x2e, 0x3b,
+0x6a, 0x6f, 0x69, 0x3b, 0x76, 0x69, 0x6e, 0x2e, 0x3b, 0x73, 0xe2, 0x6d, 0x2e, 0x3b, 0x64, 0x75, 0x6d, 0x69, 0x6e, 0x69,
+0x63, 0x103, 0x3b, 0x6c, 0x75, 0x6e, 0x69, 0x3b, 0x6d, 0x61, 0x72, 0x21b, 0x69, 0x3b, 0x6d, 0x69, 0x65, 0x72, 0x63, 0x75,
+0x72, 0x69, 0x3b, 0x6a, 0x6f, 0x69, 0x3b, 0x76, 0x69, 0x6e, 0x65, 0x72, 0x69, 0x3b, 0x73, 0xe2, 0x6d, 0x62, 0x103, 0x74,
+0x103, 0x3b, 0x44, 0x75, 0x6d, 0x3b, 0x4c, 0x75, 0x6e, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x4d, 0x69, 0x65, 0x3b, 0x4a, 0x6f,
+0x69, 0x3b, 0x56, 0x69, 0x6e, 0x3b, 0x53, 0xe2, 0x6d, 0x3b, 0x44, 0x3b, 0x4c, 0x3b, 0x4d, 0x61, 0x3b, 0x4d, 0x69, 0x3b,
+0x4a, 0x3b, 0x56, 0x3b, 0x53, 0x3b, 0x432, 0x441, 0x3b, 0x43f, 0x43d, 0x3b, 0x432, 0x442, 0x3b, 0x441, 0x440, 0x3b, 0x447, 0x442,
+0x3b, 0x43f, 0x442, 0x3b, 0x441, 0x431, 0x3b, 0x432, 0x43e, 0x441, 0x43a, 0x440, 0x435, 0x441, 0x435, 0x43d, 0x44c, 0x435, 0x3b, 0x43f,
+0x43e, 0x43d, 0x435, 0x434, 0x435, 0x43b, 0x44c, 0x43d, 0x438, 0x43a, 0x3b, 0x432, 0x442, 0x43e, 0x440, 0x43d, 0x438, 0x43a, 0x3b, 0x441,
+0x440, 0x435, 0x434, 0x430, 0x3b, 0x447, 0x435, 0x442, 0x432, 0x435, 0x440, 0x433, 0x3b, 0x43f, 0x44f, 0x442, 0x43d, 0x438, 0x446, 0x430,
+0x3b, 0x441, 0x443, 0x431, 0x431, 0x43e, 0x442, 0x430, 0x3b, 0x412, 0x3b, 0x41f, 0x3b, 0x412, 0x3b, 0x421, 0x3b, 0x427, 0x3b, 0x41f,
+0x3b, 0x421, 0x3b, 0x42, 0x6b, 0x31, 0x3b, 0x42, 0x6b, 0x32, 0x3b, 0x42, 0x6b, 0x33, 0x3b, 0x42, 0x6b, 0x34, 0x3b, 0x42,
+0x6b, 0x35, 0x3b, 0x4c, 0xe2, 0x70, 0x3b, 0x4c, 0xe2, 0x79, 0x3b, 0x42, 0x69, 0x6b, 0x75, 0x61, 0x2d, 0xf4, 0x6b, 0x6f,
+0x3b, 0x42, 0xef, 0x6b, 0x75, 0x61, 0x2d, 0xfb, 0x73, 0x65, 0x3b, 0x42, 0xef, 0x6b, 0x75, 0x61, 0x2d, 0x70, 0x74, 0xe2,
+0x3b, 0x42, 0xef, 0x6b, 0x75, 0x61, 0x2d, 0x75, 0x73, 0xef, 0xf6, 0x3b, 0x42, 0xef, 0x6b, 0x75, 0x61, 0x2d, 0x6f, 0x6b,
+0xfc, 0x3b, 0x4c, 0xe2, 0x70, 0xf4, 0x73, 0xf6, 0x3b, 0x4c, 0xe2, 0x79, 0x65, 0x6e, 0x67, 0x61, 0x3b, 0x4b, 0x3b, 0x53,
+0x3b, 0x54, 0x3b, 0x53, 0x3b, 0x4b, 0x3b, 0x50, 0x3b, 0x59, 0x3b, 0x43d, 0x435, 0x434, 0x3b, 0x43f, 0x43e, 0x43d, 0x3b, 0x443,
+0x442, 0x43e, 0x3b, 0x441, 0x440, 0x435, 0x3b, 0x447, 0x435, 0x442, 0x3b, 0x43f, 0x435, 0x442, 0x3b, 0x441, 0x443, 0x431, 0x3b, 0x43d,
+0x435, 0x434, 0x435, 0x459, 0x430, 0x3b, 0x43f, 0x43e, 0x43d, 0x435, 0x434, 0x435, 0x459, 0x430, 0x43a, 0x3b, 0x443, 0x442, 0x43e, 0x440,
+0x430, 0x43a, 0x3b, 0x441, 0x440, 0x435, 0x434, 0x430, 0x3b, 0x447, 0x435, 0x442, 0x432, 0x440, 0x442, 0x430, 0x43a, 0x3b, 0x43f, 0x435,
+0x442, 0x430, 0x43a, 0x3b, 0x441, 0x443, 0x431, 0x43e, 0x442, 0x430, 0x3b, 0x43d, 0x3b, 0x43f, 0x3b, 0x443, 0x3b, 0x441, 0x3b, 0x447,
+0x3b, 0x43f, 0x3b, 0x441, 0x3b, 0x43d, 0x435, 0x434, 0x2e, 0x3b, 0x43f, 0x43e, 0x43d, 0x2e, 0x3b, 0x443, 0x442, 0x2e, 0x3b, 0x441,
+0x440, 0x2e, 0x3b, 0x447, 0x435, 0x442, 0x2e, 0x3b, 0x43f, 0x435, 0x442, 0x2e, 0x3b, 0x441, 0x443, 0x431, 0x2e, 0x3b, 0x43d, 0x435,
+0x434, 0x458, 0x435, 0x459, 0x430, 0x3b, 0x43f, 0x43e, 0x43d, 0x435, 0x434, 0x435, 0x459, 0x430, 0x43a, 0x3b, 0x443, 0x442, 0x43e, 0x440,
+0x430, 0x43a, 0x3b, 0x441, 0x440, 0x438, 0x458, 0x435, 0x434, 0x430, 0x3b, 0x447, 0x435, 0x442, 0x432, 0x440, 0x442, 0x430, 0x43a, 0x3b,
+0x43f, 0x435, 0x442, 0x430, 0x43a, 0x3b, 0x441, 0x443, 0x431, 0x43e, 0x442, 0x430, 0x3b, 0x6e, 0x65, 0x64, 0x2e, 0x3b, 0x70, 0x6f,
+0x6e, 0x2e, 0x3b, 0x75, 0x74, 0x2e, 0x3b, 0x73, 0x72, 0x2e, 0x3b, 0x10d, 0x65, 0x74, 0x2e, 0x3b, 0x70, 0x65, 0x74, 0x2e,
+0x3b, 0x73, 0x75, 0x62, 0x2e, 0x3b, 0x6e, 0x65, 0x64, 0x6a, 0x65, 0x6c, 0x6a, 0x61, 0x3b, 0x70, 0x6f, 0x6e, 0x65, 0x64,
+0x65, 0x6c, 0x6a, 0x61, 0x6b, 0x3b, 0x75, 0x74, 0x6f, 0x72, 0x61, 0x6b, 0x3b, 0x73, 0x72, 0x69, 0x6a, 0x65, 0x64, 0x61,
+0x3b, 0x10d, 0x65, 0x74, 0x76, 0x72, 0x74, 0x61, 0x6b, 0x3b, 0x70, 0x65, 0x74, 0x61, 0x6b, 0x3b, 0x73, 0x75, 0x62, 0x6f,
+0x74, 0x61, 0x3b, 0x6e, 0x65, 0x64, 0x3b, 0x70, 0x6f, 0x6e, 0x3b, 0x75, 0x74, 0x6f, 0x3b, 0x73, 0x72, 0x65, 0x3b, 0x10d,
+0x65, 0x74, 0x3b, 0x70, 0x65, 0x74, 0x3b, 0x73, 0x75, 0x62, 0x3b, 0x6e, 0x65, 0x64, 0x65, 0x6c, 0x6a, 0x61, 0x3b, 0x70,
+0x6f, 0x6e, 0x65, 0x64, 0x65, 0x6c, 0x6a, 0x61, 0x6b, 0x3b, 0x75, 0x74, 0x6f, 0x72, 0x61, 0x6b, 0x3b, 0x73, 0x72, 0x65,
+0x64, 0x61, 0x3b, 0x10d, 0x65, 0x74, 0x76, 0x72, 0x74, 0x61, 0x6b, 0x3b, 0x70, 0x65, 0x74, 0x61, 0x6b, 0x3b, 0x73, 0x75,
+0x62, 0x6f, 0x74, 0x61, 0x3b, 0x425, 0x446, 0x431, 0x3b, 0x41a, 0x440, 0x441, 0x3b, 0x414, 0x446, 0x433, 0x3b, 0x4d4, 0x440, 0x442,
+0x3b, 0x426, 0x43f, 0x440, 0x3b, 0x41c, 0x440, 0x431, 0x3b, 0x421, 0x431, 0x442, 0x3b, 0x425, 0x443, 0x44b, 0x446, 0x430, 0x443, 0x431,
+0x43e, 0x43d, 0x3b, 0x41a, 0x44a, 0x443, 0x44b, 0x440, 0x438, 0x441, 0x4d5, 0x440, 0x3b, 0x414, 0x44b, 0x446, 0x446, 0x4d5, 0x433, 0x3b,
+0x4d4, 0x440, 0x442, 0x44b, 0x446, 0x446, 0x4d5, 0x433, 0x3b, 0x426, 0x44b, 0x43f, 0x43f, 0x4d5, 0x440, 0x4d5, 0x43c, 0x3b, 0x41c, 0x430,
+0x439, 0x440, 0x4d5, 0x43c, 0x431, 0x43e, 0x43d, 0x3b, 0x421, 0x430, 0x431, 0x430, 0x442, 0x3b, 0x425, 0x3b, 0x41a, 0x3b, 0x414, 0x3b,
+0x4d4, 0x3b, 0x426, 0x3b, 0x41c, 0x3b, 0x421, 0x3b, 0x445, 0x446, 0x431, 0x3b, 0x43a, 0x440, 0x441, 0x3b, 0x434, 0x446, 0x433, 0x3b,
+0x4d5, 0x440, 0x442, 0x3b, 0x446, 0x43f, 0x440, 0x3b, 0x43c, 0x440, 0x431, 0x3b, 0x441, 0x431, 0x442, 0x3b, 0x445, 0x443, 0x44b, 0x446,
+0x430, 0x443, 0x431, 0x43e, 0x43d, 0x3b, 0x43a, 0x44a, 0x443, 0x44b, 0x440, 0x438, 0x441, 0x4d5, 0x440, 0x3b, 0x434, 0x44b, 0x446, 0x446,
+0x4d5, 0x433, 0x3b, 0x4d5, 0x440, 0x442, 0x44b, 0x446, 0x446, 0x4d5, 0x433, 0x3b, 0x446, 0x44b, 0x43f, 0x43f, 0x4d5, 0x440, 0x4d5, 0x43c,
+0x3b, 0x43c, 0x430, 0x439, 0x440, 0x4d5, 0x43c, 0x431, 0x43e, 0x43d, 0x3b, 0x441, 0x430, 0x431, 0x430, 0x442, 0x3b, 0x53, 0x76, 0x6f,
+0x3b, 0x4d, 0x75, 0x76, 0x3b, 0x43, 0x68, 0x70, 0x3b, 0x43, 0x68, 0x74, 0x3b, 0x43, 0x68, 0x6e, 0x3b, 0x43, 0x68, 0x73,
+0x3b, 0x4d, 0x75, 0x67, 0x3b, 0x53, 0x76, 0x6f, 0x6e, 0x64, 0x6f, 0x3b, 0x4d, 0x75, 0x76, 0x68, 0x75, 0x72, 0x6f, 0x3b,
+0x43, 0x68, 0x69, 0x70, 0x69, 0x72, 0x69, 0x3b, 0x43, 0x68, 0x69, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x43, 0x68, 0x69, 0x6e,
+0x61, 0x3b, 0x43, 0x68, 0x69, 0x73, 0x68, 0x61, 0x6e, 0x75, 0x3b, 0x4d, 0x75, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x3b,
+0x53, 0x3b, 0x4d, 0x3b, 0x43, 0x3b, 0x43, 0x3b, 0x43, 0x3b, 0x43, 0x3b, 0x4d, 0x3b, 0x622, 0x686, 0x631, 0x3b, 0x633, 0x648,
+0x645, 0x631, 0x3b, 0x627, 0x6b1, 0x627, 0x631, 0x648, 0x3b, 0x627, 0x631, 0x628, 0x639, 0x3b, 0x62e, 0x645, 0x64a, 0x633, 0x3b, 0x62c,
+0x645, 0x639, 0x648, 0x3b, 0x687, 0x646, 0x687, 0x631, 0x3b, 0x622, 0x686, 0x3b, 0x633, 0x648, 0x3b, 0x627, 0x6b1, 0x3b, 0x627, 0x631,
+0x3b, 0x62e, 0x645, 0x3b, 0x62c, 0x645, 0x3b, 0x687, 0x646, 0x3b, 0x622, 0x686, 0x631, 0x3b, 0x633, 0x648, 0x3b, 0x627, 0x6b1, 0x627,
+0x631, 0x648, 0x3b, 0x627, 0x631, 0x628, 0x639, 0x3b, 0x62e, 0x645, 0x3b, 0x62c, 0x645, 0x639, 0x648, 0x3b, 0x687, 0x646, 0x687, 0x631,
+0x3b, 0xd89, 0xdbb, 0xdd2, 0xdaf, 0xdcf, 0x3b, 0xdc3, 0xdb3, 0xdd4, 0xdaf, 0xdcf, 0x3b, 0xd85, 0xd9f, 0xdc4, 0x3b, 0xdb6, 0xdaf, 0xdcf,
+0xdaf, 0xdcf, 0x3b, 0xdb6, 0xdca, 0x200d, 0xdbb, 0xdc4, 0xdc3, 0xdca, 0x3b, 0xdc3, 0xdd2, 0xd9a, 0xdd4, 0x3b, 0xdc3, 0xdd9, 0xdb1, 0x3b,
+0xd89, 0xdbb, 0xdd2, 0xdaf, 0xdcf, 0x3b, 0xdc3, 0xdb3, 0xdd4, 0xdaf, 0xdcf, 0x3b, 0xd85, 0xd9f, 0xdc4, 0xdbb, 0xdd4, 0xdc0, 0xdcf, 0xdaf,
+0xdcf, 0x3b, 0xdb6, 0xdaf, 0xdcf, 0xdaf, 0xdcf, 0x3b, 0xdb6, 0xdca, 0x200d, 0xdbb, 0xdc4, 0xdc3, 0xdca, 0xdb4, 0xdad, 0xdd2, 0xdb1, 0xdca,
+0xdaf, 0xdcf, 0x3b, 0xdc3, 0xdd2, 0xd9a, 0xdd4, 0xdbb, 0xdcf, 0xdaf, 0xdcf, 0x3b, 0xdc3, 0xdd9, 0xdb1, 0xdc3, 0xdd4, 0xdbb, 0xdcf, 0xdaf,
+0xdcf, 0x3b, 0xd89, 0x3b, 0xdc3, 0x3b, 0xd85, 0x3b, 0xdb6, 0x3b, 0xdb6, 0xdca, 0x200d, 0xdbb, 0x3b, 0xdc3, 0xdd2, 0x3b, 0xdc3, 0xdd9,
+0x3b, 0x6e, 0x65, 0x3b, 0x70, 0x6f, 0x3b, 0x75, 0x74, 0x3b, 0x73, 0x74, 0x3b, 0x161, 0x74, 0x3b, 0x70, 0x69, 0x3b, 0x73,
+0x6f, 0x3b, 0x6e, 0x65, 0x64, 0x65, 0x13e, 0x61, 0x3b, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x6c, 0x6f, 0x6b, 0x3b, 0x75, 0x74,
+0x6f, 0x72, 0x6f, 0x6b, 0x3b, 0x73, 0x74, 0x72, 0x65, 0x64, 0x61, 0x3b, 0x161, 0x74, 0x76, 0x72, 0x74, 0x6f, 0x6b, 0x3b,
+0x70, 0x69, 0x61, 0x74, 0x6f, 0x6b, 0x3b, 0x73, 0x6f, 0x62, 0x6f, 0x74, 0x61, 0x3b, 0x6e, 0x3b, 0x70, 0x3b, 0x75, 0x3b,
+0x73, 0x3b, 0x161, 0x3b, 0x70, 0x3b, 0x73, 0x3b, 0x6e, 0x65, 0x64, 0x2e, 0x3b, 0x70, 0x6f, 0x6e, 0x2e, 0x3b, 0x74, 0x6f,
+0x72, 0x2e, 0x3b, 0x73, 0x72, 0x65, 0x2e, 0x3b, 0x10d, 0x65, 0x74, 0x2e, 0x3b, 0x70, 0x65, 0x74, 0x2e, 0x3b, 0x73, 0x6f,
+0x62, 0x2e, 0x3b, 0x6e, 0x65, 0x64, 0x65, 0x6c, 0x6a, 0x61, 0x3b, 0x70, 0x6f, 0x6e, 0x65, 0x64, 0x65, 0x6c, 0x6a, 0x65,
+0x6b, 0x3b, 0x74, 0x6f, 0x72, 0x65, 0x6b, 0x3b, 0x73, 0x72, 0x65, 0x64, 0x61, 0x3b, 0x10d, 0x65, 0x74, 0x72, 0x74, 0x65,
+0x6b, 0x3b, 0x70, 0x65, 0x74, 0x65, 0x6b, 0x3b, 0x73, 0x6f, 0x62, 0x6f, 0x74, 0x61, 0x3b, 0x6e, 0x3b, 0x70, 0x3b, 0x74,
+0x3b, 0x73, 0x3b, 0x10d, 0x3b, 0x70, 0x3b, 0x73, 0x3b, 0x41, 0x78, 0x64, 0x3b, 0x49, 0x73, 0x6e, 0x3b, 0x54, 0x61, 0x6c,
+0x3b, 0x41, 0x72, 0x62, 0x3b, 0x4b, 0x68, 0x61, 0x3b, 0x4a, 0x69, 0x6d, 0x3b, 0x53, 0x61, 0x62, 0x3b, 0x41, 0x78, 0x61,
+0x64, 0x3b, 0x49, 0x73, 0x6e, 0x69, 0x69, 0x6e, 0x3b, 0x54, 0x61, 0x6c, 0x61, 0x61, 0x64, 0x6f, 0x3b, 0x41, 0x72, 0x62,
+0x61, 0x63, 0x6f, 0x3b, 0x4b, 0x68, 0x61, 0x6d, 0x69, 0x69, 0x73, 0x3b, 0x4a, 0x69, 0x6d, 0x63, 0x6f, 0x3b, 0x53, 0x61,
+0x62, 0x74, 0x69, 0x3b, 0x41, 0x3b, 0x49, 0x3b, 0x54, 0x3b, 0x41, 0x3b, 0x4b, 0x68, 0x3b, 0x4a, 0x3b, 0x53, 0x3b, 0x64,
+0x6f, 0x6d, 0x2e, 0x3b, 0x6c, 0x75, 0x6e, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x2e, 0x3b, 0x6d, 0x69, 0xe9, 0x2e, 0x3b, 0x6a,
+0x75, 0x65, 0x2e, 0x3b, 0x76, 0x69, 0x65, 0x2e, 0x3b, 0x73, 0xe1, 0x62, 0x2e, 0x3b, 0x64, 0x6f, 0x6d, 0x69, 0x6e, 0x67,
+0x6f, 0x3b, 0x6c, 0x75, 0x6e, 0x65, 0x73, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x65, 0x73, 0x3b, 0x6d, 0x69, 0xe9, 0x72, 0x63,
+0x6f, 0x6c, 0x65, 0x73, 0x3b, 0x6a, 0x75, 0x65, 0x76, 0x65, 0x73, 0x3b, 0x76, 0x69, 0x65, 0x72, 0x6e, 0x65, 0x73, 0x3b,
+0x73, 0xe1, 0x62, 0x61, 0x64, 0x6f, 0x3b, 0x64, 0x3b, 0x6c, 0x3b, 0x6d, 0x3b, 0x6d, 0x3b, 0x6a, 0x3b, 0x76, 0x3b, 0x73,
+0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x70, 0x69, 0x6c, 0x69, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x4a,
+0x75, 0x6d, 0x61, 0x6e, 0x6e, 0x65, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x41, 0x6c, 0x68, 0x61,
+0x6d, 0x69, 0x73, 0x69, 0x3b, 0x49, 0x6a, 0x75, 0x6d, 0x61, 0x61, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x6d, 0x6f, 0x73, 0x69,
+0x3b, 0x73, 0xf6, 0x6e, 0x3b, 0x6d, 0xe5, 0x6e, 0x3b, 0x74, 0x69, 0x73, 0x3b, 0x6f, 0x6e, 0x73, 0x3b, 0x74, 0x6f, 0x72,
+0x73, 0x3b, 0x66, 0x72, 0x65, 0x3b, 0x6c, 0xf6, 0x72, 0x3b, 0x73, 0xf6, 0x6e, 0x64, 0x61, 0x67, 0x3b, 0x6d, 0xe5, 0x6e,
+0x64, 0x61, 0x67, 0x3b, 0x74, 0x69, 0x73, 0x64, 0x61, 0x67, 0x3b, 0x6f, 0x6e, 0x73, 0x64, 0x61, 0x67, 0x3b, 0x74, 0x6f,
+0x72, 0x73, 0x64, 0x61, 0x67, 0x3b, 0x66, 0x72, 0x65, 0x64, 0x61, 0x67, 0x3b, 0x6c, 0xf6, 0x72, 0x64, 0x61, 0x67, 0x3b,
+0x42f, 0x448, 0x431, 0x3b, 0x414, 0x448, 0x431, 0x3b, 0x421, 0x448, 0x431, 0x3b, 0x427, 0x448, 0x431, 0x3b, 0x41f, 0x448, 0x431, 0x3b,
+0x4b6, 0x43c, 0x44a, 0x3b, 0x428, 0x43d, 0x431, 0x3b, 0x42f, 0x43a, 0x448, 0x430, 0x43d, 0x431, 0x435, 0x3b, 0x414, 0x443, 0x448, 0x430,
+0x43d, 0x431, 0x435, 0x3b, 0x421, 0x435, 0x448, 0x430, 0x43d, 0x431, 0x435, 0x3b, 0x427, 0x43e, 0x440, 0x448, 0x430, 0x43d, 0x431, 0x435,
+0x3b, 0x41f, 0x430, 0x43d, 0x4b7, 0x448, 0x430, 0x43d, 0x431, 0x435, 0x3b, 0x4b6, 0x443, 0x43c, 0x44a, 0x430, 0x3b, 0x428, 0x430, 0x43d,
+0x431, 0x435, 0x3b, 0x42f, 0x3b, 0x414, 0x3b, 0x421, 0x3b, 0x427, 0x3b, 0x41f, 0x3b, 0x4b6, 0x3b, 0x428, 0x3b, 0xb9e, 0xbbe, 0xbaf,
+0xbbf, 0x2e, 0x3b, 0xba4, 0xbbf, 0xb99, 0xbcd, 0x2e, 0x3b, 0xb9a, 0xbc6, 0xbb5, 0xbcd, 0x2e, 0x3b, 0xbaa, 0xbc1, 0xba4, 0x2e, 0x3b,
+0xbb5, 0xbbf, 0xbaf, 0xbbe, 0x2e, 0x3b, 0xbb5, 0xbc6, 0xbb3, 0xbcd, 0x2e, 0x3b, 0xb9a, 0xba9, 0xbbf, 0x3b, 0xb9e, 0xbbe, 0xbaf, 0xbbf,
+0xbb1, 0xbc1, 0x3b, 0xba4, 0xbbf, 0xb99, 0xbcd, 0xb95, 0xbb3, 0xbcd, 0x3b, 0xb9a, 0xbc6, 0xbb5, 0xbcd, 0xbb5, 0xbbe, 0xbaf, 0xbcd, 0x3b,
+0xbaa, 0xbc1, 0xba4, 0xba9, 0xbcd, 0x3b, 0xbb5, 0xbbf, 0xbaf, 0xbbe, 0xbb4, 0xba9, 0xbcd, 0x3b, 0xbb5, 0xbc6, 0xbb3, 0xbcd, 0xbb3, 0xbbf,
+0x3b, 0xb9a, 0xba9, 0xbbf, 0x3b, 0xb9e, 0xbbe, 0x3b, 0xba4, 0xbbf, 0x3b, 0xb9a, 0xbc6, 0x3b, 0xbaa, 0xbc1, 0x3b, 0xbb5, 0xbbf, 0x3b,
+0xbb5, 0xbc6, 0x3b, 0xb9a, 0x3b, 0x44f, 0x43a, 0x448, 0x2e, 0x3b, 0x434, 0x4af, 0x448, 0x2e, 0x3b, 0x441, 0x438, 0x448, 0x2e, 0x3b,
+0x447, 0x4d9, 0x440, 0x2e, 0x3b, 0x43f, 0x4d9, 0x43d, 0x497, 0x2e, 0x3b, 0x497, 0x43e, 0x43c, 0x2e, 0x3b, 0x448, 0x438, 0x43c, 0x2e,
+0x3b, 0x44f, 0x43a, 0x448, 0x4d9, 0x43c, 0x431, 0x435, 0x3b, 0x434, 0x4af, 0x448, 0x4d9, 0x43c, 0x431, 0x435, 0x3b, 0x441, 0x438, 0x448,
+0x4d9, 0x43c, 0x431, 0x435, 0x3b, 0x447, 0x4d9, 0x440, 0x448, 0x4d9, 0x43c, 0x431, 0x435, 0x3b, 0x43f, 0x4d9, 0x43d, 0x497, 0x435, 0x448,
+0x4d9, 0x43c, 0x431, 0x435, 0x3b, 0x497, 0x43e, 0x43c, 0x433, 0x430, 0x3b, 0x448, 0x438, 0x43c, 0x431, 0x4d9, 0x3b, 0x42f, 0x3b, 0x414,
+0x3b, 0x421, 0x3b, 0x427, 0x3b, 0x41f, 0x3b, 0x496, 0x3b, 0x428, 0x3b, 0xc06, 0xc26, 0xc3f, 0x3b, 0xc38, 0xc4b, 0xc2e, 0x3b, 0xc2e,
+0xc02, 0xc17, 0xc33, 0x3b, 0xc2c, 0xc41, 0xc27, 0x3b, 0xc17, 0xc41, 0xc30, 0xc41, 0x3b, 0xc36, 0xc41, 0xc15, 0xc4d, 0xc30, 0x3b, 0xc36,
+0xc28, 0xc3f, 0x3b, 0xc06, 0xc26, 0xc3f, 0xc35, 0xc3e, 0xc30, 0xc02, 0x3b, 0xc38, 0xc4b, 0xc2e, 0xc35, 0xc3e, 0xc30, 0xc02, 0x3b, 0xc2e,
+0xc02, 0xc17, 0xc33, 0xc35, 0xc3e, 0xc30, 0xc02, 0x3b, 0xc2c, 0xc41, 0xc27, 0xc35, 0xc3e, 0xc30, 0xc02, 0x3b, 0xc17, 0xc41, 0xc30, 0xc41,
+0xc35, 0xc3e, 0xc30, 0xc02, 0x3b, 0xc36, 0xc41, 0xc15, 0xc4d, 0xc30, 0xc35, 0xc3e, 0xc30, 0xc02, 0x3b, 0xc36, 0xc28, 0xc3f, 0xc35, 0xc3e,
+0xc30, 0xc02, 0x3b, 0xc06, 0x3b, 0xc38, 0xc4b, 0x3b, 0xc2e, 0x3b, 0xc2c, 0xc41, 0x3b, 0xc17, 0xc41, 0x3b, 0xc36, 0xc41, 0x3b, 0xc36,
+0x3b, 0xe2d, 0xe32, 0x2e, 0x3b, 0xe08, 0x2e, 0x3b, 0xe2d, 0x2e, 0x3b, 0xe1e, 0x2e, 0x3b, 0xe1e, 0xe24, 0x2e, 0x3b, 0xe28, 0x2e,
+0x3b, 0xe2a, 0x2e, 0x3b, 0xe27, 0xe31, 0xe19, 0xe2d, 0xe32, 0xe17, 0xe34, 0xe15, 0xe22, 0xe4c, 0x3b, 0xe27, 0xe31, 0xe19, 0xe08, 0xe31,
+0xe19, 0xe17, 0xe23, 0xe4c, 0x3b, 0xe27, 0xe31, 0xe19, 0xe2d, 0xe31, 0xe07, 0xe04, 0xe32, 0xe23, 0x3b, 0xe27, 0xe31, 0xe19, 0xe1e, 0xe38,
+0xe18, 0x3b, 0xe27, 0xe31, 0xe19, 0xe1e, 0xe24, 0xe2b, 0xe31, 0xe2a, 0xe1a, 0xe14, 0xe35, 0x3b, 0xe27, 0xe31, 0xe19, 0xe28, 0xe38, 0xe01,
+0xe23, 0xe4c, 0x3b, 0xe27, 0xe31, 0xe19, 0xe40, 0xe2a, 0xe32, 0xe23, 0xe4c, 0x3b, 0xe2d, 0xe32, 0x3b, 0xe08, 0x3b, 0xe2d, 0x3b, 0xe1e,
+0x3b, 0xe1e, 0xe24, 0x3b, 0xe28, 0x3b, 0xe2a, 0x3b, 0xf49, 0xf72, 0xf0b, 0xf58, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0x3b,
+0xf58, 0xf72, 0xf42, 0xf0b, 0xf51, 0xf58, 0xf62, 0xf0b, 0x3b, 0xf63, 0xfb7, 0xf42, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf55, 0xf74, 0xf62, 0xf0b,
+0xf56, 0xf74, 0xf0b, 0x3b, 0xf54, 0xf0b, 0xf66, 0xf44, 0xf66, 0xf0b, 0x3b, 0xf66, 0xfa4, 0xf7a, 0xf53, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf42,
+0xf5f, 0xf60, 0xf0b, 0xf49, 0xf72, 0xf0b, 0xf58, 0xf0b, 0x3b, 0xf42, 0xf5f, 0xf60, 0xf0b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0x3b, 0xf42,
+0xf5f, 0xf60, 0xf0b, 0xf58, 0xf72, 0xf42, 0xf0b, 0xf51, 0xf58, 0xf62, 0xf0b, 0x3b, 0xf42, 0xf5f, 0xf60, 0xf0b, 0xf63, 0xfb7, 0xf42, 0xf0b,
+0xf54, 0xf0b, 0x3b, 0xf42, 0xf5f, 0xf60, 0xf0b, 0xf55, 0xf74, 0xf62, 0xf0b, 0xf56, 0xf74, 0xf0b, 0x3b, 0xf42, 0xf5f, 0xf60, 0xf0b, 0xf54,
+0xf0b, 0xf66, 0xf44, 0xf66, 0xf0b, 0x3b, 0xf42, 0xf5f, 0xf60, 0xf0b, 0xf66, 0xfa4, 0xf7a, 0xf53, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf49, 0xf72,
+0x3b, 0xf5f, 0xfb3, 0x3b, 0xf58, 0xf72, 0xf42, 0x3b, 0xf63, 0xfb7, 0xf42, 0x3b, 0xf55, 0xf74, 0xf62, 0x3b, 0xf66, 0xf44, 0xf66, 0x3b,
+0xf66, 0xfa4, 0xf7a, 0xf53, 0x3b, 0x1230, 0x1295, 0x3b, 0x1230, 0x1291, 0x3b, 0x1230, 0x1209, 0x3b, 0x1228, 0x1261, 0x3b, 0x1213, 0x1219, 0x3b,
+0x12d3, 0x122d, 0x3b, 0x1240, 0x12f3, 0x3b, 0x1230, 0x1295, 0x1260, 0x1275, 0x3b, 0x1230, 0x1291, 0x12ed, 0x3b, 0x1230, 0x1209, 0x1235, 0x3b, 0x1228,
+0x1261, 0x12d5, 0x3b, 0x1213, 0x1219, 0x1235, 0x3b, 0x12d3, 0x122d, 0x1262, 0x3b, 0x1240, 0x12f3, 0x121d, 0x3b, 0x1230, 0x3b, 0x1230, 0x3b, 0x1220,
+0x3b, 0x1228, 0x3b, 0x1213, 0x3b, 0x12d3, 0x3b, 0x1240, 0x3b, 0x1230, 0x1295, 0x1260, 0x1275, 0x3b, 0x1230, 0x1291, 0x12ed, 0x3b, 0x1220, 0x1209,
+0x1235, 0x3b, 0x1228, 0x1261, 0x12d5, 0x3b, 0x1283, 0x1219, 0x1235, 0x3b, 0x12d3, 0x122d, 0x1262, 0x3b, 0x1240, 0x12f3, 0x121d, 0x3b, 0x1230, 0x3b,
+0x1230, 0x3b, 0x1230, 0x3b, 0x1228, 0x3b, 0x1213, 0x3b, 0x12d3, 0x3b, 0x1240, 0x3b, 0x53, 0x101, 0x70, 0x3b, 0x4d, 0x14d, 0x6e, 0x3b,
+0x54, 0x16b, 0x73, 0x3b, 0x50, 0x75, 0x6c, 0x3b, 0x54, 0x75, 0x2bb, 0x61, 0x3b, 0x46, 0x61, 0x6c, 0x3b, 0x54, 0x6f, 0x6b,
+0x3b, 0x53, 0x101, 0x70, 0x61, 0x74, 0x65, 0x3b, 0x4d, 0x14d, 0x6e, 0x69, 0x74, 0x65, 0x3b, 0x54, 0x16b, 0x73, 0x69, 0x74,
+0x65, 0x3b, 0x50, 0x75, 0x6c, 0x65, 0x6c, 0x75, 0x6c, 0x75, 0x3b, 0x54, 0x75, 0x2bb, 0x61, 0x70, 0x75, 0x6c, 0x65, 0x6c,
+0x75, 0x6c, 0x75, 0x3b, 0x46, 0x61, 0x6c, 0x61, 0x69, 0x74, 0x65, 0x3b, 0x54, 0x6f, 0x6b, 0x6f, 0x6e, 0x61, 0x6b, 0x69,
+0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0x54, 0x3b, 0x50, 0x3b, 0x54, 0x3b, 0x46, 0x3b, 0x54, 0x3b, 0x50, 0x61, 0x7a, 0x3b, 0x50,
+0x7a, 0x74, 0x3b, 0x53, 0x61, 0x6c, 0x3b, 0xc7, 0x61, 0x72, 0x3b, 0x50, 0x65, 0x72, 0x3b, 0x43, 0x75, 0x6d, 0x3b, 0x43,
+0x6d, 0x74, 0x3b, 0x50, 0x61, 0x7a, 0x61, 0x72, 0x3b, 0x50, 0x61, 0x7a, 0x61, 0x72, 0x74, 0x65, 0x73, 0x69, 0x3b, 0x53,
+0x61, 0x6c, 0x131, 0x3b, 0xc7, 0x61, 0x72, 0x15f, 0x61, 0x6d, 0x62, 0x61, 0x3b, 0x50, 0x65, 0x72, 0x15f, 0x65, 0x6d, 0x62,
+0x65, 0x3b, 0x43, 0x75, 0x6d, 0x61, 0x3b, 0x43, 0x75, 0x6d, 0x61, 0x72, 0x74, 0x65, 0x73, 0x69, 0x3b, 0x50, 0x3b, 0x50,
+0x3b, 0x53, 0x3b, 0xc7, 0x3b, 0x50, 0x3b, 0x43, 0x3b, 0x43, 0x3b, 0xdd, 0x65, 0x6b, 0x3b, 0x44, 0x75, 0x15f, 0x3b, 0x53,
+0x69, 0x15f, 0x3b, 0xc7, 0x61, 0x72, 0x3b, 0x50, 0x65, 0x6e, 0x3b, 0x41, 0x6e, 0x6e, 0x3b, 0x15e, 0x65, 0x6e, 0x3b, 0xdd,
+0x65, 0x6b, 0x15f, 0x65, 0x6e, 0x62, 0x65, 0x3b, 0x44, 0x75, 0x15f, 0x65, 0x6e, 0x62, 0x65, 0x3b, 0x53, 0x69, 0x15f, 0x65,
+0x6e, 0x62, 0x65, 0x3b, 0xc7, 0x61, 0x72, 0x15f, 0x65, 0x6e, 0x62, 0x65, 0x3b, 0x50, 0x65, 0x6e, 0x15f, 0x65, 0x6e, 0x62,
+0x65, 0x3b, 0x41, 0x6e, 0x6e, 0x61, 0x3b, 0x15e, 0x65, 0x6e, 0x62, 0x65, 0x3b, 0xdd, 0x3b, 0x44, 0x3b, 0x53, 0x3b, 0xc7,
+0x3b, 0x50, 0x3b, 0x41, 0x3b, 0x15e, 0x3b, 0xfd, 0x65, 0x6b, 0x3b, 0x64, 0x75, 0x15f, 0x3b, 0x73, 0x69, 0x15f, 0x3b, 0xe7,
+0x61, 0x72, 0x3b, 0x70, 0x65, 0x6e, 0x3b, 0x61, 0x6e, 0x6e, 0x3b, 0x15f, 0x65, 0x6e, 0x3b, 0xfd, 0x65, 0x6b, 0x15f, 0x65,
+0x6e, 0x62, 0x65, 0x3b, 0x64, 0x75, 0x15f, 0x65, 0x6e, 0x62, 0x65, 0x3b, 0x73, 0x69, 0x15f, 0x65, 0x6e, 0x62, 0x65, 0x3b,
+0xe7, 0x61, 0x72, 0x15f, 0x65, 0x6e, 0x62, 0x65, 0x3b, 0x70, 0x65, 0x6e, 0x15f, 0x65, 0x6e, 0x62, 0x65, 0x3b, 0x61, 0x6e,
+0x6e, 0x61, 0x3b, 0x15f, 0x65, 0x6e, 0x62, 0x65, 0x3b, 0x64a, 0x6d5, 0x3b, 0x62f, 0x6c8, 0x3b, 0x633, 0x6d5, 0x3b, 0x686, 0x627,
+0x3b, 0x67e, 0x6d5, 0x3b, 0x62c, 0x6c8, 0x3b, 0x634, 0x6d5, 0x3b, 0x64a, 0x6d5, 0x643, 0x634, 0x6d5, 0x646, 0x628, 0x6d5, 0x3b, 0x62f,
+0x6c8, 0x634, 0x6d5, 0x646, 0x628, 0x6d5, 0x3b, 0x633, 0x6d5, 0x64a, 0x634, 0x6d5, 0x646, 0x628, 0x6d5, 0x3b, 0x686, 0x627, 0x631, 0x634,
+0x6d5, 0x646, 0x628, 0x6d5, 0x3b, 0x67e, 0x6d5, 0x64a, 0x634, 0x6d5, 0x646, 0x628, 0x6d5, 0x3b, 0x62c, 0x6c8, 0x645, 0x6d5, 0x3b, 0x634,
+0x6d5, 0x646, 0x628, 0x6d5, 0x3b, 0x64a, 0x3b, 0x62f, 0x3b, 0x633, 0x3b, 0x686, 0x3b, 0x67e, 0x3b, 0x62c, 0x3b, 0x634, 0x3b, 0x43d,
+0x435, 0x434, 0x456, 0x43b, 0x44f, 0x3b, 0x43f, 0x43e, 0x43d, 0x435, 0x434, 0x456, 0x43b, 0x43e, 0x43a, 0x3b, 0x432, 0x456, 0x432, 0x442,
+0x43e, 0x440, 0x43e, 0x43a, 0x3b, 0x441, 0x435, 0x440, 0x435, 0x434, 0x430, 0x3b, 0x447, 0x435, 0x442, 0x432, 0x435, 0x440, 0x3b, 0x43f,
+0x2bc, 0x44f, 0x442, 0x43d, 0x438, 0x446, 0x44f, 0x3b, 0x441, 0x443, 0x431, 0x43e, 0x442, 0x430, 0x3b, 0x41d, 0x3b, 0x41f, 0x3b, 0x412,
+0x3b, 0x421, 0x3b, 0x427, 0x3b, 0x41f, 0x3b, 0x421, 0x3b, 0x627, 0x62a, 0x648, 0x627, 0x631, 0x3b, 0x67e, 0x6cc, 0x631, 0x3b, 0x645,
+0x646, 0x6af, 0x644, 0x3b, 0x628, 0x62f, 0x6be, 0x3b, 0x62c, 0x645, 0x639, 0x631, 0x627, 0x62a, 0x3b, 0x62c, 0x645, 0x639, 0x6c1, 0x3b,
+0x6c1, 0x641, 0x62a, 0x6c1, 0x3b, 0x59, 0x61, 0x6b, 0x3b, 0x44, 0x75, 0x73, 0x68, 0x3b, 0x53, 0x65, 0x73, 0x68, 0x3b, 0x43,
+0x68, 0x6f, 0x72, 0x3b, 0x50, 0x61, 0x79, 0x3b, 0x4a, 0x75, 0x6d, 0x3b, 0x53, 0x68, 0x61, 0x6e, 0x3b, 0x79, 0x61, 0x6b,
+0x73, 0x68, 0x61, 0x6e, 0x62, 0x61, 0x3b, 0x64, 0x75, 0x73, 0x68, 0x61, 0x6e, 0x62, 0x61, 0x3b, 0x73, 0x65, 0x73, 0x68,
+0x61, 0x6e, 0x62, 0x61, 0x3b, 0x63, 0x68, 0x6f, 0x72, 0x73, 0x68, 0x61, 0x6e, 0x62, 0x61, 0x3b, 0x70, 0x61, 0x79, 0x73,
+0x68, 0x61, 0x6e, 0x62, 0x61, 0x3b, 0x6a, 0x75, 0x6d, 0x61, 0x3b, 0x73, 0x68, 0x61, 0x6e, 0x62, 0x61, 0x3b, 0x59, 0x3b,
+0x44, 0x3b, 0x53, 0x3b, 0x43, 0x3b, 0x50, 0x3b, 0x4a, 0x3b, 0x53, 0x3b, 0x6cc, 0x2e, 0x3b, 0x62f, 0x2e, 0x3b, 0x633, 0x2e,
+0x3b, 0x686, 0x2e, 0x3b, 0x67e, 0x2e, 0x3b, 0x62c, 0x2e, 0x3b, 0x634, 0x2e, 0x3b, 0x42f, 0x43a, 0x448, 0x3b, 0x414, 0x443, 0x448,
+0x3b, 0x421, 0x435, 0x448, 0x3b, 0x427, 0x43e, 0x440, 0x3b, 0x41f, 0x430, 0x439, 0x3b, 0x416, 0x443, 0x43c, 0x3b, 0x428, 0x430, 0x43d,
+0x3b, 0x42f, 0x43a, 0x448, 0x430, 0x43d, 0x431, 0x430, 0x3b, 0x414, 0x443, 0x448, 0x430, 0x43d, 0x431, 0x430, 0x3b, 0x421, 0x435, 0x448,
+0x430, 0x43d, 0x431, 0x430, 0x3b, 0x427, 0x43e, 0x440, 0x448, 0x430, 0x43d, 0x431, 0x430, 0x3b, 0x41f, 0x430, 0x439, 0x448, 0x430, 0x43d,
+0x431, 0x430, 0x3b, 0x416, 0x443, 0x43c, 0x430, 0x3b, 0x428, 0x430, 0x43d, 0x431, 0x430, 0x3b, 0x42f, 0x3b, 0x414, 0x3b, 0x421, 0x3b,
+0x427, 0x3b, 0x41f, 0x3b, 0x416, 0x3b, 0x428, 0x3b, 0x44f, 0x43a, 0x448, 0x3b, 0x434, 0x443, 0x448, 0x3b, 0x441, 0x435, 0x448, 0x3b,
+0x447, 0x43e, 0x440, 0x3b, 0x43f, 0x430, 0x439, 0x3b, 0x436, 0x443, 0x43c, 0x3b, 0x448, 0x430, 0x43d, 0x3b, 0x44f, 0x43a, 0x448, 0x430,
+0x43d, 0x431, 0x430, 0x3b, 0x434, 0x443, 0x448, 0x430, 0x43d, 0x431, 0x430, 0x3b, 0x441, 0x435, 0x448, 0x430, 0x43d, 0x431, 0x430, 0x3b,
+0x447, 0x43e, 0x440, 0x448, 0x430, 0x43d, 0x431, 0x430, 0x3b, 0x43f, 0x430, 0x439, 0x448, 0x430, 0x43d, 0x431, 0x430, 0x3b, 0x436, 0x443,
+0x43c, 0x430, 0x3b, 0x448, 0x430, 0x43d, 0x431, 0x430, 0x3b, 0x43, 0x4e, 0x3b, 0x54, 0x68, 0x20, 0x32, 0x3b, 0x54, 0x68, 0x20,
+0x33, 0x3b, 0x54, 0x68, 0x20, 0x34, 0x3b, 0x54, 0x68, 0x20, 0x35, 0x3b, 0x54, 0x68, 0x20, 0x36, 0x3b, 0x54, 0x68, 0x20,
+0x37, 0x3b, 0x43, 0x68, 0x1ee7, 0x20, 0x4e, 0x68, 0x1ead, 0x74, 0x3b, 0x54, 0x68, 0x1ee9, 0x20, 0x48, 0x61, 0x69, 0x3b, 0x54,
+0x68, 0x1ee9, 0x20, 0x42, 0x61, 0x3b, 0x54, 0x68, 0x1ee9, 0x20, 0x54, 0x1b0, 0x3b, 0x54, 0x68, 0x1ee9, 0x20, 0x4e, 0x103, 0x6d,
+0x3b, 0x54, 0x68, 0x1ee9, 0x20, 0x53, 0xe1, 0x75, 0x3b, 0x54, 0x68, 0x1ee9, 0x20, 0x42, 0x1ea3, 0x79, 0x3b, 0x43, 0x4e, 0x3b,
+0x54, 0x32, 0x3b, 0x54, 0x33, 0x3b, 0x54, 0x34, 0x3b, 0x54, 0x35, 0x3b, 0x54, 0x36, 0x3b, 0x54, 0x37, 0x3b, 0x53, 0x75,
+0x6c, 0x3b, 0x4c, 0x6c, 0x75, 0x6e, 0x3b, 0x4d, 0x61, 0x77, 0x3b, 0x4d, 0x65, 0x72, 0x3b, 0x49, 0x61, 0x75, 0x3b, 0x47,
+0x77, 0x65, 0x3b, 0x53, 0x61, 0x64, 0x3b, 0x44, 0x79, 0x64, 0x64, 0x20, 0x53, 0x75, 0x6c, 0x3b, 0x44, 0x79, 0x64, 0x64,
+0x20, 0x4c, 0x6c, 0x75, 0x6e, 0x3b, 0x44, 0x79, 0x64, 0x64, 0x20, 0x4d, 0x61, 0x77, 0x72, 0x74, 0x68, 0x3b, 0x44, 0x79,
+0x64, 0x64, 0x20, 0x4d, 0x65, 0x72, 0x63, 0x68, 0x65, 0x72, 0x3b, 0x44, 0x79, 0x64, 0x64, 0x20, 0x49, 0x61, 0x75, 0x3b,
+0x44, 0x79, 0x64, 0x64, 0x20, 0x47, 0x77, 0x65, 0x6e, 0x65, 0x72, 0x3b, 0x44, 0x79, 0x64, 0x64, 0x20, 0x53, 0x61, 0x64,
+0x77, 0x72, 0x6e, 0x3b, 0x53, 0x3b, 0x4c, 0x6c, 0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x49, 0x3b, 0x47, 0x3b, 0x53, 0x3b, 0x53,
+0x75, 0x6c, 0x3b, 0x4c, 0x6c, 0x75, 0x6e, 0x3b, 0x4d, 0x61, 0x77, 0x3b, 0x4d, 0x65, 0x72, 0x3b, 0x49, 0x61, 0x75, 0x3b,
+0x47, 0x77, 0x65, 0x6e, 0x3b, 0x53, 0x61, 0x64, 0x3b, 0x44, 0x69, 0x62, 0x3b, 0x41, 0x6c, 0x74, 0x3b, 0x54, 0x61, 0x6c,
+0x3b, 0xc0, 0x6c, 0x61, 0x3b, 0x41, 0x6c, 0x78, 0x3b, 0xc0, 0x6a, 0x6a, 0x3b, 0x41, 0x73, 0x65, 0x3b, 0x44, 0x69, 0x62,
+0xe9, 0x65, 0x72, 0x3b, 0x41, 0x6c, 0x74, 0x69, 0x6e, 0x65, 0x3b, 0x54, 0x61, 0x6c, 0x61, 0x61, 0x74, 0x61, 0x3b, 0xc0,
+0x6c, 0x61, 0x72, 0x62, 0x61, 0x3b, 0x41, 0x6c, 0x78, 0x61, 0x6d, 0x69, 0x73, 0x3b, 0xc0, 0x6a, 0x6a, 0x75, 0x6d, 0x61,
+0x3b, 0x41, 0x73, 0x65, 0x65, 0x72, 0x3b, 0xc0, 0xec, 0x6b, 0xfa, 0x3b, 0x41, 0x6a, 0xe9, 0x3b, 0xcc, 0x73, 0x1eb9, 0x301,
+0x67, 0x75, 0x6e, 0x3b, 0x1ecc, 0x6a, 0x1ecd, 0x301, 0x72, 0xfa, 0x3b, 0x1ecc, 0x6a, 0x1ecd, 0x301, 0x62, 0x1ecd, 0x3b, 0x1eb8, 0x74,
+0xec, 0x3b, 0xc0, 0x62, 0xe1, 0x6d, 0x1eb9, 0x301, 0x74, 0x61, 0x3b, 0x1ecc, 0x6a, 0x1ecd, 0x301, 0x20, 0xc0, 0xec, 0x6b, 0xfa,
+0x3b, 0x1ecc, 0x6a, 0x1ecd, 0x301, 0x20, 0x41, 0x6a, 0xe9, 0x3b, 0x1ecc, 0x6a, 0x1ecd, 0x301, 0x20, 0xcc, 0x73, 0x1eb9, 0x301, 0x67,
+0x75, 0x6e, 0x3b, 0x1ecc, 0x6a, 0x1ecd, 0x301, 0x72, 0xfa, 0x3b, 0x1ecc, 0x6a, 0x1ecd, 0x301, 0x62, 0x1ecd, 0x3b, 0x1ecc, 0x6a, 0x1ecd,
+0x301, 0x20, 0x1eb8, 0x74, 0xec, 0x3b, 0x1ecc, 0x6a, 0x1ecd, 0x301, 0x20, 0xc0, 0x62, 0xe1, 0x6d, 0x1eb9, 0x301, 0x74, 0x61, 0x3b,
+0xc0, 0xec, 0x6b, 0xfa, 0x3b, 0x41, 0x6a, 0xe9, 0x3b, 0xcc, 0x73, 0x25b, 0x301, 0x67, 0x75, 0x6e, 0x3b, 0x186, 0x6a, 0x254,
+0x301, 0x72, 0xfa, 0x3b, 0x186, 0x6a, 0x254, 0x301, 0x62, 0x254, 0x3b, 0x190, 0x74, 0xec, 0x3b, 0xc0, 0x62, 0xe1, 0x6d, 0x25b,
+0x301, 0x74, 0x61, 0x3b, 0x186, 0x6a, 0x254, 0x301, 0x20, 0xc0, 0xec, 0x6b, 0xfa, 0x3b, 0x186, 0x6a, 0x254, 0x301, 0x20, 0x41,
+0x6a, 0xe9, 0x3b, 0x186, 0x6a, 0x254, 0x301, 0x20, 0xcc, 0x73, 0x25b, 0x301, 0x67, 0x75, 0x6e, 0x3b, 0x186, 0x6a, 0x254, 0x301,
+0x72, 0xfa, 0x3b, 0x186, 0x6a, 0x254, 0x301, 0x62, 0x254, 0x3b, 0x186, 0x6a, 0x254, 0x301, 0x20, 0x190, 0x74, 0xec, 0x3b, 0x186,
+0x6a, 0x254, 0x301, 0x20, 0xc0, 0x62, 0xe1, 0x6d, 0x25b, 0x301, 0x74, 0x61, 0x3b, 0x53, 0x6f, 0x6e, 0x3b, 0x4d, 0x73, 0x6f,
+0x3b, 0x42, 0x69, 0x6c, 0x3b, 0x54, 0x68, 0x61, 0x3b, 0x53, 0x69, 0x6e, 0x3b, 0x48, 0x6c, 0x61, 0x3b, 0x4d, 0x67, 0x71,
+0x3b, 0x49, 0x53, 0x6f, 0x6e, 0x74, 0x6f, 0x3b, 0x55, 0x4d, 0x73, 0x6f, 0x6d, 0x62, 0x75, 0x6c, 0x75, 0x6b, 0x6f, 0x3b,
+0x55, 0x4c, 0x77, 0x65, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x3b, 0x55, 0x4c, 0x77, 0x65, 0x73, 0x69, 0x74, 0x68, 0x61,
+0x74, 0x68, 0x75, 0x3b, 0x55, 0x4c, 0x77, 0x65, 0x73, 0x69, 0x6e, 0x65, 0x3b, 0x55, 0x4c, 0x77, 0x65, 0x73, 0x69, 0x68,
+0x6c, 0x61, 0x6e, 0x75, 0x3b, 0x55, 0x4d, 0x67, 0x71, 0x69, 0x62, 0x65, 0x6c, 0x6f, 0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0x42,
+0x3b, 0x54, 0x3b, 0x53, 0x3b, 0x48, 0x3b, 0x4d, 0x3b, 0x73, 0xf8, 0x6e, 0x3b, 0x6d, 0xe5, 0x6e, 0x3b, 0x74, 0x79, 0x73,
+0x3b, 0x6f, 0x6e, 0x73, 0x3b, 0x74, 0x6f, 0x72, 0x3b, 0x66, 0x72, 0x65, 0x3b, 0x6c, 0x61, 0x75, 0x3b, 0x73, 0xf8, 0x6e,
+0x64, 0x61, 0x67, 0x3b, 0x6d, 0xe5, 0x6e, 0x64, 0x61, 0x67, 0x3b, 0x74, 0x79, 0x73, 0x64, 0x61, 0x67, 0x3b, 0x6f, 0x6e,
+0x73, 0x64, 0x61, 0x67, 0x3b, 0x74, 0x6f, 0x72, 0x73, 0x64, 0x61, 0x67, 0x3b, 0x66, 0x72, 0x65, 0x64, 0x61, 0x67, 0x3b,
+0x6c, 0x61, 0x75, 0x72, 0x64, 0x61, 0x67, 0x3b, 0x73, 0xf8, 0x2e, 0x3b, 0x6d, 0xe5, 0x2e, 0x3b, 0x74, 0x79, 0x2e, 0x3b,
+0x6f, 0x6e, 0x2e, 0x3b, 0x74, 0x6f, 0x2e, 0x3b, 0x66, 0x72, 0x2e, 0x3b, 0x6c, 0x61, 0x2e, 0x3b, 0x43d, 0x435, 0x434, 0x3b,
+0x43f, 0x43e, 0x43d, 0x3b, 0x443, 0x442, 0x43e, 0x3b, 0x441, 0x440, 0x438, 0x3b, 0x447, 0x435, 0x442, 0x3b, 0x43f, 0x435, 0x442, 0x3b,
+0x441, 0x443, 0x431, 0x3b, 0x43d, 0x435, 0x434, 0x458, 0x435, 0x459, 0x430, 0x3b, 0x43f, 0x43e, 0x43d, 0x435, 0x434, 0x458, 0x435, 0x459,
+0x430, 0x43a, 0x3b, 0x443, 0x442, 0x43e, 0x440, 0x430, 0x43a, 0x3b, 0x441, 0x440, 0x438, 0x458, 0x435, 0x434, 0x430, 0x3b, 0x447, 0x435,
+0x442, 0x432, 0x440, 0x442, 0x430, 0x43a, 0x3b, 0x43f, 0x435, 0x442, 0x430, 0x43a, 0x3b, 0x441, 0x443, 0x431, 0x43e, 0x442, 0x430, 0x3b,
+0x4a, 0x65, 0x64, 0x3b, 0x4a, 0x65, 0x6c, 0x3b, 0x4a, 0x65, 0x6d, 0x3b, 0x4a, 0x65, 0x72, 0x63, 0x3b, 0x4a, 0x65, 0x72,
+0x64, 0x3b, 0x4a, 0x65, 0x68, 0x3b, 0x4a, 0x65, 0x73, 0x3b, 0x4a, 0x65, 0x64, 0x6f, 0x6f, 0x6e, 0x65, 0x65, 0x3b, 0x4a,
+0x65, 0x6c, 0x68, 0x65, 0x69, 0x6e, 0x3b, 0x4a, 0x65, 0x6d, 0x61, 0x79, 0x72, 0x74, 0x3b, 0x4a, 0x65, 0x72, 0x63, 0x65,
+0x61, 0x6e, 0x3b, 0x4a, 0x65, 0x72, 0x64, 0x65, 0x69, 0x6e, 0x3b, 0x4a, 0x65, 0x68, 0x65, 0x69, 0x6e, 0x65, 0x79, 0x3b,
+0x4a, 0x65, 0x73, 0x61, 0x72, 0x6e, 0x3b, 0x53, 0x75, 0x6c, 0x3b, 0x4c, 0x75, 0x6e, 0x3b, 0x4d, 0x74, 0x68, 0x3b, 0x4d,
+0x68, 0x72, 0x3b, 0x59, 0x6f, 0x77, 0x3b, 0x47, 0x77, 0x65, 0x3b, 0x53, 0x61, 0x64, 0x3b, 0x64, 0x79, 0x20, 0x53, 0x75,
+0x6c, 0x3b, 0x64, 0x79, 0x20, 0x4c, 0x75, 0x6e, 0x3b, 0x64, 0x79, 0x20, 0x4d, 0x65, 0x75, 0x72, 0x74, 0x68, 0x3b, 0x64,
+0x79, 0x20, 0x4d, 0x65, 0x72, 0x68, 0x65, 0x72, 0x3b, 0x64, 0x79, 0x20, 0x59, 0x6f, 0x77, 0x3b, 0x64, 0x79, 0x20, 0x47,
+0x77, 0x65, 0x6e, 0x65, 0x72, 0x3b, 0x64, 0x79, 0x20, 0x53, 0x61, 0x64, 0x6f, 0x72, 0x6e, 0x3b, 0x4b, 0x77, 0x65, 0x3b,
+0x44, 0x77, 0x6f, 0x3b, 0x42, 0x65, 0x6e, 0x3b, 0x57, 0x75, 0x6b, 0x3b, 0x59, 0x61, 0x77, 0x3b, 0x46, 0x69, 0x61, 0x3b,
+0x4d, 0x65, 0x6d, 0x3b, 0x4b, 0x77, 0x65, 0x73, 0x69, 0x64, 0x61, 0x3b, 0x44, 0x77, 0x6f, 0x77, 0x64, 0x61, 0x3b, 0x42,
+0x65, 0x6e, 0x61, 0x64, 0x61, 0x3b, 0x57, 0x75, 0x6b, 0x75, 0x64, 0x61, 0x3b, 0x59, 0x61, 0x77, 0x64, 0x61, 0x3b, 0x46,
+0x69, 0x64, 0x61, 0x3b, 0x4d, 0x65, 0x6d, 0x65, 0x6e, 0x65, 0x64, 0x61, 0x3b, 0x4b, 0x3b, 0x44, 0x3b, 0x42, 0x3b, 0x57,
+0x3b, 0x59, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x906, 0x92f, 0x924, 0x93e, 0x930, 0x3b, 0x938, 0x94b, 0x92e, 0x93e, 0x930, 0x3b, 0x92e,
+0x902, 0x917, 0x933, 0x93e, 0x930, 0x3b, 0x92c, 0x941, 0x927, 0x935, 0x93e, 0x930, 0x3b, 0x917, 0x941, 0x930, 0x941, 0x935, 0x93e, 0x930,
+0x3b, 0x936, 0x941, 0x915, 0x94d, 0x930, 0x93e, 0x930, 0x3b, 0x936, 0x947, 0x928, 0x935, 0x93e, 0x930, 0x3b, 0x906, 0x3b, 0x938, 0x94b,
+0x3b, 0x92e, 0x902, 0x3b, 0x92c, 0x941, 0x3b, 0x917, 0x941, 0x3b, 0x936, 0x941, 0x3b, 0x936, 0x947, 0x3b, 0x1ee4, 0x6b, 0x61, 0x3b,
+0x4d, 0x1ecd, 0x6e, 0x3b, 0x54, 0x69, 0x75, 0x3b, 0x57, 0x65, 0x6e, 0x3b, 0x54, 0x1ecd, 0x1ecd, 0x3b, 0x46, 0x72, 0x61, 0x1ecb,
+0x3b, 0x53, 0x61, 0x74, 0x3b, 0x4d, 0x62, 0x1ecd, 0x73, 0x1ecb, 0x20, 0x1ee4, 0x6b, 0x61, 0x3b, 0x4d, 0x1ecd, 0x6e, 0x64, 0x65,
+0x3b, 0x54, 0x69, 0x75, 0x7a, 0x64, 0x65, 0x65, 0x3b, 0x57, 0x65, 0x6e, 0x65, 0x7a, 0x64, 0x65, 0x65, 0x3b, 0x54, 0x1ecd,
+0x1ecd, 0x7a, 0x64, 0x65, 0x65, 0x3b, 0x46, 0x72, 0x61, 0x1ecb, 0x64, 0x65, 0x65, 0x3b, 0x53, 0x61, 0x74, 0x1ecd, 0x64, 0x65,
+0x65, 0x3b, 0x57, 0x6b, 0x79, 0x3b, 0x57, 0x6b, 0x77, 0x3b, 0x57, 0x6b, 0x6c, 0x3b, 0x57, 0x74, 0x169, 0x3b, 0x57, 0x6b,
+0x6e, 0x3b, 0x57, 0x74, 0x6e, 0x3b, 0x57, 0x74, 0x68, 0x3b, 0x57, 0x61, 0x20, 0x6b, 0x79, 0x75, 0x6d, 0x77, 0x61, 0x3b,
+0x57, 0x61, 0x20, 0x6b, 0x77, 0x61, 0x6d, 0x62, 0x129, 0x6c, 0x129, 0x6c, 0x79, 0x61, 0x3b, 0x57, 0x61, 0x20, 0x6b, 0x65,
+0x6c, 0x129, 0x3b, 0x57, 0x61, 0x20, 0x6b, 0x61, 0x74, 0x61, 0x74, 0x169, 0x3b, 0x57, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61,
+0x3b, 0x57, 0x61, 0x20, 0x6b, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x57, 0x61, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x74, 0x68,
+0x61, 0x74, 0x169, 0x3b, 0x59, 0x3b, 0x57, 0x3b, 0x45, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x64, 0x6f,
+0x6d, 0x3b, 0x6c, 0x75, 0x6e, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x6d, 0x69, 0x65, 0x3b, 0x6a, 0x6f, 0x69, 0x3b, 0x76, 0x69,
+0x6e, 0x3b, 0x73, 0x61, 0x62, 0x3b, 0x64, 0x6f, 0x6d, 0x65, 0x6e, 0x69, 0x65, 0x3b, 0x6c, 0x75, 0x6e, 0x69, 0x73, 0x3b,
+0x6d, 0x61, 0x72, 0x74, 0x61, 0x72, 0x73, 0x3b, 0x6d, 0x69, 0x65, 0x72, 0x63, 0x75, 0x73, 0x3b, 0x6a, 0x6f, 0x69, 0x62,
+0x65, 0x3b, 0x76, 0x69, 0x6e, 0x61, 0x72, 0x73, 0x3b, 0x73, 0x61, 0x62, 0x69, 0x64, 0x65, 0x3b, 0x6b, 0x254, 0x73, 0x3b,
+0x64, 0x7a, 0x6f, 0x3b, 0x62, 0x6c, 0x61, 0x3b, 0x6b, 0x75, 0x256, 0x3b, 0x79, 0x61, 0x77, 0x3b, 0x66, 0x69, 0x256, 0x3b,
+0x6d, 0x65, 0x6d, 0x3b, 0x6b, 0x254, 0x73, 0x69, 0x256, 0x61, 0x3b, 0x64, 0x7a, 0x6f, 0x256, 0x61, 0x3b, 0x62, 0x6c, 0x61,
+0x256, 0x61, 0x3b, 0x6b, 0x75, 0x256, 0x61, 0x3b, 0x79, 0x61, 0x77, 0x6f, 0x256, 0x61, 0x3b, 0x66, 0x69, 0x256, 0x61, 0x3b,
+0x6d, 0x65, 0x6d, 0x6c, 0x65, 0x256, 0x61, 0x3b, 0x6b, 0x3b, 0x64, 0x3b, 0x62, 0x3b, 0x6b, 0x3b, 0x79, 0x3b, 0x66, 0x3b,
+0x6d, 0x3b, 0x4c, 0x50, 0x3b, 0x50, 0x31, 0x3b, 0x50, 0x32, 0x3b, 0x50, 0x33, 0x3b, 0x50, 0x34, 0x3b, 0x50, 0x35, 0x3b,
+0x50, 0x36, 0x3b, 0x4c, 0x101, 0x70, 0x75, 0x6c, 0x65, 0x3b, 0x50, 0x6f, 0x2bb, 0x61, 0x6b, 0x61, 0x68, 0x69, 0x3b, 0x50,
+0x6f, 0x2bb, 0x61, 0x6c, 0x75, 0x61, 0x3b, 0x50, 0x6f, 0x2bb, 0x61, 0x6b, 0x6f, 0x6c, 0x75, 0x3b, 0x50, 0x6f, 0x2bb, 0x61,
+0x68, 0x101, 0x3b, 0x50, 0x6f, 0x2bb, 0x61, 0x6c, 0x69, 0x6d, 0x61, 0x3b, 0x50, 0x6f, 0x2bb, 0x61, 0x6f, 0x6e, 0x6f, 0x3b,
+0x4c, 0x69, 0x6e, 0x3b, 0x4c, 0x75, 0x6e, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x4d, 0x69, 0x79, 0x3b, 0x48, 0x75, 0x77, 0x3b,
+0x42, 0x69, 0x79, 0x3b, 0x53, 0x61, 0x62, 0x3b, 0x4c, 0x69, 0x6e, 0x67, 0x67, 0x6f, 0x3b, 0x4c, 0x75, 0x6e, 0x65, 0x73,
+0x3b, 0x4d, 0x61, 0x72, 0x74, 0x65, 0x73, 0x3b, 0x4d, 0x69, 0x79, 0x65, 0x72, 0x6b, 0x75, 0x6c, 0x65, 0x73, 0x3b, 0x48,
+0x75, 0x77, 0x65, 0x62, 0x65, 0x73, 0x3b, 0x42, 0x69, 0x79, 0x65, 0x72, 0x6e, 0x65, 0x73, 0x3b, 0x53, 0x61, 0x62, 0x61,
+0x64, 0x6f, 0x3b, 0x53, 0x75, 0x2e, 0x3b, 0x4d, 0xe4, 0x2e, 0x3b, 0x5a, 0x69, 0x2e, 0x3b, 0x4d, 0x69, 0x2e, 0x3b, 0x44,
+0x75, 0x2e, 0x3b, 0x46, 0x72, 0x2e, 0x3b, 0x53, 0x61, 0x2e, 0x3b, 0x53, 0x75, 0x6e, 0x6e, 0x74, 0x69, 0x67, 0x3b, 0x4d,
+0xe4, 0xe4, 0x6e, 0x74, 0x69, 0x67, 0x3b, 0x5a, 0x69, 0x69, 0x73, 0x63, 0x68, 0x74, 0x69, 0x67, 0x3b, 0x4d, 0x69, 0x74,
+0x74, 0x77, 0x75, 0x63, 0x68, 0x3b, 0x44, 0x75, 0x6e, 0x73, 0x63, 0x68, 0x74, 0x69, 0x67, 0x3b, 0x46, 0x72, 0x69, 0x69,
+0x74, 0x69, 0x67, 0x3b, 0x53, 0x61, 0x6d, 0x73, 0x63, 0x68, 0x74, 0x69, 0x67, 0x3b, 0xa46d, 0xa18f, 0x3b, 0xa18f, 0xa2cd, 0x3b,
+0xa18f, 0xa44d, 0x3b, 0xa18f, 0xa315, 0x3b, 0xa18f, 0xa1d6, 0x3b, 0xa18f, 0xa26c, 0x3b, 0xa18f, 0xa0d8, 0x3b, 0xa46d, 0xa18f, 0xa44d, 0x3b, 0xa18f,
+0xa282, 0xa2cd, 0x3b, 0xa18f, 0xa282, 0xa44d, 0x3b, 0xa18f, 0xa282, 0xa315, 0x3b, 0xa18f, 0xa282, 0xa1d6, 0x3b, 0xa18f, 0xa282, 0xa26c, 0x3b, 0xa18f,
+0xa282, 0xa0d8, 0x3b, 0xa18f, 0x3b, 0xa2cd, 0x3b, 0xa44d, 0x3b, 0xa315, 0x3b, 0xa1d6, 0x3b, 0xa26c, 0x3b, 0xa0d8, 0x3b, 0x53, 0xfc, 0x2e,
+0x3b, 0x4d, 0x61, 0x2e, 0x3b, 0x44, 0x69, 0x2e, 0x3b, 0x4d, 0x69, 0x2e, 0x3b, 0x44, 0x75, 0x2e, 0x3b, 0x46, 0x72, 0x2e,
+0x3b, 0x53, 0x61, 0x2e, 0x3b, 0x53, 0xfc, 0x6e, 0x6e, 0x64, 0x61, 0x67, 0x3b, 0x4d, 0x61, 0x61, 0x6e, 0x64, 0x61, 0x67,
+0x3b, 0x44, 0x69, 0x6e, 0x67, 0x73, 0x64, 0x61, 0x67, 0x3b, 0x4d, 0x69, 0x64, 0x64, 0x65, 0x77, 0x65, 0x6b, 0x65, 0x6e,
+0x3b, 0x44, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x73, 0x64, 0x61, 0x67, 0x3b, 0x46, 0x72, 0x65, 0x65, 0x64, 0x61, 0x67, 0x3b,
+0x53, 0xfc, 0x6e, 0x6e, 0x61, 0x76, 0x65, 0x6e, 0x64, 0x3b, 0x73, 0x6f, 0x74, 0x6e, 0x3b, 0x76, 0x75, 0x6f, 0x73, 0x3b,
+0x6d, 0x61, 0x14b, 0x3b, 0x67, 0x61, 0x73, 0x6b, 0x3b, 0x64, 0x75, 0x6f, 0x72, 0x3b, 0x62, 0x65, 0x61, 0x72, 0x3b, 0x6c,
+0xe1, 0x76, 0x3b, 0x73, 0x6f, 0x74, 0x6e, 0x61, 0x62, 0x65, 0x61, 0x69, 0x76, 0x69, 0x3b, 0x76, 0x75, 0x6f, 0x73, 0x73,
+0xe1, 0x72, 0x67, 0x61, 0x3b, 0x6d, 0x61, 0x14b, 0x14b, 0x65, 0x62, 0xe1, 0x72, 0x67, 0x61, 0x3b, 0x67, 0x61, 0x73, 0x6b,
+0x61, 0x76, 0x61, 0x68, 0x6b, 0x6b, 0x75, 0x3b, 0x64, 0x75, 0x6f, 0x72, 0x61, 0x73, 0x64, 0x61, 0x74, 0x3b, 0x62, 0x65,
+0x61, 0x72, 0x6a, 0x61, 0x64, 0x61, 0x74, 0x3b, 0x6c, 0xe1, 0x76, 0x76, 0x61, 0x72, 0x64, 0x61, 0x74, 0x3b, 0x53, 0x3b,
+0x56, 0x3b, 0x4d, 0x3b, 0x47, 0x3b, 0x44, 0x3b, 0x42, 0x3b, 0x4c, 0x3b, 0x73, 0x6f, 0x3b, 0x6d, 0xe1, 0x3b, 0x64, 0x69,
+0x3b, 0x67, 0x61, 0x3b, 0x64, 0x75, 0x3b, 0x62, 0x65, 0x3b, 0x6c, 0xe1, 0x3b, 0x73, 0x6f, 0x74, 0x6e, 0x61, 0x62, 0x65,
+0x61, 0x69, 0x76, 0x69, 0x3b, 0x6d, 0xe1, 0x6e, 0x6e, 0x6f, 0x64, 0x61, 0x74, 0x3b, 0x64, 0x69, 0x73, 0x64, 0x61, 0x74,
+0x3b, 0x67, 0x61, 0x73, 0x6b, 0x61, 0x76, 0x61, 0x68, 0x6b, 0x6b, 0x75, 0x3b, 0x64, 0x75, 0x6f, 0x72, 0x61, 0x73, 0x74,
+0x61, 0x74, 0x3b, 0x62, 0x65, 0x61, 0x72, 0x6a, 0x61, 0x64, 0x61, 0x74, 0x3b, 0x6c, 0xe1, 0x76, 0x76, 0x6f, 0x72, 0x64,
+0x61, 0x74, 0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0x44, 0x3b, 0x47, 0x3b, 0x44, 0x3b, 0x42, 0x3b, 0x4c, 0x3b, 0x43, 0x70, 0x72,
+0x3b, 0x43, 0x74, 0x74, 0x3b, 0x43, 0x6d, 0x6e, 0x3b, 0x43, 0x6d, 0x74, 0x3b, 0x41, 0x72, 0x73, 0x3b, 0x49, 0x63, 0x6d,
+0x3b, 0x45, 0x73, 0x74, 0x3b, 0x43, 0x68, 0x75, 0x6d, 0x61, 0x70, 0x69, 0x72, 0x69, 0x3b, 0x43, 0x68, 0x75, 0x6d, 0x61,
+0x74, 0x61, 0x74, 0x6f, 0x3b, 0x43, 0x68, 0x75, 0x6d, 0x61, 0x69, 0x6e, 0x65, 0x3b, 0x43, 0x68, 0x75, 0x6d, 0x61, 0x74,
+0x61, 0x6e, 0x6f, 0x3b, 0x41, 0x72, 0x61, 0x6d, 0x69, 0x73, 0x69, 0x3b, 0x49, 0x63, 0x68, 0x75, 0x6d, 0x61, 0x3b, 0x45,
+0x73, 0x61, 0x62, 0x61, 0x74, 0x6f, 0x3b, 0x43, 0x3b, 0x43, 0x3b, 0x43, 0x3b, 0x43, 0x3b, 0x41, 0x3b, 0x49, 0x3b, 0x45,
+0x3b, 0x4a, 0x75, 0x6d, 0x3b, 0x4a, 0x69, 0x6d, 0x3b, 0x4b, 0x61, 0x77, 0x3b, 0x4b, 0x61, 0x64, 0x3b, 0x4b, 0x61, 0x6e,
+0x3b, 0x4b, 0x61, 0x73, 0x3b, 0x4e, 0x67, 0x75, 0x3b, 0x49, 0x74, 0x75, 0x6b, 0x75, 0x20, 0x6a, 0x61, 0x20, 0x6a, 0x75,
+0x6d, 0x77, 0x61, 0x3b, 0x4b, 0x75, 0x72, 0x61, 0x6d, 0x75, 0x6b, 0x61, 0x20, 0x6a, 0x69, 0x6d, 0x77, 0x65, 0x72, 0x69,
+0x3b, 0x4b, 0x75, 0x72, 0x61, 0x6d, 0x75, 0x6b, 0x61, 0x20, 0x6b, 0x61, 0x77, 0x69, 0x3b, 0x4b, 0x75, 0x72, 0x61, 0x6d,
+0x75, 0x6b, 0x61, 0x20, 0x6b, 0x61, 0x64, 0x61, 0x64, 0x75, 0x3b, 0x4b, 0x75, 0x72, 0x61, 0x6d, 0x75, 0x6b, 0x61, 0x20,
+0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4b, 0x75, 0x72, 0x61, 0x6d, 0x75, 0x6b, 0x61, 0x20, 0x6b, 0x61, 0x73, 0x61, 0x6e, 0x75,
+0x3b, 0x4b, 0x69, 0x66, 0x75, 0x6c, 0x61, 0x20, 0x6e, 0x67, 0x75, 0x77, 0x6f, 0x3b, 0x4a, 0x3b, 0x4a, 0x3b, 0x4b, 0x3b,
+0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4e, 0x3b, 0x64, 0x65, 0x77, 0x3b, 0x61, 0x61, 0x253, 0x3b, 0x6d, 0x61, 0x77, 0x3b,
+0x6e, 0x6a, 0x65, 0x3b, 0x6e, 0x61, 0x61, 0x3b, 0x6d, 0x77, 0x64, 0x3b, 0x68, 0x62, 0x69, 0x3b, 0x64, 0x65, 0x77, 0x6f,
+0x3b, 0x61, 0x61, 0x253, 0x6e, 0x64, 0x65, 0x3b, 0x6d, 0x61, 0x77, 0x62, 0x61, 0x61, 0x72, 0x65, 0x3b, 0x6e, 0x6a, 0x65,
+0x73, 0x6c, 0x61, 0x61, 0x72, 0x65, 0x3b, 0x6e, 0x61, 0x61, 0x73, 0x61, 0x61, 0x6e, 0x64, 0x65, 0x3b, 0x6d, 0x61, 0x77,
+0x6e, 0x64, 0x65, 0x3b, 0x68, 0x6f, 0x6f, 0x72, 0x65, 0x2d, 0x62, 0x69, 0x69, 0x72, 0x3b, 0x64, 0x3b, 0x61, 0x3b, 0x6d,
+0x3b, 0x6e, 0x3b, 0x6e, 0x3b, 0x6d, 0x3b, 0x68, 0x3b, 0x4b, 0x4d, 0x41, 0x3b, 0x4e, 0x54, 0x54, 0x3b, 0x4e, 0x4d, 0x4e,
+0x3b, 0x4e, 0x4d, 0x54, 0x3b, 0x41, 0x52, 0x54, 0x3b, 0x4e, 0x4d, 0x41, 0x3b, 0x4e, 0x4d, 0x4d, 0x3b, 0x4b, 0x69, 0x75,
+0x6d, 0x69, 0x61, 0x3b, 0x4e, 0x6a, 0x75, 0x6d, 0x61, 0x74, 0x61, 0x74, 0x169, 0x3b, 0x4e, 0x6a, 0x75, 0x6d, 0x61, 0x69,
+0x6e, 0x65, 0x3b, 0x4e, 0x6a, 0x75, 0x6d, 0x61, 0x74, 0x61, 0x6e, 0x61, 0x3b, 0x41, 0x72, 0x61, 0x6d, 0x69, 0x74, 0x68,
+0x69, 0x3b, 0x4e, 0x6a, 0x75, 0x6d, 0x61, 0x61, 0x3b, 0x4e, 0x6a, 0x75, 0x6d, 0x61, 0x6d, 0x6f, 0x74, 0x68, 0x69, 0x3b,
+0x4b, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x41, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x41, 0x72, 0x65, 0x3b, 0x4b, 0x75,
+0x6e, 0x3b, 0x4f, 0x6e, 0x67, 0x3b, 0x49, 0x6e, 0x65, 0x3b, 0x49, 0x6c, 0x65, 0x3b, 0x53, 0x61, 0x70, 0x3b, 0x4b, 0x77,
+0x65, 0x3b, 0x4d, 0x64, 0x65, 0x72, 0x6f, 0x74, 0x20, 0x65, 0x65, 0x20, 0x61, 0x72, 0x65, 0x3b, 0x4d, 0x64, 0x65, 0x72,
+0x6f, 0x74, 0x20, 0x65, 0x65, 0x20, 0x6b, 0x75, 0x6e, 0x69, 0x3b, 0x4d, 0x64, 0x65, 0x72, 0x6f, 0x74, 0x20, 0x65, 0x65,
+0x20, 0x6f, 0x6e, 0x67, 0x2019, 0x77, 0x61, 0x6e, 0x3b, 0x4d, 0x64, 0x65, 0x72, 0x6f, 0x74, 0x20, 0x65, 0x65, 0x20, 0x69,
+0x6e, 0x65, 0x74, 0x3b, 0x4d, 0x64, 0x65, 0x72, 0x6f, 0x74, 0x20, 0x65, 0x65, 0x20, 0x69, 0x6c, 0x65, 0x3b, 0x4d, 0x64,
+0x65, 0x72, 0x6f, 0x74, 0x20, 0x65, 0x65, 0x20, 0x73, 0x61, 0x70, 0x61, 0x3b, 0x4d, 0x64, 0x65, 0x72, 0x6f, 0x74, 0x20,
+0x65, 0x65, 0x20, 0x6b, 0x77, 0x65, 0x3b, 0x41, 0x3b, 0x4b, 0x3b, 0x4f, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x53, 0x3b, 0x4b,
+0x3b, 0x44, 0x69, 0x6d, 0x3b, 0x50, 0x6f, 0x73, 0x3b, 0x50, 0x69, 0x72, 0x3b, 0x54, 0x61, 0x74, 0x3b, 0x4e, 0x61, 0x69,
+0x3b, 0x53, 0x68, 0x61, 0x3b, 0x53, 0x61, 0x62, 0x3b, 0x44, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x75, 0x3b, 0x43, 0x68, 0x69,
+0x70, 0x6f, 0x73, 0x69, 0x3b, 0x43, 0x68, 0x69, 0x70, 0x69, 0x72, 0x69, 0x3b, 0x43, 0x68, 0x69, 0x74, 0x61, 0x74, 0x75,
+0x3b, 0x43, 0x68, 0x69, 0x6e, 0x61, 0x69, 0x3b, 0x43, 0x68, 0x69, 0x73, 0x68, 0x61, 0x6e, 0x75, 0x3b, 0x53, 0x61, 0x62,
+0x75, 0x64, 0x75, 0x3b, 0x44, 0x3b, 0x50, 0x3b, 0x43, 0x3b, 0x54, 0x3b, 0x4e, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x53, 0x6f,
+0x6e, 0x3b, 0x4d, 0x76, 0x75, 0x3b, 0x53, 0x69, 0x62, 0x3b, 0x53, 0x69, 0x74, 0x3b, 0x53, 0x69, 0x6e, 0x3b, 0x53, 0x69,
+0x68, 0x3b, 0x4d, 0x67, 0x71, 0x3b, 0x53, 0x6f, 0x6e, 0x74, 0x6f, 0x3b, 0x4d, 0x76, 0x75, 0x6c, 0x6f, 0x3b, 0x53, 0x69,
+0x62, 0x69, 0x6c, 0x69, 0x3b, 0x53, 0x69, 0x74, 0x68, 0x61, 0x74, 0x68, 0x75, 0x3b, 0x53, 0x69, 0x6e, 0x65, 0x3b, 0x53,
+0x69, 0x68, 0x6c, 0x61, 0x6e, 0x75, 0x3b, 0x4d, 0x67, 0x71, 0x69, 0x62, 0x65, 0x6c, 0x6f, 0x3b, 0x53, 0x3b, 0x4d, 0x3b,
+0x53, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0x49, 0x6a, 0x70, 0x3b, 0x49, 0x6a, 0x74, 0x3b, 0x49, 0x6a,
+0x6e, 0x3b, 0x49, 0x6a, 0x74, 0x6e, 0x3b, 0x41, 0x6c, 0x68, 0x3b, 0x49, 0x6a, 0x75, 0x3b, 0x49, 0x6a, 0x6d, 0x3b, 0x49,
+0x6a, 0x75, 0x6d, 0x61, 0x70, 0x69, 0x6c, 0x69, 0x3b, 0x49, 0x6a, 0x75, 0x6d, 0x61, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x49,
+0x6a, 0x75, 0x6d, 0x61, 0x6e, 0x6e, 0x65, 0x3b, 0x49, 0x6a, 0x75, 0x6d, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x41, 0x6c,
+0x68, 0x61, 0x6d, 0x69, 0x73, 0x69, 0x3b, 0x49, 0x6a, 0x75, 0x6d, 0x61, 0x61, 0x3b, 0x49, 0x6a, 0x75, 0x6d, 0x61, 0x6d,
+0x6f, 0x73, 0x69, 0x3b, 0x32, 0x3b, 0x33, 0x3b, 0x34, 0x3b, 0x35, 0x3b, 0x36, 0x3b, 0x37, 0x3b, 0x31, 0x3b, 0x2d30, 0x2d59,
+0x2d30, 0x3b, 0x2d30, 0x2d62, 0x2d4f, 0x3b, 0x2d30, 0x2d59, 0x2d49, 0x3b, 0x2d30, 0x2d3d, 0x2d55, 0x3b, 0x2d30, 0x2d3d, 0x2d61, 0x3b, 0x2d30, 0x2d59,
+0x2d49, 0x2d4e, 0x3b, 0x2d30, 0x2d59, 0x2d49, 0x2d39, 0x3b, 0x2d30, 0x2d59, 0x2d30, 0x2d4e, 0x2d30, 0x2d59, 0x3b, 0x2d30, 0x2d62, 0x2d4f, 0x2d30, 0x2d59,
+0x3b, 0x2d30, 0x2d59, 0x2d49, 0x2d4f, 0x2d30, 0x2d59, 0x3b, 0x2d30, 0x2d3d, 0x2d55, 0x2d30, 0x2d59, 0x3b, 0x2d30, 0x2d3d, 0x2d61, 0x2d30, 0x2d59, 0x3b,
+0x2d59, 0x2d49, 0x2d4e, 0x2d61, 0x2d30, 0x2d59, 0x3b, 0x2d30, 0x2d59, 0x2d49, 0x2d39, 0x2d62, 0x2d30, 0x2d59, 0x3b, 0x61, 0x73, 0x61, 0x3b, 0x61,
+0x79, 0x6e, 0x3b, 0x61, 0x73, 0x69, 0x3b, 0x61, 0x6b, 0x1e5b, 0x3b, 0x61, 0x6b, 0x77, 0x3b, 0x61, 0x73, 0x69, 0x6d, 0x3b,
+0x61, 0x73, 0x69, 0x1e0d, 0x3b, 0x61, 0x73, 0x61, 0x6d, 0x61, 0x73, 0x3b, 0x61, 0x79, 0x6e, 0x61, 0x73, 0x3b, 0x61, 0x73,
+0x69, 0x6e, 0x61, 0x73, 0x3b, 0x61, 0x6b, 0x1e5b, 0x61, 0x73, 0x3b, 0x61, 0x6b, 0x77, 0x61, 0x73, 0x3b, 0x61, 0x73, 0x69,
+0x6d, 0x77, 0x61, 0x73, 0x3b, 0x61, 0x73, 0x69, 0x1e0d, 0x79, 0x61, 0x73, 0x3b, 0x41, 0x63, 0x65, 0x3b, 0x41, 0x72, 0x69,
+0x3b, 0x41, 0x72, 0x61, 0x3b, 0x41, 0x68, 0x61, 0x3b, 0x41, 0x6d, 0x68, 0x3b, 0x53, 0x65, 0x6d, 0x3b, 0x53, 0x65, 0x64,
+0x3b, 0x41, 0x63, 0x65, 0x72, 0x3b, 0x41, 0x72, 0x69, 0x6d, 0x3b, 0x41, 0x72, 0x61, 0x6d, 0x3b, 0x41, 0x68, 0x61, 0x64,
+0x3b, 0x41, 0x6d, 0x68, 0x61, 0x64, 0x3b, 0x53, 0x65, 0x6d, 0x3b, 0x53, 0x65, 0x64, 0x3b, 0x59, 0x3b, 0x53, 0x3b, 0x4b,
+0x3b, 0x4b, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x59, 0x61, 0x6e, 0x3b, 0x53, 0x61, 0x6e, 0x3b, 0x4b, 0x72, 0x61,
+0x1e0d, 0x3b, 0x4b, 0x75, 0x1e93, 0x3b, 0x53, 0x61, 0x6d, 0x3b, 0x53, 0x1e0d, 0x69, 0x73, 0x3b, 0x53, 0x61, 0x79, 0x3b, 0x59,
+0x61, 0x6e, 0x61, 0x73, 0x73, 0x3b, 0x53, 0x61, 0x6e, 0x61, 0x73, 0x73, 0x3b, 0x4b, 0x72, 0x61, 0x1e0d, 0x61, 0x73, 0x73,
+0x3b, 0x4b, 0x75, 0x1e93, 0x61, 0x73, 0x73, 0x3b, 0x53, 0x61, 0x6d, 0x61, 0x73, 0x73, 0x3b, 0x53, 0x1e0d, 0x69, 0x73, 0x61,
+0x73, 0x73, 0x3b, 0x53, 0x61, 0x79, 0x61, 0x73, 0x73, 0x3b, 0x43, 0x3b, 0x52, 0x3b, 0x41, 0x3b, 0x48, 0x3b, 0x4d, 0x3b,
+0x53, 0x3b, 0x44, 0x3b, 0x53, 0x41, 0x4e, 0x3b, 0x4f, 0x52, 0x4b, 0x3b, 0x4f, 0x4b, 0x42, 0x3b, 0x4f, 0x4b, 0x53, 0x3b,
+0x4f, 0x4b, 0x4e, 0x3b, 0x4f, 0x4b, 0x54, 0x3b, 0x4f, 0x4d, 0x4b, 0x3b, 0x53, 0x61, 0x6e, 0x64, 0x65, 0x3b, 0x4f, 0x72,
+0x77, 0x6f, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x7a, 0x61, 0x3b, 0x4f, 0x72, 0x77, 0x61, 0x6b, 0x61, 0x62, 0x69, 0x72, 0x69,
+0x3b, 0x4f, 0x72, 0x77, 0x61, 0x6b, 0x61, 0x73, 0x68, 0x61, 0x74, 0x75, 0x3b, 0x4f, 0x72, 0x77, 0x61, 0x6b, 0x61, 0x6e,
+0x61, 0x3b, 0x4f, 0x72, 0x77, 0x61, 0x6b, 0x61, 0x74, 0x61, 0x61, 0x6e, 0x6f, 0x3b, 0x4f, 0x72, 0x77, 0x61, 0x6d, 0x75,
+0x6b, 0x61, 0x61, 0x67, 0x61, 0x3b, 0x53, 0x3b, 0x4b, 0x3b, 0x52, 0x3b, 0x53, 0x3b, 0x4e, 0x3b, 0x54, 0x3b, 0x4d, 0x3b,
+0x4d, 0x75, 0x6c, 0x3b, 0x56, 0x69, 0x6c, 0x3b, 0x48, 0x69, 0x76, 0x3b, 0x48, 0x69, 0x64, 0x3b, 0x48, 0x69, 0x74, 0x3b,
+0x48, 0x69, 0x68, 0x3b, 0x4c, 0x65, 0x6d, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x75, 0x6c, 0x75, 0x6e, 0x67, 0x75, 0x3b, 0x70,
+0x61, 0x20, 0x73, 0x68, 0x61, 0x68, 0x75, 0x76, 0x69, 0x6c, 0x75, 0x68, 0x61, 0x3b, 0x70, 0x61, 0x20, 0x68, 0x69, 0x76,
+0x69, 0x6c, 0x69, 0x3b, 0x70, 0x61, 0x20, 0x68, 0x69, 0x64, 0x61, 0x74, 0x75, 0x3b, 0x70, 0x61, 0x20, 0x68, 0x69, 0x74,
+0x61, 0x79, 0x69, 0x3b, 0x70, 0x61, 0x20, 0x68, 0x69, 0x68, 0x61, 0x6e, 0x75, 0x3b, 0x70, 0x61, 0x20, 0x73, 0x68, 0x61,
+0x68, 0x75, 0x6c, 0x65, 0x6d, 0x62, 0x65, 0x6c, 0x61, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x48, 0x3b, 0x48, 0x3b, 0x48, 0x3b,
+0x57, 0x3b, 0x4a, 0x3b, 0x4a, 0x70, 0x69, 0x3b, 0x4a, 0x74, 0x74, 0x3b, 0x4a, 0x6e, 0x6e, 0x3b, 0x4a, 0x74, 0x6e, 0x3b,
+0x41, 0x6c, 0x68, 0x3b, 0x49, 0x6a, 0x75, 0x3b, 0x4a, 0x6d, 0x6f, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x70, 0x69, 0x6c, 0x79,
+0x69, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x74, 0x61, 0x74, 0x75, 0x75, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x6e, 0x6e, 0x65, 0x3b,
+0x4a, 0x75, 0x6d, 0x61, 0x74, 0x61, 0x6e, 0x75, 0x3b, 0x41, 0x6c, 0x68, 0x61, 0x6d, 0x69, 0x73, 0x69, 0x3b, 0x49, 0x6a,
+0x75, 0x6d, 0x61, 0x61, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x6d, 0x6f, 0x73, 0x69, 0x3b, 0x4a, 0x3b, 0x4a, 0x3b, 0x4a, 0x3b,
+0x4a, 0x3b, 0x41, 0x3b, 0x49, 0x3b, 0x4a, 0x3b, 0x6b, 0x61, 0x72, 0x3b, 0x6e, 0x74, 0x25b, 0x3b, 0x74, 0x61, 0x72, 0x3b,
+0x61, 0x72, 0x61, 0x3b, 0x61, 0x6c, 0x61, 0x3b, 0x6a, 0x75, 0x6d, 0x3b, 0x73, 0x69, 0x62, 0x3b, 0x6b, 0x61, 0x72, 0x69,
+0x3b, 0x6e, 0x74, 0x25b, 0x6e, 0x25b, 0x3b, 0x74, 0x61, 0x72, 0x61, 0x74, 0x61, 0x3b, 0x61, 0x72, 0x61, 0x62, 0x61, 0x3b,
+0x61, 0x6c, 0x61, 0x6d, 0x69, 0x73, 0x61, 0x3b, 0x6a, 0x75, 0x6d, 0x61, 0x3b, 0x73, 0x69, 0x62, 0x69, 0x72, 0x69, 0x3b,
+0x4b, 0x3b, 0x4e, 0x3b, 0x54, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x4a, 0x3b, 0x53, 0x3b, 0x4b, 0x6d, 0x61, 0x3b, 0x54, 0x61,
+0x74, 0x3b, 0x49, 0x6e, 0x65, 0x3b, 0x54, 0x61, 0x6e, 0x3b, 0x41, 0x72, 0x6d, 0x3b, 0x4d, 0x61, 0x61, 0x3b, 0x4e, 0x4d,
+0x4d, 0x3b, 0x4b, 0x69, 0x75, 0x6d, 0x69, 0x61, 0x3b, 0x4e, 0x6a, 0x75, 0x6d, 0x61, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x4e,
+0x6a, 0x75, 0x6d, 0x61, 0x69, 0x6e, 0x65, 0x3b, 0x4e, 0x6a, 0x75, 0x6d, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x41, 0x72,
+0x61, 0x6d, 0x69, 0x74, 0x68, 0x69, 0x3b, 0x4e, 0x6a, 0x75, 0x6d, 0x61, 0x61, 0x3b, 0x4e, 0x4a, 0x75, 0x6d, 0x61, 0x6d,
+0x6f, 0x74, 0x68, 0x69, 0x69, 0x3b, 0x4b, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b,
+0x13c6, 0x13cd, 0x13ac, 0x3b, 0x13c9, 0x13c5, 0x13af, 0x3b, 0x13d4, 0x13b5, 0x13c1, 0x3b, 0x13e6, 0x13a2, 0x13c1, 0x3b, 0x13c5, 0x13a9, 0x13c1, 0x3b,
+0x13e7, 0x13be, 0x13a9, 0x3b, 0x13c8, 0x13d5, 0x13be, 0x3b, 0x13a4, 0x13be, 0x13d9, 0x13d3, 0x13c6, 0x13cd, 0x13ac, 0x3b, 0x13a4, 0x13be, 0x13d9, 0x13d3,
+0x13c9, 0x13c5, 0x13af, 0x3b, 0x13d4, 0x13b5, 0x13c1, 0x13a2, 0x13a6, 0x3b, 0x13e6, 0x13a2, 0x13c1, 0x13a2, 0x13a6, 0x3b, 0x13c5, 0x13a9, 0x13c1, 0x13a2,
+0x13a6, 0x3b, 0x13e7, 0x13be, 0x13a9, 0x13b6, 0x13cd, 0x13d7, 0x3b, 0x13a4, 0x13be, 0x13d9, 0x13d3, 0x13c8, 0x13d5, 0x13be, 0x3b, 0x13c6, 0x3b, 0x13c9,
+0x3b, 0x13d4, 0x3b, 0x13e6, 0x3b, 0x13c5, 0x3b, 0x13e7, 0x3b, 0x13a4, 0x3b, 0x64, 0x69, 0x6d, 0x3b, 0x6c, 0x69, 0x6e, 0x3b, 0x6d,
+0x61, 0x72, 0x3b, 0x6d, 0x65, 0x72, 0x3b, 0x7a, 0x65, 0x3b, 0x76, 0x61, 0x6e, 0x3b, 0x73, 0x61, 0x6d, 0x3b, 0x64, 0x69,
+0x6d, 0x61, 0x6e, 0x73, 0x3b, 0x6c, 0x69, 0x6e, 0x64, 0x69, 0x3b, 0x6d, 0x61, 0x72, 0x64, 0x69, 0x3b, 0x6d, 0x65, 0x72,
+0x6b, 0x72, 0x65, 0x64, 0x69, 0x3b, 0x7a, 0x65, 0x64, 0x69, 0x3b, 0x76, 0x61, 0x6e, 0x64, 0x72, 0x65, 0x64, 0x69, 0x3b,
+0x73, 0x61, 0x6d, 0x64, 0x69, 0x3b, 0x64, 0x3b, 0x6c, 0x3b, 0x6d, 0x3b, 0x6d, 0x3b, 0x7a, 0x3b, 0x76, 0x3b, 0x73, 0x3b,
+0x4c, 0x6c, 0x32, 0x3b, 0x4c, 0x6c, 0x33, 0x3b, 0x4c, 0x6c, 0x34, 0x3b, 0x4c, 0x6c, 0x35, 0x3b, 0x4c, 0x6c, 0x36, 0x3b,
+0x4c, 0x6c, 0x37, 0x3b, 0x4c, 0x6c, 0x31, 0x3b, 0x4c, 0x69, 0x64, 0x75, 0x76, 0x61, 0x20, 0x6c, 0x79, 0x61, 0x70, 0x69,
+0x6c, 0x69, 0x3b, 0x4c, 0x69, 0x64, 0x75, 0x76, 0x61, 0x20, 0x6c, 0x79, 0x61, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x4c, 0x69,
+0x64, 0x75, 0x76, 0x61, 0x20, 0x6c, 0x79, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x63, 0x68, 0x69, 0x3b, 0x4c, 0x69, 0x64, 0x75,
+0x76, 0x61, 0x20, 0x6c, 0x79, 0x61, 0x6e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x3b, 0x4c, 0x69, 0x64, 0x75, 0x76, 0x61, 0x20,
+0x6c, 0x79, 0x61, 0x6e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x6c, 0x69, 0x6e, 0x6a, 0x69, 0x3b, 0x4c,
+0x69, 0x64, 0x75, 0x76, 0x61, 0x20, 0x6c, 0x79, 0x61, 0x6e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x6d,
+0x61, 0x76, 0x69, 0x6c, 0x69, 0x3b, 0x4c, 0x69, 0x64, 0x75, 0x76, 0x61, 0x20, 0x6c, 0x69, 0x74, 0x61, 0x6e, 0x64, 0x69,
+0x3b, 0x50, 0xed, 0x69, 0x6c, 0x69, 0x3b, 0x54, 0xe1, 0x61, 0x74, 0x75, 0x3b, 0xcd, 0x6e, 0x65, 0x3b, 0x54, 0xe1, 0x61,
+0x6e, 0x6f, 0x3b, 0x41, 0x6c, 0x68, 0x3b, 0x49, 0x6a, 0x6d, 0x3b, 0x4d, 0xf3, 0x6f, 0x73, 0x69, 0x3b, 0x4a, 0x75, 0x6d,
+0x61, 0x70, 0xed, 0x69, 0x72, 0x69, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x74, 0xe1, 0x74, 0x75, 0x3b, 0x4a, 0x75, 0x6d, 0x61,
+0xed, 0x6e, 0x65, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x74, 0xe1, 0x61, 0x6e, 0x6f, 0x3b, 0x41, 0x6c, 0x61, 0x6d, 0xed, 0x69,
+0x73, 0x69, 0x3b, 0x49, 0x6a, 0x75, 0x6d, 0xe1, 0x61, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x6d, 0xf3, 0x6f, 0x73, 0x69, 0x3b,
+0x50, 0x3b, 0x54, 0x3b, 0x45, 0x3b, 0x4f, 0x3b, 0x41, 0x3b, 0x49, 0x3b, 0x4d, 0x3b, 0x53, 0x61, 0x62, 0x3b, 0x42, 0x61,
+0x6c, 0x3b, 0x4c, 0x77, 0x32, 0x3b, 0x4c, 0x77, 0x33, 0x3b, 0x4c, 0x77, 0x34, 0x3b, 0x4c, 0x77, 0x35, 0x3b, 0x4c, 0x77,
+0x36, 0x3b, 0x53, 0x61, 0x62, 0x62, 0x69, 0x69, 0x74, 0x69, 0x3b, 0x42, 0x61, 0x6c, 0x61, 0x7a, 0x61, 0x3b, 0x4c, 0x77,
+0x61, 0x6b, 0x75, 0x62, 0x69, 0x72, 0x69, 0x3b, 0x4c, 0x77, 0x61, 0x6b, 0x75, 0x73, 0x61, 0x74, 0x75, 0x3b, 0x4c, 0x77,
+0x61, 0x6b, 0x75, 0x6e, 0x61, 0x3b, 0x4c, 0x77, 0x61, 0x6b, 0x75, 0x74, 0x61, 0x61, 0x6e, 0x6f, 0x3b, 0x4c, 0x77, 0x61,
+0x6d, 0x75, 0x6b, 0x61, 0x61, 0x67, 0x61, 0x3b, 0x53, 0x3b, 0x42, 0x3b, 0x4c, 0x3b, 0x4c, 0x3b, 0x4c, 0x3b, 0x4c, 0x3b,
+0x4c, 0x3b, 0x50, 0x61, 0x20, 0x4d, 0x75, 0x6c, 0x75, 0x6e, 0x67, 0x75, 0x3b, 0x50, 0x61, 0x6c, 0x69, 0x63, 0x68, 0x69,
+0x6d, 0x6f, 0x3b, 0x50, 0x61, 0x6c, 0x69, 0x63, 0x68, 0x69, 0x62, 0x75, 0x6c, 0x69, 0x3b, 0x50, 0x61, 0x6c, 0x69, 0x63,
+0x68, 0x69, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x50, 0x61, 0x6c, 0x69, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x3b, 0x50, 0x61, 0x6c,
+0x69, 0x63, 0x68, 0x69, 0x73, 0x61, 0x6e, 0x6f, 0x3b, 0x50, 0x61, 0x63, 0x68, 0x69, 0x62, 0x65, 0x6c, 0x75, 0x73, 0x68,
+0x69, 0x3b, 0x64, 0x75, 0x6d, 0x3b, 0x73, 0x69, 0x67, 0x3b, 0x74, 0x65, 0x72, 0x3b, 0x6b, 0x75, 0x61, 0x3b, 0x6b, 0x69,
+0x6e, 0x3b, 0x73, 0x65, 0x73, 0x3b, 0x73, 0x61, 0x62, 0x3b, 0x64, 0x75, 0x6d, 0x69, 0x6e, 0x67, 0x75, 0x3b, 0x73, 0x69,
+0x67, 0x75, 0x6e, 0x64, 0x61, 0x2d, 0x66, 0x65, 0x72, 0x61, 0x3b, 0x74, 0x65, 0x72, 0x73, 0x61, 0x2d, 0x66, 0x65, 0x72,
+0x61, 0x3b, 0x6b, 0x75, 0x61, 0x72, 0x74, 0x61, 0x2d, 0x66, 0x65, 0x72, 0x61, 0x3b, 0x6b, 0x69, 0x6e, 0x74, 0x61, 0x2d,
+0x66, 0x65, 0x72, 0x61, 0x3b, 0x73, 0x65, 0x73, 0x74, 0x61, 0x2d, 0x66, 0x65, 0x72, 0x61, 0x3b, 0x73, 0xe1, 0x62, 0x61,
+0x64, 0x75, 0x3b, 0x44, 0x3b, 0x53, 0x3b, 0x54, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x64, 0x75, 0x6d,
+0x69, 0x6e, 0x67, 0x75, 0x3b, 0x73, 0x69, 0x67, 0x75, 0x6e, 0x64, 0x61, 0x2d, 0x66, 0x65, 0x72, 0x61, 0x3b, 0x74, 0x65,
+0x72, 0x73, 0x61, 0x2d, 0x66, 0x65, 0x72, 0x61, 0x3b, 0x6b, 0x75, 0x61, 0x72, 0x74, 0x61, 0x2d, 0x66, 0x65, 0x72, 0x61,
+0x3b, 0x6b, 0x69, 0x6e, 0x74, 0x61, 0x2d, 0x66, 0x65, 0x72, 0x61, 0x3b, 0x73, 0x65, 0x73, 0x74, 0x61, 0x2d, 0x66, 0x65,
+0x72, 0x61, 0x3b, 0x73, 0x61, 0x62, 0x61, 0x64, 0x75, 0x3b, 0x4b, 0x49, 0x55, 0x3b, 0x4d, 0x52, 0x41, 0x3b, 0x57, 0x41,
+0x49, 0x3b, 0x57, 0x45, 0x54, 0x3b, 0x57, 0x45, 0x4e, 0x3b, 0x57, 0x54, 0x4e, 0x3b, 0x4a, 0x55, 0x4d, 0x3b, 0x4b, 0x69,
+0x75, 0x6d, 0x69, 0x61, 0x3b, 0x4d, 0x75, 0x72, 0x61, 0x6d, 0x75, 0x6b, 0x6f, 0x3b, 0x57, 0x61, 0x69, 0x72, 0x69, 0x3b,
+0x57, 0x65, 0x74, 0x68, 0x61, 0x74, 0x75, 0x3b, 0x57, 0x65, 0x6e, 0x61, 0x3b, 0x57, 0x65, 0x74, 0x61, 0x6e, 0x6f, 0x3b,
+0x4a, 0x75, 0x6d, 0x61, 0x6d, 0x6f, 0x73, 0x69, 0x3b, 0x4b, 0x3b, 0x4d, 0x3b, 0x57, 0x3b, 0x57, 0x3b, 0x57, 0x3b, 0x57,
+0x3b, 0x4a, 0x3b, 0x4b, 0x74, 0x73, 0x3b, 0x4b, 0x6f, 0x74, 0x3b, 0x4b, 0x6f, 0x6f, 0x3b, 0x4b, 0x6f, 0x73, 0x3b, 0x4b,
+0x6f, 0x61, 0x3b, 0x4b, 0x6f, 0x6d, 0x3b, 0x4b, 0x6f, 0x6c, 0x3b, 0x4b, 0x6f, 0x74, 0x69, 0x73, 0x61, 0x70, 0x3b, 0x4b,
+0x6f, 0x74, 0x61, 0x61, 0x69, 0x3b, 0x4b, 0x6f, 0x61, 0x65, 0x6e, 0x67, 0x2019, 0x3b, 0x4b, 0x6f, 0x73, 0x6f, 0x6d, 0x6f,
+0x6b, 0x3b, 0x4b, 0x6f, 0x61, 0x6e, 0x67, 0x2019, 0x77, 0x61, 0x6e, 0x3b, 0x4b, 0x6f, 0x6d, 0x75, 0x75, 0x74, 0x3b, 0x4b,
+0x6f, 0x6c, 0x6f, 0x3b, 0x54, 0x3b, 0x54, 0x3b, 0x4f, 0x3b, 0x53, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x4c, 0x3b, 0x53, 0x6f,
+0x6e, 0x3b, 0x4d, 0x61, 0x3b, 0x44, 0x65, 0x3b, 0x57, 0x75, 0x3b, 0x44, 0x6f, 0x3b, 0x46, 0x72, 0x3b, 0x53, 0x61, 0x74,
+0x3b, 0x53, 0x6f, 0x6e, 0x74, 0x61, 0x78, 0x74, 0x73, 0x65, 0x65, 0x73, 0x3b, 0x4d, 0x61, 0x6e, 0x74, 0x61, 0x78, 0x74,
+0x73, 0x65, 0x65, 0x73, 0x3b, 0x44, 0x65, 0x6e, 0x73, 0x74, 0x61, 0x78, 0x74, 0x73, 0x65, 0x65, 0x73, 0x3b, 0x57, 0x75,
+0x6e, 0x73, 0x74, 0x61, 0x78, 0x74, 0x73, 0x65, 0x65, 0x73, 0x3b, 0x44, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x74, 0x61, 0x78,
+0x74, 0x73, 0x65, 0x65, 0x73, 0x3b, 0x46, 0x72, 0x61, 0x69, 0x74, 0x61, 0x78, 0x74, 0x73, 0x65, 0x65, 0x73, 0x3b, 0x53,
+0x61, 0x74, 0x65, 0x72, 0x74, 0x61, 0x78, 0x74, 0x73, 0x65, 0x65, 0x73, 0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0x45, 0x3b, 0x57,
+0x3b, 0x44, 0x3b, 0x46, 0x3b, 0x41, 0x3b, 0x53, 0x75, 0x2e, 0x3b, 0x4d, 0x6f, 0x2e, 0x3b, 0x44, 0x69, 0x2e, 0x3b, 0x4d,
+0x65, 0x2e, 0x3b, 0x44, 0x75, 0x2e, 0x3b, 0x46, 0x72, 0x2e, 0x3b, 0x53, 0x61, 0x2e, 0x3b, 0x53, 0x75, 0x6e, 0x6e, 0x64,
+0x61, 0x61, 0x63, 0x68, 0x3b, 0x4d, 0x6f, 0x68, 0x6e, 0x64, 0x61, 0x61, 0x63, 0x68, 0x3b, 0x44, 0x69, 0x6e, 0x6e, 0x73,
+0x64, 0x61, 0x61, 0x63, 0x68, 0x3b, 0x4d, 0x65, 0x74, 0x77, 0x6f, 0x63, 0x68, 0x3b, 0x44, 0x75, 0x6e, 0x6e, 0x65, 0x72,
+0x73, 0x64, 0x61, 0x61, 0x63, 0x68, 0x3b, 0x46, 0x72, 0x69, 0x69, 0x64, 0x61, 0x61, 0x63, 0x68, 0x3b, 0x53, 0x61, 0x6d,
+0x73, 0x64, 0x61, 0x61, 0x63, 0x68, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x70, 0xed, 0x6c, 0xed, 0x3b, 0x4a, 0x75, 0x6d, 0x61,
+0x74, 0xe1, 0x74, 0x75, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x6e, 0x65, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x74, 0xe1, 0x6e, 0x254,
+0x3b, 0x41, 0x6c, 0x61, 0xe1, 0x6d, 0x69, 0x73, 0x69, 0x3b, 0x4a, 0x75, 0x6d, 0xe1, 0x61, 0x3b, 0x4a, 0x75, 0x6d, 0x61,
+0x6d, 0xf3, 0x73, 0x69, 0x3b, 0x53, 0x61, 0x62, 0x69, 0x3b, 0x42, 0x61, 0x6c, 0x61, 0x3b, 0x4b, 0x75, 0x62, 0x69, 0x3b,
+0x4b, 0x75, 0x73, 0x61, 0x3b, 0x4b, 0x75, 0x6e, 0x61, 0x3b, 0x4b, 0x75, 0x74, 0x61, 0x3b, 0x4d, 0x75, 0x6b, 0x61, 0x3b,
+0x53, 0x61, 0x62, 0x69, 0x69, 0x74, 0x69, 0x3b, 0x42, 0x61, 0x6c, 0x61, 0x7a, 0x61, 0x3b, 0x4f, 0x77, 0x6f, 0x6b, 0x75,
+0x62, 0x69, 0x6c, 0x69, 0x3b, 0x4f, 0x77, 0x6f, 0x6b, 0x75, 0x73, 0x61, 0x74, 0x75, 0x3b, 0x4f, 0x6c, 0x6f, 0x6b, 0x75,
+0x6e, 0x61, 0x3b, 0x4f, 0x6c, 0x6f, 0x6b, 0x75, 0x74, 0x61, 0x61, 0x6e, 0x75, 0x3b, 0x4f, 0x6c, 0x6f, 0x6d, 0x75, 0x6b,
+0x61, 0x61, 0x67, 0x61, 0x3b, 0x53, 0x3b, 0x42, 0x3b, 0x42, 0x3b, 0x53, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4d, 0x3b, 0x4a,
+0x32, 0x3b, 0x4a, 0x33, 0x3b, 0x4a, 0x34, 0x3b, 0x4a, 0x35, 0x3b, 0x41, 0x6c, 0x3b, 0x49, 0x6a, 0x3b, 0x4a, 0x31, 0x3b,
+0x4a, 0x75, 0x6d, 0x61, 0x70, 0x69, 0x72, 0x69, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x4a, 0x75,
+0x6d, 0x61, 0x6e, 0x6e, 0x65, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x75, 0x72, 0x77, 0x61,
+0x20, 0x77, 0x61, 0x20, 0x4b, 0x61, 0x6e, 0x6e, 0x65, 0x3b, 0x4d, 0x75, 0x72, 0x77, 0x61, 0x20, 0x77, 0x61, 0x20, 0x4b,
+0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x6d, 0x6f, 0x73, 0x69, 0x3b, 0x4a, 0x70, 0x69, 0x3b, 0x4a,
+0x74, 0x74, 0x3b, 0x4a, 0x6e, 0x6e, 0x3b, 0x4a, 0x74, 0x6e, 0x3b, 0x41, 0x6c, 0x68, 0x3b, 0x49, 0x6a, 0x6d, 0x3b, 0x4a,
+0x6d, 0x6f, 0x3b, 0x4a, 0x75, 0x6d, 0x3b, 0x42, 0x61, 0x72, 0x3b, 0x41, 0x61, 0x72, 0x3b, 0x55, 0x6e, 0x69, 0x3b, 0x55,
+0x6e, 0x67, 0x3b, 0x4b, 0x61, 0x6e, 0x3b, 0x53, 0x61, 0x62, 0x3b, 0x4e, 0x61, 0x6b, 0x61, 0x65, 0x6a, 0x75, 0x6d, 0x61,
+0x3b, 0x4e, 0x61, 0x6b, 0x61, 0x65, 0x62, 0x61, 0x72, 0x61, 0x73, 0x61, 0x3b, 0x4e, 0x61, 0x6b, 0x61, 0x61, 0x72, 0x65,
+0x3b, 0x4e, 0x61, 0x6b, 0x61, 0x75, 0x6e, 0x69, 0x3b, 0x4e, 0x61, 0x6b, 0x61, 0x75, 0x6e, 0x67, 0x2019, 0x6f, 0x6e, 0x3b,
+0x4e, 0x61, 0x6b, 0x61, 0x6b, 0x61, 0x6e, 0x79, 0x3b, 0x4e, 0x61, 0x6b, 0x61, 0x73, 0x61, 0x62, 0x69, 0x74, 0x69, 0x3b,
+0x4a, 0x3b, 0x42, 0x3b, 0x41, 0x3b, 0x55, 0x3b, 0x55, 0x3b, 0x4b, 0x3b, 0x53, 0x3b, 0x41, 0x6c, 0x68, 0x3b, 0x41, 0x74,
+0x69, 0x3b, 0x41, 0x74, 0x61, 0x3b, 0x41, 0x6c, 0x61, 0x3b, 0x41, 0x6c, 0x6d, 0x3b, 0x41, 0x6c, 0x6a, 0x3b, 0x41, 0x73,
+0x73, 0x3b, 0x41, 0x6c, 0x68, 0x61, 0x64, 0x69, 0x3b, 0x41, 0x74, 0x69, 0x6e, 0x69, 0x3b, 0x41, 0x74, 0x61, 0x6c, 0x61,
+0x74, 0x61, 0x3b, 0x41, 0x6c, 0x61, 0x72, 0x62, 0x61, 0x3b, 0x41, 0x6c, 0x68, 0x61, 0x6d, 0x69, 0x69, 0x73, 0x61, 0x3b,
+0x41, 0x6c, 0x6a, 0x75, 0x6d, 0x61, 0x3b, 0x41, 0x73, 0x73, 0x61, 0x62, 0x64, 0x75, 0x3b, 0x48, 0x3b, 0x54, 0x3b, 0x54,
+0x3b, 0x4c, 0x3b, 0x4c, 0x3b, 0x4c, 0x3b, 0x53, 0x3b, 0x4a, 0x4d, 0x50, 0x3b, 0x57, 0x55, 0x54, 0x3b, 0x54, 0x41, 0x52,
+0x3b, 0x54, 0x41, 0x44, 0x3b, 0x54, 0x41, 0x4e, 0x3b, 0x54, 0x41, 0x42, 0x3b, 0x4e, 0x47, 0x53, 0x3b, 0x4a, 0x75, 0x6d,
+0x61, 0x70, 0x69, 0x6c, 0x3b, 0x57, 0x75, 0x6f, 0x6b, 0x20, 0x54, 0x69, 0x63, 0x68, 0x3b, 0x54, 0x69, 0x63, 0x68, 0x20,
+0x41, 0x72, 0x69, 0x79, 0x6f, 0x3b, 0x54, 0x69, 0x63, 0x68, 0x20, 0x41, 0x64, 0x65, 0x6b, 0x3b, 0x54, 0x69, 0x63, 0x68,
+0x20, 0x41, 0x6e, 0x67, 0x2019, 0x77, 0x65, 0x6e, 0x3b, 0x54, 0x69, 0x63, 0x68, 0x20, 0x41, 0x62, 0x69, 0x63, 0x68, 0x3b,
+0x4e, 0x67, 0x65, 0x73, 0x6f, 0x3b, 0x4a, 0x3b, 0x57, 0x3b, 0x54, 0x3b, 0x54, 0x3b, 0x54, 0x3b, 0x54, 0x3b, 0x4e, 0x3b,
+0x41, 0x73, 0x61, 0x3b, 0x41, 0x79, 0x6e, 0x3b, 0x41, 0x73, 0x6e, 0x3b, 0x41, 0x6b, 0x72, 0x3b, 0x41, 0x6b, 0x77, 0x3b,
+0x41, 0x73, 0x6d, 0x3b, 0x41, 0x73, 0x1e0d, 0x3b, 0x41, 0x73, 0x61, 0x6d, 0x61, 0x73, 0x3b, 0x41, 0x79, 0x6e, 0x61, 0x73,
+0x3b, 0x41, 0x73, 0x69, 0x6e, 0x61, 0x73, 0x3b, 0x41, 0x6b, 0x72, 0x61, 0x73, 0x3b, 0x41, 0x6b, 0x77, 0x61, 0x73, 0x3b,
+0x41, 0x73, 0x69, 0x6d, 0x77, 0x61, 0x73, 0x3b, 0x41, 0x73, 0x69, 0x1e0d, 0x79, 0x61, 0x73, 0x3b, 0x41, 0x3b, 0x41, 0x3b,
+0x41, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x41, 0x6c, 0x68, 0x3b, 0x41, 0x74, 0x69, 0x3b, 0x41, 0x74,
+0x61, 0x3b, 0x41, 0x6c, 0x61, 0x3b, 0x41, 0x6c, 0x6d, 0x3b, 0x41, 0x6c, 0x7a, 0x3b, 0x41, 0x73, 0x69, 0x3b, 0x41, 0x6c,
+0x68, 0x61, 0x64, 0x69, 0x3b, 0x41, 0x74, 0x69, 0x6e, 0x6e, 0x69, 0x3b, 0x41, 0x74, 0x61, 0x6c, 0x61, 0x61, 0x74, 0x61,
+0x3b, 0x41, 0x6c, 0x61, 0x72, 0x62, 0x61, 0x3b, 0x41, 0x6c, 0x68, 0x61, 0x6d, 0x69, 0x69, 0x73, 0x61, 0x3b, 0x41, 0x6c,
+0x7a, 0x75, 0x6d, 0x61, 0x3b, 0x41, 0x73, 0x69, 0x62, 0x74, 0x69, 0x3b, 0x4a, 0x70, 0x69, 0x3b, 0x4a, 0x74, 0x74, 0x3b,
+0x4a, 0x6d, 0x6e, 0x3b, 0x4a, 0x74, 0x6e, 0x3b, 0x41, 0x6c, 0x68, 0x3b, 0x49, 0x6a, 0x75, 0x3b, 0x4a, 0x6d, 0x6f, 0x3b,
+0x4a, 0x75, 0x6d, 0x61, 0x61, 0x70, 0x69, 0x69, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x61, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x4a,
+0x75, 0x6d, 0x61, 0x61, 0x6e, 0x65, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x41, 0x6c, 0x68,
+0x61, 0x6d, 0x69, 0x73, 0x69, 0x3b, 0x49, 0x6a, 0x75, 0x6d, 0x61, 0x61, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x61, 0x6d, 0x6f,
+0x73, 0x69, 0x3b, 0x32, 0x3b, 0x33, 0x3b, 0x34, 0x3b, 0x35, 0x3b, 0x41, 0x3b, 0x49, 0x3b, 0x31, 0x3b, 0x930, 0x92c, 0x93f,
+0x3b, 0x938, 0x92e, 0x3b, 0x92e, 0x902, 0x917, 0x932, 0x3b, 0x92c, 0x941, 0x926, 0x3b, 0x92c, 0x93f, 0x938, 0x925, 0x93f, 0x3b, 0x938,
+0x941, 0x916, 0x941, 0x930, 0x3b, 0x938, 0x941, 0x928, 0x93f, 0x3b, 0x930, 0x92c, 0x93f, 0x92c, 0x93e, 0x930, 0x3b, 0x938, 0x92e, 0x92c,
+0x93e, 0x930, 0x3b, 0x92e, 0x902, 0x917, 0x932, 0x92c, 0x93e, 0x930, 0x3b, 0x92c, 0x941, 0x926, 0x92c, 0x93e, 0x930, 0x3b, 0x92c, 0x93f,
+0x938, 0x925, 0x93f, 0x92c, 0x93e, 0x930, 0x3b, 0x938, 0x941, 0x916, 0x941, 0x930, 0x92c, 0x93e, 0x930, 0x3b, 0x938, 0x941, 0x928, 0x93f,
+0x92c, 0x93e, 0x930, 0x3b, 0x930, 0x3b, 0x938, 0x3b, 0x92e, 0x902, 0x3b, 0x92c, 0x941, 0x3b, 0x92c, 0x93f, 0x3b, 0x938, 0x941, 0x3b,
+0x938, 0x941, 0x3b, 0x43a, 0x4c0, 0x438, 0x3b, 0x43e, 0x440, 0x3b, 0x448, 0x438, 0x3b, 0x43a, 0x445, 0x430, 0x3b, 0x435, 0x430, 0x3b,
+0x43f, 0x4c0, 0x435, 0x3b, 0x448, 0x443, 0x43e, 0x3b, 0x43a, 0x4c0, 0x438, 0x440, 0x430, 0x3b, 0x43e, 0x440, 0x448, 0x43e, 0x442, 0x3b,
+0x448, 0x438, 0x43d, 0x430, 0x440, 0x430, 0x3b, 0x43a, 0x445, 0x430, 0x430, 0x440, 0x430, 0x3b, 0x435, 0x430, 0x440, 0x430, 0x3b, 0x43f,
+0x4c0, 0x435, 0x440, 0x430, 0x441, 0x43a, 0x430, 0x3b, 0x448, 0x443, 0x43e, 0x442, 0x3b, 0x43a, 0x4c0, 0x3b, 0x43e, 0x3b, 0x448, 0x3b,
+0x43a, 0x445, 0x3b, 0x435, 0x3b, 0x43f, 0x4c0, 0x3b, 0x448, 0x3b, 0x43d, 0x434, 0x2de7, 0x487, 0x467, 0x3b, 0x43f, 0x43d, 0x2de3, 0x435,
+0x3b, 0x432, 0x442, 0x43e, 0x2dec, 0x487, 0x3b, 0x441, 0x440, 0x2de3, 0x435, 0x3b, 0x447, 0x435, 0x2de6, 0x487, 0x3b, 0x43f, 0x467, 0x2de6,
+0x487, 0x3b, 0x441, 0xa64b, 0x2de0, 0x487, 0x3b, 0x43d, 0x435, 0x434, 0x463, 0x301, 0x43b, 0x467, 0x3b, 0x43f, 0x43e, 0x43d, 0x435, 0x434,
+0x463, 0x301, 0x43b, 0x44c, 0x43d, 0x438, 0x43a, 0x44a, 0x3b, 0x432, 0x442, 0x43e, 0x301, 0x440, 0x43d, 0x438, 0x43a, 0x44a, 0x3b, 0x441,
+0x440, 0x435, 0x434, 0x430, 0x300, 0x3b, 0x447, 0x435, 0x442, 0x432, 0x435, 0x440, 0x442, 0x43e, 0x301, 0x43a, 0x44a, 0x3b, 0x43f, 0x467,
+0x442, 0x43e, 0x301, 0x43a, 0x44a, 0x3b, 0x441, 0xa64b, 0x431, 0x431, 0x461, 0x301, 0x442, 0x430, 0x3b, 0x4c, 0x75, 0x6d, 0x3b, 0x4e,
+0x6b, 0x6f, 0x3b, 0x4e, 0x64, 0x79, 0x3b, 0x4e, 0x64, 0x67, 0x3b, 0x4e, 0x6a, 0x77, 0x3b, 0x4e, 0x67, 0x76, 0x3b, 0x4c,
+0x75, 0x62, 0x3b, 0x4c, 0x75, 0x6d, 0x69, 0x6e, 0x67, 0x75, 0x3b, 0x4e, 0x6b, 0x6f, 0x64, 0x79, 0x61, 0x3b, 0x4e, 0x64,
+0xe0, 0x61, 0x79, 0xe0, 0x3b, 0x4e, 0x64, 0x61, 0x6e, 0x67, 0xf9, 0x3b, 0x4e, 0x6a, 0xf2, 0x77, 0x61, 0x3b, 0x4e, 0x67,
+0xf2, 0x76, 0x79, 0x61, 0x3b, 0x4c, 0x75, 0x62, 0x69, 0x6e, 0x67, 0x75, 0x3b, 0x4c, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4e,
+0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4c, 0x3b, 0x53, 0x6f, 0x6e, 0x3b, 0x4d, 0xe9, 0x69, 0x3b, 0x44, 0xeb, 0x6e, 0x3b, 0x4d,
+0xeb, 0x74, 0x3b, 0x44, 0x6f, 0x6e, 0x3b, 0x46, 0x72, 0x65, 0x3b, 0x53, 0x61, 0x6d, 0x3b, 0x53, 0x6f, 0x6e, 0x6e, 0x64,
+0x65, 0x67, 0x3b, 0x4d, 0xe9, 0x69, 0x6e, 0x64, 0x65, 0x67, 0x3b, 0x44, 0xeb, 0x6e, 0x73, 0x63, 0x68, 0x64, 0x65, 0x67,
+0x3b, 0x4d, 0xeb, 0x74, 0x74, 0x77, 0x6f, 0x63, 0x68, 0x3b, 0x44, 0x6f, 0x6e, 0x6e, 0x65, 0x73, 0x63, 0x68, 0x64, 0x65,
+0x67, 0x3b, 0x46, 0x72, 0x65, 0x69, 0x64, 0x65, 0x67, 0x3b, 0x53, 0x61, 0x6d, 0x73, 0x63, 0x68, 0x64, 0x65, 0x67, 0x3b,
+0x53, 0x6f, 0x6e, 0x2e, 0x3b, 0x4d, 0xe9, 0x69, 0x2e, 0x3b, 0x44, 0xeb, 0x6e, 0x2e, 0x3b, 0x4d, 0xeb, 0x74, 0x2e, 0x3b,
+0x44, 0x6f, 0x6e, 0x2e, 0x3b, 0x46, 0x72, 0x65, 0x2e, 0x3b, 0x53, 0x61, 0x6d, 0x2e, 0x3b, 0x6e, 0x74, 0x73, 0x3b, 0x6b,
+0x70, 0x61, 0x3b, 0x67, 0x68, 0x254, 0x3b, 0x74, 0x254, 0x6d, 0x3b, 0x75, 0x6d, 0x65, 0x3b, 0x67, 0x68, 0x268, 0x3b, 0x64,
+0x7a, 0x6b, 0x3b, 0x74, 0x73, 0x75, 0x294, 0x6e, 0x74, 0x73, 0x268, 0x3b, 0x74, 0x73, 0x75, 0x294, 0x75, 0x6b, 0x70, 0xe0,
+0x3b, 0x74, 0x73, 0x75, 0x294, 0x75, 0x67, 0x68, 0x254, 0x65, 0x3b, 0x74, 0x73, 0x75, 0x294, 0x75, 0x74, 0x254, 0x300, 0x6d,
+0x6c, 0xf2, 0x3b, 0x74, 0x73, 0x75, 0x294, 0x75, 0x6d, 0xe8, 0x3b, 0x74, 0x73, 0x75, 0x294, 0x75, 0x67, 0x68, 0x268, 0x302,
+0x6d, 0x3b, 0x74, 0x73, 0x75, 0x294, 0x6e, 0x64, 0x7a, 0x268, 0x6b, 0x254, 0x294, 0x254, 0x3b, 0x6e, 0x3b, 0x6b, 0x3b, 0x67,
+0x3b, 0x74, 0x3b, 0x75, 0x3b, 0x67, 0x3b, 0x64, 0x3b, 0x6e, 0x254, 0x79, 0x3b, 0x6e, 0x6a, 0x61, 0x3b, 0x75, 0x75, 0x6d,
+0x3b, 0x14b, 0x67, 0x65, 0x3b, 0x6d, 0x62, 0x254, 0x3b, 0x6b, 0x254, 0x254, 0x3b, 0x6a, 0x6f, 0x6e, 0x3b, 0x14b, 0x67, 0x77,
+0xe0, 0x20, 0x6e, 0x254, 0x302, 0x79, 0x3b, 0x14b, 0x67, 0x77, 0xe0, 0x20, 0x6e, 0x6a, 0x61, 0x14b, 0x67, 0x75, 0x6d, 0x62,
+0x61, 0x3b, 0x14b, 0x67, 0x77, 0xe0, 0x20, 0xfb, 0x6d, 0x3b, 0x14b, 0x67, 0x77, 0xe0, 0x20, 0x14b, 0x67, 0xea, 0x3b, 0x14b,
+0x67, 0x77, 0xe0, 0x20, 0x6d, 0x62, 0x254, 0x6b, 0x3b, 0x14b, 0x67, 0x77, 0xe0, 0x20, 0x6b, 0x254, 0x254, 0x3b, 0x14b, 0x67,
+0x77, 0xe0, 0x20, 0x6a, 0xf4, 0x6e, 0x3b, 0x6e, 0x3b, 0x6e, 0x3b, 0x75, 0x3b, 0x14b, 0x3b, 0x6d, 0x3b, 0x6b, 0x3b, 0x6a,
+0x3b, 0x41, 0x6c, 0x68, 0x61, 0x64, 0x69, 0x3b, 0x41, 0x74, 0x69, 0x6e, 0x6e, 0x69, 0x3b, 0x41, 0x74, 0x61, 0x6c, 0x61,
+0x61, 0x74, 0x61, 0x3b, 0x41, 0x6c, 0x61, 0x72, 0x62, 0x61, 0x3b, 0x41, 0x6c, 0x68, 0x61, 0x6d, 0x69, 0x73, 0x69, 0x3b,
+0x41, 0x6c, 0x7a, 0x75, 0x6d, 0x61, 0x3b, 0x41, 0x73, 0x69, 0x62, 0x74, 0x69, 0x3b, 0x48, 0x3b, 0x54, 0x3b, 0x54, 0x3b,
+0x4c, 0x3b, 0x4d, 0x3b, 0x5a, 0x3b, 0x53, 0x3b, 0xe9, 0x74, 0x3b, 0x6d, 0x254, 0x301, 0x73, 0x3b, 0x6b, 0x77, 0x61, 0x3b,
+0x6d, 0x75, 0x6b, 0x3b, 0x14b, 0x67, 0x69, 0x3b, 0x257, 0xf3, 0x6e, 0x3b, 0x65, 0x73, 0x61, 0x3b, 0xe9, 0x74, 0x69, 0x3b,
+0x6d, 0x254, 0x301, 0x73, 0xfa, 0x3b, 0x6b, 0x77, 0x61, 0x73, 0xfa, 0x3b, 0x6d, 0x75, 0x6b, 0x254, 0x301, 0x73, 0xfa, 0x3b,
+0x14b, 0x67, 0x69, 0x73, 0xfa, 0x3b, 0x257, 0xf3, 0x6e, 0x25b, 0x73, 0xfa, 0x3b, 0x65, 0x73, 0x61, 0x253, 0x61, 0x73, 0xfa,
+0x3b, 0x65, 0x3b, 0x6d, 0x3b, 0x6b, 0x3b, 0x6d, 0x3b, 0x14b, 0x3b, 0x257, 0x3b, 0x65, 0x3b, 0x44, 0x69, 0x6d, 0x3b, 0x54,
+0x65, 0x6e, 0x3b, 0x54, 0x61, 0x6c, 0x3b, 0x41, 0x6c, 0x61, 0x3b, 0x41, 0x72, 0x61, 0x3b, 0x41, 0x72, 0x6a, 0x3b, 0x53,
+0x69, 0x62, 0x3b, 0x44, 0x69, 0x6d, 0x61, 0x73, 0x3b, 0x54, 0x65, 0x6e, 0x65, 0x14b, 0x3b, 0x54, 0x61, 0x6c, 0x61, 0x74,
+0x61, 0x3b, 0x41, 0x6c, 0x61, 0x72, 0x62, 0x61, 0x79, 0x3b, 0x41, 0x72, 0x61, 0x6d, 0x69, 0x73, 0x61, 0x79, 0x3b, 0x41,
+0x72, 0x6a, 0x75, 0x6d, 0x61, 0x3b, 0x53, 0x69, 0x62, 0x69, 0x74, 0x69, 0x3b, 0x44, 0x3b, 0x54, 0x3b, 0x54, 0x3b, 0x41,
+0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x73, 0x254, 0x301, 0x6e, 0x3b, 0x6d, 0x254, 0x301, 0x6e, 0x3b, 0x73, 0x6d, 0x62,
+0x3b, 0x73, 0x6d, 0x6c, 0x3b, 0x73, 0x6d, 0x6e, 0x3b, 0x66, 0xfa, 0x6c, 0x3b, 0x73, 0xe9, 0x72, 0x3b, 0x73, 0x254, 0x301,
+0x6e, 0x64, 0x254, 0x3b, 0x6d, 0x254, 0x301, 0x6e, 0x64, 0x69, 0x3b, 0x73, 0x254, 0x301, 0x6e, 0x64, 0x254, 0x20, 0x6d, 0x259,
+0x6c, 0xfa, 0x20, 0x6d, 0x259, 0x301, 0x62, 0x25b, 0x30c, 0x3b, 0x73, 0x254, 0x301, 0x6e, 0x64, 0x254, 0x20, 0x6d, 0x259, 0x6c,
+0xfa, 0x20, 0x6d, 0x259, 0x301, 0x6c, 0x25b, 0x301, 0x3b, 0x73, 0x254, 0x301, 0x6e, 0x64, 0x254, 0x20, 0x6d, 0x259, 0x6c, 0xfa,
+0x20, 0x6d, 0x259, 0x301, 0x6e, 0x79, 0x69, 0x3b, 0x66, 0xfa, 0x6c, 0x61, 0x64, 0xe9, 0x3b, 0x73, 0xe9, 0x72, 0x61, 0x64,
+0xe9, 0x3b, 0x73, 0x3b, 0x6d, 0x3b, 0x73, 0x3b, 0x73, 0x3b, 0x73, 0x3b, 0x66, 0x3b, 0x73, 0x3b, 0x73, 0x254, 0x301, 0x6e,
+0x3b, 0x6c, 0x1dd, 0x6e, 0x3b, 0x6d, 0x61, 0x61, 0x3b, 0x6d, 0x25b, 0x6b, 0x3b, 0x6a, 0x1dd, 0x1dd, 0x3b, 0x6a, 0xfa, 0x6d,
+0x3b, 0x73, 0x61, 0x6d, 0x3b, 0x73, 0x254, 0x301, 0x6e, 0x64, 0x1dd, 0x3b, 0x6c, 0x1dd, 0x6e, 0x64, 0xed, 0x3b, 0x6d, 0x61,
+0x61, 0x64, 0xed, 0x3b, 0x6d, 0x25b, 0x6b, 0x72, 0x25b, 0x64, 0xed, 0x3b, 0x6a, 0x1dd, 0x1dd, 0x64, 0xed, 0x3b, 0x6a, 0xfa,
+0x6d, 0x62, 0xe1, 0x3b, 0x73, 0x61, 0x6d, 0x64, 0xed, 0x3b, 0x73, 0x3b, 0x6c, 0x3b, 0x6d, 0x3b, 0x6d, 0x3b, 0x6a, 0x3b,
+0x6a, 0x3b, 0x73, 0x3b, 0x53, 0x61, 0x62, 0x3b, 0x4a, 0x74, 0x74, 0x3b, 0x4a, 0x6e, 0x6e, 0x3b, 0x4a, 0x74, 0x6e, 0x3b,
+0x41, 0x72, 0x61, 0x3b, 0x49, 0x6a, 0x75, 0x3b, 0x4a, 0x6d, 0x6f, 0x3b, 0x53, 0x61, 0x62, 0x61, 0x74, 0x6f, 0x3b, 0x4a,
+0x75, 0x6d, 0x61, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x6e, 0x6e, 0x65, 0x3b, 0x4a, 0x75, 0x6d, 0x61,
+0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x41, 0x72, 0x61, 0x68, 0x61, 0x6d, 0x69, 0x73, 0x69, 0x3b, 0x49, 0x6a, 0x75, 0x6d, 0x61,
+0x61, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x6d, 0x6f, 0x73, 0x69, 0x3b, 0x53, 0x3b, 0x4a, 0x3b, 0x4a, 0x3b, 0x4a, 0x3b, 0x41,
+0x3b, 0x49, 0x3b, 0x4a, 0x3b, 0x43, 0x79, 0x61, 0x3b, 0x43, 0x6c, 0x61, 0x3b, 0x43, 0x7a, 0x69, 0x3b, 0x43, 0x6b, 0x6f,
+0x3b, 0x43, 0x6b, 0x61, 0x3b, 0x43, 0x67, 0x61, 0x3b, 0x43, 0x7a, 0x65, 0x3b, 0x43, 0x6f, 0x6d, 0x2019, 0x79, 0x61, 0x6b,
+0x6b, 0x65, 0x3b, 0x43, 0x6f, 0x6d, 0x6c, 0x61, 0x61, 0x257, 0x69, 0x69, 0x3b, 0x43, 0x6f, 0x6d, 0x7a, 0x79, 0x69, 0x69,
+0x257, 0x69, 0x69, 0x3b, 0x43, 0x6f, 0x6d, 0x6b, 0x6f, 0x6c, 0x6c, 0x65, 0x3b, 0x43, 0x6f, 0x6d, 0x6b, 0x61, 0x6c, 0x64,
+0x1dd, 0x253, 0x6c, 0x69, 0x69, 0x3b, 0x43, 0x6f, 0x6d, 0x67, 0x61, 0x69, 0x73, 0x75, 0x75, 0x3b, 0x43, 0x6f, 0x6d, 0x7a,
+0x79, 0x65, 0x253, 0x73, 0x75, 0x75, 0x3b, 0x59, 0x3b, 0x4c, 0x3b, 0x5a, 0x3b, 0x4f, 0x3b, 0x41, 0x3b, 0x47, 0x3b, 0x45,
+0x3b, 0x73, 0x254, 0x301, 0x6e, 0x3b, 0x6d, 0x254, 0x301, 0x6e, 0x3b, 0x73, 0x6d, 0x62, 0x3b, 0x73, 0x6d, 0x6c, 0x3b, 0x73,
+0x6d, 0x6e, 0x3b, 0x6d, 0x62, 0x73, 0x3b, 0x73, 0x61, 0x73, 0x3b, 0x73, 0x254, 0x301, 0x6e, 0x64, 0x254, 0x3b, 0x6d, 0x254,
+0x301, 0x6e, 0x64, 0x254, 0x3b, 0x73, 0x254, 0x301, 0x6e, 0x64, 0x254, 0x20, 0x6d, 0x61, 0x66, 0xfa, 0x20, 0x6d, 0xe1, 0x62,
+0x61, 0x3b, 0x73, 0x254, 0x301, 0x6e, 0x64, 0x254, 0x20, 0x6d, 0x61, 0x66, 0xfa, 0x20, 0x6d, 0xe1, 0x6c, 0x61, 0x6c, 0x3b,
+0x73, 0x254, 0x301, 0x6e, 0x64, 0x254, 0x20, 0x6d, 0x61, 0x66, 0xfa, 0x20, 0x6d, 0xe1, 0x6e, 0x61, 0x3b, 0x6d, 0x61, 0x62,
+0xe1, 0x67, 0xe1, 0x20, 0x6d, 0xe1, 0x20, 0x73, 0x75, 0x6b, 0x75, 0x6c, 0x3b, 0x73, 0xe1, 0x73, 0x61, 0x64, 0x69, 0x3b,
+0x73, 0x3b, 0x6d, 0x3b, 0x73, 0x3b, 0x73, 0x3b, 0x73, 0x3b, 0x6d, 0x3b, 0x73, 0x3b, 0x43, 0xe4, 0x14b, 0x3b, 0x4a, 0x69,
+0x65, 0x63, 0x3b, 0x52, 0x25b, 0x77, 0x3b, 0x44, 0x69, 0x254, 0x331, 0x6b, 0x3b, 0x14a, 0x75, 0x61, 0x61, 0x6e, 0x3b, 0x44,
+0x68, 0x69, 0x65, 0x65, 0x63, 0x3b, 0x42, 0xe4, 0x6b, 0x25b, 0x6c, 0x3b, 0x43, 0xe4, 0x14b, 0x20, 0x6b, 0x75, 0x254, 0x74,
+0x68, 0x3b, 0x4a, 0x69, 0x65, 0x63, 0x20, 0x6c, 0x61, 0x331, 0x74, 0x3b, 0x52, 0x25b, 0x77, 0x20, 0x6c, 0xe4, 0x74, 0x6e,
+0x69, 0x3b, 0x44, 0x69, 0x254, 0x331, 0x6b, 0x20, 0x6c, 0xe4, 0x74, 0x6e, 0x69, 0x3b, 0x14a, 0x75, 0x61, 0x61, 0x6e, 0x20,
+0x6c, 0xe4, 0x74, 0x6e, 0x69, 0x3b, 0x44, 0x68, 0x69, 0x65, 0x65, 0x63, 0x20, 0x6c, 0xe4, 0x74, 0x6e, 0x69, 0x3b, 0x42,
+0xe4, 0x6b, 0x25b, 0x6c, 0x20, 0x6c, 0xe4, 0x74, 0x6e, 0x69, 0x3b, 0x43, 0x3b, 0x4a, 0x3b, 0x52, 0x3b, 0x44, 0x3b, 0x14a,
+0x3b, 0x44, 0x3b, 0x42, 0x3b, 0x431, 0x441, 0x3b, 0x431, 0x43d, 0x3b, 0x43e, 0x43f, 0x3b, 0x441, 0x44d, 0x3b, 0x447, 0x43f, 0x3b,
+0x431, 0x44d, 0x3b, 0x441, 0x431, 0x3b, 0x431, 0x430, 0x441, 0x43a, 0x44b, 0x4bb, 0x44b, 0x430, 0x43d, 0x43d, 0x44c, 0x430, 0x3b, 0x431,
+0x44d, 0x43d, 0x438, 0x434, 0x438, 0x44d, 0x43d, 0x43d, 0x44c, 0x438, 0x43a, 0x3b, 0x43e, 0x43f, 0x442, 0x443, 0x43e, 0x440, 0x443, 0x43d,
+0x43d, 0x44c, 0x443, 0x43a, 0x3b, 0x441, 0x44d, 0x440, 0x44d, 0x434, 0x44d, 0x3b, 0x447, 0x44d, 0x43f, 0x43f, 0x438, 0x44d, 0x440, 0x3b,
+0x411, 0x44d, 0x44d, 0x442, 0x438, 0x4a5, 0x441, 0x44d, 0x3b, 0x441, 0x443, 0x431, 0x443, 0x43e, 0x442, 0x430, 0x3b, 0x411, 0x3b, 0x411,
+0x3b, 0x41e, 0x3b, 0x421, 0x3b, 0x427, 0x3b, 0x411, 0x3b, 0x421, 0x3b, 0x4d, 0x75, 0x6c, 0x3b, 0x4a, 0x74, 0x74, 0x3b, 0x4a,
+0x6e, 0x6e, 0x3b, 0x4a, 0x74, 0x6e, 0x3b, 0x41, 0x6c, 0x68, 0x3b, 0x49, 0x6a, 0x75, 0x3b, 0x4a, 0x6d, 0x6f, 0x3b, 0x4d,
+0x75, 0x6c, 0x75, 0x6e, 0x67, 0x75, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x4a, 0x75, 0x6d, 0x61,
+0x6e, 0x6e, 0x65, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x41, 0x6c, 0x61, 0x68, 0x61, 0x6d, 0x69,
+0x73, 0x69, 0x3b, 0x49, 0x6a, 0x75, 0x6d, 0x61, 0x61, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x6d, 0x6f, 0x73, 0x69, 0x3b, 0x4d,
+0x3b, 0x4a, 0x3b, 0x4a, 0x3b, 0x4a, 0x3b, 0x41, 0x3b, 0x49, 0x3b, 0x4a, 0x3b, 0xa55e, 0xa54c, 0xa535, 0x3b, 0xa5f3, 0xa5e1, 0xa609,
+0x3b, 0xa55a, 0xa55e, 0xa55a, 0x3b, 0xa549, 0xa55e, 0xa552, 0x3b, 0xa549, 0xa524, 0xa546, 0xa562, 0x3b, 0xa549, 0xa524, 0xa540, 0xa56e, 0x3b, 0xa53b,
+0xa52c, 0xa533, 0x3b, 0x6c, 0x61, 0x68, 0x61, 0x64, 0x69, 0x3b, 0x74, 0x25b, 0x25b, 0x6e, 0x25b, 0x25b, 0x3b, 0x74, 0x61, 0x6c,
+0x61, 0x74, 0x61, 0x3b, 0x61, 0x6c, 0x61, 0x62, 0x61, 0x3b, 0x61, 0x69, 0x6d, 0x69, 0x73, 0x61, 0x3b, 0x61, 0x69, 0x6a,
+0x69, 0x6d, 0x61, 0x3b, 0x73, 0x69, 0x253, 0x69, 0x74, 0x69, 0x3b, 0x53, 0x75, 0x6e, 0x3b, 0x4d, 0xe4, 0x6e, 0x3b, 0x5a,
+0x69, 0x161, 0x3b, 0x4d, 0x69, 0x74, 0x3b, 0x46, 0x72, 0xf3, 0x3b, 0x46, 0x72, 0x69, 0x3b, 0x53, 0x61, 0x6d, 0x3b, 0x53,
+0x75, 0x6e, 0x6e, 0x74, 0x61, 0x67, 0x3b, 0x4d, 0xe4, 0x6e, 0x74, 0x61, 0x67, 0x3b, 0x5a, 0x69, 0x161, 0x74, 0x61, 0x67,
+0x3b, 0x4d, 0x69, 0x74, 0x74, 0x77, 0x75, 0x10d, 0x3b, 0x46, 0x72, 0xf3, 0x6e, 0x74, 0x61, 0x67, 0x3b, 0x46, 0x72, 0x69,
+0x74, 0x61, 0x67, 0x3b, 0x53, 0x61, 0x6d, 0x161, 0x74, 0x61, 0x67, 0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0x5a, 0x3b, 0x4d, 0x3b,
+0x46, 0x3b, 0x46, 0x3b, 0x53, 0x3b, 0x73, 0x64, 0x3b, 0x6d, 0x64, 0x3b, 0x6d, 0x77, 0x3b, 0x65, 0x74, 0x3b, 0x6b, 0x6c,
+0x3b, 0x66, 0x6c, 0x3b, 0x73, 0x73, 0x3b, 0x73, 0x254, 0x301, 0x6e, 0x64, 0x69, 0x25b, 0x3b, 0x6d, 0xf3, 0x6e, 0x64, 0x69,
+0x65, 0x3b, 0x6d, 0x75, 0xe1, 0x6e, 0x79, 0xe1, 0x14b, 0x6d, 0xf3, 0x6e, 0x64, 0x69, 0x65, 0x3b, 0x6d, 0x65, 0x74, 0xfa,
+0x6b, 0x70, 0xed, 0xe1, 0x70, 0x25b, 0x3b, 0x6b, 0xfa, 0x70, 0xe9, 0x6c, 0x69, 0x6d, 0x65, 0x74, 0xfa, 0x6b, 0x70, 0x69,
+0x61, 0x70, 0x25b, 0x3b, 0x66, 0x65, 0x6c, 0xe9, 0x74, 0x65, 0x3b, 0x73, 0xe9, 0x73, 0x65, 0x6c, 0xe9, 0x3b, 0x73, 0x3b,
+0x6d, 0x3b, 0x6d, 0x3b, 0x65, 0x3b, 0x6b, 0x3b, 0x66, 0x3b, 0x73, 0x3b, 0x64, 0x6f, 0x6d, 0x3b, 0x6c, 0x6c, 0x75, 0x3b,
+0x6d, 0x61, 0x72, 0x3b, 0x6d, 0x69, 0xe9, 0x3b, 0x78, 0x75, 0x65, 0x3b, 0x76, 0x69, 0x65, 0x3b, 0x73, 0xe1, 0x62, 0x3b,
+0x64, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x75, 0x3b, 0x6c, 0x6c, 0x75, 0x6e, 0x65, 0x73, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x65,
+0x73, 0x3b, 0x6d, 0x69, 0xe9, 0x72, 0x63, 0x6f, 0x6c, 0x65, 0x73, 0x3b, 0x78, 0x75, 0x65, 0x76, 0x65, 0x73, 0x3b, 0x76,
+0x69, 0x65, 0x6e, 0x72, 0x65, 0x73, 0x3b, 0x73, 0xe1, 0x62, 0x61, 0x64, 0x75, 0x3b, 0x53, 0x254, 0x301, 0x6e, 0x64, 0x69,
+0x3b, 0x4d, 0x254, 0x301, 0x6e, 0x64, 0x69, 0x3b, 0xc1, 0x70, 0x74, 0x61, 0x20, 0x4d, 0x254, 0x301, 0x6e, 0x64, 0x69, 0x3b,
+0x57, 0x25b, 0x301, 0x6e, 0x25b, 0x73, 0x25b, 0x64, 0x25b, 0x3b, 0x54, 0x254, 0x301, 0x73, 0x25b, 0x64, 0x25b, 0x3b, 0x46, 0x25b,
+0x6c, 0xe2, 0x79, 0x25b, 0x64, 0x25b, 0x3b, 0x53, 0xe1, 0x73, 0x69, 0x64, 0x25b, 0x3b, 0x53, 0x254, 0x301, 0x3b, 0x4d, 0x254,
+0x301, 0x3b, 0xc1, 0x4d, 0x3b, 0x57, 0x25b, 0x301, 0x3b, 0x54, 0x254, 0x301, 0x3b, 0x46, 0x25b, 0x3b, 0x53, 0xe1, 0x3b, 0x73,
+0x254, 0x6e, 0x64, 0x69, 0x3b, 0x6c, 0x75, 0x6e, 0x64, 0x69, 0x3b, 0x6d, 0x61, 0x72, 0x64, 0x69, 0x3b, 0x6d, 0x25b, 0x72,
+0x6b, 0x25b, 0x72, 0x25b, 0x64, 0x69, 0x3b, 0x79, 0x65, 0x64, 0x69, 0x3b, 0x76, 0x61, 0x14b, 0x64, 0x25b, 0x72, 0x25b, 0x64,
+0x69, 0x3b, 0x6d, 0x254, 0x6e, 0x254, 0x20, 0x73, 0x254, 0x6e, 0x64, 0x69, 0x3b, 0x73, 0x6f, 0x3b, 0x6c, 0x75, 0x3b, 0x6d,
+0x61, 0x3b, 0x6d, 0x25b, 0x3b, 0x79, 0x65, 0x3b, 0x76, 0x61, 0x3b, 0x6d, 0x73, 0x3b, 0x41, 0x6e, 0x65, 0x67, 0x20, 0x31,
+0x3b, 0x41, 0x6e, 0x65, 0x67, 0x20, 0x32, 0x3b, 0x41, 0x6e, 0x65, 0x67, 0x20, 0x33, 0x3b, 0x41, 0x6e, 0x65, 0x67, 0x20,
+0x34, 0x3b, 0x41, 0x6e, 0x65, 0x67, 0x20, 0x35, 0x3b, 0x41, 0x6e, 0x65, 0x67, 0x20, 0x36, 0x3b, 0x41, 0x6e, 0x65, 0x67,
+0x20, 0x37, 0x3b, 0x41, 0x31, 0x3b, 0x41, 0x32, 0x3b, 0x41, 0x33, 0x3b, 0x41, 0x34, 0x3b, 0x41, 0x35, 0x3b, 0x41, 0x36,
+0x3b, 0x41, 0x37, 0x3b, 0x6c, 0x79, 0x25b, 0x2bc, 0x25b, 0x301, 0x20, 0x73, 0x1e85, 0xed, 0x14b, 0x74, 0xe8, 0x3b, 0x6d, 0x76,
+0x66, 0xf2, 0x20, 0x6c, 0x79, 0x25b, 0x30c, 0x2bc, 0x3b, 0x6d, 0x62, 0x254, 0x301, 0x254, 0x6e, 0x74, 0xe8, 0x20, 0x6d, 0x76,
+0x66, 0xf2, 0x20, 0x6c, 0x79, 0x25b, 0x30c, 0x2bc, 0x3b, 0x74, 0x73, 0xe8, 0x74, 0x73, 0x25b, 0x300, 0x25b, 0x20, 0x6c, 0x79,
+0x25b, 0x30c, 0x2bc, 0x3b, 0x6d, 0x62, 0x254, 0x301, 0x254, 0x6e, 0x74, 0xe8, 0x20, 0x74, 0x73, 0x65, 0x74, 0x73, 0x25b, 0x300,
+0x25b, 0x20, 0x6c, 0x79, 0x25b, 0x30c, 0x2bc, 0x3b, 0x6d, 0x76, 0x66, 0xf2, 0x20, 0x6d, 0xe0, 0x67, 0x61, 0x20, 0x6c, 0x79,
+0x25b, 0x30c, 0x2bc, 0x3b, 0x6d, 0xe0, 0x67, 0x61, 0x20, 0x6c, 0x79, 0x25b, 0x30c, 0x2bc, 0x3b, 0x41, 0x14b, 0x70, 0xe9, 0x74,
+0x75, 0x77, 0x61, 0x6b, 0x21f, 0x61, 0x14b, 0x3b, 0x41, 0x14b, 0x70, 0xe9, 0x74, 0x75, 0x77, 0x61, 0x14b, 0x17e, 0x69, 0x3b,
+0x41, 0x14b, 0x70, 0xe9, 0x74, 0x75, 0x6e, 0x75, 0x14b, 0x70, 0x61, 0x3b, 0x41, 0x14b, 0x70, 0xe9, 0x74, 0x75, 0x79, 0x61,
+0x6d, 0x6e, 0x69, 0x3b, 0x41, 0x14b, 0x70, 0xe9, 0x74, 0x75, 0x74, 0x6f, 0x70, 0x61, 0x3b, 0x41, 0x14b, 0x70, 0xe9, 0x74,
+0x75, 0x7a, 0x61, 0x70, 0x74, 0x61, 0x14b, 0x3b, 0x4f, 0x77, 0xe1, 0x14b, 0x67, 0x79, 0x75, 0x17e, 0x61, 0x17e, 0x61, 0x70,
+0x69, 0x3b, 0x41, 0x3b, 0x57, 0x3b, 0x4e, 0x3b, 0x59, 0x3b, 0x54, 0x3b, 0x5a, 0x3b, 0x4f, 0x3b, 0x2d30, 0x2d59, 0x2d30, 0x2d4e,
+0x2d30, 0x2d59, 0x3b, 0x2d30, 0x2d62, 0x2d4f, 0x2d30, 0x2d59, 0x3b, 0x2d30, 0x2d59, 0x2d49, 0x2d4f, 0x2d30, 0x2d59, 0x3b, 0x2d30, 0x2d3d, 0x2d55, 0x2d30,
+0x2d59, 0x3b, 0x2d30, 0x2d3d, 0x2d61, 0x2d30, 0x2d59, 0x3b, 0x2d30, 0x2d59, 0x2d49, 0x2d4e, 0x2d61, 0x2d30, 0x2d59, 0x3b, 0x2d30, 0x2d59, 0x2d49, 0x2d39,
+0x2d62, 0x2d30, 0x2d59, 0x3b, 0x6cc, 0x6d5, 0x6a9, 0x634, 0x6d5, 0x645, 0x645, 0x6d5, 0x3b, 0x62f, 0x648, 0x648, 0x634, 0x6d5, 0x645, 0x645,
+0x6d5, 0x3b, 0x633, 0x6ce, 0x634, 0x6d5, 0x645, 0x645, 0x6d5, 0x3b, 0x686, 0x648, 0x627, 0x631, 0x634, 0x6d5, 0x645, 0x645, 0x6d5, 0x3b,
+0x67e, 0x6ce, 0x646, 0x62c, 0x634, 0x6d5, 0x645, 0x645, 0x6d5, 0x3b, 0x6be, 0x6d5, 0x6cc, 0x646, 0x6cc, 0x3b, 0x634, 0x6d5, 0x645, 0x645,
+0x6d5, 0x3b, 0x6cc, 0x3b, 0x62f, 0x3b, 0x633, 0x3b, 0x686, 0x3b, 0x67e, 0x3b, 0x6be, 0x3b, 0x634, 0x3b, 0x6e, 0x6a, 0x65, 0x3b,
+0x70, 0xf3, 0x6e, 0x3b, 0x77, 0x61, 0x142, 0x3b, 0x73, 0x72, 0x6a, 0x3b, 0x73, 0x74, 0x77, 0x3b, 0x70, 0x11b, 0x74, 0x3b,
+0x73, 0x6f, 0x62, 0x3b, 0x6e, 0x6a, 0x65, 0x17a, 0x65, 0x6c, 0x61, 0x3b, 0x70, 0xf3, 0x6e, 0x6a, 0x65, 0x17a, 0x65, 0x6c,
+0x65, 0x3b, 0x77, 0x61, 0x142, 0x74, 0x6f, 0x72, 0x61, 0x3b, 0x73, 0x72, 0x6a, 0x6f, 0x64, 0x61, 0x3b, 0x73, 0x74, 0x77,
+0xf3, 0x72, 0x74, 0x6b, 0x3b, 0x70, 0x11b, 0x74, 0x6b, 0x3b, 0x73, 0x6f, 0x62, 0x6f, 0x74, 0x61, 0x3b, 0x6e, 0x3b, 0x70,
+0x3b, 0x77, 0x3b, 0x73, 0x3b, 0x73, 0x3b, 0x70, 0x3b, 0x73, 0x3b, 0x6e, 0x6a, 0x65, 0x3b, 0x70, 0xf3, 0x6e, 0x3b, 0x77,
+0x75, 0x74, 0x3b, 0x73, 0x72, 0x6a, 0x3b, 0x161, 0x74, 0x77, 0x3b, 0x70, 0x6a, 0x61, 0x3b, 0x73, 0x6f, 0x62, 0x3b, 0x6e,
+0x6a, 0x65, 0x64, 0x17a, 0x65, 0x6c, 0x61, 0x3b, 0x70, 0xf3, 0x6e, 0x64, 0x17a, 0x65, 0x6c, 0x61, 0x3b, 0x77, 0x75, 0x74,
+0x6f, 0x72, 0x61, 0x3b, 0x73, 0x72, 0x6a, 0x65, 0x64, 0x61, 0x3b, 0x161, 0x74, 0x77, 0xf3, 0x72, 0x74, 0x6b, 0x3b, 0x70,
+0x6a, 0x61, 0x74, 0x6b, 0x3b, 0x73, 0x6f, 0x62, 0x6f, 0x74, 0x61, 0x3b, 0x6e, 0x3b, 0x70, 0x3b, 0x77, 0x3b, 0x73, 0x3b,
+0x161, 0x3b, 0x70, 0x3b, 0x73, 0x3b, 0x70, 0x61, 0x73, 0x3b, 0x76, 0x75, 0x6f, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6b, 0x6f,
+0x73, 0x3b, 0x74, 0x75, 0x6f, 0x3b, 0x76, 0xe1, 0x73, 0x3b, 0x6c, 0xe1, 0x76, 0x3b, 0x70, 0x61, 0x73, 0x65, 0x70, 0x65,
+0x69, 0x76, 0x69, 0x3b, 0x76, 0x75, 0x6f, 0x73, 0x73, 0x61, 0x72, 0x67, 0xe2, 0x3b, 0x6d, 0x61, 0x6a, 0x65, 0x62, 0x61,
+0x72, 0x67, 0xe2, 0x3b, 0x6b, 0x6f, 0x73, 0x6b, 0x6f, 0x6b, 0x6b, 0x6f, 0x3b, 0x74, 0x75, 0x6f, 0x72, 0xe2, 0x73, 0x74,
+0xe2, 0x68, 0x3b, 0x76, 0xe1, 0x73, 0x74, 0x75, 0x70, 0x70, 0x65, 0x69, 0x76, 0x69, 0x3b, 0x6c, 0xe1, 0x76, 0x75, 0x72,
+0x64, 0xe2, 0x68, 0x3b, 0x70, 0x61, 0x73, 0x65, 0x70, 0x65, 0x65, 0x69, 0x76, 0x69, 0x3b, 0x76, 0x75, 0x6f, 0x73, 0x73,
+0x61, 0x61, 0x72, 0x67, 0xe2, 0x3b, 0x6d, 0x61, 0x6a, 0x65, 0x62, 0x61, 0x61, 0x72, 0x67, 0xe2, 0x3b, 0x6b, 0x6f, 0x73,
+0x6b, 0x6f, 0x68, 0x6f, 0x3b, 0x74, 0x75, 0x6f, 0x72, 0xe2, 0x73, 0x74, 0x75, 0x76, 0x3b, 0x76, 0xe1, 0x73, 0x74, 0x75,
+0x70, 0x70, 0x65, 0x65, 0x69, 0x76, 0x69, 0x3b, 0x6c, 0xe1, 0x76, 0x75, 0x72, 0x64, 0x75, 0x76, 0x3b, 0x70, 0x3b, 0x56,
+0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x54, 0x3b, 0x56, 0x3b, 0x4c, 0x3b
};
static const ushort byte_unit_data[] = {
@@ -4846,33 +4918,38 @@ static const ushort byte_unit_data[] = {
0x42, 0x3b, 0x45, 0x42, 0x628, 0x627, 0x64a, 0x62a, 0x643, 0x64a, 0x644, 0x648, 0x628, 0x627, 0x64a, 0x62a, 0x3b, 0x645, 0x64a, 0x63a,
0x627, 0x628, 0x627, 0x64a, 0x62a, 0x3b, 0x63a, 0x64a, 0x63a, 0x627, 0x628, 0x627, 0x64a, 0x62a, 0x3b, 0x62a, 0x64a, 0x631, 0x627, 0x628,
0x627, 0x64a, 0x62a, 0x3b, 0x50, 0x42, 0x3b, 0x45, 0x42, 0x562, 0x561, 0x575, 0x569, 0x565, 0x580, 0x56f, 0x532, 0x3b, 0x544, 0x532,
-0x3b, 0x533, 0x532, 0x3b, 0x54f, 0x532, 0x3b, 0x50, 0x42, 0x3b, 0x45, 0x42, 0x62, 0x61, 0x79, 0x74, 0x62, 0x79, 0x74, 0x65,
-0x2d, 0x61, 0x6b, 0x9ac, 0x9be, 0x987, 0x99f, 0x6f, 0x6b, 0x74, 0x65, 0x64, 0x6f, 0xf9, 0x6b, 0x6f, 0x3b, 0x4d, 0x6f, 0x3b,
-0x47, 0x6f, 0x3b, 0x54, 0x6f, 0x3b, 0x50, 0x6f, 0x3b, 0x45, 0x6f, 0x4b, 0x69, 0x6f, 0x3b, 0x4d, 0x69, 0x6f, 0x3b, 0x47,
-0x69, 0x6f, 0x3b, 0x54, 0x69, 0x6f, 0x3b, 0x50, 0x69, 0x6f, 0x3b, 0x45, 0x69, 0x6f, 0x431, 0x430, 0x439, 0x442, 0x43e, 0x432,
-0x435, 0x1018, 0x102d, 0x102f, 0x1000, 0x103a, 0x431, 0x430, 0x439, 0x442, 0x44b, 0x41a, 0x411, 0x3b, 0x41c, 0x411, 0x3b, 0x413, 0x411, 0x3b,
-0x422, 0x411, 0x3b, 0x50, 0x42, 0x3b, 0x45, 0x42, 0x1794, 0x17c3, 0x5b57, 0x8282, 0x5343, 0x5b57, 0x8282, 0x3b, 0x5146, 0x5b57, 0x8282, 0x3b,
-0x5409, 0x5b57, 0x8282, 0x3b, 0x592a, 0x5b57, 0x8282, 0x3b, 0x50, 0x42, 0x3b, 0x45, 0x42, 0x4f4d, 0x5143, 0x7d44, 0x62, 0x61, 0x6a, 0x74,
-0x6f, 0x76, 0x69, 0x62, 0x61, 0x6a, 0x74, 0x79, 0x62, 0x61, 0x69, 0x64, 0x69, 0x64, 0x62, 0xfd, 0x74, 0x4b, 0x42, 0x3b,
-0x4d, 0x42, 0x3b, 0x47, 0x42, 0x3b, 0x54, 0x42, 0x3b, 0x50, 0x42, 0x3b, 0x45, 0x42, 0x74, 0x61, 0x76, 0x75, 0x74, 0x6b,
-0x74, 0x3b, 0x4d, 0x74, 0x3b, 0x47, 0x74, 0x3b, 0x54, 0x74, 0x3b, 0x50, 0x74, 0x3b, 0x45, 0x74, 0x4b, 0x69, 0x74, 0x3b,
-0x4d, 0x69, 0x74, 0x3b, 0x47, 0x69, 0x74, 0x3b, 0x54, 0x69, 0x74, 0x3b, 0x50, 0x69, 0x74, 0x3b, 0x45, 0x69, 0x74, 0x6f,
-0x63, 0x74, 0x65, 0x74, 0x73, 0x62, 0x61, 0x69, 0x64, 0x68, 0x74, 0x10d1, 0x10d0, 0x10d8, 0x10e2, 0x10d8, 0x10d9, 0x10d1, 0x10d0, 0x10d8,
-0x10e2, 0x10d8, 0x3b, 0x10db, 0x10d1, 0x10d0, 0x10d8, 0x10e2, 0x10d8, 0x3b, 0x10d2, 0x10d1, 0x10d0, 0x10d8, 0x10e2, 0x10d8, 0x3b, 0x10e2, 0x10d1, 0x10d0,
-0x10d8, 0x10e2, 0x10d8, 0x3b, 0x50, 0x42, 0x3b, 0x45, 0x42, 0x42, 0x79, 0x74, 0x65, 0x73, 0xaac, 0xabe, 0xa87, 0xa9f, 0x5d1, 0x5ea,
-0x5d9, 0x5dd, 0x92c, 0x93e, 0x907, 0x91f, 0x62, 0xe1, 0x6a, 0x74, 0x62, 0xe6, 0x74, 0x69, 0x62, 0x65, 0x61, 0x72, 0x74, 0x61,
-0x30d0, 0x30a4, 0x30c8, 0xcac, 0xcc8, 0xc9f, 0xccd, 0x200c, 0xc97, 0xcb3, 0xcc1, 0xc95, 0xcbf, 0x2e, 0xcac, 0xcc8, 0x2e, 0x3b, 0xcae, 0xcc6,
-0x2e, 0xcac, 0xcc8, 0x2e, 0x3b, 0xc97, 0xcbf, 0x2e, 0xcac, 0xcc8, 0x2e, 0x3b, 0xc9f, 0xcc6, 0x2e, 0xcac, 0xcc8, 0x2e, 0x3b, 0x50,
-0x42, 0x3b, 0x45, 0x42, 0x431, 0x430, 0x439, 0x442, 0x43a, 0x411, 0x3b, 0x4d, 0x411, 0x3b, 0x413, 0x411, 0x3b, 0x54, 0x411, 0x3b,
-0x50, 0x411, 0x3b, 0x45, 0x411, 0x4b, 0x69, 0x411, 0x3b, 0x4d, 0x69, 0x411, 0x3b, 0x47, 0x69, 0x411, 0x3b, 0x54, 0x69, 0x411,
-0x3b, 0x50, 0x69, 0x411, 0x3b, 0x45, 0x69, 0x411, 0x43a, 0x411, 0x3b, 0x41c, 0x411, 0x3b, 0x413, 0x411, 0x3b, 0x422, 0x411, 0x3b,
-0x50, 0x42, 0x3b, 0x45, 0x42, 0xbc14, 0xc774, 0xd2b8, 0x62, 0x61, 0x69, 0x74, 0x69, 0x62, 0x61, 0x69, 0x74, 0x61, 0x69, 0x431,
-0x430, 0x458, 0x442, 0x438, 0x62, 0x61, 0x69, 0x74, 0xd2c, 0xd48, 0xd31, 0xd4d, 0xd31, 0xd4d, 0xd15, 0xd3f, 0x2e, 0xd2c, 0xd3f, 0x2e,
-0x3b, 0xd2e, 0xd46, 0x2e, 0xd2c, 0xd48, 0x2e, 0x3b, 0xd1c, 0xd3f, 0x2e, 0xd2c, 0xd48, 0x2e, 0x3b, 0xd1f, 0xd3f, 0xd2c, 0xd3f, 0x3b,
-0x50, 0x42, 0x3b, 0x45, 0x42, 0x628, 0x627, 0x6cc, 0x62a, 0x6a9, 0x6cc, 0x644, 0x648, 0x628, 0x627, 0x6cc, 0x62a, 0x3b, 0x645, 0x6af,
-0x627, 0x628, 0x627, 0x6cc, 0x62a, 0x3b, 0x6af, 0x6cc, 0x6af, 0x627, 0x628, 0x627, 0x6cc, 0x62a, 0x3b, 0x62a, 0x631, 0x627, 0x628, 0x627,
-0x6cc, 0x62a, 0x3b, 0x50, 0x42, 0x3b, 0x45, 0x42, 0xa2c, 0xa3e, 0xa07, 0xa1f, 0x62, 0x79, 0x21b, 0x69, 0x431, 0x430, 0x458, 0x442,
-0x43e, 0x432, 0x438, 0xdb6, 0xdba, 0xdd2, 0xda7, 0xdca, 0xd9a, 0xdd2, 0xdb6, 0x20, 0x7b, 0x30, 0x7d, 0x3b, 0xdb8, 0xdd9, 0xdb6, 0x20,
+0x3b, 0x533, 0x532, 0x3b, 0x54f, 0x532, 0x3b, 0x50, 0x42, 0x3b, 0x45, 0x42, 0x9ac, 0x9be, 0x987, 0x99f, 0x995, 0x9bf, 0x983, 0x20,
+0x9ac, 0x9be, 0x983, 0x3b, 0x9ae, 0x9c7, 0x983, 0x20, 0x9ac, 0x9be, 0x983, 0x3b, 0x997, 0x9bf, 0x983, 0x20, 0x9ac, 0x9be, 0x983, 0x3b,
+0x99f, 0x9c7, 0x983, 0x20, 0x9ac, 0x9be, 0x983, 0x3b, 0x50, 0x42, 0x3b, 0x45, 0x42, 0x62, 0x61, 0x79, 0x74, 0x62, 0x79, 0x74,
+0x65, 0x2d, 0x61, 0x6b, 0x6f, 0x6b, 0x74, 0x65, 0x64, 0x6f, 0xf9, 0x6b, 0x6f, 0x3b, 0x4d, 0x6f, 0x3b, 0x47, 0x6f, 0x3b,
+0x54, 0x6f, 0x3b, 0x50, 0x6f, 0x3b, 0x45, 0x6f, 0x4b, 0x69, 0x6f, 0x3b, 0x4d, 0x69, 0x6f, 0x3b, 0x47, 0x69, 0x6f, 0x3b,
+0x54, 0x69, 0x6f, 0x3b, 0x50, 0x69, 0x6f, 0x3b, 0x45, 0x69, 0x6f, 0x431, 0x430, 0x439, 0x442, 0x43e, 0x432, 0x435, 0x1018, 0x102d,
+0x102f, 0x1000, 0x103a, 0x431, 0x430, 0x439, 0x442, 0x44b, 0x41a, 0x411, 0x3b, 0x41c, 0x411, 0x3b, 0x413, 0x411, 0x3b, 0x422, 0x411, 0x3b,
+0x50, 0x42, 0x3b, 0x45, 0x42, 0x1794, 0x17c3, 0x5b57, 0x8282, 0x5343, 0x5b57, 0x8282, 0x3b, 0x5146, 0x5b57, 0x8282, 0x3b, 0x5409, 0x5b57, 0x8282,
+0x3b, 0x592a, 0x5b57, 0x8282, 0x3b, 0x50, 0x42, 0x3b, 0x45, 0x42, 0x4f4d, 0x5143, 0x7d44, 0x62, 0x61, 0x6a, 0x74, 0x6f, 0x76, 0x69,
+0x62, 0x61, 0x6a, 0x74, 0x79, 0x62, 0x61, 0x69, 0x64, 0x69, 0x64, 0x62, 0xfd, 0x74, 0x4b, 0x42, 0x3b, 0x4d, 0x42, 0x3b,
+0x47, 0x42, 0x3b, 0x54, 0x42, 0x3b, 0x50, 0x42, 0x3b, 0x45, 0x42, 0x74, 0x61, 0x76, 0x75, 0x74, 0x6b, 0x74, 0x3b, 0x4d,
+0x74, 0x3b, 0x47, 0x74, 0x3b, 0x54, 0x74, 0x3b, 0x50, 0x74, 0x3b, 0x45, 0x74, 0x4b, 0x69, 0x74, 0x3b, 0x4d, 0x69, 0x74,
+0x3b, 0x47, 0x69, 0x74, 0x3b, 0x54, 0x69, 0x74, 0x3b, 0x50, 0x69, 0x74, 0x3b, 0x45, 0x69, 0x74, 0x6f, 0x63, 0x74, 0x65,
+0x74, 0x73, 0x62, 0x61, 0x69, 0x64, 0x68, 0x74, 0x10d1, 0x10d0, 0x10d8, 0x10e2, 0x10d8, 0x10d9, 0x10d1, 0x10d0, 0x10d8, 0x10e2, 0x10d8, 0x3b,
+0x10db, 0x10d1, 0x10d0, 0x10d8, 0x10e2, 0x10d8, 0x3b, 0x10d2, 0x10d1, 0x10d0, 0x10d8, 0x10e2, 0x10d8, 0x3b, 0x10e2, 0x10d1, 0x10d0, 0x10d8, 0x10e2, 0x10d8,
+0x3b, 0x50, 0x42, 0x3b, 0x45, 0x42, 0x42, 0x79, 0x74, 0x65, 0x73, 0xaac, 0xabe, 0xa87, 0xa9f, 0x5d1, 0x5d9, 0x5d9, 0x5d8, 0x92c,
+0x93e, 0x907, 0x91f, 0x62, 0xe1, 0x6a, 0x74, 0x62, 0xe6, 0x74, 0x69, 0x62, 0x65, 0x61, 0x72, 0x74, 0x61, 0x30d0, 0x30a4, 0x30c8,
+0xcac, 0xcc8, 0xc9f, 0xccd, 0x200c, 0xc97, 0xcb3, 0xcc1, 0xc95, 0xcbf, 0x2e, 0xcac, 0xcc8, 0x2e, 0x3b, 0xcae, 0xcc6, 0x2e, 0xcac, 0xcc8,
+0x2e, 0x3b, 0xc97, 0xcbf, 0x2e, 0xcac, 0xcc8, 0x2e, 0x3b, 0xc9f, 0xcc6, 0x2e, 0xcac, 0xcc8, 0x2e, 0x3b, 0x50, 0x42, 0x3b, 0x45,
+0x42, 0x431, 0x430, 0x439, 0x442, 0x43a, 0x411, 0x3b, 0x4d, 0x411, 0x3b, 0x413, 0x411, 0x3b, 0x54, 0x411, 0x3b, 0x50, 0x411, 0x3b,
+0x45, 0x411, 0x4b, 0x69, 0x411, 0x3b, 0x4d, 0x69, 0x411, 0x3b, 0x47, 0x69, 0x411, 0x3b, 0x54, 0x69, 0x411, 0x3b, 0x50, 0x69,
+0x411, 0x3b, 0x45, 0x69, 0x411, 0x43a, 0x411, 0x3b, 0x41c, 0x411, 0x3b, 0x413, 0x411, 0x3b, 0x422, 0x411, 0x3b, 0x50, 0x42, 0x3b,
+0x45, 0x42, 0xbc14, 0xc774, 0xd2b8, 0x62, 0x61, 0x69, 0x74, 0x69, 0x62, 0x61, 0x69, 0x74, 0x61, 0x69, 0x431, 0x430, 0x458, 0x442,
+0x438, 0x62, 0x61, 0x69, 0x74, 0xd2c, 0xd48, 0xd31, 0xd4d, 0xd31, 0xd4d, 0xd15, 0xd3f, 0x2e, 0xd2c, 0xd3f, 0x2e, 0x3b, 0xd2e, 0xd46,
+0x2e, 0xd2c, 0xd48, 0x2e, 0x3b, 0xd1c, 0xd3f, 0x2e, 0xd2c, 0xd48, 0x2e, 0x3b, 0xd1f, 0xd3f, 0xd2c, 0xd3f, 0x3b, 0x50, 0x42, 0x3b,
+0x45, 0x42, 0xb2c, 0xb3e, 0xb07, 0xb1f, 0xb4d, 0x628, 0x627, 0x6cc, 0x62a, 0x6a9, 0x6cc, 0x644, 0x648, 0x628, 0x627, 0x6cc, 0x62a, 0x3b,
+0x645, 0x6af, 0x627, 0x628, 0x627, 0x6cc, 0x62a, 0x3b, 0x6af, 0x6cc, 0x6af, 0x627, 0x628, 0x627, 0x6cc, 0x62a, 0x3b, 0x62a, 0x631, 0x627,
+0x628, 0x627, 0x6cc, 0x62a, 0x3b, 0x50, 0x42, 0x3b, 0x45, 0x42, 0xa2c, 0xa3e, 0xa07, 0xa1f, 0x62, 0x79, 0x21b, 0x69, 0x431, 0x430,
+0x458, 0x442, 0x43e, 0x432, 0x438, 0x628, 0x627, 0x626, 0x64a, 0x67d, 0x632, 0x6aa, 0x644, 0x648, 0x20, 0x628, 0x627, 0x626, 0x64a, 0x67d,
+0x632, 0x3b, 0x645, 0x64a, 0x6af, 0x627, 0x20, 0x628, 0x627, 0x626, 0x64a, 0x67d, 0x632, 0x3b, 0x6af, 0x64a, 0x6af, 0x627, 0x20, 0x628,
+0x627, 0x626, 0x64a, 0x67d, 0x632, 0x3b, 0x67d, 0x64a, 0x631, 0x627, 0x20, 0x628, 0x627, 0x626, 0x64a, 0x67d, 0x632, 0x3b, 0x50, 0x42,
+0x3b, 0x45, 0x42, 0xdb6, 0xdba, 0xdd2, 0xda7, 0xdca, 0xd9a, 0xdd2, 0xdb6, 0x20, 0x7b, 0x30, 0x7d, 0x3b, 0xdb8, 0xdd9, 0xdb6, 0x20,
0x7b, 0x30, 0x7d, 0x3b, 0xd9c, 0xdd2, 0xdb6, 0x20, 0x7b, 0x30, 0x7d, 0x3b, 0xda7, 0xdd9, 0xdb6, 0x20, 0x7b, 0x30, 0x7d, 0x3b,
0x50, 0x42, 0x3b, 0x45, 0x42, 0x6b, 0x69, 0x6c, 0x6f, 0x62, 0x61, 0x69, 0x74, 0x69, 0x20, 0x7b, 0x30, 0x7d, 0x3b, 0x4d,
0x42, 0x20, 0x7b, 0x30, 0x7d, 0x3b, 0x47, 0x42, 0x20, 0x7b, 0x30, 0x7d, 0x3b, 0x74, 0x65, 0x72, 0x61, 0x62, 0x61, 0x69,
@@ -4885,113 +4962,118 @@ static const ushort byte_unit_data[] = {
0x7d, 0x4b, 0x69, 0x42, 0x20, 0x2bb, 0x65, 0x20, 0x7b, 0x30, 0x7d, 0x3b, 0x4d, 0x69, 0x42, 0x20, 0x2bb, 0x65, 0x20, 0x7b,
0x30, 0x7d, 0x3b, 0x47, 0x69, 0x42, 0x20, 0x2bb, 0x65, 0x20, 0x7b, 0x30, 0x7d, 0x3b, 0x54, 0x69, 0x42, 0x20, 0x2bb, 0x65,
0x20, 0x7b, 0x30, 0x7d, 0x3b, 0x50, 0x69, 0x42, 0x20, 0x2bb, 0x65, 0x20, 0x7b, 0x30, 0x7d, 0x3b, 0x45, 0x69, 0x42, 0x20,
-0x2bb, 0x65, 0x20, 0x7b, 0x30, 0x7d, 0x62, 0x61, 0xfd, 0x74, 0x431, 0x430, 0x439, 0x442, 0x438, 0x62, 0x65, 0x69, 0x74, 0x69,
-0x61, 0x75, 0x13d7, 0x13d3, 0x13cd, 0x13a6, 0x13b5, 0x13a9, 0x431, 0x430, 0x430, 0x439, 0x442, 0x43a, 0x411, 0x3b, 0x41c, 0x411, 0x3b, 0x47,
-0x42, 0x3b, 0x54, 0x42, 0x3b, 0x50, 0x42, 0x3b, 0x45, 0x42, 0x62, 0x79, 0x74, 0x65, 0x79
+0x2bb, 0x65, 0x20, 0x7b, 0x30, 0x7d, 0x62, 0x61, 0xfd, 0x74, 0x431, 0x430, 0x439, 0x442, 0x438, 0x628, 0x627, 0x626, 0x679, 0x62,
+0x65, 0x69, 0x74, 0x69, 0x61, 0x75, 0x61, 0x1e6d, 0x61, 0x6d, 0x1e0d, 0x61, 0x6e, 0x6b, 0x41, 0x1e6c, 0x3b, 0x4d, 0x41, 0x1e6c,
+0x3b, 0x47, 0x41, 0x1e6c, 0x3b, 0x54, 0x41, 0x1e6c, 0x3b, 0x50, 0x41, 0x1e6c, 0x3b, 0x45, 0x41, 0x1e6c, 0x4b, 0x69, 0x41, 0x1e6c,
+0x3b, 0x4d, 0x69, 0x41, 0x1e6c, 0x3b, 0x47, 0x69, 0x41, 0x1e6c, 0x3b, 0x54, 0x69, 0x41, 0x1e6c, 0x3b, 0x50, 0x69, 0x41, 0x1e6c,
+0x3b, 0x45, 0x69, 0x41, 0x1e6c, 0x13d7, 0x13d3, 0x13cd, 0x13a6, 0x13b5, 0x13a9, 0x431, 0x430, 0x430, 0x439, 0x442, 0x43a, 0x411, 0x3b, 0x41c,
+0x411, 0x3b, 0x47, 0x42, 0x3b, 0x54, 0x42, 0x3b, 0x50, 0x42, 0x3b, 0x45, 0x42, 0x62, 0x79, 0x74, 0x65, 0x79
};
static const ushort am_data[] = {
0x41, 0x4d, 0x57, 0x44, 0x76, 0x6d, 0x2e, 0x65, 0x20, 0x70, 0x61, 0x72, 0x61, 0x64, 0x69, 0x74, 0x65, 0x73, 0x1325, 0x12cb,
-0x1275, 0x635, 0x9aa, 0x9c2, 0x9f0, 0x9cd, 0x9ac, 0x9be, 0x9b9, 0x9cd, 0x9a3, 0x410, 0x41c, 0xf66, 0xf94, 0xf0b, 0xf46, 0xf0b, 0x41, 0x2e,
-0x4d, 0x2e, 0x43f, 0x440, 0x2e, 0x43e, 0x431, 0x2e, 0x1014, 0x1036, 0x1014, 0x1000, 0x103a, 0x61, 0x2e, 0x20, 0x6d, 0x2e, 0x4e0a, 0x5348,
-0x64, 0x6f, 0x70, 0x2e, 0x61, 0x2e, 0x6d, 0x2e, 0x61, 0x6d, 0x61, 0x70, 0x2e, 0x6d, 0x61, 0x74, 0x69, 0x6e, 0x6d, 0x76,
-0x6f, 0x72, 0x6d, 0x2e, 0x3c0, 0x2e, 0x3bc, 0x2e, 0x5dc, 0x5e4, 0x5e0, 0x5d4, 0x5f4, 0x5e6, 0x92a, 0x942, 0x930, 0x94d, 0x935, 0x93e,
-0x939, 0x94d, 0x928, 0x64, 0x65, 0x2e, 0x66, 0x2e, 0x68, 0x2e, 0x5348, 0x524d, 0xcaa, 0xcc2, 0xcb0, 0xccd, 0xcb5, 0xcbe, 0xcb9, 0xccd,
-0xca8, 0x442, 0x430, 0x4a3, 0x43a, 0x44b, 0xc624, 0xc804, 0x5a, 0x2e, 0x4d, 0x55, 0x2e, 0xe81, 0xec8, 0xead, 0xe99, 0xe97, 0xec8, 0xebd,
-0xe87, 0x70, 0x72, 0x69, 0x65, 0x6b, 0x161, 0x70, 0x75, 0x73, 0x64, 0x69, 0x65, 0x6e, 0x101, 0x6e, 0x74, 0x254, 0x301, 0x6e,
-0x67, 0x254, 0x301, 0x70, 0x72, 0x69, 0x65, 0x161, 0x70, 0x69, 0x65, 0x74, 0x43f, 0x440, 0x435, 0x442, 0x43f, 0x43b, 0x430, 0x434,
-0x43d, 0x435, 0x50, 0x47, 0x92e, 0x2e, 0x92a, 0x942, 0x2e, 0x4af, 0x2e, 0x4e9, 0x63a, 0x2e, 0x645, 0x2e, 0x642, 0x628, 0x644, 0x200c,
-0x627, 0x632, 0x638, 0x647, 0x631, 0x64, 0x61, 0x20, 0x6d, 0x61, 0x6e, 0x68, 0xe3, 0xa2a, 0xa42, 0x2e, 0xa26, 0xa41, 0x2e, 0x414,
-0x41f, 0x4e, 0x44, 0x43f, 0x440, 0x435, 0x20, 0x43f, 0x43e, 0x434, 0x43d, 0x435, 0x43f, 0x440, 0x438, 0x458, 0x435, 0x20, 0x43f, 0x43e,
-0x434, 0x43d, 0x435, 0x70, 0x72, 0x69, 0x6a, 0x65, 0x20, 0x70, 0x6f, 0x64, 0x6e, 0x65, 0x70, 0x72, 0x65, 0x20, 0x70, 0x6f,
-0x64, 0x6e, 0x65, 0x4d5, 0x43c, 0x431, 0x438, 0x441, 0x431, 0x43e, 0x43d, 0x44b, 0x20, 0x440, 0x430, 0x437, 0x43c, 0x4d5, 0xdb4, 0xdd9,
-0x2e, 0xdc0, 0x2e, 0x73, 0x6e, 0x2e, 0x41, 0x73, 0x75, 0x62, 0x75, 0x68, 0x69, 0x66, 0x6d, 0xbae, 0xbc1, 0xbb1, 0xbcd, 0xbaa,
-0xb95, 0xbb2, 0xbcd, 0xe01, 0xe48, 0xe2d, 0xe19, 0xe40, 0xe17, 0xe35, 0xe48, 0xe22, 0xe07, 0xf66, 0xf94, 0xf0b, 0xf51, 0xfb2, 0xf7c, 0xf0b,
-0x1295, 0x1309, 0x1206, 0x20, 0x1230, 0x12d3, 0x1270, 0x68, 0x65, 0x6e, 0x67, 0x69, 0x68, 0x65, 0x6e, 0x67, 0x69, 0xd6, 0xd6, 0x686,
-0x6c8, 0x634, 0x62a, 0x649, 0x646, 0x20, 0x628, 0x6c7, 0x631, 0x6c7, 0x646, 0x434, 0x43f, 0x54, 0x4f, 0x422, 0x41e, 0x53, 0x41, 0x79,
-0x62, 0xc0, 0xe1, 0x72, 0x1ecd, 0x300, 0xc0, 0xe1, 0x72, 0x254, 0x300, 0x66, 0x6f, 0x72, 0x6d, 0x69, 0x64, 0x64, 0x61, 0x67,
-0x70, 0x72, 0x69, 0x6a, 0x65, 0x70, 0x6f, 0x64, 0x6e, 0x65, 0x41, 0x4e, 0x128, 0x79, 0x61, 0x6b, 0x77, 0x61, 0x6b, 0x79,
-0x61, 0x61, 0x2e, 0x14b, 0x64, 0x69, 0x61, 0x6d, 0x20, 0x56, 0x6f, 0x72, 0x6d, 0x69, 0x74, 0x74, 0x61, 0x67, 0xa3b8, 0xa111,
-0x69, 0x111, 0x69, 0x74, 0x62, 0x65, 0x61, 0x69, 0x76, 0x65, 0x74, 0x4d, 0x61, 0x6d, 0x62, 0x69, 0x61, 0x4c, 0x75, 0x6d,
-0x61, 0x20, 0x6c, 0x77, 0x61, 0x20, 0x4b, 0x73, 0x75, 0x62, 0x61, 0x6b, 0x61, 0x4b, 0x69, 0x72, 0x6f, 0x6b, 0x6f, 0x54,
-0x65, 0x73, 0x69, 0x72, 0x61, 0x6e, 0x6b, 0x61, 0x6e, 0x67, 0x2019, 0x61, 0x6d, 0x61, 0x2d5c, 0x2d49, 0x2d3c, 0x2d30, 0x2d61, 0x2d5c,
-0x74, 0x69, 0x66, 0x61, 0x77, 0x74, 0x6e, 0x20, 0x74, 0x75, 0x66, 0x61, 0x74, 0x70, 0x61, 0x6d, 0x69, 0x6c, 0x61, 0x75,
-0x75, 0x74, 0x75, 0x6b, 0x6f, 0x4b, 0x49, 0x13cc, 0x13be, 0x13b4, 0x4d, 0x75, 0x68, 0x69, 0x54, 0x4f, 0x4f, 0x75, 0x6c, 0x75,
-0x63, 0x68, 0x65, 0x6c, 0x6f, 0x52, 0x168, 0x6b, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x1c1, 0x67, 0x6f, 0x61, 0x67, 0x61, 0x73,
-0x55, 0x68, 0x72, 0x20, 0x76, 0xf6, 0x72, 0x6d, 0x69, 0x64, 0x64, 0x61, 0x61, 0x63, 0x68, 0x73, 0x190, 0x6e, 0x6b, 0x61,
-0x6b, 0x25b, 0x6e, 0x79, 0xe1, 0x4d, 0x75, 0x6e, 0x6b, 0x79, 0x6f, 0x69, 0x63, 0x68, 0x65, 0x68, 0x65, 0x61, 0x76, 0x6f,
-0x54, 0x61, 0x70, 0x61, 0x72, 0x61, 0x63, 0x68, 0x75, 0x41, 0x64, 0x64, 0x75, 0x68, 0x61, 0x4f, 0x44, 0x5a, 0x64, 0x61,
-0x74, 0x20, 0x61, 0x7a, 0x61, 0x6c, 0x6d, 0x61, 0x6b, 0x65, 0x6f, 0x92b, 0x941, 0x902, 0x44, 0x69, 0x6e, 0x64, 0x61, 0x6d,
-0x6f, 0x69, 0x65, 0x73, 0x61, 0x2e, 0x67, 0x49, 0x20, 0x62, 0x69, 0x6b, 0x25b, 0x302, 0x67, 0x6c, 0xe0, 0x53, 0x75, 0x62,
-0x62, 0x61, 0x61, 0x68, 0x69, 0x69, 0x64, 0x69, 0x253, 0x61, 0x6b, 0xed, 0x6b, 0xed, 0x72, 0xed, 0x67, 0x73, 0xe1, 0x72,
-0xfa, 0x77, 0xe1, 0x77, 0x69, 0x63, 0x68, 0x69, 0x73, 0x68, 0x75, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6d, 0x61, 0x6e, 0xe1,
-0x52, 0x57, 0x42d, 0x418, 0x4c, 0x77, 0x61, 0x6d, 0x69, 0x6c, 0x61, 0x77, 0x75, 0x6b, 0x69, 0x25b, 0x6d, 0x25b, 0x301, 0x25b,
-0x6d, 0x64, 0x65, 0x20, 0x6c, 0x61, 0x20, 0x6d, 0x61, 0xf1, 0x61, 0x6e, 0x61, 0x6d, 0x62, 0x61, 0xa78c, 0x6d, 0x62, 0x61,
-0xa78c, 0x6d, 0x62, 0x61, 0x2bc, 0xe1, 0x6d, 0x62, 0x61, 0x2bc, 0x628, 0x2e, 0x646, 0x64, 0x6f, 0x70, 0x6f, 0x142, 0x64, 0x6e,
-0x6a, 0x61, 0x69, 0x70, 0x2e
+0x1275, 0x635, 0x53f, 0x531, 0x9aa, 0x9c2, 0x9f0, 0x9cd, 0x9ac, 0x9be, 0x9b9, 0x9cd, 0x9a8, 0x410, 0x41c, 0xf66, 0xf94, 0xf0b, 0xf46, 0xf0b,
+0x41, 0x2e, 0x4d, 0x2e, 0x43f, 0x440, 0x2e, 0x43e, 0x431, 0x2e, 0x1014, 0x1036, 0x1014, 0x1000, 0x103a, 0x61, 0x2e, 0x20, 0x6d, 0x2e,
+0x4e0a, 0x5348, 0x64, 0x6f, 0x70, 0x2e, 0x61, 0x2e, 0x6d, 0x2e, 0x61, 0x6d, 0x61, 0x70, 0x2e, 0x6d, 0x61, 0x74, 0x69, 0x6e,
+0x6d, 0x3c0, 0x2e, 0x3bc, 0x2e, 0x5dc, 0x5e4, 0x5e0, 0x5d4, 0x5f4, 0x5e6, 0x92a, 0x942, 0x930, 0x94d, 0x935, 0x93e, 0x939, 0x94d, 0x928,
+0x64, 0x65, 0x2e, 0x66, 0x2e, 0x68, 0x2e, 0x72, 0x2e, 0x6e, 0x2e, 0x5348, 0x524d, 0xcaa, 0xcc2, 0xcb0, 0xccd, 0xcb5, 0xcbe, 0xcb9,
+0xccd, 0xca8, 0x442, 0x430, 0x4a3, 0x43a, 0x44b, 0xc624, 0xc804, 0x5a, 0x2e, 0x4d, 0x55, 0x2e, 0xe81, 0xec8, 0xead, 0xe99, 0xe97, 0xec8,
+0xebd, 0xe87, 0x70, 0x72, 0x69, 0x65, 0x6b, 0x161, 0x70, 0x75, 0x73, 0x64, 0x69, 0x65, 0x6e, 0x101, 0x6e, 0x74, 0x254, 0x301,
+0x6e, 0x67, 0x254, 0x301, 0x70, 0x72, 0x69, 0x65, 0x161, 0x70, 0x69, 0x65, 0x74, 0x43f, 0x440, 0x435, 0x442, 0x43f, 0x43b, 0x430,
+0x434, 0x43d, 0x435, 0x50, 0x47, 0x92e, 0x2e, 0x92a, 0x942, 0x2e, 0x4af, 0x2e, 0x4e9, 0x63a, 0x2e, 0x645, 0x2e, 0x642, 0x628, 0x644,
+0x200c, 0x627, 0x632, 0x638, 0x647, 0x631, 0x64, 0x61, 0x20, 0x6d, 0x61, 0x6e, 0x68, 0xe3, 0xa2a, 0xa42, 0x2e, 0xa26, 0xa41, 0x2e,
+0x4e, 0x44, 0x43f, 0x440, 0x435, 0x20, 0x43f, 0x43e, 0x434, 0x43d, 0x435, 0x43f, 0x440, 0x438, 0x458, 0x435, 0x20, 0x43f, 0x43e, 0x434,
+0x43d, 0x435, 0x70, 0x72, 0x69, 0x6a, 0x65, 0x20, 0x70, 0x6f, 0x64, 0x6e, 0x65, 0x70, 0x72, 0x65, 0x20, 0x70, 0x6f, 0x64,
+0x6e, 0x65, 0x4d5, 0x43c, 0x431, 0x438, 0x441, 0x431, 0x43e, 0x43d, 0x44b, 0x20, 0x440, 0x430, 0x437, 0x43c, 0x4d5, 0x635, 0x628, 0x62d,
+0x60c, 0x20, 0x645, 0x646, 0x62c, 0x647, 0x646, 0x62f, 0xdb4, 0xdd9, 0x2e, 0xdc0, 0x2e, 0x73, 0x6e, 0x2e, 0x66, 0x6d, 0x43f, 0x435,
+0x2e, 0x20, 0x447, 0x43e, 0x2e, 0xbae, 0xbc1, 0xbb1, 0xbcd, 0xbaa, 0xb95, 0xbb2, 0xbcd, 0xe01, 0xe48, 0xe2d, 0xe19, 0xe40, 0xe17, 0xe35,
+0xe48, 0xe22, 0xe07, 0xf66, 0xf94, 0xf0b, 0xf51, 0xfb2, 0xf7c, 0xf0b, 0x1295, 0x1309, 0x1206, 0x20, 0x1230, 0x12d3, 0x1270, 0x68, 0x65, 0x6e,
+0x67, 0x69, 0x68, 0x65, 0x6e, 0x67, 0x69, 0xd6, 0xd6, 0x67, 0xfc, 0x6e, 0x6f, 0x72, 0x74, 0x61, 0x64, 0x61, 0x6e, 0x20,
+0xf6, 0x148, 0x686, 0x6c8, 0x634, 0x62a, 0x649, 0x646, 0x20, 0x628, 0x6c7, 0x631, 0x6c7, 0x646, 0x434, 0x43f, 0x54, 0x4f, 0x422, 0x41e,
+0x53, 0x41, 0x79, 0x62, 0x53, 0x75, 0x62, 0xc0, 0xe1, 0x72, 0x1ecd, 0x300, 0xc0, 0xe1, 0x72, 0x254, 0x300, 0x66, 0x6f, 0x72,
+0x6d, 0x69, 0x64, 0x64, 0x61, 0x67, 0x70, 0x72, 0x69, 0x6a, 0x65, 0x70, 0x6f, 0x64, 0x6e, 0x65, 0x41, 0x4e, 0x128, 0x79,
+0x61, 0x6b, 0x77, 0x61, 0x6b, 0x79, 0x61, 0x61, 0x2e, 0x14b, 0x64, 0x69, 0x61, 0x6d, 0x20, 0x56, 0x6f, 0x72, 0x6d, 0x69,
+0x74, 0x74, 0x61, 0x67, 0xa3b8, 0xa111, 0x69, 0x111, 0x69, 0x74, 0x62, 0x65, 0x61, 0x69, 0x76, 0x65, 0x74, 0x69, 0x62, 0x4d,
+0x61, 0x6d, 0x62, 0x69, 0x61, 0x4c, 0x75, 0x6d, 0x61, 0x20, 0x6c, 0x77, 0x61, 0x20, 0x4b, 0x73, 0x75, 0x62, 0x61, 0x6b,
+0x61, 0x4b, 0x69, 0x72, 0x6f, 0x6b, 0x6f, 0x54, 0x65, 0x73, 0x69, 0x72, 0x61, 0x6e, 0x6b, 0x61, 0x6e, 0x67, 0x2019, 0x61,
+0x6d, 0x61, 0x2d5c, 0x2d49, 0x2d3c, 0x2d30, 0x2d61, 0x2d5c, 0x74, 0x69, 0x66, 0x61, 0x77, 0x74, 0x6e, 0x20, 0x74, 0x75, 0x66, 0x61,
+0x74, 0x70, 0x61, 0x6d, 0x69, 0x6c, 0x61, 0x75, 0x75, 0x74, 0x75, 0x6b, 0x6f, 0x4b, 0x49, 0x13cc, 0x13be, 0x13b4, 0x4d, 0x75,
+0x68, 0x69, 0x54, 0x4f, 0x4f, 0x75, 0x6c, 0x75, 0x63, 0x68, 0x65, 0x6c, 0x6f, 0x52, 0x168, 0x6b, 0x61, 0x72, 0x6f, 0x6f,
+0x6e, 0x1c1, 0x67, 0x6f, 0x61, 0x67, 0x61, 0x73, 0x55, 0x68, 0x72, 0x20, 0x76, 0xf6, 0x72, 0x6d, 0x69, 0x64, 0x64, 0x61,
+0x61, 0x63, 0x68, 0x73, 0x190, 0x6e, 0x6b, 0x61, 0x6b, 0x25b, 0x6e, 0x79, 0xe1, 0x4d, 0x75, 0x6e, 0x6b, 0x79, 0x6f, 0x69,
+0x63, 0x68, 0x65, 0x68, 0x65, 0x61, 0x76, 0x6f, 0x54, 0x61, 0x70, 0x61, 0x72, 0x61, 0x63, 0x68, 0x75, 0x41, 0x64, 0x64,
+0x75, 0x68, 0x61, 0x4f, 0x44, 0x5a, 0x64, 0x61, 0x74, 0x20, 0x61, 0x7a, 0x61, 0x6c, 0x6d, 0x61, 0x6b, 0x65, 0x6f, 0x92b,
+0x941, 0x902, 0x44, 0x69, 0x6e, 0x64, 0x61, 0x6d, 0x6f, 0x69, 0x65, 0x73, 0x61, 0x2e, 0x67, 0x49, 0x20, 0x62, 0x69, 0x6b,
+0x25b, 0x302, 0x67, 0x6c, 0xe0, 0x53, 0x75, 0x62, 0x62, 0x61, 0x61, 0x68, 0x69, 0x69, 0x64, 0x69, 0x253, 0x61, 0x6b, 0xed,
+0x6b, 0xed, 0x72, 0xed, 0x67, 0x73, 0xe1, 0x72, 0xfa, 0x77, 0xe1, 0x77, 0x69, 0x63, 0x68, 0x69, 0x73, 0x68, 0x75, 0x63,
+0x6f, 0x6d, 0x6d, 0x65, 0x6d, 0x61, 0x6e, 0xe1, 0x52, 0x57, 0x42d, 0x418, 0x4c, 0x77, 0x61, 0x6d, 0x69, 0x6c, 0x61, 0x77,
+0x75, 0x6b, 0x69, 0x25b, 0x6d, 0x25b, 0x301, 0x25b, 0x6d, 0x64, 0x65, 0x20, 0x6c, 0x61, 0x20, 0x6d, 0x61, 0xf1, 0x61, 0x6e,
+0x61, 0x6d, 0x62, 0x61, 0xa78c, 0x6d, 0x62, 0x61, 0xa78c, 0x6d, 0x62, 0x61, 0x2bc, 0xe1, 0x6d, 0x62, 0x61, 0x2bc, 0x628, 0x2e,
+0x646, 0x64, 0x6f, 0x70, 0x6f, 0x142, 0x64, 0x6e, 0x6a, 0x61, 0x69, 0x70, 0x2e
};
static const ushort pm_data[] = {
0x50, 0x4d, 0x57, 0x42, 0x6e, 0x6d, 0x2e, 0x65, 0x20, 0x70, 0x61, 0x73, 0x64, 0x69, 0x74, 0x65, 0x73, 0x12a8, 0x1230, 0x12d3,
-0x1275, 0x645, 0x985, 0x9aa, 0x9f0, 0x9be, 0x9b9, 0x9cd, 0x9a3, 0x41f, 0x41c, 0xf55, 0xfb1, 0xf72, 0xf0b, 0xf46, 0xf0b, 0x47, 0x2e, 0x4d,
-0x2e, 0x441, 0x43b, 0x2e, 0x43e, 0x431, 0x2e, 0x100a, 0x1014, 0x1031, 0x70, 0x2e, 0x20, 0x6d, 0x2e, 0x4e0b, 0x5348, 0x6f, 0x64, 0x70,
-0x2e, 0x70, 0x2e, 0x6d, 0x2e, 0x70, 0x6d, 0x69, 0x70, 0x2e, 0x73, 0x6f, 0x69, 0x72, 0x66, 0x6e, 0x61, 0x63, 0x68, 0x6d,
-0x2e, 0x3bc, 0x2e, 0x3bc, 0x2e, 0x5d0, 0x5d7, 0x5d4, 0x5f4, 0x5e6, 0x905, 0x92a, 0x930, 0x93e, 0x939, 0x94d, 0x928, 0x64, 0x75, 0x2e,
-0x65, 0x2e, 0x68, 0x2e, 0x5348, 0x5f8c, 0xc85, 0xcaa, 0xcb0, 0xcbe, 0xcb9, 0xccd, 0xca8, 0x442, 0x4af, 0x448, 0x442, 0x4e9, 0x43d, 0x20,
+0x1275, 0x645, 0x53f, 0x540, 0x985, 0x9aa, 0x9f0, 0x9be, 0x9b9, 0x9cd, 0x9a8, 0x41f, 0x41c, 0xf55, 0xfb1, 0xf72, 0xf0b, 0xf46, 0xf0b, 0x47,
+0x2e, 0x4d, 0x2e, 0x441, 0x43b, 0x2e, 0x43e, 0x431, 0x2e, 0x100a, 0x1014, 0x1031, 0x70, 0x2e, 0x20, 0x6d, 0x2e, 0x4e0b, 0x5348, 0x6f,
+0x64, 0x70, 0x2e, 0x70, 0x2e, 0x6d, 0x2e, 0x70, 0x6d, 0x69, 0x70, 0x2e, 0x73, 0x6f, 0x69, 0x72, 0x66, 0x3bc, 0x2e, 0x3bc,
+0x2e, 0x5d0, 0x5d7, 0x5d4, 0x5f4, 0x5e6, 0x905, 0x92a, 0x930, 0x93e, 0x939, 0x94d, 0x928, 0x64, 0x75, 0x2e, 0x65, 0x2e, 0x68, 0x2e,
+0x69, 0x2e, 0x6e, 0x2e, 0x5348, 0x5f8c, 0xc85, 0xcaa, 0xcb0, 0xcbe, 0xcb9, 0xccd, 0xca8, 0x442, 0x4af, 0x448, 0x442, 0x4e9, 0x43d, 0x20,
0x43a, 0x438, 0x439, 0x438, 0x43d, 0x43a, 0x438, 0xc624, 0xd6c4, 0x5a, 0x2e, 0x4d, 0x57, 0x2e, 0xeab, 0xebc, 0xeb1, 0xe87, 0xe97, 0xec8,
0xebd, 0xe87, 0x70, 0x113, 0x63, 0x70, 0x75, 0x73, 0x64, 0x69, 0x65, 0x6e, 0x101, 0x6d, 0x70, 0xf3, 0x6b, 0x77, 0x61, 0x70,
0x6f, 0x70, 0x69, 0x65, 0x74, 0x43f, 0x43e, 0x43f, 0x43b, 0x430, 0x434, 0x43d, 0x435, 0x50, 0x54, 0x47, 0x92e, 0x2e, 0x909, 0x2e,
0x4af, 0x2e, 0x445, 0x63a, 0x2e, 0x648, 0x2e, 0x628, 0x639, 0x62f, 0x627, 0x632, 0x638, 0x647, 0x631, 0x64, 0x61, 0x20, 0x74, 0x61,
-0x72, 0x64, 0x65, 0xa2c, 0xa3e, 0x2e, 0xa26, 0xa41, 0x2e, 0x41f, 0x41f, 0x4c, 0x4b, 0x43f, 0x43e, 0x20, 0x43f, 0x43e, 0x434, 0x43d,
-0x435, 0x70, 0x6f, 0x20, 0x70, 0x6f, 0x64, 0x6e, 0x65, 0x4d5, 0x43c, 0x431, 0x438, 0x441, 0x431, 0x43e, 0x43d, 0x44b, 0x20, 0x444,
-0x4d5, 0x441, 0x442, 0x4d5, 0xdb4, 0x2e, 0xdc0, 0x2e, 0x70, 0x6f, 0x70, 0x2e, 0x67, 0x6e, 0x2e, 0x4d, 0x63, 0x68, 0x61, 0x6e,
-0x61, 0x65, 0x6d, 0xbaa, 0xbbf, 0xbb1, 0xbcd, 0xbaa, 0xb95, 0xbb2, 0xbcd, 0xe2b, 0xe25, 0xe31, 0xe07, 0xe40, 0xe17, 0xe35, 0xe48, 0xe22,
-0xe07, 0xf55, 0xfb1, 0xf72, 0xf0b, 0xf51, 0xfb2, 0xf7c, 0xf0b, 0x12f5, 0x1215, 0x122d, 0x20, 0x1230, 0x12d3, 0x1275, 0x65, 0x66, 0x69, 0x61,
-0x66, 0x69, 0xd6, 0x53, 0x686, 0x6c8, 0x634, 0x62a, 0x649, 0x646, 0x20, 0x643, 0x6d0, 0x64a, 0x649, 0x646, 0x43f, 0x43f, 0x54, 0x4b,
-0x422, 0x41a, 0x43, 0x48, 0x79, 0x68, 0x1ecc, 0x300, 0x73, 0xe1, 0x6e, 0x186, 0x300, 0x73, 0xe1, 0x6e, 0x65, 0x74, 0x74, 0x65,
-0x72, 0x6d, 0x69, 0x64, 0x64, 0x61, 0x67, 0x70, 0x6f, 0x70, 0x6f, 0x64, 0x6e, 0x65, 0x43f, 0x43e, 0x43f, 0x43e, 0x434, 0x43d,
-0x435, 0x45, 0x57, 0x92e, 0x2e, 0x928, 0x902, 0x2e, 0x50, 0x2e, 0x4d, 0x2e, 0x128, 0x79, 0x61, 0x77, 0x129, 0x6f, 0x6f, 0x70,
-0x2e, 0x263, 0x65, 0x74, 0x72, 0x254, 0x61, 0x6d, 0x20, 0x4e, 0x61, 0x6d, 0x69, 0x74, 0x74, 0x61, 0x67, 0xa06f, 0xa2d2, 0x65,
-0x61, 0x68, 0x6b, 0x65, 0x74, 0x62, 0x65, 0x61, 0x69, 0x76, 0x65, 0x74, 0x4d, 0x6f, 0x67, 0x6c, 0x75, 0x6d, 0x61, 0x20,
-0x6c, 0x77, 0x61, 0x20, 0x70, 0x6b, 0x69, 0x6b, 0x69, 0x69, 0x257, 0x65, 0x48, 0x77, 0x61, 0x129, 0x2d, 0x69, 0x6e, 0x129,
-0x54, 0x65, 0x69, 0x70, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x6f, 0x74, 0x6f, 0x2d5c, 0x2d30, 0x2d37, 0x2d33, 0x2d33, 0x2d6f, 0x2d30, 0x2d5c,
-0x74, 0x61, 0x64, 0x67, 0x67, 0x2b7, 0x61, 0x74, 0x6e, 0x20, 0x74, 0x6d, 0x65, 0x64, 0x64, 0x69, 0x74, 0x70, 0x61, 0x6d,
-0x75, 0x6e, 0x79, 0x69, 0x6b, 0x79, 0x69, 0x75, 0x6b, 0x6f, 0x6e, 0x79, 0x69, 0x55, 0x54, 0x13d2, 0x13af, 0x13f1, 0x13a2, 0x13d7,
-0x13e2, 0x43, 0x68, 0x69, 0x6c, 0x6f, 0x4d, 0x55, 0x55, 0x61, 0x6b, 0x61, 0x73, 0x75, 0x62, 0x61, 0x168, 0x47, 0x6b, 0x6f,
-0x6f, 0x73, 0x6b, 0x6f, 0x6c, 0x69, 0x6e, 0x79, 0x1c3, 0x75, 0x69, 0x61, 0x73, 0x55, 0x68, 0x72, 0x20, 0x6e, 0x6f, 0x6d,
-0x6d, 0x65, 0x6e, 0x64, 0x61, 0x61, 0x63, 0x68, 0x73, 0x190, 0x6e, 0x64, 0xe1, 0x6d, 0xe2, 0x45, 0x69, 0x67, 0x75, 0x6c,
-0x6f, 0x69, 0x63, 0x68, 0x61, 0x6d, 0x74, 0x68, 0x69, 0x45, 0x62, 0x6f, 0x6e, 0x67, 0x69, 0x41, 0x6c, 0x75, 0x75, 0x6c,
-0x61, 0x4f, 0x54, 0x1e0c, 0x65, 0x66, 0x66, 0x69, 0x72, 0x20, 0x61, 0x7a, 0x61, 0x6e, 0x79, 0x69, 0x61, 0x67, 0x68, 0x75,
-0x6f, 0x92c, 0x947, 0x932, 0x93e, 0x938, 0x947, 0x44, 0x69, 0x6c, 0x6f, 0x6c, 0x6f, 0x6e, 0x6f, 0x6d, 0xeb, 0x74, 0x74, 0x65,
-0x73, 0x61, 0x2e, 0x6b, 0x49, 0x20, 0x253, 0x75, 0x67, 0x61, 0x6a, 0x254, 0x70, 0x5a, 0x61, 0x61, 0x72, 0x69, 0x6b, 0x61,
-0x79, 0x20, 0x62, 0x65, 0x62, 0x79, 0xe1, 0x6d, 0x75, 0x6e, 0x67, 0x259, 0x67, 0xf3, 0x67, 0x259, 0x6c, 0x65, 0x63, 0x25b,
-0x25b, 0x301, 0x6e, 0x6b, 0x6f, 0x6d, 0x63, 0x68, 0x6f, 0x63, 0x68, 0x69, 0x6c, 0x2019, 0x6c, 0x6c, 0x69, 0x6c, 0x6c, 0x69,
-0x6b, 0x75, 0x67, 0xfa, 0x54, 0x14a, 0x42d, 0x41a, 0x50, 0x61, 0x73, 0x68, 0x61, 0x6d, 0x69, 0x68, 0x65, 0x6b, 0x69, 0x73,
-0x25b, 0x301, 0x6e, 0x64, 0x25b, 0x64, 0x65, 0x20, 0x6c, 0x61, 0x20, 0x74, 0x61, 0x72, 0x64, 0x65, 0x14b, 0x6b, 0x61, 0x20,
-0x6d, 0x62, 0x254, 0x301, 0x74, 0x20, 0x6e, 0x6a, 0x69, 0x6e, 0x63, 0x77, 0xf2, 0x6e, 0x7a, 0xe9, 0x6d, 0x62f, 0x2e, 0x646,
-0x77, 0xf3, 0x74, 0x70, 0x6f, 0x142, 0x64, 0x6e, 0x6a, 0x61, 0x70, 0x6f, 0x70, 0x6f, 0x142, 0x64, 0x6e, 0x6a, 0x75, 0x65,
-0x70, 0x2e
+0x72, 0x64, 0x65, 0xa2c, 0xa3e, 0x2e, 0xa26, 0xa41, 0x2e, 0x4c, 0x4b, 0x43f, 0x43e, 0x20, 0x43f, 0x43e, 0x434, 0x43d, 0x435, 0x70,
+0x6f, 0x20, 0x70, 0x6f, 0x64, 0x6e, 0x65, 0x4d5, 0x43c, 0x431, 0x438, 0x441, 0x431, 0x43e, 0x43d, 0x44b, 0x20, 0x444, 0x4d5, 0x441,
+0x442, 0x4d5, 0x645, 0x646, 0x62c, 0x647, 0x646, 0x62f, 0x60c, 0x20, 0x634, 0x627, 0x645, 0xdb4, 0x2e, 0xdc0, 0x2e, 0x70, 0x6f, 0x70,
+0x2e, 0x67, 0x6e, 0x2e, 0x65, 0x6d, 0x43f, 0x430, 0x2e, 0x20, 0x447, 0x43e, 0x2e, 0xbaa, 0xbbf, 0xbb1, 0xbcd, 0xbaa, 0xb95, 0xbb2,
+0xbcd, 0xe2b, 0xe25, 0xe31, 0xe07, 0xe40, 0xe17, 0xe35, 0xe48, 0xe22, 0xe07, 0xf55, 0xfb1, 0xf72, 0xf0b, 0xf51, 0xfb2, 0xf7c, 0xf0b, 0x12f5,
+0x1215, 0x122d, 0x20, 0x1230, 0x12d3, 0x1275, 0x65, 0x66, 0x69, 0x61, 0x66, 0x69, 0xd6, 0x53, 0x67, 0xfc, 0x6e, 0x6f, 0x72, 0x74,
+0x61, 0x64, 0x61, 0x6e, 0x20, 0x73, 0x6f, 0x148, 0x686, 0x6c8, 0x634, 0x62a, 0x649, 0x646, 0x20, 0x643, 0x6d0, 0x64a, 0x649, 0x646,
+0x43f, 0x43f, 0x54, 0x4b, 0x422, 0x41a, 0x43, 0x48, 0x79, 0x68, 0x4e, 0x67, 0x6f, 0x1ecc, 0x300, 0x73, 0xe1, 0x6e, 0x186, 0x300,
+0x73, 0xe1, 0x6e, 0x65, 0x74, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x64, 0x64, 0x61, 0x67, 0x70, 0x6f, 0x70, 0x6f, 0x64, 0x6e,
+0x65, 0x43f, 0x43e, 0x43f, 0x43e, 0x434, 0x43d, 0x435, 0x45, 0x57, 0x92e, 0x2e, 0x928, 0x902, 0x2e, 0x50, 0x2e, 0x4d, 0x2e, 0x128,
+0x79, 0x61, 0x77, 0x129, 0x6f, 0x6f, 0x70, 0x2e, 0x263, 0x65, 0x74, 0x72, 0x254, 0x61, 0x6d, 0x20, 0x4e, 0x61, 0x6d, 0x69,
+0x74, 0x74, 0x61, 0x67, 0xa06f, 0xa2d2, 0x65, 0x61, 0x68, 0x6b, 0x65, 0x74, 0x62, 0x65, 0x61, 0x69, 0x76, 0x65, 0x74, 0x65,
+0x62, 0x4d, 0x6f, 0x67, 0x6c, 0x75, 0x6d, 0x61, 0x20, 0x6c, 0x77, 0x61, 0x20, 0x70, 0x6b, 0x69, 0x6b, 0x69, 0x69, 0x257,
+0x65, 0x48, 0x77, 0x61, 0x129, 0x2d, 0x69, 0x6e, 0x129, 0x54, 0x65, 0x69, 0x70, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x6f, 0x74,
+0x6f, 0x2d5c, 0x2d30, 0x2d37, 0x2d33, 0x2d33, 0x2d6f, 0x2d30, 0x2d5c, 0x74, 0x61, 0x64, 0x67, 0x67, 0x2b7, 0x61, 0x74, 0x6e, 0x20, 0x74,
+0x6d, 0x65, 0x64, 0x64, 0x69, 0x74, 0x70, 0x61, 0x6d, 0x75, 0x6e, 0x79, 0x69, 0x6b, 0x79, 0x69, 0x75, 0x6b, 0x6f, 0x6e,
+0x79, 0x69, 0x55, 0x54, 0x13d2, 0x13af, 0x13f1, 0x13a2, 0x13d7, 0x13e2, 0x43, 0x68, 0x69, 0x6c, 0x6f, 0x4d, 0x55, 0x55, 0x61, 0x6b,
+0x61, 0x73, 0x75, 0x62, 0x61, 0x168, 0x47, 0x6b, 0x6f, 0x6f, 0x73, 0x6b, 0x6f, 0x6c, 0x69, 0x6e, 0x79, 0x1c3, 0x75, 0x69,
+0x61, 0x73, 0x55, 0x68, 0x72, 0x20, 0x6e, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x61, 0x61, 0x63, 0x68, 0x73, 0x190, 0x6e,
+0x64, 0xe1, 0x6d, 0xe2, 0x45, 0x69, 0x67, 0x75, 0x6c, 0x6f, 0x69, 0x63, 0x68, 0x61, 0x6d, 0x74, 0x68, 0x69, 0x45, 0x62,
+0x6f, 0x6e, 0x67, 0x69, 0x41, 0x6c, 0x75, 0x75, 0x6c, 0x61, 0x4f, 0x54, 0x1e0c, 0x65, 0x66, 0x66, 0x69, 0x72, 0x20, 0x61,
+0x7a, 0x61, 0x6e, 0x79, 0x69, 0x61, 0x67, 0x68, 0x75, 0x6f, 0x92c, 0x947, 0x932, 0x93e, 0x938, 0x947, 0x44, 0x69, 0x6c, 0x6f,
+0x6c, 0x6f, 0x6e, 0x6f, 0x6d, 0xeb, 0x74, 0x74, 0x65, 0x73, 0x61, 0x2e, 0x6b, 0x49, 0x20, 0x253, 0x75, 0x67, 0x61, 0x6a,
+0x254, 0x70, 0x5a, 0x61, 0x61, 0x72, 0x69, 0x6b, 0x61, 0x79, 0x20, 0x62, 0x65, 0x62, 0x79, 0xe1, 0x6d, 0x75, 0x6e, 0x67,
+0x259, 0x67, 0xf3, 0x67, 0x259, 0x6c, 0x65, 0x63, 0x25b, 0x25b, 0x301, 0x6e, 0x6b, 0x6f, 0x6d, 0x63, 0x68, 0x6f, 0x63, 0x68,
+0x69, 0x6c, 0x2019, 0x6c, 0x6c, 0x69, 0x6c, 0x6c, 0x69, 0x6b, 0x75, 0x67, 0xfa, 0x54, 0x14a, 0x42d, 0x41a, 0x50, 0x61, 0x73,
+0x68, 0x61, 0x6d, 0x69, 0x68, 0x65, 0x6b, 0x69, 0x73, 0x25b, 0x301, 0x6e, 0x64, 0x25b, 0x64, 0x65, 0x20, 0x6c, 0x61, 0x20,
+0x74, 0x61, 0x72, 0x64, 0x65, 0x14b, 0x6b, 0x61, 0x20, 0x6d, 0x62, 0x254, 0x301, 0x74, 0x20, 0x6e, 0x6a, 0x69, 0x6e, 0x63,
+0x77, 0xf2, 0x6e, 0x7a, 0xe9, 0x6d, 0x62f, 0x2e, 0x646, 0x77, 0xf3, 0x74, 0x70, 0x6f, 0x142, 0x64, 0x6e, 0x6a, 0x61, 0x70,
+0x6f, 0x70, 0x6f, 0x142, 0x64, 0x6e, 0x6a, 0x75, 0x65, 0x70, 0x2e
};
static const ushort currency_symbol_data[] = {
0x42, 0x72, 0x4b, 0x73, 0x68, 0x52, 0x24, 0x4c, 0x65, 0x6b, 0xeb, 0x64, 0x65, 0x6e, 0x20ac, 0x1265, 0x122d, 0x62c, 0x2e, 0x645,
-0x2e, 0x200f, 0x62f, 0x2e, 0x62c, 0x2e, 0x200f, 0x62f, 0x2e, 0x628, 0x2e, 0x200f, 0x46, 0x43, 0x46, 0x41, 0x641, 0x2e, 0x62c, 0x2e,
-0x642, 0x2e, 0x200f, 0x46, 0x64, 0x6a, 0x4e, 0x66, 0x6b, 0x62f, 0x2e, 0x639, 0x2e, 0x200f, 0x20aa, 0x62f, 0x2e, 0x623, 0x2e, 0x200f,
-0x62f, 0x2e, 0x643, 0x2e, 0x200f, 0x644, 0x2e, 0x644, 0x2e, 0x200f, 0x62f, 0x2e, 0x644, 0x2e, 0x200f, 0x623, 0x2e, 0x645, 0x2e, 0x200f,
-0x62f, 0x2e, 0x645, 0x2e, 0x200f, 0x631, 0x2e, 0x639, 0x2e, 0x200f, 0x631, 0x2e, 0x642, 0x2e, 0x200f, 0x631, 0x2e, 0x633, 0x2e, 0x200f,
-0x53, 0x62c, 0x2e, 0x633, 0x2e, 0x644, 0x2e, 0x633, 0x2e, 0x200f, 0x62f, 0x2e, 0x62a, 0x2e, 0x200f, 0x62f, 0x2e, 0x625, 0x2e, 0x200f,
-0x631, 0x2e, 0x64a, 0x2e, 0x200f, 0xa3, 0x58f, 0x20b9, 0x20bc, 0x20bd, 0x9f3, 0x4e, 0x75, 0x2e, 0x43b, 0x432, 0x2e, 0x4b, 0x17db, 0xffe5,
-0x48, 0x4b, 0x24, 0x4d, 0x4f, 0x50, 0x24, 0x48, 0x52, 0x4b, 0x4b, 0x4d, 0x4b, 0x10d, 0x6b, 0x72, 0x2e, 0x41, 0x66, 0x6c,
-0x2e, 0x4e, 0x41, 0x66, 0x2e, 0x55, 0x53, 0x24, 0x50, 0x46, 0x42, 0x75, 0x44, 0x47, 0x48, 0x20b5, 0x41, 0x72, 0x4d, 0x4b,
-0x52, 0x4d, 0x52, 0x73, 0x20a6, 0x20b1, 0x52, 0x46, 0x57, 0x53, 0x24, 0x53, 0x52, 0x4c, 0x65, 0x45, 0x6b, 0x72, 0x54, 0x53,
-0x68, 0x54, 0x24, 0x55, 0x53, 0x68, 0x56, 0x54, 0x44, 0x41, 0x43, 0x46, 0x41, 0x43, 0x46, 0x46, 0x43, 0x46, 0x43, 0x46,
-0x50, 0x46, 0x47, 0x47, 0x55, 0x4d, 0x4d, 0x41, 0x44, 0x43, 0x48, 0x46, 0x4c, 0x53, 0x44, 0x54, 0x20be, 0x20b2, 0x46, 0x74,
-0x49, 0x53, 0x4b, 0x52, 0x70, 0x43, 0x41, 0x24, 0x20b8, 0x441, 0x43e, 0x43c, 0x20a9, 0x4b, 0x50, 0x57, 0x20ba, 0x20ad, 0x4b, 0x7a,
-0x434, 0x435, 0x43d, 0x4e, 0x5a, 0x24, 0x20ae, 0x43, 0x4e, 0xa5, 0x928, 0x947, 0x930, 0x942, 0x60b, 0x631, 0x6cc, 0x627, 0x644, 0x7a,
-0x142, 0x52, 0x24, 0x200b, 0x4d, 0x54, 0x6e, 0x44, 0x62, 0x631, 0x53, 0x2f, 0x42, 0x73, 0x52, 0x4f, 0x4e, 0x4c, 0x20b4, 0x52,
-0x53, 0x44, 0x41a, 0x41c, 0xdbb, 0xdd4, 0x2e, 0x20a1, 0x52, 0x44, 0x24, 0x51, 0x43, 0x24, 0x42, 0x2f, 0x2e, 0x47, 0x73, 0x2e,
-0x42, 0x73, 0x2e, 0x52, 0x73, 0x2e, 0x54, 0x48, 0x42, 0xa5, 0x54, 0x4d, 0x54, 0x73, 0x6f, 0x2bb, 0x6d, 0x441, 0x45e, 0x43c,
-0x20ab, 0x4e, 0x54, 0x24, 0x41, 0x24, 0x49, 0x52, 0x52
+0x2e, 0x200f, 0x62f, 0x2e, 0x62c, 0x2e, 0x200f, 0x62f, 0x2e, 0x628, 0x2e, 0x200f, 0x46, 0x43, 0x46, 0x41, 0x43, 0x46, 0x46, 0x64,
+0x6a, 0x4e, 0x66, 0x6b, 0x62f, 0x2e, 0x639, 0x2e, 0x200f, 0x20aa, 0x62f, 0x2e, 0x623, 0x2e, 0x200f, 0x62f, 0x2e, 0x643, 0x2e, 0x200f,
+0x644, 0x2e, 0x644, 0x2e, 0x200f, 0x62f, 0x2e, 0x644, 0x2e, 0x200f, 0x62f, 0x2e, 0x645, 0x2e, 0x200f, 0x631, 0x2e, 0x639, 0x2e, 0x200f,
+0x631, 0x2e, 0x642, 0x2e, 0x200f, 0x631, 0x2e, 0x633, 0x2e, 0x200f, 0x53, 0x62c, 0x2e, 0x633, 0x2e, 0x644, 0x2e, 0x633, 0x2e, 0x200f,
+0x62f, 0x2e, 0x62a, 0x2e, 0x200f, 0x62f, 0x2e, 0x625, 0x2e, 0x200f, 0x631, 0x2e, 0x64a, 0x2e, 0x200f, 0xa3, 0x58f, 0x20b9, 0x20bc, 0x20bd,
+0x9f3, 0x4e, 0x75, 0x2e, 0x43b, 0x432, 0x2e, 0x4b, 0x17db, 0xffe5, 0x48, 0x4b, 0x24, 0x4d, 0x4f, 0x50, 0x24, 0x48, 0x52, 0x4b,
+0x4b, 0x4d, 0x4b, 0x10d, 0x6b, 0x72, 0x2e, 0x41, 0x66, 0x6c, 0x2e, 0x4e, 0x41, 0x66, 0x2e, 0x55, 0x53, 0x24, 0x50, 0x46,
+0x42, 0x75, 0x44, 0x47, 0x48, 0x20b5, 0x41, 0x72, 0x4d, 0x4b, 0x52, 0x4d, 0x52, 0x73, 0x20a6, 0x20b1, 0x52, 0x46, 0x57, 0x53,
+0x24, 0x53, 0x52, 0x4c, 0x65, 0x45, 0x6b, 0x72, 0x54, 0x53, 0x68, 0x54, 0x24, 0x55, 0x53, 0x68, 0x56, 0x54, 0x44, 0x41,
+0x43, 0x46, 0x41, 0x46, 0x43, 0x46, 0x43, 0x46, 0x50, 0x46, 0x47, 0x47, 0x55, 0x4d, 0x4d, 0x41, 0x44, 0x43, 0x48, 0x46,
+0x4c, 0x53, 0x44, 0x54, 0x20be, 0x20b2, 0x46, 0x74, 0x49, 0x53, 0x4b, 0x52, 0x70, 0x43, 0x41, 0x24, 0x20b8, 0x441, 0x43e, 0x43c,
+0x20a9, 0x4b, 0x50, 0x57, 0x20ba, 0x20ad, 0x4b, 0x7a, 0x434, 0x435, 0x43d, 0x4e, 0x5a, 0x24, 0x20ae, 0x43, 0x4e, 0xa5, 0x928, 0x947,
+0x930, 0x942, 0x60b, 0x631, 0x6cc, 0x627, 0x644, 0x7a, 0x142, 0x52, 0x24, 0x200b, 0x4d, 0x54, 0x6e, 0x44, 0x62, 0x631, 0x53, 0x2f,
+0x42, 0x73, 0x52, 0x4f, 0x4e, 0x4c, 0x20b4, 0x52, 0x53, 0x44, 0x41a, 0x41c, 0xdbb, 0xdd4, 0x2e, 0x20a1, 0x52, 0x44, 0x24, 0x51,
+0x43, 0x24, 0x42, 0x2f, 0x2e, 0x47, 0x73, 0x2e, 0x42, 0x73, 0x2e, 0x441, 0x43e, 0x43c, 0x2e, 0x52, 0x73, 0x2e, 0x54, 0x48,
+0x42, 0xa5, 0x54, 0x4d, 0x54, 0x73, 0x6f, 0x2bb, 0x6d, 0x441, 0x45e, 0x43c, 0x20ab, 0x4e, 0x54, 0x24, 0x41, 0x24, 0x49, 0x52,
+0x52
};
static const ushort currency_display_name_data[] = {
@@ -5124,726 +5206,740 @@ static const ushort currency_display_name_data[] = {
0x627, 0x644, 0x633, 0x648, 0x62f, 0x627, 0x646, 0x3b, 0x62c, 0x646, 0x64a, 0x647, 0x627, 0x62a, 0x20, 0x62c, 0x646, 0x648, 0x628, 0x20,
0x627, 0x644, 0x633, 0x648, 0x62f, 0x627, 0x646, 0x3b, 0x62c, 0x646, 0x64a, 0x647, 0x64b, 0x627, 0x20, 0x62c, 0x646, 0x648, 0x628, 0x20,
0x627, 0x644, 0x633, 0x648, 0x62f, 0x627, 0x646, 0x3b, 0x62c, 0x646, 0x64a, 0x647, 0x20, 0x62c, 0x646, 0x648, 0x628, 0x20, 0x627, 0x644,
-0x633, 0x648, 0x62f, 0x627, 0x646, 0x3b, 0x540, 0x561, 0x575, 0x56f, 0x561, 0x56f, 0x561, 0x576, 0x20, 0x564, 0x580, 0x561, 0x574, 0x3b,
+0x633, 0x648, 0x62f, 0x627, 0x646, 0x3b, 0x570, 0x561, 0x575, 0x56f, 0x561, 0x56f, 0x561, 0x576, 0x20, 0x564, 0x580, 0x561, 0x574, 0x3b,
0x3b, 0x570, 0x561, 0x575, 0x56f, 0x561, 0x56f, 0x561, 0x576, 0x20, 0x564, 0x580, 0x561, 0x574, 0x3b, 0x3b, 0x3b, 0x3b, 0x570, 0x561,
-0x575, 0x56f, 0x561, 0x56f, 0x561, 0x576, 0x20, 0x564, 0x580, 0x561, 0x574, 0x3b, 0x41, 0x7a, 0x259, 0x72, 0x62, 0x61, 0x79, 0x63,
-0x61, 0x6e, 0x20, 0x4d, 0x61, 0x6e, 0x61, 0x74, 0x131, 0x3b, 0x3b, 0x41, 0x7a, 0x259, 0x72, 0x62, 0x61, 0x79, 0x63, 0x61,
-0x6e, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x74, 0x131, 0x3b, 0x3b, 0x3b, 0x3b, 0x41, 0x7a, 0x259, 0x72, 0x62, 0x61, 0x79, 0x63,
-0x61, 0x6e, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x74, 0x131, 0x3b, 0x43c, 0x430, 0x43d, 0x430, 0x442, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
-0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x61, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x65, 0x75, 0x72,
-0x6f, 0x3b, 0x9ac, 0x9be, 0x982, 0x9b2, 0x9be, 0x9a6, 0x9c7, 0x9b6, 0x9c0, 0x20, 0x99f, 0x9be, 0x995, 0x9be, 0x3b, 0x3b, 0x9ac, 0x9be,
-0x982, 0x9b2, 0x9be, 0x9a6, 0x9c7, 0x9b6, 0x9c0, 0x20, 0x99f, 0x9be, 0x995, 0x9be, 0x3b, 0x3b, 0x3b, 0x3b, 0x9ac, 0x9be, 0x982, 0x9b2,
-0x9be, 0x9a6, 0x9c7, 0x9b6, 0x9c0, 0x20, 0x99f, 0x9be, 0x995, 0x9be, 0x3b, 0x9ad, 0x9be, 0x9b0, 0x9a4, 0x9c0, 0x9af, 0x9bc, 0x20, 0x9b0,
-0x9c1, 0x9aa, 0x9bf, 0x3b, 0x3b, 0x9ad, 0x9be, 0x9b0, 0x9a4, 0x9c0, 0x9af, 0x9bc, 0x20, 0x9b0, 0x9c1, 0x9aa, 0x9bf, 0x3b, 0x3b, 0x3b,
-0x3b, 0x9ad, 0x9be, 0x9b0, 0x9a4, 0x9c0, 0x9af, 0x9bc, 0x20, 0x9b0, 0x9c1, 0x9aa, 0x9bf, 0x3b, 0xf51, 0xf44, 0xf74, 0xf63, 0xf0b, 0xf40,
-0xfb2, 0xf58, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b,
-0x65, 0x75, 0x72, 0x6f, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x61, 0x20, 0x65, 0x75, 0x72, 0x6f, 0x69, 0x6f, 0xf9, 0x3b,
-0x65, 0x75, 0x72, 0x6f, 0x3b, 0x411, 0x44a, 0x43b, 0x433, 0x430, 0x440, 0x441, 0x43a, 0x438, 0x20, 0x43b, 0x435, 0x432, 0x3b, 0x3b,
-0x431, 0x44a, 0x43b, 0x433, 0x430, 0x440, 0x441, 0x43a, 0x438, 0x20, 0x43b, 0x435, 0x432, 0x3b, 0x3b, 0x3b, 0x3b, 0x431, 0x44a, 0x43b,
-0x433, 0x430, 0x440, 0x441, 0x43a, 0x438, 0x20, 0x43b, 0x435, 0x432, 0x430, 0x3b, 0x1019, 0x103c, 0x1014, 0x103a, 0x1019, 0x102c, 0x1000, 0x103b,
-0x1015, 0x103a, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x1019, 0x103c, 0x1014, 0x103a, 0x1019, 0x102c, 0x1000, 0x103b, 0x1015, 0x103a, 0x3b, 0x431,
-0x435, 0x43b, 0x430, 0x440, 0x443, 0x441, 0x43a, 0x456, 0x20, 0x440, 0x443, 0x431, 0x435, 0x43b, 0x44c, 0x3b, 0x3b, 0x431, 0x435, 0x43b,
-0x430, 0x440, 0x443, 0x441, 0x43a, 0x456, 0x20, 0x440, 0x443, 0x431, 0x435, 0x43b, 0x44c, 0x3b, 0x3b, 0x431, 0x435, 0x43b, 0x430, 0x440,
-0x443, 0x441, 0x43a, 0x456, 0x44f, 0x20, 0x440, 0x443, 0x431, 0x43b, 0x456, 0x3b, 0x431, 0x435, 0x43b, 0x430, 0x440, 0x443, 0x441, 0x43a,
-0x456, 0x445, 0x20, 0x440, 0x443, 0x431, 0x43b, 0x451, 0x45e, 0x3b, 0x431, 0x435, 0x43b, 0x430, 0x440, 0x443, 0x441, 0x43a, 0x430, 0x433,
-0x430, 0x20, 0x440, 0x443, 0x431, 0x43b, 0x44f, 0x3b, 0x179a, 0x17c0, 0x179b, 0x200b, 0x1780, 0x1798, 0x17d2, 0x1796, 0x17bb, 0x1787, 0x17b6, 0x3b,
-0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x179a, 0x17c0, 0x179b, 0x200b, 0x1780, 0x1798, 0x17d2, 0x1796, 0x17bb, 0x1787, 0x17b6, 0x3b, 0x65, 0x75, 0x72,
-0x6f, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x73, 0x3b, 0x4eba, 0x6c11, 0x5e01,
-0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x4eba, 0x6c11, 0x5e01, 0x3b, 0x6e2f, 0x5143, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x6e2f, 0x5143,
-0x3b, 0x6fb3, 0x95e8, 0x5e01, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x6fb3, 0x95e8, 0x5143, 0x3b, 0x65b0, 0x52a0, 0x5761, 0x5143, 0x3b, 0x3b,
-0x3b, 0x3b, 0x3b, 0x3b, 0x65b0, 0x52a0, 0x5761, 0x5143, 0x3b, 0x6fb3, 0x9580, 0x5143, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x6fb3, 0x9580,
-0x5143, 0x3b, 0x65b0, 0x53f0, 0x5e63, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x65b0, 0x53f0, 0x5e63, 0x3b, 0x68, 0x72, 0x76, 0x61, 0x74,
-0x73, 0x6b, 0x61, 0x20, 0x6b, 0x75, 0x6e, 0x61, 0x3b, 0x3b, 0x68, 0x72, 0x76, 0x61, 0x74, 0x73, 0x6b, 0x61, 0x20, 0x6b,
-0x75, 0x6e, 0x61, 0x3b, 0x3b, 0x68, 0x72, 0x76, 0x61, 0x74, 0x73, 0x6b, 0x65, 0x20, 0x6b, 0x75, 0x6e, 0x65, 0x3b, 0x3b,
-0x68, 0x72, 0x76, 0x61, 0x74, 0x73, 0x6b, 0x69, 0x68, 0x20, 0x6b, 0x75, 0x6e, 0x61, 0x3b, 0x6b, 0x6f, 0x6e, 0x76, 0x65,
-0x72, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e, 0x61, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x61, 0x3b, 0x3b, 0x6b, 0x6f, 0x6e, 0x76,
-0x65, 0x72, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e, 0x61, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x61, 0x3b, 0x3b, 0x6b, 0x6f, 0x6e,
-0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x3b, 0x3b, 0x6b, 0x6f,
-0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e, 0x69, 0x68, 0x20, 0x6d, 0x61, 0x72, 0x61, 0x6b, 0x61, 0x3b,
-0x10d, 0x65, 0x73, 0x6b, 0xe1, 0x20, 0x6b, 0x6f, 0x72, 0x75, 0x6e, 0x61, 0x3b, 0x3b, 0x10d, 0x65, 0x73, 0x6b, 0xe1, 0x20,
-0x6b, 0x6f, 0x72, 0x75, 0x6e, 0x61, 0x3b, 0x3b, 0x10d, 0x65, 0x73, 0x6b, 0xe9, 0x20, 0x6b, 0x6f, 0x72, 0x75, 0x6e, 0x79,
-0x3b, 0x10d, 0x65, 0x73, 0x6b, 0xe9, 0x20, 0x6b, 0x6f, 0x72, 0x75, 0x6e, 0x79, 0x3b, 0x10d, 0x65, 0x73, 0x6b, 0xfd, 0x63,
-0x68, 0x20, 0x6b, 0x6f, 0x72, 0x75, 0x6e, 0x3b, 0x64, 0x61, 0x6e, 0x73, 0x6b, 0x20, 0x6b, 0x72, 0x6f, 0x6e, 0x65, 0x3b,
-0x3b, 0x64, 0x61, 0x6e, 0x73, 0x6b, 0x20, 0x6b, 0x72, 0x6f, 0x6e, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x64, 0x61, 0x6e, 0x73,
-0x6b, 0x65, 0x20, 0x6b, 0x72, 0x6f, 0x6e, 0x65, 0x72, 0x3b, 0x45, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f,
-0x3b, 0x3b, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x41, 0x72, 0x75, 0x62, 0x61, 0x61, 0x6e, 0x73, 0x65, 0x20, 0x67,
-0x75, 0x6c, 0x64, 0x65, 0x6e, 0x3b, 0x3b, 0x41, 0x72, 0x75, 0x62, 0x61, 0x61, 0x6e, 0x73, 0x65, 0x20, 0x67, 0x75, 0x6c,
-0x64, 0x65, 0x6e, 0x3b, 0x3b, 0x3b, 0x3b, 0x41, 0x72, 0x75, 0x62, 0x61, 0x61, 0x6e, 0x73, 0x65, 0x20, 0x67, 0x75, 0x6c,
-0x64, 0x65, 0x6e, 0x3b, 0x4e, 0x65, 0x64, 0x65, 0x72, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x2d, 0x41, 0x6e, 0x74, 0x69, 0x6c,
-0x6c, 0x69, 0x61, 0x61, 0x6e, 0x73, 0x65, 0x20, 0x67, 0x75, 0x6c, 0x64, 0x65, 0x6e, 0x3b, 0x3b, 0x4e, 0x65, 0x64, 0x65,
-0x72, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x2d, 0x41, 0x6e, 0x74, 0x69, 0x6c, 0x6c, 0x69, 0x61, 0x61, 0x6e, 0x73, 0x65, 0x20,
-0x67, 0x75, 0x6c, 0x64, 0x65, 0x6e, 0x3b, 0x3b, 0x3b, 0x3b, 0x4e, 0x65, 0x64, 0x65, 0x72, 0x6c, 0x61, 0x6e, 0x64, 0x73,
-0x2d, 0x41, 0x6e, 0x74, 0x69, 0x6c, 0x6c, 0x69, 0x61, 0x61, 0x6e, 0x73, 0x65, 0x20, 0x67, 0x75, 0x6c, 0x64, 0x65, 0x6e,
-0x3b, 0x53, 0x75, 0x72, 0x69, 0x6e, 0x61, 0x61, 0x6d, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b,
-0x53, 0x75, 0x72, 0x69, 0x6e, 0x61, 0x61, 0x6d, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b,
-0x3b, 0x53, 0x75, 0x72, 0x69, 0x6e, 0x61, 0x61, 0x6d, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x41,
-0x6d, 0x65, 0x72, 0x69, 0x6b, 0x61, 0x61, 0x6e, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x41,
-0x6d, 0x65, 0x72, 0x69, 0x6b, 0x61, 0x61, 0x6e, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b,
-0x3b, 0x41, 0x6d, 0x65, 0x72, 0x69, 0x6b, 0x61, 0x61, 0x6e, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b,
-0x55, 0x53, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x55, 0x53, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72,
-0x3b, 0x3b, 0x3b, 0x3b, 0x55, 0x53, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x45, 0x61, 0x73, 0x74, 0x20,
-0x43, 0x61, 0x72, 0x69, 0x62, 0x62, 0x65, 0x61, 0x6e, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x45, 0x61,
-0x73, 0x74, 0x20, 0x43, 0x61, 0x72, 0x69, 0x62, 0x62, 0x65, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b,
-0x3b, 0x3b, 0x3b, 0x45, 0x61, 0x73, 0x74, 0x20, 0x43, 0x61, 0x72, 0x69, 0x62, 0x62, 0x65, 0x61, 0x6e, 0x20, 0x64, 0x6f,
-0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x41, 0x75, 0x73, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x61, 0x6e, 0x20, 0x44, 0x6f, 0x6c,
-0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x41, 0x75, 0x73, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c,
-0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x41, 0x75, 0x73, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c,
-0x6c, 0x61, 0x72, 0x73, 0x3b, 0x45, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x65,
-0x75, 0x72, 0x6f, 0x73, 0x3b, 0x42, 0x61, 0x68, 0x61, 0x6d, 0x69, 0x61, 0x6e, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72,
-0x3b, 0x3b, 0x42, 0x61, 0x68, 0x61, 0x6d, 0x69, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b,
-0x3b, 0x42, 0x61, 0x68, 0x61, 0x6d, 0x69, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x42, 0x61,
-0x72, 0x62, 0x61, 0x64, 0x69, 0x61, 0x6e, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x42, 0x61, 0x72, 0x62,
-0x61, 0x64, 0x69, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x42, 0x61, 0x72, 0x62,
-0x61, 0x64, 0x69, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x42, 0x65, 0x6c, 0x69, 0x7a, 0x65,
-0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x42, 0x65, 0x6c, 0x69, 0x7a, 0x65, 0x20, 0x64, 0x6f, 0x6c, 0x6c,
-0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x42, 0x65, 0x6c, 0x69, 0x7a, 0x65, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73,
-0x3b, 0x42, 0x65, 0x72, 0x6d, 0x75, 0x64, 0x61, 0x6e, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x42, 0x65,
-0x72, 0x6d, 0x75, 0x64, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x42, 0x65, 0x72,
-0x6d, 0x75, 0x64, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x42, 0x6f, 0x74, 0x73, 0x77, 0x61,
-0x6e, 0x61, 0x6e, 0x20, 0x50, 0x75, 0x6c, 0x61, 0x3b, 0x3b, 0x42, 0x6f, 0x74, 0x73, 0x77, 0x61, 0x6e, 0x61, 0x6e, 0x20,
-0x70, 0x75, 0x6c, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x42, 0x6f, 0x74, 0x73, 0x77, 0x61, 0x6e, 0x61, 0x6e, 0x20, 0x70, 0x75,
-0x6c, 0x61, 0x73, 0x3b, 0x42, 0x75, 0x72, 0x75, 0x6e, 0x64, 0x69, 0x61, 0x6e, 0x20, 0x46, 0x72, 0x61, 0x6e, 0x63, 0x3b,
-0x3b, 0x42, 0x75, 0x72, 0x75, 0x6e, 0x64, 0x69, 0x61, 0x6e, 0x20, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x3b, 0x3b, 0x3b, 0x3b,
-0x42, 0x75, 0x72, 0x75, 0x6e, 0x64, 0x69, 0x61, 0x6e, 0x20, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x73, 0x3b, 0x43, 0x65, 0x6e,
-0x74, 0x72, 0x61, 0x6c, 0x20, 0x41, 0x66, 0x72, 0x69, 0x63, 0x61, 0x6e, 0x20, 0x43, 0x46, 0x41, 0x20, 0x46, 0x72, 0x61,
-0x6e, 0x63, 0x3b, 0x3b, 0x43, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x20, 0x41, 0x66, 0x72, 0x69, 0x63, 0x61, 0x6e, 0x20,
-0x43, 0x46, 0x41, 0x20, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x3b, 0x3b, 0x3b, 0x3b, 0x43, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c,
-0x20, 0x41, 0x66, 0x72, 0x69, 0x63, 0x61, 0x6e, 0x20, 0x43, 0x46, 0x41, 0x20, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x73, 0x3b,
-0x43, 0x61, 0x6e, 0x61, 0x64, 0x69, 0x61, 0x6e, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x43, 0x61, 0x6e,
-0x61, 0x64, 0x69, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x43, 0x61, 0x6e, 0x61,
-0x64, 0x69, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x43, 0x61, 0x79, 0x6d, 0x61, 0x6e, 0x20,
-0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x43, 0x61, 0x79, 0x6d,
-0x61, 0x6e, 0x20, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b,
+0x575, 0x56f, 0x561, 0x56f, 0x561, 0x576, 0x20, 0x564, 0x580, 0x561, 0x574, 0x3b, 0x9ad, 0x9be, 0x9f0, 0x9a4, 0x9c0, 0x9af, 0x9bc, 0x20,
+0x9f0, 0x9c1, 0x9aa, 0x9c0, 0x3b, 0x3b, 0x9ad, 0x9be, 0x9f0, 0x9a4, 0x9c0, 0x9af, 0x9bc, 0x20, 0x9f0, 0x9c1, 0x9aa, 0x9c0, 0x3b, 0x3b,
+0x3b, 0x3b, 0x9ad, 0x9be, 0x9f0, 0x9a4, 0x9c0, 0x9af, 0x9bc, 0x20, 0x9f0, 0x9c1, 0x9aa, 0x9c0, 0x3b, 0x41, 0x7a, 0x259, 0x72, 0x62,
+0x61, 0x79, 0x63, 0x61, 0x6e, 0x20, 0x4d, 0x61, 0x6e, 0x61, 0x74, 0x131, 0x3b, 0x3b, 0x41, 0x7a, 0x259, 0x72, 0x62, 0x61,
+0x79, 0x63, 0x61, 0x6e, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x74, 0x131, 0x3b, 0x3b, 0x3b, 0x3b, 0x41, 0x7a, 0x259, 0x72, 0x62,
+0x61, 0x79, 0x63, 0x61, 0x6e, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x74, 0x131, 0x3b, 0x43c, 0x430, 0x43d, 0x430, 0x442, 0x3b, 0x3b,
+0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x61, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b,
+0x65, 0x75, 0x72, 0x6f, 0x3b, 0x9ac, 0x9be, 0x982, 0x9b2, 0x9be, 0x9a6, 0x9c7, 0x9b6, 0x9c0, 0x20, 0x99f, 0x9be, 0x995, 0x9be, 0x3b,
+0x3b, 0x9ac, 0x9be, 0x982, 0x9b2, 0x9be, 0x9a6, 0x9c7, 0x9b6, 0x9c0, 0x20, 0x99f, 0x9be, 0x995, 0x9be, 0x3b, 0x3b, 0x3b, 0x3b, 0x9ac,
+0x9be, 0x982, 0x9b2, 0x9be, 0x9a6, 0x9c7, 0x9b6, 0x9c0, 0x20, 0x99f, 0x9be, 0x995, 0x9be, 0x3b, 0x9ad, 0x9be, 0x9b0, 0x9a4, 0x9c0, 0x9af,
+0x9bc, 0x20, 0x9b0, 0x9c1, 0x9aa, 0x9bf, 0x3b, 0x3b, 0x9ad, 0x9be, 0x9b0, 0x9a4, 0x9c0, 0x9af, 0x9bc, 0x20, 0x9b0, 0x9c1, 0x9aa, 0x9bf,
+0x3b, 0x3b, 0x3b, 0x3b, 0x9ad, 0x9be, 0x9b0, 0x9a4, 0x9c0, 0x9af, 0x9bc, 0x20, 0x9b0, 0x9c1, 0x9aa, 0x9bf, 0x3b, 0xf51, 0xf44, 0xf74,
+0xf63, 0xf0b, 0xf40, 0xfb2, 0xf58, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x75,
+0x72, 0x6f, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x61, 0x20, 0x65, 0x75, 0x72, 0x6f, 0x69,
+0x6f, 0xf9, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x411, 0x44a, 0x43b, 0x433, 0x430, 0x440, 0x441, 0x43a, 0x438, 0x20, 0x43b, 0x435,
+0x432, 0x3b, 0x3b, 0x431, 0x44a, 0x43b, 0x433, 0x430, 0x440, 0x441, 0x43a, 0x438, 0x20, 0x43b, 0x435, 0x432, 0x3b, 0x3b, 0x3b, 0x3b,
+0x431, 0x44a, 0x43b, 0x433, 0x430, 0x440, 0x441, 0x43a, 0x438, 0x20, 0x43b, 0x435, 0x432, 0x430, 0x3b, 0x1019, 0x103c, 0x1014, 0x103a, 0x1019,
+0x102c, 0x20, 0x1000, 0x103b, 0x1015, 0x103a, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x1019, 0x103c, 0x1014, 0x103a, 0x1019, 0x102c, 0x20, 0x1000,
+0x103b, 0x1015, 0x103a, 0x3b, 0x431, 0x435, 0x43b, 0x430, 0x440, 0x443, 0x441, 0x43a, 0x456, 0x20, 0x440, 0x443, 0x431, 0x435, 0x43b, 0x44c,
+0x3b, 0x3b, 0x431, 0x435, 0x43b, 0x430, 0x440, 0x443, 0x441, 0x43a, 0x456, 0x20, 0x440, 0x443, 0x431, 0x435, 0x43b, 0x44c, 0x3b, 0x3b,
+0x431, 0x435, 0x43b, 0x430, 0x440, 0x443, 0x441, 0x43a, 0x456, 0x44f, 0x20, 0x440, 0x443, 0x431, 0x43b, 0x456, 0x3b, 0x431, 0x435, 0x43b,
+0x430, 0x440, 0x443, 0x441, 0x43a, 0x456, 0x445, 0x20, 0x440, 0x443, 0x431, 0x43b, 0x451, 0x45e, 0x3b, 0x431, 0x435, 0x43b, 0x430, 0x440,
+0x443, 0x441, 0x43a, 0x430, 0x433, 0x430, 0x20, 0x440, 0x443, 0x431, 0x43b, 0x44f, 0x3b, 0x179a, 0x17c0, 0x179b, 0x200b, 0x1780, 0x1798, 0x17d2,
+0x1796, 0x17bb, 0x1787, 0x17b6, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x179a, 0x17c0, 0x179b, 0x200b, 0x1780, 0x1798, 0x17d2, 0x1796, 0x17bb, 0x1787,
+0x17b6, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f,
+0x73, 0x3b, 0x4eba, 0x6c11, 0x5e01, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x4eba, 0x6c11, 0x5e01, 0x3b, 0x6e2f, 0x5143, 0x3b, 0x3b, 0x3b,
+0x3b, 0x3b, 0x3b, 0x6e2f, 0x5143, 0x3b, 0x6fb3, 0x95e8, 0x5e01, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x6fb3, 0x95e8, 0x5143, 0x3b, 0x65b0,
+0x52a0, 0x5761, 0x5143, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x65b0, 0x52a0, 0x5761, 0x5143, 0x3b, 0x6fb3, 0x9580, 0x5143, 0x3b, 0x3b, 0x3b,
+0x3b, 0x3b, 0x3b, 0x6fb3, 0x9580, 0x5143, 0x3b, 0x65b0, 0x53f0, 0x5e63, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x65b0, 0x53f0, 0x5e63, 0x3b,
+0x68, 0x72, 0x76, 0x61, 0x74, 0x73, 0x6b, 0x61, 0x20, 0x6b, 0x75, 0x6e, 0x61, 0x3b, 0x3b, 0x68, 0x72, 0x76, 0x61, 0x74,
+0x73, 0x6b, 0x61, 0x20, 0x6b, 0x75, 0x6e, 0x61, 0x3b, 0x3b, 0x68, 0x72, 0x76, 0x61, 0x74, 0x73, 0x6b, 0x65, 0x20, 0x6b,
+0x75, 0x6e, 0x65, 0x3b, 0x3b, 0x68, 0x72, 0x76, 0x61, 0x74, 0x73, 0x6b, 0x69, 0x68, 0x20, 0x6b, 0x75, 0x6e, 0x61, 0x3b,
+0x6b, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e, 0x61, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x61, 0x3b,
+0x3b, 0x6b, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e, 0x61, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x61,
+0x3b, 0x3b, 0x6b, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x6b,
+0x65, 0x3b, 0x3b, 0x6b, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e, 0x69, 0x68, 0x20, 0x6d, 0x61,
+0x72, 0x61, 0x6b, 0x61, 0x3b, 0x10d, 0x65, 0x73, 0x6b, 0xe1, 0x20, 0x6b, 0x6f, 0x72, 0x75, 0x6e, 0x61, 0x3b, 0x3b, 0x10d,
+0x65, 0x73, 0x6b, 0xe1, 0x20, 0x6b, 0x6f, 0x72, 0x75, 0x6e, 0x61, 0x3b, 0x3b, 0x10d, 0x65, 0x73, 0x6b, 0xe9, 0x20, 0x6b,
+0x6f, 0x72, 0x75, 0x6e, 0x79, 0x3b, 0x10d, 0x65, 0x73, 0x6b, 0xe9, 0x20, 0x6b, 0x6f, 0x72, 0x75, 0x6e, 0x79, 0x3b, 0x10d,
+0x65, 0x73, 0x6b, 0xfd, 0x63, 0x68, 0x20, 0x6b, 0x6f, 0x72, 0x75, 0x6e, 0x3b, 0x64, 0x61, 0x6e, 0x73, 0x6b, 0x20, 0x6b,
+0x72, 0x6f, 0x6e, 0x65, 0x3b, 0x3b, 0x64, 0x61, 0x6e, 0x73, 0x6b, 0x20, 0x6b, 0x72, 0x6f, 0x6e, 0x65, 0x3b, 0x3b, 0x3b,
+0x3b, 0x64, 0x61, 0x6e, 0x73, 0x6b, 0x65, 0x20, 0x6b, 0x72, 0x6f, 0x6e, 0x65, 0x72, 0x3b, 0x45, 0x75, 0x72, 0x6f, 0x3b,
+0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x41, 0x72, 0x75, 0x62, 0x61, 0x61,
+0x6e, 0x73, 0x65, 0x20, 0x67, 0x75, 0x6c, 0x64, 0x65, 0x6e, 0x3b, 0x3b, 0x41, 0x72, 0x75, 0x62, 0x61, 0x61, 0x6e, 0x73,
+0x65, 0x20, 0x67, 0x75, 0x6c, 0x64, 0x65, 0x6e, 0x3b, 0x3b, 0x3b, 0x3b, 0x41, 0x72, 0x75, 0x62, 0x61, 0x61, 0x6e, 0x73,
+0x65, 0x20, 0x67, 0x75, 0x6c, 0x64, 0x65, 0x6e, 0x3b, 0x4e, 0x65, 0x64, 0x65, 0x72, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x2d,
+0x41, 0x6e, 0x74, 0x69, 0x6c, 0x6c, 0x69, 0x61, 0x61, 0x6e, 0x73, 0x65, 0x20, 0x67, 0x75, 0x6c, 0x64, 0x65, 0x6e, 0x3b,
+0x3b, 0x4e, 0x65, 0x64, 0x65, 0x72, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x2d, 0x41, 0x6e, 0x74, 0x69, 0x6c, 0x6c, 0x69, 0x61,
+0x61, 0x6e, 0x73, 0x65, 0x20, 0x67, 0x75, 0x6c, 0x64, 0x65, 0x6e, 0x3b, 0x3b, 0x3b, 0x3b, 0x4e, 0x65, 0x64, 0x65, 0x72,
+0x6c, 0x61, 0x6e, 0x64, 0x73, 0x2d, 0x41, 0x6e, 0x74, 0x69, 0x6c, 0x6c, 0x69, 0x61, 0x61, 0x6e, 0x73, 0x65, 0x20, 0x67,
+0x75, 0x6c, 0x64, 0x65, 0x6e, 0x3b, 0x53, 0x75, 0x72, 0x69, 0x6e, 0x61, 0x61, 0x6d, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x6c,
+0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x53, 0x75, 0x72, 0x69, 0x6e, 0x61, 0x61, 0x6d, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x6c, 0x6c,
+0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x75, 0x72, 0x69, 0x6e, 0x61, 0x61, 0x6d, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x6c,
+0x6c, 0x61, 0x72, 0x3b, 0x41, 0x6d, 0x65, 0x72, 0x69, 0x6b, 0x61, 0x61, 0x6e, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x6c, 0x6c,
+0x61, 0x72, 0x3b, 0x3b, 0x41, 0x6d, 0x65, 0x72, 0x69, 0x6b, 0x61, 0x61, 0x6e, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x6c, 0x6c,
+0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x41, 0x6d, 0x65, 0x72, 0x69, 0x6b, 0x61, 0x61, 0x6e, 0x73, 0x65, 0x20, 0x64, 0x6f,
+0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x55, 0x53, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x55, 0x53, 0x20, 0x64,
+0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x55, 0x53, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b,
+0x45, 0x61, 0x73, 0x74, 0x20, 0x43, 0x61, 0x72, 0x69, 0x62, 0x62, 0x65, 0x61, 0x6e, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61,
+0x72, 0x3b, 0x3b, 0x45, 0x61, 0x73, 0x74, 0x20, 0x43, 0x61, 0x72, 0x69, 0x62, 0x62, 0x65, 0x61, 0x6e, 0x20, 0x64, 0x6f,
+0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x45, 0x61, 0x73, 0x74, 0x20, 0x43, 0x61, 0x72, 0x69, 0x62, 0x62, 0x65,
+0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x41, 0x75, 0x73, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x61,
+0x6e, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x41, 0x75, 0x73, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x61, 0x6e,
+0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x41, 0x75, 0x73, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x61,
+0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x45, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f,
+0x3b, 0x3b, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x73, 0x3b, 0x42, 0x61, 0x68, 0x61, 0x6d, 0x69, 0x61, 0x6e, 0x20, 0x44,
+0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x42, 0x61, 0x68, 0x61, 0x6d, 0x69, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c,
+0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x42, 0x61, 0x68, 0x61, 0x6d, 0x69, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61,
+0x72, 0x73, 0x3b, 0x42, 0x61, 0x72, 0x62, 0x61, 0x64, 0x69, 0x61, 0x6e, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b,
+0x3b, 0x42, 0x61, 0x72, 0x62, 0x61, 0x64, 0x69, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b,
+0x3b, 0x42, 0x61, 0x72, 0x62, 0x61, 0x64, 0x69, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x42,
+0x65, 0x6c, 0x69, 0x7a, 0x65, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x42, 0x65, 0x6c, 0x69, 0x7a, 0x65,
+0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x42, 0x65, 0x6c, 0x69, 0x7a, 0x65, 0x20, 0x64, 0x6f,
+0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x42, 0x65, 0x72, 0x6d, 0x75, 0x64, 0x61, 0x6e, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61,
+0x72, 0x3b, 0x3b, 0x42, 0x65, 0x72, 0x6d, 0x75, 0x64, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b,
+0x3b, 0x3b, 0x42, 0x65, 0x72, 0x6d, 0x75, 0x64, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x42,
+0x6f, 0x74, 0x73, 0x77, 0x61, 0x6e, 0x61, 0x6e, 0x20, 0x50, 0x75, 0x6c, 0x61, 0x3b, 0x3b, 0x42, 0x6f, 0x74, 0x73, 0x77,
+0x61, 0x6e, 0x61, 0x6e, 0x20, 0x70, 0x75, 0x6c, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x42, 0x6f, 0x74, 0x73, 0x77, 0x61, 0x6e,
+0x61, 0x6e, 0x20, 0x70, 0x75, 0x6c, 0x61, 0x73, 0x3b, 0x42, 0x75, 0x72, 0x75, 0x6e, 0x64, 0x69, 0x61, 0x6e, 0x20, 0x46,
+0x72, 0x61, 0x6e, 0x63, 0x3b, 0x3b, 0x42, 0x75, 0x72, 0x75, 0x6e, 0x64, 0x69, 0x61, 0x6e, 0x20, 0x66, 0x72, 0x61, 0x6e,
+0x63, 0x3b, 0x3b, 0x3b, 0x3b, 0x42, 0x75, 0x72, 0x75, 0x6e, 0x64, 0x69, 0x61, 0x6e, 0x20, 0x66, 0x72, 0x61, 0x6e, 0x63,
+0x73, 0x3b, 0x43, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x20, 0x41, 0x66, 0x72, 0x69, 0x63, 0x61, 0x6e, 0x20, 0x43, 0x46,
+0x41, 0x20, 0x46, 0x72, 0x61, 0x6e, 0x63, 0x3b, 0x3b, 0x43, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x20, 0x41, 0x66, 0x72,
+0x69, 0x63, 0x61, 0x6e, 0x20, 0x43, 0x46, 0x41, 0x20, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x3b, 0x3b, 0x3b, 0x3b, 0x43, 0x65,
+0x6e, 0x74, 0x72, 0x61, 0x6c, 0x20, 0x41, 0x66, 0x72, 0x69, 0x63, 0x61, 0x6e, 0x20, 0x43, 0x46, 0x41, 0x20, 0x66, 0x72,
+0x61, 0x6e, 0x63, 0x73, 0x3b, 0x43, 0x61, 0x6e, 0x61, 0x64, 0x69, 0x61, 0x6e, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72,
+0x3b, 0x3b, 0x43, 0x61, 0x6e, 0x61, 0x64, 0x69, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b,
+0x3b, 0x43, 0x61, 0x6e, 0x61, 0x64, 0x69, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x43, 0x61,
+0x79, 0x6d, 0x61, 0x6e, 0x20, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b,
0x3b, 0x43, 0x61, 0x79, 0x6d, 0x61, 0x6e, 0x20, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x20, 0x64, 0x6f, 0x6c, 0x6c,
-0x61, 0x72, 0x73, 0x3b, 0x4e, 0x65, 0x77, 0x20, 0x5a, 0x65, 0x61, 0x6c, 0x61, 0x6e, 0x64, 0x20, 0x44, 0x6f, 0x6c, 0x6c,
-0x61, 0x72, 0x3b, 0x3b, 0x4e, 0x65, 0x77, 0x20, 0x5a, 0x65, 0x61, 0x6c, 0x61, 0x6e, 0x64, 0x20, 0x64, 0x6f, 0x6c, 0x6c,
-0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x4e, 0x65, 0x77, 0x20, 0x5a, 0x65, 0x61, 0x6c, 0x61, 0x6e, 0x64, 0x20, 0x64, 0x6f,
-0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x44, 0x61, 0x6e, 0x69, 0x73, 0x68, 0x20, 0x4b, 0x72, 0x6f, 0x6e, 0x65, 0x3b, 0x3b,
-0x44, 0x61, 0x6e, 0x69, 0x73, 0x68, 0x20, 0x6b, 0x72, 0x6f, 0x6e, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x44, 0x61, 0x6e, 0x69,
-0x73, 0x68, 0x20, 0x6b, 0x72, 0x6f, 0x6e, 0x65, 0x72, 0x3b, 0x45, 0x72, 0x69, 0x74, 0x72, 0x65, 0x61, 0x6e, 0x20, 0x4e,
-0x61, 0x6b, 0x66, 0x61, 0x3b, 0x3b, 0x45, 0x72, 0x69, 0x74, 0x72, 0x65, 0x61, 0x6e, 0x20, 0x6e, 0x61, 0x6b, 0x66, 0x61,
-0x3b, 0x3b, 0x3b, 0x3b, 0x45, 0x72, 0x69, 0x74, 0x72, 0x65, 0x61, 0x6e, 0x20, 0x6e, 0x61, 0x6b, 0x66, 0x61, 0x73, 0x3b,
-0x46, 0x61, 0x6c, 0x6b, 0x6c, 0x61, 0x6e, 0x64, 0x20, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x20, 0x50, 0x6f, 0x75,
-0x6e, 0x64, 0x3b, 0x3b, 0x46, 0x61, 0x6c, 0x6b, 0x6c, 0x61, 0x6e, 0x64, 0x20, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73,
-0x20, 0x70, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x3b, 0x3b, 0x3b, 0x46, 0x61, 0x6c, 0x6b, 0x6c, 0x61, 0x6e, 0x64, 0x20, 0x49,
-0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x20, 0x70, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x3b, 0x46, 0x69, 0x6a, 0x69, 0x61, 0x6e,
-0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x46, 0x69, 0x6a, 0x69, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c,
-0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x46, 0x69, 0x6a, 0x69, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73,
-0x3b, 0x55, 0x4b, 0x20, 0x50, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x3b, 0x55, 0x4b, 0x20, 0x70, 0x6f, 0x75, 0x6e, 0x64, 0x3b,
-0x3b, 0x3b, 0x3b, 0x55, 0x4b, 0x20, 0x70, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x3b, 0x47, 0x61, 0x6d, 0x62, 0x69, 0x61, 0x6e,
-0x20, 0x44, 0x61, 0x6c, 0x61, 0x73, 0x69, 0x3b, 0x3b, 0x47, 0x61, 0x6d, 0x62, 0x69, 0x61, 0x6e, 0x20, 0x64, 0x61, 0x6c,
-0x61, 0x73, 0x69, 0x3b, 0x3b, 0x3b, 0x3b, 0x47, 0x61, 0x6d, 0x62, 0x69, 0x61, 0x6e, 0x20, 0x64, 0x61, 0x6c, 0x61, 0x73,
-0x69, 0x73, 0x3b, 0x47, 0x68, 0x61, 0x6e, 0x61, 0x69, 0x61, 0x6e, 0x20, 0x43, 0x65, 0x64, 0x69, 0x3b, 0x3b, 0x47, 0x68,
-0x61, 0x6e, 0x61, 0x69, 0x61, 0x6e, 0x20, 0x63, 0x65, 0x64, 0x69, 0x3b, 0x3b, 0x3b, 0x3b, 0x47, 0x68, 0x61, 0x6e, 0x61,
-0x69, 0x61, 0x6e, 0x20, 0x63, 0x65, 0x64, 0x69, 0x73, 0x3b, 0x47, 0x69, 0x62, 0x72, 0x61, 0x6c, 0x74, 0x61, 0x72, 0x20,
-0x50, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x3b, 0x47, 0x69, 0x62, 0x72, 0x61, 0x6c, 0x74, 0x61, 0x72, 0x20, 0x70, 0x6f, 0x75,
-0x6e, 0x64, 0x3b, 0x3b, 0x3b, 0x3b, 0x47, 0x69, 0x62, 0x72, 0x61, 0x6c, 0x74, 0x61, 0x72, 0x20, 0x70, 0x6f, 0x75, 0x6e,
-0x64, 0x73, 0x3b, 0x47, 0x75, 0x79, 0x61, 0x6e, 0x61, 0x65, 0x73, 0x65, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b,
-0x3b, 0x47, 0x75, 0x79, 0x61, 0x6e, 0x61, 0x65, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b,
-0x3b, 0x47, 0x75, 0x79, 0x61, 0x6e, 0x61, 0x65, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x48,
-0x6f, 0x6e, 0x67, 0x20, 0x4b, 0x6f, 0x6e, 0x67, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x48, 0x6f, 0x6e,
-0x67, 0x20, 0x4b, 0x6f, 0x6e, 0x67, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x48, 0x6f, 0x6e,
-0x67, 0x20, 0x4b, 0x6f, 0x6e, 0x67, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x49, 0x6e, 0x64, 0x69, 0x61,
-0x6e, 0x20, 0x52, 0x75, 0x70, 0x65, 0x65, 0x3b, 0x3b, 0x49, 0x6e, 0x64, 0x69, 0x61, 0x6e, 0x20, 0x72, 0x75, 0x70, 0x65,
-0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x49, 0x6e, 0x64, 0x69, 0x61, 0x6e, 0x20, 0x72, 0x75, 0x70, 0x65, 0x65, 0x73, 0x3b, 0x49,
-0x73, 0x72, 0x61, 0x65, 0x6c, 0x69, 0x20, 0x4e, 0x65, 0x77, 0x20, 0x53, 0x68, 0x65, 0x6b, 0x65, 0x6c, 0x3b, 0x3b, 0x49,
-0x73, 0x72, 0x61, 0x65, 0x6c, 0x69, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x73, 0x68, 0x65, 0x6b, 0x65, 0x6c, 0x3b, 0x3b, 0x3b,
-0x3b, 0x49, 0x73, 0x72, 0x61, 0x65, 0x6c, 0x69, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x73, 0x68, 0x65, 0x6b, 0x65, 0x6c, 0x73,
-0x3b, 0x4a, 0x61, 0x6d, 0x61, 0x69, 0x63, 0x61, 0x6e, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x4a, 0x61,
-0x6d, 0x61, 0x69, 0x63, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x4a, 0x61, 0x6d,
-0x61, 0x69, 0x63, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x4b, 0x65, 0x6e, 0x79, 0x61, 0x6e,
-0x20, 0x53, 0x68, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x3b, 0x3b, 0x4b, 0x65, 0x6e, 0x79, 0x61, 0x6e, 0x20, 0x73, 0x68,
-0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x3b, 0x3b, 0x3b, 0x3b, 0x4b, 0x65, 0x6e, 0x79, 0x61, 0x6e, 0x20, 0x73, 0x68, 0x69,
-0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x73, 0x3b, 0x53, 0x6f, 0x75, 0x74, 0x68, 0x20, 0x41, 0x66, 0x72, 0x69, 0x63, 0x61, 0x6e,
-0x20, 0x52, 0x61, 0x6e, 0x64, 0x3b, 0x3b, 0x53, 0x6f, 0x75, 0x74, 0x68, 0x20, 0x41, 0x66, 0x72, 0x69, 0x63, 0x61, 0x6e,
-0x20, 0x72, 0x61, 0x6e, 0x64, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x6f, 0x75, 0x74, 0x68, 0x20, 0x41, 0x66, 0x72, 0x69, 0x63,
-0x61, 0x6e, 0x20, 0x72, 0x61, 0x6e, 0x64, 0x3b, 0x4c, 0x69, 0x62, 0x65, 0x72, 0x69, 0x61, 0x6e, 0x20, 0x44, 0x6f, 0x6c,
-0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x4c, 0x69, 0x62, 0x65, 0x72, 0x69, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72,
-0x3b, 0x3b, 0x3b, 0x3b, 0x4c, 0x69, 0x62, 0x65, 0x72, 0x69, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73,
-0x3b, 0x4d, 0x61, 0x63, 0x61, 0x6e, 0x65, 0x73, 0x65, 0x20, 0x50, 0x61, 0x74, 0x61, 0x63, 0x61, 0x3b, 0x3b, 0x4d, 0x61,
-0x63, 0x61, 0x6e, 0x65, 0x73, 0x65, 0x20, 0x70, 0x61, 0x74, 0x61, 0x63, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x4d, 0x61, 0x63,
-0x61, 0x6e, 0x65, 0x73, 0x65, 0x20, 0x70, 0x61, 0x74, 0x61, 0x63, 0x61, 0x73, 0x3b, 0x4d, 0x61, 0x6c, 0x61, 0x67, 0x61,
-0x73, 0x79, 0x20, 0x41, 0x72, 0x69, 0x61, 0x72, 0x79, 0x3b, 0x3b, 0x4d, 0x61, 0x6c, 0x61, 0x67, 0x61, 0x73, 0x79, 0x20,
-0x61, 0x72, 0x69, 0x61, 0x72, 0x79, 0x3b, 0x3b, 0x3b, 0x3b, 0x4d, 0x61, 0x6c, 0x61, 0x67, 0x61, 0x73, 0x79, 0x20, 0x61,
-0x72, 0x69, 0x61, 0x72, 0x69, 0x65, 0x73, 0x3b, 0x4d, 0x61, 0x6c, 0x61, 0x77, 0x69, 0x61, 0x6e, 0x20, 0x4b, 0x77, 0x61,
-0x63, 0x68, 0x61, 0x3b, 0x3b, 0x4d, 0x61, 0x6c, 0x61, 0x77, 0x69, 0x61, 0x6e, 0x20, 0x6b, 0x77, 0x61, 0x63, 0x68, 0x61,
-0x3b, 0x3b, 0x3b, 0x3b, 0x4d, 0x61, 0x6c, 0x61, 0x77, 0x69, 0x61, 0x6e, 0x20, 0x6b, 0x77, 0x61, 0x63, 0x68, 0x61, 0x73,
-0x3b, 0x4d, 0x61, 0x6c, 0x61, 0x79, 0x73, 0x69, 0x61, 0x6e, 0x20, 0x52, 0x69, 0x6e, 0x67, 0x67, 0x69, 0x74, 0x3b, 0x3b,
-0x4d, 0x61, 0x6c, 0x61, 0x79, 0x73, 0x69, 0x61, 0x6e, 0x20, 0x72, 0x69, 0x6e, 0x67, 0x67, 0x69, 0x74, 0x3b, 0x3b, 0x3b,
-0x3b, 0x4d, 0x61, 0x6c, 0x61, 0x79, 0x73, 0x69, 0x61, 0x6e, 0x20, 0x72, 0x69, 0x6e, 0x67, 0x67, 0x69, 0x74, 0x73, 0x3b,
-0x4d, 0x61, 0x75, 0x72, 0x69, 0x74, 0x69, 0x61, 0x6e, 0x20, 0x52, 0x75, 0x70, 0x65, 0x65, 0x3b, 0x3b, 0x4d, 0x61, 0x75,
-0x72, 0x69, 0x74, 0x69, 0x61, 0x6e, 0x20, 0x72, 0x75, 0x70, 0x65, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x4d, 0x61, 0x75, 0x72,
-0x69, 0x74, 0x69, 0x61, 0x6e, 0x20, 0x72, 0x75, 0x70, 0x65, 0x65, 0x73, 0x3b, 0x4e, 0x61, 0x6d, 0x69, 0x62, 0x69, 0x61,
-0x6e, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x4e, 0x61, 0x6d, 0x69, 0x62, 0x69, 0x61, 0x6e, 0x20, 0x64,
-0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x4e, 0x61, 0x6d, 0x69, 0x62, 0x69, 0x61, 0x6e, 0x20, 0x64, 0x6f,
-0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x4e, 0x69, 0x67, 0x65, 0x72, 0x69, 0x61, 0x6e, 0x20, 0x4e, 0x61, 0x69, 0x72, 0x61,
-0x3b, 0x3b, 0x4e, 0x69, 0x67, 0x65, 0x72, 0x69, 0x61, 0x6e, 0x20, 0x6e, 0x61, 0x69, 0x72, 0x61, 0x3b, 0x3b, 0x3b, 0x3b,
-0x4e, 0x69, 0x67, 0x65, 0x72, 0x69, 0x61, 0x6e, 0x20, 0x6e, 0x61, 0x69, 0x72, 0x61, 0x73, 0x3b, 0x50, 0x61, 0x6b, 0x69,
-0x73, 0x74, 0x61, 0x6e, 0x69, 0x20, 0x52, 0x75, 0x70, 0x65, 0x65, 0x3b, 0x3b, 0x50, 0x61, 0x6b, 0x69, 0x73, 0x74, 0x61,
-0x6e, 0x69, 0x20, 0x72, 0x75, 0x70, 0x65, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x50, 0x61, 0x6b, 0x69, 0x73, 0x74, 0x61, 0x6e,
-0x69, 0x20, 0x72, 0x75, 0x70, 0x65, 0x65, 0x73, 0x3b, 0x50, 0x61, 0x70, 0x75, 0x61, 0x20, 0x4e, 0x65, 0x77, 0x20, 0x47,
-0x75, 0x69, 0x6e, 0x65, 0x61, 0x6e, 0x20, 0x4b, 0x69, 0x6e, 0x61, 0x3b, 0x3b, 0x50, 0x61, 0x70, 0x75, 0x61, 0x20, 0x4e,
-0x65, 0x77, 0x20, 0x47, 0x75, 0x69, 0x6e, 0x65, 0x61, 0x6e, 0x20, 0x6b, 0x69, 0x6e, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x50,
-0x61, 0x70, 0x75, 0x61, 0x20, 0x4e, 0x65, 0x77, 0x20, 0x47, 0x75, 0x69, 0x6e, 0x65, 0x61, 0x6e, 0x20, 0x6b, 0x69, 0x6e,
-0x61, 0x3b, 0x50, 0x68, 0x69, 0x6c, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x65, 0x20, 0x50, 0x65, 0x73, 0x6f, 0x3b, 0x3b, 0x50,
-0x68, 0x69, 0x6c, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x65, 0x20, 0x70, 0x65, 0x73, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x50, 0x68,
-0x69, 0x6c, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x65, 0x20, 0x70, 0x65, 0x73, 0x6f, 0x73, 0x3b, 0x52, 0x77, 0x61, 0x6e, 0x64,
-0x61, 0x6e, 0x20, 0x46, 0x72, 0x61, 0x6e, 0x63, 0x3b, 0x3b, 0x52, 0x77, 0x61, 0x6e, 0x64, 0x61, 0x6e, 0x20, 0x66, 0x72,
-0x61, 0x6e, 0x63, 0x3b, 0x3b, 0x3b, 0x3b, 0x52, 0x77, 0x61, 0x6e, 0x64, 0x61, 0x6e, 0x20, 0x66, 0x72, 0x61, 0x6e, 0x63,
-0x73, 0x3b, 0x53, 0x61, 0x6d, 0x6f, 0x61, 0x6e, 0x20, 0x54, 0x61, 0x6c, 0x61, 0x3b, 0x3b, 0x53, 0x61, 0x6d, 0x6f, 0x61,
-0x6e, 0x20, 0x74, 0x61, 0x6c, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x61, 0x6d, 0x6f, 0x61, 0x6e, 0x20, 0x74, 0x61, 0x6c,
-0x61, 0x3b, 0x53, 0x65, 0x79, 0x63, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x69, 0x73, 0x20, 0x52, 0x75, 0x70, 0x65, 0x65, 0x3b,
-0x3b, 0x53, 0x65, 0x79, 0x63, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x69, 0x73, 0x20, 0x72, 0x75, 0x70, 0x65, 0x65, 0x3b, 0x3b,
-0x3b, 0x3b, 0x53, 0x65, 0x79, 0x63, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x69, 0x73, 0x20, 0x72, 0x75, 0x70, 0x65, 0x65, 0x73,
-0x3b, 0x53, 0x69, 0x65, 0x72, 0x72, 0x61, 0x20, 0x4c, 0x65, 0x6f, 0x6e, 0x65, 0x61, 0x6e, 0x20, 0x4c, 0x65, 0x6f, 0x6e,
-0x65, 0x3b, 0x3b, 0x53, 0x69, 0x65, 0x72, 0x72, 0x61, 0x20, 0x4c, 0x65, 0x6f, 0x6e, 0x65, 0x61, 0x6e, 0x20, 0x6c, 0x65,
-0x6f, 0x6e, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x69, 0x65, 0x72, 0x72, 0x61, 0x20, 0x4c, 0x65, 0x6f, 0x6e, 0x65, 0x61,
-0x6e, 0x20, 0x6c, 0x65, 0x6f, 0x6e, 0x65, 0x73, 0x3b, 0x53, 0x69, 0x6e, 0x67, 0x61, 0x70, 0x6f, 0x72, 0x65, 0x20, 0x44,
-0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x53, 0x69, 0x6e, 0x67, 0x61, 0x70, 0x6f, 0x72, 0x65, 0x20, 0x64, 0x6f, 0x6c,
-0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x69, 0x6e, 0x67, 0x61, 0x70, 0x6f, 0x72, 0x65, 0x20, 0x64, 0x6f, 0x6c,
-0x6c, 0x61, 0x72, 0x73, 0x3b, 0x53, 0x6f, 0x6c, 0x6f, 0x6d, 0x6f, 0x6e, 0x20, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73,
-0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x53, 0x6f, 0x6c, 0x6f, 0x6d, 0x6f, 0x6e, 0x20, 0x49, 0x73, 0x6c,
-0x61, 0x6e, 0x64, 0x73, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x6f, 0x6c, 0x6f, 0x6d,
-0x6f, 0x6e, 0x20, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x53,
-0x74, 0x2e, 0x20, 0x48, 0x65, 0x6c, 0x65, 0x6e, 0x61, 0x20, 0x50, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x3b, 0x53, 0x74, 0x2e,
-0x20, 0x48, 0x65, 0x6c, 0x65, 0x6e, 0x61, 0x20, 0x70, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x74, 0x2e,
-0x20, 0x48, 0x65, 0x6c, 0x65, 0x6e, 0x61, 0x20, 0x70, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x3b, 0x53, 0x75, 0x64, 0x61, 0x6e,
-0x65, 0x73, 0x65, 0x20, 0x50, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x3b, 0x53, 0x75, 0x64, 0x61, 0x6e, 0x65, 0x73, 0x65, 0x20,
-0x70, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x75, 0x64, 0x61, 0x6e, 0x65, 0x73, 0x65, 0x20, 0x70, 0x6f,
-0x75, 0x6e, 0x64, 0x73, 0x3b, 0x53, 0x77, 0x61, 0x7a, 0x69, 0x20, 0x4c, 0x69, 0x6c, 0x61, 0x6e, 0x67, 0x65, 0x6e, 0x69,
-0x3b, 0x3b, 0x53, 0x77, 0x61, 0x7a, 0x69, 0x20, 0x6c, 0x69, 0x6c, 0x61, 0x6e, 0x67, 0x65, 0x6e, 0x69, 0x3b, 0x3b, 0x3b,
-0x3b, 0x53, 0x77, 0x61, 0x7a, 0x69, 0x20, 0x65, 0x6d, 0x61, 0x6c, 0x61, 0x6e, 0x67, 0x65, 0x6e, 0x69, 0x3b, 0x53, 0x77,
-0x65, 0x64, 0x69, 0x73, 0x68, 0x20, 0x4b, 0x72, 0x6f, 0x6e, 0x61, 0x3b, 0x3b, 0x53, 0x77, 0x65, 0x64, 0x69, 0x73, 0x68,
-0x20, 0x6b, 0x72, 0x6f, 0x6e, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x77, 0x65, 0x64, 0x69, 0x73, 0x68, 0x20, 0x6b, 0x72,
-0x6f, 0x6e, 0x6f, 0x72, 0x3b, 0x53, 0x77, 0x69, 0x73, 0x73, 0x20, 0x46, 0x72, 0x61, 0x6e, 0x63, 0x3b, 0x3b, 0x53, 0x77,
-0x69, 0x73, 0x73, 0x20, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x77, 0x69, 0x73, 0x73, 0x20, 0x66,
-0x72, 0x61, 0x6e, 0x63, 0x73, 0x3b, 0x54, 0x61, 0x6e, 0x7a, 0x61, 0x6e, 0x69, 0x61, 0x6e, 0x20, 0x53, 0x68, 0x69, 0x6c,
-0x6c, 0x69, 0x6e, 0x67, 0x3b, 0x3b, 0x54, 0x61, 0x6e, 0x7a, 0x61, 0x6e, 0x69, 0x61, 0x6e, 0x20, 0x73, 0x68, 0x69, 0x6c,
-0x6c, 0x69, 0x6e, 0x67, 0x3b, 0x3b, 0x3b, 0x3b, 0x54, 0x61, 0x6e, 0x7a, 0x61, 0x6e, 0x69, 0x61, 0x6e, 0x20, 0x73, 0x68,
-0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x73, 0x3b, 0x54, 0x6f, 0x6e, 0x67, 0x61, 0x6e, 0x20, 0x50, 0x61, 0x2bb, 0x61, 0x6e,
-0x67, 0x61, 0x3b, 0x3b, 0x54, 0x6f, 0x6e, 0x67, 0x61, 0x6e, 0x20, 0x70, 0x61, 0x2bb, 0x61, 0x6e, 0x67, 0x61, 0x3b, 0x3b,
-0x3b, 0x3b, 0x54, 0x6f, 0x6e, 0x67, 0x61, 0x6e, 0x20, 0x70, 0x61, 0x2bb, 0x61, 0x6e, 0x67, 0x61, 0x3b, 0x54, 0x72, 0x69,
-0x6e, 0x69, 0x64, 0x61, 0x64, 0x20, 0x26, 0x20, 0x54, 0x6f, 0x62, 0x61, 0x67, 0x6f, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61,
-0x72, 0x3b, 0x3b, 0x54, 0x72, 0x69, 0x6e, 0x69, 0x64, 0x61, 0x64, 0x20, 0x26, 0x20, 0x54, 0x6f, 0x62, 0x61, 0x67, 0x6f,
-0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x54, 0x72, 0x69, 0x6e, 0x69, 0x64, 0x61, 0x64, 0x20,
-0x26, 0x20, 0x54, 0x6f, 0x62, 0x61, 0x67, 0x6f, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x55, 0x67, 0x61,
-0x6e, 0x64, 0x61, 0x6e, 0x20, 0x53, 0x68, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x3b, 0x3b, 0x55, 0x67, 0x61, 0x6e, 0x64,
-0x61, 0x6e, 0x20, 0x73, 0x68, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x3b, 0x3b, 0x3b, 0x3b, 0x55, 0x67, 0x61, 0x6e, 0x64,
-0x61, 0x6e, 0x20, 0x73, 0x68, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x73, 0x3b, 0x42, 0x72, 0x69, 0x74, 0x69, 0x73, 0x68,
-0x20, 0x50, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x3b, 0x42, 0x72, 0x69, 0x74, 0x69, 0x73, 0x68, 0x20, 0x70, 0x6f, 0x75, 0x6e,
-0x64, 0x3b, 0x3b, 0x3b, 0x3b, 0x42, 0x72, 0x69, 0x74, 0x69, 0x73, 0x68, 0x20, 0x70, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x3b,
-0x56, 0x61, 0x6e, 0x75, 0x61, 0x74, 0x75, 0x20, 0x56, 0x61, 0x74, 0x75, 0x3b, 0x3b, 0x56, 0x61, 0x6e, 0x75, 0x61, 0x74,
-0x75, 0x20, 0x76, 0x61, 0x74, 0x75, 0x3b, 0x3b, 0x3b, 0x3b, 0x56, 0x61, 0x6e, 0x75, 0x61, 0x74, 0x75, 0x20, 0x76, 0x61,
-0x74, 0x75, 0x73, 0x3b, 0x5a, 0x61, 0x6d, 0x62, 0x69, 0x61, 0x6e, 0x20, 0x4b, 0x77, 0x61, 0x63, 0x68, 0x61, 0x3b, 0x3b,
-0x5a, 0x61, 0x6d, 0x62, 0x69, 0x61, 0x6e, 0x20, 0x6b, 0x77, 0x61, 0x63, 0x68, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x5a, 0x61,
-0x6d, 0x62, 0x69, 0x61, 0x6e, 0x20, 0x6b, 0x77, 0x61, 0x63, 0x68, 0x61, 0x73, 0x3b, 0x53, 0x6f, 0x75, 0x74, 0x68, 0x20,
-0x53, 0x75, 0x64, 0x61, 0x6e, 0x65, 0x73, 0x65, 0x20, 0x50, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x3b, 0x53, 0x6f, 0x75, 0x74,
-0x68, 0x20, 0x53, 0x75, 0x64, 0x61, 0x6e, 0x65, 0x73, 0x65, 0x20, 0x70, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x3b, 0x3b, 0x3b,
-0x53, 0x6f, 0x75, 0x74, 0x68, 0x20, 0x53, 0x75, 0x64, 0x61, 0x6e, 0x65, 0x73, 0x65, 0x20, 0x70, 0x6f, 0x75, 0x6e, 0x64,
-0x73, 0x3b, 0x4e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x20, 0x41, 0x6e, 0x74, 0x69, 0x6c, 0x6c,
-0x65, 0x61, 0x6e, 0x20, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x3b, 0x3b, 0x4e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6c,
-0x61, 0x6e, 0x64, 0x73, 0x20, 0x41, 0x6e, 0x74, 0x69, 0x6c, 0x6c, 0x65, 0x61, 0x6e, 0x20, 0x67, 0x75, 0x69, 0x6c, 0x64,
-0x65, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x4e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x20, 0x41, 0x6e,
-0x74, 0x69, 0x6c, 0x6c, 0x65, 0x61, 0x6e, 0x20, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x3b, 0x65, 0x75, 0x72,
-0x6f, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x74, 0x3b, 0x64, 0x6f, 0x6e,
-0x73, 0x6b, 0x20, 0x6b, 0x72, 0xf3, 0x6e, 0x61, 0x3b, 0x3b, 0x64, 0x6f, 0x6e, 0x73, 0x6b, 0x20, 0x6b, 0x72, 0xf3, 0x6e,
-0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x64, 0x61, 0x6e, 0x73, 0x6b, 0x61, 0x72, 0x20, 0x6b, 0x72, 0xf3, 0x6e, 0x75, 0x72, 0x3b,
-0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x61, 0x3b,
-0x64, 0x69, 0x6e, 0x61, 0x72, 0x20, 0x61, 0x6c, 0x67, 0xe9, 0x72, 0x69, 0x65, 0x6e, 0x3b, 0x3b, 0x64, 0x69, 0x6e, 0x61,
-0x72, 0x20, 0x61, 0x6c, 0x67, 0xe9, 0x72, 0x69, 0x65, 0x6e, 0x3b, 0x3b, 0x3b, 0x3b, 0x64, 0x69, 0x6e, 0x61, 0x72, 0x73,
-0x20, 0x61, 0x6c, 0x67, 0xe9, 0x72, 0x69, 0x65, 0x6e, 0x73, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x43, 0x46, 0x41,
-0x20, 0x28, 0x42, 0x43, 0x45, 0x41, 0x4f, 0x29, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x43, 0x46, 0x41, 0x20,
-0x28, 0x42, 0x43, 0x45, 0x41, 0x4f, 0x29, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x73, 0x20, 0x43, 0x46,
-0x41, 0x20, 0x28, 0x42, 0x43, 0x45, 0x41, 0x4f, 0x29, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x62, 0x75, 0x72, 0x75,
-0x6e, 0x64, 0x61, 0x69, 0x73, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x62, 0x75, 0x72, 0x75, 0x6e, 0x64, 0x61,
-0x69, 0x73, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x73, 0x20, 0x62, 0x75, 0x72, 0x75, 0x6e, 0x64, 0x61,
-0x69, 0x73, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x43, 0x46, 0x41, 0x20, 0x28, 0x42, 0x45, 0x41, 0x43, 0x29, 0x3b,
-0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x43, 0x46, 0x41, 0x20, 0x28, 0x42, 0x45, 0x41, 0x43, 0x29, 0x3b, 0x3b, 0x3b,
-0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x73, 0x20, 0x43, 0x46, 0x41, 0x20, 0x28, 0x42, 0x45, 0x41, 0x43, 0x29, 0x3b, 0x64,
-0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x20, 0x63, 0x61, 0x6e, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x3b, 0x3b, 0x64, 0x6f, 0x6c, 0x6c,
-0x61, 0x72, 0x20, 0x63, 0x61, 0x6e, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x3b, 0x3b, 0x3b, 0x3b, 0x64, 0x6f, 0x6c, 0x6c, 0x61,
-0x72, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x73, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x63,
-0x6f, 0x6d, 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x63, 0x6f, 0x6d, 0x6f, 0x72,
-0x69, 0x65, 0x6e, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x73, 0x20, 0x63, 0x6f, 0x6d, 0x6f, 0x72, 0x69,
-0x65, 0x6e, 0x73, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x63, 0x6f, 0x6e, 0x67, 0x6f, 0x6c, 0x61, 0x69, 0x73, 0x3b,
-0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x63, 0x6f, 0x6e, 0x67, 0x6f, 0x6c, 0x61, 0x69, 0x73, 0x3b, 0x3b, 0x3b, 0x3b,
-0x66, 0x72, 0x61, 0x6e, 0x63, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x67, 0x6f, 0x6c, 0x61, 0x69, 0x73, 0x3b, 0x66, 0x72, 0x61,
-0x6e, 0x63, 0x20, 0x64, 0x6a, 0x69, 0x62, 0x6f, 0x75, 0x74, 0x69, 0x65, 0x6e, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63,
-0x20, 0x64, 0x6a, 0x69, 0x62, 0x6f, 0x75, 0x74, 0x69, 0x65, 0x6e, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63,
-0x73, 0x20, 0x64, 0x6a, 0x69, 0x62, 0x6f, 0x75, 0x74, 0x69, 0x65, 0x6e, 0x73, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20,
-0x43, 0x46, 0x50, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x43, 0x46, 0x50, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72,
-0x61, 0x6e, 0x63, 0x73, 0x20, 0x43, 0x46, 0x50, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x67, 0x75, 0x69, 0x6e, 0xe9,
-0x65, 0x6e, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x67, 0x75, 0x69, 0x6e, 0xe9, 0x65, 0x6e, 0x3b, 0x3b, 0x3b,
-0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x73, 0x20, 0x67, 0x75, 0x69, 0x6e, 0xe9, 0x65, 0x6e, 0x73, 0x3b, 0x67, 0x6f, 0x75,
-0x72, 0x64, 0x65, 0x20, 0x68, 0x61, 0xef, 0x74, 0x69, 0x65, 0x6e, 0x6e, 0x65, 0x3b, 0x3b, 0x67, 0x6f, 0x75, 0x72, 0x64,
-0x65, 0x20, 0x68, 0x61, 0xef, 0x74, 0x69, 0x65, 0x6e, 0x6e, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x67, 0x6f, 0x75, 0x72, 0x64,
-0x65, 0x73, 0x20, 0x68, 0x61, 0xef, 0x74, 0x69, 0x65, 0x6e, 0x6e, 0x65, 0x73, 0x3b, 0x61, 0x72, 0x69, 0x61, 0x72, 0x79,
-0x20, 0x6d, 0x61, 0x6c, 0x67, 0x61, 0x63, 0x68, 0x65, 0x3b, 0x3b, 0x61, 0x72, 0x69, 0x61, 0x72, 0x79, 0x20, 0x6d, 0x61,
-0x6c, 0x67, 0x61, 0x63, 0x68, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x61, 0x72, 0x69, 0x61, 0x72, 0x79, 0x73, 0x20, 0x6d, 0x61,
-0x6c, 0x67, 0x61, 0x63, 0x68, 0x65, 0x73, 0x3b, 0x6f, 0x75, 0x67, 0x75, 0x69, 0x79, 0x61, 0x20, 0x6d, 0x61, 0x75, 0x72,
-0x69, 0x74, 0x61, 0x6e, 0x69, 0x65, 0x6e, 0x3b, 0x3b, 0x6f, 0x75, 0x67, 0x75, 0x69, 0x79, 0x61, 0x20, 0x6d, 0x61, 0x75,
-0x72, 0x69, 0x74, 0x61, 0x6e, 0x69, 0x65, 0x6e, 0x3b, 0x3b, 0x3b, 0x3b, 0x6f, 0x75, 0x67, 0x75, 0x69, 0x79, 0x61, 0x73,
-0x20, 0x6d, 0x61, 0x75, 0x72, 0x69, 0x74, 0x61, 0x6e, 0x69, 0x65, 0x6e, 0x73, 0x3b, 0x72, 0x6f, 0x75, 0x70, 0x69, 0x65,
-0x20, 0x6d, 0x61, 0x75, 0x72, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x6e, 0x65, 0x3b, 0x3b, 0x72, 0x6f, 0x75, 0x70, 0x69, 0x65,
-0x20, 0x6d, 0x61, 0x75, 0x72, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x6e, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x72, 0x6f, 0x75, 0x70,
-0x69, 0x65, 0x73, 0x20, 0x6d, 0x61, 0x75, 0x72, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x6e, 0x65, 0x73, 0x3b, 0x64, 0x69, 0x72,
-0x68, 0x61, 0x6d, 0x20, 0x6d, 0x61, 0x72, 0x6f, 0x63, 0x61, 0x69, 0x6e, 0x3b, 0x3b, 0x64, 0x69, 0x72, 0x68, 0x61, 0x6d,
-0x20, 0x6d, 0x61, 0x72, 0x6f, 0x63, 0x61, 0x69, 0x6e, 0x3b, 0x3b, 0x3b, 0x3b, 0x64, 0x69, 0x72, 0x68, 0x61, 0x6d, 0x73,
-0x20, 0x6d, 0x61, 0x72, 0x6f, 0x63, 0x61, 0x69, 0x6e, 0x73, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x72, 0x77, 0x61,
-0x6e, 0x64, 0x61, 0x69, 0x73, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x72, 0x77, 0x61, 0x6e, 0x64, 0x61, 0x69,
-0x73, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x73, 0x20, 0x72, 0x77, 0x61, 0x6e, 0x64, 0x61, 0x69, 0x73,
-0x3b, 0x72, 0x6f, 0x75, 0x70, 0x69, 0x65, 0x20, 0x64, 0x65, 0x73, 0x20, 0x53, 0x65, 0x79, 0x63, 0x68, 0x65, 0x6c, 0x6c,
-0x65, 0x73, 0x3b, 0x3b, 0x72, 0x6f, 0x75, 0x70, 0x69, 0x65, 0x20, 0x64, 0x65, 0x73, 0x20, 0x53, 0x65, 0x79, 0x63, 0x68,
-0x65, 0x6c, 0x6c, 0x65, 0x73, 0x3b, 0x3b, 0x3b, 0x3b, 0x72, 0x6f, 0x75, 0x70, 0x69, 0x65, 0x73, 0x20, 0x64, 0x65, 0x73,
-0x20, 0x53, 0x65, 0x79, 0x63, 0x68, 0x65, 0x6c, 0x6c, 0x65, 0x73, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x73, 0x75,
-0x69, 0x73, 0x73, 0x65, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x73, 0x75, 0x69, 0x73, 0x73, 0x65, 0x3b, 0x3b,
-0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x73, 0x20, 0x73, 0x75, 0x69, 0x73, 0x73, 0x65, 0x73, 0x3b, 0x6c, 0x69, 0x76,
-0x72, 0x65, 0x20, 0x73, 0x79, 0x72, 0x69, 0x65, 0x6e, 0x6e, 0x65, 0x3b, 0x3b, 0x6c, 0x69, 0x76, 0x72, 0x65, 0x20, 0x73,
-0x79, 0x72, 0x69, 0x65, 0x6e, 0x6e, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x6c, 0x69, 0x76, 0x72, 0x65, 0x73, 0x20, 0x73, 0x79,
-0x72, 0x69, 0x65, 0x6e, 0x6e, 0x65, 0x73, 0x3b, 0x64, 0x69, 0x6e, 0x61, 0x72, 0x20, 0x74, 0x75, 0x6e, 0x69, 0x73, 0x69,
-0x65, 0x6e, 0x3b, 0x3b, 0x64, 0x69, 0x6e, 0x61, 0x72, 0x20, 0x74, 0x75, 0x6e, 0x69, 0x73, 0x69, 0x65, 0x6e, 0x3b, 0x3b,
-0x3b, 0x3b, 0x64, 0x69, 0x6e, 0x61, 0x72, 0x73, 0x20, 0x74, 0x75, 0x6e, 0x69, 0x73, 0x69, 0x65, 0x6e, 0x73, 0x3b, 0x76,
-0x61, 0x74, 0x75, 0x20, 0x76, 0x61, 0x6e, 0x75, 0x61, 0x74, 0x75, 0x61, 0x6e, 0x3b, 0x3b, 0x76, 0x61, 0x74, 0x75, 0x20,
-0x76, 0x61, 0x6e, 0x75, 0x61, 0x74, 0x75, 0x61, 0x6e, 0x3b, 0x3b, 0x3b, 0x3b, 0x76, 0x61, 0x74, 0x75, 0x73, 0x20, 0x76,
-0x61, 0x6e, 0x75, 0x61, 0x74, 0x75, 0x61, 0x6e, 0x73, 0x3b, 0x50, 0x75, 0x6e, 0x6e, 0x64, 0x20, 0x53, 0x61, 0x73, 0x61,
-0x6e, 0x6e, 0x61, 0x63, 0x68, 0x3b, 0x3b, 0x70, 0x68, 0x75, 0x6e, 0x6e, 0x64, 0x20, 0x53, 0x61, 0x73, 0x61, 0x6e, 0x6e,
-0x61, 0x63, 0x68, 0x3b, 0x70, 0x68, 0x75, 0x6e, 0x6e, 0x64, 0x20, 0x53, 0x61, 0x73, 0x61, 0x6e, 0x6e, 0x61, 0x63, 0x68,
-0x3b, 0x70, 0x75, 0x69, 0x6e, 0x6e, 0x64, 0x20, 0x53, 0x68, 0x61, 0x73, 0x61, 0x6e, 0x6e, 0x61, 0x63, 0x68, 0x3b, 0x3b,
-0x70, 0x75, 0x6e, 0x6e, 0x64, 0x20, 0x53, 0x61, 0x73, 0x61, 0x6e, 0x6e, 0x61, 0x63, 0x68, 0x3b, 0x10e5, 0x10d0, 0x10e0, 0x10d7,
-0x10e3, 0x10da, 0x10d8, 0x20, 0x10da, 0x10d0, 0x10e0, 0x10d8, 0x3b, 0x3b, 0x10e5, 0x10d0, 0x10e0, 0x10d7, 0x10e3, 0x10da, 0x10d8, 0x20, 0x10da, 0x10d0,
-0x10e0, 0x10d8, 0x3b, 0x3b, 0x3b, 0x3b, 0x10e5, 0x10d0, 0x10e0, 0x10d7, 0x10e3, 0x10da, 0x10d8, 0x20, 0x10da, 0x10d0, 0x10e0, 0x10d8, 0x3b, 0x45,
-0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x45, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x45, 0x75, 0x72, 0x6f, 0x3b, 0x53, 0x63,
-0x68, 0x77, 0x65, 0x69, 0x7a, 0x65, 0x72, 0x20, 0x46, 0x72, 0x61, 0x6e, 0x6b, 0x65, 0x6e, 0x3b, 0x3b, 0x53, 0x63, 0x68,
-0x77, 0x65, 0x69, 0x7a, 0x65, 0x72, 0x20, 0x46, 0x72, 0x61, 0x6e, 0x6b, 0x65, 0x6e, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x63,
-0x68, 0x77, 0x65, 0x69, 0x7a, 0x65, 0x72, 0x20, 0x46, 0x72, 0x61, 0x6e, 0x6b, 0x65, 0x6e, 0x3b, 0x395, 0x3c5, 0x3c1, 0x3ce,
-0x3b, 0x3b, 0x3b5, 0x3c5, 0x3c1, 0x3ce, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b5, 0x3c5, 0x3c1, 0x3ce, 0x3b, 0x64, 0x61, 0x6e, 0x6d, 0x61,
-0x72, 0x6b, 0x69, 0x6d, 0x75, 0x74, 0x20, 0x6b, 0x6f, 0x72, 0x75, 0x75, 0x6e, 0x69, 0x3b, 0x3b, 0x64, 0x61, 0x6e, 0x73,
-0x6b, 0x69, 0x6e, 0x75, 0x74, 0x20, 0x6b, 0x6f, 0x72, 0x75, 0x75, 0x6e, 0x69, 0x3b, 0x3b, 0x3b, 0x3b, 0x64, 0x61, 0x6e,
-0x6d, 0x61, 0x72, 0x6b, 0x69, 0x6d, 0x75, 0x74, 0x20, 0x6b, 0x6f, 0x72, 0x75, 0x75, 0x6e, 0x69, 0x3b, 0xaad, 0xabe, 0xab0,
-0xaa4, 0xac0, 0xaaf, 0x20, 0xab0, 0xac2, 0xaaa, 0xabf, 0xaaf, 0xabe, 0x3b, 0x3b, 0xaad, 0xabe, 0xab0, 0xaa4, 0xac0, 0xaaf, 0x20, 0xab0,
-0xac2, 0xaaa, 0xabf, 0xaaf, 0xabe, 0x3b, 0x3b, 0x3b, 0x3b, 0xaad, 0xabe, 0xab0, 0xaa4, 0xac0, 0xaaf, 0x20, 0xab0, 0xac2, 0xaaa, 0xabf,
-0xaaf, 0xabe, 0x3b, 0x4e, 0x61, 0x69, 0x72, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x4b, 0x75, 0x257, 0x69, 0x6e,
-0x20, 0x53, 0x65, 0x66, 0x61, 0x20, 0x6e, 0x61, 0x20, 0x41, 0x66, 0x69, 0x72, 0x6b, 0x61, 0x20, 0x54, 0x61, 0x20, 0x59,
-0x61, 0x6d, 0x6d, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x5e9, 0x5e7, 0x5dc, 0x20, 0x5d7, 0x5d3, 0x5e9, 0x3b, 0x3b,
-0x5e9, 0x5e7, 0x5dc, 0x20, 0x5d7, 0x5d3, 0x5e9, 0x3b, 0x5e9, 0x5e7, 0x5dc, 0x5d9, 0x5dd, 0x20, 0x5d7, 0x5d3, 0x5e9, 0x5d9, 0x5dd, 0x3b,
-0x3b, 0x5e9, 0x5e7, 0x5dc, 0x5d9, 0x5dd, 0x20, 0x5d7, 0x5d3, 0x5e9, 0x5d9, 0x5dd, 0x3b, 0x5e9, 0x5e7, 0x5dc, 0x5d9, 0x5dd, 0x20, 0x5d7,
-0x5d3, 0x5e9, 0x5d9, 0x5dd, 0x3b, 0x92d, 0x93e, 0x930, 0x924, 0x940, 0x92f, 0x20, 0x930, 0x941, 0x92a, 0x92f, 0x93e, 0x3b, 0x3b, 0x92d,
-0x93e, 0x930, 0x924, 0x940, 0x92f, 0x20, 0x930, 0x941, 0x92a, 0x92f, 0x93e, 0x3b, 0x3b, 0x3b, 0x3b, 0x92d, 0x93e, 0x930, 0x924, 0x940,
-0x92f, 0x20, 0x930, 0x942, 0x92a, 0x90f, 0x3b, 0x6d, 0x61, 0x67, 0x79, 0x61, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x69, 0x6e, 0x74,
-0x3b, 0x3b, 0x6d, 0x61, 0x67, 0x79, 0x61, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x69, 0x6e, 0x74, 0x3b, 0x3b, 0x3b, 0x3b, 0x6d,
-0x61, 0x67, 0x79, 0x61, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x69, 0x6e, 0x74, 0x3b, 0xed, 0x73, 0x6c, 0x65, 0x6e, 0x73, 0x6b,
-0x20, 0x6b, 0x72, 0xf3, 0x6e, 0x61, 0x3b, 0x3b, 0xed, 0x73, 0x6c, 0x65, 0x6e, 0x73, 0x6b, 0x20, 0x6b, 0x72, 0xf3, 0x6e,
-0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0xed, 0x73, 0x6c, 0x65, 0x6e, 0x73, 0x6b, 0x61, 0x72, 0x20, 0x6b, 0x72, 0xf3, 0x6e, 0x75,
-0x72, 0x3b, 0x52, 0x75, 0x70, 0x69, 0x61, 0x68, 0x20, 0x49, 0x6e, 0x64, 0x6f, 0x6e, 0x65, 0x73, 0x69, 0x61, 0x3b, 0x3b,
-0x3b, 0x3b, 0x3b, 0x3b, 0x52, 0x75, 0x70, 0x69, 0x61, 0x68, 0x20, 0x49, 0x6e, 0x64, 0x6f, 0x6e, 0x65, 0x73, 0x69, 0x61,
-0x3b, 0x45, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x65, 0x75, 0x72,
-0x6f, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x75,
-0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x6f, 0x20, 0x73, 0x76,
-0x69, 0x7a, 0x7a, 0x65, 0x72, 0x6f, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x6f, 0x20, 0x73, 0x76, 0x69, 0x7a, 0x7a,
-0x65, 0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x69, 0x20, 0x73, 0x76, 0x69, 0x7a, 0x7a,
-0x65, 0x72, 0x69, 0x3b, 0x65e5, 0x672c, 0x5186, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x5186, 0x3b, 0xcad, 0xcbe, 0xcb0, 0xca4, 0xcc0,
-0xcaf, 0x20, 0xcb0, 0xcc2, 0xcaa, 0xcbe, 0xcaf, 0xcbf, 0x3b, 0x3b, 0xcad, 0xcbe, 0xcb0, 0xca4, 0xcc0, 0xcaf, 0x20, 0xcb0, 0xcc2, 0xcaa,
-0xcbe, 0xcaf, 0xcbf, 0x3b, 0x3b, 0x3b, 0x3b, 0xcad, 0xcbe, 0xcb0, 0xca4, 0xcc0, 0xcaf, 0x20, 0xcb0, 0xcc2, 0xcaa, 0xcbe, 0xcaf, 0xcbf,
-0xc97, 0xcb3, 0xcc1, 0x3b, 0x6c1, 0x650, 0x646, 0x62f, 0x64f, 0x633, 0x62a, 0x672, 0x646, 0x6cd, 0x20, 0x631, 0x6c4, 0x67e, 0x64e, 0x6d2,
-0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x49a, 0x430, 0x437, 0x430, 0x49b, 0x441, 0x442, 0x430, 0x43d, 0x20, 0x442, 0x435, 0x4a3,
-0x433, 0x435, 0x441, 0x456, 0x3b, 0x3b, 0x49a, 0x430, 0x437, 0x430, 0x49b, 0x441, 0x442, 0x430, 0x43d, 0x20, 0x442, 0x435, 0x4a3, 0x433,
-0x435, 0x441, 0x456, 0x3b, 0x3b, 0x3b, 0x3b, 0x49a, 0x430, 0x437, 0x430, 0x49b, 0x441, 0x442, 0x430, 0x43d, 0x20, 0x442, 0x435, 0x4a3,
-0x433, 0x435, 0x441, 0x456, 0x3b, 0x41a, 0x44b, 0x440, 0x433, 0x44b, 0x437, 0x441, 0x442, 0x430, 0x43d, 0x20, 0x441, 0x43e, 0x43c, 0x443,
-0x3b, 0x3b, 0x41a, 0x44b, 0x440, 0x433, 0x44b, 0x437, 0x441, 0x442, 0x430, 0x43d, 0x20, 0x441, 0x43e, 0x43c, 0x443, 0x3b, 0x3b, 0x3b,
-0x3b, 0x41a, 0x44b, 0x440, 0x433, 0x44b, 0x437, 0x441, 0x442, 0x430, 0x43d, 0x20, 0x441, 0x43e, 0x43c, 0x443, 0x3b, 0xb300, 0xd55c, 0xbbfc,
-0xad6d, 0x20, 0xc6d0, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0xb300, 0xd55c, 0xbbfc, 0xad6d, 0x20, 0xc6d0, 0x3b, 0xc870, 0xc120, 0x20, 0xbbfc,
-0xc8fc, 0xc8fc, 0xc758, 0x20, 0xc778, 0xbbfc, 0x20, 0xacf5, 0xd654, 0xad6d, 0x20, 0xc6d0, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0xc870, 0xc120,
-0x20, 0xbbfc, 0xc8fc, 0xc8fc, 0xc758, 0x20, 0xc778, 0xbbfc, 0x20, 0xacf5, 0xd654, 0xad6d, 0x20, 0xc6d0, 0x3b, 0x49, 0x66, 0x61, 0x72, 0x61,
-0x6e, 0x67, 0x61, 0x20, 0x72, 0x79, 0x2019, 0x55, 0x62, 0x75, 0x72, 0x75, 0x6e, 0x64, 0x69, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
-0x3b, 0x3b, 0xea5, 0xeb2, 0xea7, 0x20, 0xe81, 0xeb5, 0xe9a, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0xea5, 0xeb2, 0xea7, 0x20, 0xe81,
-0xeb5, 0xe9a, 0x3b, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x3b, 0x3b,
-0x3b, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x46, 0x61, 0x6c, 0xe1, 0x6e, 0x67, 0x61, 0x20, 0x79, 0x61, 0x20, 0x4b, 0x6f, 0x6e,
-0x67, 0xf3, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x4b, 0x77, 0x61, 0x6e, 0x7a, 0x61, 0x20, 0x79, 0x61, 0x20, 0x41,
-0x6e, 0x67, 0xf3, 0x6c, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x46, 0x61, 0x6c, 0xe1, 0x6e, 0x67, 0x61, 0x20,
-0x43, 0x46, 0x41, 0x20, 0x42, 0x45, 0x41, 0x43, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x45, 0x75, 0x72, 0x61, 0x73,
-0x3b, 0x3b, 0x65, 0x75, 0x72, 0x61, 0x73, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x61, 0x69, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b,
-0x65, 0x75, 0x72, 0x173, 0x3b, 0x41c, 0x430, 0x43a, 0x435, 0x434, 0x43e, 0x43d, 0x441, 0x43a, 0x438, 0x20, 0x434, 0x435, 0x43d, 0x430,
-0x440, 0x3b, 0x3b, 0x41c, 0x430, 0x43a, 0x435, 0x434, 0x43e, 0x43d, 0x441, 0x43a, 0x438, 0x20, 0x434, 0x435, 0x43d, 0x430, 0x440, 0x3b,
-0x3b, 0x3b, 0x3b, 0x41c, 0x430, 0x43a, 0x435, 0x434, 0x43e, 0x43d, 0x441, 0x43a, 0x438, 0x20, 0x434, 0x435, 0x43d, 0x430, 0x440, 0x438,
-0x3b, 0x41, 0x72, 0x69, 0x61, 0x72, 0x79, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x52, 0x69, 0x6e, 0x67, 0x67, 0x69,
-0x74, 0x20, 0x4d, 0x61, 0x6c, 0x61, 0x79, 0x73, 0x69, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x52, 0x69, 0x6e, 0x67,
-0x67, 0x69, 0x74, 0x20, 0x4d, 0x61, 0x6c, 0x61, 0x79, 0x73, 0x69, 0x61, 0x3b, 0x44, 0x6f, 0x6c, 0x61, 0x72, 0x20, 0x42,
-0x72, 0x75, 0x6e, 0x65, 0x69, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x44, 0x6f, 0x6c, 0x61, 0x72, 0x20, 0x42, 0x72, 0x75,
-0x6e, 0x65, 0x69, 0x3b, 0x44, 0x6f, 0x6c, 0x61, 0x72, 0x20, 0x53, 0x69, 0x6e, 0x67, 0x61, 0x70, 0x75, 0x72, 0x61, 0x3b,
-0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x44, 0x6f, 0x6c, 0x61, 0x72, 0x20, 0x53, 0x69, 0x6e, 0x67, 0x61, 0x70, 0x75, 0x72, 0x61,
-0x3b, 0xd07, 0xd28, 0xd4d, 0xd24, 0xd4d, 0xd2f, 0xd7b, 0x20, 0xd30, 0xd42, 0xd2a, 0x3b, 0x3b, 0xd07, 0xd28, 0xd4d, 0xd24, 0xd4d, 0xd2f,
-0xd7b, 0x20, 0xd30, 0xd42, 0xd2a, 0x3b, 0x3b, 0x3b, 0x3b, 0xd07, 0xd28, 0xd4d, 0xd24, 0xd4d, 0xd2f, 0xd7b, 0x20, 0xd30, 0xd42, 0xd2a,
-0x3b, 0x65, 0x77, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x77, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x77, 0x72, 0x6f, 0x3b, 0x65, 0x77,
-0x72, 0x6f, 0x3b, 0x65, 0x77, 0x72, 0x6f, 0x3b, 0x92d, 0x93e, 0x930, 0x924, 0x940, 0x92f, 0x20, 0x930, 0x941, 0x92a, 0x92f, 0x93e,
-0x3b, 0x3b, 0x92d, 0x93e, 0x930, 0x924, 0x940, 0x92f, 0x20, 0x930, 0x941, 0x92a, 0x92f, 0x93e, 0x3b, 0x3b, 0x3b, 0x3b, 0x92d, 0x93e,
-0x930, 0x924, 0x940, 0x92f, 0x20, 0x930, 0x941, 0x92a, 0x92f, 0x947, 0x3b, 0x442, 0x4e9, 0x433, 0x440, 0x4e9, 0x433, 0x3b, 0x3b, 0x442,
-0x4e9, 0x433, 0x440, 0x4e9, 0x433, 0x3b, 0x3b, 0x3b, 0x3b, 0x442, 0x4e9, 0x433, 0x440, 0x4e9, 0x433, 0x3b, 0x928, 0x947, 0x92a, 0x93e,
-0x932, 0x940, 0x20, 0x930, 0x942, 0x92a, 0x948, 0x92f, 0x93e, 0x901, 0x3b, 0x3b, 0x928, 0x947, 0x92a, 0x93e, 0x932, 0x940, 0x20, 0x930,
-0x942, 0x92a, 0x948, 0x92f, 0x93e, 0x901, 0x3b, 0x3b, 0x3b, 0x3b, 0x928, 0x947, 0x92a, 0x93e, 0x932, 0x940, 0x20, 0x930, 0x942, 0x92a,
-0x948, 0x92f, 0x93e, 0x901, 0x3b, 0x92d, 0x93e, 0x930, 0x924, 0x940, 0x92f, 0x20, 0x930, 0x942, 0x92a, 0x93f, 0x901, 0x92f, 0x93e, 0x3b,
-0x3b, 0x92d, 0x93e, 0x930, 0x924, 0x940, 0x92f, 0x20, 0x930, 0x942, 0x92a, 0x93f, 0x901, 0x92f, 0x93e, 0x3b, 0x3b, 0x3b, 0x3b, 0x92d,
-0x93e, 0x930, 0x924, 0x940, 0x92f, 0x20, 0x930, 0x942, 0x92a, 0x93f, 0x901, 0x92f, 0x93e, 0x3b, 0x6e, 0x6f, 0x72, 0x73, 0x6b, 0x65,
-0x20, 0x6b, 0x72, 0x6f, 0x6e, 0x65, 0x72, 0x3b, 0x3b, 0x6e, 0x6f, 0x72, 0x73, 0x6b, 0x20, 0x6b, 0x72, 0x6f, 0x6e, 0x65,
-0x3b, 0x3b, 0x3b, 0x3b, 0x6e, 0x6f, 0x72, 0x73, 0x6b, 0x65, 0x20, 0x6b, 0x72, 0x6f, 0x6e, 0x65, 0x72, 0x3b, 0xb1f, 0xb19,
-0xb15, 0xb3e, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x627, 0x641, 0x63a, 0x627, 0x646, 0x6cd, 0x3b, 0x3b, 0x627, 0x641, 0x63a,
-0x627, 0x646, 0x6cd, 0x3b, 0x3b, 0x3b, 0x3b, 0x627, 0x641, 0x63a, 0x627, 0x646, 0x6cd, 0x3b, 0x631, 0x6cc, 0x627, 0x644, 0x20, 0x627,
-0x6cc, 0x631, 0x627, 0x646, 0x3b, 0x3b, 0x631, 0x6cc, 0x627, 0x644, 0x20, 0x627, 0x6cc, 0x631, 0x627, 0x646, 0x3b, 0x3b, 0x3b, 0x3b,
-0x631, 0x6cc, 0x627, 0x644, 0x20, 0x627, 0x6cc, 0x631, 0x627, 0x646, 0x3b, 0x627, 0x641, 0x63a, 0x627, 0x646, 0x6cc, 0x20, 0x627, 0x641,
-0x63a, 0x627, 0x646, 0x633, 0x62a, 0x627, 0x646, 0x3b, 0x3b, 0x627, 0x641, 0x63a, 0x627, 0x646, 0x6cc, 0x20, 0x627, 0x641, 0x63a, 0x627,
-0x646, 0x633, 0x62a, 0x627, 0x646, 0x3b, 0x3b, 0x3b, 0x3b, 0x627, 0x641, 0x63a, 0x627, 0x646, 0x6cc, 0x20, 0x627, 0x641, 0x63a, 0x627,
-0x646, 0x633, 0x62a, 0x627, 0x646, 0x3b, 0x7a, 0x142, 0x6f, 0x74, 0x79, 0x20, 0x70, 0x6f, 0x6c, 0x73, 0x6b, 0x69, 0x3b, 0x3b,
-0x7a, 0x142, 0x6f, 0x74, 0x79, 0x20, 0x70, 0x6f, 0x6c, 0x73, 0x6b, 0x69, 0x3b, 0x3b, 0x7a, 0x142, 0x6f, 0x74, 0x65, 0x20,
-0x70, 0x6f, 0x6c, 0x73, 0x6b, 0x69, 0x65, 0x3b, 0x7a, 0x142, 0x6f, 0x74, 0x79, 0x63, 0x68, 0x20, 0x70, 0x6f, 0x6c, 0x73,
-0x6b, 0x69, 0x63, 0x68, 0x3b, 0x7a, 0x142, 0x6f, 0x74, 0x65, 0x67, 0x6f, 0x20, 0x70, 0x6f, 0x6c, 0x73, 0x6b, 0x69, 0x65,
-0x67, 0x6f, 0x3b, 0x52, 0x65, 0x61, 0x6c, 0x20, 0x62, 0x72, 0x61, 0x73, 0x69, 0x6c, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x3b,
-0x52, 0x65, 0x61, 0x6c, 0x20, 0x62, 0x72, 0x61, 0x73, 0x69, 0x6c, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x52,
-0x65, 0x61, 0x69, 0x73, 0x20, 0x62, 0x72, 0x61, 0x73, 0x69, 0x6c, 0x65, 0x69, 0x72, 0x6f, 0x73, 0x3b, 0x4b, 0x77, 0x61,
-0x6e, 0x7a, 0x61, 0x20, 0x61, 0x6e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x4b, 0x77, 0x61, 0x6e, 0x7a, 0x61,
-0x20, 0x61, 0x6e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x4b, 0x77, 0x61, 0x6e, 0x7a, 0x61, 0x73,
-0x20, 0x61, 0x6e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x6f, 0x73, 0x3b, 0x45, 0x73, 0x63, 0x75, 0x64, 0x6f, 0x20, 0x63, 0x61,
-0x62, 0x6f, 0x2d, 0x76, 0x65, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x45, 0x73, 0x63, 0x75, 0x64, 0x6f, 0x20,
-0x63, 0x61, 0x62, 0x6f, 0x2d, 0x76, 0x65, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x45, 0x73, 0x63,
-0x75, 0x64, 0x6f, 0x73, 0x20, 0x63, 0x61, 0x62, 0x6f, 0x2d, 0x76, 0x65, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x6f, 0x73, 0x3b,
-0x44, 0xf3, 0x6c, 0x61, 0x72, 0x20, 0x64, 0x6f, 0x73, 0x20, 0x45, 0x73, 0x74, 0x61, 0x64, 0x6f, 0x73, 0x20, 0x55, 0x6e,
-0x69, 0x64, 0x6f, 0x73, 0x3b, 0x3b, 0x44, 0xf3, 0x6c, 0x61, 0x72, 0x20, 0x64, 0x6f, 0x73, 0x20, 0x45, 0x73, 0x74, 0x61,
-0x64, 0x6f, 0x73, 0x20, 0x55, 0x6e, 0x69, 0x64, 0x6f, 0x73, 0x3b, 0x3b, 0x3b, 0x3b, 0x44, 0xf3, 0x6c, 0x61, 0x72, 0x65,
-0x73, 0x20, 0x64, 0x6f, 0x73, 0x20, 0x45, 0x73, 0x74, 0x61, 0x64, 0x6f, 0x73, 0x20, 0x55, 0x6e, 0x69, 0x64, 0x6f, 0x73,
-0x3b, 0x46, 0x72, 0x61, 0x6e, 0x63, 0x6f, 0x20, 0x43, 0x46, 0x41, 0x20, 0x28, 0x42, 0x45, 0x41, 0x43, 0x29, 0x3b, 0x3b,
-0x46, 0x72, 0x61, 0x6e, 0x63, 0x6f, 0x20, 0x43, 0x46, 0x41, 0x20, 0x28, 0x42, 0x45, 0x41, 0x43, 0x29, 0x3b, 0x3b, 0x3b,
-0x3b, 0x46, 0x72, 0x61, 0x6e, 0x63, 0x6f, 0x73, 0x20, 0x43, 0x46, 0x41, 0x20, 0x28, 0x42, 0x45, 0x41, 0x43, 0x29, 0x3b,
-0x46, 0x72, 0x61, 0x6e, 0x63, 0x6f, 0x20, 0x43, 0x46, 0x41, 0x20, 0x28, 0x42, 0x43, 0x45, 0x41, 0x4f, 0x29, 0x3b, 0x3b,
-0x46, 0x72, 0x61, 0x6e, 0x63, 0x6f, 0x20, 0x43, 0x46, 0x41, 0x20, 0x28, 0x42, 0x43, 0x45, 0x41, 0x4f, 0x29, 0x3b, 0x3b,
-0x3b, 0x3b, 0x46, 0x72, 0x61, 0x6e, 0x63, 0x6f, 0x73, 0x20, 0x43, 0x46, 0x41, 0x20, 0x28, 0x42, 0x43, 0x45, 0x41, 0x4f,
-0x29, 0x3b, 0x45, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x45, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x45, 0x75, 0x72, 0x6f,
-0x73, 0x3b, 0x50, 0x61, 0x74, 0x61, 0x63, 0x61, 0x20, 0x64, 0x65, 0x20, 0x4d, 0x61, 0x63, 0x61, 0x75, 0x3b, 0x3b, 0x50,
-0x61, 0x74, 0x61, 0x63, 0x61, 0x20, 0x64, 0x65, 0x20, 0x4d, 0x61, 0x63, 0x61, 0x75, 0x3b, 0x3b, 0x3b, 0x3b, 0x50, 0x61,
-0x74, 0x61, 0x63, 0x61, 0x73, 0x20, 0x64, 0x65, 0x20, 0x4d, 0x61, 0x63, 0x61, 0x75, 0x3b, 0x4d, 0x65, 0x74, 0x69, 0x63,
-0x61, 0x6c, 0x20, 0x64, 0x65, 0x20, 0x4d, 0x6f, 0xe7, 0x61, 0x6d, 0x62, 0x69, 0x71, 0x75, 0x65, 0x3b, 0x3b, 0x4d, 0x65,
-0x74, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x64, 0x65, 0x20, 0x4d, 0x6f, 0xe7, 0x61, 0x6d, 0x62, 0x69, 0x71, 0x75, 0x65, 0x3b,
-0x3b, 0x3b, 0x3b, 0x4d, 0x65, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x65, 0x73, 0x20, 0x64, 0x65, 0x20, 0x4d, 0x6f, 0xe7, 0x61,
-0x6d, 0x62, 0x69, 0x71, 0x75, 0x65, 0x3b, 0x44, 0x6f, 0x62, 0x72, 0x61, 0x20, 0x64, 0x65, 0x20, 0x53, 0xe3, 0x6f, 0x20,
-0x54, 0x6f, 0x6d, 0xe9, 0x20, 0x65, 0x20, 0x50, 0x72, 0xed, 0x6e, 0x63, 0x69, 0x70, 0x65, 0x3b, 0x3b, 0x44, 0x6f, 0x62,
-0x72, 0x61, 0x20, 0x64, 0x65, 0x20, 0x53, 0xe3, 0x6f, 0x20, 0x54, 0x6f, 0x6d, 0xe9, 0x20, 0x65, 0x20, 0x50, 0x72, 0xed,
-0x6e, 0x63, 0x69, 0x70, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x44, 0x6f, 0x62, 0x72, 0x61, 0x73, 0x20, 0x64, 0x65, 0x20, 0x53,
-0xe3, 0x6f, 0x20, 0x54, 0x6f, 0x6d, 0xe9, 0x20, 0x65, 0x20, 0x50, 0x72, 0xed, 0x6e, 0x63, 0x69, 0x70, 0x65, 0x3b, 0x46,
-0x72, 0x61, 0x6e, 0x63, 0x6f, 0x20, 0x73, 0x75, 0xed, 0xe7, 0x6f, 0x3b, 0x3b, 0x46, 0x72, 0x61, 0x6e, 0x63, 0x6f, 0x20,
-0x73, 0x75, 0xed, 0xe7, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x46, 0x72, 0x61, 0x6e, 0x63, 0x6f, 0x73, 0x20, 0x73, 0x75, 0xed,
-0xe7, 0x6f, 0x73, 0x3b, 0xa2d, 0xa3e, 0xa30, 0xa24, 0xa40, 0x20, 0xa30, 0xa41, 0xa2a, 0xa07, 0xa06, 0x3b, 0x3b, 0xa2d, 0xa3e, 0xa30,
-0xa24, 0xa40, 0x20, 0xa30, 0xa41, 0xa2a, 0xa07, 0xa06, 0x3b, 0x3b, 0x3b, 0x3b, 0xa2d, 0xa3e, 0xa30, 0xa24, 0xa40, 0x20, 0xa30, 0xa41,
-0xa2a, 0xa0f, 0x3b, 0x631, 0x648, 0x67e, 0x626, 0x6cc, 0x6c1, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e,
-0x63, 0x20, 0x73, 0x76, 0x69, 0x7a, 0x7a, 0x65, 0x72, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x73, 0x76, 0x69,
-0x7a, 0x7a, 0x65, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x73, 0x76, 0x69, 0x7a, 0x7a, 0x65,
-0x72, 0x3b, 0x6c, 0x65, 0x75, 0x20, 0x72, 0x6f, 0x6d, 0xe2, 0x6e, 0x65, 0x73, 0x63, 0x3b, 0x3b, 0x6c, 0x65, 0x75, 0x20,
-0x72, 0x6f, 0x6d, 0xe2, 0x6e, 0x65, 0x73, 0x63, 0x3b, 0x3b, 0x6c, 0x65, 0x69, 0x20, 0x72, 0x6f, 0x6d, 0xe2, 0x6e, 0x65,
-0x219, 0x74, 0x69, 0x3b, 0x3b, 0x6c, 0x65, 0x69, 0x20, 0x72, 0x6f, 0x6d, 0xe2, 0x6e, 0x65, 0x219, 0x74, 0x69, 0x3b, 0x6c,
-0x65, 0x75, 0x20, 0x6d, 0x6f, 0x6c, 0x64, 0x6f, 0x76, 0x65, 0x6e, 0x65, 0x73, 0x63, 0x3b, 0x3b, 0x6c, 0x65, 0x75, 0x20,
-0x6d, 0x6f, 0x6c, 0x64, 0x6f, 0x76, 0x65, 0x6e, 0x65, 0x73, 0x63, 0x3b, 0x3b, 0x6c, 0x65, 0x69, 0x20, 0x6d, 0x6f, 0x6c,
-0x64, 0x6f, 0x76, 0x65, 0x6e, 0x65, 0x219, 0x74, 0x69, 0x3b, 0x3b, 0x6c, 0x65, 0x69, 0x20, 0x6d, 0x6f, 0x6c, 0x64, 0x6f,
-0x76, 0x65, 0x6e, 0x65, 0x219, 0x74, 0x69, 0x3b, 0x420, 0x43e, 0x441, 0x441, 0x438, 0x439, 0x441, 0x43a, 0x438, 0x439, 0x20, 0x440,
-0x443, 0x431, 0x43b, 0x44c, 0x3b, 0x3b, 0x440, 0x43e, 0x441, 0x441, 0x438, 0x439, 0x441, 0x43a, 0x438, 0x439, 0x20, 0x440, 0x443, 0x431,
-0x43b, 0x44c, 0x3b, 0x3b, 0x440, 0x43e, 0x441, 0x441, 0x438, 0x439, 0x441, 0x43a, 0x438, 0x445, 0x20, 0x440, 0x443, 0x431, 0x43b, 0x44f,
-0x3b, 0x440, 0x43e, 0x441, 0x441, 0x438, 0x439, 0x441, 0x43a, 0x438, 0x445, 0x20, 0x440, 0x443, 0x431, 0x43b, 0x435, 0x439, 0x3b, 0x440,
-0x43e, 0x441, 0x441, 0x438, 0x439, 0x441, 0x43a, 0x43e, 0x433, 0x43e, 0x20, 0x440, 0x443, 0x431, 0x43b, 0x44f, 0x3b, 0x411, 0x435, 0x43b,
-0x43e, 0x440, 0x443, 0x441, 0x441, 0x43a, 0x438, 0x439, 0x20, 0x440, 0x443, 0x431, 0x43b, 0x44c, 0x3b, 0x3b, 0x431, 0x435, 0x43b, 0x43e,
-0x440, 0x443, 0x441, 0x441, 0x43a, 0x438, 0x439, 0x20, 0x440, 0x443, 0x431, 0x43b, 0x44c, 0x3b, 0x3b, 0x431, 0x435, 0x43b, 0x43e, 0x440,
-0x443, 0x441, 0x441, 0x43a, 0x438, 0x445, 0x20, 0x440, 0x443, 0x431, 0x43b, 0x44f, 0x3b, 0x431, 0x435, 0x43b, 0x43e, 0x440, 0x443, 0x441,
-0x441, 0x43a, 0x438, 0x445, 0x20, 0x440, 0x443, 0x431, 0x43b, 0x435, 0x439, 0x3b, 0x431, 0x435, 0x43b, 0x43e, 0x440, 0x443, 0x441, 0x441,
-0x43a, 0x43e, 0x433, 0x43e, 0x20, 0x440, 0x443, 0x431, 0x43b, 0x44f, 0x3b, 0x41a, 0x430, 0x437, 0x430, 0x445, 0x441, 0x43a, 0x438, 0x439,
-0x20, 0x442, 0x435, 0x43d, 0x433, 0x435, 0x3b, 0x3b, 0x43a, 0x430, 0x437, 0x430, 0x445, 0x441, 0x43a, 0x438, 0x439, 0x20, 0x442, 0x435,
-0x43d, 0x433, 0x435, 0x3b, 0x3b, 0x43a, 0x430, 0x437, 0x430, 0x445, 0x441, 0x43a, 0x438, 0x445, 0x20, 0x442, 0x435, 0x43d, 0x433, 0x435,
-0x3b, 0x43a, 0x430, 0x437, 0x430, 0x445, 0x441, 0x43a, 0x438, 0x445, 0x20, 0x442, 0x435, 0x43d, 0x433, 0x435, 0x3b, 0x43a, 0x430, 0x437,
-0x430, 0x445, 0x441, 0x43a, 0x43e, 0x433, 0x43e, 0x20, 0x442, 0x435, 0x43d, 0x433, 0x435, 0x3b, 0x41a, 0x438, 0x440, 0x433, 0x438, 0x437,
-0x441, 0x43a, 0x438, 0x439, 0x20, 0x441, 0x43e, 0x43c, 0x3b, 0x3b, 0x43a, 0x438, 0x440, 0x433, 0x438, 0x437, 0x441, 0x43a, 0x438, 0x439,
-0x20, 0x441, 0x43e, 0x43c, 0x3b, 0x3b, 0x43a, 0x438, 0x440, 0x433, 0x438, 0x437, 0x441, 0x43a, 0x438, 0x445, 0x20, 0x441, 0x43e, 0x43c,
-0x430, 0x3b, 0x43a, 0x438, 0x440, 0x433, 0x438, 0x437, 0x441, 0x43a, 0x438, 0x445, 0x20, 0x441, 0x43e, 0x43c, 0x43e, 0x432, 0x3b, 0x43a,
-0x438, 0x440, 0x433, 0x438, 0x437, 0x441, 0x43a, 0x43e, 0x433, 0x43e, 0x20, 0x441, 0x43e, 0x43c, 0x430, 0x3b, 0x41c, 0x43e, 0x43b, 0x434,
-0x430, 0x432, 0x441, 0x43a, 0x438, 0x439, 0x20, 0x43b, 0x435, 0x439, 0x3b, 0x3b, 0x43c, 0x43e, 0x43b, 0x434, 0x430, 0x432, 0x441, 0x43a,
-0x438, 0x439, 0x20, 0x43b, 0x435, 0x439, 0x3b, 0x3b, 0x43c, 0x43e, 0x43b, 0x434, 0x430, 0x432, 0x441, 0x43a, 0x438, 0x445, 0x20, 0x43b,
-0x435, 0x44f, 0x3b, 0x43c, 0x43e, 0x43b, 0x434, 0x430, 0x432, 0x441, 0x43a, 0x438, 0x445, 0x20, 0x43b, 0x435, 0x435, 0x432, 0x3b, 0x43c,
-0x43e, 0x43b, 0x434, 0x430, 0x432, 0x441, 0x43a, 0x43e, 0x433, 0x43e, 0x20, 0x43b, 0x435, 0x44f, 0x3b, 0x423, 0x43a, 0x440, 0x430, 0x438,
-0x43d, 0x441, 0x43a, 0x430, 0x44f, 0x20, 0x433, 0x440, 0x438, 0x432, 0x43d, 0x430, 0x3b, 0x3b, 0x443, 0x43a, 0x440, 0x430, 0x438, 0x43d,
-0x441, 0x43a, 0x430, 0x44f, 0x20, 0x433, 0x440, 0x438, 0x432, 0x43d, 0x430, 0x3b, 0x3b, 0x443, 0x43a, 0x440, 0x430, 0x438, 0x43d, 0x441,
-0x43a, 0x438, 0x435, 0x20, 0x433, 0x440, 0x438, 0x432, 0x43d, 0x44b, 0x3b, 0x443, 0x43a, 0x440, 0x430, 0x438, 0x43d, 0x441, 0x43a, 0x438,
-0x445, 0x20, 0x433, 0x440, 0x438, 0x432, 0x435, 0x43d, 0x3b, 0x443, 0x43a, 0x440, 0x430, 0x438, 0x43d, 0x441, 0x43a, 0x43e, 0x439, 0x20,
-0x433, 0x440, 0x438, 0x432, 0x43d, 0x44b, 0x3b, 0x66, 0x61, 0x72, 0xe2, 0x6e, 0x67, 0x61, 0x20, 0x43, 0x46, 0x41, 0x20, 0x28,
-0x42, 0x45, 0x41, 0x43, 0x29, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x421, 0x440, 0x43f, 0x441, 0x43a, 0x438, 0x20, 0x434,
-0x438, 0x43d, 0x430, 0x440, 0x3b, 0x3b, 0x441, 0x440, 0x43f, 0x441, 0x43a, 0x438, 0x20, 0x434, 0x438, 0x43d, 0x430, 0x440, 0x3b, 0x3b,
-0x441, 0x440, 0x43f, 0x441, 0x43a, 0x430, 0x20, 0x434, 0x438, 0x43d, 0x430, 0x440, 0x430, 0x3b, 0x3b, 0x441, 0x440, 0x43f, 0x441, 0x43a,
-0x438, 0x445, 0x20, 0x434, 0x438, 0x43d, 0x430, 0x440, 0x430, 0x3b, 0x411, 0x43e, 0x441, 0x430, 0x43d, 0x441, 0x43a, 0x43e, 0x2d, 0x445,
-0x435, 0x440, 0x446, 0x435, 0x433, 0x43e, 0x432, 0x430, 0x447, 0x43a, 0x430, 0x20, 0x43a, 0x43e, 0x43d, 0x432, 0x435, 0x440, 0x442, 0x438,
-0x431, 0x438, 0x43b, 0x43d, 0x430, 0x20, 0x43c, 0x430, 0x440, 0x43a, 0x430, 0x3b, 0x3b, 0x431, 0x43e, 0x441, 0x430, 0x43d, 0x441, 0x43a,
-0x43e, 0x2d, 0x445, 0x435, 0x440, 0x446, 0x435, 0x433, 0x43e, 0x432, 0x430, 0x447, 0x43a, 0x430, 0x20, 0x43a, 0x43e, 0x43d, 0x432, 0x435,
-0x440, 0x442, 0x438, 0x431, 0x438, 0x43b, 0x43d, 0x430, 0x20, 0x43c, 0x430, 0x440, 0x43a, 0x430, 0x3b, 0x3b, 0x431, 0x43e, 0x441, 0x430,
-0x43d, 0x441, 0x43a, 0x43e, 0x2d, 0x445, 0x435, 0x440, 0x446, 0x435, 0x433, 0x43e, 0x432, 0x430, 0x447, 0x43a, 0x435, 0x20, 0x43a, 0x43e,
-0x43d, 0x432, 0x435, 0x440, 0x442, 0x438, 0x431, 0x438, 0x43b, 0x43d, 0x435, 0x20, 0x43c, 0x430, 0x440, 0x43a, 0x65, 0x3b, 0x3b, 0x431,
-0x43e, 0x441, 0x430, 0x43d, 0x441, 0x43a, 0x43e, 0x2d, 0x445, 0x435, 0x440, 0x446, 0x435, 0x433, 0x43e, 0x432, 0x430, 0x447, 0x43a, 0x438,
-0x445, 0x20, 0x43a, 0x43e, 0x43d, 0x432, 0x435, 0x440, 0x442, 0x438, 0x431, 0x438, 0x43b, 0x43d, 0x438, 0x445, 0x20, 0x43c, 0x430, 0x440,
-0x430, 0x43a, 0x430, 0x3b, 0x415, 0x432, 0x440, 0x43e, 0x3b, 0x3b, 0x435, 0x432, 0x440, 0x43e, 0x3b, 0x3b, 0x435, 0x432, 0x440, 0x430,
-0x3b, 0x3b, 0x435, 0x432, 0x440, 0x430, 0x3b, 0x42, 0x6f, 0x73, 0x61, 0x6e, 0x73, 0x6b, 0x6f, 0x2d, 0x68, 0x65, 0x72, 0x63,
-0x65, 0x67, 0x6f, 0x76, 0x61, 0x10d, 0x6b, 0x61, 0x20, 0x6b, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x69, 0x6c,
-0x6e, 0x61, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x61, 0x3b, 0x3b, 0x62, 0x6f, 0x73, 0x61, 0x6e, 0x73, 0x6b, 0x6f, 0x2d, 0x68,
-0x65, 0x72, 0x63, 0x65, 0x67, 0x6f, 0x76, 0x61, 0x10d, 0x6b, 0x61, 0x20, 0x6b, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69,
-0x62, 0x69, 0x6c, 0x6e, 0x61, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x61, 0x3b, 0x3b, 0x62, 0x6f, 0x73, 0x61, 0x6e, 0x73, 0x6b,
-0x6f, 0x2d, 0x68, 0x65, 0x72, 0x63, 0x65, 0x67, 0x6f, 0x76, 0x61, 0x10d, 0x6b, 0x65, 0x20, 0x6b, 0x6f, 0x6e, 0x76, 0x65,
-0x72, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x3b, 0x3b, 0x62, 0x6f, 0x73, 0x61,
-0x6e, 0x73, 0x6b, 0x6f, 0x2d, 0x68, 0x65, 0x72, 0x63, 0x65, 0x67, 0x6f, 0x76, 0x61, 0x10d, 0x6b, 0x69, 0x68, 0x20, 0x6b,
-0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e, 0x69, 0x68, 0x20, 0x6d, 0x61, 0x72, 0x61, 0x6b, 0x61,
-0x3b, 0x45, 0x76, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x76, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x76, 0x72, 0x61, 0x3b, 0x3b, 0x65,
-0x76, 0x72, 0x61, 0x3b, 0x53, 0x72, 0x70, 0x73, 0x6b, 0x69, 0x20, 0x64, 0x69, 0x6e, 0x61, 0x72, 0x3b, 0x3b, 0x73, 0x72,
-0x70, 0x73, 0x6b, 0x69, 0x20, 0x64, 0x69, 0x6e, 0x61, 0x72, 0x3b, 0x3b, 0x73, 0x72, 0x70, 0x73, 0x6b, 0x61, 0x20, 0x64,
-0x69, 0x6e, 0x61, 0x72, 0x61, 0x3b, 0x3b, 0x73, 0x72, 0x70, 0x73, 0x6b, 0x69, 0x68, 0x20, 0x64, 0x69, 0x6e, 0x61, 0x72,
-0x61, 0x3b, 0x41b, 0x430, 0x440, 0x3b, 0x3b, 0x43b, 0x430, 0x440, 0x3b, 0x3b, 0x3b, 0x3b, 0x43b, 0x430, 0x440, 0x44b, 0x3b, 0x421,
-0x43e, 0x43c, 0x3b, 0x3b, 0x441, 0x43e, 0x43c, 0x3b, 0x3b, 0x3b, 0x3b, 0x441, 0x43e, 0x43c, 0x44b, 0x3b, 0x44, 0x6f, 0x72, 0x61,
-0x20, 0x72, 0x65, 0x20, 0x41, 0x6d, 0x65, 0x72, 0x69, 0x6b, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0xdc1, 0xdca,
-0x200d, 0xdbb, 0xdd3, 0x20, 0xdbd, 0xd82, 0xd9a, 0xdcf, 0x20, 0xdbb, 0xdd4, 0xdb4, 0xdd2, 0xdba, 0xdbd, 0x3b, 0x3b, 0xdc1, 0xdca, 0x200d,
-0xdbb, 0xdd3, 0x20, 0xdbd, 0xd82, 0xd9a, 0xdcf, 0x20, 0xdbb, 0xdd4, 0xdb4, 0xdd2, 0xdba, 0xdbd, 0x3b, 0x3b, 0x3b, 0x3b, 0xdc1, 0xdca,
-0x200d, 0xdbb, 0xdd3, 0x20, 0xdbd, 0xd82, 0xd9a, 0xdcf, 0x20, 0xdbb, 0xdd4, 0xdb4, 0xdd2, 0xdba, 0xdbd, 0x3b, 0x65, 0x75, 0x72, 0x6f,
-0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0xe1, 0x3b, 0x65, 0x75, 0x72, 0x61, 0x3b, 0x65, 0x75,
-0x72, 0x3b, 0x65, 0x76, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x76, 0x72, 0x6f, 0x3b, 0x65, 0x76, 0x72, 0x61, 0x3b, 0x65, 0x76,
-0x72, 0x69, 0x3b, 0x3b, 0x65, 0x76, 0x72, 0x6f, 0x76, 0x3b, 0x53, 0x68, 0x69, 0x6c, 0x69, 0x6e, 0x20, 0x73, 0x6f, 0x6f,
-0x6d, 0x61, 0x61, 0x6c, 0x69, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x46, 0x61, 0x72, 0x61, 0x6e, 0x20, 0x4a, 0x61,
-0x62, 0x62, 0x75, 0x75, 0x74, 0x69, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x42, 0x69, 0x72, 0x74, 0x61, 0x20, 0x49,
-0x74, 0x6f, 0x6f, 0x62, 0x62, 0x69, 0x79, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20,
-0x61, 0x72, 0x67, 0x65, 0x6e, 0x74, 0x69, 0x6e, 0x6f, 0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20, 0x61, 0x72, 0x67, 0x65,
-0x6e, 0x74, 0x69, 0x6e, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x73, 0x20, 0x61, 0x72, 0x67, 0x65, 0x6e,
-0x74, 0x69, 0x6e, 0x6f, 0x73, 0x3b, 0x64, 0xf3, 0x6c, 0x61, 0x72, 0x20, 0x62, 0x65, 0x6c, 0x69, 0x63, 0x65, 0xf1, 0x6f,
-0x3b, 0x3b, 0x64, 0xf3, 0x6c, 0x61, 0x72, 0x20, 0x62, 0x65, 0x6c, 0x69, 0x63, 0x65, 0xf1, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b,
-0x64, 0xf3, 0x6c, 0x61, 0x72, 0x65, 0x73, 0x20, 0x62, 0x65, 0x6c, 0x69, 0x63, 0x65, 0xf1, 0x6f, 0x73, 0x3b, 0x62, 0x6f,
-0x6c, 0x69, 0x76, 0x69, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x62, 0x6f, 0x6c, 0x69, 0x76, 0x69, 0x61, 0x6e, 0x6f, 0x3b, 0x3b,
-0x3b, 0x3b, 0x62, 0x6f, 0x6c, 0x69, 0x76, 0x69, 0x61, 0x6e, 0x6f, 0x73, 0x3b, 0x72, 0x65, 0x61, 0x6c, 0x20, 0x62, 0x72,
-0x61, 0x73, 0x69, 0x6c, 0x65, 0xf1, 0x6f, 0x3b, 0x3b, 0x72, 0x65, 0x61, 0x6c, 0x20, 0x62, 0x72, 0x61, 0x73, 0x69, 0x6c,
-0x65, 0xf1, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x72, 0x65, 0x61, 0x6c, 0x65, 0x73, 0x20, 0x62, 0x72, 0x61, 0x73, 0x69, 0x6c,
-0x65, 0xf1, 0x6f, 0x73, 0x3b, 0x50, 0x65, 0x73, 0x6f, 0x20, 0x63, 0x68, 0x69, 0x6c, 0x65, 0x6e, 0x6f, 0x3b, 0x3b, 0x70,
-0x65, 0x73, 0x6f, 0x20, 0x63, 0x68, 0x69, 0x6c, 0x65, 0x6e, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x73,
-0x20, 0x63, 0x68, 0x69, 0x6c, 0x65, 0x6e, 0x6f, 0x73, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x6d,
-0x62, 0x69, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x6d, 0x62, 0x69, 0x61,
-0x6e, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x73, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x6d, 0x62, 0x69, 0x61,
-0x6e, 0x6f, 0x73, 0x3b, 0x63, 0x6f, 0x6c, 0xf3, 0x6e, 0x20, 0x63, 0x6f, 0x73, 0x74, 0x61, 0x72, 0x72, 0x69, 0x63, 0x65,
-0x6e, 0x73, 0x65, 0x3b, 0x3b, 0x63, 0x6f, 0x6c, 0xf3, 0x6e, 0x20, 0x63, 0x6f, 0x73, 0x74, 0x61, 0x72, 0x72, 0x69, 0x63,
-0x65, 0x6e, 0x73, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x63, 0x6f, 0x6c, 0x6f, 0x6e, 0x65, 0x73, 0x20, 0x63, 0x6f, 0x73, 0x74,
-0x61, 0x72, 0x72, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20, 0x63, 0x75, 0x62, 0x61,
-0x6e, 0x6f, 0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20, 0x63, 0x75, 0x62, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x70,
-0x65, 0x73, 0x6f, 0x73, 0x20, 0x63, 0x75, 0x62, 0x61, 0x6e, 0x6f, 0x73, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20, 0x64, 0x6f,
-0x6d, 0x69, 0x6e, 0x69, 0x63, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20, 0x64, 0x6f, 0x6d, 0x69, 0x6e,
-0x69, 0x63, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x73, 0x20, 0x64, 0x6f, 0x6d, 0x69, 0x6e,
-0x69, 0x63, 0x61, 0x6e, 0x6f, 0x73, 0x3b, 0x64, 0xf3, 0x6c, 0x61, 0x72, 0x20, 0x65, 0x73, 0x74, 0x61, 0x64, 0x6f, 0x75,
-0x6e, 0x69, 0x64, 0x65, 0x6e, 0x73, 0x65, 0x3b, 0x3b, 0x64, 0xf3, 0x6c, 0x61, 0x72, 0x20, 0x65, 0x73, 0x74, 0x61, 0x64,
-0x6f, 0x75, 0x6e, 0x69, 0x64, 0x65, 0x6e, 0x73, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x64, 0xf3, 0x6c, 0x61, 0x72, 0x65, 0x73,
-0x20, 0x65, 0x73, 0x74, 0x61, 0x64, 0x6f, 0x75, 0x6e, 0x69, 0x64, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x3b, 0x66, 0x72, 0x61,
-0x6e, 0x63, 0x6f, 0x20, 0x43, 0x46, 0x41, 0x20, 0x42, 0x45, 0x41, 0x43, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x6f,
-0x20, 0x43, 0x46, 0x41, 0x20, 0x42, 0x45, 0x41, 0x43, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x6f, 0x73,
-0x20, 0x43, 0x46, 0x41, 0x20, 0x42, 0x45, 0x41, 0x43, 0x3b, 0x71, 0x75, 0x65, 0x74, 0x7a, 0x61, 0x6c, 0x3b, 0x3b, 0x71,
-0x75, 0x65, 0x74, 0x7a, 0x61, 0x6c, 0x3b, 0x3b, 0x3b, 0x3b, 0x71, 0x75, 0x65, 0x74, 0x7a, 0x61, 0x6c, 0x65, 0x73, 0x3b,
-0x6c, 0x65, 0x6d, 0x70, 0x69, 0x72, 0x61, 0x20, 0x68, 0x6f, 0x6e, 0x64, 0x75, 0x72, 0x65, 0xf1, 0x6f, 0x3b, 0x3b, 0x6c,
-0x65, 0x6d, 0x70, 0x69, 0x72, 0x61, 0x20, 0x68, 0x6f, 0x6e, 0x64, 0x75, 0x72, 0x65, 0xf1, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b,
-0x6c, 0x65, 0x6d, 0x70, 0x69, 0x72, 0x61, 0x73, 0x20, 0x68, 0x6f, 0x6e, 0x64, 0x75, 0x72, 0x65, 0xf1, 0x6f, 0x73, 0x3b,
-0x70, 0x65, 0x73, 0x6f, 0x20, 0x6d, 0x65, 0x78, 0x69, 0x63, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20,
-0x6d, 0x65, 0x78, 0x69, 0x63, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x73, 0x20, 0x6d, 0x65,
-0x78, 0x69, 0x63, 0x61, 0x6e, 0x6f, 0x73, 0x3b, 0x63, 0xf3, 0x72, 0x64, 0x6f, 0x62, 0x61, 0x20, 0x6e, 0x69, 0x63, 0x61,
-0x72, 0x61, 0x67, 0xfc, 0x65, 0x6e, 0x73, 0x65, 0x3b, 0x3b, 0x63, 0xf3, 0x72, 0x64, 0x6f, 0x62, 0x61, 0x20, 0x6e, 0x69,
-0x63, 0x61, 0x72, 0x61, 0x67, 0xfc, 0x65, 0x6e, 0x73, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x63, 0xf3, 0x72, 0x64, 0x6f, 0x62,
-0x61, 0x73, 0x20, 0x6e, 0x69, 0x63, 0x61, 0x72, 0x61, 0x67, 0xfc, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x3b, 0x62, 0x61, 0x6c,
-0x62, 0x6f, 0x61, 0x20, 0x70, 0x61, 0x6e, 0x61, 0x6d, 0x65, 0xf1, 0x6f, 0x3b, 0x3b, 0x62, 0x61, 0x6c, 0x62, 0x6f, 0x61,
-0x20, 0x70, 0x61, 0x6e, 0x61, 0x6d, 0x65, 0xf1, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x62, 0x61, 0x6c, 0x62, 0x6f, 0x61, 0x73,
-0x20, 0x70, 0x61, 0x6e, 0x61, 0x6d, 0x65, 0xf1, 0x6f, 0x73, 0x3b, 0x67, 0x75, 0x61, 0x72, 0x61, 0x6e, 0xed, 0x20, 0x70,
-0x61, 0x72, 0x61, 0x67, 0x75, 0x61, 0x79, 0x6f, 0x3b, 0x3b, 0x67, 0x75, 0x61, 0x72, 0x61, 0x6e, 0xed, 0x20, 0x70, 0x61,
-0x72, 0x61, 0x67, 0x75, 0x61, 0x79, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x67, 0x75, 0x61, 0x72, 0x61, 0x6e, 0xed, 0x65, 0x73,
-0x20, 0x70, 0x61, 0x72, 0x61, 0x67, 0x75, 0x61, 0x79, 0x6f, 0x73, 0x3b, 0x73, 0x6f, 0x6c, 0x20, 0x70, 0x65, 0x72, 0x75,
-0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x73, 0x6f, 0x6c, 0x20, 0x70, 0x65, 0x72, 0x75, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b,
-0x73, 0x6f, 0x6c, 0x65, 0x73, 0x20, 0x70, 0x65, 0x72, 0x75, 0x61, 0x6e, 0x6f, 0x73, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20,
-0x66, 0x69, 0x6c, 0x69, 0x70, 0x69, 0x6e, 0x6f, 0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x69, 0x70,
-0x69, 0x6e, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x73, 0x20, 0x66, 0x69, 0x6c, 0x69, 0x70, 0x69, 0x6e,
-0x6f, 0x73, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20, 0x75, 0x72, 0x75, 0x67, 0x75, 0x61, 0x79, 0x6f, 0x3b, 0x3b, 0x70, 0x65,
-0x73, 0x6f, 0x20, 0x75, 0x72, 0x75, 0x67, 0x75, 0x61, 0x79, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x73,
-0x20, 0x75, 0x72, 0x75, 0x67, 0x75, 0x61, 0x79, 0x6f, 0x73, 0x3b, 0x62, 0x6f, 0x6c, 0xed, 0x76, 0x61, 0x72, 0x20, 0x76,
-0x65, 0x6e, 0x65, 0x7a, 0x6f, 0x6c, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x62, 0x6f, 0x6c, 0xed, 0x76, 0x61, 0x72, 0x20, 0x76,
-0x65, 0x6e, 0x65, 0x7a, 0x6f, 0x6c, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x62, 0x6f, 0x6c, 0xed, 0x76, 0x61, 0x72,
-0x65, 0x73, 0x20, 0x76, 0x65, 0x6e, 0x65, 0x7a, 0x6f, 0x6c, 0x61, 0x6e, 0x6f, 0x73, 0x3b, 0x53, 0x68, 0x69, 0x6c, 0x69,
-0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x54, 0x61, 0x6e, 0x7a, 0x61, 0x6e, 0x69, 0x61, 0x3b, 0x3b, 0x73, 0x68, 0x69,
-0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x54, 0x61, 0x6e, 0x7a, 0x61, 0x6e, 0x69, 0x61, 0x3b, 0x3b, 0x3b,
-0x3b, 0x73, 0x68, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x7a, 0x61, 0x20, 0x54, 0x61, 0x6e, 0x7a, 0x61, 0x6e, 0x69,
-0x61, 0x3b, 0x46, 0x61, 0x72, 0x61, 0x6e, 0x67, 0x61, 0x20, 0x79, 0x61, 0x20, 0x4b, 0x6f, 0x6e, 0x67, 0x6f, 0x3b, 0x3b,
-0x66, 0x61, 0x72, 0x61, 0x6e, 0x67, 0x61, 0x20, 0x79, 0x61, 0x20, 0x4b, 0x6f, 0x6e, 0x67, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b,
-0x66, 0x61, 0x72, 0x61, 0x6e, 0x67, 0x61, 0x20, 0x7a, 0x61, 0x20, 0x4b, 0x6f, 0x6e, 0x67, 0x6f, 0x3b, 0x53, 0x68, 0x69,
-0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x4b, 0x65, 0x6e, 0x79, 0x61, 0x3b, 0x3b, 0x73, 0x68, 0x69, 0x6c,
-0x69, 0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x4b, 0x65, 0x6e, 0x79, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x73, 0x68, 0x69,
-0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x7a, 0x61, 0x20, 0x4b, 0x65, 0x6e, 0x79, 0x61, 0x3b, 0x53, 0x68, 0x69, 0x6c, 0x69,
-0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x55, 0x67, 0x61, 0x6e, 0x64, 0x61, 0x3b, 0x3b, 0x73, 0x68, 0x69, 0x6c, 0x69,
-0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x55, 0x67, 0x61, 0x6e, 0x64, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x73, 0x68, 0x69,
-0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x7a, 0x61, 0x20, 0x55, 0x67, 0x61, 0x6e, 0x64, 0x61, 0x3b, 0x73, 0x76, 0x65, 0x6e,
-0x73, 0x6b, 0x20, 0x6b, 0x72, 0x6f, 0x6e, 0x61, 0x3b, 0x3b, 0x73, 0x76, 0x65, 0x6e, 0x73, 0x6b, 0x20, 0x6b, 0x72, 0x6f,
-0x6e, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x73, 0x76, 0x65, 0x6e, 0x73, 0x6b, 0x61, 0x20, 0x6b, 0x72, 0x6f, 0x6e, 0x6f, 0x72,
-0x3b, 0xb87, 0xba8, 0xbcd, 0xba4, 0xbbf, 0xbaf, 0x20, 0xbb0, 0xbc2, 0xbaa, 0xbbe, 0xbaf, 0xbcd, 0x3b, 0x3b, 0xb87, 0xba8, 0xbcd, 0xba4,
-0xbbf, 0xbaf, 0x20, 0xbb0, 0xbc2, 0xbaa, 0xbbe, 0xbaf, 0xbcd, 0x3b, 0x3b, 0x3b, 0x3b, 0xb87, 0xba8, 0xbcd, 0xba4, 0xbbf, 0xbaf, 0x20,
-0xbb0, 0xbc2, 0xbaa, 0xbbe, 0xbaf, 0xbcd, 0xb95, 0xbb3, 0xbcd, 0x3b, 0xbae, 0xbb2, 0xbc7, 0xbb7, 0xbbf, 0xbaf, 0xba9, 0xbcd, 0x20, 0xbb0,
-0xbbf, 0xb99, 0xbcd, 0xb95, 0xbbf, 0xb9f, 0xbcd, 0x3b, 0x3b, 0xbae, 0xbb2, 0xbc7, 0xbb7, 0xbbf, 0xbaf, 0xba9, 0xbcd, 0x20, 0xbb0, 0xbbf,
-0xb99, 0xbcd, 0xb95, 0xbbf, 0xb9f, 0xbcd, 0x3b, 0x3b, 0x3b, 0x3b, 0xbae, 0xbb2, 0xbc7, 0xbb7, 0xbbf, 0xbaf, 0xba9, 0xbcd, 0x20, 0xbb0,
-0xbbf, 0xb99, 0xbcd, 0xb95, 0xbbf, 0xb9f, 0xbcd, 0xb95, 0xbb3, 0xbcd, 0x3b, 0xb9a, 0xbbf, 0xb99, 0xbcd, 0xb95, 0xbaa, 0xbcd, 0xbaa, 0xbc2,
-0xbb0, 0xbcd, 0x20, 0xb9f, 0xbbe, 0xbb2, 0xbb0, 0xbcd, 0x3b, 0x3b, 0xb9a, 0xbbf, 0xb99, 0xbcd, 0xb95, 0xbaa, 0xbcd, 0xbaa, 0xbc2, 0xbb0,
-0xbcd, 0x20, 0xb9f, 0xbbe, 0xbb2, 0xbb0, 0xbcd, 0x3b, 0x3b, 0x3b, 0x3b, 0xb9a, 0xbbf, 0xb99, 0xbcd, 0xb95, 0xbaa, 0xbcd, 0xbaa, 0xbc2,
-0xbb0, 0xbcd, 0x20, 0xb9f, 0xbbe, 0xbb2, 0xbb0, 0xbcd, 0xb95, 0xbb3, 0xbcd, 0x3b, 0xb87, 0xbb2, 0xb99, 0xbcd, 0xb95, 0xbc8, 0x20, 0xbb0,
-0xbc2, 0xbaa, 0xbbe, 0xbaf, 0xbcd, 0x3b, 0x3b, 0xb87, 0xbb2, 0xb99, 0xbcd, 0xb95, 0xbc8, 0x20, 0xbb0, 0xbc2, 0xbaa, 0xbbe, 0xbaf, 0xbcd,
-0x3b, 0x3b, 0x3b, 0x3b, 0xb87, 0xbb2, 0xb99, 0xbcd, 0xb95, 0xbc8, 0x20, 0xbb0, 0xbc2, 0xbaa, 0xbbe, 0xbaf, 0xbcd, 0xb95, 0xbb3, 0xbcd,
-0x3b, 0xc30, 0xc42, 0xc2a, 0xc3e, 0xc2f, 0xc3f, 0x3b, 0x3b, 0xc30, 0xc42, 0xc2a, 0xc3e, 0xc2f, 0xc3f, 0x3b, 0x3b, 0x3b, 0x3b, 0xc30,
-0xc42, 0xc2a, 0xc3e, 0xc2f, 0xc32, 0xc41, 0x3b, 0xe1a, 0xe32, 0xe17, 0xe44, 0xe17, 0xe22, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0xe1a,
-0xe32, 0xe17, 0xe44, 0xe17, 0xe22, 0x3b, 0xf61, 0xf74, 0xf0b, 0xf68, 0xf53, 0xf0b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0xf62,
-0xf92, 0xfb1, 0xf0b, 0xf42, 0xf62, 0xf0b, 0xf66, 0xf92, 0xf7c, 0xf62, 0xf0b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x12e8, 0x12a2,
-0x1275, 0x12ee, 0x1335, 0x12eb, 0x20, 0x1265, 0x122d, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x50, 0x61, 0x2bb, 0x61, 0x6e, 0x67,
-0x61, 0x20, 0x66, 0x61, 0x6b, 0x61, 0x74, 0x6f, 0x6e, 0x67, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x50, 0x61, 0x2bb,
-0x61, 0x6e, 0x67, 0x61, 0x20, 0x66, 0x61, 0x6b, 0x61, 0x74, 0x6f, 0x6e, 0x67, 0x61, 0x3b, 0x54, 0xfc, 0x72, 0x6b, 0x20,
-0x4c, 0x69, 0x72, 0x61, 0x73, 0x131, 0x3b, 0x3b, 0x54, 0xfc, 0x72, 0x6b, 0x20, 0x6c, 0x69, 0x72, 0x61, 0x73, 0x131, 0x3b,
-0x3b, 0x3b, 0x3b, 0x54, 0xfc, 0x72, 0x6b, 0x20, 0x6c, 0x69, 0x72, 0x61, 0x73, 0x131, 0x3b, 0x54, 0xfc, 0x72, 0x6b, 0x6d,
-0x65, 0x6e, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x74, 0x79, 0x3b, 0x3b, 0x74, 0xfc, 0x72, 0x6b, 0x6d, 0x65, 0x6e, 0x20, 0x6d,
-0x61, 0x6e, 0x61, 0x74, 0x79, 0x3b, 0x3b, 0x3b, 0x3b, 0x74, 0xfc, 0x72, 0x6b, 0x6d, 0x65, 0x6e, 0x20, 0x6d, 0x61, 0x6e,
-0x61, 0x74, 0x79, 0x3b, 0x62c, 0x6c7, 0x6ad, 0x6af, 0x648, 0x20, 0x64a, 0x6c8, 0x6d5, 0x646, 0x649, 0x3b, 0x3b, 0x62c, 0x6c7, 0x6ad,
-0x6af, 0x648, 0x20, 0x64a, 0x6c8, 0x6d5, 0x646, 0x649, 0x3b, 0x3b, 0x3b, 0x3b, 0x62c, 0x6c7, 0x6ad, 0x6af, 0x648, 0x20, 0x64a, 0x6c8,
-0x6d5, 0x646, 0x649, 0x3b, 0x443, 0x43a, 0x440, 0x430, 0x457, 0x43d, 0x441, 0x44c, 0x43a, 0x430, 0x20, 0x433, 0x440, 0x438, 0x432, 0x43d,
-0x44f, 0x3b, 0x3b, 0x433, 0x440, 0x438, 0x432, 0x43d, 0x44f, 0x3b, 0x3b, 0x433, 0x440, 0x438, 0x432, 0x43d, 0x456, 0x3b, 0x433, 0x440,
-0x438, 0x432, 0x435, 0x43d, 0x44c, 0x3b, 0x433, 0x440, 0x438, 0x432, 0x43d, 0x456, 0x3b, 0x67e, 0x627, 0x6a9, 0x633, 0x62a, 0x627, 0x646,
-0x6cc, 0x20, 0x631, 0x648, 0x67e, 0x6cc, 0x6c1, 0x3b, 0x3b, 0x67e, 0x627, 0x6a9, 0x633, 0x62a, 0x627, 0x646, 0x6cc, 0x20, 0x631, 0x648,
-0x67e, 0x6cc, 0x6c1, 0x3b, 0x3b, 0x3b, 0x3b, 0x67e, 0x627, 0x6a9, 0x633, 0x62a, 0x627, 0x646, 0x6cc, 0x20, 0x631, 0x648, 0x67e, 0x6cc,
-0x6c1, 0x3b, 0x628, 0x6be, 0x627, 0x631, 0x62a, 0x6cc, 0x20, 0x631, 0x648, 0x67e, 0x6cc, 0x6c1, 0x3b, 0x3b, 0x628, 0x6be, 0x627, 0x631,
-0x62a, 0x6cc, 0x20, 0x631, 0x648, 0x67e, 0x6cc, 0x6c1, 0x3b, 0x3b, 0x3b, 0x3b, 0x628, 0x6be, 0x627, 0x631, 0x62a, 0x6cc, 0x20, 0x631,
-0x648, 0x67e, 0x6d2, 0x3b, 0x4f, 0x2018, 0x7a, 0x62, 0x65, 0x6b, 0x69, 0x73, 0x74, 0x6f, 0x6e, 0x20, 0x73, 0x6f, 0x2018, 0x6d,
-0x69, 0x3b, 0x3b, 0x4f, 0x2018, 0x7a, 0x62, 0x65, 0x6b, 0x69, 0x73, 0x74, 0x6f, 0x6e, 0x20, 0x73, 0x6f, 0x2018, 0x6d, 0x69,
-0x3b, 0x3b, 0x3b, 0x3b, 0x4f, 0x2018, 0x7a, 0x62, 0x65, 0x6b, 0x69, 0x73, 0x74, 0x6f, 0x6e, 0x20, 0x73, 0x6f, 0x2018, 0x6d,
-0x69, 0x3b, 0x627, 0x641, 0x63a, 0x627, 0x646, 0x6cc, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x40e, 0x437, 0x431, 0x435, 0x43a,
-0x438, 0x441, 0x442, 0x43e, 0x43d, 0x20, 0x441, 0x45e, 0x43c, 0x3b, 0x3b, 0x40e, 0x437, 0x431, 0x435, 0x43a, 0x438, 0x441, 0x442, 0x43e,
-0x43d, 0x20, 0x441, 0x45e, 0x43c, 0x3b, 0x3b, 0x3b, 0x3b, 0x40e, 0x437, 0x431, 0x435, 0x43a, 0x438, 0x441, 0x442, 0x43e, 0x43d, 0x20,
-0x441, 0x45e, 0x43c, 0x3b, 0x110, 0x1ed3, 0x6e, 0x67, 0x20, 0x56, 0x69, 0x1ec7, 0x74, 0x20, 0x4e, 0x61, 0x6d, 0x3b, 0x3b, 0x3b,
-0x3b, 0x3b, 0x3b, 0x110, 0x1ed3, 0x6e, 0x67, 0x20, 0x56, 0x69, 0x1ec7, 0x74, 0x20, 0x4e, 0x61, 0x6d, 0x3b, 0x50, 0x75, 0x6e,
-0x74, 0x20, 0x50, 0x72, 0x79, 0x64, 0x61, 0x69, 0x6e, 0x3b, 0x70, 0x75, 0x6e, 0x74, 0x20, 0x50, 0x72, 0x79, 0x64, 0x61,
-0x69, 0x6e, 0x3b, 0x62, 0x75, 0x6e, 0x74, 0x20, 0x50, 0x72, 0x79, 0x64, 0x61, 0x69, 0x6e, 0x3b, 0x62, 0x75, 0x6e, 0x74,
-0x20, 0x50, 0x72, 0x79, 0x64, 0x61, 0x69, 0x6e, 0x3b, 0x70, 0x75, 0x6e, 0x74, 0x20, 0x50, 0x72, 0x79, 0x64, 0x61, 0x69,
-0x6e, 0x3b, 0x70, 0x68, 0x75, 0x6e, 0x74, 0x20, 0x50, 0x72, 0x79, 0x64, 0x61, 0x69, 0x6e, 0x3b, 0x70, 0x75, 0x6e, 0x74,
-0x20, 0x50, 0x72, 0x79, 0x64, 0x61, 0x69, 0x6e, 0x3b, 0x4e, 0x61, 0x69, 0x72, 0x61, 0x20, 0x74, 0x69, 0x20, 0x4f, 0x72,
-0xed, 0x6c, 0x1eb9, 0x301, 0xe8, 0x64, 0x65, 0x20, 0x4e, 0xe0, 0xec, 0x6a, 0xed, 0x72, 0xed, 0xe0, 0x3b, 0x3b, 0x3b, 0x3b,
-0x3b, 0x3b, 0x3b, 0x46, 0x61, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x20, 0x74, 0x69, 0x20, 0x4f, 0x72, 0xed, 0x6c, 0x25b, 0x301,
-0xe8, 0x64, 0x65, 0x20, 0x42, 0x49, 0x4b, 0x45, 0x41, 0x4f, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x69, 0x2d, 0x53,
-0x6f, 0x75, 0x74, 0x68, 0x20, 0x41, 0x66, 0x72, 0x69, 0x63, 0x61, 0x6e, 0x20, 0x52, 0x61, 0x6e, 0x64, 0x3b, 0x3b, 0x69,
-0x2d, 0x53, 0x6f, 0x75, 0x74, 0x68, 0x20, 0x41, 0x66, 0x72, 0x69, 0x63, 0x61, 0x6e, 0x20, 0x52, 0x61, 0x6e, 0x64, 0x3b,
-0x3b, 0x3b, 0x3b, 0x69, 0x2d, 0x53, 0x6f, 0x75, 0x74, 0x68, 0x20, 0x41, 0x66, 0x72, 0x69, 0x63, 0x61, 0x6e, 0x20, 0x52,
-0x61, 0x6e, 0x64, 0x3b, 0x6e, 0x6f, 0x72, 0x73, 0x6b, 0x20, 0x6b, 0x72, 0x6f, 0x6e, 0x65, 0x3b, 0x3b, 0x6e, 0x6f, 0x72,
-0x73, 0x6b, 0x20, 0x6b, 0x72, 0x6f, 0x6e, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x6e, 0x6f, 0x72, 0x73, 0x6b, 0x65, 0x20, 0x6b,
-0x72, 0x6f, 0x6e, 0x65, 0x72, 0x3b, 0x42, 0x6f, 0x73, 0x61, 0x6e, 0x73, 0x6b, 0x6f, 0x68, 0x65, 0x72, 0x63, 0x65, 0x67,
-0x6f, 0x76, 0x61, 0x10d, 0x6b, 0x61, 0x20, 0x6b, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e, 0x61,
-0x20, 0x6d, 0x61, 0x72, 0x6b, 0x61, 0x3b, 0x3b, 0x62, 0x6f, 0x73, 0x61, 0x6e, 0x73, 0x6b, 0x6f, 0x68, 0x65, 0x72, 0x63,
-0x65, 0x67, 0x6f, 0x76, 0x61, 0x10d, 0x6b, 0x61, 0x20, 0x6b, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x69, 0x6c,
-0x6e, 0x61, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x61, 0x3b, 0x3b, 0x62, 0x6f, 0x73, 0x61, 0x6e, 0x73, 0x6b, 0x6f, 0x68, 0x65,
-0x72, 0x63, 0x65, 0x67, 0x6f, 0x76, 0x61, 0x10d, 0x6b, 0x65, 0x20, 0x6b, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62,
-0x69, 0x6c, 0x6e, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x3b, 0x3b, 0x62, 0x6f, 0x73, 0x61, 0x6e, 0x73, 0x6b, 0x6f,
-0x68, 0x65, 0x72, 0x63, 0x65, 0x67, 0x6f, 0x76, 0x61, 0x10d, 0x6b, 0x69, 0x68, 0x20, 0x6b, 0x6f, 0x6e, 0x76, 0x65, 0x72,
-0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e, 0x69, 0x68, 0x20, 0x6d, 0x61, 0x72, 0x61, 0x6b, 0x61, 0x3b, 0x41a, 0x43e, 0x43d, 0x432,
-0x435, 0x440, 0x442, 0x438, 0x431, 0x438, 0x43b, 0x43d, 0x430, 0x20, 0x43c, 0x430, 0x440, 0x43a, 0x430, 0x3b, 0x3b, 0x431, 0x43e, 0x441,
-0x430, 0x43d, 0x441, 0x43a, 0x43e, 0x2d, 0x445, 0x435, 0x440, 0x446, 0x435, 0x433, 0x43e, 0x432, 0x430, 0x447, 0x43a, 0x430, 0x20, 0x43a,
-0x43e, 0x43d, 0x432, 0x435, 0x440, 0x442, 0x438, 0x431, 0x438, 0x43b, 0x43d, 0x430, 0x20, 0x43c, 0x430, 0x440, 0x43a, 0x430, 0x3b, 0x3b,
-0x431, 0x43e, 0x441, 0x430, 0x43d, 0x441, 0x43a, 0x43e, 0x2d, 0x445, 0x435, 0x440, 0x446, 0x435, 0x433, 0x43e, 0x432, 0x430, 0x447, 0x43a,
-0x435, 0x20, 0x43a, 0x43e, 0x43d, 0x432, 0x435, 0x440, 0x442, 0x438, 0x431, 0x438, 0x43b, 0x43d, 0x435, 0x20, 0x43c, 0x430, 0x440, 0x43a,
+0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x43, 0x61, 0x79, 0x6d, 0x61, 0x6e, 0x20, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73,
+0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x4e, 0x65, 0x77, 0x20, 0x5a, 0x65, 0x61, 0x6c, 0x61, 0x6e, 0x64,
+0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x4e, 0x65, 0x77, 0x20, 0x5a, 0x65, 0x61, 0x6c, 0x61, 0x6e, 0x64,
+0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x4e, 0x65, 0x77, 0x20, 0x5a, 0x65, 0x61, 0x6c, 0x61,
+0x6e, 0x64, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x44, 0x61, 0x6e, 0x69, 0x73, 0x68, 0x20, 0x4b, 0x72,
+0x6f, 0x6e, 0x65, 0x3b, 0x3b, 0x44, 0x61, 0x6e, 0x69, 0x73, 0x68, 0x20, 0x6b, 0x72, 0x6f, 0x6e, 0x65, 0x3b, 0x3b, 0x3b,
+0x3b, 0x44, 0x61, 0x6e, 0x69, 0x73, 0x68, 0x20, 0x6b, 0x72, 0x6f, 0x6e, 0x65, 0x72, 0x3b, 0x45, 0x72, 0x69, 0x74, 0x72,
+0x65, 0x61, 0x6e, 0x20, 0x4e, 0x61, 0x6b, 0x66, 0x61, 0x3b, 0x3b, 0x45, 0x72, 0x69, 0x74, 0x72, 0x65, 0x61, 0x6e, 0x20,
+0x6e, 0x61, 0x6b, 0x66, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x45, 0x72, 0x69, 0x74, 0x72, 0x65, 0x61, 0x6e, 0x20, 0x6e, 0x61,
+0x6b, 0x66, 0x61, 0x73, 0x3b, 0x46, 0x61, 0x6c, 0x6b, 0x6c, 0x61, 0x6e, 0x64, 0x20, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64,
+0x73, 0x20, 0x50, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x3b, 0x46, 0x61, 0x6c, 0x6b, 0x6c, 0x61, 0x6e, 0x64, 0x20, 0x49, 0x73,
+0x6c, 0x61, 0x6e, 0x64, 0x73, 0x20, 0x70, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x3b, 0x3b, 0x3b, 0x46, 0x61, 0x6c, 0x6b, 0x6c,
+0x61, 0x6e, 0x64, 0x20, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x20, 0x70, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x3b, 0x46,
+0x69, 0x6a, 0x69, 0x61, 0x6e, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x46, 0x69, 0x6a, 0x69, 0x61, 0x6e,
+0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x46, 0x69, 0x6a, 0x69, 0x61, 0x6e, 0x20, 0x64, 0x6f,
+0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x55, 0x4b, 0x20, 0x50, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x3b, 0x55, 0x4b, 0x20, 0x70,
+0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x3b, 0x3b, 0x3b, 0x55, 0x4b, 0x20, 0x70, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x3b, 0x47, 0x61,
+0x6d, 0x62, 0x69, 0x61, 0x6e, 0x20, 0x44, 0x61, 0x6c, 0x61, 0x73, 0x69, 0x3b, 0x3b, 0x47, 0x61, 0x6d, 0x62, 0x69, 0x61,
+0x6e, 0x20, 0x64, 0x61, 0x6c, 0x61, 0x73, 0x69, 0x3b, 0x3b, 0x3b, 0x3b, 0x47, 0x61, 0x6d, 0x62, 0x69, 0x61, 0x6e, 0x20,
+0x64, 0x61, 0x6c, 0x61, 0x73, 0x69, 0x73, 0x3b, 0x47, 0x68, 0x61, 0x6e, 0x61, 0x69, 0x61, 0x6e, 0x20, 0x43, 0x65, 0x64,
+0x69, 0x3b, 0x3b, 0x47, 0x68, 0x61, 0x6e, 0x61, 0x69, 0x61, 0x6e, 0x20, 0x63, 0x65, 0x64, 0x69, 0x3b, 0x3b, 0x3b, 0x3b,
+0x47, 0x68, 0x61, 0x6e, 0x61, 0x69, 0x61, 0x6e, 0x20, 0x63, 0x65, 0x64, 0x69, 0x73, 0x3b, 0x47, 0x69, 0x62, 0x72, 0x61,
+0x6c, 0x74, 0x61, 0x72, 0x20, 0x50, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x3b, 0x47, 0x69, 0x62, 0x72, 0x61, 0x6c, 0x74, 0x61,
+0x72, 0x20, 0x70, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x3b, 0x3b, 0x3b, 0x47, 0x69, 0x62, 0x72, 0x61, 0x6c, 0x74, 0x61, 0x72,
+0x20, 0x70, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x3b, 0x47, 0x75, 0x79, 0x61, 0x6e, 0x61, 0x65, 0x73, 0x65, 0x20, 0x44, 0x6f,
+0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x47, 0x75, 0x79, 0x61, 0x6e, 0x61, 0x65, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x6c, 0x6c,
+0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x47, 0x75, 0x79, 0x61, 0x6e, 0x61, 0x65, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x6c, 0x6c,
+0x61, 0x72, 0x73, 0x3b, 0x48, 0x6f, 0x6e, 0x67, 0x20, 0x4b, 0x6f, 0x6e, 0x67, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72,
+0x3b, 0x3b, 0x48, 0x6f, 0x6e, 0x67, 0x20, 0x4b, 0x6f, 0x6e, 0x67, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b,
+0x3b, 0x3b, 0x48, 0x6f, 0x6e, 0x67, 0x20, 0x4b, 0x6f, 0x6e, 0x67, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b,
+0x49, 0x6e, 0x64, 0x69, 0x61, 0x6e, 0x20, 0x52, 0x75, 0x70, 0x65, 0x65, 0x3b, 0x3b, 0x49, 0x6e, 0x64, 0x69, 0x61, 0x6e,
+0x20, 0x72, 0x75, 0x70, 0x65, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x49, 0x6e, 0x64, 0x69, 0x61, 0x6e, 0x20, 0x72, 0x75, 0x70,
+0x65, 0x65, 0x73, 0x3b, 0x49, 0x73, 0x72, 0x61, 0x65, 0x6c, 0x69, 0x20, 0x4e, 0x65, 0x77, 0x20, 0x53, 0x68, 0x65, 0x6b,
+0x65, 0x6c, 0x3b, 0x3b, 0x49, 0x73, 0x72, 0x61, 0x65, 0x6c, 0x69, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x73, 0x68, 0x65, 0x6b,
+0x65, 0x6c, 0x3b, 0x3b, 0x3b, 0x3b, 0x49, 0x73, 0x72, 0x61, 0x65, 0x6c, 0x69, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x73, 0x68,
+0x65, 0x6b, 0x65, 0x6c, 0x73, 0x3b, 0x4a, 0x61, 0x6d, 0x61, 0x69, 0x63, 0x61, 0x6e, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61,
+0x72, 0x3b, 0x3b, 0x4a, 0x61, 0x6d, 0x61, 0x69, 0x63, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b,
+0x3b, 0x3b, 0x4a, 0x61, 0x6d, 0x61, 0x69, 0x63, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x4b,
+0x65, 0x6e, 0x79, 0x61, 0x6e, 0x20, 0x53, 0x68, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x3b, 0x3b, 0x4b, 0x65, 0x6e, 0x79,
+0x61, 0x6e, 0x20, 0x73, 0x68, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x3b, 0x3b, 0x3b, 0x3b, 0x4b, 0x65, 0x6e, 0x79, 0x61,
+0x6e, 0x20, 0x73, 0x68, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x73, 0x3b, 0x53, 0x6f, 0x75, 0x74, 0x68, 0x20, 0x41, 0x66,
+0x72, 0x69, 0x63, 0x61, 0x6e, 0x20, 0x52, 0x61, 0x6e, 0x64, 0x3b, 0x3b, 0x53, 0x6f, 0x75, 0x74, 0x68, 0x20, 0x41, 0x66,
+0x72, 0x69, 0x63, 0x61, 0x6e, 0x20, 0x72, 0x61, 0x6e, 0x64, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x6f, 0x75, 0x74, 0x68, 0x20,
+0x41, 0x66, 0x72, 0x69, 0x63, 0x61, 0x6e, 0x20, 0x72, 0x61, 0x6e, 0x64, 0x3b, 0x4c, 0x69, 0x62, 0x65, 0x72, 0x69, 0x61,
+0x6e, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x4c, 0x69, 0x62, 0x65, 0x72, 0x69, 0x61, 0x6e, 0x20, 0x64,
+0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x4c, 0x69, 0x62, 0x65, 0x72, 0x69, 0x61, 0x6e, 0x20, 0x64, 0x6f,
+0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x4d, 0x61, 0x63, 0x61, 0x6e, 0x65, 0x73, 0x65, 0x20, 0x50, 0x61, 0x74, 0x61, 0x63,
+0x61, 0x3b, 0x3b, 0x4d, 0x61, 0x63, 0x61, 0x6e, 0x65, 0x73, 0x65, 0x20, 0x70, 0x61, 0x74, 0x61, 0x63, 0x61, 0x3b, 0x3b,
+0x3b, 0x3b, 0x4d, 0x61, 0x63, 0x61, 0x6e, 0x65, 0x73, 0x65, 0x20, 0x70, 0x61, 0x74, 0x61, 0x63, 0x61, 0x73, 0x3b, 0x4d,
+0x61, 0x6c, 0x61, 0x67, 0x61, 0x73, 0x79, 0x20, 0x41, 0x72, 0x69, 0x61, 0x72, 0x79, 0x3b, 0x3b, 0x4d, 0x61, 0x6c, 0x61,
+0x67, 0x61, 0x73, 0x79, 0x20, 0x61, 0x72, 0x69, 0x61, 0x72, 0x79, 0x3b, 0x3b, 0x3b, 0x3b, 0x4d, 0x61, 0x6c, 0x61, 0x67,
+0x61, 0x73, 0x79, 0x20, 0x61, 0x72, 0x69, 0x61, 0x72, 0x69, 0x65, 0x73, 0x3b, 0x4d, 0x61, 0x6c, 0x61, 0x77, 0x69, 0x61,
+0x6e, 0x20, 0x4b, 0x77, 0x61, 0x63, 0x68, 0x61, 0x3b, 0x3b, 0x4d, 0x61, 0x6c, 0x61, 0x77, 0x69, 0x61, 0x6e, 0x20, 0x6b,
+0x77, 0x61, 0x63, 0x68, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x4d, 0x61, 0x6c, 0x61, 0x77, 0x69, 0x61, 0x6e, 0x20, 0x6b, 0x77,
+0x61, 0x63, 0x68, 0x61, 0x73, 0x3b, 0x4d, 0x61, 0x6c, 0x61, 0x79, 0x73, 0x69, 0x61, 0x6e, 0x20, 0x52, 0x69, 0x6e, 0x67,
+0x67, 0x69, 0x74, 0x3b, 0x3b, 0x4d, 0x61, 0x6c, 0x61, 0x79, 0x73, 0x69, 0x61, 0x6e, 0x20, 0x72, 0x69, 0x6e, 0x67, 0x67,
+0x69, 0x74, 0x3b, 0x3b, 0x3b, 0x3b, 0x4d, 0x61, 0x6c, 0x61, 0x79, 0x73, 0x69, 0x61, 0x6e, 0x20, 0x72, 0x69, 0x6e, 0x67,
+0x67, 0x69, 0x74, 0x73, 0x3b, 0x4d, 0x61, 0x75, 0x72, 0x69, 0x74, 0x69, 0x61, 0x6e, 0x20, 0x52, 0x75, 0x70, 0x65, 0x65,
+0x3b, 0x3b, 0x4d, 0x61, 0x75, 0x72, 0x69, 0x74, 0x69, 0x61, 0x6e, 0x20, 0x72, 0x75, 0x70, 0x65, 0x65, 0x3b, 0x3b, 0x3b,
+0x3b, 0x4d, 0x61, 0x75, 0x72, 0x69, 0x74, 0x69, 0x61, 0x6e, 0x20, 0x72, 0x75, 0x70, 0x65, 0x65, 0x73, 0x3b, 0x4e, 0x61,
+0x6d, 0x69, 0x62, 0x69, 0x61, 0x6e, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x4e, 0x61, 0x6d, 0x69, 0x62,
+0x69, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x4e, 0x61, 0x6d, 0x69, 0x62, 0x69,
+0x61, 0x6e, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x4e, 0x69, 0x67, 0x65, 0x72, 0x69, 0x61, 0x6e, 0x20,
+0x4e, 0x61, 0x69, 0x72, 0x61, 0x3b, 0x3b, 0x4e, 0x69, 0x67, 0x65, 0x72, 0x69, 0x61, 0x6e, 0x20, 0x6e, 0x61, 0x69, 0x72,
+0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x4e, 0x69, 0x67, 0x65, 0x72, 0x69, 0x61, 0x6e, 0x20, 0x6e, 0x61, 0x69, 0x72, 0x61, 0x73,
+0x3b, 0x50, 0x61, 0x6b, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x69, 0x20, 0x52, 0x75, 0x70, 0x65, 0x65, 0x3b, 0x3b, 0x50, 0x61,
+0x6b, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x69, 0x20, 0x72, 0x75, 0x70, 0x65, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x50, 0x61, 0x6b,
+0x69, 0x73, 0x74, 0x61, 0x6e, 0x69, 0x20, 0x72, 0x75, 0x70, 0x65, 0x65, 0x73, 0x3b, 0x50, 0x61, 0x70, 0x75, 0x61, 0x20,
+0x4e, 0x65, 0x77, 0x20, 0x47, 0x75, 0x69, 0x6e, 0x65, 0x61, 0x6e, 0x20, 0x4b, 0x69, 0x6e, 0x61, 0x3b, 0x3b, 0x50, 0x61,
+0x70, 0x75, 0x61, 0x20, 0x4e, 0x65, 0x77, 0x20, 0x47, 0x75, 0x69, 0x6e, 0x65, 0x61, 0x6e, 0x20, 0x6b, 0x69, 0x6e, 0x61,
+0x3b, 0x3b, 0x3b, 0x3b, 0x50, 0x61, 0x70, 0x75, 0x61, 0x20, 0x4e, 0x65, 0x77, 0x20, 0x47, 0x75, 0x69, 0x6e, 0x65, 0x61,
+0x6e, 0x20, 0x6b, 0x69, 0x6e, 0x61, 0x3b, 0x50, 0x68, 0x69, 0x6c, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x65, 0x20, 0x50, 0x69,
+0x73, 0x6f, 0x3b, 0x3b, 0x50, 0x68, 0x69, 0x6c, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x65, 0x20, 0x70, 0x69, 0x73, 0x6f, 0x3b,
+0x3b, 0x3b, 0x3b, 0x50, 0x68, 0x69, 0x6c, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x65, 0x20, 0x70, 0x69, 0x73, 0x6f, 0x73, 0x3b,
+0x52, 0x77, 0x61, 0x6e, 0x64, 0x61, 0x6e, 0x20, 0x46, 0x72, 0x61, 0x6e, 0x63, 0x3b, 0x3b, 0x52, 0x77, 0x61, 0x6e, 0x64,
+0x61, 0x6e, 0x20, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x3b, 0x3b, 0x3b, 0x3b, 0x52, 0x77, 0x61, 0x6e, 0x64, 0x61, 0x6e, 0x20,
+0x66, 0x72, 0x61, 0x6e, 0x63, 0x73, 0x3b, 0x53, 0x61, 0x6d, 0x6f, 0x61, 0x6e, 0x20, 0x54, 0x61, 0x6c, 0x61, 0x3b, 0x3b,
+0x53, 0x61, 0x6d, 0x6f, 0x61, 0x6e, 0x20, 0x74, 0x61, 0x6c, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x61, 0x6d, 0x6f, 0x61,
+0x6e, 0x20, 0x74, 0x61, 0x6c, 0x61, 0x3b, 0x53, 0x65, 0x79, 0x63, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x69, 0x73, 0x20, 0x52,
+0x75, 0x70, 0x65, 0x65, 0x3b, 0x3b, 0x53, 0x65, 0x79, 0x63, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x69, 0x73, 0x20, 0x72, 0x75,
+0x70, 0x65, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x65, 0x79, 0x63, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x69, 0x73, 0x20, 0x72,
+0x75, 0x70, 0x65, 0x65, 0x73, 0x3b, 0x53, 0x69, 0x65, 0x72, 0x72, 0x61, 0x20, 0x4c, 0x65, 0x6f, 0x6e, 0x65, 0x61, 0x6e,
+0x20, 0x4c, 0x65, 0x6f, 0x6e, 0x65, 0x3b, 0x3b, 0x53, 0x69, 0x65, 0x72, 0x72, 0x61, 0x20, 0x4c, 0x65, 0x6f, 0x6e, 0x65,
+0x61, 0x6e, 0x20, 0x6c, 0x65, 0x6f, 0x6e, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x69, 0x65, 0x72, 0x72, 0x61, 0x20, 0x4c,
+0x65, 0x6f, 0x6e, 0x65, 0x61, 0x6e, 0x20, 0x6c, 0x65, 0x6f, 0x6e, 0x65, 0x73, 0x3b, 0x53, 0x69, 0x6e, 0x67, 0x61, 0x70,
+0x6f, 0x72, 0x65, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x53, 0x69, 0x6e, 0x67, 0x61, 0x70, 0x6f, 0x72,
+0x65, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x69, 0x6e, 0x67, 0x61, 0x70, 0x6f, 0x72,
+0x65, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73, 0x3b, 0x53, 0x6f, 0x6c, 0x6f, 0x6d, 0x6f, 0x6e, 0x20, 0x49, 0x73,
+0x6c, 0x61, 0x6e, 0x64, 0x73, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x53, 0x6f, 0x6c, 0x6f, 0x6d, 0x6f,
+0x6e, 0x20, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b,
+0x53, 0x6f, 0x6c, 0x6f, 0x6d, 0x6f, 0x6e, 0x20, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x20, 0x64, 0x6f, 0x6c, 0x6c,
+0x61, 0x72, 0x73, 0x3b, 0x53, 0x74, 0x2e, 0x20, 0x48, 0x65, 0x6c, 0x65, 0x6e, 0x61, 0x20, 0x50, 0x6f, 0x75, 0x6e, 0x64,
+0x3b, 0x3b, 0x53, 0x74, 0x2e, 0x20, 0x48, 0x65, 0x6c, 0x65, 0x6e, 0x61, 0x20, 0x70, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x3b,
+0x3b, 0x3b, 0x53, 0x74, 0x2e, 0x20, 0x48, 0x65, 0x6c, 0x65, 0x6e, 0x61, 0x20, 0x70, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x3b,
+0x53, 0x75, 0x64, 0x61, 0x6e, 0x65, 0x73, 0x65, 0x20, 0x50, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x3b, 0x53, 0x75, 0x64, 0x61,
+0x6e, 0x65, 0x73, 0x65, 0x20, 0x70, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x75, 0x64, 0x61, 0x6e, 0x65,
+0x73, 0x65, 0x20, 0x70, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x3b, 0x53, 0x77, 0x61, 0x7a, 0x69, 0x20, 0x4c, 0x69, 0x6c, 0x61,
+0x6e, 0x67, 0x65, 0x6e, 0x69, 0x3b, 0x3b, 0x53, 0x77, 0x61, 0x7a, 0x69, 0x20, 0x6c, 0x69, 0x6c, 0x61, 0x6e, 0x67, 0x65,
+0x6e, 0x69, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x77, 0x61, 0x7a, 0x69, 0x20, 0x65, 0x6d, 0x61, 0x6c, 0x61, 0x6e, 0x67, 0x65,
+0x6e, 0x69, 0x3b, 0x53, 0x77, 0x65, 0x64, 0x69, 0x73, 0x68, 0x20, 0x4b, 0x72, 0x6f, 0x6e, 0x61, 0x3b, 0x3b, 0x53, 0x77,
+0x65, 0x64, 0x69, 0x73, 0x68, 0x20, 0x6b, 0x72, 0x6f, 0x6e, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x77, 0x65, 0x64, 0x69,
+0x73, 0x68, 0x20, 0x6b, 0x72, 0x6f, 0x6e, 0x6f, 0x72, 0x3b, 0x53, 0x77, 0x69, 0x73, 0x73, 0x20, 0x46, 0x72, 0x61, 0x6e,
+0x63, 0x3b, 0x3b, 0x53, 0x77, 0x69, 0x73, 0x73, 0x20, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x77,
+0x69, 0x73, 0x73, 0x20, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x73, 0x3b, 0x54, 0x61, 0x6e, 0x7a, 0x61, 0x6e, 0x69, 0x61, 0x6e,
+0x20, 0x53, 0x68, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x3b, 0x3b, 0x54, 0x61, 0x6e, 0x7a, 0x61, 0x6e, 0x69, 0x61, 0x6e,
+0x20, 0x73, 0x68, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x3b, 0x3b, 0x3b, 0x3b, 0x54, 0x61, 0x6e, 0x7a, 0x61, 0x6e, 0x69,
+0x61, 0x6e, 0x20, 0x73, 0x68, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x73, 0x3b, 0x54, 0x6f, 0x6e, 0x67, 0x61, 0x6e, 0x20,
+0x50, 0x61, 0x2bb, 0x61, 0x6e, 0x67, 0x61, 0x3b, 0x3b, 0x54, 0x6f, 0x6e, 0x67, 0x61, 0x6e, 0x20, 0x70, 0x61, 0x2bb, 0x61,
+0x6e, 0x67, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x54, 0x6f, 0x6e, 0x67, 0x61, 0x6e, 0x20, 0x70, 0x61, 0x2bb, 0x61, 0x6e, 0x67,
+0x61, 0x3b, 0x54, 0x72, 0x69, 0x6e, 0x69, 0x64, 0x61, 0x64, 0x20, 0x26, 0x20, 0x54, 0x6f, 0x62, 0x61, 0x67, 0x6f, 0x20,
+0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x54, 0x72, 0x69, 0x6e, 0x69, 0x64, 0x61, 0x64, 0x20, 0x26, 0x20, 0x54,
+0x6f, 0x62, 0x61, 0x67, 0x6f, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x54, 0x72, 0x69, 0x6e,
+0x69, 0x64, 0x61, 0x64, 0x20, 0x26, 0x20, 0x54, 0x6f, 0x62, 0x61, 0x67, 0x6f, 0x20, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72,
+0x73, 0x3b, 0x55, 0x67, 0x61, 0x6e, 0x64, 0x61, 0x6e, 0x20, 0x53, 0x68, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x3b, 0x3b,
+0x55, 0x67, 0x61, 0x6e, 0x64, 0x61, 0x6e, 0x20, 0x73, 0x68, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x3b, 0x3b, 0x3b, 0x3b,
+0x55, 0x67, 0x61, 0x6e, 0x64, 0x61, 0x6e, 0x20, 0x73, 0x68, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x73, 0x3b, 0x42, 0x72,
+0x69, 0x74, 0x69, 0x73, 0x68, 0x20, 0x50, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x3b, 0x42, 0x72, 0x69, 0x74, 0x69, 0x73, 0x68,
+0x20, 0x70, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x3b, 0x3b, 0x3b, 0x42, 0x72, 0x69, 0x74, 0x69, 0x73, 0x68, 0x20, 0x70, 0x6f,
+0x75, 0x6e, 0x64, 0x73, 0x3b, 0x56, 0x61, 0x6e, 0x75, 0x61, 0x74, 0x75, 0x20, 0x56, 0x61, 0x74, 0x75, 0x3b, 0x3b, 0x56,
+0x61, 0x6e, 0x75, 0x61, 0x74, 0x75, 0x20, 0x76, 0x61, 0x74, 0x75, 0x3b, 0x3b, 0x3b, 0x3b, 0x56, 0x61, 0x6e, 0x75, 0x61,
+0x74, 0x75, 0x20, 0x76, 0x61, 0x74, 0x75, 0x73, 0x3b, 0x5a, 0x61, 0x6d, 0x62, 0x69, 0x61, 0x6e, 0x20, 0x4b, 0x77, 0x61,
+0x63, 0x68, 0x61, 0x3b, 0x3b, 0x5a, 0x61, 0x6d, 0x62, 0x69, 0x61, 0x6e, 0x20, 0x6b, 0x77, 0x61, 0x63, 0x68, 0x61, 0x3b,
+0x3b, 0x3b, 0x3b, 0x5a, 0x61, 0x6d, 0x62, 0x69, 0x61, 0x6e, 0x20, 0x6b, 0x77, 0x61, 0x63, 0x68, 0x61, 0x73, 0x3b, 0x53,
+0x6f, 0x75, 0x74, 0x68, 0x20, 0x53, 0x75, 0x64, 0x61, 0x6e, 0x65, 0x73, 0x65, 0x20, 0x50, 0x6f, 0x75, 0x6e, 0x64, 0x3b,
+0x3b, 0x53, 0x6f, 0x75, 0x74, 0x68, 0x20, 0x53, 0x75, 0x64, 0x61, 0x6e, 0x65, 0x73, 0x65, 0x20, 0x70, 0x6f, 0x75, 0x6e,
+0x64, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x6f, 0x75, 0x74, 0x68, 0x20, 0x53, 0x75, 0x64, 0x61, 0x6e, 0x65, 0x73, 0x65, 0x20,
+0x70, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x3b, 0x4e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x20, 0x41,
+0x6e, 0x74, 0x69, 0x6c, 0x6c, 0x65, 0x61, 0x6e, 0x20, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x3b, 0x3b, 0x4e, 0x65,
+0x74, 0x68, 0x65, 0x72, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x20, 0x41, 0x6e, 0x74, 0x69, 0x6c, 0x6c, 0x65, 0x61, 0x6e, 0x20,
+0x67, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x4e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6c, 0x61, 0x6e,
+0x64, 0x73, 0x20, 0x41, 0x6e, 0x74, 0x69, 0x6c, 0x6c, 0x65, 0x61, 0x6e, 0x20, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72,
+0x73, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f,
+0x74, 0x3b, 0x64, 0x6f, 0x6e, 0x73, 0x6b, 0x20, 0x6b, 0x72, 0xf3, 0x6e, 0x61, 0x3b, 0x3b, 0x64, 0x6f, 0x6e, 0x73, 0x6b,
+0x20, 0x6b, 0x72, 0xf3, 0x6e, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x64, 0x61, 0x6e, 0x73, 0x6b, 0x61, 0x72, 0x20, 0x6b, 0x72,
+0xf3, 0x6e, 0x75, 0x72, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x65,
+0x75, 0x72, 0x6f, 0x61, 0x3b, 0x64, 0x69, 0x6e, 0x61, 0x72, 0x20, 0x61, 0x6c, 0x67, 0xe9, 0x72, 0x69, 0x65, 0x6e, 0x3b,
+0x3b, 0x64, 0x69, 0x6e, 0x61, 0x72, 0x20, 0x61, 0x6c, 0x67, 0xe9, 0x72, 0x69, 0x65, 0x6e, 0x3b, 0x3b, 0x3b, 0x3b, 0x64,
+0x69, 0x6e, 0x61, 0x72, 0x73, 0x20, 0x61, 0x6c, 0x67, 0xe9, 0x72, 0x69, 0x65, 0x6e, 0x73, 0x3b, 0x66, 0x72, 0x61, 0x6e,
+0x63, 0x20, 0x43, 0x46, 0x41, 0x20, 0x28, 0x42, 0x43, 0x45, 0x41, 0x4f, 0x29, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63,
+0x20, 0x43, 0x46, 0x41, 0x20, 0x28, 0x42, 0x43, 0x45, 0x41, 0x4f, 0x29, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e,
+0x63, 0x73, 0x20, 0x43, 0x46, 0x41, 0x20, 0x28, 0x42, 0x43, 0x45, 0x41, 0x4f, 0x29, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63,
+0x20, 0x62, 0x75, 0x72, 0x75, 0x6e, 0x64, 0x61, 0x69, 0x73, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x62, 0x75,
+0x72, 0x75, 0x6e, 0x64, 0x61, 0x69, 0x73, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x73, 0x20, 0x62, 0x75,
+0x72, 0x75, 0x6e, 0x64, 0x61, 0x69, 0x73, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x43, 0x46, 0x41, 0x20, 0x28, 0x42,
+0x45, 0x41, 0x43, 0x29, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x43, 0x46, 0x41, 0x20, 0x28, 0x42, 0x45, 0x41,
+0x43, 0x29, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x73, 0x20, 0x43, 0x46, 0x41, 0x20, 0x28, 0x42, 0x45,
+0x41, 0x43, 0x29, 0x3b, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x20, 0x63, 0x61, 0x6e, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x3b,
+0x3b, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x20, 0x63, 0x61, 0x6e, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x3b, 0x3b, 0x3b, 0x3b,
+0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x73, 0x3b, 0x66, 0x72,
+0x61, 0x6e, 0x63, 0x20, 0x63, 0x6f, 0x6d, 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20,
+0x63, 0x6f, 0x6d, 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x73, 0x20, 0x63,
+0x6f, 0x6d, 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x73, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x63, 0x6f, 0x6e, 0x67, 0x6f,
+0x6c, 0x61, 0x69, 0x73, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x63, 0x6f, 0x6e, 0x67, 0x6f, 0x6c, 0x61, 0x69,
+0x73, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x67, 0x6f, 0x6c, 0x61, 0x69,
+0x73, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x64, 0x6a, 0x69, 0x62, 0x6f, 0x75, 0x74, 0x69, 0x65, 0x6e, 0x3b, 0x3b,
+0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x64, 0x6a, 0x69, 0x62, 0x6f, 0x75, 0x74, 0x69, 0x65, 0x6e, 0x3b, 0x3b, 0x3b, 0x3b,
+0x66, 0x72, 0x61, 0x6e, 0x63, 0x73, 0x20, 0x64, 0x6a, 0x69, 0x62, 0x6f, 0x75, 0x74, 0x69, 0x65, 0x6e, 0x73, 0x3b, 0x66,
+0x72, 0x61, 0x6e, 0x63, 0x20, 0x43, 0x46, 0x50, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x43, 0x46, 0x50, 0x3b,
+0x3b, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x73, 0x20, 0x43, 0x46, 0x50, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20,
+0x67, 0x75, 0x69, 0x6e, 0xe9, 0x65, 0x6e, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x67, 0x75, 0x69, 0x6e, 0xe9,
+0x65, 0x6e, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x73, 0x20, 0x67, 0x75, 0x69, 0x6e, 0xe9, 0x65, 0x6e,
+0x73, 0x3b, 0x67, 0x6f, 0x75, 0x72, 0x64, 0x65, 0x20, 0x68, 0x61, 0xef, 0x74, 0x69, 0x65, 0x6e, 0x6e, 0x65, 0x3b, 0x3b,
+0x67, 0x6f, 0x75, 0x72, 0x64, 0x65, 0x20, 0x68, 0x61, 0xef, 0x74, 0x69, 0x65, 0x6e, 0x6e, 0x65, 0x3b, 0x3b, 0x3b, 0x3b,
+0x67, 0x6f, 0x75, 0x72, 0x64, 0x65, 0x73, 0x20, 0x68, 0x61, 0xef, 0x74, 0x69, 0x65, 0x6e, 0x6e, 0x65, 0x73, 0x3b, 0x61,
+0x72, 0x69, 0x61, 0x72, 0x79, 0x20, 0x6d, 0x61, 0x6c, 0x67, 0x61, 0x63, 0x68, 0x65, 0x3b, 0x3b, 0x61, 0x72, 0x69, 0x61,
+0x72, 0x79, 0x20, 0x6d, 0x61, 0x6c, 0x67, 0x61, 0x63, 0x68, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x61, 0x72, 0x69, 0x61, 0x72,
+0x79, 0x73, 0x20, 0x6d, 0x61, 0x6c, 0x67, 0x61, 0x63, 0x68, 0x65, 0x73, 0x3b, 0x6f, 0x75, 0x67, 0x75, 0x69, 0x79, 0x61,
+0x20, 0x6d, 0x61, 0x75, 0x72, 0x69, 0x74, 0x61, 0x6e, 0x69, 0x65, 0x6e, 0x3b, 0x3b, 0x6f, 0x75, 0x67, 0x75, 0x69, 0x79,
+0x61, 0x20, 0x6d, 0x61, 0x75, 0x72, 0x69, 0x74, 0x61, 0x6e, 0x69, 0x65, 0x6e, 0x3b, 0x3b, 0x3b, 0x3b, 0x6f, 0x75, 0x67,
+0x75, 0x69, 0x79, 0x61, 0x73, 0x20, 0x6d, 0x61, 0x75, 0x72, 0x69, 0x74, 0x61, 0x6e, 0x69, 0x65, 0x6e, 0x73, 0x3b, 0x72,
+0x6f, 0x75, 0x70, 0x69, 0x65, 0x20, 0x6d, 0x61, 0x75, 0x72, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x6e, 0x65, 0x3b, 0x3b, 0x72,
+0x6f, 0x75, 0x70, 0x69, 0x65, 0x20, 0x6d, 0x61, 0x75, 0x72, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x6e, 0x65, 0x3b, 0x3b, 0x3b,
+0x3b, 0x72, 0x6f, 0x75, 0x70, 0x69, 0x65, 0x73, 0x20, 0x6d, 0x61, 0x75, 0x72, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x6e, 0x65,
+0x73, 0x3b, 0x64, 0x69, 0x72, 0x68, 0x61, 0x6d, 0x20, 0x6d, 0x61, 0x72, 0x6f, 0x63, 0x61, 0x69, 0x6e, 0x3b, 0x3b, 0x64,
+0x69, 0x72, 0x68, 0x61, 0x6d, 0x20, 0x6d, 0x61, 0x72, 0x6f, 0x63, 0x61, 0x69, 0x6e, 0x3b, 0x3b, 0x3b, 0x3b, 0x64, 0x69,
+0x72, 0x68, 0x61, 0x6d, 0x73, 0x20, 0x6d, 0x61, 0x72, 0x6f, 0x63, 0x61, 0x69, 0x6e, 0x73, 0x3b, 0x66, 0x72, 0x61, 0x6e,
+0x63, 0x20, 0x72, 0x77, 0x61, 0x6e, 0x64, 0x61, 0x69, 0x73, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x72, 0x77,
+0x61, 0x6e, 0x64, 0x61, 0x69, 0x73, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x73, 0x20, 0x72, 0x77, 0x61,
+0x6e, 0x64, 0x61, 0x69, 0x73, 0x3b, 0x72, 0x6f, 0x75, 0x70, 0x69, 0x65, 0x20, 0x64, 0x65, 0x73, 0x20, 0x53, 0x65, 0x79,
+0x63, 0x68, 0x65, 0x6c, 0x6c, 0x65, 0x73, 0x3b, 0x3b, 0x72, 0x6f, 0x75, 0x70, 0x69, 0x65, 0x20, 0x64, 0x65, 0x73, 0x20,
+0x53, 0x65, 0x79, 0x63, 0x68, 0x65, 0x6c, 0x6c, 0x65, 0x73, 0x3b, 0x3b, 0x3b, 0x3b, 0x72, 0x6f, 0x75, 0x70, 0x69, 0x65,
+0x73, 0x20, 0x64, 0x65, 0x73, 0x20, 0x53, 0x65, 0x79, 0x63, 0x68, 0x65, 0x6c, 0x6c, 0x65, 0x73, 0x3b, 0x66, 0x72, 0x61,
+0x6e, 0x63, 0x20, 0x73, 0x75, 0x69, 0x73, 0x73, 0x65, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x73, 0x75, 0x69,
+0x73, 0x73, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x73, 0x20, 0x73, 0x75, 0x69, 0x73, 0x73, 0x65,
+0x73, 0x3b, 0x6c, 0x69, 0x76, 0x72, 0x65, 0x20, 0x73, 0x79, 0x72, 0x69, 0x65, 0x6e, 0x6e, 0x65, 0x3b, 0x3b, 0x6c, 0x69,
+0x76, 0x72, 0x65, 0x20, 0x73, 0x79, 0x72, 0x69, 0x65, 0x6e, 0x6e, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x6c, 0x69, 0x76, 0x72,
+0x65, 0x73, 0x20, 0x73, 0x79, 0x72, 0x69, 0x65, 0x6e, 0x6e, 0x65, 0x73, 0x3b, 0x64, 0x69, 0x6e, 0x61, 0x72, 0x20, 0x74,
+0x75, 0x6e, 0x69, 0x73, 0x69, 0x65, 0x6e, 0x3b, 0x3b, 0x64, 0x69, 0x6e, 0x61, 0x72, 0x20, 0x74, 0x75, 0x6e, 0x69, 0x73,
+0x69, 0x65, 0x6e, 0x3b, 0x3b, 0x3b, 0x3b, 0x64, 0x69, 0x6e, 0x61, 0x72, 0x73, 0x20, 0x74, 0x75, 0x6e, 0x69, 0x73, 0x69,
+0x65, 0x6e, 0x73, 0x3b, 0x76, 0x61, 0x74, 0x75, 0x20, 0x76, 0x61, 0x6e, 0x75, 0x61, 0x74, 0x75, 0x61, 0x6e, 0x3b, 0x3b,
+0x76, 0x61, 0x74, 0x75, 0x20, 0x76, 0x61, 0x6e, 0x75, 0x61, 0x74, 0x75, 0x61, 0x6e, 0x3b, 0x3b, 0x3b, 0x3b, 0x76, 0x61,
+0x74, 0x75, 0x73, 0x20, 0x76, 0x61, 0x6e, 0x75, 0x61, 0x74, 0x75, 0x61, 0x6e, 0x73, 0x3b, 0x50, 0x75, 0x6e, 0x6e, 0x64,
+0x20, 0x53, 0x61, 0x73, 0x61, 0x6e, 0x6e, 0x61, 0x63, 0x68, 0x3b, 0x3b, 0x70, 0x68, 0x75, 0x6e, 0x6e, 0x64, 0x20, 0x53,
+0x61, 0x73, 0x61, 0x6e, 0x6e, 0x61, 0x63, 0x68, 0x3b, 0x70, 0x68, 0x75, 0x6e, 0x6e, 0x64, 0x20, 0x53, 0x61, 0x73, 0x61,
+0x6e, 0x6e, 0x61, 0x63, 0x68, 0x3b, 0x70, 0x75, 0x69, 0x6e, 0x6e, 0x64, 0x20, 0x53, 0x68, 0x61, 0x73, 0x61, 0x6e, 0x6e,
+0x61, 0x63, 0x68, 0x3b, 0x3b, 0x70, 0x75, 0x6e, 0x6e, 0x64, 0x20, 0x53, 0x61, 0x73, 0x61, 0x6e, 0x6e, 0x61, 0x63, 0x68,
+0x3b, 0x10e5, 0x10d0, 0x10e0, 0x10d7, 0x10e3, 0x10da, 0x10d8, 0x20, 0x10da, 0x10d0, 0x10e0, 0x10d8, 0x3b, 0x3b, 0x10e5, 0x10d0, 0x10e0, 0x10d7, 0x10e3,
+0x10da, 0x10d8, 0x20, 0x10da, 0x10d0, 0x10e0, 0x10d8, 0x3b, 0x3b, 0x3b, 0x3b, 0x10e5, 0x10d0, 0x10e0, 0x10d7, 0x10e3, 0x10da, 0x10d8, 0x20, 0x10da,
+0x10d0, 0x10e0, 0x10d8, 0x3b, 0x45, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x45, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x45, 0x75,
+0x72, 0x6f, 0x3b, 0x53, 0x63, 0x68, 0x77, 0x65, 0x69, 0x7a, 0x65, 0x72, 0x20, 0x46, 0x72, 0x61, 0x6e, 0x6b, 0x65, 0x6e,
+0x3b, 0x3b, 0x53, 0x63, 0x68, 0x77, 0x65, 0x69, 0x7a, 0x65, 0x72, 0x20, 0x46, 0x72, 0x61, 0x6e, 0x6b, 0x65, 0x6e, 0x3b,
+0x3b, 0x3b, 0x3b, 0x53, 0x63, 0x68, 0x77, 0x65, 0x69, 0x7a, 0x65, 0x72, 0x20, 0x46, 0x72, 0x61, 0x6e, 0x6b, 0x65, 0x6e,
+0x3b, 0x395, 0x3c5, 0x3c1, 0x3ce, 0x3b, 0x3b, 0x3b5, 0x3c5, 0x3c1, 0x3ce, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b5, 0x3c5, 0x3c1, 0x3ce, 0x3b,
+0x64, 0x61, 0x6e, 0x6d, 0x61, 0x72, 0x6b, 0x69, 0x6d, 0x75, 0x74, 0x20, 0x6b, 0x6f, 0x72, 0x75, 0x75, 0x6e, 0x69, 0x3b,
+0x3b, 0x64, 0x61, 0x6e, 0x73, 0x6b, 0x69, 0x6e, 0x75, 0x74, 0x20, 0x6b, 0x6f, 0x72, 0x75, 0x75, 0x6e, 0x69, 0x3b, 0x3b,
+0x3b, 0x3b, 0x64, 0x61, 0x6e, 0x6d, 0x61, 0x72, 0x6b, 0x69, 0x6d, 0x75, 0x74, 0x20, 0x6b, 0x6f, 0x72, 0x75, 0x75, 0x6e,
+0x69, 0x3b, 0xaad, 0xabe, 0xab0, 0xaa4, 0xac0, 0xaaf, 0x20, 0xab0, 0xac2, 0xaaa, 0xabf, 0xaaf, 0xabe, 0x3b, 0x3b, 0xaad, 0xabe, 0xab0,
+0xaa4, 0xac0, 0xaaf, 0x20, 0xab0, 0xac2, 0xaaa, 0xabf, 0xaaf, 0xabe, 0x3b, 0x3b, 0x3b, 0x3b, 0xaad, 0xabe, 0xab0, 0xaa4, 0xac0, 0xaaf,
+0x20, 0xab0, 0xac2, 0xaaa, 0xabf, 0xaaf, 0xabe, 0x3b, 0x4e, 0x61, 0x69, 0x72, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
+0x4b, 0x75, 0x257, 0x69, 0x6e, 0x20, 0x53, 0x65, 0x66, 0x61, 0x20, 0x6e, 0x61, 0x20, 0x41, 0x66, 0x69, 0x72, 0x6b, 0x61,
+0x20, 0x54, 0x61, 0x20, 0x59, 0x61, 0x6d, 0x6d, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x5e9, 0x5e7, 0x5dc, 0x20,
+0x5d7, 0x5d3, 0x5e9, 0x3b, 0x3b, 0x5e9, 0x5e7, 0x5dc, 0x20, 0x5d7, 0x5d3, 0x5e9, 0x3b, 0x5e9, 0x5e7, 0x5dc, 0x5d9, 0x5dd, 0x20, 0x5d7,
+0x5d3, 0x5e9, 0x5d9, 0x5dd, 0x3b, 0x3b, 0x5e9, 0x5e7, 0x5dc, 0x5d9, 0x5dd, 0x20, 0x5d7, 0x5d3, 0x5e9, 0x5d9, 0x5dd, 0x3b, 0x5e9, 0x5e7,
+0x5dc, 0x5d9, 0x5dd, 0x20, 0x5d7, 0x5d3, 0x5e9, 0x5d9, 0x5dd, 0x3b, 0x92d, 0x93e, 0x930, 0x924, 0x940, 0x92f, 0x20, 0x930, 0x941, 0x92a,
+0x92f, 0x93e, 0x3b, 0x3b, 0x92d, 0x93e, 0x930, 0x924, 0x940, 0x92f, 0x20, 0x930, 0x941, 0x92a, 0x92f, 0x93e, 0x3b, 0x3b, 0x3b, 0x3b,
+0x92d, 0x93e, 0x930, 0x924, 0x940, 0x92f, 0x20, 0x930, 0x942, 0x92a, 0x90f, 0x3b, 0x6d, 0x61, 0x67, 0x79, 0x61, 0x72, 0x20, 0x66,
+0x6f, 0x72, 0x69, 0x6e, 0x74, 0x3b, 0x3b, 0x6d, 0x61, 0x67, 0x79, 0x61, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x69, 0x6e, 0x74,
+0x3b, 0x3b, 0x3b, 0x3b, 0x6d, 0x61, 0x67, 0x79, 0x61, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x69, 0x6e, 0x74, 0x3b, 0xed, 0x73,
+0x6c, 0x65, 0x6e, 0x73, 0x6b, 0x20, 0x6b, 0x72, 0xf3, 0x6e, 0x61, 0x3b, 0x3b, 0xed, 0x73, 0x6c, 0x65, 0x6e, 0x73, 0x6b,
+0x20, 0x6b, 0x72, 0xf3, 0x6e, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0xed, 0x73, 0x6c, 0x65, 0x6e, 0x73, 0x6b, 0x61, 0x72, 0x20,
+0x6b, 0x72, 0xf3, 0x6e, 0x75, 0x72, 0x3b, 0x52, 0x75, 0x70, 0x69, 0x61, 0x68, 0x20, 0x49, 0x6e, 0x64, 0x6f, 0x6e, 0x65,
+0x73, 0x69, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x52, 0x75, 0x70, 0x69, 0x61, 0x68, 0x20, 0x49, 0x6e, 0x64, 0x6f,
+0x6e, 0x65, 0x73, 0x69, 0x61, 0x3b, 0x45, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x65, 0x75, 0x72,
+0x6f, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x65, 0x75, 0x72,
+0x6f, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x66, 0x72, 0x61, 0x6e,
+0x63, 0x6f, 0x20, 0x73, 0x76, 0x69, 0x7a, 0x7a, 0x65, 0x72, 0x6f, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x6f, 0x20,
+0x73, 0x76, 0x69, 0x7a, 0x7a, 0x65, 0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x69, 0x20,
+0x73, 0x76, 0x69, 0x7a, 0x7a, 0x65, 0x72, 0x69, 0x3b, 0x65e5, 0x672c, 0x5186, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x5186, 0x3b,
+0xcad, 0xcbe, 0xcb0, 0xca4, 0xcc0, 0xcaf, 0x20, 0xcb0, 0xcc2, 0xcaa, 0xcbe, 0xcaf, 0xcbf, 0x3b, 0x3b, 0xcad, 0xcbe, 0xcb0, 0xca4, 0xcc0,
+0xcaf, 0x20, 0xcb0, 0xcc2, 0xcaa, 0xcbe, 0xcaf, 0xcbf, 0x3b, 0x3b, 0x3b, 0x3b, 0xcad, 0xcbe, 0xcb0, 0xca4, 0xcc0, 0xcaf, 0x20, 0xcb0,
+0xcc2, 0xcaa, 0xcbe, 0xcaf, 0xcbf, 0xc97, 0xcb3, 0xcc1, 0x3b, 0x6c1, 0x650, 0x646, 0x62f, 0x64f, 0x633, 0x62a, 0x672, 0x646, 0x6cd, 0x20,
+0x631, 0x6c4, 0x67e, 0x64e, 0x6d2, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x49a, 0x430, 0x437, 0x430, 0x49b, 0x441, 0x442, 0x430,
+0x43d, 0x20, 0x442, 0x435, 0x4a3, 0x433, 0x435, 0x441, 0x456, 0x3b, 0x3b, 0x49a, 0x430, 0x437, 0x430, 0x49b, 0x441, 0x442, 0x430, 0x43d,
+0x20, 0x442, 0x435, 0x4a3, 0x433, 0x435, 0x441, 0x456, 0x3b, 0x3b, 0x3b, 0x3b, 0x49a, 0x430, 0x437, 0x430, 0x49b, 0x441, 0x442, 0x430,
+0x43d, 0x20, 0x442, 0x435, 0x4a3, 0x433, 0x435, 0x441, 0x456, 0x3b, 0x41a, 0x44b, 0x440, 0x433, 0x44b, 0x437, 0x441, 0x442, 0x430, 0x43d,
+0x20, 0x441, 0x43e, 0x43c, 0x443, 0x3b, 0x3b, 0x41a, 0x44b, 0x440, 0x433, 0x44b, 0x437, 0x441, 0x442, 0x430, 0x43d, 0x20, 0x441, 0x43e,
+0x43c, 0x443, 0x3b, 0x3b, 0x3b, 0x3b, 0x41a, 0x44b, 0x440, 0x433, 0x44b, 0x437, 0x441, 0x442, 0x430, 0x43d, 0x20, 0x441, 0x43e, 0x43c,
+0x443, 0x3b, 0xb300, 0xd55c, 0xbbfc, 0xad6d, 0x20, 0xc6d0, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0xb300, 0xd55c, 0xbbfc, 0xad6d, 0x20, 0xc6d0,
+0x3b, 0xc870, 0xc120, 0x20, 0xbbfc, 0xc8fc, 0xc8fc, 0xc758, 0x20, 0xc778, 0xbbfc, 0x20, 0xacf5, 0xd654, 0xad6d, 0x20, 0xc6d0, 0x3b, 0x3b, 0x3b,
+0x3b, 0x3b, 0x3b, 0xc870, 0xc120, 0x20, 0xbbfc, 0xc8fc, 0xc8fc, 0xc758, 0x20, 0xc778, 0xbbfc, 0x20, 0xacf5, 0xd654, 0xad6d, 0x20, 0xc6d0, 0x3b,
+0x49, 0x66, 0x61, 0x72, 0x61, 0x6e, 0x67, 0x61, 0x20, 0x72, 0x79, 0x2019, 0x55, 0x62, 0x75, 0x72, 0x75, 0x6e, 0x64, 0x69,
+0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0xea5, 0xeb2, 0xea7, 0x20, 0xe81, 0xeb5, 0xe9a, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
+0xea5, 0xeb2, 0xea7, 0x20, 0xe81, 0xeb5, 0xe9a, 0x3b, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x65, 0x69,
+0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x46, 0x61, 0x6c, 0xe1, 0x6e, 0x67, 0x61, 0x20, 0x79,
+0x61, 0x20, 0x4b, 0x6f, 0x6e, 0x67, 0xf3, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x4b, 0x77, 0x61, 0x6e, 0x7a, 0x61,
+0x20, 0x79, 0x61, 0x20, 0x41, 0x6e, 0x67, 0xf3, 0x6c, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x46, 0x61, 0x6c,
+0xe1, 0x6e, 0x67, 0x61, 0x20, 0x43, 0x46, 0x41, 0x20, 0x42, 0x45, 0x41, 0x43, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
+0x45, 0x75, 0x72, 0x61, 0x73, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x61, 0x73, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x61, 0x69, 0x3b,
+0x65, 0x75, 0x72, 0x6f, 0x3b, 0x65, 0x75, 0x72, 0x173, 0x3b, 0x41c, 0x430, 0x43a, 0x435, 0x434, 0x43e, 0x43d, 0x441, 0x43a, 0x438,
+0x20, 0x434, 0x435, 0x43d, 0x430, 0x440, 0x3b, 0x3b, 0x41c, 0x430, 0x43a, 0x435, 0x434, 0x43e, 0x43d, 0x441, 0x43a, 0x438, 0x20, 0x434,
+0x435, 0x43d, 0x430, 0x440, 0x3b, 0x3b, 0x3b, 0x3b, 0x41c, 0x430, 0x43a, 0x435, 0x434, 0x43e, 0x43d, 0x441, 0x43a, 0x438, 0x20, 0x434,
+0x435, 0x43d, 0x430, 0x440, 0x438, 0x3b, 0x41, 0x72, 0x69, 0x61, 0x72, 0x79, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x52,
+0x69, 0x6e, 0x67, 0x67, 0x69, 0x74, 0x20, 0x4d, 0x61, 0x6c, 0x61, 0x79, 0x73, 0x69, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
+0x3b, 0x52, 0x69, 0x6e, 0x67, 0x67, 0x69, 0x74, 0x20, 0x4d, 0x61, 0x6c, 0x61, 0x79, 0x73, 0x69, 0x61, 0x3b, 0x44, 0x6f,
+0x6c, 0x61, 0x72, 0x20, 0x42, 0x72, 0x75, 0x6e, 0x65, 0x69, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x44, 0x6f, 0x6c, 0x61,
+0x72, 0x20, 0x42, 0x72, 0x75, 0x6e, 0x65, 0x69, 0x3b, 0x44, 0x6f, 0x6c, 0x61, 0x72, 0x20, 0x53, 0x69, 0x6e, 0x67, 0x61,
+0x70, 0x75, 0x72, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x44, 0x6f, 0x6c, 0x61, 0x72, 0x20, 0x53, 0x69, 0x6e, 0x67,
+0x61, 0x70, 0x75, 0x72, 0x61, 0x3b, 0xd07, 0xd28, 0xd4d, 0xd24, 0xd4d, 0xd2f, 0xd7b, 0x20, 0xd30, 0xd42, 0xd2a, 0x3b, 0x3b, 0xd07,
+0xd28, 0xd4d, 0xd24, 0xd4d, 0xd2f, 0xd7b, 0x20, 0xd30, 0xd42, 0xd2a, 0x3b, 0x3b, 0x3b, 0x3b, 0xd07, 0xd28, 0xd4d, 0xd24, 0xd4d, 0xd2f,
+0xd7b, 0x20, 0xd30, 0xd42, 0xd2a, 0x3b, 0x65, 0x77, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x77, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x77,
+0x72, 0x6f, 0x3b, 0x65, 0x77, 0x72, 0x6f, 0x3b, 0x65, 0x77, 0x72, 0x6f, 0x3b, 0x92d, 0x93e, 0x930, 0x924, 0x940, 0x92f, 0x20,
+0x930, 0x941, 0x92a, 0x92f, 0x93e, 0x3b, 0x3b, 0x92d, 0x93e, 0x930, 0x924, 0x940, 0x92f, 0x20, 0x930, 0x941, 0x92a, 0x92f, 0x93e, 0x3b,
+0x3b, 0x3b, 0x3b, 0x92d, 0x93e, 0x930, 0x924, 0x940, 0x92f, 0x20, 0x930, 0x941, 0x92a, 0x92f, 0x947, 0x3b, 0x442, 0x4e9, 0x433, 0x440,
+0x4e9, 0x433, 0x3b, 0x3b, 0x442, 0x4e9, 0x433, 0x440, 0x4e9, 0x433, 0x3b, 0x3b, 0x3b, 0x3b, 0x442, 0x4e9, 0x433, 0x440, 0x4e9, 0x433,
+0x3b, 0x928, 0x947, 0x92a, 0x93e, 0x932, 0x940, 0x20, 0x930, 0x942, 0x92a, 0x948, 0x92f, 0x93e, 0x901, 0x3b, 0x3b, 0x928, 0x947, 0x92a,
+0x93e, 0x932, 0x940, 0x20, 0x930, 0x942, 0x92a, 0x948, 0x92f, 0x93e, 0x901, 0x3b, 0x3b, 0x3b, 0x3b, 0x928, 0x947, 0x92a, 0x93e, 0x932,
+0x940, 0x20, 0x930, 0x942, 0x92a, 0x948, 0x92f, 0x93e, 0x901, 0x3b, 0x92d, 0x93e, 0x930, 0x924, 0x940, 0x92f, 0x20, 0x930, 0x942, 0x92a,
+0x93f, 0x901, 0x92f, 0x93e, 0x3b, 0x3b, 0x92d, 0x93e, 0x930, 0x924, 0x940, 0x92f, 0x20, 0x930, 0x942, 0x92a, 0x93f, 0x901, 0x92f, 0x93e,
+0x3b, 0x3b, 0x3b, 0x3b, 0x92d, 0x93e, 0x930, 0x924, 0x940, 0x92f, 0x20, 0x930, 0x942, 0x92a, 0x93f, 0x901, 0x92f, 0x93e, 0x3b, 0x6e,
+0x6f, 0x72, 0x73, 0x6b, 0x65, 0x20, 0x6b, 0x72, 0x6f, 0x6e, 0x65, 0x72, 0x3b, 0x3b, 0x6e, 0x6f, 0x72, 0x73, 0x6b, 0x20,
+0x6b, 0x72, 0x6f, 0x6e, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x6e, 0x6f, 0x72, 0x73, 0x6b, 0x65, 0x20, 0x6b, 0x72, 0x6f, 0x6e,
+0x65, 0x72, 0x3b, 0xb2d, 0xb3e, 0xb30, 0xb24, 0xb40, 0xb5f, 0x20, 0xb1f, 0xb19, 0xb4d, 0xb15, 0xb3e, 0x3b, 0x3b, 0xb2d, 0xb3e, 0xb30,
+0xb24, 0xb40, 0xb5f, 0x20, 0xb1f, 0xb19, 0xb4d, 0xb15, 0xb3e, 0x3b, 0x3b, 0x3b, 0x3b, 0xb2d, 0xb3e, 0xb30, 0xb24, 0xb40, 0xb5f, 0x20,
+0xb1f, 0xb19, 0xb4d, 0xb15, 0xb3e, 0x3b, 0x627, 0x641, 0x63a, 0x627, 0x646, 0x6cd, 0x3b, 0x3b, 0x627, 0x641, 0x63a, 0x627, 0x646, 0x6cd,
+0x3b, 0x3b, 0x3b, 0x3b, 0x627, 0x641, 0x63a, 0x627, 0x646, 0x6cd, 0x3b, 0x631, 0x6cc, 0x627, 0x644, 0x20, 0x627, 0x6cc, 0x631, 0x627,
+0x646, 0x3b, 0x3b, 0x631, 0x6cc, 0x627, 0x644, 0x20, 0x627, 0x6cc, 0x631, 0x627, 0x646, 0x3b, 0x3b, 0x3b, 0x3b, 0x631, 0x6cc, 0x627,
+0x644, 0x20, 0x627, 0x6cc, 0x631, 0x627, 0x646, 0x3b, 0x627, 0x641, 0x63a, 0x627, 0x646, 0x6cc, 0x20, 0x627, 0x641, 0x63a, 0x627, 0x646,
+0x633, 0x62a, 0x627, 0x646, 0x3b, 0x3b, 0x627, 0x641, 0x63a, 0x627, 0x646, 0x6cc, 0x20, 0x627, 0x641, 0x63a, 0x627, 0x646, 0x633, 0x62a,
+0x627, 0x646, 0x3b, 0x3b, 0x3b, 0x3b, 0x627, 0x641, 0x63a, 0x627, 0x646, 0x6cc, 0x20, 0x627, 0x641, 0x63a, 0x627, 0x646, 0x633, 0x62a,
+0x627, 0x646, 0x3b, 0x7a, 0x142, 0x6f, 0x74, 0x79, 0x20, 0x70, 0x6f, 0x6c, 0x73, 0x6b, 0x69, 0x3b, 0x3b, 0x7a, 0x142, 0x6f,
+0x74, 0x79, 0x20, 0x70, 0x6f, 0x6c, 0x73, 0x6b, 0x69, 0x3b, 0x3b, 0x7a, 0x142, 0x6f, 0x74, 0x65, 0x20, 0x70, 0x6f, 0x6c,
+0x73, 0x6b, 0x69, 0x65, 0x3b, 0x7a, 0x142, 0x6f, 0x74, 0x79, 0x63, 0x68, 0x20, 0x70, 0x6f, 0x6c, 0x73, 0x6b, 0x69, 0x63,
+0x68, 0x3b, 0x7a, 0x142, 0x6f, 0x74, 0x65, 0x67, 0x6f, 0x20, 0x70, 0x6f, 0x6c, 0x73, 0x6b, 0x69, 0x65, 0x67, 0x6f, 0x3b,
+0x52, 0x65, 0x61, 0x6c, 0x20, 0x62, 0x72, 0x61, 0x73, 0x69, 0x6c, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x3b, 0x52, 0x65, 0x61,
+0x6c, 0x20, 0x62, 0x72, 0x61, 0x73, 0x69, 0x6c, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x52, 0x65, 0x61, 0x69,
+0x73, 0x20, 0x62, 0x72, 0x61, 0x73, 0x69, 0x6c, 0x65, 0x69, 0x72, 0x6f, 0x73, 0x3b, 0x4b, 0x77, 0x61, 0x6e, 0x7a, 0x61,
+0x20, 0x61, 0x6e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x4b, 0x77, 0x61, 0x6e, 0x7a, 0x61, 0x20, 0x61, 0x6e,
+0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x4b, 0x77, 0x61, 0x6e, 0x7a, 0x61, 0x73, 0x20, 0x61, 0x6e,
+0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x6f, 0x73, 0x3b, 0x65, 0x73, 0x63, 0x75, 0x64, 0x6f, 0x20, 0x63, 0x61, 0x62, 0x6f, 0x2d,
+0x76, 0x65, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x65, 0x73, 0x63, 0x75, 0x64, 0x6f, 0x20, 0x63, 0x61, 0x62,
+0x6f, 0x2d, 0x76, 0x65, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x65, 0x73, 0x63, 0x75, 0x64, 0x6f,
+0x73, 0x20, 0x63, 0x61, 0x62, 0x6f, 0x2d, 0x76, 0x65, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x6f, 0x73, 0x3b, 0x64, 0xf3, 0x6c,
+0x61, 0x72, 0x20, 0x64, 0x6f, 0x73, 0x20, 0x45, 0x73, 0x74, 0x61, 0x64, 0x6f, 0x73, 0x20, 0x55, 0x6e, 0x69, 0x64, 0x6f,
+0x73, 0x3b, 0x3b, 0x64, 0xf3, 0x6c, 0x61, 0x72, 0x20, 0x64, 0x6f, 0x73, 0x20, 0x45, 0x73, 0x74, 0x61, 0x64, 0x6f, 0x73,
+0x20, 0x55, 0x6e, 0x69, 0x64, 0x6f, 0x73, 0x3b, 0x3b, 0x3b, 0x3b, 0x64, 0xf3, 0x6c, 0x61, 0x72, 0x65, 0x73, 0x20, 0x64,
+0x6f, 0x73, 0x20, 0x45, 0x73, 0x74, 0x61, 0x64, 0x6f, 0x73, 0x20, 0x55, 0x6e, 0x69, 0x64, 0x6f, 0x73, 0x3b, 0x46, 0x72,
+0x61, 0x6e, 0x63, 0x6f, 0x20, 0x43, 0x46, 0x41, 0x20, 0x28, 0x42, 0x45, 0x41, 0x43, 0x29, 0x3b, 0x3b, 0x46, 0x72, 0x61,
+0x6e, 0x63, 0x6f, 0x20, 0x43, 0x46, 0x41, 0x20, 0x28, 0x42, 0x45, 0x41, 0x43, 0x29, 0x3b, 0x3b, 0x3b, 0x3b, 0x46, 0x72,
+0x61, 0x6e, 0x63, 0x6f, 0x73, 0x20, 0x43, 0x46, 0x41, 0x20, 0x28, 0x42, 0x45, 0x41, 0x43, 0x29, 0x3b, 0x66, 0x72, 0x61,
+0x6e, 0x63, 0x6f, 0x20, 0x43, 0x46, 0x41, 0x20, 0x28, 0x42, 0x43, 0x45, 0x41, 0x4f, 0x29, 0x3b, 0x3b, 0x66, 0x72, 0x61,
+0x6e, 0x63, 0x6f, 0x20, 0x43, 0x46, 0x41, 0x20, 0x28, 0x42, 0x43, 0x45, 0x41, 0x4f, 0x29, 0x3b, 0x3b, 0x3b, 0x3b, 0x66,
+0x72, 0x61, 0x6e, 0x63, 0x6f, 0x73, 0x20, 0x43, 0x46, 0x41, 0x20, 0x28, 0x42, 0x43, 0x45, 0x41, 0x4f, 0x29, 0x3b, 0x50,
+0x61, 0x74, 0x61, 0x63, 0x61, 0x20, 0x64, 0x65, 0x20, 0x4d, 0x61, 0x63, 0x61, 0x75, 0x3b, 0x3b, 0x50, 0x61, 0x74, 0x61,
+0x63, 0x61, 0x20, 0x64, 0x65, 0x20, 0x4d, 0x61, 0x63, 0x61, 0x75, 0x3b, 0x3b, 0x3b, 0x3b, 0x50, 0x61, 0x74, 0x61, 0x63,
+0x61, 0x73, 0x20, 0x64, 0x65, 0x20, 0x4d, 0x61, 0x63, 0x61, 0x75, 0x3b, 0x4d, 0x65, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x20,
+0x64, 0x65, 0x20, 0x4d, 0x6f, 0xe7, 0x61, 0x6d, 0x62, 0x69, 0x71, 0x75, 0x65, 0x3b, 0x3b, 0x4d, 0x65, 0x74, 0x69, 0x63,
+0x61, 0x6c, 0x20, 0x64, 0x65, 0x20, 0x4d, 0x6f, 0xe7, 0x61, 0x6d, 0x62, 0x69, 0x71, 0x75, 0x65, 0x3b, 0x3b, 0x3b, 0x3b,
+0x4d, 0x65, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x65, 0x73, 0x20, 0x64, 0x65, 0x20, 0x4d, 0x6f, 0xe7, 0x61, 0x6d, 0x62, 0x69,
+0x71, 0x75, 0x65, 0x3b, 0x53, 0xe3, 0x6f, 0x20, 0x54, 0x6f, 0x6d, 0xe9, 0x20, 0x26, 0x20, 0x50, 0x72, 0xed, 0x6e, 0x63,
+0x69, 0x70, 0x65, 0x20, 0x44, 0x6f, 0x62, 0x72, 0x61, 0x20, 0x28, 0x32, 0x30, 0x31, 0x38, 0x29, 0x3b, 0x3b, 0x53, 0xe3,
+0x6f, 0x20, 0x54, 0x6f, 0x6d, 0xe9, 0x20, 0x26, 0x20, 0x50, 0x72, 0xed, 0x6e, 0x63, 0x69, 0x70, 0x65, 0x20, 0x64, 0x6f,
+0x62, 0x72, 0x61, 0x20, 0x28, 0x32, 0x30, 0x31, 0x38, 0x29, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0xe3, 0x6f, 0x20, 0x54, 0x6f,
+0x6d, 0xe9, 0x20, 0x26, 0x20, 0x50, 0x72, 0xed, 0x6e, 0x63, 0x69, 0x70, 0x65, 0x20, 0x64, 0x6f, 0x62, 0x72, 0x61, 0x73,
+0x20, 0x28, 0x32, 0x30, 0x31, 0x38, 0x29, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x6f, 0x20, 0x73, 0x75, 0xed, 0xe7, 0x6f,
+0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x6f, 0x20, 0x73, 0x75, 0xed, 0xe7, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72,
+0x61, 0x6e, 0x63, 0x6f, 0x73, 0x20, 0x73, 0x75, 0xed, 0xe7, 0x6f, 0x73, 0x3b, 0xa2d, 0xa3e, 0xa30, 0xa24, 0xa40, 0x20, 0xa30,
+0xa41, 0xa2a, 0xa07, 0xa06, 0x3b, 0x3b, 0xa2d, 0xa3e, 0xa30, 0xa24, 0xa40, 0x20, 0xa30, 0xa41, 0xa2a, 0xa07, 0xa06, 0x3b, 0x3b, 0x3b,
+0x3b, 0xa2d, 0xa3e, 0xa30, 0xa24, 0xa40, 0x20, 0xa30, 0xa41, 0xa2a, 0xa0f, 0x3b, 0x631, 0x648, 0x67e, 0x626, 0x6cc, 0x6c1, 0x3b, 0x3b,
+0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x73, 0x76, 0x69, 0x7a, 0x7a, 0x65, 0x72, 0x3b, 0x3b,
+0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x73, 0x76, 0x69, 0x7a, 0x7a, 0x65, 0x72, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72, 0x61,
+0x6e, 0x63, 0x20, 0x73, 0x76, 0x69, 0x7a, 0x7a, 0x65, 0x72, 0x3b, 0x6c, 0x65, 0x75, 0x20, 0x72, 0x6f, 0x6d, 0xe2, 0x6e,
+0x65, 0x73, 0x63, 0x3b, 0x3b, 0x6c, 0x65, 0x75, 0x20, 0x72, 0x6f, 0x6d, 0xe2, 0x6e, 0x65, 0x73, 0x63, 0x3b, 0x3b, 0x6c,
+0x65, 0x69, 0x20, 0x72, 0x6f, 0x6d, 0xe2, 0x6e, 0x65, 0x219, 0x74, 0x69, 0x3b, 0x3b, 0x6c, 0x65, 0x69, 0x20, 0x72, 0x6f,
+0x6d, 0xe2, 0x6e, 0x65, 0x219, 0x74, 0x69, 0x3b, 0x6c, 0x65, 0x75, 0x20, 0x6d, 0x6f, 0x6c, 0x64, 0x6f, 0x76, 0x65, 0x6e,
+0x65, 0x73, 0x63, 0x3b, 0x3b, 0x6c, 0x65, 0x75, 0x20, 0x6d, 0x6f, 0x6c, 0x64, 0x6f, 0x76, 0x65, 0x6e, 0x65, 0x73, 0x63,
+0x3b, 0x3b, 0x6c, 0x65, 0x69, 0x20, 0x6d, 0x6f, 0x6c, 0x64, 0x6f, 0x76, 0x65, 0x6e, 0x65, 0x219, 0x74, 0x69, 0x3b, 0x3b,
+0x6c, 0x65, 0x69, 0x20, 0x6d, 0x6f, 0x6c, 0x64, 0x6f, 0x76, 0x65, 0x6e, 0x65, 0x219, 0x74, 0x69, 0x3b, 0x440, 0x43e, 0x441,
+0x441, 0x438, 0x439, 0x441, 0x43a, 0x438, 0x439, 0x20, 0x440, 0x443, 0x431, 0x43b, 0x44c, 0x3b, 0x3b, 0x440, 0x43e, 0x441, 0x441, 0x438,
+0x439, 0x441, 0x43a, 0x438, 0x439, 0x20, 0x440, 0x443, 0x431, 0x43b, 0x44c, 0x3b, 0x3b, 0x440, 0x43e, 0x441, 0x441, 0x438, 0x439, 0x441,
+0x43a, 0x438, 0x445, 0x20, 0x440, 0x443, 0x431, 0x43b, 0x44f, 0x3b, 0x440, 0x43e, 0x441, 0x441, 0x438, 0x439, 0x441, 0x43a, 0x438, 0x445,
+0x20, 0x440, 0x443, 0x431, 0x43b, 0x435, 0x439, 0x3b, 0x440, 0x43e, 0x441, 0x441, 0x438, 0x439, 0x441, 0x43a, 0x43e, 0x433, 0x43e, 0x20,
+0x440, 0x443, 0x431, 0x43b, 0x44f, 0x3b, 0x431, 0x435, 0x43b, 0x43e, 0x440, 0x443, 0x441, 0x441, 0x43a, 0x438, 0x439, 0x20, 0x440, 0x443,
+0x431, 0x43b, 0x44c, 0x3b, 0x3b, 0x431, 0x435, 0x43b, 0x43e, 0x440, 0x443, 0x441, 0x441, 0x43a, 0x438, 0x439, 0x20, 0x440, 0x443, 0x431,
+0x43b, 0x44c, 0x3b, 0x3b, 0x431, 0x435, 0x43b, 0x43e, 0x440, 0x443, 0x441, 0x441, 0x43a, 0x438, 0x445, 0x20, 0x440, 0x443, 0x431, 0x43b,
+0x44f, 0x3b, 0x431, 0x435, 0x43b, 0x43e, 0x440, 0x443, 0x441, 0x441, 0x43a, 0x438, 0x445, 0x20, 0x440, 0x443, 0x431, 0x43b, 0x435, 0x439,
+0x3b, 0x431, 0x435, 0x43b, 0x43e, 0x440, 0x443, 0x441, 0x441, 0x43a, 0x43e, 0x433, 0x43e, 0x20, 0x440, 0x443, 0x431, 0x43b, 0x44f, 0x3b,
+0x43a, 0x430, 0x437, 0x430, 0x445, 0x441, 0x43a, 0x438, 0x439, 0x20, 0x442, 0x435, 0x43d, 0x433, 0x435, 0x3b, 0x3b, 0x43a, 0x430, 0x437,
+0x430, 0x445, 0x441, 0x43a, 0x438, 0x439, 0x20, 0x442, 0x435, 0x43d, 0x433, 0x435, 0x3b, 0x3b, 0x43a, 0x430, 0x437, 0x430, 0x445, 0x441,
+0x43a, 0x438, 0x445, 0x20, 0x442, 0x435, 0x43d, 0x433, 0x435, 0x3b, 0x43a, 0x430, 0x437, 0x430, 0x445, 0x441, 0x43a, 0x438, 0x445, 0x20,
+0x442, 0x435, 0x43d, 0x433, 0x435, 0x3b, 0x43a, 0x430, 0x437, 0x430, 0x445, 0x441, 0x43a, 0x43e, 0x433, 0x43e, 0x20, 0x442, 0x435, 0x43d,
+0x433, 0x435, 0x3b, 0x43a, 0x438, 0x440, 0x433, 0x438, 0x437, 0x441, 0x43a, 0x438, 0x439, 0x20, 0x441, 0x43e, 0x43c, 0x3b, 0x3b, 0x43a,
+0x438, 0x440, 0x433, 0x438, 0x437, 0x441, 0x43a, 0x438, 0x439, 0x20, 0x441, 0x43e, 0x43c, 0x3b, 0x3b, 0x43a, 0x438, 0x440, 0x433, 0x438,
+0x437, 0x441, 0x43a, 0x438, 0x445, 0x20, 0x441, 0x43e, 0x43c, 0x430, 0x3b, 0x43a, 0x438, 0x440, 0x433, 0x438, 0x437, 0x441, 0x43a, 0x438,
+0x445, 0x20, 0x441, 0x43e, 0x43c, 0x43e, 0x432, 0x3b, 0x43a, 0x438, 0x440, 0x433, 0x438, 0x437, 0x441, 0x43a, 0x43e, 0x433, 0x43e, 0x20,
+0x441, 0x43e, 0x43c, 0x430, 0x3b, 0x43c, 0x43e, 0x43b, 0x434, 0x430, 0x432, 0x441, 0x43a, 0x438, 0x439, 0x20, 0x43b, 0x435, 0x439, 0x3b,
+0x3b, 0x43c, 0x43e, 0x43b, 0x434, 0x430, 0x432, 0x441, 0x43a, 0x438, 0x439, 0x20, 0x43b, 0x435, 0x439, 0x3b, 0x3b, 0x43c, 0x43e, 0x43b,
+0x434, 0x430, 0x432, 0x441, 0x43a, 0x438, 0x445, 0x20, 0x43b, 0x435, 0x44f, 0x3b, 0x43c, 0x43e, 0x43b, 0x434, 0x430, 0x432, 0x441, 0x43a,
+0x438, 0x445, 0x20, 0x43b, 0x435, 0x435, 0x432, 0x3b, 0x43c, 0x43e, 0x43b, 0x434, 0x430, 0x432, 0x441, 0x43a, 0x43e, 0x433, 0x43e, 0x20,
+0x43b, 0x435, 0x44f, 0x3b, 0x443, 0x43a, 0x440, 0x430, 0x438, 0x43d, 0x441, 0x43a, 0x430, 0x44f, 0x20, 0x433, 0x440, 0x438, 0x432, 0x43d,
+0x430, 0x3b, 0x3b, 0x443, 0x43a, 0x440, 0x430, 0x438, 0x43d, 0x441, 0x43a, 0x430, 0x44f, 0x20, 0x433, 0x440, 0x438, 0x432, 0x43d, 0x430,
+0x3b, 0x3b, 0x443, 0x43a, 0x440, 0x430, 0x438, 0x43d, 0x441, 0x43a, 0x438, 0x435, 0x20, 0x433, 0x440, 0x438, 0x432, 0x43d, 0x44b, 0x3b,
+0x443, 0x43a, 0x440, 0x430, 0x438, 0x43d, 0x441, 0x43a, 0x438, 0x445, 0x20, 0x433, 0x440, 0x438, 0x432, 0x435, 0x43d, 0x3b, 0x443, 0x43a,
+0x440, 0x430, 0x438, 0x43d, 0x441, 0x43a, 0x43e, 0x439, 0x20, 0x433, 0x440, 0x438, 0x432, 0x43d, 0x44b, 0x3b, 0x66, 0x61, 0x72, 0xe2,
+0x6e, 0x67, 0x61, 0x20, 0x43, 0x46, 0x41, 0x20, 0x28, 0x42, 0x45, 0x41, 0x43, 0x29, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
+0x3b, 0x421, 0x440, 0x43f, 0x441, 0x43a, 0x438, 0x20, 0x434, 0x438, 0x43d, 0x430, 0x440, 0x3b, 0x3b, 0x441, 0x440, 0x43f, 0x441, 0x43a,
+0x438, 0x20, 0x434, 0x438, 0x43d, 0x430, 0x440, 0x3b, 0x3b, 0x441, 0x440, 0x43f, 0x441, 0x43a, 0x430, 0x20, 0x434, 0x438, 0x43d, 0x430,
+0x440, 0x430, 0x3b, 0x3b, 0x441, 0x440, 0x43f, 0x441, 0x43a, 0x438, 0x445, 0x20, 0x434, 0x438, 0x43d, 0x430, 0x440, 0x430, 0x3b, 0x411,
+0x43e, 0x441, 0x430, 0x43d, 0x441, 0x43a, 0x43e, 0x2d, 0x445, 0x435, 0x440, 0x446, 0x435, 0x433, 0x43e, 0x432, 0x430, 0x447, 0x43a, 0x430,
+0x20, 0x43a, 0x43e, 0x43d, 0x432, 0x435, 0x440, 0x442, 0x438, 0x431, 0x438, 0x43b, 0x43d, 0x430, 0x20, 0x43c, 0x430, 0x440, 0x43a, 0x430,
0x3b, 0x3b, 0x431, 0x43e, 0x441, 0x430, 0x43d, 0x441, 0x43a, 0x43e, 0x2d, 0x445, 0x435, 0x440, 0x446, 0x435, 0x433, 0x43e, 0x432, 0x430,
-0x447, 0x43a, 0x438, 0x445, 0x20, 0x43a, 0x43e, 0x43d, 0x432, 0x435, 0x440, 0x442, 0x438, 0x431, 0x438, 0x43b, 0x43d, 0x438, 0x445, 0x20,
-0x43c, 0x430, 0x440, 0x430, 0x43a, 0x430, 0x3b, 0x47, 0x68, 0x61, 0x6e, 0x61, 0x20, 0x53, 0x69, 0x64, 0x69, 0x3b, 0x3b, 0x3b,
-0x3b, 0x3b, 0x3b, 0x3b, 0x4e, 0x61, 0x1ecb, 0x72, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x69, 0x6c, 0x69,
-0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x4b, 0x65, 0x6e, 0x79, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x67,
-0x68, 0x61, 0x6e, 0x61, 0x20, 0x73, 0x69, 0x256, 0x69, 0x3b, 0x3b, 0x67, 0x68, 0x61, 0x6e, 0x61, 0x20, 0x73, 0x69, 0x256,
-0x69, 0x3b, 0x3b, 0x3b, 0x3b, 0x67, 0x68, 0x61, 0x6e, 0x61, 0x20, 0x73, 0x69, 0x256, 0x69, 0x3b, 0x263, 0x65, 0x74, 0x6f,
-0x256, 0x6f, 0x66, 0x65, 0x20, 0x61, 0x66, 0x72, 0x69, 0x6b, 0x61, 0x67, 0x61, 0x20, 0x43, 0x46, 0x41, 0x20, 0x66, 0x72,
-0x61, 0x6e, 0x63, 0x20, 0x42, 0x43, 0x45, 0x41, 0x4f, 0x3b, 0x3b, 0x263, 0x65, 0x74, 0x6f, 0x256, 0x6f, 0x66, 0x65, 0x20,
-0x61, 0x66, 0x72, 0x69, 0x6b, 0x61, 0x67, 0x61, 0x20, 0x43, 0x46, 0x41, 0x20, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x42,
-0x43, 0x45, 0x41, 0x4f, 0x3b, 0x3b, 0x3b, 0x3b, 0x263, 0x65, 0x74, 0x6f, 0x256, 0x6f, 0x66, 0x65, 0x20, 0x61, 0x66, 0x72,
-0x69, 0x6b, 0x61, 0x67, 0x61, 0x20, 0x43, 0x46, 0x41, 0x20, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x42, 0x43, 0x45, 0x41,
-0x4f, 0x3b, 0x50, 0x69, 0x73, 0x6f, 0x20, 0x6e, 0x67, 0x20, 0x50, 0x69, 0x6c, 0x69, 0x70, 0x69, 0x6e, 0x61, 0x73, 0x3b,
-0x3b, 0x70, 0x69, 0x73, 0x6f, 0x20, 0x6e, 0x67, 0x20, 0x50, 0x69, 0x6c, 0x69, 0x70, 0x69, 0x6e, 0x61, 0x73, 0x3b, 0x3b,
-0x3b, 0x3b, 0x70, 0x69, 0x73, 0x6f, 0x20, 0x6e, 0x67, 0x20, 0x50, 0x69, 0x6c, 0x69, 0x70, 0x69, 0x6e, 0x61, 0x73, 0x3b,
-0x53, 0x63, 0x68, 0x77, 0x69, 0x69, 0x7a, 0x65, 0x72, 0x20, 0x46, 0x72, 0x61, 0x6e, 0x6b, 0x65, 0x3b, 0x3b, 0x53, 0x63,
-0x68, 0x77, 0x69, 0x69, 0x7a, 0x65, 0x72, 0x20, 0x46, 0x72, 0x61, 0x6e, 0x6b, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x63,
-0x68, 0x77, 0x69, 0x69, 0x7a, 0x65, 0x72, 0x20, 0x46, 0x72, 0x61, 0x6e, 0x6b, 0x65, 0x3b, 0x45, 0x75, 0x72, 0x6f, 0x3b,
-0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x45, 0x75, 0x72, 0x6f, 0x3b, 0x6e, 0x6f, 0x72, 0x67, 0x67, 0x61, 0x20, 0x6b, 0x72, 0x75,
-0x76, 0x64, 0x6e, 0x6f, 0x3b, 0x3b, 0x6e, 0x6f, 0x72, 0x67, 0x67, 0x61, 0x20, 0x6b, 0x72, 0x75, 0x76, 0x64, 0x6e, 0x6f,
-0x3b, 0x6e, 0x6f, 0x72, 0x67, 0x67, 0x61, 0x20, 0x6b, 0x72, 0x75, 0x76, 0x64, 0x6e, 0x6f, 0x3b, 0x3b, 0x3b, 0x6e, 0x6f,
-0x72, 0x67, 0x67, 0x61, 0x20, 0x6b, 0x72, 0x75, 0x76, 0x64, 0x6e, 0x6f, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x65,
-0x75, 0x72, 0x6f, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x72, 0x75, 0x6f, 0x167,
-0x167, 0x61, 0x20, 0x6b, 0x72, 0x75, 0x76, 0x64, 0x6e, 0x6f, 0x3b, 0x3b, 0x72, 0x75, 0x6f, 0x167, 0x167, 0x61, 0x20, 0x6b,
-0x72, 0x75, 0x76, 0x64, 0x6e, 0x6f, 0x3b, 0x72, 0x75, 0x6f, 0x167, 0x167, 0x61, 0x20, 0x6b, 0x72, 0x75, 0x76, 0x64, 0x6e,
-0x6f, 0x3b, 0x3b, 0x3b, 0x72, 0x75, 0x6f, 0x167, 0x167, 0x61, 0x20, 0x6b, 0x72, 0x75, 0x76, 0x64, 0x6e, 0x6f, 0x3b, 0x53,
-0x68, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x4b, 0x65, 0x6e, 0x79, 0x61, 0x3b, 0x3b, 0x3b, 0x3b,
-0x3b, 0x3b, 0x3b, 0x4d, 0x62, 0x75, 0x75, 0x257, 0x75, 0x20, 0x53, 0x65, 0x65, 0x66, 0x61, 0x61, 0x20, 0x42, 0x43, 0x45,
-0x41, 0x4f, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x4d, 0x62, 0x75, 0x75, 0x257, 0x69, 0x20, 0x53, 0x65, 0x65, 0x66,
-0x61, 0x61, 0x20, 0x42, 0x45, 0x41, 0x43, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x55, 0x67, 0x69, 0x79, 0x79, 0x61,
-0x20, 0x4d, 0x75, 0x72, 0x69, 0x74, 0x61, 0x6e, 0x69, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x43, 0x69, 0x72, 0x69,
-0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x4b, 0x65, 0x6e, 0x79, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x4e,
-0x6a, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x65, 0x65, 0x6c, 0x20, 0x4b, 0x65, 0x6e, 0x79, 0x61, 0x3b, 0x3b, 0x3b,
-0x3b, 0x3b, 0x3b, 0x3b, 0x4d, 0x65, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x64, 0x65, 0x20, 0x4d, 0x6f, 0xe7, 0x61, 0x6d,
-0x62, 0x69, 0x71, 0x75, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x44, 0x6f, 0x6c, 0x61, 0x20, 0x79, 0x61, 0x73,
-0x65, 0x20, 0x41, 0x6d, 0x65, 0x6c, 0x69, 0x6b, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x68, 0x65, 0x6c, 0x65,
-0x72, 0x69, 0x20, 0x73, 0x61, 0x20, 0x54, 0x61, 0x6e, 0x7a, 0x61, 0x6e, 0x69, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
-0x3b, 0x2d30, 0x2d37, 0x2d54, 0x2d49, 0x2d4e, 0x20, 0x2d4f, 0x20, 0x2d4d, 0x2d4e, 0x2d56, 0x2d54, 0x2d49, 0x2d31, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
-0x3b, 0x3b, 0x61, 0x64, 0x72, 0x69, 0x6d, 0x20, 0x6e, 0x20, 0x6c, 0x6d, 0x263, 0x72, 0x69, 0x62, 0x3b, 0x3b, 0x3b, 0x3b,
-0x3b, 0x3b, 0x3b, 0x41, 0x64, 0x69, 0x6e, 0x61, 0x72, 0x20, 0x41, 0x7a, 0x7a, 0x61, 0x79, 0x72, 0x69, 0x3b, 0x3b, 0x3b,
-0x3b, 0x3b, 0x3b, 0x3b, 0x45, 0x73, 0x68, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x55, 0x67, 0x61,
-0x6e, 0x64, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x68, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x79,
-0x61, 0x20, 0x48, 0x75, 0x74, 0x61, 0x6e, 0x7a, 0x61, 0x6e, 0x69, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x53,
-0x68, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x54, 0x61, 0x6e, 0x7a, 0x61, 0x6e, 0x69, 0x61, 0x3b,
-0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x73, 0x65, 0x66, 0x61, 0x20, 0x46, 0x72, 0x61, 0x14b, 0x20, 0x28, 0x42, 0x43, 0x45,
-0x41, 0x4f, 0x29, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x55, 0x53, 0x20, 0x13a0, 0x13d5, 0x13b3, 0x3b, 0x3b, 0x55, 0x53,
-0x20, 0x13a0, 0x13d5, 0x13b3, 0x3b, 0x3b, 0x3b, 0x3b, 0x55, 0x53, 0x20, 0x13a0, 0x13d5, 0x13b3, 0x3b, 0x72, 0x6f, 0x75, 0x70, 0x69,
-0x20, 0x6d, 0x6f, 0x72, 0x69, 0x73, 0x69, 0x65, 0x6e, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x68, 0x69, 0x6c,
-0xed, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x54, 0x61, 0x61, 0x6e, 0x73, 0x61, 0x6e, 0xed, 0x61, 0x3b, 0x3b,
-0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x65, 0x79, 0x61, 0x20, 0x59, 0x75, 0x67,
-0x61, 0x6e, 0x64, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x6b, 0x75, 0x64, 0x75, 0x20, 0x4b, 0x61, 0x62,
-0x75, 0x76, 0x65, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x75, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x6b, 0x75, 0x64, 0x75,
-0x20, 0x4b, 0x61, 0x62, 0x75, 0x76, 0x65, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x75, 0x3b, 0x53, 0x69, 0x6c, 0x69, 0x6e, 0x67,
-0x69, 0x74, 0x61, 0x62, 0x20, 0x79, 0x61, 0x20, 0x4b, 0x65, 0x6e, 0x79, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
-0x4e, 0x61, 0x6d, 0x69, 0x62, 0x69, 0x61, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x69, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
-0x3b, 0x3b, 0x45, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x49, 0x72, 0x6f, 0x70, 0x69, 0x79, 0x69,
-0x61, 0x6e, 0xed, 0x20, 0x65, 0x20, 0x4b, 0x65, 0x6e, 0x79, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x49, 0x72,
-0x6f, 0x70, 0x69, 0x79, 0x69, 0x61, 0x6e, 0xed, 0x20, 0x65, 0x20, 0x54, 0x61, 0x6e, 0x7a, 0x61, 0x6e, 0x69, 0x61, 0x3b,
-0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x69, 0x72, 0x69, 0x6e, 0x6a, 0x69, 0x20, 0x79, 0x61, 0x20, 0x4b, 0x65, 0x6e,
-0x79, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x73, 0x68, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x79, 0x61,
-0x20, 0x54, 0x61, 0x6e, 0x64, 0x68, 0x61, 0x6e, 0x69, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x41, 0x6e, 0x67,
-0x6f, 0x2019, 0x6f, 0x74, 0x6f, 0x6c, 0x20, 0x6c, 0x6f, 0x6b, 0x2019, 0x20, 0x55, 0x67, 0x61, 0x6e, 0x64, 0x61, 0x3b, 0x3b,
-0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x41, 0x6e, 0x67, 0x6f, 0x2019, 0x6f, 0x74, 0x6f, 0x6c, 0x20, 0x6c, 0x6f, 0x6b, 0x2019, 0x20,
-0x4b, 0x65, 0x6e, 0x79, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x43, 0x46, 0x41, 0x20, 0x46, 0x72, 0x61, 0x14b,
-0x20, 0x28, 0x42, 0x43, 0x45, 0x41, 0x4f, 0x29, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x69, 0x6c, 0x69, 0x6e,
-0x67, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x4b, 0x65, 0x6e, 0x79, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x44, 0x65,
-0x72, 0x68, 0x65, 0x6d, 0x20, 0x55, 0x6d, 0x65, 0x1e5b, 0x1e5b, 0x75, 0x6b, 0x69, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
-0x73, 0x68, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x54, 0x61, 0x6e, 0x7a, 0x61, 0x6e, 0x69, 0x61,
-0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x930, 0x93e, 0x902, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x420, 0x43e, 0x441,
-0x441, 0x438, 0x439, 0x43d, 0x20, 0x441, 0x43e, 0x43c, 0x3b, 0x3b, 0x420, 0x43e, 0x441, 0x441, 0x438, 0x439, 0x43d, 0x20, 0x441, 0x43e,
-0x43c, 0x3b, 0x3b, 0x3b, 0x3b, 0x420, 0x43e, 0x441, 0x441, 0x438, 0x439, 0x43d, 0x20, 0x441, 0x43e, 0x44c, 0x43c, 0x430, 0x448, 0x3b,
-0x440, 0x461, 0x441, 0x441, 0x456, 0x301, 0x439, 0x441, 0x43a, 0x457, 0x439, 0x20, 0x440, 0xa64b, 0x301, 0x431, 0x43b, 0x44c, 0x3b, 0x3b,
-0x3b, 0x3b, 0x3b, 0x3b, 0x440, 0x461, 0x441, 0x441, 0x456, 0x301, 0x439, 0x441, 0x43a, 0x430, 0x433, 0x461, 0x20, 0x440, 0xa64b, 0x431,
-0x43b, 0x467, 0x300, 0x3b, 0x4e, 0x66, 0x61, 0x6c, 0x61, 0x6e, 0x67, 0x61, 0x20, 0x77, 0x61, 0x20, 0x4b, 0x6f, 0x6e, 0x67,
-0x75, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x43, 0x46, 0x41, 0x20, 0x46, 0xe0, 0x6c, 0xe2, 0x14b, 0x20, 0x42, 0x45,
-0x41, 0x43, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x46, 0x72, 0x1ce, 0x14b, 0x20, 0x43, 0x46, 0x41, 0x20, 0x28, 0x42,
-0x45, 0x41, 0x43, 0x29, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x73, 0x65, 0x65, 0x66, 0x61, 0x20, 0x79, 0x61, 0x74,
-0x69, 0x20, 0x42, 0x43, 0x45, 0x41, 0x4f, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x46, 0x259, 0x6c, 0xe1, 0x14b, 0x20,
-0x43, 0x46, 0x41, 0x20, 0x28, 0x42, 0x45, 0x41, 0x43, 0x29, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72, 0xe1,
-0x14b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x73, 0x6f, 0x6c, 0x61, 0x69, 0x20, 0x42, 0x45, 0x41, 0x43, 0x3b, 0x3b,
-0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x46, 0x72, 0x61, 0x14b, 0x20, 0x43, 0x46, 0x41, 0x20, 0x42, 0x45, 0x41, 0x43, 0x3b, 0x3b,
-0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x410, 0x440, 0x430, 0x441, 0x441, 0x44b, 0x44b, 0x439, 0x430, 0x20, 0x441, 0x43e, 0x43b, 0x43a, 0x443,
-0x43e, 0x431, 0x430, 0x439, 0x430, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x410, 0x440, 0x430, 0x441, 0x441, 0x44b, 0x44b, 0x439, 0x430,
-0x20, 0x441, 0x43e, 0x43b, 0x43a, 0x443, 0x43e, 0x431, 0x430, 0x439, 0x430, 0x3b, 0x49, 0x68, 0x65, 0x6c, 0x61, 0x20, 0x79, 0x61,
-0x20, 0x54, 0x61, 0x6e, 0x73, 0x61, 0x6e, 0x69, 0x79, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0xa55e, 0xa524, 0xa52b,
-0xa569, 0x20, 0xa55c, 0xa55e, 0xa54c, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x4c, 0x61, 0x69, 0x62, 0x68, 0x69, 0x79, 0x61,
-0x20, 0x44, 0x61, 0x6c, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x46, 0x25b, 0x6c, 0xe2, 0x14b, 0x3b, 0x3b, 0x3b,
-0x3b, 0x3b, 0x3b, 0x3b, 0x46, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x43, 0x46, 0x41, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
-0x73, 0x68, 0x69, 0x72, 0xe8, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x65, 0x6c, 0xe1, 0x14b, 0x20, 0x43, 0x46,
-0x41, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x62f, 0x6cc, 0x646, 0x627, 0x631, 0x6cc, 0x20, 0x639, 0x6ce, 0x631, 0x627, 0x642,
-0x6cc, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x695, 0x6cc, 0x627, 0x6b5, 0x6cc, 0x20, 0x626, 0x6ce, 0x631, 0x627, 0x646, 0x6cc,
-0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x65, 0x75,
-0x72, 0x6f, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b,
-0x65, 0x75, 0x72, 0x6f, 0x3b, 0x65, 0x75, 0x72, 0x61, 0x6a, 0x3b, 0x65, 0x75, 0x72, 0x61, 0x3b, 0x3b, 0x65, 0x75, 0x72,
-0x6f, 0x77, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x627, 0x6cc, 0x631, 0x627, 0x646, 0x20,
-0x631, 0x6cc, 0x627, 0x644, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x627, 0x6cc, 0x631, 0x627, 0x646, 0x20, 0x631, 0x6cc, 0x627, 0x644,
-0x3b, 0x6e2f, 0x5e63, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x6e2f, 0x5e63, 0x3b
+0x447, 0x43a, 0x430, 0x20, 0x43a, 0x43e, 0x43d, 0x432, 0x435, 0x440, 0x442, 0x438, 0x431, 0x438, 0x43b, 0x43d, 0x430, 0x20, 0x43c, 0x430,
+0x440, 0x43a, 0x430, 0x3b, 0x3b, 0x431, 0x43e, 0x441, 0x430, 0x43d, 0x441, 0x43a, 0x43e, 0x2d, 0x445, 0x435, 0x440, 0x446, 0x435, 0x433,
+0x43e, 0x432, 0x430, 0x447, 0x43a, 0x435, 0x20, 0x43a, 0x43e, 0x43d, 0x432, 0x435, 0x440, 0x442, 0x438, 0x431, 0x438, 0x43b, 0x43d, 0x435,
+0x20, 0x43c, 0x430, 0x440, 0x43a, 0x65, 0x3b, 0x3b, 0x431, 0x43e, 0x441, 0x430, 0x43d, 0x441, 0x43a, 0x43e, 0x2d, 0x445, 0x435, 0x440,
+0x446, 0x435, 0x433, 0x43e, 0x432, 0x430, 0x447, 0x43a, 0x438, 0x445, 0x20, 0x43a, 0x43e, 0x43d, 0x432, 0x435, 0x440, 0x442, 0x438, 0x431,
+0x438, 0x43b, 0x43d, 0x438, 0x445, 0x20, 0x43c, 0x430, 0x440, 0x430, 0x43a, 0x430, 0x3b, 0x415, 0x432, 0x440, 0x43e, 0x3b, 0x3b, 0x435,
+0x432, 0x440, 0x43e, 0x3b, 0x3b, 0x435, 0x432, 0x440, 0x430, 0x3b, 0x3b, 0x435, 0x432, 0x440, 0x430, 0x3b, 0x42, 0x6f, 0x73, 0x61,
+0x6e, 0x73, 0x6b, 0x6f, 0x2d, 0x68, 0x65, 0x72, 0x63, 0x65, 0x67, 0x6f, 0x76, 0x61, 0x10d, 0x6b, 0x61, 0x20, 0x6b, 0x6f,
+0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e, 0x61, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x61, 0x3b, 0x3b, 0x62,
+0x6f, 0x73, 0x61, 0x6e, 0x73, 0x6b, 0x6f, 0x2d, 0x68, 0x65, 0x72, 0x63, 0x65, 0x67, 0x6f, 0x76, 0x61, 0x10d, 0x6b, 0x61,
+0x20, 0x6b, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e, 0x61, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x61,
+0x3b, 0x3b, 0x62, 0x6f, 0x73, 0x61, 0x6e, 0x73, 0x6b, 0x6f, 0x2d, 0x68, 0x65, 0x72, 0x63, 0x65, 0x67, 0x6f, 0x76, 0x61,
+0x10d, 0x6b, 0x65, 0x20, 0x6b, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e, 0x65, 0x20, 0x6d, 0x61,
+0x72, 0x6b, 0x65, 0x3b, 0x3b, 0x62, 0x6f, 0x73, 0x61, 0x6e, 0x73, 0x6b, 0x6f, 0x2d, 0x68, 0x65, 0x72, 0x63, 0x65, 0x67,
+0x6f, 0x76, 0x61, 0x10d, 0x6b, 0x69, 0x68, 0x20, 0x6b, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e,
+0x69, 0x68, 0x20, 0x6d, 0x61, 0x72, 0x61, 0x6b, 0x61, 0x3b, 0x45, 0x76, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x76, 0x72, 0x6f,
+0x3b, 0x3b, 0x65, 0x76, 0x72, 0x61, 0x3b, 0x3b, 0x65, 0x76, 0x72, 0x61, 0x3b, 0x53, 0x72, 0x70, 0x73, 0x6b, 0x69, 0x20,
+0x64, 0x69, 0x6e, 0x61, 0x72, 0x3b, 0x3b, 0x73, 0x72, 0x70, 0x73, 0x6b, 0x69, 0x20, 0x64, 0x69, 0x6e, 0x61, 0x72, 0x3b,
+0x3b, 0x73, 0x72, 0x70, 0x73, 0x6b, 0x61, 0x20, 0x64, 0x69, 0x6e, 0x61, 0x72, 0x61, 0x3b, 0x3b, 0x73, 0x72, 0x70, 0x73,
+0x6b, 0x69, 0x68, 0x20, 0x64, 0x69, 0x6e, 0x61, 0x72, 0x61, 0x3b, 0x41b, 0x430, 0x440, 0x3b, 0x3b, 0x43b, 0x430, 0x440, 0x3b,
+0x3b, 0x3b, 0x3b, 0x43b, 0x430, 0x440, 0x44b, 0x3b, 0x421, 0x43e, 0x43c, 0x3b, 0x3b, 0x441, 0x43e, 0x43c, 0x3b, 0x3b, 0x3b, 0x3b,
+0x441, 0x43e, 0x43c, 0x44b, 0x3b, 0x44, 0x6f, 0x72, 0x61, 0x20, 0x72, 0x65, 0x20, 0x41, 0x6d, 0x65, 0x72, 0x69, 0x6b, 0x61,
+0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x67e, 0x627, 0x6aa, 0x633, 0x62a, 0x627, 0x646, 0x64a, 0x20, 0x631, 0x67e, 0x64a, 0x3b,
+0x3b, 0x67e, 0x627, 0x6aa, 0x633, 0x62a, 0x627, 0x646, 0x64a, 0x20, 0x631, 0x67e, 0x64a, 0x3b, 0x3b, 0x3b, 0x3b, 0x67e, 0x627, 0x6aa,
+0x633, 0x62a, 0x627, 0x646, 0x64a, 0x20, 0x631, 0x67e, 0x64a, 0x3b, 0xdc1, 0xdca, 0x200d, 0xdbb, 0xdd3, 0x20, 0xdbd, 0xd82, 0xd9a, 0xdcf,
+0x20, 0xdbb, 0xdd4, 0xdb4, 0xdd2, 0xdba, 0xdbd, 0x3b, 0x3b, 0xdc1, 0xdca, 0x200d, 0xdbb, 0xdd3, 0x20, 0xdbd, 0xd82, 0xd9a, 0xdcf, 0x20,
+0xdbb, 0xdd4, 0xdb4, 0xdd2, 0xdba, 0xdbd, 0x3b, 0x3b, 0x3b, 0x3b, 0xdc1, 0xdca, 0x200d, 0xdbb, 0xdd3, 0x20, 0xdbd, 0xd82, 0xd9a, 0xdcf,
+0x20, 0xdbb, 0xdd4, 0xdb4, 0xdd2, 0xdba, 0xdbd, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b,
+0x65, 0x75, 0x72, 0xe1, 0x3b, 0x65, 0x75, 0x72, 0x61, 0x3b, 0x65, 0x75, 0x72, 0x3b, 0x65, 0x76, 0x72, 0x6f, 0x3b, 0x3b,
+0x65, 0x76, 0x72, 0x6f, 0x3b, 0x65, 0x76, 0x72, 0x61, 0x3b, 0x65, 0x76, 0x72, 0x69, 0x3b, 0x3b, 0x65, 0x76, 0x72, 0x6f,
+0x76, 0x3b, 0x53, 0x68, 0x69, 0x6c, 0x69, 0x6e, 0x20, 0x73, 0x6f, 0x6f, 0x6d, 0x61, 0x61, 0x6c, 0x69, 0x3b, 0x3b, 0x3b,
+0x3b, 0x3b, 0x3b, 0x3b, 0x46, 0x61, 0x72, 0x61, 0x6e, 0x20, 0x4a, 0x61, 0x62, 0x62, 0x75, 0x75, 0x74, 0x69, 0x3b, 0x3b,
+0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x42, 0x69, 0x72, 0x74, 0x61, 0x20, 0x49, 0x74, 0x6f, 0x6f, 0x62, 0x62, 0x69, 0x79, 0x61,
+0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20, 0x61, 0x72, 0x67, 0x65, 0x6e, 0x74, 0x69, 0x6e,
+0x6f, 0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20, 0x61, 0x72, 0x67, 0x65, 0x6e, 0x74, 0x69, 0x6e, 0x6f, 0x3b, 0x3b, 0x3b,
+0x3b, 0x70, 0x65, 0x73, 0x6f, 0x73, 0x20, 0x61, 0x72, 0x67, 0x65, 0x6e, 0x74, 0x69, 0x6e, 0x6f, 0x73, 0x3b, 0x64, 0xf3,
+0x6c, 0x61, 0x72, 0x20, 0x62, 0x65, 0x6c, 0x69, 0x63, 0x65, 0xf1, 0x6f, 0x3b, 0x3b, 0x64, 0xf3, 0x6c, 0x61, 0x72, 0x20,
+0x62, 0x65, 0x6c, 0x69, 0x63, 0x65, 0xf1, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x64, 0xf3, 0x6c, 0x61, 0x72, 0x65, 0x73, 0x20,
+0x62, 0x65, 0x6c, 0x69, 0x63, 0x65, 0xf1, 0x6f, 0x73, 0x3b, 0x62, 0x6f, 0x6c, 0x69, 0x76, 0x69, 0x61, 0x6e, 0x6f, 0x3b,
+0x3b, 0x62, 0x6f, 0x6c, 0x69, 0x76, 0x69, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x62, 0x6f, 0x6c, 0x69, 0x76, 0x69,
+0x61, 0x6e, 0x6f, 0x73, 0x3b, 0x72, 0x65, 0x61, 0x6c, 0x20, 0x62, 0x72, 0x61, 0x73, 0x69, 0x6c, 0x65, 0xf1, 0x6f, 0x3b,
+0x3b, 0x72, 0x65, 0x61, 0x6c, 0x20, 0x62, 0x72, 0x61, 0x73, 0x69, 0x6c, 0x65, 0xf1, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x72,
+0x65, 0x61, 0x6c, 0x65, 0x73, 0x20, 0x62, 0x72, 0x61, 0x73, 0x69, 0x6c, 0x65, 0xf1, 0x6f, 0x73, 0x3b, 0x50, 0x65, 0x73,
+0x6f, 0x20, 0x63, 0x68, 0x69, 0x6c, 0x65, 0x6e, 0x6f, 0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20, 0x63, 0x68, 0x69, 0x6c,
+0x65, 0x6e, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x73, 0x20, 0x63, 0x68, 0x69, 0x6c, 0x65, 0x6e, 0x6f,
+0x73, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x6d, 0x62, 0x69, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x70,
+0x65, 0x73, 0x6f, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x6d, 0x62, 0x69, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x70, 0x65,
+0x73, 0x6f, 0x73, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x6d, 0x62, 0x69, 0x61, 0x6e, 0x6f, 0x73, 0x3b, 0x63, 0x6f, 0x6c, 0xf3,
+0x6e, 0x20, 0x63, 0x6f, 0x73, 0x74, 0x61, 0x72, 0x72, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x3b, 0x3b, 0x63, 0x6f, 0x6c,
+0xf3, 0x6e, 0x20, 0x63, 0x6f, 0x73, 0x74, 0x61, 0x72, 0x72, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x3b, 0x3b, 0x3b, 0x3b,
+0x63, 0x6f, 0x6c, 0x6f, 0x6e, 0x65, 0x73, 0x20, 0x63, 0x6f, 0x73, 0x74, 0x61, 0x72, 0x72, 0x69, 0x63, 0x65, 0x6e, 0x73,
+0x65, 0x73, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20, 0x63, 0x75, 0x62, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f,
+0x20, 0x63, 0x75, 0x62, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x73, 0x20, 0x63, 0x75, 0x62,
+0x61, 0x6e, 0x6f, 0x73, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20, 0x64, 0x6f, 0x6d, 0x69, 0x6e, 0x69, 0x63, 0x61, 0x6e, 0x6f,
+0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20, 0x64, 0x6f, 0x6d, 0x69, 0x6e, 0x69, 0x63, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x3b,
+0x3b, 0x70, 0x65, 0x73, 0x6f, 0x73, 0x20, 0x64, 0x6f, 0x6d, 0x69, 0x6e, 0x69, 0x63, 0x61, 0x6e, 0x6f, 0x73, 0x3b, 0x64,
+0xf3, 0x6c, 0x61, 0x72, 0x20, 0x65, 0x73, 0x74, 0x61, 0x64, 0x6f, 0x75, 0x6e, 0x69, 0x64, 0x65, 0x6e, 0x73, 0x65, 0x3b,
+0x3b, 0x64, 0xf3, 0x6c, 0x61, 0x72, 0x20, 0x65, 0x73, 0x74, 0x61, 0x64, 0x6f, 0x75, 0x6e, 0x69, 0x64, 0x65, 0x6e, 0x73,
+0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x64, 0xf3, 0x6c, 0x61, 0x72, 0x65, 0x73, 0x20, 0x65, 0x73, 0x74, 0x61, 0x64, 0x6f, 0x75,
+0x6e, 0x69, 0x64, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x6f, 0x20, 0x43, 0x46, 0x41, 0x20,
+0x64, 0x65, 0x20, 0xc1, 0x66, 0x72, 0x69, 0x63, 0x61, 0x20, 0x43, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x3b, 0x3b, 0x66,
+0x72, 0x61, 0x6e, 0x63, 0x6f, 0x20, 0x43, 0x46, 0x41, 0x20, 0x64, 0x65, 0x20, 0xc1, 0x66, 0x72, 0x69, 0x63, 0x61, 0x20,
+0x43, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x6f, 0x73, 0x20, 0x43,
+0x46, 0x41, 0x20, 0x64, 0x65, 0x20, 0xc1, 0x66, 0x72, 0x69, 0x63, 0x61, 0x20, 0x43, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c,
+0x3b, 0x71, 0x75, 0x65, 0x74, 0x7a, 0x61, 0x6c, 0x3b, 0x3b, 0x71, 0x75, 0x65, 0x74, 0x7a, 0x61, 0x6c, 0x3b, 0x3b, 0x3b,
+0x3b, 0x71, 0x75, 0x65, 0x74, 0x7a, 0x61, 0x6c, 0x65, 0x73, 0x3b, 0x6c, 0x65, 0x6d, 0x70, 0x69, 0x72, 0x61, 0x20, 0x68,
+0x6f, 0x6e, 0x64, 0x75, 0x72, 0x65, 0xf1, 0x6f, 0x3b, 0x3b, 0x6c, 0x65, 0x6d, 0x70, 0x69, 0x72, 0x61, 0x20, 0x68, 0x6f,
+0x6e, 0x64, 0x75, 0x72, 0x65, 0xf1, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x6c, 0x65, 0x6d, 0x70, 0x69, 0x72, 0x61, 0x73, 0x20,
+0x68, 0x6f, 0x6e, 0x64, 0x75, 0x72, 0x65, 0xf1, 0x6f, 0x73, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20, 0x6d, 0x65, 0x78, 0x69,
+0x63, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20, 0x6d, 0x65, 0x78, 0x69, 0x63, 0x61, 0x6e, 0x6f, 0x3b,
+0x3b, 0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x73, 0x20, 0x6d, 0x65, 0x78, 0x69, 0x63, 0x61, 0x6e, 0x6f, 0x73, 0x3b, 0x63,
+0xf3, 0x72, 0x64, 0x6f, 0x62, 0x61, 0x20, 0x6e, 0x69, 0x63, 0x61, 0x72, 0x61, 0x67, 0xfc, 0x65, 0x6e, 0x73, 0x65, 0x3b,
+0x3b, 0x63, 0xf3, 0x72, 0x64, 0x6f, 0x62, 0x61, 0x20, 0x6e, 0x69, 0x63, 0x61, 0x72, 0x61, 0x67, 0xfc, 0x65, 0x6e, 0x73,
+0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x63, 0xf3, 0x72, 0x64, 0x6f, 0x62, 0x61, 0x73, 0x20, 0x6e, 0x69, 0x63, 0x61, 0x72, 0x61,
+0x67, 0xfc, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x3b, 0x62, 0x61, 0x6c, 0x62, 0x6f, 0x61, 0x20, 0x70, 0x61, 0x6e, 0x61, 0x6d,
+0x65, 0xf1, 0x6f, 0x3b, 0x3b, 0x62, 0x61, 0x6c, 0x62, 0x6f, 0x61, 0x20, 0x70, 0x61, 0x6e, 0x61, 0x6d, 0x65, 0xf1, 0x6f,
+0x3b, 0x3b, 0x3b, 0x3b, 0x62, 0x61, 0x6c, 0x62, 0x6f, 0x61, 0x73, 0x20, 0x70, 0x61, 0x6e, 0x61, 0x6d, 0x65, 0xf1, 0x6f,
+0x73, 0x3b, 0x67, 0x75, 0x61, 0x72, 0x61, 0x6e, 0xed, 0x20, 0x70, 0x61, 0x72, 0x61, 0x67, 0x75, 0x61, 0x79, 0x6f, 0x3b,
+0x3b, 0x67, 0x75, 0x61, 0x72, 0x61, 0x6e, 0xed, 0x20, 0x70, 0x61, 0x72, 0x61, 0x67, 0x75, 0x61, 0x79, 0x6f, 0x3b, 0x3b,
+0x3b, 0x3b, 0x67, 0x75, 0x61, 0x72, 0x61, 0x6e, 0xed, 0x65, 0x73, 0x20, 0x70, 0x61, 0x72, 0x61, 0x67, 0x75, 0x61, 0x79,
+0x6f, 0x73, 0x3b, 0x73, 0x6f, 0x6c, 0x20, 0x70, 0x65, 0x72, 0x75, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x73, 0x6f, 0x6c, 0x20,
+0x70, 0x65, 0x72, 0x75, 0x61, 0x6e, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x73, 0x6f, 0x6c, 0x65, 0x73, 0x20, 0x70, 0x65, 0x72,
+0x75, 0x61, 0x6e, 0x6f, 0x73, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x69, 0x70, 0x69, 0x6e, 0x6f, 0x3b,
+0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x69, 0x70, 0x69, 0x6e, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x70, 0x65,
+0x73, 0x6f, 0x73, 0x20, 0x66, 0x69, 0x6c, 0x69, 0x70, 0x69, 0x6e, 0x6f, 0x73, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20, 0x75,
+0x72, 0x75, 0x67, 0x75, 0x61, 0x79, 0x6f, 0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x20, 0x75, 0x72, 0x75, 0x67, 0x75, 0x61,
+0x79, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x70, 0x65, 0x73, 0x6f, 0x73, 0x20, 0x75, 0x72, 0x75, 0x67, 0x75, 0x61, 0x79, 0x6f,
+0x73, 0x3b, 0x62, 0x6f, 0x6c, 0xed, 0x76, 0x61, 0x72, 0x20, 0x76, 0x65, 0x6e, 0x65, 0x7a, 0x6f, 0x6c, 0x61, 0x6e, 0x6f,
+0x3b, 0x3b, 0x62, 0x6f, 0x6c, 0xed, 0x76, 0x61, 0x72, 0x20, 0x76, 0x65, 0x6e, 0x65, 0x7a, 0x6f, 0x6c, 0x61, 0x6e, 0x6f,
+0x3b, 0x3b, 0x3b, 0x3b, 0x62, 0x6f, 0x6c, 0xed, 0x76, 0x61, 0x72, 0x65, 0x73, 0x20, 0x76, 0x65, 0x6e, 0x65, 0x7a, 0x6f,
+0x6c, 0x61, 0x6e, 0x6f, 0x73, 0x3b, 0x53, 0x68, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x54, 0x61,
+0x6e, 0x7a, 0x61, 0x6e, 0x69, 0x61, 0x3b, 0x3b, 0x73, 0x68, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20,
+0x54, 0x61, 0x6e, 0x7a, 0x61, 0x6e, 0x69, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x73, 0x68, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x69,
+0x20, 0x7a, 0x61, 0x20, 0x54, 0x61, 0x6e, 0x7a, 0x61, 0x6e, 0x69, 0x61, 0x3b, 0x46, 0x61, 0x72, 0x61, 0x6e, 0x67, 0x61,
+0x20, 0x79, 0x61, 0x20, 0x4b, 0x6f, 0x6e, 0x67, 0x6f, 0x3b, 0x3b, 0x66, 0x61, 0x72, 0x61, 0x6e, 0x67, 0x61, 0x20, 0x79,
+0x61, 0x20, 0x4b, 0x6f, 0x6e, 0x67, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x61, 0x72, 0x61, 0x6e, 0x67, 0x61, 0x20, 0x7a,
+0x61, 0x20, 0x4b, 0x6f, 0x6e, 0x67, 0x6f, 0x3b, 0x53, 0x68, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20,
+0x4b, 0x65, 0x6e, 0x79, 0x61, 0x3b, 0x3b, 0x73, 0x68, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x4b,
+0x65, 0x6e, 0x79, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x73, 0x68, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x7a, 0x61, 0x20,
+0x4b, 0x65, 0x6e, 0x79, 0x61, 0x3b, 0x53, 0x68, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x55, 0x67,
+0x61, 0x6e, 0x64, 0x61, 0x3b, 0x3b, 0x73, 0x68, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x55, 0x67,
+0x61, 0x6e, 0x64, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x73, 0x68, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x7a, 0x61, 0x20,
+0x55, 0x67, 0x61, 0x6e, 0x64, 0x61, 0x3b, 0x73, 0x76, 0x65, 0x6e, 0x73, 0x6b, 0x20, 0x6b, 0x72, 0x6f, 0x6e, 0x61, 0x3b,
+0x3b, 0x73, 0x76, 0x65, 0x6e, 0x73, 0x6b, 0x20, 0x6b, 0x72, 0x6f, 0x6e, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x73, 0x76, 0x65,
+0x6e, 0x73, 0x6b, 0x61, 0x20, 0x6b, 0x72, 0x6f, 0x6e, 0x6f, 0x72, 0x3b, 0x421, 0x43e, 0x43c, 0x43e, 0x43d, 0x4e3, 0x3b, 0x3b,
+0x3b, 0x3b, 0x3b, 0x3b, 0x421, 0x43e, 0x43c, 0x43e, 0x43d, 0x4e3, 0x3b, 0xb87, 0xba8, 0xbcd, 0xba4, 0xbbf, 0xbaf, 0x20, 0xbb0, 0xbc2,
+0xbaa, 0xbbe, 0xbaf, 0xbcd, 0x3b, 0x3b, 0xb87, 0xba8, 0xbcd, 0xba4, 0xbbf, 0xbaf, 0x20, 0xbb0, 0xbc2, 0xbaa, 0xbbe, 0xbaf, 0xbcd, 0x3b,
+0x3b, 0x3b, 0x3b, 0xb87, 0xba8, 0xbcd, 0xba4, 0xbbf, 0xbaf, 0x20, 0xbb0, 0xbc2, 0xbaa, 0xbbe, 0xbaf, 0xbcd, 0xb95, 0xbb3, 0xbcd, 0x3b,
+0xbae, 0xbb2, 0xbc7, 0xbb7, 0xbbf, 0xbaf, 0xba9, 0xbcd, 0x20, 0xbb0, 0xbbf, 0xb99, 0xbcd, 0xb95, 0xbbf, 0xb9f, 0xbcd, 0x3b, 0x3b, 0xbae,
+0xbb2, 0xbc7, 0xbb7, 0xbbf, 0xbaf, 0xba9, 0xbcd, 0x20, 0xbb0, 0xbbf, 0xb99, 0xbcd, 0xb95, 0xbbf, 0xb9f, 0xbcd, 0x3b, 0x3b, 0x3b, 0x3b,
+0xbae, 0xbb2, 0xbc7, 0xbb7, 0xbbf, 0xbaf, 0xba9, 0xbcd, 0x20, 0xbb0, 0xbbf, 0xb99, 0xbcd, 0xb95, 0xbbf, 0xb9f, 0xbcd, 0xb95, 0xbb3, 0xbcd,
+0x3b, 0xb9a, 0xbbf, 0xb99, 0xbcd, 0xb95, 0xbaa, 0xbcd, 0xbaa, 0xbc2, 0xbb0, 0xbcd, 0x20, 0xb9f, 0xbbe, 0xbb2, 0xbb0, 0xbcd, 0x3b, 0x3b,
+0xb9a, 0xbbf, 0xb99, 0xbcd, 0xb95, 0xbaa, 0xbcd, 0xbaa, 0xbc2, 0xbb0, 0xbcd, 0x20, 0xb9f, 0xbbe, 0xbb2, 0xbb0, 0xbcd, 0x3b, 0x3b, 0x3b,
+0x3b, 0xb9a, 0xbbf, 0xb99, 0xbcd, 0xb95, 0xbaa, 0xbcd, 0xbaa, 0xbc2, 0xbb0, 0xbcd, 0x20, 0xb9f, 0xbbe, 0xbb2, 0xbb0, 0xbcd, 0xb95, 0xbb3,
+0xbcd, 0x3b, 0xb87, 0xbb2, 0xb99, 0xbcd, 0xb95, 0xbc8, 0x20, 0xbb0, 0xbc2, 0xbaa, 0xbbe, 0xbaf, 0xbcd, 0x3b, 0x3b, 0xb87, 0xbb2, 0xb99,
+0xbcd, 0xb95, 0xbc8, 0x20, 0xbb0, 0xbc2, 0xbaa, 0xbbe, 0xbaf, 0xbcd, 0x3b, 0x3b, 0x3b, 0x3b, 0xb87, 0xbb2, 0xb99, 0xbcd, 0xb95, 0xbc8,
+0x20, 0xbb0, 0xbc2, 0xbaa, 0xbbe, 0xbaf, 0xbcd, 0xb95, 0xbb3, 0xbcd, 0x3b, 0x420, 0x43e, 0x441, 0x441, 0x438, 0x44f, 0x20, 0x441, 0x443,
+0x43c, 0x44b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x441, 0x443, 0x43c, 0x3b, 0xc30, 0xc42, 0xc2a, 0xc3e, 0xc2f, 0xc3f, 0x3b, 0x3b,
+0xc30, 0xc42, 0xc2a, 0xc3e, 0xc2f, 0xc3f, 0x3b, 0x3b, 0x3b, 0x3b, 0xc30, 0xc42, 0xc2a, 0xc3e, 0xc2f, 0xc32, 0xc41, 0x3b, 0xe1a, 0xe32,
+0xe17, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0xe1a, 0xe32, 0xe17, 0xe44, 0xe17, 0xe22, 0x3b, 0xf61, 0xf74, 0xf0b, 0xf68, 0xf53, 0xf0b,
+0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0xf62, 0xf92, 0xfb1, 0xf0b, 0xf42, 0xf62, 0xf0b, 0xf66, 0xf92, 0xf7c, 0xf62, 0xf0b, 0x3b,
+0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x12e8, 0x12a2, 0x1275, 0x12ee, 0x1335, 0x12eb, 0x20, 0x1265, 0x122d, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
+0x3b, 0x3b, 0x50, 0x61, 0x2bb, 0x61, 0x6e, 0x67, 0x61, 0x20, 0x66, 0x61, 0x6b, 0x61, 0x74, 0x6f, 0x6e, 0x67, 0x61, 0x3b,
+0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x50, 0x61, 0x2bb, 0x61, 0x6e, 0x67, 0x61, 0x20, 0x66, 0x61, 0x6b, 0x61, 0x74, 0x6f, 0x6e,
+0x67, 0x61, 0x3b, 0x54, 0xfc, 0x72, 0x6b, 0x20, 0x4c, 0x69, 0x72, 0x61, 0x73, 0x131, 0x3b, 0x3b, 0x54, 0xfc, 0x72, 0x6b,
+0x20, 0x6c, 0x69, 0x72, 0x61, 0x73, 0x131, 0x3b, 0x3b, 0x3b, 0x3b, 0x54, 0xfc, 0x72, 0x6b, 0x20, 0x6c, 0x69, 0x72, 0x61,
+0x73, 0x131, 0x3b, 0x54, 0xfc, 0x72, 0x6b, 0x6d, 0x65, 0x6e, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x64, 0x79, 0x3b, 0x3b, 0x74,
+0xfc, 0x72, 0x6b, 0x6d, 0x65, 0x6e, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x64, 0x79, 0x3b, 0x3b, 0x3b, 0x3b, 0x74, 0xfc, 0x72,
+0x6b, 0x6d, 0x65, 0x6e, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x64, 0x79, 0x3b, 0x62c, 0x6c7, 0x6ad, 0x6af, 0x648, 0x20, 0x64a, 0x6c8,
+0x6d5, 0x646, 0x649, 0x3b, 0x3b, 0x62c, 0x6c7, 0x6ad, 0x6af, 0x648, 0x20, 0x64a, 0x6c8, 0x6d5, 0x646, 0x649, 0x3b, 0x3b, 0x3b, 0x3b,
+0x62c, 0x6c7, 0x6ad, 0x6af, 0x648, 0x20, 0x64a, 0x6c8, 0x6d5, 0x646, 0x649, 0x3b, 0x443, 0x43a, 0x440, 0x430, 0x457, 0x43d, 0x441, 0x44c,
+0x43a, 0x430, 0x20, 0x433, 0x440, 0x438, 0x432, 0x43d, 0x44f, 0x3b, 0x3b, 0x433, 0x440, 0x438, 0x432, 0x43d, 0x44f, 0x3b, 0x3b, 0x433,
+0x440, 0x438, 0x432, 0x43d, 0x456, 0x3b, 0x433, 0x440, 0x438, 0x432, 0x435, 0x43d, 0x44c, 0x3b, 0x433, 0x440, 0x438, 0x432, 0x43d, 0x456,
+0x3b, 0x67e, 0x627, 0x6a9, 0x633, 0x62a, 0x627, 0x646, 0x6cc, 0x20, 0x631, 0x648, 0x67e, 0x6cc, 0x6c1, 0x3b, 0x3b, 0x67e, 0x627, 0x6a9,
+0x633, 0x62a, 0x627, 0x646, 0x6cc, 0x20, 0x631, 0x648, 0x67e, 0x6cc, 0x6c1, 0x3b, 0x3b, 0x3b, 0x3b, 0x67e, 0x627, 0x6a9, 0x633, 0x62a,
+0x627, 0x646, 0x6cc, 0x20, 0x631, 0x648, 0x67e, 0x6cc, 0x6c1, 0x3b, 0x628, 0x6be, 0x627, 0x631, 0x62a, 0x6cc, 0x20, 0x631, 0x648, 0x67e,
+0x6cc, 0x6c1, 0x3b, 0x3b, 0x628, 0x6be, 0x627, 0x631, 0x62a, 0x6cc, 0x20, 0x631, 0x648, 0x67e, 0x6cc, 0x6c1, 0x3b, 0x3b, 0x3b, 0x3b,
+0x628, 0x6be, 0x627, 0x631, 0x62a, 0x6cc, 0x20, 0x631, 0x648, 0x67e, 0x6d2, 0x3b, 0x4f, 0x2018, 0x7a, 0x62, 0x65, 0x6b, 0x69, 0x73,
+0x74, 0x6f, 0x6e, 0x20, 0x73, 0x6f, 0x2018, 0x6d, 0x69, 0x3b, 0x3b, 0x4f, 0x2018, 0x7a, 0x62, 0x65, 0x6b, 0x69, 0x73, 0x74,
+0x6f, 0x6e, 0x20, 0x73, 0x6f, 0x2018, 0x6d, 0x69, 0x3b, 0x3b, 0x3b, 0x3b, 0x4f, 0x2018, 0x7a, 0x62, 0x65, 0x6b, 0x69, 0x73,
+0x74, 0x6f, 0x6e, 0x20, 0x73, 0x6f, 0x2018, 0x6d, 0x69, 0x3b, 0x627, 0x641, 0x63a, 0x627, 0x646, 0x6cc, 0x3b, 0x3b, 0x3b, 0x3b,
+0x3b, 0x3b, 0x3b, 0x40e, 0x437, 0x431, 0x435, 0x43a, 0x438, 0x441, 0x442, 0x43e, 0x43d, 0x20, 0x441, 0x45e, 0x43c, 0x3b, 0x3b, 0x40e,
+0x437, 0x431, 0x435, 0x43a, 0x438, 0x441, 0x442, 0x43e, 0x43d, 0x20, 0x441, 0x45e, 0x43c, 0x3b, 0x3b, 0x3b, 0x3b, 0x40e, 0x437, 0x431,
+0x435, 0x43a, 0x438, 0x441, 0x442, 0x43e, 0x43d, 0x20, 0x441, 0x45e, 0x43c, 0x3b, 0x110, 0x1ed3, 0x6e, 0x67, 0x20, 0x56, 0x69, 0x1ec7,
+0x74, 0x20, 0x4e, 0x61, 0x6d, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x110, 0x1ed3, 0x6e, 0x67, 0x20, 0x56, 0x69, 0x1ec7, 0x74,
+0x20, 0x4e, 0x61, 0x6d, 0x3b, 0x50, 0x75, 0x6e, 0x74, 0x20, 0x50, 0x72, 0x79, 0x64, 0x61, 0x69, 0x6e, 0x3b, 0x70, 0x75,
+0x6e, 0x74, 0x20, 0x50, 0x72, 0x79, 0x64, 0x61, 0x69, 0x6e, 0x3b, 0x62, 0x75, 0x6e, 0x74, 0x20, 0x50, 0x72, 0x79, 0x64,
+0x61, 0x69, 0x6e, 0x3b, 0x62, 0x75, 0x6e, 0x74, 0x20, 0x50, 0x72, 0x79, 0x64, 0x61, 0x69, 0x6e, 0x3b, 0x70, 0x75, 0x6e,
+0x74, 0x20, 0x50, 0x72, 0x79, 0x64, 0x61, 0x69, 0x6e, 0x3b, 0x70, 0x68, 0x75, 0x6e, 0x74, 0x20, 0x50, 0x72, 0x79, 0x64,
+0x61, 0x69, 0x6e, 0x3b, 0x70, 0x75, 0x6e, 0x74, 0x20, 0x50, 0x72, 0x79, 0x64, 0x61, 0x69, 0x6e, 0x3b, 0x46, 0x72, 0x61,
+0x6e, 0x63, 0x20, 0x43, 0x46, 0x41, 0x20, 0x62, 0x75, 0x20, 0x41, 0x66, 0x72, 0x69, 0x6b, 0x20, 0x53, 0x6f, 0x77, 0x77,
+0x75, 0x2d, 0x6a, 0x61, 0x6e, 0x74, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x46, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x43, 0x46,
+0x41, 0x20, 0x79, 0x75, 0x20, 0x41, 0x66, 0x72, 0x69, 0x6b, 0x20, 0x53, 0x6f, 0x77, 0x77, 0x75, 0x2d, 0x6a, 0x61, 0x6e,
+0x74, 0x3b, 0x4e, 0x61, 0x69, 0x72, 0x61, 0x20, 0x74, 0x69, 0x20, 0x4f, 0x72, 0xed, 0x6c, 0x1eb9, 0x301, 0xe8, 0x64, 0x65,
+0x20, 0x4e, 0xe0, 0xec, 0x6a, 0xed, 0x72, 0xed, 0xe0, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x46, 0x61, 0x72, 0x61,
+0x6e, 0x73, 0x69, 0x20, 0x74, 0x69, 0x20, 0x4f, 0x72, 0xed, 0x6c, 0x25b, 0x301, 0xe8, 0x64, 0x65, 0x20, 0x42, 0x49, 0x4b,
+0x45, 0x41, 0x4f, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x69, 0x2d, 0x53, 0x6f, 0x75, 0x74, 0x68, 0x20, 0x41, 0x66,
+0x72, 0x69, 0x63, 0x61, 0x6e, 0x20, 0x52, 0x61, 0x6e, 0x64, 0x3b, 0x3b, 0x69, 0x2d, 0x53, 0x6f, 0x75, 0x74, 0x68, 0x20,
+0x41, 0x66, 0x72, 0x69, 0x63, 0x61, 0x6e, 0x20, 0x52, 0x61, 0x6e, 0x64, 0x3b, 0x3b, 0x3b, 0x3b, 0x69, 0x2d, 0x53, 0x6f,
+0x75, 0x74, 0x68, 0x20, 0x41, 0x66, 0x72, 0x69, 0x63, 0x61, 0x6e, 0x20, 0x52, 0x61, 0x6e, 0x64, 0x3b, 0x42, 0x6f, 0x73,
+0x61, 0x6e, 0x73, 0x6b, 0x6f, 0x68, 0x65, 0x72, 0x63, 0x65, 0x67, 0x6f, 0x76, 0x61, 0x10d, 0x6b, 0x61, 0x20, 0x6b, 0x6f,
+0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e, 0x61, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x61, 0x3b, 0x3b, 0x62,
+0x6f, 0x73, 0x61, 0x6e, 0x73, 0x6b, 0x6f, 0x68, 0x65, 0x72, 0x63, 0x65, 0x67, 0x6f, 0x76, 0x61, 0x10d, 0x6b, 0x61, 0x20,
+0x6b, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e, 0x61, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x61, 0x3b,
+0x3b, 0x62, 0x6f, 0x73, 0x61, 0x6e, 0x73, 0x6b, 0x6f, 0x68, 0x65, 0x72, 0x63, 0x65, 0x67, 0x6f, 0x76, 0x61, 0x10d, 0x6b,
+0x65, 0x20, 0x6b, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x6b,
+0x65, 0x3b, 0x3b, 0x62, 0x6f, 0x73, 0x61, 0x6e, 0x73, 0x6b, 0x6f, 0x68, 0x65, 0x72, 0x63, 0x65, 0x67, 0x6f, 0x76, 0x61,
+0x10d, 0x6b, 0x69, 0x68, 0x20, 0x6b, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e, 0x69, 0x68, 0x20,
+0x6d, 0x61, 0x72, 0x61, 0x6b, 0x61, 0x3b, 0x41a, 0x43e, 0x43d, 0x432, 0x435, 0x440, 0x442, 0x438, 0x431, 0x438, 0x43b, 0x43d, 0x430,
+0x20, 0x43c, 0x430, 0x440, 0x43a, 0x430, 0x3b, 0x3b, 0x431, 0x43e, 0x441, 0x430, 0x43d, 0x441, 0x43a, 0x43e, 0x2d, 0x445, 0x435, 0x440,
+0x446, 0x435, 0x433, 0x43e, 0x432, 0x430, 0x447, 0x43a, 0x430, 0x20, 0x43a, 0x43e, 0x43d, 0x432, 0x435, 0x440, 0x442, 0x438, 0x431, 0x438,
+0x43b, 0x43d, 0x430, 0x20, 0x43c, 0x430, 0x440, 0x43a, 0x430, 0x3b, 0x3b, 0x431, 0x43e, 0x441, 0x430, 0x43d, 0x441, 0x43a, 0x43e, 0x2d,
+0x445, 0x435, 0x440, 0x446, 0x435, 0x433, 0x43e, 0x432, 0x430, 0x447, 0x43a, 0x435, 0x20, 0x43a, 0x43e, 0x43d, 0x432, 0x435, 0x440, 0x442,
+0x438, 0x431, 0x438, 0x43b, 0x43d, 0x435, 0x20, 0x43c, 0x430, 0x440, 0x43a, 0x3b, 0x3b, 0x431, 0x43e, 0x441, 0x430, 0x43d, 0x441, 0x43a,
+0x43e, 0x2d, 0x445, 0x435, 0x440, 0x446, 0x435, 0x433, 0x43e, 0x432, 0x430, 0x447, 0x43a, 0x438, 0x445, 0x20, 0x43a, 0x43e, 0x43d, 0x432,
+0x435, 0x440, 0x442, 0x438, 0x431, 0x438, 0x43b, 0x43d, 0x438, 0x445, 0x20, 0x43c, 0x430, 0x440, 0x430, 0x43a, 0x430, 0x3b, 0x47, 0x68,
+0x61, 0x6e, 0x61, 0x20, 0x53, 0x69, 0x64, 0x69, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x49, 0x4e, 0x52, 0x3b, 0x3b,
+0x3b, 0x3b, 0x3b, 0x3b, 0x49, 0x4e, 0x52, 0x3b, 0x4e, 0x61, 0x1ecb, 0x72, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
+0x53, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x4b, 0x65, 0x6e, 0x79, 0x61, 0x3b, 0x3b, 0x3b, 0x3b,
+0x3b, 0x3b, 0x3b, 0x67, 0x68, 0x61, 0x6e, 0x61, 0x20, 0x73, 0x69, 0x256, 0x69, 0x3b, 0x3b, 0x67, 0x68, 0x61, 0x6e, 0x61,
+0x20, 0x73, 0x69, 0x256, 0x69, 0x3b, 0x3b, 0x3b, 0x3b, 0x67, 0x68, 0x61, 0x6e, 0x61, 0x20, 0x73, 0x69, 0x256, 0x69, 0x3b,
+0x263, 0x65, 0x74, 0x6f, 0x256, 0x6f, 0x66, 0x65, 0x20, 0x61, 0x66, 0x72, 0x69, 0x6b, 0x61, 0x67, 0x61, 0x20, 0x43, 0x46,
+0x41, 0x20, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x42, 0x43, 0x45, 0x41, 0x4f, 0x3b, 0x3b, 0x263, 0x65, 0x74, 0x6f, 0x256,
+0x6f, 0x66, 0x65, 0x20, 0x61, 0x66, 0x72, 0x69, 0x6b, 0x61, 0x67, 0x61, 0x20, 0x43, 0x46, 0x41, 0x20, 0x66, 0x72, 0x61,
+0x6e, 0x63, 0x20, 0x42, 0x43, 0x45, 0x41, 0x4f, 0x3b, 0x3b, 0x3b, 0x3b, 0x263, 0x65, 0x74, 0x6f, 0x256, 0x6f, 0x66, 0x65,
+0x20, 0x61, 0x66, 0x72, 0x69, 0x6b, 0x61, 0x67, 0x61, 0x20, 0x43, 0x46, 0x41, 0x20, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x20,
+0x42, 0x43, 0x45, 0x41, 0x4f, 0x3b, 0x50, 0x69, 0x73, 0x6f, 0x20, 0x6e, 0x67, 0x20, 0x50, 0x69, 0x6c, 0x69, 0x70, 0x69,
+0x6e, 0x61, 0x73, 0x3b, 0x3b, 0x70, 0x69, 0x73, 0x6f, 0x20, 0x6e, 0x67, 0x20, 0x50, 0x69, 0x6c, 0x69, 0x70, 0x69, 0x6e,
+0x61, 0x73, 0x3b, 0x3b, 0x3b, 0x3b, 0x70, 0x69, 0x73, 0x6f, 0x20, 0x6e, 0x67, 0x20, 0x50, 0x69, 0x6c, 0x69, 0x70, 0x69,
+0x6e, 0x61, 0x73, 0x3b, 0x53, 0x63, 0x68, 0x77, 0x69, 0x69, 0x7a, 0x65, 0x72, 0x20, 0x46, 0x72, 0x61, 0x6e, 0x6b, 0x65,
+0x3b, 0x3b, 0x53, 0x63, 0x68, 0x77, 0x69, 0x69, 0x7a, 0x65, 0x72, 0x20, 0x46, 0x72, 0x61, 0x6e, 0x6b, 0x65, 0x3b, 0x3b,
+0x3b, 0x3b, 0x53, 0x63, 0x68, 0x77, 0x69, 0x69, 0x7a, 0x65, 0x72, 0x20, 0x46, 0x72, 0x61, 0x6e, 0x6b, 0x65, 0x3b, 0x45,
+0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x45, 0x75, 0x72, 0x6f, 0x3b, 0x6e, 0x6f, 0x72, 0x67, 0x67, 0x61,
+0x20, 0x6b, 0x72, 0x75, 0x76, 0x64, 0x6e, 0x6f, 0x3b, 0x3b, 0x6e, 0x6f, 0x72, 0x67, 0x67, 0x61, 0x20, 0x6b, 0x72, 0x75,
+0x76, 0x64, 0x6e, 0x6f, 0x3b, 0x6e, 0x6f, 0x72, 0x67, 0x67, 0x61, 0x20, 0x6b, 0x72, 0x75, 0x76, 0x64, 0x6e, 0x6f, 0x3b,
+0x3b, 0x3b, 0x6e, 0x6f, 0x72, 0x67, 0x67, 0x61, 0x20, 0x6b, 0x72, 0x75, 0x76, 0x64, 0x6e, 0x6f, 0x3b, 0x65, 0x75, 0x72,
+0x6f, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b,
+0x72, 0x75, 0x6f, 0x167, 0x167, 0x61, 0x20, 0x6b, 0x72, 0x75, 0x76, 0x64, 0x6e, 0x6f, 0x3b, 0x3b, 0x72, 0x75, 0x6f, 0x167,
+0x167, 0x61, 0x20, 0x6b, 0x72, 0x75, 0x76, 0x64, 0x6e, 0x6f, 0x3b, 0x72, 0x75, 0x6f, 0x167, 0x167, 0x61, 0x20, 0x6b, 0x72,
+0x75, 0x76, 0x64, 0x6e, 0x6f, 0x3b, 0x3b, 0x3b, 0x72, 0x75, 0x6f, 0x167, 0x167, 0x61, 0x20, 0x6b, 0x72, 0x75, 0x76, 0x64,
+0x6e, 0x6f, 0x3b, 0x53, 0x68, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x4b, 0x65, 0x6e, 0x79, 0x61,
+0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x4d, 0x62, 0x75, 0x75, 0x257, 0x75, 0x20, 0x53, 0x65, 0x65, 0x66, 0x61, 0x61,
+0x20, 0x42, 0x43, 0x45, 0x41, 0x4f, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x4d, 0x62, 0x75, 0x75, 0x257, 0x69, 0x20,
+0x53, 0x65, 0x65, 0x66, 0x61, 0x61, 0x20, 0x42, 0x45, 0x41, 0x43, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x55, 0x67,
+0x69, 0x79, 0x79, 0x61, 0x20, 0x4d, 0x75, 0x72, 0x69, 0x74, 0x61, 0x6e, 0x69, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
+0x43, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x4b, 0x65, 0x6e, 0x79, 0x61, 0x3b, 0x3b, 0x3b, 0x3b,
+0x3b, 0x3b, 0x3b, 0x4e, 0x6a, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x65, 0x65, 0x6c, 0x20, 0x4b, 0x65, 0x6e, 0x79,
+0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x4d, 0x65, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x64, 0x65, 0x20, 0x4d,
+0x6f, 0xe7, 0x61, 0x6d, 0x62, 0x69, 0x71, 0x75, 0x65, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x44, 0x6f, 0x6c, 0x61,
+0x20, 0x79, 0x61, 0x73, 0x65, 0x20, 0x41, 0x6d, 0x65, 0x6c, 0x69, 0x6b, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
+0x68, 0x65, 0x6c, 0x65, 0x72, 0x69, 0x20, 0x73, 0x61, 0x20, 0x54, 0x61, 0x6e, 0x7a, 0x61, 0x6e, 0x69, 0x61, 0x3b, 0x3b,
+0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x2d30, 0x2d37, 0x2d54, 0x2d49, 0x2d4e, 0x20, 0x2d4f, 0x20, 0x2d4d, 0x2d4e, 0x2d56, 0x2d54, 0x2d49, 0x2d31, 0x3b,
+0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x61, 0x64, 0x72, 0x69, 0x6d, 0x20, 0x6e, 0x20, 0x6c, 0x6d, 0x263, 0x72, 0x69, 0x62,
+0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x41, 0x64, 0x69, 0x6e, 0x61, 0x72, 0x20, 0x41, 0x7a, 0x7a, 0x61, 0x79, 0x72,
+0x69, 0x3b, 0x3b, 0x41, 0x64, 0x69, 0x6e, 0x61, 0x72, 0x20, 0x6e, 0x20, 0x5a, 0x7a, 0x61, 0x79, 0x65, 0x72, 0x3b, 0x3b,
+0x3b, 0x3b, 0x49, 0x64, 0x69, 0x6e, 0x61, 0x72, 0x65, 0x6e, 0x20, 0x6e, 0x20, 0x5a, 0x7a, 0x61, 0x79, 0x65, 0x72, 0x3b,
+0x45, 0x73, 0x68, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x55, 0x67, 0x61, 0x6e, 0x64, 0x61, 0x3b,
+0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x68, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x48, 0x75,
+0x74, 0x61, 0x6e, 0x7a, 0x61, 0x6e, 0x69, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x68, 0x69, 0x6c, 0x69,
+0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x54, 0x61, 0x6e, 0x7a, 0x61, 0x6e, 0x69, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
+0x3b, 0x3b, 0x73, 0x65, 0x66, 0x61, 0x20, 0x46, 0x72, 0x61, 0x14b, 0x20, 0x28, 0x42, 0x43, 0x45, 0x41, 0x4f, 0x29, 0x3b,
+0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x55, 0x53, 0x20, 0x13a0, 0x13d5, 0x13b3, 0x3b, 0x3b, 0x55, 0x53, 0x20, 0x13a0, 0x13d5, 0x13b3,
+0x3b, 0x3b, 0x3b, 0x3b, 0x55, 0x53, 0x20, 0x13a0, 0x13d5, 0x13b3, 0x3b, 0x72, 0x6f, 0x75, 0x70, 0x69, 0x20, 0x6d, 0x6f, 0x72,
+0x69, 0x73, 0x69, 0x65, 0x6e, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x68, 0x69, 0x6c, 0xed, 0x69, 0x6e, 0x67,
+0x69, 0x20, 0x79, 0x61, 0x20, 0x54, 0x61, 0x61, 0x6e, 0x73, 0x61, 0x6e, 0xed, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
+0x3b, 0x53, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x65, 0x79, 0x61, 0x20, 0x59, 0x75, 0x67, 0x61, 0x6e, 0x64, 0x61,
+0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x6b, 0x75, 0x64, 0x75, 0x20, 0x4b, 0x61, 0x62, 0x75, 0x76, 0x65, 0x72,
+0x64, 0x69, 0x61, 0x6e, 0x75, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x6b, 0x75, 0x64, 0x75, 0x20, 0x4b, 0x61, 0x62,
+0x75, 0x76, 0x65, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x75, 0x3b, 0x53, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x69, 0x74, 0x61, 0x62,
+0x20, 0x79, 0x61, 0x20, 0x4b, 0x65, 0x6e, 0x79, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x4e, 0x61, 0x6d, 0x69,
+0x62, 0x69, 0x61, 0x20, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x69, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x45, 0x75,
+0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x49, 0x72, 0x6f, 0x70, 0x69, 0x79, 0x69, 0x61, 0x6e, 0xed, 0x20,
+0x65, 0x20, 0x4b, 0x65, 0x6e, 0x79, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x49, 0x72, 0x6f, 0x70, 0x69, 0x79,
+0x69, 0x61, 0x6e, 0xed, 0x20, 0x65, 0x20, 0x54, 0x61, 0x6e, 0x7a, 0x61, 0x6e, 0x69, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
+0x3b, 0x3b, 0x53, 0x69, 0x72, 0x69, 0x6e, 0x6a, 0x69, 0x20, 0x79, 0x61, 0x20, 0x4b, 0x65, 0x6e, 0x79, 0x61, 0x3b, 0x3b,
+0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x73, 0x68, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x54, 0x61, 0x6e,
+0x64, 0x68, 0x61, 0x6e, 0x69, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x41, 0x6e, 0x67, 0x6f, 0x2019, 0x6f, 0x74,
+0x6f, 0x6c, 0x20, 0x6c, 0x6f, 0x6b, 0x2019, 0x20, 0x55, 0x67, 0x61, 0x6e, 0x64, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
+0x3b, 0x41, 0x6e, 0x67, 0x6f, 0x2019, 0x6f, 0x74, 0x6f, 0x6c, 0x20, 0x6c, 0x6f, 0x6b, 0x2019, 0x20, 0x4b, 0x65, 0x6e, 0x79,
+0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x43, 0x46, 0x41, 0x20, 0x46, 0x72, 0x61, 0x14b, 0x20, 0x28, 0x42, 0x43,
+0x45, 0x41, 0x4f, 0x29, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x53, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x20, 0x6d, 0x61,
+0x72, 0x20, 0x4b, 0x65, 0x6e, 0x79, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x44, 0x65, 0x72, 0x68, 0x65, 0x6d,
+0x20, 0x55, 0x6d, 0x65, 0x1e5b, 0x1e5b, 0x75, 0x6b, 0x69, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x73, 0x68, 0x69, 0x6c,
+0x69, 0x6e, 0x67, 0x69, 0x20, 0x79, 0x61, 0x20, 0x54, 0x61, 0x6e, 0x7a, 0x61, 0x6e, 0x69, 0x61, 0x3b, 0x3b, 0x3b, 0x3b,
+0x3b, 0x3b, 0x3b, 0x930, 0x93e, 0x902, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x420, 0x43e, 0x441, 0x441, 0x438, 0x439, 0x43d,
+0x20, 0x441, 0x43e, 0x43c, 0x3b, 0x3b, 0x420, 0x43e, 0x441, 0x441, 0x438, 0x439, 0x43d, 0x20, 0x441, 0x43e, 0x43c, 0x3b, 0x3b, 0x3b,
+0x3b, 0x420, 0x43e, 0x441, 0x441, 0x438, 0x439, 0x43d, 0x20, 0x441, 0x43e, 0x44c, 0x43c, 0x430, 0x448, 0x3b, 0x440, 0x461, 0x441, 0x441,
+0x456, 0x301, 0x439, 0x441, 0x43a, 0x457, 0x439, 0x20, 0x440, 0xa64b, 0x301, 0x431, 0x43b, 0x44c, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
+0x440, 0x461, 0x441, 0x441, 0x456, 0x301, 0x439, 0x441, 0x43a, 0x430, 0x433, 0x461, 0x20, 0x440, 0xa64b, 0x431, 0x43b, 0x467, 0x300, 0x3b,
+0x4e, 0x66, 0x61, 0x6c, 0x61, 0x6e, 0x67, 0x61, 0x20, 0x77, 0x61, 0x20, 0x4b, 0x6f, 0x6e, 0x67, 0x75, 0x3b, 0x3b, 0x3b,
+0x3b, 0x3b, 0x3b, 0x3b, 0x43, 0x46, 0x41, 0x20, 0x46, 0xe0, 0x6c, 0xe2, 0x14b, 0x20, 0x42, 0x45, 0x41, 0x43, 0x3b, 0x3b,
+0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x46, 0x72, 0x1ce, 0x14b, 0x20, 0x43, 0x46, 0x41, 0x20, 0x28, 0x42, 0x45, 0x41, 0x43, 0x29,
+0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x73, 0x65, 0x65, 0x66, 0x61, 0x20, 0x79, 0x61, 0x74, 0x69, 0x20, 0x42, 0x43,
+0x45, 0x41, 0x4f, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x46, 0x259, 0x6c, 0xe1, 0x14b, 0x20, 0x43, 0x46, 0x41, 0x20,
+0x28, 0x42, 0x45, 0x41, 0x43, 0x29, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x72, 0xe1, 0x14b, 0x3b, 0x3b, 0x3b,
+0x3b, 0x3b, 0x3b, 0x3b, 0x73, 0x6f, 0x6c, 0x61, 0x69, 0x20, 0x42, 0x45, 0x41, 0x43, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
+0x3b, 0x46, 0x72, 0x61, 0x14b, 0x20, 0x43, 0x46, 0x41, 0x20, 0x42, 0x45, 0x41, 0x43, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
+0x3b, 0x410, 0x440, 0x430, 0x441, 0x441, 0x44b, 0x44b, 0x439, 0x430, 0x20, 0x441, 0x43e, 0x43b, 0x43a, 0x443, 0x43e, 0x431, 0x430, 0x439,
+0x430, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x410, 0x440, 0x430, 0x441, 0x441, 0x44b, 0x44b, 0x439, 0x430, 0x20, 0x441, 0x43e, 0x43b,
+0x43a, 0x443, 0x43e, 0x431, 0x430, 0x439, 0x430, 0x3b, 0x49, 0x68, 0x65, 0x6c, 0x61, 0x20, 0x79, 0x61, 0x20, 0x54, 0x61, 0x6e,
+0x73, 0x61, 0x6e, 0x69, 0x79, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0xa55e, 0xa524, 0xa52b, 0xa569, 0x20, 0xa55c, 0xa55e,
+0xa54c, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x4c, 0x61, 0x69, 0x62, 0x68, 0x69, 0x79, 0x61, 0x20, 0x44, 0x61, 0x6c,
+0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x46, 0x25b, 0x6c, 0xe2, 0x14b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
+0x46, 0x72, 0x61, 0x6e, 0x63, 0x20, 0x43, 0x46, 0x41, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x73, 0x68, 0x69, 0x72,
+0xe8, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x66, 0x65, 0x6c, 0xe1, 0x14b, 0x20, 0x43, 0x46, 0x41, 0x3b, 0x3b, 0x3b,
+0x3b, 0x3b, 0x3b, 0x3b, 0x62f, 0x6cc, 0x646, 0x627, 0x631, 0x6cc, 0x20, 0x639, 0x6ce, 0x631, 0x627, 0x642, 0x6cc, 0x3b, 0x3b, 0x3b,
+0x3b, 0x3b, 0x3b, 0x3b, 0x695, 0x6cc, 0x627, 0x6b5, 0x6cc, 0x20, 0x626, 0x6ce, 0x631, 0x627, 0x646, 0x6cc, 0x3b, 0x3b, 0x3b, 0x3b,
+0x3b, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x65,
+0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f,
+0x3b, 0x65, 0x75, 0x72, 0x61, 0x6a, 0x3b, 0x65, 0x75, 0x72, 0x61, 0x3b, 0x3b, 0x65, 0x75, 0x72, 0x6f, 0x77, 0x3b, 0x65,
+0x75, 0x72, 0x6f, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x627, 0x6cc, 0x631, 0x627, 0x646, 0x20, 0x631, 0x6cc, 0x627, 0x644,
+0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x627, 0x6cc, 0x631, 0x627, 0x646, 0x20, 0x631, 0x6cc, 0x627, 0x644, 0x3b, 0x6e2f, 0x5e63, 0x3b,
+0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x6e2f, 0x5e63, 0x3b
};
static const ushort currency_format_data[] = {
0x25, 0x31, 0x25, 0x32, 0x25, 0x32, 0x25, 0x31, 0x25, 0x32, 0xa0, 0x25, 0x31, 0x25, 0x31, 0xa0, 0x25, 0x32, 0x25, 0x32,
0x25, 0x31, 0x4b, 0x25, 0x32, 0xa0, 0x2d, 0x25, 0x31, 0x28, 0x25, 0x31, 0xa0, 0x25, 0x32, 0x29, 0x25, 0x32, 0x2d, 0x25,
-0x31, 0x25, 0x31, 0xa0, 0x6d, 0x6e, 0xa0, 0x25, 0x32, 0x25, 0x32, 0xa0, 0x25, 0x31, 0x2d, 0x25, 0x32, 0x2212, 0x25, 0x31,
-0x200f, 0x25, 0x31, 0xa0, 0x25, 0x32, 0x200f, 0x200e, 0x2d, 0x25, 0x31, 0xa0, 0x25, 0x32, 0x200e, 0x25, 0x32, 0x25, 0x31, 0x25,
-0x32, 0xa0, 0x25, 0x31, 0x4b, 0x28, 0x25, 0x32, 0x25, 0x31, 0x29, 0x25, 0x32, 0x2d, 0xa0, 0x25, 0x31
+0x31, 0x25, 0x31, 0xa0, 0x6b, 0x25, 0x32, 0x2d, 0x25, 0x31, 0xa0, 0x25, 0x32, 0x25, 0x32, 0xa0, 0x25, 0x31, 0x2d, 0x25,
+0x32, 0x2212, 0x25, 0x31, 0x200f, 0x25, 0x31, 0xa0, 0x25, 0x32, 0x200f, 0x200e, 0x2d, 0x25, 0x31, 0xa0, 0x25, 0x32, 0x200e, 0x25,
+0x32, 0x25, 0x31, 0x25, 0x32, 0xa0, 0x25, 0x31, 0x4b, 0x28, 0x25, 0x32, 0x25, 0x31, 0x29, 0x25, 0x31, 0xa0, 0x4b, 0xa0,
+0x25, 0x32, 0x25, 0x32, 0x2d, 0xa0, 0x25, 0x31
};
static const ushort endonyms_data[] = {
@@ -5962,123 +6058,125 @@ static const ushort endonyms_data[] = {
0x53, 0x79, 0x72, 0x69, 0x65, 0x54, 0x6f, 0x67, 0x6f, 0x54, 0x75, 0x6e, 0x69, 0x73, 0x69, 0x65, 0x57, 0x61, 0x6c, 0x6c,
0x69, 0x73, 0x2d, 0x65, 0x74, 0x2d, 0x46, 0x75, 0x74, 0x75, 0x6e, 0x61, 0x53, 0x61, 0x69, 0x6e, 0x74, 0x2d, 0x42, 0x61,
0x72, 0x74, 0x68, 0xe9, 0x6c, 0x65, 0x6d, 0x79, 0x53, 0x61, 0x69, 0x6e, 0x74, 0x2d, 0x4d, 0x61, 0x72, 0x74, 0x69, 0x6e,
-0x57, 0x65, 0x73, 0x74, 0x2d, 0x46, 0x72, 0x79, 0x73, 0x6b, 0x4e, 0x65, 0x64, 0x65, 0x72, 0x6c, 0xe2, 0x6e, 0x47, 0xe0,
-0x69, 0x64, 0x68, 0x6c, 0x69, 0x67, 0x41, 0x6e, 0x20, 0x52, 0xec, 0x6f, 0x67, 0x68, 0x61, 0x63, 0x68, 0x64, 0x20, 0x41,
-0x6f, 0x6e, 0x61, 0x69, 0x63, 0x68, 0x74, 0x65, 0x67, 0x61, 0x6c, 0x65, 0x67, 0x6f, 0x45, 0x73, 0x70, 0x61, 0xf1, 0x61,
-0x10e5, 0x10d0, 0x10e0, 0x10d7, 0x10e3, 0x10da, 0x10d8, 0x10e1, 0x10d0, 0x10e5, 0x10d0, 0x10e0, 0x10d7, 0x10d5, 0x10d4, 0x10da, 0x10dd, 0x44, 0x65, 0x75,
-0x74, 0x73, 0x63, 0x68, 0x44, 0x65, 0x75, 0x74, 0x73, 0x63, 0x68, 0x6c, 0x61, 0x6e, 0x64, 0xd6, 0x73, 0x74, 0x65, 0x72,
-0x72, 0x65, 0x69, 0x63, 0x68, 0x69, 0x73, 0x63, 0x68, 0x65, 0x73, 0x20, 0x44, 0x65, 0x75, 0x74, 0x73, 0x63, 0x68, 0xd6,
-0x73, 0x74, 0x65, 0x72, 0x72, 0x65, 0x69, 0x63, 0x68, 0x42, 0x65, 0x6c, 0x67, 0x69, 0x65, 0x6e, 0x49, 0x74, 0x61, 0x6c,
-0x69, 0x65, 0x6e, 0x4c, 0x69, 0x65, 0x63, 0x68, 0x74, 0x65, 0x6e, 0x73, 0x74, 0x65, 0x69, 0x6e, 0x4c, 0x75, 0x78, 0x65,
-0x6d, 0x62, 0x75, 0x72, 0x67, 0x53, 0x63, 0x68, 0x77, 0x65, 0x69, 0x7a, 0x65, 0x72, 0x20, 0x48, 0x6f, 0x63, 0x68, 0x64,
-0x65, 0x75, 0x74, 0x73, 0x63, 0x68, 0x53, 0x63, 0x68, 0x77, 0x65, 0x69, 0x7a, 0x395, 0x3bb, 0x3bb, 0x3b7, 0x3bd, 0x3b9, 0x3ba,
-0x3ac, 0x395, 0x3bb, 0x3bb, 0x3ac, 0x3b4, 0x3b1, 0x39a, 0x3cd, 0x3c0, 0x3c1, 0x3bf, 0x3c2, 0x6b, 0x61, 0x6c, 0x61, 0x61, 0x6c, 0x6c,
-0x69, 0x73, 0x75, 0x74, 0x4b, 0x61, 0x6c, 0x61, 0x61, 0x6c, 0x6c, 0x69, 0x74, 0x20, 0x4e, 0x75, 0x6e, 0x61, 0x61, 0x74,
-0xa97, 0xac1, 0xa9c, 0xab0, 0xabe, 0xaa4, 0xac0, 0xaad, 0xabe, 0xab0, 0xaa4, 0x48, 0x61, 0x75, 0x73, 0x61, 0x4e, 0x61, 0x6a, 0x65,
-0x72, 0x69, 0x79, 0x61, 0x47, 0x61, 0x6e, 0x61, 0x4e, 0x69, 0x6a, 0x61, 0x72, 0x5e2, 0x5d1, 0x5e8, 0x5d9, 0x5ea, 0x5d9, 0x5e9,
-0x5e8, 0x5d0, 0x5dc, 0x939, 0x93f, 0x928, 0x94d, 0x926, 0x940, 0x92d, 0x93e, 0x930, 0x924, 0x6d, 0x61, 0x67, 0x79, 0x61, 0x72, 0x4d,
-0x61, 0x67, 0x79, 0x61, 0x72, 0x6f, 0x72, 0x73, 0x7a, 0xe1, 0x67, 0xed, 0x73, 0x6c, 0x65, 0x6e, 0x73, 0x6b, 0x61, 0xcd,
-0x73, 0x6c, 0x61, 0x6e, 0x64, 0x49, 0x6e, 0x64, 0x6f, 0x6e, 0x65, 0x73, 0x69, 0x61, 0x47, 0x61, 0x65, 0x69, 0x6c, 0x67,
-0x65, 0xc9, 0x69, 0x72, 0x65, 0x69, 0x74, 0x61, 0x6c, 0x69, 0x61, 0x6e, 0x6f, 0x49, 0x74, 0x61, 0x6c, 0x69, 0x61, 0x53,
-0x61, 0x6e, 0x20, 0x4d, 0x61, 0x72, 0x69, 0x6e, 0x6f, 0x53, 0x76, 0x69, 0x7a, 0x7a, 0x65, 0x72, 0x61, 0x43, 0x69, 0x74,
-0x74, 0xe0, 0x20, 0x64, 0x65, 0x6c, 0x20, 0x56, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6e, 0x6f, 0x65e5, 0x672c, 0x8a9e, 0x65e5, 0x672c,
-0xc95, 0xca8, 0xccd, 0xca8, 0xca1, 0xcad, 0xcbe, 0xcb0, 0xca4, 0x6a9, 0x672, 0x634, 0x64f, 0x631, 0x6c1, 0x650, 0x646, 0x65b, 0x62f, 0x648,
-0x633, 0x62a, 0x627, 0x646, 0x49b, 0x430, 0x437, 0x430, 0x49b, 0x20, 0x442, 0x456, 0x43b, 0x456, 0x49a, 0x430, 0x437, 0x430, 0x49b, 0x441,
-0x442, 0x430, 0x43d, 0x4b, 0x69, 0x6e, 0x79, 0x61, 0x72, 0x77, 0x61, 0x6e, 0x64, 0x61, 0x43a, 0x44b, 0x440, 0x433, 0x44b, 0x437,
-0x447, 0x430, 0x41a, 0x44b, 0x440, 0x433, 0x44b, 0x437, 0x441, 0x442, 0x430, 0x43d, 0xd55c, 0xad6d, 0xc5b4, 0xb300, 0xd55c, 0xbbfc, 0xad6d, 0xc870,
-0xc120, 0xbbfc, 0xc8fc, 0xc8fc, 0xc758, 0xc778, 0xbbfc, 0xacf5, 0xd654, 0xad6d, 0x49, 0x6b, 0x69, 0x72, 0x75, 0x6e, 0x64, 0x69, 0x55, 0x62,
-0x75, 0x72, 0x75, 0x6e, 0x64, 0x69, 0xea5, 0xeb2, 0xea7, 0x6c, 0x61, 0x74, 0x76, 0x69, 0x65, 0x161, 0x75, 0x4c, 0x61, 0x74,
-0x76, 0x69, 0x6a, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0xe1, 0x6c, 0x61, 0x52, 0x65, 0x70, 0x75, 0x62, 0x6c, 0xed, 0x6b, 0x69,
-0x20, 0x79, 0x61, 0x20, 0x4b, 0x6f, 0x6e, 0x67, 0xf3, 0x20, 0x44, 0x65, 0x6d, 0x6f, 0x6b, 0x72, 0x61, 0x74, 0xed, 0x6b,
-0x69, 0x41, 0x6e, 0x67, 0xf3, 0x6c, 0x61, 0x52, 0x65, 0x70, 0x69, 0x62, 0x69, 0x6b, 0x69, 0x20, 0x79, 0x61, 0x20, 0x41,
-0x66, 0x72, 0xed, 0x6b, 0x61, 0x20, 0x79, 0x61, 0x20, 0x4b, 0xe1, 0x74, 0x69, 0x4b, 0x6f, 0x6e, 0x67, 0x6f, 0x6c, 0x69,
-0x65, 0x74, 0x75, 0x76, 0x69, 0x173, 0x4c, 0x69, 0x65, 0x74, 0x75, 0x76, 0x61, 0x43c, 0x430, 0x43a, 0x435, 0x434, 0x43e, 0x43d,
-0x441, 0x43a, 0x438, 0x41c, 0x430, 0x43a, 0x435, 0x434, 0x43e, 0x43d, 0x438, 0x458, 0x430, 0x4d, 0x61, 0x6c, 0x61, 0x67, 0x61, 0x73,
-0x79, 0x4d, 0x61, 0x64, 0x61, 0x67, 0x61, 0x73, 0x69, 0x6b, 0x61, 0x72, 0x61, 0x42, 0x61, 0x68, 0x61, 0x73, 0x61, 0x20,
-0x4d, 0x65, 0x6c, 0x61, 0x79, 0x75, 0x42, 0x72, 0x75, 0x6e, 0x65, 0x69, 0x53, 0x69, 0x6e, 0x67, 0x61, 0x70, 0x75, 0x72,
-0x61, 0xd2e, 0xd32, 0xd2f, 0xd3e, 0xd33, 0xd02, 0xd07, 0xd28, 0xd4d, 0xd24, 0xd4d, 0xd2f, 0x4d, 0x61, 0x6c, 0x74, 0x69, 0x92e, 0x930,
-0x93e, 0x920, 0x940, 0x43c, 0x43e, 0x43d, 0x433, 0x43e, 0x43b, 0x41c, 0x43e, 0x43d, 0x433, 0x43e, 0x43b, 0x928, 0x947, 0x92a, 0x93e, 0x932,
-0x940, 0x928, 0x947, 0x92a, 0x93e, 0x932, 0x6e, 0x6f, 0x72, 0x73, 0x6b, 0x20, 0x62, 0x6f, 0x6b, 0x6d, 0xe5, 0x6c, 0x4e, 0x6f,
-0x72, 0x67, 0x65, 0x53, 0x76, 0x61, 0x6c, 0x62, 0x61, 0x72, 0x64, 0x20, 0x6f, 0x67, 0x20, 0x4a, 0x61, 0x6e, 0x20, 0x4d,
-0x61, 0x79, 0x65, 0x6e, 0xb13, 0xb21, 0xb3c, 0xb3f, 0xb06, 0xb2d, 0xb3e, 0xb30, 0xb24, 0x67e, 0x69a, 0x62a, 0x648, 0x627, 0x641, 0x63a,
-0x627, 0x646, 0x633, 0x62a, 0x627, 0x646, 0x641, 0x627, 0x631, 0x633, 0x6cc, 0x627, 0x6cc, 0x631, 0x627, 0x646, 0x62f, 0x631, 0x6cc, 0x70,
-0x6f, 0x6c, 0x73, 0x6b, 0x69, 0x50, 0x6f, 0x6c, 0x73, 0x6b, 0x61, 0x70, 0x6f, 0x72, 0x74, 0x75, 0x67, 0x75, 0xea, 0x73,
-0x42, 0x72, 0x61, 0x73, 0x69, 0x6c, 0x41, 0x6e, 0x67, 0x6f, 0x6c, 0x61, 0x43, 0x61, 0x62, 0x6f, 0x20, 0x56, 0x65, 0x72,
-0x64, 0x65, 0x54, 0x69, 0x6d, 0x6f, 0x72, 0x2d, 0x4c, 0x65, 0x73, 0x74, 0x65, 0x47, 0x75, 0x69, 0x6e, 0xe9, 0x20, 0x45,
-0x71, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x69, 0x61, 0x6c, 0x47, 0x75, 0x69, 0x6e, 0xe9, 0x2d, 0x42, 0x69, 0x73, 0x73, 0x61,
-0x75, 0x4c, 0x75, 0x78, 0x65, 0x6d, 0x62, 0x75, 0x72, 0x67, 0x6f, 0x4d, 0x61, 0x63, 0x61, 0x75, 0x2c, 0x20, 0x52, 0x41,
-0x45, 0x20, 0x64, 0x61, 0x20, 0x43, 0x68, 0x69, 0x6e, 0x61, 0x4d, 0x6f, 0xe7, 0x61, 0x6d, 0x62, 0x69, 0x71, 0x75, 0x65,
-0x70, 0x6f, 0x72, 0x74, 0x75, 0x67, 0x75, 0xea, 0x73, 0x20, 0x65, 0x75, 0x72, 0x6f, 0x70, 0x65, 0x75, 0x50, 0x6f, 0x72,
-0x74, 0x75, 0x67, 0x61, 0x6c, 0x53, 0xe3, 0x6f, 0x20, 0x54, 0x6f, 0x6d, 0xe9, 0x20, 0x65, 0x20, 0x50, 0x72, 0xed, 0x6e,
-0x63, 0x69, 0x70, 0x65, 0x53, 0x75, 0xed, 0xe7, 0x61, 0xa2a, 0xa70, 0xa1c, 0xa3e, 0xa2c, 0xa40, 0xa2d, 0xa3e, 0xa30, 0xa24, 0x67e,
-0x646, 0x62c, 0x627, 0x628, 0x6cc, 0x67e, 0x627, 0x6a9, 0x633, 0x62a, 0x627, 0x646, 0x52, 0x75, 0x6e, 0x61, 0x73, 0x69, 0x6d, 0x69,
-0x50, 0x65, 0x72, 0xfa, 0x42, 0x6f, 0x6c, 0x69, 0x76, 0x69, 0x61, 0x45, 0x63, 0x75, 0x61, 0x64, 0x6f, 0x72, 0x72, 0x75,
-0x6d, 0x61, 0x6e, 0x74, 0x73, 0x63, 0x68, 0x53, 0x76, 0x69, 0x7a, 0x72, 0x61, 0x72, 0x6f, 0x6d, 0xe2, 0x6e, 0x103, 0x52,
-0x6f, 0x6d, 0xe2, 0x6e, 0x69, 0x61, 0x6d, 0x6f, 0x6c, 0x64, 0x6f, 0x76, 0x65, 0x6e, 0x65, 0x61, 0x73, 0x63, 0x103, 0x52,
-0x65, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x20, 0x4d, 0x6f, 0x6c, 0x64, 0x6f, 0x76, 0x61, 0x440, 0x443, 0x441, 0x441,
-0x43a, 0x438, 0x439, 0x420, 0x43e, 0x441, 0x441, 0x438, 0x44f, 0x41a, 0x430, 0x437, 0x430, 0x445, 0x441, 0x442, 0x430, 0x43d, 0x41a, 0x438,
-0x440, 0x433, 0x438, 0x437, 0x438, 0x44f, 0x41c, 0x43e, 0x43b, 0x434, 0x43e, 0x432, 0x430, 0x423, 0x43a, 0x440, 0x430, 0x438, 0x43d, 0x430,
-0x53, 0xe4, 0x6e, 0x67, 0xf6, 0x4b, 0xf6, 0x64, 0xf6, 0x72, 0xf6, 0x73, 0xea, 0x73, 0x65, 0x20, 0x74, 0xee, 0x20, 0x42,
-0xea, 0x61, 0x66, 0x72, 0xee, 0x6b, 0x61, 0x441, 0x440, 0x43f, 0x441, 0x43a, 0x438, 0x421, 0x440, 0x431, 0x438, 0x458, 0x430, 0x411,
-0x43e, 0x441, 0x43d, 0x430, 0x20, 0x438, 0x20, 0x425, 0x435, 0x440, 0x446, 0x435, 0x433, 0x43e, 0x432, 0x438, 0x43d, 0x430, 0x426, 0x440,
-0x43d, 0x430, 0x20, 0x413, 0x43e, 0x440, 0x430, 0x41a, 0x43e, 0x441, 0x43e, 0x432, 0x43e, 0x73, 0x72, 0x70, 0x73, 0x6b, 0x69, 0x43,
-0x72, 0x6e, 0x61, 0x20, 0x47, 0x6f, 0x72, 0x61, 0x53, 0x72, 0x62, 0x69, 0x6a, 0x61, 0x4b, 0x6f, 0x73, 0x6f, 0x76, 0x6f,
-0x438, 0x440, 0x43e, 0x43d, 0x413, 0x443, 0x44b, 0x440, 0x434, 0x437, 0x44b, 0x441, 0x442, 0x43e, 0x43d, 0x423, 0x4d5, 0x440, 0x4d5, 0x441,
-0x435, 0x63, 0x68, 0x69, 0x53, 0x68, 0x6f, 0x6e, 0x61, 0xdc3, 0xdd2, 0xd82, 0xdc4, 0xdbd, 0xdc1, 0xdca, 0x200d, 0xdbb, 0xdd3, 0x20,
-0xdbd, 0xd82, 0xd9a, 0xdcf, 0xdc0, 0x73, 0x6c, 0x6f, 0x76, 0x65, 0x6e, 0x10d, 0x69, 0x6e, 0x61, 0x53, 0x6c, 0x6f, 0x76, 0x65,
-0x6e, 0x73, 0x6b, 0x6f, 0x73, 0x6c, 0x6f, 0x76, 0x65, 0x6e, 0x161, 0x10d, 0x69, 0x6e, 0x61, 0x53, 0x6c, 0x6f, 0x76, 0x65,
-0x6e, 0x69, 0x6a, 0x61, 0x53, 0x6f, 0x6f, 0x6d, 0x61, 0x61, 0x6c, 0x69, 0x53, 0x6f, 0x6f, 0x6d, 0x61, 0x61, 0x6c, 0x69,
-0x79, 0x61, 0x4a, 0x61, 0x62, 0x75, 0x75, 0x74, 0x69, 0x49, 0x74, 0x6f, 0x6f, 0x62, 0x69, 0x79, 0x61, 0x4b, 0x69, 0x69,
-0x6e, 0x69, 0x79, 0x61, 0x65, 0x73, 0x70, 0x61, 0xf1, 0x6f, 0x6c, 0x20, 0x64, 0x65, 0x20, 0x45, 0x73, 0x70, 0x61, 0xf1,
-0x61, 0x65, 0x73, 0x70, 0x61, 0xf1, 0x6f, 0x6c, 0x41, 0x72, 0x67, 0x65, 0x6e, 0x74, 0x69, 0x6e, 0x61, 0x42, 0x65, 0x6c,
-0x69, 0x63, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x6d, 0x62, 0x69, 0x61, 0x43, 0x6f, 0x73, 0x74,
-0x61, 0x20, 0x52, 0x69, 0x63, 0x61, 0x43, 0x75, 0x62, 0x61, 0x52, 0x65, 0x70, 0xfa, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x20,
-0x44, 0x6f, 0x6d, 0x69, 0x6e, 0x69, 0x63, 0x61, 0x6e, 0x61, 0x45, 0x6c, 0x20, 0x53, 0x61, 0x6c, 0x76, 0x61, 0x64, 0x6f,
-0x72, 0x47, 0x75, 0x69, 0x6e, 0x65, 0x61, 0x20, 0x45, 0x63, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x69, 0x61, 0x6c, 0x47, 0x75,
-0x61, 0x74, 0x65, 0x6d, 0x61, 0x6c, 0x61, 0x48, 0x6f, 0x6e, 0x64, 0x75, 0x72, 0x61, 0x73, 0x65, 0x73, 0x70, 0x61, 0xf1,
-0x6f, 0x6c, 0x20, 0x64, 0x65, 0x20, 0x4d, 0xe9, 0x78, 0x69, 0x63, 0x6f, 0x4d, 0xe9, 0x78, 0x69, 0x63, 0x6f, 0x4e, 0x69,
-0x63, 0x61, 0x72, 0x61, 0x67, 0x75, 0x61, 0x50, 0x61, 0x6e, 0x61, 0x6d, 0xe1, 0x50, 0x61, 0x72, 0x61, 0x67, 0x75, 0x61,
-0x79, 0x46, 0x69, 0x6c, 0x69, 0x70, 0x69, 0x6e, 0x61, 0x73, 0x45, 0x45, 0x2e, 0x20, 0x55, 0x55, 0x2e, 0x55, 0x72, 0x75,
-0x67, 0x75, 0x61, 0x79, 0x56, 0x65, 0x6e, 0x65, 0x7a, 0x75, 0x65, 0x6c, 0x61, 0x43, 0x61, 0x6e, 0x61, 0x72, 0x69, 0x61,
-0x73, 0x65, 0x73, 0x70, 0x61, 0xf1, 0x6f, 0x6c, 0x20, 0x6c, 0x61, 0x74, 0x69, 0x6e, 0x6f, 0x61, 0x6d, 0x65, 0x72, 0x69,
-0x63, 0x61, 0x6e, 0x6f, 0x4c, 0x61, 0x74, 0x69, 0x6e, 0x6f, 0x61, 0x6d, 0xe9, 0x72, 0x69, 0x63, 0x61, 0x43, 0x65, 0x75,
-0x74, 0x61, 0x20, 0x79, 0x20, 0x4d, 0x65, 0x6c, 0x69, 0x6c, 0x6c, 0x61, 0x4b, 0x69, 0x73, 0x77, 0x61, 0x68, 0x69, 0x6c,
-0x69, 0x4b, 0x69, 0x6e, 0x67, 0x77, 0x61, 0x6e, 0x61, 0x4a, 0x61, 0x6d, 0x68, 0x75, 0x72, 0x69, 0x20, 0x79, 0x61, 0x20,
-0x4b, 0x69, 0x64, 0x65, 0x6d, 0x6f, 0x6b, 0x72, 0x61, 0x73, 0x69, 0x61, 0x20, 0x79, 0x61, 0x20, 0x4b, 0x6f, 0x6e, 0x67,
-0x6f, 0x73, 0x76, 0x65, 0x6e, 0x73, 0x6b, 0x61, 0x53, 0x76, 0x65, 0x72, 0x69, 0x67, 0x65, 0xc5, 0x6c, 0x61, 0x6e, 0x64,
-0xba4, 0xbae, 0xbbf, 0xbb4, 0xbcd, 0xb87, 0xba8, 0xbcd, 0xba4, 0xbbf, 0xbaf, 0xbbe, 0xbae, 0xbb2, 0xbc7, 0xb9a, 0xbbf, 0xbaf, 0xbbe, 0xb9a,
-0xbbf, 0xb99, 0xbcd, 0xb95, 0xbaa, 0xbcd, 0xbaa, 0xbc2, 0xbb0, 0xbcd, 0xb87, 0xbb2, 0xb99, 0xbcd, 0xb95, 0xbc8, 0xc24, 0xc46, 0xc32, 0xc41,
-0xc17, 0xc41, 0xc2d, 0xc3e, 0xc30, 0xc24, 0x20, 0xc26, 0xc47, 0xc36, 0xc02, 0xe44, 0xe17, 0xe22, 0xf56, 0xf7c, 0xf51, 0xf0b, 0xf66, 0xf90,
-0xf51, 0xf0b, 0xf62, 0xf92, 0xfb1, 0xf0b, 0xf53, 0xf42, 0xf62, 0xf92, 0xfb1, 0xf0b, 0xf42, 0xf62, 0xf0b, 0x1275, 0x130d, 0x122d, 0x129b, 0x12a4,
-0x122d, 0x1275, 0x122b, 0x6c, 0x65, 0x61, 0x20, 0x66, 0x61, 0x6b, 0x61, 0x74, 0x6f, 0x6e, 0x67, 0x61, 0x54, 0xfc, 0x72, 0x6b,
-0xe7, 0x65, 0x54, 0xfc, 0x72, 0x6b, 0x69, 0x79, 0x65, 0x4b, 0x131, 0x62, 0x72, 0x131, 0x73, 0x74, 0xfc, 0x72, 0x6b, 0x6d,
-0x65, 0x6e, 0xe7, 0x65, 0x54, 0xfc, 0x72, 0x6b, 0x6d, 0x65, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x626, 0x6c7, 0x64a, 0x63a,
-0x6c7, 0x631, 0x686, 0x6d5, 0x62c, 0x6c7, 0x6ad, 0x6af, 0x648, 0x443, 0x43a, 0x440, 0x430, 0x457, 0x43d, 0x441, 0x44c, 0x43a, 0x430, 0x423,
-0x43a, 0x440, 0x430, 0x457, 0x43d, 0x430, 0x627, 0x631, 0x62f, 0x648, 0x628, 0x6be, 0x627, 0x631, 0x62a, 0x6f, 0x2018, 0x7a, 0x62, 0x65,
-0x6b, 0x4f, 0x2bb, 0x7a, 0x62, 0x65, 0x6b, 0x69, 0x73, 0x74, 0x6f, 0x6e, 0x627, 0x648, 0x632, 0x628, 0x6cc, 0x6a9, 0x45e, 0x437,
-0x431, 0x435, 0x43a, 0x447, 0x430, 0x40e, 0x437, 0x431, 0x435, 0x43a, 0x438, 0x441, 0x442, 0x43e, 0x43d, 0x54, 0x69, 0x1ebf, 0x6e, 0x67,
-0x20, 0x56, 0x69, 0x1ec7, 0x74, 0x56, 0x69, 0x1ec7, 0x74, 0x20, 0x4e, 0x61, 0x6d, 0x43, 0x79, 0x6d, 0x72, 0x61, 0x65, 0x67,
-0x59, 0x20, 0x44, 0x65, 0x79, 0x72, 0x6e, 0x61, 0x73, 0x20, 0x55, 0x6e, 0x65, 0x64, 0x69, 0x67, 0xc8, 0x64, 0xe8, 0x20,
-0x59, 0x6f, 0x72, 0xf9, 0x62, 0xe1, 0x4f, 0x72, 0xed, 0x6c, 0x1eb9, 0x301, 0xe8, 0x64, 0x65, 0x20, 0x4e, 0xe0, 0xec, 0x6a,
-0xed, 0x72, 0xed, 0xe0, 0x4f, 0x72, 0xed, 0x6c, 0x25b, 0x301, 0xe8, 0x64, 0x65, 0x20, 0x42, 0x25b, 0x300, 0x6e, 0x25b, 0x300,
-0x69, 0x73, 0x69, 0x5a, 0x75, 0x6c, 0x75, 0x69, 0x2d, 0x53, 0x6f, 0x75, 0x74, 0x68, 0x20, 0x41, 0x66, 0x72, 0x69, 0x63,
+0x46, 0x72, 0x79, 0x73, 0x6b, 0x4e, 0x65, 0x64, 0x65, 0x72, 0x6c, 0xe2, 0x6e, 0x47, 0xe0, 0x69, 0x64, 0x68, 0x6c, 0x69,
+0x67, 0x41, 0x6e, 0x20, 0x52, 0xec, 0x6f, 0x67, 0x68, 0x61, 0x63, 0x68, 0x64, 0x20, 0x41, 0x6f, 0x6e, 0x61, 0x69, 0x63,
+0x68, 0x74, 0x65, 0x67, 0x61, 0x6c, 0x65, 0x67, 0x6f, 0x45, 0x73, 0x70, 0x61, 0xf1, 0x61, 0x10e5, 0x10d0, 0x10e0, 0x10d7, 0x10e3,
+0x10da, 0x10d8, 0x10e1, 0x10d0, 0x10e5, 0x10d0, 0x10e0, 0x10d7, 0x10d5, 0x10d4, 0x10da, 0x10dd, 0x44, 0x65, 0x75, 0x74, 0x73, 0x63, 0x68, 0x44,
+0x65, 0x75, 0x74, 0x73, 0x63, 0x68, 0x6c, 0x61, 0x6e, 0x64, 0xd6, 0x73, 0x74, 0x65, 0x72, 0x72, 0x65, 0x69, 0x63, 0x68,
+0x69, 0x73, 0x63, 0x68, 0x65, 0x73, 0x20, 0x44, 0x65, 0x75, 0x74, 0x73, 0x63, 0x68, 0xd6, 0x73, 0x74, 0x65, 0x72, 0x72,
+0x65, 0x69, 0x63, 0x68, 0x42, 0x65, 0x6c, 0x67, 0x69, 0x65, 0x6e, 0x49, 0x74, 0x61, 0x6c, 0x69, 0x65, 0x6e, 0x4c, 0x69,
+0x65, 0x63, 0x68, 0x74, 0x65, 0x6e, 0x73, 0x74, 0x65, 0x69, 0x6e, 0x4c, 0x75, 0x78, 0x65, 0x6d, 0x62, 0x75, 0x72, 0x67,
+0x53, 0x63, 0x68, 0x77, 0x65, 0x69, 0x7a, 0x65, 0x72, 0x20, 0x48, 0x6f, 0x63, 0x68, 0x64, 0x65, 0x75, 0x74, 0x73, 0x63,
+0x68, 0x53, 0x63, 0x68, 0x77, 0x65, 0x69, 0x7a, 0x395, 0x3bb, 0x3bb, 0x3b7, 0x3bd, 0x3b9, 0x3ba, 0x3ac, 0x395, 0x3bb, 0x3bb, 0x3ac,
+0x3b4, 0x3b1, 0x39a, 0x3cd, 0x3c0, 0x3c1, 0x3bf, 0x3c2, 0x6b, 0x61, 0x6c, 0x61, 0x61, 0x6c, 0x6c, 0x69, 0x73, 0x75, 0x74, 0x4b,
+0x61, 0x6c, 0x61, 0x61, 0x6c, 0x6c, 0x69, 0x74, 0x20, 0x4e, 0x75, 0x6e, 0x61, 0x61, 0x74, 0xa97, 0xac1, 0xa9c, 0xab0, 0xabe,
+0xaa4, 0xac0, 0xaad, 0xabe, 0xab0, 0xaa4, 0x48, 0x61, 0x75, 0x73, 0x61, 0x4e, 0x61, 0x6a, 0x65, 0x72, 0x69, 0x79, 0x61, 0x47,
+0x61, 0x6e, 0x61, 0x4e, 0x69, 0x6a, 0x61, 0x72, 0x5e2, 0x5d1, 0x5e8, 0x5d9, 0x5ea, 0x5d9, 0x5e9, 0x5e8, 0x5d0, 0x5dc, 0x939, 0x93f,
+0x928, 0x94d, 0x926, 0x940, 0x92d, 0x93e, 0x930, 0x924, 0x6d, 0x61, 0x67, 0x79, 0x61, 0x72, 0x4d, 0x61, 0x67, 0x79, 0x61, 0x72,
+0x6f, 0x72, 0x73, 0x7a, 0xe1, 0x67, 0xed, 0x73, 0x6c, 0x65, 0x6e, 0x73, 0x6b, 0x61, 0xcd, 0x73, 0x6c, 0x61, 0x6e, 0x64,
+0x49, 0x6e, 0x64, 0x6f, 0x6e, 0x65, 0x73, 0x69, 0x61, 0x47, 0x61, 0x65, 0x69, 0x6c, 0x67, 0x65, 0xc9, 0x69, 0x72, 0x65,
+0x69, 0x74, 0x61, 0x6c, 0x69, 0x61, 0x6e, 0x6f, 0x49, 0x74, 0x61, 0x6c, 0x69, 0x61, 0x53, 0x61, 0x6e, 0x20, 0x4d, 0x61,
+0x72, 0x69, 0x6e, 0x6f, 0x53, 0x76, 0x69, 0x7a, 0x7a, 0x65, 0x72, 0x61, 0x43, 0x69, 0x74, 0x74, 0xe0, 0x20, 0x64, 0x65,
+0x6c, 0x20, 0x56, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6e, 0x6f, 0x65e5, 0x672c, 0x8a9e, 0x65e5, 0x672c, 0xc95, 0xca8, 0xccd, 0xca8, 0xca1,
+0xcad, 0xcbe, 0xcb0, 0xca4, 0x6a9, 0x672, 0x634, 0x64f, 0x631, 0x6c1, 0x650, 0x646, 0x65b, 0x62f, 0x648, 0x633, 0x62a, 0x627, 0x646, 0x49b,
+0x430, 0x437, 0x430, 0x49b, 0x20, 0x442, 0x456, 0x43b, 0x456, 0x49a, 0x430, 0x437, 0x430, 0x49b, 0x441, 0x442, 0x430, 0x43d, 0x4b, 0x69,
+0x6e, 0x79, 0x61, 0x72, 0x77, 0x61, 0x6e, 0x64, 0x61, 0x55, 0x20, 0x52, 0x77, 0x61, 0x6e, 0x64, 0x61, 0x43a, 0x44b, 0x440,
+0x433, 0x44b, 0x437, 0x447, 0x430, 0x41a, 0x44b, 0x440, 0x433, 0x44b, 0x437, 0x441, 0x442, 0x430, 0x43d, 0xd55c, 0xad6d, 0xc5b4, 0xb300, 0xd55c,
+0xbbfc, 0xad6d, 0xc870, 0xc120, 0xbbfc, 0xc8fc, 0xc8fc, 0xc758, 0xc778, 0xbbfc, 0xacf5, 0xd654, 0xad6d, 0x49, 0x6b, 0x69, 0x72, 0x75, 0x6e, 0x64,
+0x69, 0x55, 0x62, 0x75, 0x72, 0x75, 0x6e, 0x64, 0x69, 0xea5, 0xeb2, 0xea7, 0x6c, 0x61, 0x74, 0x76, 0x69, 0x65, 0x161, 0x75,
+0x4c, 0x61, 0x74, 0x76, 0x69, 0x6a, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0xe1, 0x6c, 0x61, 0x52, 0x65, 0x70, 0x75, 0x62, 0x6c,
+0xed, 0x6b, 0x69, 0x20, 0x79, 0x61, 0x20, 0x4b, 0x6f, 0x6e, 0x67, 0xf3, 0x20, 0x44, 0x65, 0x6d, 0x6f, 0x6b, 0x72, 0x61,
+0x74, 0xed, 0x6b, 0x69, 0x41, 0x6e, 0x67, 0xf3, 0x6c, 0x61, 0x52, 0x65, 0x70, 0x69, 0x62, 0x69, 0x6b, 0x69, 0x20, 0x79,
+0x61, 0x20, 0x41, 0x66, 0x72, 0xed, 0x6b, 0x61, 0x20, 0x79, 0x61, 0x20, 0x4b, 0xe1, 0x74, 0x69, 0x4b, 0x6f, 0x6e, 0x67,
+0x6f, 0x6c, 0x69, 0x65, 0x74, 0x75, 0x76, 0x69, 0x173, 0x4c, 0x69, 0x65, 0x74, 0x75, 0x76, 0x61, 0x43c, 0x430, 0x43a, 0x435,
+0x434, 0x43e, 0x43d, 0x441, 0x43a, 0x438, 0x41c, 0x430, 0x43a, 0x435, 0x434, 0x43e, 0x43d, 0x438, 0x458, 0x430, 0x4d, 0x61, 0x6c, 0x61,
+0x67, 0x61, 0x73, 0x79, 0x4d, 0x61, 0x64, 0x61, 0x67, 0x61, 0x73, 0x69, 0x6b, 0x61, 0x72, 0x61, 0x4d, 0x65, 0x6c, 0x61,
+0x79, 0x75, 0x42, 0x72, 0x75, 0x6e, 0x65, 0x69, 0x53, 0x69, 0x6e, 0x67, 0x61, 0x70, 0x75, 0x72, 0x61, 0xd2e, 0xd32, 0xd2f,
+0xd3e, 0xd33, 0xd02, 0xd07, 0xd28, 0xd4d, 0xd24, 0xd4d, 0xd2f, 0x4d, 0x61, 0x6c, 0x74, 0x69, 0x92e, 0x930, 0x93e, 0x920, 0x940, 0x43c,
+0x43e, 0x43d, 0x433, 0x43e, 0x43b, 0x41c, 0x43e, 0x43d, 0x433, 0x43e, 0x43b, 0x928, 0x947, 0x92a, 0x93e, 0x932, 0x940, 0x928, 0x947, 0x92a,
+0x93e, 0x932, 0x6e, 0x6f, 0x72, 0x73, 0x6b, 0x20, 0x62, 0x6f, 0x6b, 0x6d, 0xe5, 0x6c, 0x4e, 0x6f, 0x72, 0x67, 0x65, 0x53,
+0x76, 0x61, 0x6c, 0x62, 0x61, 0x72, 0x64, 0x20, 0x6f, 0x67, 0x20, 0x4a, 0x61, 0x6e, 0x20, 0x4d, 0x61, 0x79, 0x65, 0x6e,
+0xb13, 0xb21, 0xb3c, 0xb3f, 0xb06, 0xb2d, 0xb3e, 0xb30, 0xb24, 0x67e, 0x69a, 0x62a, 0x648, 0x627, 0x641, 0x63a, 0x627, 0x646, 0x633, 0x62a,
+0x627, 0x646, 0x641, 0x627, 0x631, 0x633, 0x6cc, 0x627, 0x6cc, 0x631, 0x627, 0x646, 0x62f, 0x631, 0x6cc, 0x70, 0x6f, 0x6c, 0x73, 0x6b,
+0x69, 0x50, 0x6f, 0x6c, 0x73, 0x6b, 0x61, 0x70, 0x6f, 0x72, 0x74, 0x75, 0x67, 0x75, 0xea, 0x73, 0x42, 0x72, 0x61, 0x73,
+0x69, 0x6c, 0x41, 0x6e, 0x67, 0x6f, 0x6c, 0x61, 0x43, 0x61, 0x62, 0x6f, 0x20, 0x56, 0x65, 0x72, 0x64, 0x65, 0x54, 0x69,
+0x6d, 0x6f, 0x72, 0x2d, 0x4c, 0x65, 0x73, 0x74, 0x65, 0x47, 0x75, 0x69, 0x6e, 0xe9, 0x20, 0x45, 0x71, 0x75, 0x61, 0x74,
+0x6f, 0x72, 0x69, 0x61, 0x6c, 0x47, 0x75, 0x69, 0x6e, 0xe9, 0x2d, 0x42, 0x69, 0x73, 0x73, 0x61, 0x75, 0x4c, 0x75, 0x78,
+0x65, 0x6d, 0x62, 0x75, 0x72, 0x67, 0x6f, 0x4d, 0x61, 0x63, 0x61, 0x75, 0x2c, 0x20, 0x52, 0x41, 0x45, 0x20, 0x64, 0x61,
+0x20, 0x43, 0x68, 0x69, 0x6e, 0x61, 0x4d, 0x6f, 0xe7, 0x61, 0x6d, 0x62, 0x69, 0x71, 0x75, 0x65, 0x70, 0x6f, 0x72, 0x74,
+0x75, 0x67, 0x75, 0xea, 0x73, 0x20, 0x65, 0x75, 0x72, 0x6f, 0x70, 0x65, 0x75, 0x50, 0x6f, 0x72, 0x74, 0x75, 0x67, 0x61,
+0x6c, 0x53, 0xe3, 0x6f, 0x20, 0x54, 0x6f, 0x6d, 0xe9, 0x20, 0x65, 0x20, 0x50, 0x72, 0xed, 0x6e, 0x63, 0x69, 0x70, 0x65,
+0x53, 0x75, 0xed, 0xe7, 0x61, 0xa2a, 0xa70, 0xa1c, 0xa3e, 0xa2c, 0xa40, 0xa2d, 0xa3e, 0xa30, 0xa24, 0x67e, 0x646, 0x62c, 0x627, 0x628,
+0x6cc, 0x67e, 0x627, 0x6a9, 0x633, 0x62a, 0x627, 0x646, 0x52, 0x75, 0x6e, 0x61, 0x73, 0x69, 0x6d, 0x69, 0x50, 0x65, 0x72, 0xfa,
+0x42, 0x6f, 0x6c, 0x69, 0x76, 0x69, 0x61, 0x45, 0x63, 0x75, 0x61, 0x64, 0x6f, 0x72, 0x72, 0x75, 0x6d, 0x61, 0x6e, 0x74,
+0x73, 0x63, 0x68, 0x53, 0x76, 0x69, 0x7a, 0x72, 0x61, 0x72, 0x6f, 0x6d, 0xe2, 0x6e, 0x103, 0x52, 0x6f, 0x6d, 0xe2, 0x6e,
+0x69, 0x61, 0x52, 0x65, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x20, 0x4d, 0x6f, 0x6c, 0x64, 0x6f, 0x76, 0x61, 0x440,
+0x443, 0x441, 0x441, 0x43a, 0x438, 0x439, 0x420, 0x43e, 0x441, 0x441, 0x438, 0x44f, 0x41a, 0x430, 0x437, 0x430, 0x445, 0x441, 0x442, 0x430,
+0x43d, 0x41a, 0x438, 0x440, 0x433, 0x438, 0x437, 0x438, 0x44f, 0x41c, 0x43e, 0x43b, 0x434, 0x43e, 0x432, 0x430, 0x423, 0x43a, 0x440, 0x430,
+0x438, 0x43d, 0x430, 0x53, 0xe4, 0x6e, 0x67, 0xf6, 0x4b, 0xf6, 0x64, 0xf6, 0x72, 0xf6, 0x73, 0xea, 0x73, 0x65, 0x20, 0x74,
+0xee, 0x20, 0x42, 0xea, 0x61, 0x66, 0x72, 0xee, 0x6b, 0x61, 0x441, 0x440, 0x43f, 0x441, 0x43a, 0x438, 0x421, 0x440, 0x431, 0x438,
+0x458, 0x430, 0x411, 0x43e, 0x441, 0x43d, 0x430, 0x20, 0x438, 0x20, 0x425, 0x435, 0x440, 0x446, 0x435, 0x433, 0x43e, 0x432, 0x438, 0x43d,
+0x430, 0x426, 0x440, 0x43d, 0x430, 0x20, 0x413, 0x43e, 0x440, 0x430, 0x41a, 0x43e, 0x441, 0x43e, 0x432, 0x43e, 0x73, 0x72, 0x70, 0x73,
+0x6b, 0x69, 0x43, 0x72, 0x6e, 0x61, 0x20, 0x47, 0x6f, 0x72, 0x61, 0x53, 0x72, 0x62, 0x69, 0x6a, 0x61, 0x4b, 0x6f, 0x73,
+0x6f, 0x76, 0x6f, 0x438, 0x440, 0x43e, 0x43d, 0x413, 0x443, 0x44b, 0x440, 0x434, 0x437, 0x44b, 0x441, 0x442, 0x43e, 0x43d, 0x423, 0x4d5,
+0x440, 0x4d5, 0x441, 0x435, 0x63, 0x68, 0x69, 0x53, 0x68, 0x6f, 0x6e, 0x61, 0x633, 0x646, 0x68c, 0x64a, 0x67e, 0x627, 0x6aa, 0x633,
+0x62a, 0x627, 0x646, 0xdc3, 0xdd2, 0xd82, 0xdc4, 0xdbd, 0xdc1, 0xdca, 0x200d, 0xdbb, 0xdd3, 0x20, 0xdbd, 0xd82, 0xd9a, 0xdcf, 0xdc0, 0x73,
+0x6c, 0x6f, 0x76, 0x65, 0x6e, 0x10d, 0x69, 0x6e, 0x61, 0x53, 0x6c, 0x6f, 0x76, 0x65, 0x6e, 0x73, 0x6b, 0x6f, 0x73, 0x6c,
+0x6f, 0x76, 0x65, 0x6e, 0x161, 0x10d, 0x69, 0x6e, 0x61, 0x53, 0x6c, 0x6f, 0x76, 0x65, 0x6e, 0x69, 0x6a, 0x61, 0x53, 0x6f,
+0x6f, 0x6d, 0x61, 0x61, 0x6c, 0x69, 0x53, 0x6f, 0x6f, 0x6d, 0x61, 0x61, 0x6c, 0x69, 0x79, 0x61, 0x4a, 0x61, 0x62, 0x75,
+0x75, 0x74, 0x69, 0x49, 0x74, 0x6f, 0x6f, 0x62, 0x69, 0x79, 0x61, 0x4b, 0x69, 0x69, 0x6e, 0x69, 0x79, 0x61, 0x65, 0x73,
+0x70, 0x61, 0xf1, 0x6f, 0x6c, 0x20, 0x64, 0x65, 0x20, 0x45, 0x73, 0x70, 0x61, 0xf1, 0x61, 0x65, 0x73, 0x70, 0x61, 0xf1,
+0x6f, 0x6c, 0x41, 0x72, 0x67, 0x65, 0x6e, 0x74, 0x69, 0x6e, 0x61, 0x42, 0x65, 0x6c, 0x69, 0x63, 0x65, 0x43, 0x68, 0x69,
+0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x6d, 0x62, 0x69, 0x61, 0x43, 0x6f, 0x73, 0x74, 0x61, 0x20, 0x52, 0x69, 0x63, 0x61,
+0x43, 0x75, 0x62, 0x61, 0x52, 0x65, 0x70, 0xfa, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x20, 0x44, 0x6f, 0x6d, 0x69, 0x6e, 0x69,
+0x63, 0x61, 0x6e, 0x61, 0x45, 0x6c, 0x20, 0x53, 0x61, 0x6c, 0x76, 0x61, 0x64, 0x6f, 0x72, 0x47, 0x75, 0x69, 0x6e, 0x65,
+0x61, 0x20, 0x45, 0x63, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x69, 0x61, 0x6c, 0x47, 0x75, 0x61, 0x74, 0x65, 0x6d, 0x61, 0x6c,
+0x61, 0x48, 0x6f, 0x6e, 0x64, 0x75, 0x72, 0x61, 0x73, 0x65, 0x73, 0x70, 0x61, 0xf1, 0x6f, 0x6c, 0x20, 0x64, 0x65, 0x20,
+0x4d, 0xe9, 0x78, 0x69, 0x63, 0x6f, 0x4d, 0xe9, 0x78, 0x69, 0x63, 0x6f, 0x4e, 0x69, 0x63, 0x61, 0x72, 0x61, 0x67, 0x75,
+0x61, 0x50, 0x61, 0x6e, 0x61, 0x6d, 0xe1, 0x50, 0x61, 0x72, 0x61, 0x67, 0x75, 0x61, 0x79, 0x46, 0x69, 0x6c, 0x69, 0x70,
+0x69, 0x6e, 0x61, 0x73, 0x45, 0x73, 0x74, 0x61, 0x64, 0x6f, 0x73, 0x20, 0x55, 0x6e, 0x69, 0x64, 0x6f, 0x73, 0x55, 0x72,
+0x75, 0x67, 0x75, 0x61, 0x79, 0x56, 0x65, 0x6e, 0x65, 0x7a, 0x75, 0x65, 0x6c, 0x61, 0x43, 0x61, 0x6e, 0x61, 0x72, 0x69,
+0x61, 0x73, 0x65, 0x73, 0x70, 0x61, 0xf1, 0x6f, 0x6c, 0x20, 0x6c, 0x61, 0x74, 0x69, 0x6e, 0x6f, 0x61, 0x6d, 0x65, 0x72,
+0x69, 0x63, 0x61, 0x6e, 0x6f, 0x4c, 0x61, 0x74, 0x69, 0x6e, 0x6f, 0x61, 0x6d, 0xe9, 0x72, 0x69, 0x63, 0x61, 0x43, 0x65,
+0x75, 0x74, 0x61, 0x20, 0x79, 0x20, 0x4d, 0x65, 0x6c, 0x69, 0x6c, 0x6c, 0x61, 0x4b, 0x69, 0x73, 0x77, 0x61, 0x68, 0x69,
+0x6c, 0x69, 0x4b, 0x69, 0x6e, 0x67, 0x77, 0x61, 0x6e, 0x61, 0x4a, 0x61, 0x6d, 0x68, 0x75, 0x72, 0x69, 0x20, 0x79, 0x61,
+0x20, 0x4b, 0x69, 0x64, 0x65, 0x6d, 0x6f, 0x6b, 0x72, 0x61, 0x73, 0x69, 0x61, 0x20, 0x79, 0x61, 0x20, 0x4b, 0x6f, 0x6e,
+0x67, 0x6f, 0x73, 0x76, 0x65, 0x6e, 0x73, 0x6b, 0x61, 0x53, 0x76, 0x65, 0x72, 0x69, 0x67, 0x65, 0xc5, 0x6c, 0x61, 0x6e,
+0x64, 0x442, 0x43e, 0x4b7, 0x438, 0x43a, 0x4e3, 0x422, 0x43e, 0x4b7, 0x438, 0x43a, 0x438, 0x441, 0x442, 0x43e, 0x43d, 0xba4, 0xbae, 0xbbf,
+0xbb4, 0xbcd, 0xb87, 0xba8, 0xbcd, 0xba4, 0xbbf, 0xbaf, 0xbbe, 0xbae, 0xbb2, 0xbc7, 0xb9a, 0xbbf, 0xbaf, 0xbbe, 0xb9a, 0xbbf, 0xb99, 0xbcd,
+0xb95, 0xbaa, 0xbcd, 0xbaa, 0xbc2, 0xbb0, 0xbcd, 0xb87, 0xbb2, 0xb99, 0xbcd, 0xb95, 0xbc8, 0x442, 0x430, 0x442, 0x430, 0x440, 0xc24, 0xc46,
+0xc32, 0xc41, 0xc17, 0xc41, 0xc2d, 0xc3e, 0xc30, 0xc24, 0xc26, 0xc47, 0xc36, 0xc02, 0xe44, 0xe17, 0xe22, 0xf56, 0xf7c, 0xf51, 0xf0b, 0xf66,
+0xf90, 0xf51, 0xf0b, 0xf62, 0xf92, 0xfb1, 0xf0b, 0xf53, 0xf42, 0xf62, 0xf92, 0xfb1, 0xf0b, 0xf42, 0xf62, 0xf0b, 0x1275, 0x130d, 0x122d, 0x129b,
+0x12a4, 0x122d, 0x1275, 0x122b, 0x6c, 0x65, 0x61, 0x20, 0x66, 0x61, 0x6b, 0x61, 0x74, 0x6f, 0x6e, 0x67, 0x61, 0x54, 0xfc, 0x72,
+0x6b, 0xe7, 0x65, 0x54, 0xfc, 0x72, 0x6b, 0x69, 0x79, 0x65, 0x4b, 0x131, 0x62, 0x72, 0x131, 0x73, 0x74, 0xfc, 0x72, 0x6b,
+0x6d, 0x65, 0x6e, 0x20, 0x64, 0x69, 0x6c, 0x69, 0x54, 0xfc, 0x72, 0x6b, 0x6d, 0x65, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x6e,
+0x626, 0x6c7, 0x64a, 0x63a, 0x6c7, 0x631, 0x686, 0x6d5, 0x62c, 0x6c7, 0x6ad, 0x6af, 0x648, 0x443, 0x43a, 0x440, 0x430, 0x457, 0x43d, 0x441,
+0x44c, 0x43a, 0x430, 0x423, 0x43a, 0x440, 0x430, 0x457, 0x43d, 0x430, 0x627, 0x631, 0x62f, 0x648, 0x628, 0x6be, 0x627, 0x631, 0x62a, 0x6f,
+0x2018, 0x7a, 0x62, 0x65, 0x6b, 0x4f, 0x2bb, 0x7a, 0x62, 0x65, 0x6b, 0x69, 0x73, 0x74, 0x6f, 0x6e, 0x627, 0x648, 0x632, 0x628,
+0x6cc, 0x6a9, 0x45e, 0x437, 0x431, 0x435, 0x43a, 0x447, 0x430, 0x40e, 0x437, 0x431, 0x435, 0x43a, 0x438, 0x441, 0x442, 0x43e, 0x43d, 0x54,
+0x69, 0x1ebf, 0x6e, 0x67, 0x20, 0x56, 0x69, 0x1ec7, 0x74, 0x56, 0x69, 0x1ec7, 0x74, 0x20, 0x4e, 0x61, 0x6d, 0x43, 0x79, 0x6d,
+0x72, 0x61, 0x65, 0x67, 0x59, 0x20, 0x44, 0x65, 0x79, 0x72, 0x6e, 0x61, 0x73, 0x20, 0x55, 0x6e, 0x65, 0x64, 0x69, 0x67,
+0x57, 0x6f, 0x6c, 0x6f, 0x66, 0x53, 0x65, 0x6e, 0x65, 0x67, 0x61, 0x61, 0x6c, 0xc8, 0x64, 0xe8, 0x20, 0x59, 0x6f, 0x72,
+0xf9, 0x62, 0xe1, 0x4f, 0x72, 0xed, 0x6c, 0x1eb9, 0x301, 0xe8, 0x64, 0x65, 0x20, 0x4e, 0xe0, 0xec, 0x6a, 0xed, 0x72, 0xed,
+0xe0, 0x4f, 0x72, 0xed, 0x6c, 0x25b, 0x301, 0xe8, 0x64, 0x65, 0x20, 0x42, 0x25b, 0x300, 0x6e, 0x25b, 0x300, 0x69, 0x73, 0x69,
+0x5a, 0x75, 0x6c, 0x75, 0x69, 0x4e, 0x69, 0x6e, 0x67, 0x69, 0x7a, 0x69, 0x6d, 0x75, 0x20, 0x41, 0x66, 0x72, 0x69, 0x6b,
0x61, 0x6e, 0x79, 0x6e, 0x6f, 0x72, 0x73, 0x6b, 0x4e, 0x6f, 0x72, 0x65, 0x67, 0x62, 0x6f, 0x73, 0x61, 0x6e, 0x73, 0x6b,
0x69, 0x431, 0x43e, 0x441, 0x430, 0x43d, 0x441, 0x43a, 0x438, 0x47, 0x61, 0x65, 0x6c, 0x67, 0x45, 0x6c, 0x6c, 0x61, 0x6e, 0x20,
0x56, 0x61, 0x6e, 0x6e, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x77, 0x65, 0x6b, 0x52, 0x79, 0x77, 0x76, 0x61, 0x6e,
0x65, 0x74, 0x68, 0x20, 0x55, 0x6e, 0x79, 0x73, 0x41, 0x6b, 0x61, 0x6e, 0x47, 0x61, 0x61, 0x6e, 0x61, 0x915, 0x94b, 0x902,
-0x915, 0x923, 0x940, 0x49, 0x67, 0x62, 0x6f, 0x4b, 0x69, 0x6b, 0x61, 0x6d, 0x62, 0x61, 0x66, 0x75, 0x72, 0x6c, 0x61, 0x6e,
-0x49, 0x74, 0x61, 0x6c, 0x69, 0x65, 0x45, 0x28b, 0x65, 0x67, 0x62, 0x65, 0x47, 0x68, 0x61, 0x6e, 0x61, 0x20, 0x6e, 0x75,
-0x74, 0x6f, 0x6d, 0x65, 0x54, 0x6f, 0x67, 0x6f, 0x20, 0x6e, 0x75, 0x74, 0x6f, 0x6d, 0x65, 0x2bb, 0x14c, 0x6c, 0x65, 0x6c,
-0x6f, 0x20, 0x48, 0x61, 0x77, 0x61, 0x69, 0x2bb, 0x69, 0x2bb, 0x41, 0x6d, 0x65, 0x6c, 0x69, 0x6b, 0x61, 0x20, 0x48, 0x75,
-0x69, 0x20, 0x50, 0x16b, 0x20, 0x2bb, 0x49, 0x61, 0x46, 0x69, 0x6c, 0x69, 0x70, 0x69, 0x6e, 0x6f, 0x50, 0x69, 0x6c, 0x69,
-0x70, 0x69, 0x6e, 0x61, 0x73, 0x53, 0x63, 0x68, 0x77, 0x69, 0x69, 0x7a, 0x65, 0x72, 0x74, 0xfc, 0xfc, 0x74, 0x73, 0x63,
-0x68, 0x53, 0x63, 0x68, 0x77, 0x69, 0x69, 0x7a, 0x46, 0x72, 0x61, 0x6e, 0x6b, 0x72, 0x69, 0x69, 0x63, 0x68, 0x4c, 0x69,
-0xe4, 0x63, 0x68, 0x74, 0x65, 0x73, 0x63, 0x68, 0x74, 0xe4, 0x69, 0xa188, 0xa320, 0xa259, 0xa34f, 0xa1e9, 0x4e, 0x65, 0x64, 0x64,
-0x65, 0x72, 0x73, 0x61, 0x73, 0x73, 0x2019, 0x73, 0x63, 0x68, 0x44, 0xfc, 0xfc, 0x74, 0x73, 0x63, 0x68, 0x6c, 0x61, 0x6e,
-0x64, 0x4e, 0x65, 0x64, 0x64, 0x65, 0x72, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x6e, 0x64, 0x61, 0x76, 0x76, 0x69, 0x73, 0xe1,
-0x6d, 0x65, 0x67, 0x69, 0x65, 0x6c, 0x6c, 0x61, 0x4e, 0x6f, 0x72, 0x67, 0x61, 0x53, 0x75, 0x6f, 0x70, 0x6d, 0x61, 0x52,
-0x75, 0x6f, 0x167, 0x167, 0x61, 0x45, 0x6b, 0x65, 0x67, 0x75, 0x73, 0x69, 0x69, 0x4b, 0x69, 0x74, 0x61, 0x69, 0x74, 0x61,
-0x50, 0x75, 0x6c, 0x61, 0x61, 0x72, 0x53, 0x65, 0x6e, 0x65, 0x67, 0x61, 0x61, 0x6c, 0x4b, 0x61, 0x6d, 0x65, 0x72, 0x75,
+0x915, 0x923, 0x940, 0x49, 0x67, 0x62, 0x6f, 0x4e, 0x61, 0x1ecb, 0x6a, 0x1ecb, 0x72, 0x1ecb, 0x61, 0x4b, 0x69, 0x6b, 0x61, 0x6d,
+0x62, 0x61, 0x66, 0x75, 0x72, 0x6c, 0x61, 0x6e, 0x49, 0x74, 0x61, 0x6c, 0x69, 0x65, 0x45, 0x28b, 0x65, 0x67, 0x62, 0x65,
+0x47, 0x68, 0x61, 0x6e, 0x61, 0x20, 0x6e, 0x75, 0x74, 0x6f, 0x6d, 0x65, 0x54, 0x6f, 0x67, 0x6f, 0x20, 0x6e, 0x75, 0x74,
+0x6f, 0x6d, 0x65, 0x2bb, 0x14c, 0x6c, 0x65, 0x6c, 0x6f, 0x20, 0x48, 0x61, 0x77, 0x61, 0x69, 0x2bb, 0x69, 0x2bb, 0x41, 0x6d,
+0x65, 0x6c, 0x69, 0x6b, 0x61, 0x20, 0x48, 0x75, 0x69, 0x20, 0x50, 0x16b, 0x20, 0x2bb, 0x49, 0x61, 0x46, 0x69, 0x6c, 0x69,
+0x70, 0x69, 0x6e, 0x6f, 0x50, 0x69, 0x6c, 0x69, 0x70, 0x69, 0x6e, 0x61, 0x73, 0x53, 0x63, 0x68, 0x77, 0x69, 0x69, 0x7a,
+0x65, 0x72, 0x74, 0xfc, 0xfc, 0x74, 0x73, 0x63, 0x68, 0x53, 0x63, 0x68, 0x77, 0x69, 0x69, 0x7a, 0x46, 0x72, 0x61, 0x6e,
+0x6b, 0x72, 0x69, 0x69, 0x63, 0x68, 0x4c, 0x69, 0xe4, 0x63, 0x68, 0x74, 0x65, 0x73, 0x63, 0x68, 0x74, 0xe4, 0x69, 0xa188,
+0xa320, 0xa259, 0xa34f, 0xa1e9, 0x4e, 0x65, 0x64, 0x64, 0x65, 0x72, 0x73, 0x61, 0x73, 0x73, 0x2019, 0x73, 0x63, 0x68, 0x44, 0xfc,
+0xfc, 0x74, 0x73, 0x63, 0x68, 0x6c, 0x61, 0x6e, 0x64, 0x4e, 0x65, 0x64, 0x64, 0x65, 0x72, 0x6c, 0x61, 0x6e, 0x6e, 0x65,
+0x6e, 0x64, 0x61, 0x76, 0x76, 0x69, 0x73, 0xe1, 0x6d, 0x65, 0x67, 0x69, 0x65, 0x6c, 0x6c, 0x61, 0x4e, 0x6f, 0x72, 0x67,
+0x61, 0x53, 0x75, 0x6f, 0x70, 0x6d, 0x61, 0x52, 0x75, 0x6f, 0x167, 0x167, 0x61, 0x45, 0x6b, 0x65, 0x67, 0x75, 0x73, 0x69,
+0x69, 0x4b, 0x69, 0x74, 0x61, 0x69, 0x74, 0x61, 0x50, 0x75, 0x6c, 0x61, 0x61, 0x72, 0x4b, 0x61, 0x6d, 0x65, 0x72, 0x75,
0x75, 0x6e, 0x47, 0x69, 0x6e, 0x65, 0x4d, 0x75, 0x72, 0x69, 0x74, 0x61, 0x6e, 0x69, 0x47, 0x69, 0x6b, 0x75, 0x79, 0x75,
0x4b, 0x69, 0x73, 0x61, 0x6d, 0x70, 0x75, 0x72, 0x73, 0x65, 0x6e, 0x61, 0x69, 0x73, 0x69, 0x4e, 0x64, 0x65, 0x62, 0x65,
0x6c, 0x65, 0x4b, 0x69, 0x68, 0x6f, 0x72, 0x6f, 0x6d, 0x62, 0x6f, 0x2d5c, 0x2d30, 0x2d5b, 0x2d4d, 0x2d43, 0x2d49, 0x2d5c, 0x2d4d, 0x2d4e,
@@ -6128,7 +6226,8 @@ static const ushort endonyms_data[] = {
0x69, 0x6d, 0x73, 0x6b, 0x61, 0x68, 0x6f, 0x72, 0x6e, 0x6a, 0x6f, 0x73, 0x65, 0x72, 0x62, 0x161, 0x107, 0x69, 0x6e, 0x61,
0x4e, 0x11b, 0x6d, 0x73, 0x6b, 0x61, 0x61, 0x6e, 0x61, 0x72, 0xe2, 0x161, 0x6b, 0x69, 0x65, 0x6c, 0xe2, 0x53, 0x75, 0x6f,
0x6d, 0xe2, 0x645, 0x627, 0x632, 0x631, 0x648, 0x646, 0x6cc, 0x644, 0x6ca, 0x631, 0x6cc, 0x20, 0x634, 0x648, 0x645, 0x627, 0x644, 0x6cc,
-0x7cb5, 0x8a9e, 0x4e2d, 0x83ef, 0x4eba, 0x6c11, 0x5171, 0x548c, 0x570b, 0x9999, 0x6e2f, 0x7279, 0x5225, 0x884c, 0x653f, 0x5340
+0x7cb5, 0x8a9e, 0x4e2d, 0x83ef, 0x4eba, 0x6c11, 0x5171, 0x548c, 0x570b, 0x9999, 0x6e2f, 0x7279, 0x5225, 0x884c, 0x653f, 0x5340, 0x7ca4, 0x8bed, 0x4e2d, 0x534e,
+0x4eba, 0x6c11, 0x5171, 0x548c, 0x56fd
};
static const char language_name_list[] =
diff --git a/src/corelib/tools/qlocale_p.h b/src/corelib/tools/qlocale_p.h
index 6669ae7c8b..f2e11499c8 100644
--- a/src/corelib/tools/qlocale_p.h
+++ b/src/corelib/tools/qlocale_p.h
@@ -274,6 +274,7 @@ public:
public:
quint16 m_language_id, m_script_id, m_country_id;
+ // FIXME QTBUG-69324: not all unicode code-points map to single-token UTF-16 :-(
quint16 m_decimal, m_group, m_list, m_percent, m_zero, m_minus, m_plus, m_exponential;
quint16 m_quotation_start, m_quotation_end;
quint16 m_alternate_quotation_start, m_alternate_quotation_end;
diff --git a/src/corelib/tools/qlocale_tools.cpp b/src/corelib/tools/qlocale_tools.cpp
index 4d969a4723..baa4da37f4 100644
--- a/src/corelib/tools/qlocale_tools.cpp
+++ b/src/corelib/tools/qlocale_tools.cpp
@@ -278,7 +278,7 @@ void doubleToAscii(double d, QLocaleData::DoubleForm form, int precision, char *
}
double asciiToDouble(const char *num, int numLen, bool &ok, int &processed,
- TrailingJunkMode trailingJunkMode)
+ StrayCharacterMode strayCharMode)
{
if (*num == '\0') {
ok = false;
@@ -315,9 +315,13 @@ double asciiToDouble(const char *num, int numLen, bool &ok, int &processed,
double d = 0.0;
#if !defined(QT_NO_DOUBLECONVERSION) && !defined(QT_BOOTSTRAPPED)
- int conv_flags = (trailingJunkMode == TrailingJunkAllowed) ?
- double_conversion::StringToDoubleConverter::ALLOW_TRAILING_JUNK :
- double_conversion::StringToDoubleConverter::NO_FLAGS;
+ int conv_flags = double_conversion::StringToDoubleConverter::NO_FLAGS;
+ if (strayCharMode == TrailingJunkAllowed) {
+ conv_flags = double_conversion::StringToDoubleConverter::ALLOW_TRAILING_JUNK;
+ } else if (strayCharMode == WhitespacesAllowed) {
+ conv_flags = double_conversion::StringToDoubleConverter::ALLOW_LEADING_SPACES
+ | double_conversion::StringToDoubleConverter::ALLOW_TRAILING_SPACES;
+ }
double_conversion::StringToDoubleConverter conv(conv_flags, 0.0, qt_snan(), 0, 0);
d = conv.StringToDouble(num, numLen, &processed);
@@ -336,7 +340,7 @@ double asciiToDouble(const char *num, int numLen, bool &ok, int &processed,
if (qDoubleSscanf(num, QT_CLOCALE, "%lf%n", &d, &processed) < 1)
processed = 0;
- if ((trailingJunkMode == TrailingJunkProhibited && processed != numLen) || qIsNaN(d)) {
+ if ((strayCharMode == TrailingJunkProhibited && processed != numLen) || qIsNaN(d)) {
// Implementation defined nan symbol or garbage found. We don't accept it.
processed = 0;
ok = false;
@@ -361,7 +365,7 @@ double asciiToDouble(const char *num, int numLen, bool &ok, int &processed,
#endif // !defined(QT_NO_DOUBLECONVERSION) && !defined(QT_BOOTSTRAPPED)
// Otherwise we would have gotten NaN or sorted it out above.
- Q_ASSERT(trailingJunkMode == TrailingJunkAllowed || processed == numLen);
+ Q_ASSERT(strayCharMode == TrailingJunkAllowed || processed == numLen);
// Check if underflow has occurred.
if (isZero(d)) {
diff --git a/src/corelib/tools/qlocale_tools_p.h b/src/corelib/tools/qlocale_tools_p.h
index 742abb4957..c8ea25b504 100644
--- a/src/corelib/tools/qlocale_tools_p.h
+++ b/src/corelib/tools/qlocale_tools_p.h
@@ -72,13 +72,14 @@
QT_BEGIN_NAMESPACE
-enum TrailingJunkMode {
+enum StrayCharacterMode {
TrailingJunkProhibited,
- TrailingJunkAllowed
+ TrailingJunkAllowed,
+ WhitespacesAllowed
};
double asciiToDouble(const char *num, int numLen, bool &ok, int &processed,
- TrailingJunkMode trailingJunkMode = TrailingJunkProhibited);
+ StrayCharacterMode strayCharMode = TrailingJunkProhibited);
void doubleToAscii(double d, QLocaleData::DoubleForm form, int precision, char *buf, int bufSize,
bool &sign, int &length, int &decpt);
diff --git a/src/corelib/tools/qmap.h b/src/corelib/tools/qmap.h
index a5b9096835..1cf9299e26 100644
--- a/src/corelib/tools/qmap.h
+++ b/src/corelib/tools/qmap.h
@@ -449,6 +449,7 @@ public:
inline iterator operator-(int j) const { return operator+(-j); }
inline iterator &operator+=(int j) { return *this = *this + j; }
inline iterator &operator-=(int j) { return *this = *this - j; }
+ friend inline iterator operator+(int j, iterator k) { return k + j; }
#ifndef QT_STRICT_ITERATORS
public:
@@ -512,6 +513,7 @@ public:
inline const_iterator operator-(int j) const { return operator+(-j); }
inline const_iterator &operator+=(int j) { return *this = *this + j; }
inline const_iterator &operator-=(int j) { return *this = *this - j; }
+ friend inline const_iterator operator+(int j, const_iterator k) { return k + j; }
#ifdef QT_STRICT_ITERATORS
private:
diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp
index 96ddca56af..87b30c952e 100644
--- a/src/corelib/tools/qregexp.cpp
+++ b/src/corelib/tools/qregexp.cpp
@@ -3813,50 +3813,57 @@ struct QRegExpPrivate
};
#if !defined(QT_NO_REGEXP_OPTIM)
-typedef QCache<QRegExpEngineKey, QRegExpEngine> EngineCache;
-Q_GLOBAL_STATIC(EngineCache, globalEngineCache)
-static QBasicMutex globalEngineCacheMutex;
+struct QRECache
+{
+ typedef QHash<QRegExpEngineKey, QRegExpEngine *> EngineCache;
+ typedef QCache<QRegExpEngineKey, QRegExpEngine> UnusedEngineCache;
+ EngineCache usedEngines;
+ UnusedEngineCache unusedEngines;
+};
+Q_GLOBAL_STATIC(QRECache, engineCache)
+static QBasicMutex engineCacheMutex;
#endif // QT_NO_REGEXP_OPTIM
static void derefEngine(QRegExpEngine *eng, const QRegExpEngineKey &key)
{
- if (!eng->ref.deref()) {
#if !defined(QT_NO_REGEXP_OPTIM)
- if (globalEngineCache()) {
- QMutexLocker locker(&globalEngineCacheMutex);
- QT_TRY {
- globalEngineCache()->insert(key, eng, 4 + key.pattern.length() / 4);
- } QT_CATCH(const std::bad_alloc &) {
- // in case of an exception (e.g. oom), just delete the engine
- delete eng;
- }
+ QMutexLocker locker(&engineCacheMutex);
+ if (!eng->ref.deref()) {
+ if (QRECache *c = engineCache()) {
+ c->unusedEngines.insert(key, eng, 4 + key.pattern.length() / 4);
+ c->usedEngines.remove(key);
} else {
delete eng;
}
+ }
#else
- Q_UNUSED(key);
+ Q_UNUSED(key);
+ if (!eng->ref.deref())
delete eng;
#endif
- }
}
static void prepareEngine_helper(QRegExpPrivate *priv)
{
- bool initMatchState = !priv->eng;
+ Q_ASSERT(!priv->eng);
+
#if !defined(QT_NO_REGEXP_OPTIM)
- if (!priv->eng && globalEngineCache()) {
- QMutexLocker locker(&globalEngineCacheMutex);
- priv->eng = globalEngineCache()->take(priv->engineKey);
- if (priv->eng != 0)
+ QMutexLocker locker(&engineCacheMutex);
+ if (QRECache *c = engineCache()) {
+ priv->eng = c->unusedEngines.take(priv->engineKey);
+ if (!priv->eng)
+ priv->eng = c->usedEngines.value(priv->engineKey);
+ if (!priv->eng)
+ priv->eng = new QRegExpEngine(priv->engineKey);
+ else
priv->eng->ref.ref();
+
+ c->usedEngines.insert(priv->engineKey, priv->eng);
+ return;
}
#endif // QT_NO_REGEXP_OPTIM
- if (!priv->eng)
- priv->eng = new QRegExpEngine(priv->engineKey);
-
- if (initMatchState)
- priv->matchState.prepareForMatch(priv->eng);
+ priv->eng = new QRegExpEngine(priv->engineKey);
}
inline static void prepareEngine(QRegExpPrivate *priv)
@@ -3864,6 +3871,7 @@ inline static void prepareEngine(QRegExpPrivate *priv)
if (priv->eng)
return;
prepareEngine_helper(priv);
+ priv->matchState.prepareForMatch(priv->eng);
}
static void prepareEngineForMatch(QRegExpPrivate *priv, const QString &str)
diff --git a/src/corelib/tools/qregularexpression.cpp b/src/corelib/tools/qregularexpression.cpp
index 13eff07c04..af2e46dd00 100644
--- a/src/corelib/tools/qregularexpression.cpp
+++ b/src/corelib/tools/qregularexpression.cpp
@@ -43,7 +43,7 @@
#include <QtCore/qcoreapplication.h>
#include <QtCore/qhashfunctions.h>
-#include <QtCore/qreadwritelock.h>
+#include <QtCore/qmutex.h>
#include <QtCore/qvector.h>
#include <QtCore/qstringlist.h>
#include <QtCore/qdebug.h>
@@ -720,21 +720,14 @@ QT_BEGIN_NAMESPACE
to the \c{/u} modifier in Perl regular expressions.
\value OptimizeOnFirstUsageOption
- The regular expression will be optimized (and possibly
- JIT-compiled) on its first usage, instead of after a certain (undefined)
- number of usages. See also \l{QRegularExpression::}{optimize()}.
- This enum value has been introduced in Qt 5.4.
+ This option is ignored. A regular expression is automatically optimized
+ (including JIT compiling) the first time it is used. This enum value
+ was introduced in Qt 5.4.
\value DontAutomaticallyOptimizeOption
- Regular expressions are automatically optimized after a
- certain number of usages; setting this option prevents such
- optimizations, therefore avoiding possible unpredictable spikes in
- CPU and memory usage. If both this option and the
- \c{OptimizeOnFirstUsageOption} option are set, then this option takes
- precedence. Note: this option will still let the regular expression
- to be optimized by manually calling
- \l{QRegularExpression::}{optimize()}. This enum value has been
- introduced in Qt 5.4.
+ This option is ignored. A regular expression is automatically optimized
+ (including JIT compiling) the first time it is used. This enum value
+ was introduced in Qt 5.4.
*/
/*!
@@ -791,12 +784,81 @@ QT_BEGIN_NAMESPACE
Qt 5.4.
*/
-// after how many usages we optimize the regexp
-#ifdef QT_BUILD_INTERNAL
-Q_AUTOTEST_EXPORT unsigned int qt_qregularexpression_optimize_after_use_count = 10;
-#else
-static const unsigned int qt_qregularexpression_optimize_after_use_count = 10;
-#endif // QT_BUILD_INTERNAL
+namespace QtPrivate {
+/*!
+ internal
+*/
+QString wildcardToRegularExpression(const QString &wildcardString)
+{
+ const int wclen = wildcardString.length();
+ QString rx;
+ int i = 0;
+ bool hasNegativeBracket = false;
+ const QChar *wc = wildcardString.unicode();
+
+ while (i < wclen) {
+ const QChar c = wc[i++];
+ switch (c.unicode()) {
+ case '*':
+ rx += QLatin1String(".*");
+ break;
+ case '?':
+ rx += QLatin1Char('.');
+ break;
+ case '$':
+ case '(':
+ case ')':
+ case '+':
+ case '.':
+ case '^':
+ case '{':
+ case '|':
+ case '}':
+ rx += QLatin1Char('\\');
+ rx += c;
+ break;
+ case '[':
+ // Support for the [!abc] or [!a-c] syntax
+ // Implements a negative look-behind for one char.
+ if (wc[i] == QLatin1Char(']')) {
+ rx += c;
+ rx += wc[i++];
+ } else if (wc[i] == QLatin1Char('!')) {
+ rx += QLatin1String(".(?<");
+ rx += wc[i++];
+ rx += c;
+ hasNegativeBracket = true;
+ } else {
+ rx += c;
+ }
+
+ if (i < wclen) {
+ if (rx[i] == QLatin1Char(']'))
+ rx += wc[i++];
+ while (i < wclen && wc[i] != QLatin1Char(']')) {
+ if (wc[i] == QLatin1Char('\\'))
+ rx += QLatin1Char('\\');
+ rx += wc[i++];
+ }
+ }
+ break;
+ case ']':
+ rx += c;
+ // Closes the negative look-behind expression.
+ if (hasNegativeBracket) {
+ rx += QLatin1Char(')');
+ hasNegativeBracket = false;
+ }
+ break;
+ default:
+ rx += c;
+ break;
+ }
+ }
+
+ return rx;
+}
+}
/*!
\internal
@@ -847,13 +909,7 @@ struct QRegularExpressionPrivate : QSharedData
void cleanCompiledPattern();
void compilePattern();
void getPatternInfo();
-
- enum OptimizePatternOption {
- LazyOptimizeOption,
- ImmediateOptimizeOption
- };
-
- void optimizePattern(OptimizePatternOption option);
+ void optimizePattern();
enum CheckSubjectStringOption {
CheckSubjectString,
@@ -878,16 +934,15 @@ struct QRegularExpressionPrivate : QSharedData
// *All* of the following members are managed while holding this mutex,
// except for isDirty which is set to true by QRegularExpression setters
// (right after a detach happened).
- mutable QReadWriteLock mutex;
+ mutable QMutex mutex;
// The PCRE code pointer is reference-counted by the QRegularExpressionPrivate
// objects themselves; when the private is copied (i.e. a detach happened)
- // they are set to 0
+ // it is set to nullptr
pcre2_code_16 *compiledPattern;
int errorCode;
int errorOffset;
int capturingCount;
- unsigned int usedCount;
bool usingCrLfNewlines;
bool isDirty;
};
@@ -952,11 +1007,10 @@ QRegularExpressionPrivate::QRegularExpressionPrivate()
patternOptions(0),
pattern(),
mutex(),
- compiledPattern(0),
+ compiledPattern(nullptr),
errorCode(0),
errorOffset(-1),
capturingCount(0),
- usedCount(0),
usingCrLfNewlines(false),
isDirty(true)
{
@@ -974,8 +1028,8 @@ QRegularExpressionPrivate::~QRegularExpressionPrivate()
\internal
Copies the private, which means copying only the pattern and the pattern
- options. The compiledPattern and the studyData pointers are NOT copied (we
- do not own them any more), and in general all the members set when
+ options. The compiledPattern pointer is NOT copied (we
+ do not own it any more), and in general all the members set when
compiling a pattern are set to default values. isDirty is set back to true
so that the pattern has to be recompiled again.
*/
@@ -984,11 +1038,10 @@ QRegularExpressionPrivate::QRegularExpressionPrivate(const QRegularExpressionPri
patternOptions(other.patternOptions),
pattern(other.pattern),
mutex(),
- compiledPattern(0),
+ compiledPattern(nullptr),
errorCode(0),
errorOffset(-1),
capturingCount(0),
- usedCount(0),
usingCrLfNewlines(false),
isDirty(true)
{
@@ -1000,11 +1053,10 @@ QRegularExpressionPrivate::QRegularExpressionPrivate(const QRegularExpressionPri
void QRegularExpressionPrivate::cleanCompiledPattern()
{
pcre2_code_free_16(compiledPattern);
- compiledPattern = 0;
+ compiledPattern = nullptr;
errorCode = 0;
errorOffset = -1;
capturingCount = 0;
- usedCount = 0;
usingCrLfNewlines = false;
}
@@ -1013,7 +1065,7 @@ void QRegularExpressionPrivate::cleanCompiledPattern()
*/
void QRegularExpressionPrivate::compilePattern()
{
- const QWriteLocker lock(&mutex);
+ const QMutexLocker lock(&mutex);
if (!isDirty)
return;
@@ -1040,6 +1092,7 @@ void QRegularExpressionPrivate::compilePattern()
errorCode = 0;
}
+ optimizePattern();
getPatternInfo();
}
@@ -1140,15 +1193,10 @@ static bool isJitEnabled()
The purpose of the function is to call pcre2_jit_compile_16, which
JIT-compiles the pattern.
- It gets called by doMatch() every time a match is performed.
-
- As of now, the optimizations on the pattern are performed after a certain
- number of usages (i.e. the qt_qregularexpression_optimize_after_use_count
- constant) unless the DontAutomaticallyOptimizeOption option is set on the
- QRegularExpression object, or anyhow by calling optimize() (which will pass
- ImmediateOptimizeOption).
+ It gets called when a pattern is recompiled by us (in compilePattern()),
+ under mutex protection.
*/
-void QRegularExpressionPrivate::optimizePattern(OptimizePatternOption option)
+void QRegularExpressionPrivate::optimizePattern()
{
Q_ASSERT(compiledPattern);
@@ -1157,11 +1205,6 @@ void QRegularExpressionPrivate::optimizePattern(OptimizePatternOption option)
if (!enableJit)
return;
- const QWriteLocker lock(&mutex);
-
- if ((option == LazyOptimizeOption) && (++usedCount != qt_qregularexpression_optimize_after_use_count))
- return;
-
pcre2_jit_compile_16(compiledPattern, PCRE2_JIT_COMPLETE | PCRE2_JIT_PARTIAL_SOFT | PCRE2_JIT_PARTIAL_HARD);
}
@@ -1267,22 +1310,12 @@ QRegularExpressionMatchPrivate *QRegularExpressionPrivate::doMatch(const QString
return priv;
}
- // skip optimizing and doing the actual matching if NoMatch type was requested
+ // skip doing the actual matching if NoMatch type was requested
if (matchType == QRegularExpression::NoMatch) {
priv->isValid = true;
return priv;
}
- if (!(patternOptions & QRegularExpression::DontAutomaticallyOptimizeOption)) {
- const OptimizePatternOption optimizePatternOption =
- (patternOptions & QRegularExpression::OptimizeOnFirstUsageOption)
- ? ImmediateOptimizeOption
- : LazyOptimizeOption;
-
- // this is mutex protected
- const_cast<QRegularExpressionPrivate *>(this)->optimizePattern(optimizePatternOption);
- }
-
int pcreOptions = convertToPcreOptions(matchOptions);
if (matchType == QRegularExpression::PartialPreferCompleteMatch)
@@ -1307,8 +1340,6 @@ QRegularExpressionMatchPrivate *QRegularExpressionPrivate::doMatch(const QString
int result;
- QReadLocker lock(&mutex);
-
if (!previousMatchWasEmpty) {
result = safe_pcre2_match_16(compiledPattern,
subjectUtf16, subjectLength,
@@ -1340,8 +1371,6 @@ QRegularExpressionMatchPrivate *QRegularExpressionPrivate::doMatch(const QString
}
}
- lock.unlock();
-
#ifdef QREGULAREXPRESSION_DEBUG
qDebug() << "Matching" << pattern << "against" << subject
<< "starting at" << subjectStart << "len" << subjectLength
@@ -1554,6 +1583,47 @@ void QRegularExpression::setPattern(const QString &pattern)
}
/*!
+ \since 5.12
+
+ Sets the pattern string of the regular expression to \a wildcard pattern.
+ The pattern options are left unchanged.
+
+ \warning Unlike QRegExp, this implementation follows closely the definition
+ of wildcard for glob patterns:
+ \table
+ \row \li \b{c}
+ \li Any character represents itself apart from those mentioned
+ below. Thus \b{c} matches the character \e c.
+ \row \li \b{?}
+ \li Matches any single character. It is the same as
+ \b{.} in full regexps.
+ \row \li \b{*}
+ \li Matches zero or more of any characters. It is the
+ same as \b{.*} in full regexps.
+ \row \li \b{[abc]}
+ \li Matches one character given in the bracket.
+ \row \li \b{[a-c]}
+ \li Matches one character from the range given in the bracket.
+ \row \li \b{[!abc]}
+ \li Matches one character that is not given in the bracket.
+ \row \li \b{[!a-c]}
+ \li matches one character that is not from the range given in the
+ bracket.
+ \endtable
+
+ \note This function generates a regular expression that will act following
+ the wildcard pattern given. However the content of the regular expression
+ will not be the same as the one set.
+
+ \sa pattern(), setPattern()
+*/
+void QRegularExpression::setWildcardPattern(const QString &pattern)
+{
+ setPattern(QtPrivate::wildcardToRegularExpression(pattern));
+}
+
+
+/*!
Returns the pattern options for the regular expression.
\sa setPatternOptions(), pattern()
@@ -1810,22 +1880,14 @@ QRegularExpressionMatchIterator QRegularExpression::globalMatch(const QStringRef
/*!
\since 5.4
- Forces an immediate optimization of the pattern, including
- JIT-compiling it (if the JIT compiler is enabled).
-
- Patterns are normally optimized only after a certain number of usages.
- If you can predict that this QRegularExpression object is going to be
- used for several matches, it may be convenient to optimize it in
- advance by calling this function.
+ Compiles the pattern immediately, including JIT compiling it (if
+ the JIT is enabled) for optimization.
- \sa QRegularExpression::OptimizeOnFirstUsageOption
+ \sa isValid(), {Debugging Code that Uses QRegularExpression}
*/
void QRegularExpression::optimize() const
{
- if (!isValid()) // will compile the pattern
- return;
-
- d->optimizePattern(QRegularExpressionPrivate::ImmediateOptimizeOption);
+ d.data()->compilePattern();
}
/*!
diff --git a/src/corelib/tools/qregularexpression.h b/src/corelib/tools/qregularexpression.h
index 398fc9ec9c..d0f90b90b3 100644
--- a/src/corelib/tools/qregularexpression.h
+++ b/src/corelib/tools/qregularexpression.h
@@ -73,8 +73,8 @@ public:
InvertedGreedinessOption = 0x0010,
DontCaptureOption = 0x0020,
UseUnicodePropertiesOption = 0x0040,
- OptimizeOnFirstUsageOption = 0x0080,
- DontAutomaticallyOptimizeOption = 0x0100
+ OptimizeOnFirstUsageOption Q_DECL_ENUMERATOR_DEPRECATED_X("This option does not have any effect since Qt 5.12") = 0x0080,
+ DontAutomaticallyOptimizeOption Q_DECL_ENUMERATOR_DEPRECATED_X("This option does not have any effect since Qt 5.12") = 0x0100,
};
Q_DECLARE_FLAGS(PatternOptions, PatternOption)
@@ -96,6 +96,7 @@ public:
QString pattern() const;
void setPattern(const QString &pattern);
+ void setWildcardPattern(const QString &pattern);
bool isValid() const;
int patternErrorOffset() const;
diff --git a/src/gui/image/qimage_sse4.cpp b/src/corelib/tools/qregularexpression_p.h
index 0e2c2f492e..f5455de853 100644
--- a/src/gui/image/qimage_sse4.cpp
+++ b/src/corelib/tools/qregularexpression_p.h
@@ -1,9 +1,10 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 Samuel Gaist <samuel.gaist@edeltech.ch>
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -37,40 +38,33 @@
**
****************************************************************************/
-#include <qimage.h>
-#include <private/qdrawhelper_p.h>
-#include <private/qdrawingprimitive_sse2_p.h>
-#include <private/qimage_p.h>
-#include <private/qsimd_p.h>
+#ifndef QREGULAREXPRESSION_P_H
+#define QREGULAREXPRESSION_P_H
-#ifdef QT_COMPILER_SUPPORTS_SSE4_1
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
-QT_BEGIN_NAMESPACE
+#include <private/qglobal_p.h>
-const uint *QT_FASTCALL convertRGB32FromARGB32PM_sse4(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
-{
- for (int i = 0; i < count; ++i)
- buffer[i] = 0xff000000 | qUnpremultiply_sse4(src[i]);
- return buffer;
-}
+#include <qregularexpression.h>
+#include <qstring.h>
-void convert_ARGB_to_ARGB_PM_sse4(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
-{
- Q_ASSERT(src->format == QImage::Format_ARGB32 || src->format == QImage::Format_RGBA8888);
- Q_ASSERT(dest->format == QImage::Format_ARGB32_Premultiplied || dest->format == QImage::Format_RGBA8888_Premultiplied);
- Q_ASSERT(src->width == dest->width);
- Q_ASSERT(src->height == dest->height);
+QT_REQUIRE_CONFIG(regularexpression);
+
+QT_BEGIN_NAMESPACE
- const uint *src_data = (uint *) src->data;
- uint *dest_data = (uint *) dest->data;
- for (int i = 0; i < src->height; ++i) {
- qt_convertARGB32ToARGB32PM(dest_data, src_data, src->width);
- src_data += src->bytes_per_line >> 2;
- dest_data += dest->bytes_per_line >> 2;
- }
+namespace QtPrivate {
+QString wildcardToRegularExpression(const QString &expression);
}
QT_END_NAMESPACE
-#endif // QT_COMPILER_SUPPORTS_SSE4_1
+#endif
diff --git a/src/corelib/tools/qringbuffer.cpp b/src/corelib/tools/qringbuffer.cpp
index eb7bdfe95c..59650ed2f7 100644
--- a/src/corelib/tools/qringbuffer.cpp
+++ b/src/corelib/tools/qringbuffer.cpp
@@ -312,12 +312,14 @@ qint64 QRingBuffer::peek(char *data, qint64 maxLength, qint64 pos) const
Q_ASSERT(maxLength >= 0 && pos >= 0);
qint64 readSoFar = 0;
- for (int i = 0; readSoFar < maxLength && i < buffers.size(); ++i) {
- qint64 blockLength = buffers[i].size();
+ for (const QRingChunk &chunk : buffers) {
+ if (readSoFar == maxLength)
+ break;
+ qint64 blockLength = chunk.size();
if (pos < blockLength) {
blockLength = qMin(blockLength - pos, maxLength - readSoFar);
- memcpy(data + readSoFar, buffers[i].data() + pos, blockLength);
+ memcpy(data + readSoFar, chunk.data() + pos, blockLength);
readSoFar += blockLength;
pos = 0;
} else {
diff --git a/src/corelib/tools/qset.h b/src/corelib/tools/qset.h
index 7ded120ab7..6640c8486d 100644
--- a/src/corelib/tools/qset.h
+++ b/src/corelib/tools/qset.h
@@ -131,6 +131,7 @@ public:
inline iterator operator--(int) { iterator r = *this; --i; return r; }
inline iterator operator+(int j) const { return i + j; }
inline iterator operator-(int j) const { return i - j; }
+ friend inline iterator operator+(int j, iterator k) { return k + j; }
inline iterator &operator+=(int j) { i += j; return *this; }
inline iterator &operator-=(int j) { i -= j; return *this; }
};
@@ -165,6 +166,7 @@ public:
inline const_iterator operator--(int) { const_iterator r = *this; --i; return r; }
inline const_iterator operator+(int j) const { return i + j; }
inline const_iterator operator-(int j) const { return i - j; }
+ friend inline const_iterator operator+(int j, const_iterator k) { return k + j; }
inline const_iterator &operator+=(int j) { i += j; return *this; }
inline const_iterator &operator-=(int j) { i -= j; return *this; }
};
diff --git a/src/corelib/tools/qshareddata.h b/src/corelib/tools/qshareddata.h
index 780f2331a8..6930cb96a5 100644
--- a/src/corelib/tools/qshareddata.h
+++ b/src/corelib/tools/qshareddata.h
@@ -136,6 +136,18 @@ private:
T *d;
};
+template <class T> inline bool operator==(std::nullptr_t p1, const QSharedDataPointer<T> &p2)
+{
+ Q_UNUSED(p1);
+ return !p2;
+}
+
+template <class T> inline bool operator==(const QSharedDataPointer<T> &p1, std::nullptr_t p2)
+{
+ Q_UNUSED(p2);
+ return !p1;
+}
+
template <class T> class QExplicitlySharedDataPointer
{
public:
@@ -147,6 +159,7 @@ public:
inline T *operator->() const { return d; }
inline T *data() const { return d; }
inline const T *constData() const { return d; }
+ inline T *take() { T *x = d; d = nullptr; return x; }
inline void detach() { if (d && d->ref.load() != 1) detach_helper(); }
@@ -271,6 +284,18 @@ Q_INLINE_TEMPLATE QExplicitlySharedDataPointer<T>::QExplicitlySharedDataPointer(
: d(adata)
{ if (d) d->ref.ref(); }
+template <class T> inline bool operator==(std::nullptr_t p1, const QExplicitlySharedDataPointer<T> &p2)
+{
+ Q_UNUSED(p1);
+ return !p2;
+}
+
+template <class T> inline bool operator==(const QExplicitlySharedDataPointer<T> &p1, std::nullptr_t p2)
+{
+ Q_UNUSED(p2);
+ return !p1;
+}
+
template <class T>
Q_INLINE_TEMPLATE void qSwap(QSharedDataPointer<T> &p1, QSharedDataPointer<T> &p2)
{ p1.swap(p2); }
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp
index 25340f2d02..85efd3cded 100644
--- a/src/corelib/tools/qsimd.cpp
+++ b/src/corelib/tools/qsimd.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
-** Copyright (C) 2016 Intel Corporation.
+** Copyright (C) 2018 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -80,6 +80,43 @@
QT_BEGIN_NAMESPACE
+/*
+ * Use kdesdk/scripts/generate_string_table.pl to update the table below. Note
+ * we remove the terminating -1 that the script adds.
+ */
+
+// begin generated
+#if defined(Q_PROCESSOR_ARM)
+/* Data:
+ neon
+ crc32
+ */
+static const char features_string[] =
+ " neon\0"
+ " crc32\0"
+ "\0";
+static const int features_indices[] = { 0, 6 };
+#elif defined(Q_PROCESSOR_MIPS)
+/* Data:
+ dsp
+ dspr2
+*/
+static const char features_string[] =
+ " dsp\0"
+ " dspr2\0"
+ "\0";
+
+static const int features_indices[] = {
+ 0, 5
+};
+#elif defined(Q_PROCESSOR_X86)
+# include "qsimd_x86.cpp" // generated by util/x86simdgen
+#else
+static const char features_string[] = "";
+static const int features_indices[] = { };
+#endif
+// end generated
+
#if defined (Q_OS_NACL)
static inline uint detectProcessorFeatures()
{
@@ -222,29 +259,32 @@ static void cpuidFeatures01(uint &ecx, uint &edx)
inline void __cpuidex(int info[4], int, __int64) { memset(info, 0, 4*sizeof(int));}
#endif
-static void cpuidFeatures07_00(uint &ebx, uint &ecx)
+static void cpuidFeatures07_00(uint &ebx, uint &ecx, uint &edx)
{
#if defined(Q_CC_GNU)
qregisteruint rbx; // in case it's 64-bit
qregisteruint rcx = 0;
+ qregisteruint rdx = 0;
asm ("xchg " PICreg", %0\n"
"cpuid\n"
"xchg " PICreg", %0\n"
- : "=&r" (rbx), "+&c" (rcx)
- : "a" (7)
- : "%edx");
+ : "=&r" (rbx), "+&c" (rcx), "+&d" (rdx)
+ : "a" (7));
ebx = rbx;
ecx = rcx;
+ edx = rdx;
#elif defined(Q_OS_WIN)
int info[4];
__cpuidex(info, 7, 0);
ebx = info[1];
ecx = info[2];
+ edx = info[3];
#elif defined(Q_CC_GHS)
unsigned int info[4];
__CPUIDEX(7, 0, info);
ebx = info[1];
ecx = info[2];
+ edx = info[3];
#endif
}
@@ -282,13 +322,8 @@ static quint64 detectProcessorFeatures()
AVXState = XMM0_15 | YMM0_15Hi128,
AVX512State = AVXState | OpMask | ZMM0_15Hi256 | ZMM16_31
};
- static const quint64 AllAVX512 = (Q_UINT64_C(1) << CpuFeatureAVX512F) | (Q_UINT64_C(1) << CpuFeatureAVX512CD) |
- (Q_UINT64_C(1) << CpuFeatureAVX512ER) | (Q_UINT64_C(1) << CpuFeatureAVX512PF) |
- (Q_UINT64_C(1) << CpuFeatureAVX512BW) | (Q_UINT64_C(1) << CpuFeatureAVX512DQ) |
- (Q_UINT64_C(1) << CpuFeatureAVX512VL) |
- (Q_UINT64_C(1) << CpuFeatureAVX512IFMA) | (Q_UINT64_C(1) << CpuFeatureAVX512VBMI);
- static const quint64 AllAVX2 = (Q_UINT64_C(1) << CpuFeatureAVX2) | AllAVX512;
- static const quint64 AllAVX = (Q_UINT64_C(1) << CpuFeatureAVX) | AllAVX2;
+ static const quint64 AllAVX2 = CpuFeatureAVX2 | AllAVX512;
+ static const quint64 AllAVX = CpuFeatureAVX | AllAVX2;
quint64 features = 0;
int cpuidLevel = maxBasicCpuidSupported();
@@ -299,52 +334,33 @@ static quint64 detectProcessorFeatures()
Q_ASSERT(cpuidLevel >= 1);
#endif
- uint cpuid01ECX = 0, cpuid01EDX = 0;
- cpuidFeatures01(cpuid01ECX, cpuid01EDX);
-
- // the low 32-bits of features is cpuid01ECX
- // note: we need to check OS support for saving the AVX register state
- features = cpuid01ECX;
-
-#if defined(Q_PROCESSOR_X86_32)
- // x86 might not have SSE2 support
- if (cpuid01EDX & (1u << 26))
- features |= Q_UINT64_C(1) << CpuFeatureSSE2;
- else
- features &= ~(Q_UINT64_C(1) << CpuFeatureSSE2);
- // we should verify that the OS enabled saving of the SSE state...
-#else
- // x86-64 or x32
- features |= Q_UINT64_C(1) << CpuFeatureSSE2;
-#endif
+ uint results[X86CpuidMaxLeaf] = {};
+ cpuidFeatures01(results[Leaf1ECX], results[Leaf1EDX]);
+ if (cpuidLevel >= 7)
+ cpuidFeatures07_00(results[Leaf7_0EBX], results[Leaf7_0ECX], results[Leaf7_0EDX]);
+
+ // populate our feature list
+ for (uint i = 0; i < sizeof(x86_locators) / sizeof(x86_locators[0]); ++i) {
+ uint word = x86_locators[i] / 32;
+ uint bit = 1U << (x86_locators[i] % 32);
+ quint64 feature = Q_UINT64_C(1) << (i + 1);
+ if (results[word] & bit)
+ features |= feature;
+ }
+ // now check the AVX state
uint xgetbvA = 0, xgetbvD = 0;
- if (cpuid01ECX & (1u << 27)) {
+ if (results[Leaf1ECX] & (1u << 27)) {
// XGETBV enabled
xgetbv(0, xgetbvA, xgetbvD);
}
- uint cpuid0700EBX = 0;
- uint cpuid0700ECX = 0;
- if (cpuidLevel >= 7) {
- cpuidFeatures07_00(cpuid0700EBX, cpuid0700ECX);
-
- // the high 32-bits of features is cpuid0700EBX
- features |= quint64(cpuid0700EBX) << 32;
- }
-
if ((xgetbvA & AVXState) != AVXState) {
// support for YMM registers is disabled, disable all AVX
features &= ~AllAVX;
} else if ((xgetbvA & AVX512State) != AVX512State) {
// support for ZMM registers or mask registers is disabled, disable all AVX512
features &= ~AllAVX512;
- } else {
- // this feature is out of order
- if (cpuid0700ECX & (1u << 1))
- features |= Q_UINT64_C(1) << CpuFeatureAVX512VBMI;
- else
- features &= ~(Q_UINT64_C(1) << CpuFeatureAVX512VBMI);
}
return features;
@@ -493,152 +509,6 @@ static inline uint detectProcessorFeatures()
}
#endif
-/*
- * Use kdesdk/scripts/generate_string_table.pl to update the table below. Note
- * that the x86 version has a lot of blanks that must be kept and that the
- * offset table's type is changed to make the table smaller. We also remove the
- * terminating -1 that the script adds.
- */
-
-// begin generated
-#if defined(Q_PROCESSOR_ARM)
-/* Data:
- neon
- crc32
- */
-static const char features_string[] =
- " neon\0"
- " crc32\0"
- "\0";
-static const int features_indices[] = { 0, 6 };
-#elif defined(Q_PROCESSOR_MIPS)
-/* Data:
- dsp
- dspr2
-*/
-static const char features_string[] =
- " dsp\0"
- " dspr2\0"
- "\0";
-
-static const int features_indices[] = {
- 0, 5
-};
-#elif defined(Q_PROCESSOR_X86)
-/* Data:
- sse3
- sse2
- avx512vbmi
-
-
-
-
-
-
- ssse3
-
-
- fma
- cmpxchg16b
-
-
-
-
-
- sse4.1
- sse4.2
-
- movbe
- popcnt
-
- aes
-
-
- avx
- f16c
- rdrand
-
-
-
-
- bmi
- hle
- avx2
-
-
- bmi2
-
-
- rtm
-
-
-
-
- avx512f
- avx512dq
- rdseed
-
-
- avx512ifma
-
-
-
-
- avx512pf
- avx512er
- avx512cd
- sha
- avx512bw
- avx512vl
- */
-static const char features_string[] =
- " sse3\0"
- " sse2\0"
- " avx512vbmi\0"
- " ssse3\0"
- " fma\0"
- " cmpxchg16b\0"
- " sse4.1\0"
- " sse4.2\0"
- " movbe\0"
- " popcnt\0"
- " aes\0"
- " avx\0"
- " f16c\0"
- " rdrand\0"
- " bmi\0"
- " hle\0"
- " avx2\0"
- " bmi2\0"
- " rtm\0"
- " avx512f\0"
- " avx512dq\0"
- " rdseed\0"
- " avx512ifma\0"
- " avx512pf\0"
- " avx512er\0"
- " avx512cd\0"
- " sha\0"
- " avx512bw\0"
- " avx512vl\0"
- "\0";
-
-static const quint8 features_indices[] = {
- 0, 6, 12, 5, 5, 5, 5, 5,
- 5, 24, 5, 5, 31, 36, 5, 5,
- 5, 5, 5, 48, 56, 5, 64, 71,
- 5, 79, 5, 5, 84, 89, 95, 5,
- 5, 5, 5, 103, 108, 113, 5, 5,
- 119, 5, 5, 125, 5, 5, 5, 5,
- 130, 139, 149, 5, 5, 157, 5, 5,
- 5, 5, 169, 179, 189, 199, 204, 214
-};
-#else
-static const char features_string[] = "";
-static const int features_indices[] = { };
-#endif
-// end generated
-
static const int features_count = (sizeof features_indices) / (sizeof features_indices[0]);
// record what CPU features were enabled by default in this Qt build
diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h
index 18684caefb..9f1321df94 100644
--- a/src/corelib/tools/qsimd_p.h
+++ b/src/corelib/tools/qsimd_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
-** Copyright (C) 2016 Intel Corporation.
+** Copyright (C) 2018 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -232,32 +232,48 @@
# define __RDRND__ 1
# endif
-#define QT_FUNCTION_TARGET_STRING_SSE2 "sse2"
-#define QT_FUNCTION_TARGET_STRING_SSE3 "sse3"
-#define QT_FUNCTION_TARGET_STRING_SSSE3 "ssse3"
-#define QT_FUNCTION_TARGET_STRING_SSE4_1 "sse4.1"
-#define QT_FUNCTION_TARGET_STRING_SSE4_2 "sse4.2"
-#define QT_FUNCTION_TARGET_STRING_AVX "avx"
-#define QT_FUNCTION_TARGET_STRING_AVX2 "avx2"
-#define QT_FUNCTION_TARGET_STRING_AVX512F "avx512f"
-#define QT_FUNCTION_TARGET_STRING_AVX512CD "avx512cd"
-#define QT_FUNCTION_TARGET_STRING_AVX512ER "avx512er"
-#define QT_FUNCTION_TARGET_STRING_AVX512PF "avx512pf"
-#define QT_FUNCTION_TARGET_STRING_AVX512BW "avx512bw"
-#define QT_FUNCTION_TARGET_STRING_AVX512DQ "avx512dq"
-#define QT_FUNCTION_TARGET_STRING_AVX512VL "avx512vl"
-#define QT_FUNCTION_TARGET_STRING_AVX512IFMA "avx512ifma"
-#define QT_FUNCTION_TARGET_STRING_AVX512VBMI "avx512vbmi"
-
-#define QT_FUNCTION_TARGET_STRING_AES "aes,sse4.2"
-#define QT_FUNCTION_TARGET_STRING_PCLMUL "pclmul,sse4.2"
-#define QT_FUNCTION_TARGET_STRING_POPCNT "popcnt"
-#define QT_FUNCTION_TARGET_STRING_F16C "f16c,avx"
-#define QT_FUNCTION_TARGET_STRING_RDRND "rdrnd"
-#define QT_FUNCTION_TARGET_STRING_BMI "bmi"
-#define QT_FUNCTION_TARGET_STRING_BMI2 "bmi2"
-#define QT_FUNCTION_TARGET_STRING_RDSEED "rdseed"
-#define QT_FUNCTION_TARGET_STRING_SHA "sha"
+# if defined(__BMI__) && !defined(__BMI2__) && defined(Q_CC_INTEL)
+// BMI2 instructions:
+// All processors that support BMI support BMI2 (and AVX2)
+// (but neither MSVC nor the Intel compiler define this macro)
+# define __BMI2__ 1
+# endif
+
+# include "qsimd_x86_p.h"
+
+// Haswell sub-architecture
+//
+// The Intel Core 4th generation was codenamed "Haswell" and introduced AVX2,
+// BMI1, BMI2, FMA, LZCNT, MOVBE, which makes it a good divider for a
+// sub-target for us. The first AMD processor with AVX2 support (Zen) has the
+// same features.
+//
+// macOS's fat binaries support the "x86_64h" sub-architecture and the GNU libc
+// ELF loader also supports a "haswell/" subdir (e.g., /usr/lib/haswell).
+# define QT_FUNCTION_TARGET_STRING_ARCH_HASWELL "arch=haswell"
+# if defined(__AVX2__) && defined(__BMI__) && defined(__BMI2__) && defined(__F16C__) && \
+ defined(__FMA__) && defined(__LZCNT__) && defined(__RDRND__)
+# define __haswell__ 1
+# endif
+
+// This constant does not include all CPU features found in a Haswell, only
+// those that we'd have optimized code for.
+// Note: must use Q_CONSTEXPR here, as this file may be compiled in C mode.
+QT_BEGIN_NAMESPACE
+static const quint64 CpuFeatureArchHaswell = 0
+ | CpuFeatureSSE2
+ | CpuFeatureSSE3
+ | CpuFeatureSSSE3
+ | CpuFeatureSSE4_1
+ | CpuFeatureSSE4_2
+ | CpuFeatureFMA
+ | CpuFeaturePOPCNT
+ | CpuFeatureAVX
+ | CpuFeatureF16C
+ | CpuFeatureAVX2
+ | CpuFeatureBMI
+ | CpuFeatureBMI2;
+QT_END_NAMESPACE
#endif /* Q_PROCESSOR_X86 */
@@ -292,148 +308,36 @@
QT_BEGIN_NAMESPACE
+#ifndef Q_PROCESSOR_X86
enum CPUFeatures {
#if defined(Q_PROCESSOR_ARM)
- CpuFeatureNEON = 0,
+ CpuFeatureNEON = 2,
CpuFeatureARM_NEON = CpuFeatureNEON,
- CpuFeatureCRC32 = 1,
+ CpuFeatureCRC32 = 4,
#elif defined(Q_PROCESSOR_MIPS)
- CpuFeatureDSP = 0,
- CpuFeatureDSPR2 = 1,
-#elif defined(Q_PROCESSOR_X86)
- // The order of the flags is jumbled so it matches most closely the bits in CPUID
- // Out of order:
- CpuFeatureSSE2 = 1, // uses the bit for PCLMULQDQ
- // in level 1, ECX
- CpuFeatureSSE3 = (0 + 0),
- CpuFeatureSSSE3 = (0 + 9),
- CpuFeatureSSE4_1 = (0 + 19),
- CpuFeatureSSE4_2 = (0 + 20),
- CpuFeatureMOVBE = (0 + 22),
- CpuFeaturePOPCNT = (0 + 23),
- CpuFeatureAES = (0 + 25),
- CpuFeatureAVX = (0 + 28),
- CpuFeatureF16C = (0 + 29),
- CpuFeatureRDRND = (0 + 30),
- // 31 is always zero and we've used it for the QSimdInitialized
-
- // in level 7, leaf 0, EBX
- CpuFeatureBMI = (32 + 3),
- CpuFeatureHLE = (32 + 4),
- CpuFeatureAVX2 = (32 + 5),
- CpuFeatureBMI2 = (32 + 8),
- CpuFeatureRTM = (32 + 11),
- CpuFeatureAVX512F = (32 + 16),
- CpuFeatureAVX512DQ = (32 + 17),
- CpuFeatureRDSEED = (32 + 18),
- CpuFeatureAVX512IFMA = (32 + 21),
- CpuFeatureAVX512PF = (32 + 26),
- CpuFeatureAVX512ER = (32 + 27),
- CpuFeatureAVX512CD = (32 + 28),
- CpuFeatureSHA = (32 + 29),
- CpuFeatureAVX512BW = (32 + 30),
- CpuFeatureAVX512VL = (32 + 31),
-
- // in level 7, leaf 0, ECX (out of order, for now)
- CpuFeatureAVX512VBMI = 2, // uses the bit for DTES64
+ CpuFeatureDSP = 2,
+ CpuFeatureDSPR2 = 4,
#endif
// used only to indicate that the CPU detection was initialised
- QSimdInitialized = 0x80000000
+ QSimdInitialized = 1
};
static const quint64 qCompilerCpuFeatures = 0
-#if defined __SHA__
- | (Q_UINT64_C(1) << CpuFeatureSHA)
-#endif
-#if defined __AES__
- | (Q_UINT64_C(1) << CpuFeatureAES)
-#endif
-#if defined __RTM__
- | (Q_UINT64_C(1) << CpuFeatureRTM)
-#endif
-#ifdef __RDRND__
- | (Q_UINT64_C(1) << CpuFeatureRDRND)
-#endif
-#ifdef __RDSEED__
- | (Q_UINT64_C(1) << CpuFeatureRDSEED)
-#endif
-#if defined __BMI__
- | (Q_UINT64_C(1) << CpuFeatureBMI)
-#endif
-#if defined __BMI2__
- | (Q_UINT64_C(1) << CpuFeatureBMI2)
-#endif
-#if defined __F16C__
- | (Q_UINT64_C(1) << CpuFeatureF16C)
-#endif
-#if defined __POPCNT__
- | (Q_UINT64_C(1) << CpuFeaturePOPCNT)
-#endif
-#if defined __MOVBE__ // GCC and Clang don't seem to define this
- | (Q_UINT64_C(1) << CpuFeatureMOVBE)
-#endif
-#if defined __AVX512F__
- | (Q_UINT64_C(1) << CpuFeatureAVX512F)
-#endif
-#if defined __AVX512CD__
- | (Q_UINT64_C(1) << CpuFeatureAVX512CD)
-#endif
-#if defined __AVX512ER__
- | (Q_UINT64_C(1) << CpuFeatureAVX512ER)
-#endif
-#if defined __AVX512PF__
- | (Q_UINT64_C(1) << CpuFeatureAVX512PF)
-#endif
-#if defined __AVX512BW__
- | (Q_UINT64_C(1) << CpuFeatureAVX512BW)
-#endif
-#if defined __AVX512DQ__
- | (Q_UINT64_C(1) << CpuFeatureAVX512DQ)
-#endif
-#if defined __AVX512VL__
- | (Q_UINT64_C(1) << CpuFeatureAVX512VL)
-#endif
-#if defined __AVX512IFMA__
- | (Q_UINT64_C(1) << CpuFeatureAVX512IFMA)
-#endif
-#if defined __AVX512VBMI__
- | (Q_UINT64_C(1) << CpuFeatureAVX512VBMI)
-#endif
-#if defined __AVX2__
- | (Q_UINT64_C(1) << CpuFeatureAVX2)
-#endif
-#if defined __AVX__
- | (Q_UINT64_C(1) << CpuFeatureAVX)
-#endif
-#if defined __SSE4_2__
- | (Q_UINT64_C(1) << CpuFeatureSSE4_2)
-#endif
-#if defined __SSE4_1__
- | (Q_UINT64_C(1) << CpuFeatureSSE4_1)
-#endif
-#if defined __SSSE3__
- | (Q_UINT64_C(1) << CpuFeatureSSSE3)
-#endif
-#if defined __SSE3__
- | (Q_UINT64_C(1) << CpuFeatureSSE3)
-#endif
-#if defined __SSE2__
- | (Q_UINT64_C(1) << CpuFeatureSSE2)
-#endif
#if defined __ARM_NEON__
- | (Q_UINT64_C(1) << CpuFeatureNEON)
+ | CpuFeatureNEON
#endif
#if defined __ARM_FEATURE_CRC32
- | (Q_UINT64_C(1) << CpuFeatureCRC32)
+ | CpuFeatureCRC32
#endif
#if defined __mips_dsp
- | (Q_UINT64_C(1) << CpuFeatureDSP)
+ | CpuFeatureDSP
#endif
#if defined __mips_dspr2
- | (Q_UINT64_C(1) << CpuFeatureDSPR2)
+ | CpuFeatureDSPR2
#endif
;
+#endif
#ifdef Q_ATOMIC_INT64_IS_SUPPORTED
extern Q_CORE_EXPORT QBasicAtomicInteger<quint64> qt_cpu_features[1];
@@ -459,8 +363,8 @@ static inline quint64 qCpuFeatures()
return features;
}
-#define qCpuHasFeature(feature) ((qCompilerCpuFeatures & (Q_UINT64_C(1) << CpuFeature ## feature)) \
- || (qCpuFeatures() & (Q_UINT64_C(1) << CpuFeature ## feature)))
+#define qCpuHasFeature(feature) (((qCompilerCpuFeatures & CpuFeature ## feature) == CpuFeature ## feature) \
+ || ((qCpuFeatures() & CpuFeature ## feature) == CpuFeature ## feature))
#define ALIGNMENT_PROLOGUE_16BYTES(ptr, i, length) \
for (; i < static_cast<int>(qMin(static_cast<quintptr>(length), ((4 - ((reinterpret_cast<quintptr>(ptr) >> 2) & 0x3)) & 0x3))); ++i)
diff --git a/src/corelib/tools/qsimd_x86.cpp b/src/corelib/tools/qsimd_x86.cpp
new file mode 100644
index 0000000000..509af464b2
--- /dev/null
+++ b/src/corelib/tools/qsimd_x86.cpp
@@ -0,0 +1,116 @@
+// This is a generated file. DO NOT EDIT.
+// Please see util/x86simdgen/generate.pl
+#include "qsimd_p.h"
+
+static const char features_string[] =
+ " sse2\0"
+ " sse3\0"
+ " ssse3\0"
+ " fma\0"
+ " sse4.1\0"
+ " sse4.2\0"
+ " movbe\0"
+ " popcnt\0"
+ " aes\0"
+ " avx\0"
+ " f16c\0"
+ " rdrnd\0"
+ " bmi\0"
+ " hle\0"
+ " avx2\0"
+ " bmi2\0"
+ " rtm\0"
+ " avx512f\0"
+ " avx512dq\0"
+ " rdseed\0"
+ " avx512ifma\0"
+ " avx512pf\0"
+ " avx512er\0"
+ " avx512cd\0"
+ " sha\0"
+ " avx512bw\0"
+ " avx512vl\0"
+ " avx512vbmi\0"
+ " avx512vbmi2\0"
+ " gfni\0"
+ " vaes\0"
+ " avx512vnni\0"
+ " avx512bitalg\0"
+ " avx512vpopcntdq\0"
+ " avx5124nniw\0"
+ " avx5124fmaps\0"
+ "\0";
+
+static const quint16 features_indices[] = {
+ 306, 0, 6, 12, 19, 24, 32, 40,
+ 47, 55, 60, 65, 71, 78, 83, 88,
+ 94, 100, 105, 114, 124, 132, 144, 154,
+ 164, 174, 179, 189, 199, 211, 224, 230,
+ 236, 248, 262, 279, 292
+};
+
+enum X86CpuidLeaves {
+ Leaf1ECX,
+ Leaf1EDX,
+ Leaf7_0EBX,
+ Leaf7_0ECX,
+ Leaf7_0EDX,
+ X86CpuidMaxLeaf
+};
+
+static const quint8 x86_locators[] = {
+ Leaf1EDX*32 + 26, // sse2
+ Leaf1ECX*32 + 0, // sse3
+ Leaf1ECX*32 + 9, // ssse3
+ Leaf1ECX*32 + 12, // fma
+ Leaf1ECX*32 + 19, // sse4.1
+ Leaf1ECX*32 + 20, // sse4.2
+ Leaf1ECX*32 + 22, // movbe
+ Leaf1ECX*32 + 23, // popcnt
+ Leaf1ECX*32 + 25, // aes
+ Leaf1ECX*32 + 28, // avx
+ Leaf1ECX*32 + 29, // f16c
+ Leaf1ECX*32 + 30, // rdrnd
+ Leaf7_0EBX*32 + 3, // bmi
+ Leaf7_0EBX*32 + 4, // hle
+ Leaf7_0EBX*32 + 5, // avx2
+ Leaf7_0EBX*32 + 8, // bmi2
+ Leaf7_0EBX*32 + 11, // rtm
+ Leaf7_0EBX*32 + 16, // avx512f
+ Leaf7_0EBX*32 + 17, // avx512dq
+ Leaf7_0EBX*32 + 18, // rdseed
+ Leaf7_0EBX*32 + 21, // avx512ifma
+ Leaf7_0EBX*32 + 26, // avx512pf
+ Leaf7_0EBX*32 + 27, // avx512er
+ Leaf7_0EBX*32 + 28, // avx512cd
+ Leaf7_0EBX*32 + 29, // sha
+ Leaf7_0EBX*32 + 30, // avx512bw
+ Leaf7_0EBX*32 + 31, // avx512vl
+ Leaf7_0ECX*32 + 1, // avx512vbmi
+ Leaf7_0ECX*32 + 6, // avx512vbmi2
+ Leaf7_0ECX*32 + 8, // gfni
+ Leaf7_0ECX*32 + 9, // vaes
+ Leaf7_0ECX*32 + 11, // avx512vnni
+ Leaf7_0ECX*32 + 12, // avx512bitalg
+ Leaf7_0ECX*32 + 14, // avx512vpopcntdq
+ Leaf7_0EDX*32 + 2, // avx5124nniw
+ Leaf7_0EDX*32 + 3 // avx5124fmaps
+};
+
+// List of AVX512 features (see detectProcessorFeatures())
+static const quint64 AllAVX512 = 0
+ | CpuFeatureAVX512F
+ | CpuFeatureAVX512DQ
+ | CpuFeatureAVX512IFMA
+ | CpuFeatureAVX512PF
+ | CpuFeatureAVX512ER
+ | CpuFeatureAVX512CD
+ | CpuFeatureAVX512BW
+ | CpuFeatureAVX512VL
+ | CpuFeatureAVX512VBMI
+ | CpuFeatureAVX512VBMI2
+ | CpuFeatureAVX512VNNI
+ | CpuFeatureAVX512BITALG
+ | CpuFeatureAVX512VPOPCNTDQ
+ | CpuFeatureAVX5124NNIW
+ | CpuFeatureAVX5124FMAPS;
diff --git a/src/corelib/tools/qsimd_x86_p.h b/src/corelib/tools/qsimd_x86_p.h
new file mode 100644
index 0000000000..2434e2b797
--- /dev/null
+++ b/src/corelib/tools/qsimd_x86_p.h
@@ -0,0 +1,222 @@
+// This is a generated file. DO NOT EDIT.
+// Please see util/x86simdgen/generate.pl
+#ifndef QSIMD_P_H
+# error "Please include <private/qsimd_p.h> instead"
+#endif
+#ifndef QSIMD_X86_P_H
+#define QSIMD_X86_P_H
+
+#include "qsimd_p.h"
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+QT_BEGIN_NAMESPACE
+
+// used only to indicate that the CPU detection was initialized
+#define QSimdInitialized (Q_UINT64_C(1) << 0)
+
+// in CPUID Leaf 1, EDX:
+#define CpuFeatureSSE2 (Q_UINT64_C(1) << 1)
+#define QT_FUNCTION_TARGET_STRING_SSE2 "sse2"
+
+// in CPUID Leaf 1, ECX:
+#define CpuFeatureSSE3 (Q_UINT64_C(1) << 2)
+#define QT_FUNCTION_TARGET_STRING_SSE3 "sse3"
+#define CpuFeatureSSSE3 (Q_UINT64_C(1) << 3)
+#define QT_FUNCTION_TARGET_STRING_SSSE3 "ssse3"
+#define CpuFeatureFMA (Q_UINT64_C(1) << 4)
+#define QT_FUNCTION_TARGET_STRING_FMA "fma"
+#define CpuFeatureSSE4_1 (Q_UINT64_C(1) << 5)
+#define QT_FUNCTION_TARGET_STRING_SSE4_1 "sse4.1"
+#define CpuFeatureSSE4_2 (Q_UINT64_C(1) << 6)
+#define QT_FUNCTION_TARGET_STRING_SSE4_2 "sse4.2"
+#define CpuFeatureMOVBE (Q_UINT64_C(1) << 7)
+#define QT_FUNCTION_TARGET_STRING_MOVBE "movbe"
+#define CpuFeaturePOPCNT (Q_UINT64_C(1) << 8)
+#define QT_FUNCTION_TARGET_STRING_POPCNT "popcnt"
+#define CpuFeatureAES (Q_UINT64_C(1) << 9)
+#define QT_FUNCTION_TARGET_STRING_AES "aes,sse4.2"
+#define CpuFeatureAVX (Q_UINT64_C(1) << 10)
+#define QT_FUNCTION_TARGET_STRING_AVX "avx"
+#define CpuFeatureF16C (Q_UINT64_C(1) << 11)
+#define QT_FUNCTION_TARGET_STRING_F16C "f16c"
+#define CpuFeatureRDRND (Q_UINT64_C(1) << 12)
+#define QT_FUNCTION_TARGET_STRING_RDRND "rdrnd"
+
+// in CPUID Leaf 7, Sub-leaf 0, EBX:
+#define CpuFeatureBMI (Q_UINT64_C(1) << 13)
+#define QT_FUNCTION_TARGET_STRING_BMI "bmi"
+#define CpuFeatureHLE (Q_UINT64_C(1) << 14)
+#define QT_FUNCTION_TARGET_STRING_HLE "hle"
+#define CpuFeatureAVX2 (Q_UINT64_C(1) << 15)
+#define QT_FUNCTION_TARGET_STRING_AVX2 "avx2"
+#define CpuFeatureBMI2 (Q_UINT64_C(1) << 16)
+#define QT_FUNCTION_TARGET_STRING_BMI2 "bmi2"
+#define CpuFeatureRTM (Q_UINT64_C(1) << 17)
+#define QT_FUNCTION_TARGET_STRING_RTM "rtm"
+#define CpuFeatureAVX512F (Q_UINT64_C(1) << 18)
+#define QT_FUNCTION_TARGET_STRING_AVX512F "avx512f"
+#define CpuFeatureAVX512DQ (Q_UINT64_C(1) << 19)
+#define QT_FUNCTION_TARGET_STRING_AVX512DQ "avx512dq"
+#define CpuFeatureRDSEED (Q_UINT64_C(1) << 20)
+#define QT_FUNCTION_TARGET_STRING_RDSEED "rdseed"
+#define CpuFeatureAVX512IFMA (Q_UINT64_C(1) << 21)
+#define QT_FUNCTION_TARGET_STRING_AVX512IFMA "avx512ifma"
+#define CpuFeatureAVX512PF (Q_UINT64_C(1) << 22)
+#define QT_FUNCTION_TARGET_STRING_AVX512PF "avx512pf"
+#define CpuFeatureAVX512ER (Q_UINT64_C(1) << 23)
+#define QT_FUNCTION_TARGET_STRING_AVX512ER "avx512er"
+#define CpuFeatureAVX512CD (Q_UINT64_C(1) << 24)
+#define QT_FUNCTION_TARGET_STRING_AVX512CD "avx512cd"
+#define CpuFeatureSHA (Q_UINT64_C(1) << 25)
+#define QT_FUNCTION_TARGET_STRING_SHA "sha"
+#define CpuFeatureAVX512BW (Q_UINT64_C(1) << 26)
+#define QT_FUNCTION_TARGET_STRING_AVX512BW "avx512bw"
+#define CpuFeatureAVX512VL (Q_UINT64_C(1) << 27)
+#define QT_FUNCTION_TARGET_STRING_AVX512VL "avx512vl"
+
+// in CPUID Leaf 7, Sub-leaf 0, ECX:
+#define CpuFeatureAVX512VBMI (Q_UINT64_C(1) << 28)
+#define QT_FUNCTION_TARGET_STRING_AVX512VBMI "avx512vbmi"
+#define CpuFeatureAVX512VBMI2 (Q_UINT64_C(1) << 29)
+#define QT_FUNCTION_TARGET_STRING_AVX512VBMI2 "avx512vbmi2"
+#define CpuFeatureGFNI (Q_UINT64_C(1) << 30)
+#define QT_FUNCTION_TARGET_STRING_GFNI "gfni"
+#define CpuFeatureVAES (Q_UINT64_C(1) << 31)
+#define QT_FUNCTION_TARGET_STRING_VAES "vaes"
+#define CpuFeatureAVX512VNNI (Q_UINT64_C(1) << 32)
+#define QT_FUNCTION_TARGET_STRING_AVX512VNNI "avx512vnni"
+#define CpuFeatureAVX512BITALG (Q_UINT64_C(1) << 33)
+#define QT_FUNCTION_TARGET_STRING_AVX512BITALG "avx512bitalg"
+#define CpuFeatureAVX512VPOPCNTDQ (Q_UINT64_C(1) << 34)
+#define QT_FUNCTION_TARGET_STRING_AVX512VPOPCNTDQ "avx512vpopcntdq"
+
+// in CPUID Leaf 7, Sub-leaf 0, EDX:
+#define CpuFeatureAVX5124NNIW (Q_UINT64_C(1) << 35)
+#define QT_FUNCTION_TARGET_STRING_AVX5124NNIW "avx5124nniw"
+#define CpuFeatureAVX5124FMAPS (Q_UINT64_C(1) << 36)
+#define QT_FUNCTION_TARGET_STRING_AVX5124FMAPS "avx5124fmaps"
+
+static const quint64 qCompilerCpuFeatures = 0
+#ifdef __SSE2__
+ | CpuFeatureSSE2
+#endif
+#ifdef __SSE3__
+ | CpuFeatureSSE3
+#endif
+#ifdef __SSSE3__
+ | CpuFeatureSSSE3
+#endif
+#ifdef __FMA__
+ | CpuFeatureFMA
+#endif
+#ifdef __SSE4_1__
+ | CpuFeatureSSE4_1
+#endif
+#ifdef __SSE4_2__
+ | CpuFeatureSSE4_2
+#endif
+#ifdef __MOVBE__
+ | CpuFeatureMOVBE
+#endif
+#ifdef __POPCNT__
+ | CpuFeaturePOPCNT
+#endif
+#ifdef __AES__
+ | CpuFeatureAES
+#endif
+#ifdef __AVX__
+ | CpuFeatureAVX
+#endif
+#ifdef __F16C__
+ | CpuFeatureF16C
+#endif
+#ifdef __RDRND__
+ | CpuFeatureRDRND
+#endif
+#ifdef __BMI__
+ | CpuFeatureBMI
+#endif
+#ifdef __HLE__
+ | CpuFeatureHLE
+#endif
+#ifdef __AVX2__
+ | CpuFeatureAVX2
+#endif
+#ifdef __BMI2__
+ | CpuFeatureBMI2
+#endif
+#ifdef __RTM__
+ | CpuFeatureRTM
+#endif
+#ifdef __AVX512F__
+ | CpuFeatureAVX512F
+#endif
+#ifdef __AVX512DQ__
+ | CpuFeatureAVX512DQ
+#endif
+#ifdef __RDSEED__
+ | CpuFeatureRDSEED
+#endif
+#ifdef __AVX512IFMA__
+ | CpuFeatureAVX512IFMA
+#endif
+#ifdef __AVX512PF__
+ | CpuFeatureAVX512PF
+#endif
+#ifdef __AVX512ER__
+ | CpuFeatureAVX512ER
+#endif
+#ifdef __AVX512CD__
+ | CpuFeatureAVX512CD
+#endif
+#ifdef __SHA__
+ | CpuFeatureSHA
+#endif
+#ifdef __AVX512BW__
+ | CpuFeatureAVX512BW
+#endif
+#ifdef __AVX512VL__
+ | CpuFeatureAVX512VL
+#endif
+#ifdef __AVX512VBMI__
+ | CpuFeatureAVX512VBMI
+#endif
+#ifdef __AVX512VBMI2__
+ | CpuFeatureAVX512VBMI2
+#endif
+#ifdef __GFNI__
+ | CpuFeatureGFNI
+#endif
+#ifdef __VAES__
+ | CpuFeatureVAES
+#endif
+#ifdef __AVX512VNNI__
+ | CpuFeatureAVX512VNNI
+#endif
+#ifdef __AVX512BITALG__
+ | CpuFeatureAVX512BITALG
+#endif
+#ifdef __AVX512VPOPCNTDQ__
+ | CpuFeatureAVX512VPOPCNTDQ
+#endif
+#ifdef __AVX5124NNIW__
+ | CpuFeatureAVX5124NNIW
+#endif
+#ifdef __AVX5124FMAPS__
+ | CpuFeatureAVX5124FMAPS
+#endif
+ ;
+
+QT_END_NAMESPACE
+
+#endif // QSIMD_X86_P_H
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index bb5a1cf852..b25e63e115 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -254,118 +254,198 @@ inline RetType UnrollTailLoop<0>::exec(Number, RetType returnIfExited, Functor1,
#endif
#ifdef __SSE2__
+// Scans from \a ptr to \a end until \a maskval is non-zero. Returns true if
+// the no non-zero was found. Returns false and updates \a ptr to point to the
+// first 16-bit word that has any bit set (note: if the input is 8-bit, \a ptr
+// may be updated to one byte short).
static bool simdTestMask(const char *&ptr, const char *end, quint32 maskval)
{
-# if defined(__AVX2__)
+ auto updatePtr = [&](uint result) {
+ // found a character matching the mask
+ uint idx = qCountTrailingZeroBits(~result);
+ ptr += idx;
+ return false;
+ };
+
+# if defined(__SSE4_1__)
+ __m128i mask;
+ auto updatePtrSimd = [&](__m128i data) {
+ __m128i masked = _mm_and_si128(mask, data);
+ __m128i comparison = _mm_cmpeq_epi16(masked, _mm_setzero_si128());
+ uint result = _mm_movemask_epi8(comparison);
+ return updatePtr(result);
+ };
+
+# if defined(__AVX2__)
// AVX2 implementation: test 32 bytes at a time
const __m256i mask256 = _mm256_broadcastd_epi32(_mm_cvtsi32_si128(maskval));
while (ptr + 32 <= end) {
__m256i data = _mm256_loadu_si256(reinterpret_cast<const __m256i *>(ptr));
- if (!_mm256_testz_si256(mask256, data))
- return false;
+ if (!_mm256_testz_si256(mask256, data)) {
+ // found a character matching the mask
+ __m256i masked256 = _mm256_and_si256(mask256, data);
+ __m256i comparison256 = _mm256_cmpeq_epi16(masked256, _mm256_setzero_si256());
+ return updatePtr(_mm256_movemask_epi8(comparison256));
+ }
ptr += 32;
}
- const __m128i mask = _mm256_castsi256_si128(mask256);
-# elif defined(__SSE4_1__)
+ mask = _mm256_castsi256_si128(mask256);
+# else
// SSE 4.1 implementation: test 32 bytes at a time (two 16-byte
// comparisons, unrolled)
- const __m128i mask = _mm_set1_epi32(maskval);
+ mask = _mm_set1_epi32(maskval);
while (ptr + 32 <= end) {
__m128i data1 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(ptr));
__m128i data2 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(ptr + 16));
if (!_mm_testz_si128(mask, data1))
- return false;
+ return updatePtrSimd(data1);
+
+ ptr += 16;
if (!_mm_testz_si128(mask, data2))
- return false;
- ptr += 32;
+ return updatePtrSimd(data2);
+ ptr += 16;
}
-# endif
-# if defined(__SSE4_1__)
+# endif
+
// AVX2 and SSE4.1: final 16-byte comparison
if (ptr + 16 <= end) {
__m128i data1 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(ptr));
if (!_mm_testz_si128(mask, data1))
- return false;
+ return updatePtrSimd(data1);
ptr += 16;
}
+
+ // and final 8-byte comparison
+ if (ptr + 8 <= end) {
+ __m128i data1 = _mm_loadl_epi64(reinterpret_cast<const __m128i *>(ptr));
+ if (!_mm_testz_si128(mask, data1))
+ return updatePtrSimd(data1);
+ ptr += 8;
+ }
+
# else
// SSE2 implementation: test 16 bytes at a time.
const __m128i mask = _mm_set1_epi32(maskval);
- while (ptr + 16 < end) {
+ while (ptr + 16 <= end) {
__m128i data = _mm_loadu_si128(reinterpret_cast<const __m128i *>(ptr));
- __m128i masked = _mm_andnot_si128(mask, data);
+ __m128i masked = _mm_and_si128(mask, data);
__m128i comparison = _mm_cmpeq_epi16(masked, _mm_setzero_si128());
- if (quint16(_mm_movemask_epi8(comparison)) != 0xffff)
- return false;
+ quint16 result = _mm_movemask_epi8(comparison);
+ if (result != 0xffff)
+ return updatePtr(result);
ptr += 16;
}
+
+ // and one 8-byte comparison
+ if (ptr + 8 <= end) {
+ __m128i data = _mm_loadl_epi64(reinterpret_cast<const __m128i *>(ptr));
+ __m128i masked = _mm_and_si128(mask, data);
+ __m128i comparison = _mm_cmpeq_epi16(masked, _mm_setzero_si128());
+ quint8 result = _mm_movemask_epi8(comparison);
+ if (result != 0xff)
+ return updatePtr(result);
+ ptr += 8;
+ }
# endif
return true;
}
#endif
-bool QtPrivate::isAscii(QLatin1String s) Q_DECL_NOTHROW
+// Note: ptr on output may be off by one and point to a preceding US-ASCII
+// character. Usually harmless.
+bool qt_is_ascii(const char *&ptr, const char *end) Q_DECL_NOTHROW
{
- const char *ptr = s.begin();
- const char *end = s.end();
-
#if defined(__SSE2__)
// Testing for the high bit can be done efficiently with just PMOVMSKB
# if defined(__AVX2__)
while (ptr + 32 <= end) {
__m256i data = _mm256_loadu_si256(reinterpret_cast<const __m256i *>(ptr));
quint32 mask = _mm256_movemask_epi8(data);
- if (mask)
+ if (mask) {
+ uint idx = qCountTrailingZeroBits(mask);
+ ptr += idx;
return false;
+ }
ptr += 32;
}
# endif
-
while (ptr + 16 <= end) {
__m128i data = _mm_loadu_si128(reinterpret_cast<const __m128i *>(ptr));
quint32 mask = _mm_movemask_epi8(data);
- if (mask)
+ if (mask) {
+ uint idx = qCountTrailingZeroBits(mask);
+ ptr += idx;
return false;
+ }
ptr += 16;
}
+ if (ptr + 8 <= end) {
+ __m128i data = _mm_loadl_epi64(reinterpret_cast<const __m128i *>(ptr));
+ quint8 mask = _mm_movemask_epi8(data);
+ if (mask) {
+ uint idx = qCountTrailingZeroBits(mask);
+ ptr += idx;
+ return false;
+ }
+ ptr += 8;
+ }
#endif
while (ptr + 4 <= end) {
quint32 data = qFromUnaligned<quint32>(ptr);
- if (data & 0x80808080U)
+ if (data &= 0x80808080U) {
+ uint idx = qCountTrailingZeroBits(data);
+ ptr += idx / 8;
return false;
+ }
ptr += 4;
}
while (ptr != end) {
- if (quint8(*ptr++) & 0x80)
+ if (quint8(*ptr) & 0x80)
return false;
+ ++ptr;
}
return true;
}
-bool QtPrivate::isAscii(QStringView s) Q_DECL_NOTHROW
+bool QtPrivate::isAscii(QLatin1String s) Q_DECL_NOTHROW
{
- const QChar *ptr = s.begin();
- const QChar *end = s.end();
+ const char *ptr = s.begin();
+ const char *end = s.end();
+
+ return qt_is_ascii(ptr, end);
+}
+static bool isAscii(const QChar *&ptr, const QChar *end)
+{
#ifdef __SSE2__
const char *ptr8 = reinterpret_cast<const char *>(ptr);
const char *end8 = reinterpret_cast<const char *>(end);
- if (!simdTestMask(ptr8, end8, 0xff80ff80))
- return false;
+ bool ok = simdTestMask(ptr8, end8, 0xff80ff80);
ptr = reinterpret_cast<const QChar *>(ptr8);
+ if (!ok)
+ return false;
#endif
while (ptr != end) {
- if ((*ptr++).unicode() & 0xff80)
+ if (ptr->unicode() & 0xff80)
return false;
+ ++ptr;
}
return true;
}
+bool QtPrivate::isAscii(QStringView s) Q_DECL_NOTHROW
+{
+ const QChar *ptr = s.begin();
+ const QChar *end = s.end();
+
+ return isAscii(ptr, end);
+}
+
bool QtPrivate::isLatin1(QStringView s) Q_DECL_NOTHROW
{
const QChar *ptr = s.begin();
@@ -439,11 +519,19 @@ void qt_from_latin1(ushort *dst, const char *str, size_t size) Q_DECL_NOTHROW
#endif
}
- size = size % 16;
+ // we're going to read str[offset..offset+7] (8 bytes)
+ if (str + offset + 7 < e) {
+ const __m128i chunk = _mm_loadl_epi64(reinterpret_cast<const __m128i *>(str + offset));
+ const __m128i unpacked = _mm_unpacklo_epi8(chunk, _mm_setzero_si128());
+ _mm_storeu_si128(reinterpret_cast<__m128i *>(dst + offset), unpacked);
+ offset += 8;
+ }
+
+ size = size % 8;
dst += offset;
str += offset;
# if defined(Q_COMPILER_LAMBDA) && !defined(__OPTIMIZE_SIZE__)
- return UnrollTailLoop<15>::exec(int(size), [=](int i) { dst[i] = (uchar)str[i]; });
+ return UnrollTailLoop<7>::exec(int(size), [=](int i) { dst[i] = (uchar)str[i]; });
# endif
#endif
#if defined(__mips_dsp)
@@ -457,86 +545,117 @@ void qt_from_latin1(ushort *dst, const char *str, size_t size) Q_DECL_NOTHROW
#endif
}
-#if defined(__SSE2__)
-static inline __m128i mergeQuestionMarks(__m128i chunk)
+template <bool Checked>
+static void qt_to_latin1_internal(uchar *dst, const ushort *src, qsizetype length)
{
+#if defined(__SSE2__)
+ uchar *e = dst + length;
+ qptrdiff offset = 0;
+
+# ifdef __AVX2__
+ const __m256i questionMark256 = _mm256_broadcastw_epi16(_mm_cvtsi32_si128('?'));
+ const __m256i outOfRange256 = _mm256_broadcastw_epi16(_mm_cvtsi32_si128(0x100));
+ const __m128i questionMark = _mm256_castsi256_si128(questionMark256);
+ const __m128i outOfRange = _mm256_castsi256_si128(outOfRange256);
+# else
const __m128i questionMark = _mm_set1_epi16('?');
+ const __m128i outOfRange = _mm_set1_epi16(0x100);
+# endif
-# ifdef __SSE4_2__
- // compare the unsigned shorts for the range 0x0100-0xFFFF
- // note on the use of _mm_cmpestrm:
- // The MSDN documentation online (http://technet.microsoft.com/en-us/library/bb514080.aspx)
- // says for range search the following:
- // For each character c in a, determine whether b0 <= c <= b1 or b2 <= c <= b3
- //
- // However, all examples on the Internet, including from Intel
- // (see http://software.intel.com/en-us/articles/xml-parsing-accelerator-with-intel-streaming-simd-extensions-4-intel-sse4/)
- // put the range to be searched first
- //
- // Disassembly and instruction-level debugging with GCC and ICC show
- // that they are doing the right thing. Inverting the arguments in the
- // instruction does cause a bunch of test failures.
-
- const __m128i rangeMatch = _mm_cvtsi32_si128(0xffff0100);
- const __m128i offLimitMask = _mm_cmpestrm(rangeMatch, 2, chunk, 8,
- _SIDD_UWORD_OPS | _SIDD_CMP_RANGES | _SIDD_UNIT_MASK);
-
- // replace the non-Latin 1 characters in the chunk with question marks
- chunk = _mm_blendv_epi8(chunk, questionMark, offLimitMask);
+ auto mergeQuestionMarks = [=](__m128i chunk) {
+ // SSE has no compare instruction for unsigned comparison.
+# ifdef __SSE4_1__
+ // We use an unsigned uc = qMin(uc, 0x100) and then compare for equality.
+ chunk = _mm_min_epu16(chunk, outOfRange);
+ const __m128i offLimitMask = _mm_cmpeq_epi16(chunk, outOfRange);
+ chunk = _mm_blendv_epi8(chunk, questionMark, offLimitMask);
# else
- // SSE has no compare instruction for unsigned comparison.
- // The variables must be shiffted + 0x8000 to be compared
- const __m128i signedBitOffset = _mm_set1_epi16(short(0x8000));
- const __m128i thresholdMask = _mm_set1_epi16(short(0xff + 0x8000));
+ // The variables must be shiffted + 0x8000 to be compared
+ const __m128i signedBitOffset = _mm_set1_epi16(short(0x8000));
+ const __m128i thresholdMask = _mm_set1_epi16(short(0xff + 0x8000));
- const __m128i signedChunk = _mm_add_epi16(chunk, signedBitOffset);
- const __m128i offLimitMask = _mm_cmpgt_epi16(signedChunk, thresholdMask);
+ const __m128i signedChunk = _mm_add_epi16(chunk, signedBitOffset);
+ const __m128i offLimitMask = _mm_cmpgt_epi16(signedChunk, thresholdMask);
-# ifdef __SSE4_1__
- // replace the non-Latin 1 characters in the chunk with question marks
- chunk = _mm_blendv_epi8(chunk, questionMark, offLimitMask);
-# else
- // offLimitQuestionMark contains '?' for each 16 bits that was off-limit
- // the 16 bits that were correct contains zeros
- const __m128i offLimitQuestionMark = _mm_and_si128(offLimitMask, questionMark);
+ // offLimitQuestionMark contains '?' for each 16 bits that was off-limit
+ // the 16 bits that were correct contains zeros
+ const __m128i offLimitQuestionMark = _mm_and_si128(offLimitMask, questionMark);
- // correctBytes contains the bytes that were in limit
- // the 16 bits that were off limits contains zeros
- const __m128i correctBytes = _mm_andnot_si128(offLimitMask, chunk);
+ // correctBytes contains the bytes that were in limit
+ // the 16 bits that were off limits contains zeros
+ const __m128i correctBytes = _mm_andnot_si128(offLimitMask, chunk);
- // merge offLimitQuestionMark and correctBytes to have the result
- chunk = _mm_or_si128(correctBytes, offLimitQuestionMark);
-# endif
-# endif
- return chunk;
-}
-#endif
+ // merge offLimitQuestionMark and correctBytes to have the result
+ chunk = _mm_or_si128(correctBytes, offLimitQuestionMark);
-static void qt_to_latin1(uchar *dst, const ushort *src, int length)
-{
-#if defined(__SSE2__)
- uchar *e = dst + length;
- qptrdiff offset = 0;
+ Q_UNUSED(outOfRange);
+# endif
+ return chunk;
+ };
// we're going to write to dst[offset..offset+15] (16 bytes)
for ( ; dst + offset + 15 < e; offset += 16) {
+# if defined(__AVX2__)
+ __m256i chunk = _mm256_loadu_si256(reinterpret_cast<const __m256i *>(src + offset));
+ if (Checked) {
+ // See mergeQuestionMarks lambda above for details
+ chunk = _mm256_min_epu16(chunk, outOfRange256);
+ const __m256i offLimitMask = _mm256_cmpeq_epi16(chunk, outOfRange256);
+ chunk = _mm256_blendv_epi8(chunk, questionMark256, offLimitMask);
+ }
+
+ const __m128i chunk2 = _mm256_extracti128_si256(chunk, 1);
+ const __m128i chunk1 = _mm256_castsi256_si128(chunk);
+# else
__m128i chunk1 = _mm_loadu_si128((const __m128i*)(src + offset)); // load
- chunk1 = mergeQuestionMarks(chunk1);
+ if (Checked)
+ chunk1 = mergeQuestionMarks(chunk1);
__m128i chunk2 = _mm_loadu_si128((const __m128i*)(src + offset + 8)); // load
- chunk2 = mergeQuestionMarks(chunk2);
+ if (Checked)
+ chunk2 = mergeQuestionMarks(chunk2);
+# endif
// pack the two vector to 16 x 8bits elements
const __m128i result = _mm_packus_epi16(chunk1, chunk2);
_mm_storeu_si128((__m128i*)(dst + offset), result); // store
}
- length = length % 16;
+# if !defined(__OPTIMIZE_SIZE__)
+ // we're going to write to dst[offset..offset+7] (8 bytes)
+ if (dst + offset + 7 < e) {
+ __m128i chunk = _mm_loadu_si128(reinterpret_cast<const __m128i *>(src + offset));
+ if (Checked)
+ chunk = mergeQuestionMarks(chunk);
+
+ // pack, where the upper half is ignored
+ const __m128i result = _mm_packus_epi16(chunk, chunk);
+ _mm_storel_epi64(reinterpret_cast<__m128i *>(dst + offset), result);
+ offset += 8;
+ }
+
+ // we're going to write to dst[offset..offset+3] (4 bytes)
+ if (dst + offset + 3 < e) {
+ __m128i chunk = _mm_loadl_epi64(reinterpret_cast<const __m128i *>(src + offset));
+ if (Checked)
+ chunk = mergeQuestionMarks(chunk);
+
+ // pack, we'll the upper three quarters
+ const __m128i result = _mm_packus_epi16(chunk, chunk);
+ qToUnaligned(_mm_cvtsi128_si32(result), dst + offset);
+ offset += 4;
+ }
+
+ length = length % 4;
dst += offset;
src += offset;
-# if defined(Q_COMPILER_LAMBDA) && !defined(__OPTIMIZE_SIZE__)
- return UnrollTailLoop<15>::exec(length, [=](int i) { dst[i] = (src[i]>0xff) ? '?' : (uchar) src[i]; });
+ return UnrollTailLoop<3>::exec(length, [=](int i) {
+ if (Checked)
+ dst[i] = (src[i]>0xff) ? '?' : (uchar) src[i];
+ else
+ dst[i] = src[i];
+ });
# endif
#elif defined(__ARM_NEON__)
// Refer to the documentation of the SSE2 implementation
@@ -551,10 +670,12 @@ static void qt_to_latin1(uchar *dst, const ushort *src, int length)
uint16x8_t chunk = vld1q_u16((uint16_t *)src); // load
src += 8;
- const uint16x8_t offLimitMask = vcgtq_u16(chunk, thresholdMask); // chunk > thresholdMask
- const uint16x8_t offLimitQuestionMark = vandq_u16(offLimitMask, questionMark); // offLimitMask & questionMark
- const uint16x8_t correctBytes = vbicq_u16(chunk, offLimitMask); // !offLimitMask & chunk
- chunk = vorrq_u16(correctBytes, offLimitQuestionMark); // correctBytes | offLimitQuestionMark
+ if (Checked) {
+ const uint16x8_t offLimitMask = vcgtq_u16(chunk, thresholdMask); // chunk > thresholdMask
+ const uint16x8_t offLimitQuestionMark = vandq_u16(offLimitMask, questionMark); // offLimitMask & questionMark
+ const uint16x8_t correctBytes = vbicq_u16(chunk, offLimitMask); // !offLimitMask & chunk
+ chunk = vorrq_u16(correctBytes, offLimitQuestionMark); // correctBytes | offLimitQuestionMark
+ }
const uint8x8_t result = vmovn_u16(chunk); // narrowing move->packing
vst1_u8(dst, result); // store
dst += 8;
@@ -566,12 +687,25 @@ static void qt_to_latin1(uchar *dst, const ushort *src, int length)
qt_toLatin1_mips_dsp_asm(dst, src, length);
#else
while (length--) {
- *dst++ = (*src>0xff) ? '?' : (uchar) *src;
+ if (Checked)
+ *dst++ = (*src>0xff) ? '?' : (uchar) *src;
+ else
+ *dst++ = *src;
++src;
}
#endif
}
+static void qt_to_latin1(uchar *dst, const ushort *src, qsizetype length)
+{
+ qt_to_latin1_internal<true>(dst, src, length);
+}
+
+void qt_to_latin1_unchecked(uchar *dst, const ushort *src, qsizetype length)
+{
+ qt_to_latin1_internal<false>(dst, src, length);
+}
+
// Unicode case-insensitive comparison
static int ucstricmp(const QChar *a, const QChar *ae, const QChar *b, const QChar *be)
{
@@ -836,12 +970,11 @@ static int ucstrncmp(const QChar *a, const uchar *c, size_t l)
}
}
-# ifdef Q_PROCESSOR_X86_64
- enum { MaxTailLength = 7 };
+# if !defined(__OPTIMIZE_SIZE__)
// we'll read uc[offset..offset+7] (16 bytes) and c[offset..offset+7] (8 bytes)
if (uc + offset + 7 < e) {
// same, but we're using an 8-byte load
- __m128i chunk = _mm_cvtsi64_si128(qFromUnaligned<long long>(c + offset));
+ __m128i chunk = _mm_loadl_epi64((const __m128i*)(c + offset));
__m128i secondHalf = _mm_unpacklo_epi8(chunk, nullmask);
__m128i ucdata = _mm_loadu_si128((const __m128i*)(uc + offset));
@@ -856,17 +989,30 @@ static int ucstrncmp(const QChar *a, const uchar *c, size_t l)
// still matched
offset += 8;
}
-# else
- // 32-bit, we can't do MOVQ to load 8 bytes
- Q_UNUSED(nullmask);
- enum { MaxTailLength = 15 };
-# endif
+
+ enum { MaxTailLength = 3 };
+ // we'll read uc[offset..offset+3] (8 bytes) and c[offset..offset+3] (4 bytes)
+ if (uc + offset + 3 < e) {
+ __m128i chunk = _mm_cvtsi32_si128(qFromUnaligned<int>(c + offset));
+ __m128i secondHalf = _mm_unpacklo_epi8(chunk, nullmask);
+
+ __m128i ucdata = _mm_loadl_epi64(reinterpret_cast<const __m128i *>(uc + offset));
+ __m128i result = _mm_cmpeq_epi8(secondHalf, ucdata);
+ uint mask = ~_mm_movemask_epi8(result);
+ if (uchar(mask)) {
+ // found a different character
+ uint idx = qCountTrailingZeroBits(mask);
+ return uc[offset + idx / 2] - c[offset + idx / 2];
+ }
+
+ // still matched
+ offset += 4;
+ }
// reset uc and c
uc += offset;
c += offset;
-# if !defined(__OPTIMIZE_SIZE__)
const auto lambda = [=](size_t i) { return uc[i] - ushort(c[i]); };
return UnrollTailLoop<MaxTailLength>::exec(e - uc, 0, lambda, lambda);
# endif
@@ -930,14 +1076,12 @@ static int qt_compare_strings(QLatin1String lhs, QStringView rhs, Qt::CaseSensit
static int qt_compare_strings(QLatin1String lhs, QLatin1String rhs, Qt::CaseSensitivity cs) Q_DECL_NOTHROW
{
+ if (cs == Qt::CaseInsensitive)
+ return qstrnicmp(lhs.data(), lhs.size(), rhs.data(), rhs.size());
if (lhs.isEmpty())
return lencmp(0, rhs.size());
const auto l = std::min(lhs.size(), rhs.size());
- int r;
- if (cs == Qt::CaseSensitive)
- r = qstrncmp(lhs.data(), rhs.data(), l);
- else
- r = qstrnicmp(lhs.data(), rhs.data(), l);
+ int r = qstrncmp(lhs.data(), rhs.data(), l);
return r ? r : lencmp(lhs.size(), rhs.size());
}
@@ -1055,8 +1199,23 @@ static int findChar(const QChar *str, int len, QChar ch, int from,
}
}
-# if defined(Q_COMPILER_LAMBDA) && !defined(__OPTIMIZE_SIZE__)
- return UnrollTailLoop<7>::exec(e - n, -1,
+# if !defined(__OPTIMIZE_SIZE__)
+ // we're going to read n[0..3] (8 bytes)
+ if (e - n > 3) {
+ __m128i data = _mm_loadl_epi64(reinterpret_cast<const __m128i *>(n));
+ __m128i result = _mm_cmpeq_epi16(data, mch);
+ uint mask = _mm_movemask_epi8(result);
+ if (uchar(mask)) {
+ // found a match
+ // same as: return n - s + _bit_scan_forward(mask) / 2
+ return (reinterpret_cast<const char *>(n) - reinterpret_cast<const char *>(s)
+ + qCountTrailingZeroBits(mask)) >> 1;
+ }
+
+ n += 4;
+ }
+
+ return UnrollTailLoop<3>::exec(e - n, -1,
[=](int i) { return n[i] == c; },
[=](int i) { return n - s + i; });
# endif
@@ -4930,16 +5089,55 @@ bool QString::endsWith(QChar c, Qt::CaseSensitivity cs) const
return qt_ends_with(*this, c, cs);
}
-static QByteArray qt_convert_to_latin1(QStringView string);
+/*!
+ Returns \c true if the string only contains uppercase letters,
+ otherwise returns \c false.
+ \since 5.12
-QByteArray QString::toLatin1_helper(const QString &string)
+ \sa QChar::isUpper(), isLower()
+*/
+bool QString::isUpper() const
{
- return qt_convert_to_latin1(string);
+ if (isEmpty())
+ return false;
+
+ const QChar *d = data();
+
+ for (int i = 0, max = size(); i < max; ++i) {
+ if (!d[i].isUpper())
+ return false;
+ }
+
+ return true;
+}
+
+/*!
+ Returns \c true if the string only contains lowercase letters,
+ otherwise returns \c false.
+ \since 5.12
+
+ \sa QChar::isLower(), isUpper()
+ */
+bool QString::isLower() const
+{
+ if (isEmpty())
+ return false;
+
+ const QChar *d = data();
+
+ for (int i = 0, max = size(); i < max; ++i) {
+ if (!d[i].isLower())
+ return false;
+ }
+
+ return true;
}
-QByteArray QString::toLatin1_helper(const QChar *data, int length)
+static QByteArray qt_convert_to_latin1(QStringView string);
+
+QByteArray QString::toLatin1_helper(const QString &string)
{
- return qt_convert_to_latin1(QStringView(data, length));
+ return qt_convert_to_latin1(string);
}
/*!
@@ -6173,7 +6371,7 @@ int QString::localeAwareCompare(const QString &other) const
return localeAwareCompare_helper(constData(), length(), other.constData(), other.length());
}
-#if QT_CONFIG(icu) && !defined(Q_OS_WIN32) && !defined(Q_OS_DARWIN)
+#if QT_CONFIG(icu)
Q_GLOBAL_STATIC(QThreadStorage<QCollator>, defaultCollator)
#endif
@@ -6194,12 +6392,15 @@ int QString::localeAwareCompare_helper(const QChar *data1, int length1,
return qt_compare_strings(QStringView(data1, length1), QStringView(data2, length2),
Qt::CaseSensitive);
-#if defined(Q_OS_WIN)
-# ifndef Q_OS_WINRT
- int res = CompareString(GetUserDefaultLCID(), 0, (wchar_t*)data1, length1, (wchar_t*)data2, length2);
-# else
- int res = CompareStringEx(LOCALE_NAME_USER_DEFAULT, 0, (LPCWSTR)data1, length1, (LPCWSTR)data2, length2, NULL, NULL, 0);
-# endif
+#if QT_CONFIG(icu)
+ if (!defaultCollator()->hasLocalData())
+ defaultCollator()->setLocalData(QCollator());
+ return defaultCollator()->localData().compare(data1, length1, data2, length2);
+#else
+ const QString lhs = QString::fromRawData(data1, length1).normalized(QString::NormalizationForm_C);
+ const QString rhs = QString::fromRawData(data2, length2).normalized(QString::NormalizationForm_C);
+# if defined(Q_OS_WIN)
+ int res = CompareStringEx(LOCALE_NAME_USER_DEFAULT, 0, (LPWSTR)lhs.constData(), lhs.length(), (LPWSTR)rhs.constData(), rhs.length(), NULL, NULL, 0);
switch (res) {
case CSTR_LESS_THAN:
@@ -6209,37 +6410,33 @@ int QString::localeAwareCompare_helper(const QChar *data1, int length1,
default:
return 0;
}
-#elif defined (Q_OS_MAC)
+# elif defined (Q_OS_DARWIN)
// Use CFStringCompare for comparing strings on Mac. This makes Qt order
// strings the same way as native applications do, and also respects
// the "Order for sorted lists" setting in the International preferences
// panel.
const CFStringRef thisString =
CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault,
- reinterpret_cast<const UniChar *>(data1), length1, kCFAllocatorNull);
+ reinterpret_cast<const UniChar *>(lhs.constData()), lhs.length(), kCFAllocatorNull);
const CFStringRef otherString =
CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault,
- reinterpret_cast<const UniChar *>(data2), length2, kCFAllocatorNull);
+ reinterpret_cast<const UniChar *>(rhs.constData()), rhs.length(), kCFAllocatorNull);
const int result = CFStringCompare(thisString, otherString, kCFCompareLocalized);
CFRelease(thisString);
CFRelease(otherString);
return result;
-#elif QT_CONFIG(icu)
- if (!defaultCollator()->hasLocalData())
- defaultCollator()->setLocalData(QCollator());
- return defaultCollator()->localData().compare(data1, length1, data2, length2);
-#elif defined(Q_OS_UNIX)
+# elif defined(Q_OS_UNIX)
// declared in <string.h>
- int delta = strcoll(toLocal8Bit_helper(data1, length1).constData(), toLocal8Bit_helper(data2, length2).constData());
+ int delta = strcoll(lhs.toLocal8Bit().constData(), rhs.toLocal8Bit().constData());
if (delta == 0)
- delta = qt_compare_strings(QStringView(data1, length1), QStringView(data2, length2),
- Qt::CaseSensitive);
+ delta = qt_compare_strings(lhs, rhs, Qt::CaseSensitive);
return delta;
-#else
- return qt_compare_strings(QStringView(data1, length1), QStringView(data2, length2),
- Qt::CaseSensitive);
-#endif
+# else
+# error "This case shouldn't happen"
+ return qt_compare_strings(lhs, rhs, Qt::CaseSensitive);
+# endif
+#endif // !QT_CONFIG(icu)
}
@@ -7784,19 +7981,11 @@ QString QString::repeated(int times) const
void qt_string_normalize(QString *data, QString::NormalizationForm mode, QChar::UnicodeVersion version, int from)
{
- bool simple = true;
- const QChar *p = data->constData();
- int len = data->length();
- for (int i = from; i < len; ++i) {
- if (p[i].unicode() >= 0x80) {
- simple = false;
- if (i > from)
- from = i - 1;
- break;
- }
- }
- if (simple)
+ const QChar *p = data->constData() + from;
+ if (isAscii(p, p + data->length()))
return;
+ if (p > data->constData() + from)
+ from = p - data->constData() - 1; // need one before the non-ASCII to perform NFC
if (version == QChar::Unicode_Unassigned) {
version = QChar::currentUnicodeVersion();
@@ -9757,11 +9946,7 @@ QDataStream &operator<<(QDataStream &out, const QString &str)
out.writeBytes(reinterpret_cast<const char *>(str.unicode()), sizeof(QChar) * str.length());
} else {
QVarLengthArray<ushort> buffer(str.length());
- const ushort *data = reinterpret_cast<const ushort *>(str.constData());
- for (int i = 0; i < str.length(); i++) {
- buffer[i] = qbswap(*data);
- ++data;
- }
+ qbswap<sizeof(ushort)>(str.constData(), str.length(), buffer.data());
out.writeBytes(reinterpret_cast<const char *>(buffer.data()), sizeof(ushort) * buffer.size());
}
} else {
@@ -9818,10 +10003,7 @@ QDataStream &operator>>(QDataStream &in, QString &str)
if ((in.byteOrder() == QDataStream::BigEndian)
!= (QSysInfo::ByteOrder == QSysInfo::BigEndian)) {
ushort *data = reinterpret_cast<ushort *>(str.data());
- while (len--) {
- *data = qbswap(*data);
- ++data;
- }
+ qbswap<sizeof(*data)>(data, len, data);
}
} else {
str = QString(QLatin1String(""));
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index f27f7efa2b..f18baf7065 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -409,6 +409,9 @@ public:
bool endsWith(QLatin1String s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
bool endsWith(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ bool isUpper() const;
+ bool isLower() const;
+
Q_REQUIRED_RESULT QString leftJustified(int width, QChar fill = QLatin1Char(' '), bool trunc = false) const;
Q_REQUIRED_RESULT QString rightJustified(int width, QChar fill = QLatin1Char(' '), bool trunc = false) const;
@@ -875,7 +878,6 @@ private:
static QString fromUtf8_helper(const char *str, int size);
static QString fromLocal8Bit_helper(const char *, int size);
static QByteArray toLatin1_helper(const QString &);
- static QByteArray toLatin1_helper(const QChar *data, int size);
static QByteArray toLatin1_helper_inplace(QString &);
static QByteArray toUtf8_helper(const QString &);
static QByteArray toLocal8Bit_helper(const QChar *data, int size);
diff --git a/src/corelib/tools/qstringview.cpp b/src/corelib/tools/qstringview.cpp
index 0e3246c72c..ce8fdacafb 100644
--- a/src/corelib/tools/qstringview.cpp
+++ b/src/corelib/tools/qstringview.cpp
@@ -681,6 +681,20 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \fn int QStringView::compare(QStringView other, Qt::CaseSensitivity cs) const
+ \since 5.12
+
+ Compares this string-view with the \a other string-view and returns an
+ integer less than, equal to, or greater than zero if this string-view
+ is less than, equal to, or greater than the other string-view.
+
+ If \a cs is Qt::CaseSensitive, the comparison is case sensitive;
+ otherwise the comparison is case insensitive.
+
+ \sa operator==(), operator<(), operator>()
+*/
+
+/*!
\fn bool QStringView::startsWith(QStringView str, Qt::CaseSensitivity cs) const
\fn bool QStringView::startsWith(QLatin1String l1, Qt::CaseSensitivity cs) const
\fn bool QStringView::startsWith(QChar ch) const
diff --git a/src/corelib/tools/qstringview.h b/src/corelib/tools/qstringview.h
index 4f7d48fe1d..2e95c2b218 100644
--- a/src/corelib/tools/qstringview.h
+++ b/src/corelib/tools/qstringview.h
@@ -250,6 +250,9 @@ public:
Q_REQUIRED_RESULT QStringView trimmed() const Q_DECL_NOTHROW { return QtPrivate::trimmed(*this); }
+ Q_REQUIRED_RESULT int compare(QStringView other, Qt::CaseSensitivity cs = Qt::CaseSensitive) const Q_DECL_NOTHROW
+ { return QtPrivate::compareStrings(*this, other, cs); }
+
Q_REQUIRED_RESULT bool startsWith(QStringView s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const Q_DECL_NOTHROW
{ return QtPrivate::startsWith(*this, s, cs); }
Q_REQUIRED_RESULT inline bool startsWith(QLatin1String s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const Q_DECL_NOTHROW;
diff --git a/src/corelib/tools/qt_attribution.json b/src/corelib/tools/qt_attribution.json
index 49a76cb8b4..63288be4e3 100644
--- a/src/corelib/tools/qt_attribution.json
+++ b/src/corelib/tools/qt_attribution.json
@@ -26,10 +26,11 @@
world's languages, with the largest and most extensive standard repository of locale data
available.",
"Homepage": "http://cldr.unicode.org/",
- "Version": "v31.0.1",
+ "Version": "v33.1",
+ "License": "// as specified in https://spdx.org/licenses/Unicode-DFS-2016.html",
"License": "Unicode License Agreement - Data Files and Software (2016)",
"LicenseId": "Unicode-DFS-2016",
"LicenseFile": "UNICODE_LICENSE.txt",
- "Copyright": "Copyright (C) 1991-2017 Unicode, Inc."
+ "Copyright": "Copyright (C) 1991-2018 Unicode, Inc."
}
]
diff --git a/src/corelib/tools/qtimezone.cpp b/src/corelib/tools/qtimezone.cpp
index daa7dc1531..db6be581ec 100644
--- a/src/corelib/tools/qtimezone.cpp
+++ b/src/corelib/tools/qtimezone.cpp
@@ -66,11 +66,10 @@ static QTimeZonePrivate *newBackendTimeZone()
return new QAndroidTimeZonePrivate();
#elif defined(Q_OS_UNIX) || defined(Q_OS_ANDROID_EMBEDDED)
return new QTzTimeZonePrivate();
- // Registry based timezone backend not available on WinRT
-#elif defined Q_OS_WIN
- return new QWinTimeZonePrivate();
#elif QT_CONFIG(icu)
return new QIcuTimeZonePrivate();
+#elif defined Q_OS_WIN
+ return new QWinTimeZonePrivate();
#else
return new QUtcTimeZonePrivate();
#endif // System Locales
@@ -93,11 +92,10 @@ static QTimeZonePrivate *newBackendTimeZone(const QByteArray &ianaId)
return new QAndroidTimeZonePrivate(ianaId);
#elif defined(Q_OS_UNIX) || defined(Q_OS_ANDROID_EMBEDDED)
return new QTzTimeZonePrivate(ianaId);
- // Registry based timezone backend not available on WinRT
-#elif defined Q_OS_WIN
- return new QWinTimeZonePrivate(ianaId);
#elif QT_CONFIG(icu)
return new QIcuTimeZonePrivate(ianaId);
+#elif defined Q_OS_WIN
+ return new QWinTimeZonePrivate(ianaId);
#else
return new QUtcTimeZonePrivate(ianaId);
#endif // System Locales
@@ -822,8 +820,8 @@ bool QTimeZone::isTimeZoneIdAvailable(const QByteArray &ianaId)
// IDs as availableTimeZoneIds() may be slow
if (!QTimeZonePrivate::isValidId(ianaId))
return false;
- const QList<QByteArray> tzIds = availableTimeZoneIds();
- return std::binary_search(tzIds.begin(), tzIds.end(), ianaId);
+ return QUtcTimeZonePrivate().isTimeZoneIdAvailable(ianaId) ||
+ global_tz->backend->isTimeZoneIdAvailable(ianaId);
}
static QList<QByteArray> set_union(const QList<QByteArray> &l1, const QList<QByteArray> &l2)
diff --git a/src/corelib/tools/qtimezoneprivate.cpp b/src/corelib/tools/qtimezoneprivate.cpp
index 1a5135f103..2b6c2ea6a5 100644
--- a/src/corelib/tools/qtimezoneprivate.cpp
+++ b/src/corelib/tools/qtimezoneprivate.cpp
@@ -486,6 +486,13 @@ QByteArray QTimeZonePrivate::systemTimeZoneId() const
return QByteArray();
}
+bool QTimeZonePrivate::isTimeZoneIdAvailable(const QByteArray& ianaId) const
+{
+ // Fall-back implementation, can be made faster in subclasses
+ const QList<QByteArray> tzIds = availableTimeZoneIds();
+ return std::binary_search(tzIds.begin(), tzIds.end(), ianaId);
+}
+
QList<QByteArray> QTimeZonePrivate::availableTimeZoneIds() const
{
return QList<QByteArray>();
@@ -864,6 +871,17 @@ QByteArray QUtcTimeZonePrivate::systemTimeZoneId() const
return utcQByteArray();
}
+bool QUtcTimeZonePrivate::isTimeZoneIdAvailable(const QByteArray &ianaId) const
+{
+ for (int i = 0; i < utcDataTableSize; ++i) {
+ const QUtcData *data = utcData(i);
+ if (utcId(data) == ianaId) {
+ return true;
+ }
+ }
+ return false;
+}
+
QList<QByteArray> QUtcTimeZonePrivate::availableTimeZoneIds() const
{
QList<QByteArray> result;
diff --git a/src/corelib/tools/qtimezoneprivate_p.h b/src/corelib/tools/qtimezoneprivate_p.h
index 4d357111f2..c9a5726216 100644
--- a/src/corelib/tools/qtimezoneprivate_p.h
+++ b/src/corelib/tools/qtimezoneprivate_p.h
@@ -128,6 +128,7 @@ public:
virtual QByteArray systemTimeZoneId() const;
+ virtual bool isTimeZoneIdAvailable(const QByteArray &ianaId) const;
virtual QList<QByteArray> availableTimeZoneIds() const;
virtual QList<QByteArray> availableTimeZoneIds(QLocale::Country country) const;
virtual QList<QByteArray> availableTimeZoneIds(int utcOffset) const;
@@ -204,6 +205,7 @@ public:
QByteArray systemTimeZoneId() const override;
+ bool isTimeZoneIdAvailable(const QByteArray &ianaId) const override;
QList<QByteArray> availableTimeZoneIds() const override;
QList<QByteArray> availableTimeZoneIds(QLocale::Country country) const override;
QList<QByteArray> availableTimeZoneIds(int utcOffset) const override;
@@ -323,6 +325,7 @@ public:
QByteArray systemTimeZoneId() const override;
+ bool isTimeZoneIdAvailable(const QByteArray &ianaId) const override;
QList<QByteArray> availableTimeZoneIds() const override;
QList<QByteArray> availableTimeZoneIds(QLocale::Country country) const override;
diff --git a/src/corelib/tools/qtimezoneprivate_tz.cpp b/src/corelib/tools/qtimezoneprivate_tz.cpp
index 6a5df6272a..f1735a80e7 100644
--- a/src/corelib/tools/qtimezoneprivate_tz.cpp
+++ b/src/corelib/tools/qtimezoneprivate_tz.cpp
@@ -1098,6 +1098,11 @@ QByteArray QTzTimeZonePrivate::systemTimeZoneId() const
return ianaId;
}
+bool QTzTimeZonePrivate::isTimeZoneIdAvailable(const QByteArray &ianaId) const
+{
+ return tzZones->contains(ianaId);
+}
+
QList<QByteArray> QTzTimeZonePrivate::availableTimeZoneIds() const
{
QList<QByteArray> result = tzZones->keys();
diff --git a/src/corelib/tools/qtimezoneprivate_win.cpp b/src/corelib/tools/qtimezoneprivate_win.cpp
index 8bde07c710..ec91b7e8a8 100644
--- a/src/corelib/tools/qtimezoneprivate_win.cpp
+++ b/src/corelib/tools/qtimezoneprivate_win.cpp
@@ -49,6 +49,7 @@
QT_BEGIN_NAMESPACE
#ifndef Q_OS_WINRT
+// The registry-based timezone backend is not available on WinRT, which falls back to equivalent APIs.
#define QT_USE_REGISTRY_TIMEZONE 1
#endif
diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri
index 72224f280d..30f7edb5f2 100644
--- a/src/corelib/tools/tools.pri
+++ b/src/corelib/tools/tools.pri
@@ -159,16 +159,18 @@ qtConfig(timezone) {
SOURCES += \
tools/qtimezone.cpp \
tools/qtimezoneprivate.cpp
- !nacl:darwin: \
+ !nacl:darwin: {
SOURCES += tools/qtimezoneprivate_mac.mm
- else: android:!android-embedded: \
+ } else: android:!android-embedded: {
SOURCES += tools/qtimezoneprivate_android.cpp
- else: unix: \
+ } else: unix: {
SOURCES += tools/qtimezoneprivate_tz.cpp
- else: win32: \
- SOURCES += tools/qtimezoneprivate_win.cpp
- qtConfig(icu): \
+ qtConfig(icu): SOURCES += tools/qtimezoneprivate_icu.cpp
+ } else: qtConfig(icu): {
SOURCES += tools/qtimezoneprivate_icu.cpp
+ } else: win32: {
+ SOURCES += tools/qtimezoneprivate_win.cpp
+ }
}
qtConfig(datetimeparser) {
@@ -179,7 +181,9 @@ qtConfig(datetimeparser) {
qtConfig(regularexpression) {
QMAKE_USE_PRIVATE += pcre2
- HEADERS += tools/qregularexpression.h
+ HEADERS += \
+ tools/qregularexpression.h \
+ tools/qregularexpression_p.h
SOURCES += tools/qregularexpression.cpp
}
diff --git a/src/dbus/qdbus_symbols.cpp b/src/dbus/qdbus_symbols.cpp
index 1e93a46c0c..5e06c337f2 100644
--- a/src/dbus/qdbus_symbols.cpp
+++ b/src/dbus/qdbus_symbols.cpp
@@ -126,14 +126,16 @@ bool qdbus_loadLibDBus()
#endif
}
-#if QT_CONFIG(library)
void (*qdbus_resolve_conditionally(const char *name))()
{
+#if QT_CONFIG(library)
if (qdbus_loadLibDBus())
return qdbus_libdbus->resolve(name);
+#else
+ Q_UNUSED(name);
+#endif
return 0;
}
-#endif
void (*qdbus_resolve_me(const char *name))()
{
diff --git a/src/dbus/qdbus_symbols_p.h b/src/dbus/qdbus_symbols_p.h
index 9eaebe6d7e..7cce0d71aa 100644
--- a/src/dbus/qdbus_symbols_p.h
+++ b/src/dbus/qdbus_symbols_p.h
@@ -161,6 +161,19 @@ template <> struct TraceReturn<void> { typedef void Type; };
funcret DEBUGRET(ret) ptr argcall; \
}
+# define DEFINEFUNC_CONDITIONALLY(ret, func, args, argcall, funcret, failret) \
+ typedef ret (* _q_PTR_##func) args; \
+ static inline ret q_##func args \
+ { \
+ static _q_PTR_##func ptr; \
+ DEBUGCALL(#func, argcall); \
+ if (!ptr) \
+ ptr = (_q_PTR_##func) qdbus_resolve_conditionally(#func); \
+ if (!ptr) \
+ failret; \
+ funcret DEBUGRET(ret) ptr argcall; \
+ }
+
#else // defined QT_LINKED_LIBDBUS
inline bool qdbus_loadLibDBus() { return true; }
@@ -300,6 +313,26 @@ DEFINEFUNC(const char* , dbus_message_get_signature, (DBusMessage *message),
(message), return)
DEFINEFUNC(int , dbus_message_get_type, (DBusMessage *message),
(message), return)
+
+#if !defined QT_LINKED_LIBDBUS
+
+DEFINEFUNC_CONDITIONALLY(dbus_bool_t , dbus_message_get_allow_interactive_authorization, (DBusMessage *message),
+ (message), return, return false)
+
+#else // defined QT_LINKED_LIBDBUS
+
+static inline dbus_bool_t q_dbus_message_get_allow_interactive_authorization(DBusMessage *message)
+{
+#ifdef DBUS_HEADER_FLAG_ALLOW_INTERACTIVE_AUTHORIZATION
+ return dbus_message_get_allow_interactive_authorization(message);
+#else
+ Q_UNUSED(message);
+ return false;
+#endif
+}
+
+#endif // defined QT_LINKED_LIBDBUS
+
DEFINEFUNC(dbus_bool_t , dbus_message_iter_append_basic, (DBusMessageIter *iter,
int type,
const void *value),
@@ -378,9 +411,33 @@ DEFINEFUNC(dbus_bool_t , dbus_message_set_sender, (DBusMessage *message,
DEFINEFUNC(void , dbus_message_unref, (DBusMessage *message),
(message), )
+#if !defined QT_LINKED_LIBDBUS
+
+DEFINEFUNC_CONDITIONALLY(void, dbus_message_set_allow_interactive_authorization,
+ (DBusMessage *message, dbus_bool_t allow), (message, allow), return, return)
+
+
+#else // defined QT_LINKED_LIBDBUS
+
+static inline void q_dbus_message_set_allow_interactive_authorization(DBusMessage *message, dbus_bool_t allow)
+{
+#ifdef DBUS_HEADER_FLAG_ALLOW_INTERACTIVE_AUTHORIZATION
+ dbus_message_set_allow_interactive_authorization(message, allow);
+#else
+ Q_UNUSED(message);
+ Q_UNUSED(allow);
+#endif
+}
+
+#endif // defined QT_LINKED_LIBDBUS
+
/* dbus-misc.h */
DEFINEFUNC(char* , dbus_get_local_machine_id , (void), (), return)
+DEFINEFUNC(void , dbus_get_version , (int *major_version, int *minor_version, int *micro_version)
+ , (major_version, minor_version, micro_version)
+ , return)
+
/* dbus-pending-call.h */
DEFINEFUNC(dbus_bool_t , dbus_pending_call_set_notify, (DBusPendingCall *pending,
diff --git a/src/dbus/qdbusmessage.cpp b/src/dbus/qdbusmessage.cpp
index ef827e82b0..3e8f2eaf3f 100644
--- a/src/dbus/qdbusmessage.cpp
+++ b/src/dbus/qdbusmessage.cpp
@@ -70,7 +70,8 @@ static inline const char *data(const QByteArray &arr)
QDBusMessagePrivate::QDBusMessagePrivate()
: msg(0), reply(0), localReply(0), ref(1), type(QDBusMessage::InvalidMessage),
delayedReply(false), localMessage(false),
- parametersValidated(false), autoStartService(true)
+ parametersValidated(false), autoStartService(true),
+ interactiveAuthorizationAllowed(false)
{
}
@@ -138,6 +139,8 @@ DBusMessage *QDBusMessagePrivate::toDBusMessage(const QDBusMessage &message, QDB
msg = q_dbus_message_new_method_call(data(d_ptr->service.toUtf8()), d_ptr->path.toUtf8(),
data(d_ptr->interface.toUtf8()), d_ptr->name.toUtf8());
q_dbus_message_set_auto_start( msg, d_ptr->autoStartService );
+ q_dbus_message_set_allow_interactive_authorization(msg, d_ptr->interactiveAuthorizationAllowed);
+
break;
case QDBusMessage::ReplyMessage:
msg = q_dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_RETURN);
@@ -242,6 +245,7 @@ QDBusMessage QDBusMessagePrivate::fromDBusMessage(DBusMessage *dmsg, QDBusConnec
QString::fromUtf8(q_dbus_message_get_member(dmsg));
message.d_ptr->service = QString::fromUtf8(q_dbus_message_get_sender(dmsg));
message.d_ptr->signature = QString::fromUtf8(q_dbus_message_get_signature(dmsg));
+ message.d_ptr->interactiveAuthorizationAllowed = q_dbus_message_get_allow_interactive_authorization(dmsg);
message.d_ptr->msg = q_dbus_message_ref(dmsg);
QDBusDemarshaller demarshaller(capabilities);
@@ -725,6 +729,44 @@ bool QDBusMessage::autoStartService() const
}
/*!
+ Sets the interactive authorization flag to \a enable.
+ This flag only makes sense for method call messages, where it
+ tells the D-Bus server that the caller of the method is prepared
+ to wait for interactive authorization to take place (for instance
+ via Polkit) before the actual method is processed.
+
+ By default this flag is false and the other end is expected to
+ make any authorization decisions non-interactively and promptly.
+
+ The \c org.freedesktop.DBus.Error.InteractiveAuthorizationRequired
+ error indicates that authorization failed, but could have succeeded
+ if this flag had been set.
+
+ \sa isInteractiveAuthorizationAllowed()
+
+ \since 5.12
+*/
+void QDBusMessage::setInteractiveAuthorizationAllowed(bool enable)
+{
+ d_ptr->interactiveAuthorizationAllowed = enable;
+}
+
+/*!
+ Returns the interactive authorization allowed flag, as set by
+ setInteractiveAuthorizationAllowed(). By default this flag
+ is false and the other end is expected to make any authorization
+ decisions non-interactively and promptly.
+
+ \sa setInteractiveAuthorizationAllowed()
+
+ \since 5.12
+*/
+bool QDBusMessage::isInteractiveAuthorizationAllowed() const
+{
+ return d_ptr->interactiveAuthorizationAllowed;
+}
+
+/*!
Sets the arguments that are going to be sent over D-Bus to \a arguments. Those
will be the arguments to a method call or the parameters in the signal.
diff --git a/src/dbus/qdbusmessage.h b/src/dbus/qdbusmessage.h
index 9f4a98b855..23e04045d8 100644
--- a/src/dbus/qdbusmessage.h
+++ b/src/dbus/qdbusmessage.h
@@ -119,6 +119,9 @@ public:
void setAutoStartService(bool enable);
bool autoStartService() const;
+ void setInteractiveAuthorizationAllowed(bool enable);
+ bool isInteractiveAuthorizationAllowed() const;
+
void setArguments(const QList<QVariant> &arguments);
QList<QVariant> arguments() const;
diff --git a/src/dbus/qdbusmessage_p.h b/src/dbus/qdbusmessage_p.h
index 4b84b3f0cc..f921c33832 100644
--- a/src/dbus/qdbusmessage_p.h
+++ b/src/dbus/qdbusmessage_p.h
@@ -87,6 +87,7 @@ public:
uint localMessage : 1;
mutable uint parametersValidated : 1;
uint autoStartService : 1;
+ uint interactiveAuthorizationAllowed : 1;
static void setParametersValidated(QDBusMessage &msg, bool enable)
{ msg.d_ptr->parametersValidated = enable; }
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp
index d60a21606b..6b48f573b2 100644
--- a/src/gui/accessible/qaccessible.cpp
+++ b/src/gui/accessible/qaccessible.cpp
@@ -202,7 +202,7 @@ Q_LOGGING_CATEGORY(lcAccessibilityCore, "qt.accessibility.core");
This enum type defines accessible event types.
- \omitvalue InvalidEvent Internal: Used when creating subclasses of QAccessibleEvent.
+ \omitvalue InvalidEvent \omit Internal: Used when creating subclasses of QAccessibleEvent. \endomit
\value AcceleratorChanged The keyboard accelerator for an action has been changed.
\value ActionChanged An action has been changed.
\value ActiveDescendantChanged
@@ -273,27 +273,27 @@ Q_LOGGING_CATEGORY(lcAccessibilityCore, "qt.accessibility.core");
\value SelectionWithin Several changes to a selection has occurred in an item
view.
\value SoundPlayed A sound has been played by an object
- \omitvalue StateChanged The QAccessible::State of an object has changed.
- This value is used internally for the QAccessibleStateChangeEvent.
+ \omitvalue StateChanged \omit The QAccessible::State of an object has changed.
+ This value is used internally for the QAccessibleStateChangeEvent. \endomit
\value TableCaptionChanged A table caption has been changed.
\value TableColumnDescriptionChanged The description of a table column, typically found in
the column's header, has been changed.
\value TableColumnHeaderChanged A table column header has been changed.
- \omitvalue TableModelChanged The model providing data for a table has been changed.
+ \omitvalue TableModelChanged \omit The model providing data for a table has been changed. \endomit
\value TableRowDescriptionChanged The description of a table row, typically found in the
row's header, has been changed.
\value TableRowHeaderChanged A table row header has been changed.
\value TableSummaryChanged The summary of a table has been changed.
\omitvalue TextAttributeChanged
- \omitvalue TextCaretMoved The caret has moved in an editable widget.
+ \omitvalue TextCaretMoved \omit The caret has moved in an editable widget.
The caret represents the cursor position in an editable
- widget with the input focus.
+ widget with the input focus. \endomit
\value TextColumnChanged A text column has been changed.
- \omitvalue TextInserted Text has been inserted into an editable widget.
- \omitvalue TextRemoved Text has been removed from an editable widget.
- \omitvalue TextSelectionChanged The selected text has changed in an editable widget.
- \omitvalue TextUpdated The text has been update in an editable widget.
- \omitvalue ValueChanged The QAccessible::Value of an object has changed.
+ \omitvalue TextInserted \omit Text has been inserted into an editable widget. \endomit
+ \omitvalue TextRemoved \omit Text has been removed from an editable widget. \endomit
+ \omitvalue TextSelectionChanged \omit The selected text has changed in an editable widget. \endomit
+ \omitvalue TextUpdated \omit The text has been update in an editable widget. \endomit
+ \omitvalue ValueChanged \omit The QAccessible::Value of an object has changed. \endomit
\value VisibleDataChanged
The values for this enum are defined to be the same as those defined in the
@@ -441,10 +441,10 @@ Q_LOGGING_CATEGORY(lcAccessibilityCore, "qt.accessibility.core");
\note When subclassing one of these interfaces, \l QAccessibleInterface::interface_cast() needs to be implemented.
\value TextInterface For text that supports selections or is more than one line. Simple labels do not need to implement this interface.
- \omitvalue EditableTextInterface For text that can be edited by the user.
+ \omitvalue EditableTextInterface \omit For text that can be edited by the user. \endomit
\value ValueInterface For objects that are used to manipulate a value, for example slider or scroll bar.
\value ActionInterface For interactive objects that allow the user to trigger an action. Basically everything that allows for example mouse interaction.
- \omitvalue ImageInterface For objects that represent an image. This interface is generally less important.
+ \omitvalue ImageInterface \omit For objects that represent an image. This interface is generally less important. \endomit
\value TableInterface For lists, tables and trees.
\value TableCellInterface For cells in a TableInterface object.
diff --git a/src/gui/accessible/qaccessiblecache.cpp b/src/gui/accessible/qaccessiblecache.cpp
index f4242036ce..20376a54c4 100644
--- a/src/gui/accessible/qaccessiblecache.cpp
+++ b/src/gui/accessible/qaccessiblecache.cpp
@@ -38,11 +38,15 @@
****************************************************************************/
#include "qaccessiblecache_p.h"
+#include <QtCore/qdebug.h>
+#include <QtCore/qloggingcategory.h>
#ifndef QT_NO_ACCESSIBILITY
QT_BEGIN_NAMESPACE
+Q_LOGGING_CATEGORY(lcAccessibilityCache, "qt.accessibility.cache");
+
/*!
\class QAccessibleCache
\internal
@@ -57,6 +61,12 @@ static void cleanupAccessibleCache()
accessibleCache = nullptr;
}
+QAccessibleCache::~QAccessibleCache()
+{
+ for (QAccessible::Id id: idToInterface.keys())
+ deleteInterface(id);
+}
+
QAccessibleCache *QAccessibleCache::instance()
{
if (!accessibleCache) {
@@ -116,6 +126,7 @@ QAccessible::Id QAccessibleCache::insert(QObject *object, QAccessibleInterface *
}
idToInterface.insert(id, iface);
interfaceToId.insert(iface, id);
+ qCDebug(lcAccessibilityCache) << "insert - id:" << id << " iface:" << iface;
return id;
}
@@ -131,6 +142,9 @@ void QAccessibleCache::objectDestroyed(QObject* obj)
void QAccessibleCache::deleteInterface(QAccessible::Id id, QObject *obj)
{
QAccessibleInterface *iface = idToInterface.take(id);
+ qCDebug(lcAccessibilityCache) << "delete - id:" << id << " iface:" << iface;
+ if (!iface) // the interface may be deleted already
+ return;
interfaceToId.take(iface);
if (!obj)
obj = iface->object();
diff --git a/src/gui/accessible/qaccessiblecache_p.h b/src/gui/accessible/qaccessiblecache_p.h
index f054ee9678..a976277c1d 100644
--- a/src/gui/accessible/qaccessiblecache_p.h
+++ b/src/gui/accessible/qaccessiblecache_p.h
@@ -68,6 +68,7 @@ class Q_GUI_EXPORT QAccessibleCache :public QObject
Q_OBJECT
public:
+ ~QAccessibleCache() override;
static QAccessibleCache *instance();
QAccessibleInterface *interfaceForId(QAccessible::Id id) const;
QAccessible::Id idForInterface(QAccessibleInterface *iface) const;
diff --git a/src/gui/configure.json b/src/gui/configure.json
index 219385a108..506caf6794 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
@@ -44,7 +44,7 @@
"xcb": { "type": "enum", "values": [ "no", "yes", "qt", "system" ] },
"xcb-native-painting": "boolean",
"xcb-xlib": "boolean",
- "xinput2": "boolean",
+ "xcb-xinput": "boolean",
"xkb": "boolean",
"xkbcommon": { "type": "enum", "values": [ "no", "qt", "system" ] },
"xkbcommon-evdev": "boolean",
@@ -114,11 +114,16 @@
"drm": {
"label": "KMS",
"test": {
- "include": [ "stdlib.h", "stdint.h" ],
+ "head": [
+ "#include <stdlib.h>",
+ "#include <stdint.h>",
+ "extern \"C\" {"
+ ],
+ "include": [
+ "xf86drmMode.h",
+ "xf86drm.h"
+ ],
"tail": [
- "extern \"C\" {",
- "#include <xf86drmMode.h>",
- "#include <xf86drm.h>",
"}"
],
"main": "(void) drmModeGetCrtc(0, 0);"
@@ -146,8 +151,8 @@
"freetype": {
"label": "FreeType",
"test": {
- "head": [
- "#include <ft2build.h>",
+ "include": "ft2build.h",
+ "tail": [
"#include FT_FREETYPE_H",
"#if ((FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) < 20200)",
"# error This version of freetype is too old.",
@@ -165,8 +170,8 @@
"fontconfig": {
"label": "Fontconfig",
"test": {
- "head": [
- "#include <fontconfig/fontconfig.h>",
+ "include": "fontconfig/fontconfig.h",
+ "tail": [
"#ifndef FC_RGBA_UNKNOWN",
"# error This version of fontconfig is tool old, it is missing the FC_RGBA_UNKNOWN define",
"#endif"
@@ -184,10 +189,13 @@
"gbm": {
"label": "GBM",
"test": {
- "include": [ "stdlib.h", "stdint.h" ],
+ "head": [
+ "#include <stdlib.h>",
+ "#include <stdint.h>",
+ "extern \"C\" {"
+ ],
+ "include": "gbm.h",
"tail": [
- "extern \"C\" {",
- "#include <gbm.h>",
"}"
],
"main": "gbm_surface *surface = 0;"
@@ -252,7 +260,11 @@
"integrityhid": {
"label": "integrityhid",
"test": {
- "include": [ "stdlib.h", "stdint.h", "device/hiddriver.h" ],
+ "head": [
+ "#include <stdlib.h>",
+ "#include <stdint.h>"
+ ],
+ "include": "device/hiddriver.h",
"main": [
"HIDDriver *driver;",
"uintptr_t devicecontext;",
@@ -267,10 +279,13 @@
"libjpeg": {
"label": "libjpeg",
"test": {
- "include": [ "sys/types.h", "stdio.h" ],
+ "head": [
+ "#include <sys/types.h>",
+ "#include <stdio.h>",
+ "extern \"C\" {"
+ ],
+ "include": "jpeglib.h",
"tail": [
- "extern \"C\" {",
- "#include <jpeglib.h>",
"}",
"",
"j_compress_ptr cinfo;"
@@ -393,13 +408,15 @@
"v4l2": {
"label": "V4L2",
"test": {
+ "head": [
+ "#include <cstddef>",
+ "extern \"C\" {"
+ ],
"include": [
- "cstddef"
+ "mediactl/mediactl.h",
+ "mediactl/v4l2subdev.h"
],
"tail": [
- "extern \"C\" {",
- "#include <mediactl/mediactl.h>",
- "#include <mediactl/v4l2subdev.h>",
"}"
],
"main": [
@@ -439,18 +456,18 @@
]
},
"xcb": {
- "label": "XCB >= 1.5 (core)",
+ "label": "XCB >= 1.9 (core)",
"test": {
"include": "xcb/xcb.h",
"main": [
"int primaryScreen = 0;",
"(void)xcb_connect(\"\", &primaryScreen);",
- "// This won't compile unless libxcb >= 1.5 which defines XCB_ATOM_PRIMARY.",
- "int xcbAtomPrimary = XCB_ATOM_PRIMARY;"
+ "// This won't compile unless libxcb >= 1.9 which defines XCB_CONN_CLOSED_INVALID_SCREEN.",
+ "int xcbScreenError = XCB_CONN_CLOSED_INVALID_SCREEN;"
]
},
"sources": [
- { "type": "pkgConfig", "args": "xcb >= 1.5" },
+ { "type": "pkgConfig", "args": "xcb >= 1.9" },
"-lxcb"
]
},
@@ -566,33 +583,22 @@
"-lxcb-glx -lxcb"
]
},
- "xinput2": {
- "label": "Xinput2",
+ "xcb_xinput": {
+ "label": "XCB XInput",
"test": {
- "include": [ "X11/Xlib.h", "X11/extensions/XInput2.h", "X11/extensions/Xge.h" ],
- "tail": [
- "#ifndef XInput_2_0",
- "# error Missing XInput_2_0 #define",
- "#endif"
- ],
+ "include": [ "xcb/xcb.h", "xcb/xinput.h" ],
"main": [
- "// need XGenericEventCookie for XInput2 to work",
- "Display *dpy = 0;",
- "XEvent xevent;",
- "XIEvent *xievent = 0;",
- "XIDeviceEvent *xideviceevent = 0;",
- "XIHierarchyEvent *xihierarchyevent = 0;",
- "int deviceid = 0;",
- "int len = 0;",
- "(void) XGetEventData(dpy, &xevent.xcookie);",
- "XFreeEventData(dpy, &xevent.xcookie);",
- "(void) XIListProperties(dpy, deviceid, &len);"
- ],
- "qmake": "CONFIG += x11"
+ "int primaryScreen = 0;",
+ "xcb_connection_t *connection = xcb_connect(\"\", &primaryScreen);",
+ "xcb_generic_error_t *error = 0;",
+ "xcb_input_xi_query_version_cookie_t xinput_query_cookie = xcb_input_xi_query_version(",
+ " connection, XCB_INPUT_MAJOR_VERSION, XCB_INPUT_MINOR_VERSION);",
+ "xcb_input_xi_query_version_reply(connection, xinput_query_cookie, &error);"
+ ]
},
"sources": [
- { "type": "pkgConfig", "args": "xi" },
- "-lXi"
+ { "type": "pkgConfig", "args": "xcb-xinput >= 1.12 xcb" },
+ "-lxcb-xinput -lxcb"
]
},
"xkbcommon": {
@@ -661,6 +667,26 @@
"fxc.exe"
]
},
+ "drm_atomic": {
+ "label": "DRM Atomic API",
+ "type": "compile",
+ "test": {
+ "head": [
+ "#include <stdlib.h>",
+ "#include <stdint.h>",
+ "extern \"C\" {"
+ ],
+ "include": [
+ "xf86drmMode.h",
+ "xf86drm.h"
+ ],
+ "tail": [
+ "}"
+ ],
+ "main": "drmModeAtomicReq *request;"
+ },
+ "use": "drm"
+ },
"egl-x11": {
"label": "EGL on X11",
"type": "compile",
@@ -1010,6 +1036,11 @@
"condition": "libs.drm",
"output": [ "publicQtConfig", "privateFeature" ]
},
+ "drm_atomic": {
+ "label": "DRM Atomic API",
+ "condition": "libs.drm && tests.drm_atomic",
+ "output": [ "privateFeature" ]
+ },
"libinput": {
"label": "libinput",
"condition": "features.libudev && libs.libinput",
@@ -1327,10 +1358,10 @@
"condition": "features.sessionmanager && libs.x11sm",
"output": [ "privateFeature" ]
},
- "xinput2": {
- "label": "Xinput2",
+ "xcb-xinput": {
+ "label": "XCB XInput",
"emitIf": "features.xcb",
- "condition": "features.xcb-xlib && libs.xinput2",
+ "condition": "!features.system-xcb || libs.xcb_xinput",
"output": [ "privateFeature" ]
},
"xkbcommon-evdev": {
@@ -1701,7 +1732,7 @@ QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your pla
"section": "X11",
"condition": "features.xcb",
"entries": [
- "system-xcb", "egl_x11", "xinput2", "xkb", "xlib", "xcb-render", "xcb-glx", "xcb-xlib", "xkbcommon-system", "xcb-native-painting"
+ "system-xcb", "egl_x11", "xkb", "xlib", "xcb-render", "xcb-glx", "xcb-xinput", "xcb-xlib", "xkbcommon-system", "xcb-native-painting"
]
},
{
diff --git a/src/gui/configure.pri b/src/gui/configure.pri
index fcd2d1f73e..b40536e41d 100644
--- a/src/gui/configure.pri
+++ b/src/gui/configure.pri
@@ -7,7 +7,7 @@ defineTest(qtConfLibrary_freetype) {
for (p, TRY_INCLUDEPATHS) {
includedir = $$p/freetype2
exists($$includedir) {
- $${1}.includedir = "$$val_escape(includedir)"
+ $${1}.includedir = $$includedir
export($${1}.includedir)
return(true)
}
diff --git a/src/gui/doc/qtgui.qdocconf b/src/gui/doc/qtgui.qdocconf
index e1afa426ed..e546c817a7 100644
--- a/src/gui/doc/qtgui.qdocconf
+++ b/src/gui/doc/qtgui.qdocconf
@@ -60,3 +60,6 @@ manifestmeta.highlighted.names = "QtGui/Analog Clock Window Example"
navigation.landingpage = "Qt GUI"
navigation.cppclassespage = "Qt GUI C++ Classes"
+
+# Ignore warnings about undocumented enum values for the QGradient presets
+spurious += "Undocumented enum item '.*' in QGradient::Preset"
diff --git a/src/gui/image/image.pri b/src/gui/image/image.pri
index 76aba944b2..70fccbc378 100644
--- a/src/gui/image/image.pri
+++ b/src/gui/image/image.pri
@@ -9,6 +9,7 @@ HEADERS += \
image/qimage_p.h \
image/qimageiohandler.h \
image/qimagereader.h \
+ image/qimagereaderwriterhelpers_p.h \
image/qimagewriter.h \
image/qpaintengine_pic_p.h \
image/qpicture.h \
@@ -33,6 +34,7 @@ SOURCES += \
image/qimage_conversions.cpp \
image/qimageiohandler.cpp \
image/qimagereader.cpp \
+ image/qimagereaderwriterhelpers.cpp \
image/qimagewriter.cpp \
image/qpaintengine_pic.cpp \
image/qpicture.cpp \
@@ -80,10 +82,7 @@ qtConfig(png) {
}
# SIMD
-SSE2_SOURCES += image/qimage_sse2.cpp
SSSE3_SOURCES += image/qimage_ssse3.cpp
-SSE4_1_SOURCES += image/qimage_sse4.cpp
-AVX2_SOURCES += image/qimage_avx2.cpp
NEON_SOURCES += image/qimage_neon.cpp
MIPS_DSPR2_SOURCES += image/qimage_mips_dspr2.cpp
MIPS_DSPR2_ASM += image/qimage_mips_dspr2_asm.S
diff --git a/src/gui/image/qbitmap.cpp b/src/gui/image/qbitmap.cpp
index e8405a6d11..2453242fa8 100644
--- a/src/gui/image/qbitmap.cpp
+++ b/src/gui/image/qbitmap.cpp
@@ -189,9 +189,7 @@ QBitmap &QBitmap::operator=(const QPixmap &pixmap)
} else if (pixmap.depth() == 1) { // 1-bit pixmap
QPixmap::operator=(pixmap); // shallow assignment
} else { // n-bit depth pixmap
- QImage image;
- image = pixmap.toImage(); // convert pixmap to image
- *this = fromImage(image); // will dither image
+ *this = fromImage(pixmap.toImage()); // will dither image
}
return *this;
}
@@ -223,6 +221,24 @@ QBitmap::operator QVariant() const
return QVariant(QVariant::Bitmap, this);
}
+static QBitmap makeBitmap(QImage &&image, Qt::ImageConversionFlags flags)
+{
+ // make sure image.color(0) == Qt::color0 (white)
+ // and image.color(1) == Qt::color1 (black)
+ const QRgb c0 = QColor(Qt::black).rgb();
+ const QRgb c1 = QColor(Qt::white).rgb();
+ if (image.color(0) == c0 && image.color(1) == c1) {
+ image.invertPixels();
+ image.setColor(0, c1);
+ image.setColor(1, c0);
+ }
+
+ QScopedPointer<QPlatformPixmap> data(QGuiApplicationPrivate::platformIntegration()->createPlatformPixmap(QPlatformPixmap::BitmapType));
+
+ data->fromImageInPlace(image, flags | Qt::MonoOnly);
+ return QPixmap(data.take());
+}
+
/*!
Returns a copy of the given \a image converted to a bitmap using
the specified image conversion \a flags.
@@ -234,22 +250,24 @@ QBitmap QBitmap::fromImage(const QImage &image, Qt::ImageConversionFlags flags)
if (image.isNull())
return QBitmap();
- QImage img = image.convertToFormat(QImage::Format_MonoLSB, flags);
+ return makeBitmap(image.convertToFormat(QImage::Format_MonoLSB, flags), flags);
+}
- // make sure image.color(0) == Qt::color0 (white)
- // and image.color(1) == Qt::color1 (black)
- const QRgb c0 = QColor(Qt::black).rgb();
- const QRgb c1 = QColor(Qt::white).rgb();
- if (img.color(0) == c0 && img.color(1) == c1) {
- img.invertPixels();
- img.setColor(0, c1);
- img.setColor(1, c0);
- }
+/*!
+ \since 5.12
+ \overload
- QScopedPointer<QPlatformPixmap> data(QGuiApplicationPrivate::platformIntegration()->createPlatformPixmap(QPlatformPixmap::BitmapType));
+ Returns a copy of the given \a image converted to a bitmap using
+ the specified image conversion \a flags.
- data->fromImage(img, flags | Qt::MonoOnly);
- return QPixmap(data.take());
+ \sa fromData()
+*/
+QBitmap QBitmap::fromImage(QImage &&image, Qt::ImageConversionFlags flags)
+{
+ if (image.isNull())
+ return QBitmap();
+
+ return makeBitmap(std::move(image).convertToFormat(QImage::Format_MonoLSB, flags), flags);
}
/*!
@@ -277,7 +295,7 @@ QBitmap QBitmap::fromData(const QSize &size, const uchar *bits, QImage::Format m
int bytesPerLine = (size.width() + 7) / 8;
for (int y = 0; y < size.height(); ++y)
memcpy(image.scanLine(y), bits + bytesPerLine * y, bytesPerLine);
- return QBitmap::fromImage(image);
+ return QBitmap::fromImage(std::move(image));
}
/*!
diff --git a/src/gui/image/qbitmap.h b/src/gui/image/qbitmap.h
index 6a8c8b3457..188064fccf 100644
--- a/src/gui/image/qbitmap.h
+++ b/src/gui/image/qbitmap.h
@@ -72,6 +72,7 @@ public:
inline void clear() { fill(Qt::color0); }
static QBitmap fromImage(const QImage &image, Qt::ImageConversionFlags flags = Qt::AutoColor);
+ static QBitmap fromImage(QImage &&image, Qt::ImageConversionFlags flags = Qt::AutoColor);
static QBitmap fromData(const QSize &size, const uchar *bits,
QImage::Format monoFormat = QImage::Format_MonoLSB);
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 7fcae12cbd..85f0d2b251 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -2303,8 +2303,7 @@ QRgb QImage::pixel(int x, int y) const
}
const QPixelLayout *layout = &qPixelLayouts[d->format];
uint result;
- const uint *ptr = qFetchPixels[layout->bpp](&result, s, x, 1);
- return *layout->convertToARGB32PM(&result, ptr, 1, 0, 0);
+ return *layout->fetchToARGB32PM(&result, s, x, 1, nullptr, nullptr);
}
/*!
@@ -2405,9 +2404,7 @@ void QImage::setPixel(int x, int y, uint index_or_rgb)
}
const QPixelLayout *layout = &qPixelLayouts[d->format];
- uint result;
- const uint *ptr = layout->convertFromARGB32PM(&result, &index_or_rgb, 1, 0, 0);
- qStorePixels[layout->bpp](s, ptr, x, 1);
+ layout->storeFromARGB32PM(s, &index_or_rgb, x, 1, nullptr, nullptr);
}
/*!
@@ -2582,17 +2579,15 @@ bool QImage::allGray() const
break;
}
- const int buffer_size = 2048;
- uint buffer[buffer_size];
+ uint buffer[BufferSize];
const QPixelLayout *layout = &qPixelLayouts[d->format];
- FetchPixelsFunc fetch = qFetchPixels[layout->bpp];
+ const auto fetch = layout->fetchToARGB32PM;
for (int j = 0; j < d->height; ++j) {
const uchar *b = constScanLine(j);
int x = 0;
while (x < d->width) {
- int l = qMin(d->width - x, buffer_size);
- const uint *ptr = fetch(buffer, b, x, l);
- ptr = layout->convertToARGB32PM(buffer, ptr, l, 0, 0);
+ int l = qMin(d->width - x, BufferSize);
+ const uint *ptr = fetch(buffer, b, x, l, nullptr, nullptr);
for (int i = 0; i < l; ++i) {
if (!qIsGray(ptr[i]))
return false;
@@ -2780,6 +2775,13 @@ QMatrix QImage::trueMatrix(const QMatrix &matrix, int w, int h)
Returns a copy of the image that is transformed using the given
transformation \a matrix and transformation \a mode.
+ The returned image will normally have the same {Image Formats}{format} as
+ the original image. However, a complex transformation may result in an
+ image where not all pixels are covered by the transformed pixels of the
+ original image. In such cases, those background pixels will be assigned a
+ transparent color value, and the transformed image will be given a format
+ with an alpha channel, even if the orginal image did not have that.
+
The transformation \a matrix is internally adjusted to compensate
for unwanted translation; i.e. the image produced is the smallest
image that contains all the transformed points of the original
@@ -3210,33 +3212,18 @@ void QImage::mirrored_inplace(bool horizontal, bool vertical)
inline void rgbSwapped_generic(int width, int height, const QImage *src, QImage *dst, const QPixelLayout* layout)
{
- Q_ASSERT(layout->redWidth == layout->blueWidth);
- FetchPixelsFunc fetch = qFetchPixels[layout->bpp];
- StorePixelsFunc store = qStorePixels[layout->bpp];
-
- const uint redBlueMask = (1 << layout->redWidth) - 1;
- const uint alphaGreenMask = (((1 << layout->alphaWidth) - 1) << layout->alphaShift)
- | (((1 << layout->greenWidth) - 1) << layout->greenShift);
+ const RbSwapFunc func = layout->rbSwap;
+ if (!func) {
+ qWarning("Trying to rb-swap an image format where it doesn't make sense");
+ if (src != dst)
+ *dst = *src;
+ return;
+ }
- const int buffer_size = 2048;
- uint buffer[buffer_size];
for (int i = 0; i < height; ++i) {
uchar *q = dst->scanLine(i);
const uchar *p = src->constScanLine(i);
- int x = 0;
- while (x < width) {
- int l = qMin(width - x, buffer_size);
- const uint *ptr = fetch(buffer, p, x, l);
- for (int j = 0; j < l; ++j) {
- uint red = (ptr[j] >> layout->redShift) & redBlueMask;
- uint blue = (ptr[j] >> layout->blueShift) & redBlueMask;
- buffer[j] = (ptr[j] & alphaGreenMask)
- | (red << layout->blueShift)
- | (blue << layout->redShift);
- }
- store(q, buffer, x, l);
- x += l;
- }
+ func(q, p, width);
}
}
@@ -3321,23 +3308,6 @@ QImage QImage::rgbSwapped_helper() const
}
}
break;
- case Format_BGR30:
- case Format_A2BGR30_Premultiplied:
- case Format_RGB30:
- case Format_A2RGB30_Premultiplied:
- res = QImage(d->width, d->height, d->format);
- QIMAGE_SANITYCHECK_MEMORY(res);
- for (int i = 0; i < d->height; i++) {
- uint *q = (uint*)res.scanLine(i);
- const uint *p = (const uint*)constScanLine(i);
- const uint *end = p + d->width;
- while (p < end) {
- *q = qRgbSwapRgb30(*p);
- p++;
- q++;
- }
- }
- break;
default:
res = QImage(d->width, d->height, d->format);
rgbSwapped_generic(d->width, d->height, this, &res, &qPixelLayouts[d->format]);
@@ -3457,8 +3427,7 @@ void QImage::rgbSwapped_inplace()
bool QImage::load(const QString &fileName, const char* format)
{
- QImage image = QImageReader(fileName, format).read();
- operator=(image);
+ *this = QImageReader(fileName, format).read();
return !isNull();
}
@@ -3471,8 +3440,7 @@ bool QImage::load(const QString &fileName, const char* format)
bool QImage::load(QIODevice* device, const char* format)
{
- QImage image = QImageReader(device, format).read();
- operator=(image);
+ *this = QImageReader(device, format).read();
return !isNull();
}
@@ -3492,8 +3460,7 @@ bool QImage::load(QIODevice* device, const char* format)
bool QImage::loadFromData(const uchar *data, int len, const char *format)
{
- QImage image = fromData(data, len, format);
- operator=(image);
+ *this = fromData(data, len, format);
return !isNull();
}
@@ -4610,6 +4577,13 @@ static QImage rotated270(const QImage &image)
Returns a copy of the image that is transformed using the given
transformation \a matrix and transformation \a mode.
+ The returned image will normally have the same {Image Formats}{format} as
+ the original image. However, a complex transformation may result in an
+ image where not all pixels are covered by the transformed pixels of the
+ original image. In such cases, those background pixels will be assigned a
+ transparent color value, and the transformed image will be given a format
+ with an alpha channel, even if the orginal image did not have that.
+
The transformation \a matrix is internally adjusted to compensate
for unwanted translation; i.e. the image produced is the smallest
image that contains all the transformed points of the original
diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h
index 9b76b62f24..1f39569dda 100644
--- a/src/gui/image/qimage.h
+++ b/src/gui/image/qimage.h
@@ -96,6 +96,7 @@ typedef void (*QImageCleanupFunction)(void*);
class Q_GUI_EXPORT QImage : public QPaintDevice
{
+ Q_GADGET
public:
enum InvertMode { InvertRgb, InvertRgba };
enum Format {
@@ -132,6 +133,7 @@ public:
NImageFormats
#endif
};
+ Q_ENUM(Format)
QImage() Q_DECL_NOEXCEPT;
QImage(const QSize &size, Format format);
diff --git a/src/gui/image/qimage_conversions.cpp b/src/gui/image/qimage_conversions.cpp
index 1b4d3e63dd..519885b437 100644
--- a/src/gui/image/qimage_conversions.cpp
+++ b/src/gui/image/qimage_conversions.cpp
@@ -118,26 +118,35 @@ void qGamma_correct_back_to_linear_cs(QImage *image)
Internal routines for converting image depth.
*****************************************************************************/
-// The drawhelper conversions from/to RGB32 are passthroughs which is not always correct for general image conversion.
-static const uint *QT_FASTCALL convertRGB32FromARGB32PM(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+// The drawhelper conversions from/to RGB32 are passthroughs which is not always correct for general image conversion
+static void QT_FASTCALL storeRGB32FromARGB32PM(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
{
+ uint *d = reinterpret_cast<uint *>(dest) + index;
for (int i = 0; i < count; ++i)
- buffer[i] = 0xff000000 | qUnpremultiply(src[i]);
- return buffer;
+ d[i] = 0xff000000 | qUnpremultiply(src[i]);
+}
+
+static void QT_FASTCALL storeRGB32FromARGB32(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ uint *d = reinterpret_cast<uint *>(dest) + index;
+ for (int i = 0; i < count; ++i)
+ d[i] = 0xff000000 | src[i];
}
-static const uint *QT_FASTCALL maskRGB32(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+static const uint *QT_FASTCALL fetchRGB32ToARGB32PM(uint *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
{
+ const uint *s = reinterpret_cast<const uint *>(src) + index;
for (int i = 0; i < count; ++i)
- buffer[i] = 0xff000000 |src[i];
+ buffer[i] = 0xff000000 | s[i];
return buffer;
}
#ifdef QT_COMPILER_SUPPORTS_SSE4_1
-extern const uint *QT_FASTCALL convertRGB32FromARGB32PM_sse4(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *);
+extern void QT_FASTCALL storeRGB32FromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *);
#endif
void convert_generic(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags flags)
@@ -145,42 +154,39 @@ void convert_generic(QImageData *dest, const QImageData *src, Qt::ImageConversio
// Cannot be used with indexed formats.
Q_ASSERT(dest->format > QImage::Format_Indexed8);
Q_ASSERT(src->format > QImage::Format_Indexed8);
- const int buffer_size = 2048;
- uint buf[buffer_size];
+ uint buf[BufferSize];
uint *buffer = buf;
const QPixelLayout *srcLayout = &qPixelLayouts[src->format];
const QPixelLayout *destLayout = &qPixelLayouts[dest->format];
const uchar *srcData = src->data;
uchar *destData = dest->data;
- const FetchPixelsFunc fetch = qFetchPixels[srcLayout->bpp];
- const StorePixelsFunc store = qStorePixels[destLayout->bpp];
- ConvertFunc convertToARGB32PM = srcLayout->convertToARGB32PM;
- ConvertFunc convertFromARGB32PM = destLayout->convertFromARGB32PM;
- if (srcLayout->alphaWidth == 0 && destLayout->convertFromRGB32) {
- // If the source doesn't have an alpha channel, we can use the faster convertFromRGB32 method.
- convertFromARGB32PM = destLayout->convertFromRGB32;
+ FetchAndConvertPixelsFunc fetch = srcLayout->fetchToARGB32PM;
+ ConvertAndStorePixelsFunc store = destLayout->storeFromARGB32PM;
+ if (!srcLayout->hasAlphaChannel && destLayout->storeFromRGB32) {
+ // If the source doesn't have an alpha channel, we can use the faster storeFromRGB32 method.
+ store = destLayout->storeFromRGB32;
} else {
// The drawhelpers do not mask the alpha value in RGB32, we want to here.
if (src->format == QImage::Format_RGB32)
- convertToARGB32PM = maskRGB32;
+ fetch = fetchRGB32ToARGB32PM;
if (dest->format == QImage::Format_RGB32) {
#ifdef QT_COMPILER_SUPPORTS_SSE4_1
if (qCpuHasFeature(SSE4_1))
- convertFromARGB32PM = convertRGB32FromARGB32PM_sse4;
+ store = storeRGB32FromARGB32PM_sse4;
else
#endif
- convertFromARGB32PM = convertRGB32FromARGB32PM;
+ store = storeRGB32FromARGB32PM;
}
}
if ((src->format == QImage::Format_ARGB32 || src->format == QImage::Format_RGBA8888) &&
- destLayout->alphaWidth == 0 && destLayout->convertFromRGB32) {
+ !destLayout->hasAlphaChannel && destLayout->storeFromRGB32) {
// Avoid unnecessary premultiply and unpremultiply when converting from unpremultiplied src format.
- convertToARGB32PM = qPixelLayouts[src->format + 1].convertToARGB32PM;
+ fetch = qPixelLayouts[src->format + 1].fetchToARGB32PM;
if (dest->format == QImage::Format_RGB32)
- convertFromARGB32PM = maskRGB32;
+ store = storeRGB32FromARGB32;
else
- convertFromARGB32PM = destLayout->convertFromRGB32;
+ store = destLayout->storeFromRGB32;
}
QDitherInfo dither;
QDitherInfo *ditherPtr = 0;
@@ -196,12 +202,9 @@ void convert_generic(QImageData *dest, const QImageData *src, Qt::ImageConversio
if (destLayout->bpp == QPixelLayout::BPP32)
buffer = reinterpret_cast<uint *>(destData) + x;
else
- l = qMin(l, buffer_size);
- const uint *ptr = fetch(buffer, srcData, x, l);
- ptr = convertToARGB32PM(buffer, ptr, l, 0, ditherPtr);
- ptr = convertFromARGB32PM(buffer, ptr, l, 0, ditherPtr);
- if (ptr != reinterpret_cast<uint *>(destData))
- store(destData, ptr, x, l);
+ l = qMin(l, BufferSize);
+ const uint *ptr = fetch(buffer, srcData, x, l, 0, ditherPtr);
+ store(destData, ptr, x, l, 0, ditherPtr);
x += l;
}
srcData += src->bytes_per_line;
@@ -217,39 +220,37 @@ bool convert_generic_inplace(QImageData *data, QImage::Format dst_format, Qt::Im
if (data->depth != qt_depthForFormat(dst_format))
return false;
- const int buffer_size = 2048;
- uint buffer[buffer_size];
+ uint buf[BufferSize];
+ uint *buffer = buf;
const QPixelLayout *srcLayout = &qPixelLayouts[data->format];
const QPixelLayout *destLayout = &qPixelLayouts[dst_format];
uchar *srcData = data->data;
- const FetchPixelsFunc fetch = qFetchPixels[srcLayout->bpp];
- const StorePixelsFunc store = qStorePixels[destLayout->bpp];
- ConvertFunc convertToARGB32PM = srcLayout->convertToARGB32PM;
- ConvertFunc convertFromARGB32PM = destLayout->convertFromARGB32PM;
- if (srcLayout->alphaWidth == 0 && destLayout->convertFromRGB32) {
- // If the source doesn't have an alpha channel, we can use the faster convertFromRGB32 method.
- convertFromARGB32PM = destLayout->convertFromRGB32;
+ FetchAndConvertPixelsFunc fetch = srcLayout->fetchToARGB32PM;
+ ConvertAndStorePixelsFunc store = destLayout->storeFromARGB32PM;
+ if (!srcLayout->hasAlphaChannel && destLayout->storeFromRGB32) {
+ // If the source doesn't have an alpha channel, we can use the faster storeFromRGB32 method.
+ store = destLayout->storeFromRGB32;
} else {
if (data->format == QImage::Format_RGB32)
- convertToARGB32PM = maskRGB32;
+ fetch = fetchRGB32ToARGB32PM;
if (dst_format == QImage::Format_RGB32) {
#ifdef QT_COMPILER_SUPPORTS_SSE4_1
if (qCpuHasFeature(SSE4_1))
- convertFromARGB32PM = convertRGB32FromARGB32PM_sse4;
+ store = storeRGB32FromARGB32PM_sse4;
else
#endif
- convertFromARGB32PM = convertRGB32FromARGB32PM;
+ store = storeRGB32FromARGB32PM;
}
}
if ((data->format == QImage::Format_ARGB32 || data->format == QImage::Format_RGBA8888) &&
- destLayout->alphaWidth == 0 && destLayout->convertFromRGB32) {
+ !destLayout->hasAlphaChannel && destLayout->storeFromRGB32) {
// Avoid unnecessary premultiply and unpremultiply when converting from unpremultiplied src format.
- convertToARGB32PM = qPixelLayouts[data->format + 1].convertToARGB32PM;
- if (dst_format == QImage::Format_RGB32)
- convertFromARGB32PM = maskRGB32;
+ fetch = qPixelLayouts[data->format + 1].fetchToARGB32PM;
+ if (data->format == QImage::Format_RGB32)
+ store = storeRGB32FromARGB32;
else
- convertFromARGB32PM = destLayout->convertFromRGB32;
+ store = destLayout->storeFromRGB32;
}
QDitherInfo dither;
QDitherInfo *ditherPtr = 0;
@@ -261,13 +262,13 @@ bool convert_generic_inplace(QImageData *data, QImage::Format dst_format, Qt::Im
int x = 0;
while (x < data->width) {
dither.x = x;
- int l = qMin(data->width - x, buffer_size);
- const uint *ptr = fetch(buffer, srcData, x, l);
- ptr = convertToARGB32PM(buffer, ptr, l, 0, ditherPtr);
- ptr = convertFromARGB32PM(buffer, ptr, l, 0, ditherPtr);
- // The conversions might be passthrough and not use the buffer, in that case we are already done.
- if (srcData != (const uchar*)ptr)
- store(srcData, ptr, x, l);
+ int l = data->width - x;
+ if (destLayout->bpp == QPixelLayout::BPP32)
+ buffer = reinterpret_cast<uint *>(srcData) + x;
+ else
+ l = qMin(l, BufferSize);
+ const uint *ptr = fetch(buffer, srcData, x, l, nullptr, ditherPtr);
+ store(srcData, ptr, x, l, nullptr, ditherPtr);
x += l;
}
srcData += data->bytes_per_line;
@@ -305,30 +306,6 @@ static bool convert_passthrough_inplace(QImageData *data, Qt::ImageConversionFla
return true;
}
-static void convert_ARGB_to_ARGB_PM(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
-{
- Q_ASSERT(src->format == QImage::Format_ARGB32 || src->format == QImage::Format_RGBA8888);
- Q_ASSERT(dest->format == QImage::Format_ARGB32_Premultiplied || dest->format == QImage::Format_RGBA8888_Premultiplied);
- Q_ASSERT(src->width == dest->width);
- Q_ASSERT(src->height == dest->height);
-
- const int src_pad = (src->bytes_per_line >> 2) - src->width;
- const int dest_pad = (dest->bytes_per_line >> 2) - dest->width;
- const QRgb *src_data = (QRgb *) src->data;
- QRgb *dest_data = (QRgb *) dest->data;
-
- for (int i = 0; i < src->height; ++i) {
- const QRgb *end = src_data + src->width;
- while (src_data < end) {
- *dest_data = qPremultiply(*src_data);
- ++src_data;
- ++dest_data;
- }
- src_data += src_pad;
- dest_data += dest_pad;
- }
-}
-
Q_GUI_EXPORT void QT_FASTCALL qt_convert_rgb888_to_rgb32(quint32 *dest_data, const uchar *src_data, int len)
{
int pixel = 0;
@@ -431,33 +408,6 @@ static void convert_RGB888_to_RGB(QImageData *dest, const QImageData *src, Qt::I
}
}
-#ifdef __SSE2__
-extern bool convert_ARGB_to_ARGB_PM_inplace_sse2(QImageData *data, Qt::ImageConversionFlags);
-#else
-static bool convert_ARGB_to_ARGB_PM_inplace(QImageData *data,Qt::ImageConversionFlags)
-{
- Q_ASSERT(data->format == QImage::Format_ARGB32 || data->format == QImage::Format_RGBA8888);
-
- const int pad = (data->bytes_per_line >> 2) - data->width;
- QRgb *rgb_data = (QRgb *) data->data;
-
- for (int i = 0; i < data->height; ++i) {
- const QRgb *end = rgb_data + data->width;
- while (rgb_data < end) {
- *rgb_data = qPremultiply(*rgb_data);
- ++rgb_data;
- }
- rgb_data += pad;
- }
-
- if (data->format == QImage::Format_ARGB32)
- data->format = QImage::Format_ARGB32_Premultiplied;
- else
- data->format = QImage::Format_RGBA8888_Premultiplied;
- return true;
-}
-#endif
-
static void convert_ARGB_to_RGBx(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
{
Q_ASSERT(src->format == QImage::Format_ARGB32);
@@ -2135,7 +2085,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
convert_ARGB_to_Indexed8,
mask_alpha_converter,
0,
- convert_ARGB_to_ARGB_PM,
+ 0,
0,
0,
0,
@@ -2419,13 +2369,8 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
mask_alpha_converter_RGBx,
-#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
- 0,
- convert_ARGB_to_ARGB_PM,
-#else
0,
0,
-#endif
0, 0, 0, 0, 0, 0
}, // Format_RGBA8888
@@ -2664,11 +2609,7 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
0,
mask_alpha_converter_inplace<QImage::Format_RGB32>,
0,
-#ifdef __SSE2__
- convert_ARGB_to_ARGB_PM_inplace_sse2,
-#else
- convert_ARGB_to_ARGB_PM_inplace,
-#endif
+ 0,
0,
0,
0,
@@ -2781,13 +2722,7 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
0,
mask_alpha_converter_rgbx_inplace,
0,
-#ifdef __SSE2__
- convert_ARGB_to_ARGB_PM_inplace_sse2,
-#elif Q_BYTE_ORDER == Q_LITTLE_ENDIAN
- convert_ARGB_to_ARGB_PM_inplace,
-#else
0,
-#endif
0, 0, 0, 0, 0, 0
}, // Format_RGBA8888
{
@@ -2981,22 +2916,6 @@ static void qInitImageConversions()
}
#endif
-#if defined(QT_COMPILER_SUPPORTS_SSE4_1) && !defined(__SSE4_1__)
- if (qCpuHasFeature(SSE4_1)) {
- extern void convert_ARGB_to_ARGB_PM_sse4(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags);
- qimage_converter_map[QImage::Format_ARGB32][QImage::Format_ARGB32_Premultiplied] = convert_ARGB_to_ARGB_PM_sse4;
- qimage_converter_map[QImage::Format_RGBA8888][QImage::Format_RGBA8888_Premultiplied] = convert_ARGB_to_ARGB_PM_sse4;
- }
-#endif
-
-#if defined(QT_COMPILER_SUPPORTS_AVX2) && !defined(__AVX2__)
- if (qCpuHasFeature(AVX2)) {
- extern void convert_ARGB_to_ARGB_PM_avx2(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags);
- qimage_converter_map[QImage::Format_ARGB32][QImage::Format_ARGB32_Premultiplied] = convert_ARGB_to_ARGB_PM_avx2;
- qimage_converter_map[QImage::Format_RGBA8888][QImage::Format_RGBA8888_Premultiplied] = convert_ARGB_to_ARGB_PM_avx2;
- }
-#endif
-
#if defined(__ARM_NEON__)
extern void convert_RGB888_to_RGB32_neon(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags);
qimage_converter_map[QImage::Format_RGB888][QImage::Format_RGB32] = convert_RGB888_to_RGB32_neon;
diff --git a/src/gui/image/qimage_sse2.cpp b/src/gui/image/qimage_sse2.cpp
deleted file mode 100644
index 8f7195e0b5..0000000000
--- a/src/gui/image/qimage_sse2.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** 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 The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qimage.h"
-#include <private/qimage_p.h>
-#include <private/qsimd_p.h>
-#include <private/qdrawhelper_p.h>
-#include <private/qdrawingprimitive_sse2_p.h>
-
-#ifdef QT_COMPILER_SUPPORTS_SSE2
-
-QT_BEGIN_NAMESPACE
-
-bool convert_ARGB_to_ARGB_PM_inplace_sse2(QImageData *data, Qt::ImageConversionFlags)
-{
- Q_ASSERT(data->format == QImage::Format_ARGB32 || data->format == QImage::Format_RGBA8888);
-
- const int width = data->width;
- const int height = data->height;
- const int bpl = data->bytes_per_line;
-
- const __m128i alphaMask = _mm_set1_epi32(0xff000000);
- const __m128i nullVector = _mm_setzero_si128();
- const __m128i half = _mm_set1_epi16(0x80);
- const __m128i colorMask = _mm_set1_epi32(0x00ff00ff);
-
- uchar *d = data->data;
- for (int y = 0; y < height; ++y) {
- int i = 0;
- quint32 *d32 = reinterpret_cast<quint32 *>(d);
- ALIGNMENT_PROLOGUE_16BYTES(d, i, width) {
- const quint32 p = d32[i];
- if (p <= 0x00ffffff)
- d32[i] = 0;
- else if (p < 0xff000000)
- d32[i] = qPremultiply(p);
- }
- __m128i *d128 = reinterpret_cast<__m128i *>(d32 + i);
- for (; i < (width - 3); i += 4) {
- const __m128i srcVector = _mm_load_si128(d128);
-#ifdef __SSE4_1__
- if (_mm_testc_si128(srcVector, alphaMask)) {
- // opaque, data is unchanged
- } else if (_mm_testz_si128(srcVector, alphaMask)) {
- // fully transparent
- _mm_store_si128(d128, nullVector);
- } else {
- const __m128i srcVectorAlpha = _mm_and_si128(srcVector, alphaMask);
-#else
- const __m128i srcVectorAlpha = _mm_and_si128(srcVector, alphaMask);
- if (_mm_movemask_epi8(_mm_cmpeq_epi32(srcVectorAlpha, alphaMask)) == 0xffff) {
- // opaque, data is unchanged
- } else if (_mm_movemask_epi8(_mm_cmpeq_epi32(srcVectorAlpha, nullVector)) == 0xffff) {
- // fully transparent
- _mm_store_si128(d128, nullVector);
- } else {
-#endif
- __m128i alphaChannel = _mm_srli_epi32(srcVector, 24);
- alphaChannel = _mm_or_si128(alphaChannel, _mm_slli_epi32(alphaChannel, 16));
-
- __m128i result;
- BYTE_MUL_SSE2(result, srcVector, alphaChannel, colorMask, half);
- result = _mm_or_si128(_mm_andnot_si128(alphaMask, result), srcVectorAlpha);
- _mm_store_si128(d128, result);
- }
- d128++;
- }
-
- SIMD_EPILOGUE(i, width, 3) {
- const quint32 p = d32[i];
- if (p <= 0x00ffffff)
- d32[i] = 0;
- else if (p < 0xff000000)
- d32[i] = qPremultiply(p);
- }
-
- d += bpl;
- }
-
- if (data->format == QImage::Format_ARGB32)
- data->format = QImage::Format_ARGB32_Premultiplied;
- else
- data->format = QImage::Format_RGBA8888_Premultiplied;
- return true;
-}
-
-QT_END_NAMESPACE
-
-#endif // QT_COMPILER_SUPPORTS_SSE2
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index 7086e102ea..6d358984d6 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -164,73 +164,13 @@
#include <private/qpnghandler_p.h>
#endif
+#include <private/qimagereaderwriterhelpers_p.h>
+
#include <algorithm>
QT_BEGIN_NAMESPACE
-#ifndef QT_NO_IMAGEFORMATPLUGIN
-Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
- (QImageIOHandlerFactoryInterface_iid, QLatin1String("/imageformats")))
-#endif
-
-enum _qt_BuiltInFormatType {
-#ifndef QT_NO_IMAGEFORMAT_PNG
- _qt_PngFormat,
-#endif
-#ifndef QT_NO_IMAGEFORMAT_BMP
- _qt_BmpFormat,
-#endif
-#ifndef QT_NO_IMAGEFORMAT_PPM
- _qt_PpmFormat,
- _qt_PgmFormat,
- _qt_PbmFormat,
-#endif
-#ifndef QT_NO_IMAGEFORMAT_XBM
- _qt_XbmFormat,
-#endif
-#ifndef QT_NO_IMAGEFORMAT_XPM
- _qt_XpmFormat,
-#endif
- _qt_NumFormats,
- _qt_NoFormat = -1
-};
-
-#if !defined(QT_NO_IMAGEFORMAT_PPM)
-# define MAX_MT_SIZE 20
-#elif !defined(QT_NO_IMAGEFORMAT_XBM) || !defined(QT_NO_IMAGEFORMAT_XPM)
-# define MAX_MT_SIZE 10
-#else
-# define MAX_MT_SIZE 4
-#endif
-
-struct _qt_BuiltInFormatStruct
-{
- char extension[4];
- char mimeType[MAX_MT_SIZE];
-};
-
-#undef MAX_MT_SIZE
-
-static const _qt_BuiltInFormatStruct _qt_BuiltInFormats[] = {
-#ifndef QT_NO_IMAGEFORMAT_PNG
- {"png", "png"},
-#endif
-#ifndef QT_NO_IMAGEFORMAT_BMP
- {"bmp", "bmp"},
-#endif
-#ifndef QT_NO_IMAGEFORMAT_PPM
- {"ppm", "x-portable-pixmap"},
- {"pgm", "x-portable-graymap"},
- {"pbm", "x-portable-bitmap"},
-#endif
-#ifndef QT_NO_IMAGEFORMAT_XBM
- {"xbm", "x-xbitmap"},
-#endif
-#ifndef QT_NO_IMAGEFORMAT_XPM
- {"xpm", "x-xpixmap"},
-#endif
-};
-Q_STATIC_ASSERT(_qt_NumFormats == sizeof _qt_BuiltInFormats / sizeof *_qt_BuiltInFormats);
+using namespace QImageReaderWriterHelpers;
static QImageIOHandler *createReadHandlerHelper(QIODevice *device,
const QByteArray &format,
@@ -251,7 +191,7 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device,
typedef QMultiMap<int, QString> PluginKeyMap;
// check if we have plugins that support the image format
- QFactoryLoader *l = loader();
+ auto l = QImageReaderWriterHelpers::pluginLoader();
const PluginKeyMap keyMap = l->keyMap();
#ifdef QIMAGEREADER_DEBUG
@@ -1565,16 +1505,6 @@ QByteArray QImageReader::imageFormat(QIODevice *device)
return format;
}
-#ifndef QT_NO_IMAGEFORMATPLUGIN
-void supportedImageHandlerFormats(QFactoryLoader *loader,
- QImageIOPlugin::Capability cap,
- QList<QByteArray> *result);
-
-void supportedImageHandlerMimeTypes(QFactoryLoader *loader,
- QImageIOPlugin::Capability cap,
- QList<QByteArray> *result);
-#endif
-
/*!
Returns the list of image formats supported by QImageReader.
@@ -1605,18 +1535,7 @@ void supportedImageHandlerMimeTypes(QFactoryLoader *loader,
QList<QByteArray> QImageReader::supportedImageFormats()
{
- QList<QByteArray> formats;
- formats.reserve(_qt_NumFormats);
- for (int i = 0; i < _qt_NumFormats; ++i)
- formats << _qt_BuiltInFormats[i].extension;
-
-#ifndef QT_NO_IMAGEFORMATPLUGIN
- supportedImageHandlerFormats(loader(), QImageIOPlugin::CanRead, &formats);
-#endif // QT_NO_IMAGEFORMATPLUGIN
-
- std::sort(formats.begin(), formats.end());
- formats.erase(std::unique(formats.begin(), formats.end()), formats.end());
- return formats;
+ return QImageReaderWriterHelpers::supportedImageFormats(QImageReaderWriterHelpers::CanRead);
}
/*!
@@ -1630,18 +1549,24 @@ QList<QByteArray> QImageReader::supportedImageFormats()
QList<QByteArray> QImageReader::supportedMimeTypes()
{
- QList<QByteArray> mimeTypes;
- mimeTypes.reserve(_qt_NumFormats);
- for (const auto &fmt : _qt_BuiltInFormats)
- mimeTypes.append(QByteArrayLiteral("image/") + fmt.mimeType);
+ return QImageReaderWriterHelpers::supportedMimeTypes(QImageReaderWriterHelpers::CanRead);
+}
-#ifndef QT_NO_IMAGEFORMATPLUGIN
- supportedImageHandlerMimeTypes(loader(), QImageIOPlugin::CanRead, &mimeTypes);
-#endif // QT_NO_IMAGEFORMATPLUGIN
+/*!
+ \since 5.12
- std::sort(mimeTypes.begin(), mimeTypes.end());
- mimeTypes.erase(std::unique(mimeTypes.begin(), mimeTypes.end()), mimeTypes.end());
- return mimeTypes;
+ Returns the list of image formats corresponding to \a mimeType.
+
+ Note that the QGuiApplication instance must be created before this function is
+ called.
+
+ \sa supportedImageFormats(), supportedMimeTypes()
+*/
+
+QList<QByteArray> QImageReader::imageFormatsForMimeType(const QByteArray &mimeType)
+{
+ return QImageReaderWriterHelpers::imageFormatsForMimeType(mimeType,
+ QImageReaderWriterHelpers::CanRead);
}
QT_END_NAMESPACE
diff --git a/src/gui/image/qimagereader.h b/src/gui/image/qimagereader.h
index 9d6c1e0b1e..4e9a08b6e6 100644
--- a/src/gui/image/qimagereader.h
+++ b/src/gui/image/qimagereader.h
@@ -144,6 +144,7 @@ public:
static QByteArray imageFormat(QIODevice *device);
static QList<QByteArray> supportedImageFormats();
static QList<QByteArray> supportedMimeTypes();
+ static QList<QByteArray> imageFormatsForMimeType(const QByteArray &mimeType);
private:
Q_DISABLE_COPY(QImageReader)
diff --git a/src/gui/image/qimagereaderwriterhelpers.cpp b/src/gui/image/qimagereaderwriterhelpers.cpp
new file mode 100644
index 0000000000..a5b7fb6449
--- /dev/null
+++ b/src/gui/image/qimagereaderwriterhelpers.cpp
@@ -0,0 +1,180 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "private/qimagereaderwriterhelpers_p.h"
+
+#include <qjsonarray.h>
+#include <qmutex.h>
+#include <private/qfactoryloader_p.h>
+
+QT_BEGIN_NAMESPACE
+
+namespace QImageReaderWriterHelpers {
+
+#ifndef QT_NO_IMAGEFORMATPLUGIN
+
+Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
+ (QImageIOHandlerFactoryInterface_iid, QLatin1String("/imageformats")))
+Q_GLOBAL_STATIC(QMutex, loaderMutex)
+
+static void appendImagePluginFormats(QFactoryLoader *loader,
+ QImageIOPlugin::Capability cap,
+ QList<QByteArray> *result)
+{
+ typedef QMultiMap<int, QString> PluginKeyMap;
+ typedef PluginKeyMap::const_iterator PluginKeyMapConstIterator;
+
+ const PluginKeyMap keyMap = loader->keyMap();
+ const PluginKeyMapConstIterator cend = keyMap.constEnd();
+ int i = -1;
+ QImageIOPlugin *plugin = 0;
+ result->reserve(result->size() + keyMap.size());
+ for (PluginKeyMapConstIterator it = keyMap.constBegin(); it != cend; ++it) {
+ if (it.key() != i) {
+ i = it.key();
+ plugin = qobject_cast<QImageIOPlugin *>(loader->instance(i));
+ }
+ const QByteArray key = it.value().toLatin1();
+ if (plugin && (plugin->capabilities(0, key) & cap) != 0)
+ result->append(key);
+ }
+}
+
+static void appendImagePluginMimeTypes(QFactoryLoader *loader,
+ QImageIOPlugin::Capability cap,
+ QList<QByteArray> *result,
+ QList<QByteArray> *resultKeys = nullptr)
+{
+ QList<QJsonObject> metaDataList = loader->metaData();
+
+ const int pluginCount = metaDataList.size();
+ for (int i = 0; i < pluginCount; ++i) {
+ const QJsonObject metaData = metaDataList.at(i).value(QLatin1String("MetaData")).toObject();
+ const QJsonArray keys = metaData.value(QLatin1String("Keys")).toArray();
+ const QJsonArray mimeTypes = metaData.value(QLatin1String("MimeTypes")).toArray();
+ QImageIOPlugin *plugin = qobject_cast<QImageIOPlugin *>(loader->instance(i));
+ const int keyCount = keys.size();
+ for (int k = 0; k < keyCount; ++k) {
+ const QByteArray key = keys.at(k).toString().toLatin1();
+ if (plugin && (plugin->capabilities(0, key) & cap) != 0) {
+ result->append(mimeTypes.at(k).toString().toLatin1());
+ if (resultKeys)
+ resultKeys->append(key);
+ }
+ }
+ }
+}
+
+QSharedPointer<QFactoryLoader> pluginLoader()
+{
+ loaderMutex()->lock();
+ return QSharedPointer<QFactoryLoader>(loader(), [](QFactoryLoader *) {
+ loaderMutex()->unlock();
+ });
+}
+
+static inline QImageIOPlugin::Capability pluginCapability(Capability cap)
+{
+ return cap == CanRead ? QImageIOPlugin::CanRead : QImageIOPlugin::CanWrite;
+}
+
+#endif // QT_NO_IMAGEFORMATPLUGIN
+
+QList<QByteArray> supportedImageFormats(Capability cap)
+{
+ QList<QByteArray> formats;
+ formats.reserve(_qt_NumFormats);
+ for (int i = 0; i < _qt_NumFormats; ++i)
+ formats << _qt_BuiltInFormats[i].extension;
+
+#ifndef QT_NO_IMAGEFORMATPLUGIN
+ appendImagePluginFormats(loader(), pluginCapability(cap), &formats);
+#endif // QT_NO_IMAGEFORMATPLUGIN
+
+ std::sort(formats.begin(), formats.end());
+ formats.erase(std::unique(formats.begin(), formats.end()), formats.end());
+ return formats;
+}
+
+QList<QByteArray> supportedMimeTypes(Capability cap)
+{
+ QList<QByteArray> mimeTypes;
+ mimeTypes.reserve(_qt_NumFormats);
+ for (const auto &fmt : _qt_BuiltInFormats)
+ mimeTypes.append(QByteArrayLiteral("image/") + fmt.mimeType);
+
+#ifndef QT_NO_IMAGEFORMATPLUGIN
+ appendImagePluginMimeTypes(loader(), pluginCapability(cap), &mimeTypes);
+#endif // QT_NO_IMAGEFORMATPLUGIN
+
+ std::sort(mimeTypes.begin(), mimeTypes.end());
+ mimeTypes.erase(std::unique(mimeTypes.begin(), mimeTypes.end()), mimeTypes.end());
+ return mimeTypes;
+}
+
+QList<QByteArray> imageFormatsForMimeType(const QByteArray &mimeType, Capability cap)
+{
+ QList<QByteArray> formats;
+ if (mimeType.startsWith("image/")) {
+ const QByteArray type = mimeType.mid(sizeof("image/") - 1);
+ for (const auto &fmt : _qt_BuiltInFormats) {
+ if (fmt.mimeType == type && !formats.contains(fmt.extension))
+ formats << fmt.extension;
+ }
+ }
+
+#ifndef QT_NO_IMAGEFORMATPLUGIN
+ QList<QByteArray> mimeTypes;
+ QList<QByteArray> keys;
+ appendImagePluginMimeTypes(loader(), pluginCapability(cap), &mimeTypes, &keys);
+ for (int i = 0; i < mimeTypes.size(); ++i) {
+ if (mimeTypes.at(i) == mimeType) {
+ const auto &key = keys.at(i);
+ if (!formats.contains(key))
+ formats << key;
+ }
+ }
+#endif // QT_NO_IMAGEFORMATPLUGIN
+
+ return formats;
+}
+
+} // QImageReaderWriterHelpers
+
+QT_END_NAMESPACE
diff --git a/src/gui/image/qimagereaderwriterhelpers_p.h b/src/gui/image/qimagereaderwriterhelpers_p.h
new file mode 100644
index 0000000000..6fe418a8ab
--- /dev/null
+++ b/src/gui/image/qimagereaderwriterhelpers_p.h
@@ -0,0 +1,139 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QIMAGEREADERWRITERHELPERS_P_H
+#define QIMAGEREADERWRITERHELPERS_P_H
+
+#include <QtGui/private/qtguiglobal_p.h>
+#include <qsharedpointer.h>
+#include "qimageiohandler.h"
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+QT_BEGIN_NAMESPACE
+
+class QFactoryLoader;
+
+namespace QImageReaderWriterHelpers {
+
+enum _qt_BuiltInFormatType {
+#ifndef QT_NO_IMAGEFORMAT_PNG
+ _qt_PngFormat,
+#endif
+#ifndef QT_NO_IMAGEFORMAT_BMP
+ _qt_BmpFormat,
+#endif
+#ifndef QT_NO_IMAGEFORMAT_PPM
+ _qt_PpmFormat,
+ _qt_PgmFormat,
+ _qt_PbmFormat,
+#endif
+#ifndef QT_NO_IMAGEFORMAT_XBM
+ _qt_XbmFormat,
+#endif
+#ifndef QT_NO_IMAGEFORMAT_XPM
+ _qt_XpmFormat,
+#endif
+ _qt_NumFormats,
+ _qt_NoFormat = -1
+};
+
+#if !defined(QT_NO_IMAGEFORMAT_PPM)
+# define MAX_MT_SIZE 20
+#elif !defined(QT_NO_IMAGEFORMAT_XBM) || !defined(QT_NO_IMAGEFORMAT_XPM)
+# define MAX_MT_SIZE 10
+#else
+# define MAX_MT_SIZE 4
+#endif
+
+struct _qt_BuiltInFormatStruct
+{
+ char extension[4];
+ char mimeType[MAX_MT_SIZE];
+};
+
+#undef MAX_MT_SIZE
+
+static const _qt_BuiltInFormatStruct _qt_BuiltInFormats[] = {
+#ifndef QT_NO_IMAGEFORMAT_PNG
+ {"png", "png"},
+#endif
+#ifndef QT_NO_IMAGEFORMAT_BMP
+ {"bmp", "bmp"},
+#endif
+#ifndef QT_NO_IMAGEFORMAT_PPM
+ {"ppm", "x-portable-pixmap"},
+ {"pgm", "x-portable-graymap"},
+ {"pbm", "x-portable-bitmap"},
+#endif
+#ifndef QT_NO_IMAGEFORMAT_XBM
+ {"xbm", "x-xbitmap"},
+#endif
+#ifndef QT_NO_IMAGEFORMAT_XPM
+ {"xpm", "x-xpixmap"},
+#endif
+};
+Q_STATIC_ASSERT(_qt_NumFormats == sizeof _qt_BuiltInFormats / sizeof *_qt_BuiltInFormats);
+
+#ifndef QT_NO_IMAGEFORMATPLUGIN
+QSharedPointer<QFactoryLoader> pluginLoader();
+#endif
+
+enum Capability {
+ CanRead,
+ CanWrite
+};
+QList<QByteArray> supportedImageFormats(Capability cap);
+QList<QByteArray> supportedMimeTypes(Capability cap);
+QList<QByteArray> imageFormatsForMimeType(const QByteArray &mimeType, Capability cap);
+
+}
+
+QT_END_NAMESPACE
+
+#endif // QIMAGEREADERWRITERHELPERS_P_H
diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp
index a39d204677..62eeb74727 100644
--- a/src/gui/image/qimagewriter.cpp
+++ b/src/gui/image/qimagewriter.cpp
@@ -102,7 +102,6 @@
#include <qfileinfo.h>
#include <qimage.h>
#include <qimageiohandler.h>
-#include <qjsonarray.h>
#include <qset.h>
#include <qvariant.h>
@@ -119,15 +118,12 @@
#include <private/qpnghandler_p.h>
#endif
+#include <private/qimagereaderwriterhelpers_p.h>
+
#include <algorithm>
QT_BEGIN_NAMESPACE
-#ifndef QT_NO_IMAGEFORMATPLUGIN
-Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
- (QImageIOHandlerFactoryInterface_iid, QLatin1String("/imageformats")))
-#endif
-
static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
const QByteArray &format)
{
@@ -139,7 +135,7 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
typedef QMultiMap<int, QString> PluginKeyMap;
// check if any plugins can write the image
- QFactoryLoader *l = loader();
+ auto l = QImageReaderWriterHelpers::pluginLoader();
const PluginKeyMap keyMap = l->keyMap();
int suffixPluginIndex = -1;
#endif
@@ -824,52 +820,6 @@ bool QImageWriter::supportsOption(QImageIOHandler::ImageOption option) const
return d->handler->supportsOption(option);
}
-
-#ifndef QT_NO_IMAGEFORMATPLUGIN
-void supportedImageHandlerFormats(QFactoryLoader *loader,
- QImageIOPlugin::Capability cap,
- QList<QByteArray> *result)
-{
- typedef QMultiMap<int, QString> PluginKeyMap;
- typedef PluginKeyMap::const_iterator PluginKeyMapConstIterator;
-
- const PluginKeyMap keyMap = loader->keyMap();
- const PluginKeyMapConstIterator cend = keyMap.constEnd();
- int i = -1;
- QImageIOPlugin *plugin = 0;
- result->reserve(result->size() + keyMap.size());
- for (PluginKeyMapConstIterator it = keyMap.constBegin(); it != cend; ++it) {
- if (it.key() != i) {
- i = it.key();
- plugin = qobject_cast<QImageIOPlugin *>(loader->instance(i));
- }
- const QByteArray key = it.value().toLatin1();
- if (plugin && (plugin->capabilities(0, key) & cap) != 0)
- result->append(key);
- }
-}
-
-void supportedImageHandlerMimeTypes(QFactoryLoader *loader,
- QImageIOPlugin::Capability cap,
- QList<QByteArray> *result)
-{
- QList<QJsonObject> metaDataList = loader->metaData();
-
- const int pluginCount = metaDataList.size();
- for (int i = 0; i < pluginCount; ++i) {
- const QJsonObject metaData = metaDataList.at(i).value(QLatin1String("MetaData")).toObject();
- const QJsonArray keys = metaData.value(QLatin1String("Keys")).toArray();
- const QJsonArray mimeTypes = metaData.value(QLatin1String("MimeTypes")).toArray();
- QImageIOPlugin *plugin = qobject_cast<QImageIOPlugin *>(loader->instance(i));
- const int keyCount = keys.size();
- for (int k = 0; k < keyCount; ++k) {
- if (plugin && (plugin->capabilities(0, keys.at(k).toString().toLatin1()) & cap) != 0)
- result->append(mimeTypes.at(k).toString().toLatin1());
- }
- }
-}
-#endif // QT_NO_IMAGEFORMATPLUGIN
-
/*!
Returns the list of image formats supported by QImageWriter.
@@ -897,30 +847,7 @@ void supportedImageHandlerMimeTypes(QFactoryLoader *loader,
*/
QList<QByteArray> QImageWriter::supportedImageFormats()
{
- QList<QByteArray> formats;
-#ifndef QT_NO_IMAGEFORMAT_BMP
- formats << "bmp";
-#endif
-#ifndef QT_NO_IMAGEFORMAT_PPM
- formats << "pbm" << "pgm" << "ppm";
-#endif
-#ifndef QT_NO_IMAGEFORMAT_XBM
- formats << "xbm";
-#endif
-#ifndef QT_NO_IMAGEFORMAT_XPM
- formats << "xpm";
-#endif
-#ifndef QT_NO_IMAGEFORMAT_PNG
- formats << "png";
-#endif
-
-#ifndef QT_NO_IMAGEFORMATPLUGIN
- supportedImageHandlerFormats(loader(), QImageIOPlugin::CanWrite, &formats);
-#endif // QT_NO_IMAGEFORMATPLUGIN
-
- std::sort(formats.begin(), formats.end());
- formats.erase(std::unique(formats.begin(), formats.end()), formats.end());
- return formats;
+ return QImageReaderWriterHelpers::supportedImageFormats(QImageReaderWriterHelpers::CanWrite);
}
/*!
@@ -933,32 +860,24 @@ QList<QByteArray> QImageWriter::supportedImageFormats()
*/
QList<QByteArray> QImageWriter::supportedMimeTypes()
{
- QList<QByteArray> mimeTypes;
-#ifndef QT_NO_IMAGEFORMAT_BMP
- mimeTypes << "image/bmp";
-#endif
-#ifndef QT_NO_IMAGEFORMAT_PPM
- mimeTypes << "image/x-portable-bitmap";
- mimeTypes << "image/x-portable-graymap";
- mimeTypes << "image/x-portable-pixmap";
-#endif
-#ifndef QT_NO_IMAGEFORMAT_XBM
- mimeTypes << "image/x-xbitmap";
-#endif
-#ifndef QT_NO_IMAGEFORMAT_XPM
- mimeTypes << "image/x-xpixmap";
-#endif
-#ifndef QT_NO_IMAGEFORMAT_PNG
- mimeTypes << "image/png";
-#endif
+ return QImageReaderWriterHelpers::supportedMimeTypes(QImageReaderWriterHelpers::CanWrite);
+}
-#ifndef QT_NO_IMAGEFORMATPLUGIN
- supportedImageHandlerMimeTypes(loader(), QImageIOPlugin::CanWrite, &mimeTypes);
-#endif // QT_NO_IMAGEFORMATPLUGIN
+/*!
+ \since 5.12
- std::sort(mimeTypes.begin(), mimeTypes.end());
- mimeTypes.erase(std::unique(mimeTypes.begin(), mimeTypes.end()), mimeTypes.end());
- return mimeTypes;
+ Returns the list of image formats corresponding to \a mimeType.
+
+ Note that the QGuiApplication instance must be created before this function is
+ called.
+
+ \sa supportedImageFormats(), supportedMimeTypes()
+*/
+
+QList<QByteArray> QImageWriter::imageFormatsForMimeType(const QByteArray &mimeType)
+{
+ return QImageReaderWriterHelpers::imageFormatsForMimeType(mimeType,
+ QImageReaderWriterHelpers::CanWrite);
}
QT_END_NAMESPACE
diff --git a/src/gui/image/qimagewriter.h b/src/gui/image/qimagewriter.h
index fd1fdd07e8..29c06ccdd2 100644
--- a/src/gui/image/qimagewriter.h
+++ b/src/gui/image/qimagewriter.h
@@ -116,6 +116,7 @@ public:
static QList<QByteArray> supportedImageFormats();
static QList<QByteArray> supportedMimeTypes();
+ static QList<QByteArray> imageFormatsForMimeType(const QByteArray &mimeType);
private:
Q_DISABLE_COPY(QImageWriter)
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index 1ea503a268..4b2334ae52 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -248,9 +248,9 @@ QPixmap::QPixmap(const char * const xpm[])
QImage image(xpm);
if (!image.isNull()) {
if (data && data->pixelType() == QPlatformPixmap::BitmapType)
- *this = QBitmap::fromImage(image);
+ *this = QBitmap::fromImage(std::move(image));
else
- *this = fromImage(image);
+ *this = fromImage(std::move(image));
}
}
#endif
@@ -691,7 +691,7 @@ QBitmap QPixmap::createHeuristicMask(bool clipTight) const
QBitmap QPixmap::createMaskFromColor(const QColor &maskColor, Qt::MaskMode mode) const
{
QImage image = toImage().convertToFormat(QImage::Format_ARGB32);
- return QBitmap::fromImage(image.createMaskFromColor(maskColor.rgba(), mode));
+ return QBitmap::fromImage(std::move(image).createMaskFromColor(maskColor.rgba(), mode));
}
/*!
@@ -1018,9 +1018,9 @@ QDataStream &operator>>(QDataStream &stream, QPixmap &pixmap)
if (image.isNull()) {
pixmap = QPixmap();
} else if (image.depth() == 1) {
- pixmap = QBitmap::fromImage(image);
+ pixmap = QBitmap::fromImage(std::move(image));
} else {
- pixmap = QPixmap::fromImage(image);
+ pixmap = QPixmap::fromImage(std::move(image));
}
return stream;
}
diff --git a/src/gui/image/qpixmap_blitter.cpp b/src/gui/image/qpixmap_blitter.cpp
index 646e737afa..649a25250c 100644
--- a/src/gui/image/qpixmap_blitter.cpp
+++ b/src/gui/image/qpixmap_blitter.cpp
@@ -150,13 +150,7 @@ void QBlittablePlatformPixmap::fill(const QColor &color)
m_alpha = true;
}
- uint pixel = qPremultiply(color.rgba());
- const QPixelLayout *layout = &qPixelLayouts[blittable()->lock()->format()];
- Q_ASSERT(layout->convertFromARGB32PM);
- layout->convertFromARGB32PM(&pixel, &pixel, 1, 0, 0);
-
- //so premultiplied formats are supported and ARGB32 and RGB32
- blittable()->lock()->fill(pixel);
+ blittable()->lock()->fill(color);
}
}
diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp
index 431002d032..13c1c29d5b 100644
--- a/src/gui/image/qpixmap_raster.cpp
+++ b/src/gui/image/qpixmap_raster.cpp
@@ -193,17 +193,12 @@ void QRasterPlatformPixmap::fill(const QColor &color)
if (alpha != 255) {
if (!image.hasAlphaChannel()) {
QImage::Format toFormat = qt_alphaVersionForPainting(image.format());
- if (!image.isNull() && qt_depthForFormat(image.format()) == qt_depthForFormat(toFormat)) {
- image.detach();
- image.d->format = toFormat;
- } else {
+ if (!image.reinterpretAsFormat(toFormat))
image = QImage(image.width(), image.height(), toFormat);
- }
}
}
- pixel = qPremultiply(color.rgba());
- const QPixelLayout *layout = &qPixelLayouts[image.format()];
- layout->convertFromARGB32PM(&pixel, &pixel, 1, 0, 0);
+ image.fill(color);
+ return;
} else if (image.format() == QImage::Format_Alpha8) {
pixel = qAlpha(color.rgba());
} else if (image.format() == QImage::Format_Grayscale8) {
diff --git a/src/gui/image/qpixmap_win.cpp b/src/gui/image/qpixmap_win.cpp
index 92f6964783..a9e472f8c4 100644
--- a/src/gui/image/qpixmap_win.cpp
+++ b/src/gui/image/qpixmap_win.cpp
@@ -42,39 +42,76 @@
#include <qpa/qplatformpixmap.h>
#include "qpixmap_raster_p.h"
-#include <qglobal.h>
+#include <qdebug.h>
#include <QScopedArrayPointer>
#include <qt_windows.h>
+#include <algorithm>
+#include <iterator>
+
QT_BEGIN_NAMESPACE
-static inline void initBitMapInfoHeader(int width, int height, bool topToBottom, BITMAPINFOHEADER *bih)
+template <typename Int>
+static inline Int pad4(Int v)
+{
+ return (v + Int(3)) & ~Int(3);
+}
+
+#ifndef QT_NO_DEBUG_STREAM
+QDebug operator<<(QDebug d, const BITMAPINFOHEADER &bih)
+{
+ QDebugStateSaver saver(d);
+ d.nospace();
+ d << "BITMAPINFOHEADER(" << bih.biWidth << 'x' << qAbs(bih.biHeight)
+ << (bih.biHeight < 0 ? ", top-down" : ", bottom-up")
+ << ", planes=" << bih.biPlanes << ", bitCount=" << bih.biBitCount
+ << ", compression=" << bih.biCompression << ", size="
+ << bih.biSizeImage << ')';
+ return d;
+}
+#endif // !QT_NO_DEBUG_STREAM
+
+static inline void initBitMapInfoHeader(int width, int height, bool topToBottom,
+ DWORD compression, DWORD bitCount,
+ BITMAPINFOHEADER *bih)
{
memset(bih, 0, sizeof(BITMAPINFOHEADER));
bih->biSize = sizeof(BITMAPINFOHEADER);
bih->biWidth = width;
bih->biHeight = topToBottom ? -height : height;
bih->biPlanes = 1;
- bih->biBitCount = 32;
- bih->biCompression = BI_RGB;
- bih->biSizeImage = width * height * 4;
+ bih->biBitCount = WORD(bitCount);
+ bih->biCompression = compression;
+ // scan lines are word-aligned (unless RLE)
+ const DWORD bytesPerLine = pad4(DWORD(width) * bitCount / 8);
+ bih->biSizeImage = bytesPerLine * DWORD(height);
}
-static inline void initBitMapInfo(int width, int height, bool topToBottom, BITMAPINFO *bmi)
+enum { Indexed8ColorTableSize = 256 };
+
+struct BITMAPINFO_COLORTABLE256 { // BITMAPINFO with 256 entry color table for Indexed 8 format
+ BITMAPINFOHEADER bmiHeader;
+ RGBQUAD bmiColors[Indexed8ColorTableSize];
+};
+
+template <class BITMAPINFO_T> // BITMAPINFO, BITMAPINFO_COLORTABLE256
+static inline void initBitMapInfo(int width, int height, bool topToBottom,
+ DWORD compression, DWORD bitCount,
+ BITMAPINFO_T *bmi)
{
- initBitMapInfoHeader(width, height, topToBottom, &bmi->bmiHeader);
- memset(bmi->bmiColors, 0, sizeof(RGBQUAD));
+ initBitMapInfoHeader(width, height, topToBottom, compression, bitCount, &bmi->bmiHeader);
+ memset(bmi->bmiColors, 0, sizeof(bmi->bmiColors));
}
static inline uchar *getDiBits(HDC hdc, HBITMAP bitmap, int width, int height, bool topToBottom = true)
{
BITMAPINFO bmi;
- initBitMapInfo(width, height, topToBottom, &bmi);
+ initBitMapInfo(width, height, topToBottom, BI_RGB, 32u, &bmi);
uchar *result = new uchar[bmi.bmiHeader.biSizeImage];
- if (!GetDIBits(hdc, bitmap, 0, height, result, &bmi, DIB_RGB_COLORS)) {
+ if (!GetDIBits(hdc, bitmap, 0, UINT(height), result, &bmi, DIB_RGB_COLORS)) {
delete [] result;
qErrnoWarning("%s: GetDIBits() failed to get bitmap bits.", __FUNCTION__);
- return 0;
+ return nullptr;
}
return result;
}
@@ -98,18 +135,92 @@ static inline void copyImageDataCreateAlpha(const uchar *data, QImage *target)
}
}
-static inline void copyImageData(const uchar *data, QImage *target)
+// Flip RGB triplets from DIB to QImage formats. Scan lines are padded to 32bit
+// both in QImage and DIB.
+static inline void flipRgb3(uchar *p, int width, int height)
{
- const int height = target->height();
- const int bytesPerLine = target->bytesPerLine();
+ const int lineSize = 3 * width;
+ const int linePad = pad4(lineSize) - lineSize;
for (int y = 0; y < height; ++y) {
- void *dest = static_cast<void *>(target->scanLine(y));
- const void *src = data + y * bytesPerLine;
- memcpy(dest, src, bytesPerLine);
+ uchar *end = p + lineSize;
+ for ( ; p < end; p += 3)
+ std::swap(*p, *(p + 2));
+ p += linePad;
+ }
+}
+
+static inline RGBQUAD qRgbToRgbQuad(QRgb qrgb)
+{
+ RGBQUAD result = {BYTE(qBlue(qrgb)), BYTE(qGreen(qrgb)), BYTE(qRed(qrgb)), 0};
+ return result;
+}
+
+static inline QRgb rgbQuadToQRgb(RGBQUAD quad)
+{
+ return QRgb(quad.rgbBlue) + (QRgb(quad.rgbGreen) << 8) + (QRgb(quad.rgbRed) << 16)
+ + 0xff000000;
+}
+
+// Helper for imageFromWinHBITMAP_*(), create image in desired format
+static QImage copyImageData(const BITMAPINFOHEADER &header, const RGBQUAD *colorTableIn,
+ const void *data, QImage::Format format)
+{
+ const QSize size = QSize(header.biWidth, qAbs(header.biHeight));
+ QImage image(size, format);
+
+ int colorTableSize = 0;
+ switch (format) {
+ case QImage::Format_Mono:
+ colorTableSize = 2;
+ break;
+ case QImage::Format_Indexed8:
+ colorTableSize = Indexed8ColorTableSize;
+ break;
+ default:
+ break;
+ }
+ if (colorTableSize) {
+ Q_ASSERT(colorTableIn);
+ QVector<QRgb> colorTable;
+ colorTable.reserve(colorTableSize);
+ std::transform(colorTableIn, colorTableIn + colorTableSize,
+ std::back_inserter(colorTable), rgbQuadToQRgb);
+ image.setColorTable(colorTable);
}
+ switch (header.biBitCount) {
+ case 32:
+ copyImageDataCreateAlpha(static_cast<const uchar *>(data), &image);
+ break;
+ case 1:
+ case 8:
+ case 16:
+ case 24:
+ Q_ASSERT(DWORD(image.sizeInBytes()) == header.biSizeImage);
+ memcpy(image.bits(), data, header.biSizeImage);
+ if (format == QImage::Format_RGB888)
+ image = image.rgbSwapped();
+ break;
+ default:
+ Q_UNREACHABLE();
+ break;
+ }
+ return image;
}
+class DisplayHdc
+{
+ Q_DISABLE_COPY(DisplayHdc)
+public:
+ DisplayHdc() : m_displayDc(GetDC(nullptr)) {}
+ ~DisplayHdc() { ReleaseDC(nullptr, m_displayDc); }
+
+ operator HDC() const { return m_displayDc; }
+
+private:
+ const HDC m_displayDc;
+};
+
enum HBitmapFormat
{
HBitmapNoAlpha,
@@ -123,108 +234,229 @@ Q_GUI_EXPORT HBITMAP qt_createIconMask(const QBitmap &bitmap)
const int w = bm.width();
const int h = bm.height();
const int bpl = ((w+15)/16)*2; // bpl, 16 bit alignment
- QScopedArrayPointer<uchar> bits(new uchar[bpl * h]);
+ QScopedArrayPointer<uchar> bits(new uchar[size_t(bpl * h)]);
bm.invertPixels();
for (int y = 0; y < h; ++y)
- memcpy(bits.data() + y * bpl, bm.constScanLine(y), bpl);
+ memcpy(bits.data() + y * bpl, bm.constScanLine(y), size_t(bpl));
HBITMAP hbm = CreateBitmap(w, h, 1, 1, bits.data());
return hbm;
}
-Q_GUI_EXPORT HBITMAP qt_pixmapToWinHBITMAP(const QPixmap &p, int hbitmapFormat = 0)
+static inline QImage::Format format32(int hbitmapFormat)
{
- if (p.isNull())
- return 0;
-
- HBITMAP bitmap = 0;
- if (p.handle()->classId() != QPlatformPixmap::RasterClass) {
- QRasterPlatformPixmap *data = new QRasterPlatformPixmap(p.depth() == 1 ?
- QRasterPlatformPixmap::BitmapType : QRasterPlatformPixmap::PixmapType);
- data->fromImage(p.toImage(), Qt::AutoColor);
- return qt_pixmapToWinHBITMAP(QPixmap(data), hbitmapFormat);
+ switch (hbitmapFormat) {
+ case HBitmapNoAlpha:
+ return QImage::Format_RGB32;
+ case HBitmapAlpha:
+ return QImage::Format_ARGB32;
+ default:
+ break;
}
+ return QImage::Format_ARGB32_Premultiplied;
+}
- QRasterPlatformPixmap *d = static_cast<QRasterPlatformPixmap*>(p.handle());
- const QImage *rasterImage = d->buffer();
- const int w = rasterImage->width();
- const int h = rasterImage->height();
-
- HDC display_dc = GetDC(0);
+Q_GUI_EXPORT HBITMAP qt_imageToWinHBITMAP(const QImage &imageIn, int hbitmapFormat = 0)
+{
+ if (imageIn.isNull())
+ return nullptr;
// Define the header
- BITMAPINFO bmi;
- initBitMapInfo(w, h, true, &bmi);
+ DWORD compression = 0;
+ DWORD bitCount = 0;
+
+ // Copy over the data
+ QImage image = imageIn;
+ switch (image.format()) {
+ case QImage::Format_Mono:
+ bitCount = 1u;
+ break;
+ case QImage::Format_RGB32:
+ case QImage::Format_ARGB32:
+ case QImage::Format_ARGB32_Premultiplied: {
+ compression = BI_RGB;
+ bitCount = 32u;
+ const QImage::Format targetFormat = format32(hbitmapFormat);
+ if (targetFormat != image.format())
+ image = image.convertToFormat(targetFormat);
+ }
+ break;
+ case QImage::Format_RGB888:
+ compression = BI_RGB;
+ bitCount = 24u;
+ break;
+ case QImage::Format_Indexed8:
+ bitCount = 8u;
+ break;
+ case QImage::Format_RGB555:
+ bitCount = 16u;
+ break;
+ default: {
+ QImage::Format fallbackFormat = QImage::Format_ARGB32_Premultiplied;
+ switch (image.format()) { // Convert to a suitable format.
+ case QImage::Format_MonoLSB:
+ fallbackFormat = QImage::Format_Mono;
+ break;
+ case QImage::Format_RGB16:
+ fallbackFormat = QImage::Format_RGB555;
+ break;
+ case QImage::Format_Grayscale8:
+ fallbackFormat = QImage::Format_Indexed8;
+ break;
+ default:
+ break;
+ } // switch conversion format
+ return qt_imageToWinHBITMAP(imageIn.convertToFormat(fallbackFormat), hbitmapFormat);
+ }
+ }
+
+ const int w = image.width();
+ const int h = image.height();
+
+ BITMAPINFO_COLORTABLE256 bmiColorTable256;
+ initBitMapInfo(w, h, true, compression, bitCount, &bmiColorTable256);
+ BITMAPINFO &bmi = reinterpret_cast<BITMAPINFO &>(bmiColorTable256);
+ switch (image.format()) {
+ case QImage::Format_Mono: // Color table with 2 entries
+ case QImage::Format_Indexed8:
+ std::transform(image.colorTable().constBegin(), image.colorTable().constEnd(),
+ bmiColorTable256.bmiColors, qRgbToRgbQuad);
+ break;
+ default:
+ break;
+ }
// Create the pixmap
- uchar *pixels = 0;
- bitmap = CreateDIBSection(display_dc, &bmi, DIB_RGB_COLORS, (void **) &pixels, 0, 0);
- ReleaseDC(0, display_dc);
+ uchar *pixels = nullptr;
+ const HBITMAP bitmap = CreateDIBSection(nullptr, &bmi, DIB_RGB_COLORS,
+ reinterpret_cast<void **>(&pixels), nullptr, 0);
if (!bitmap) {
qErrnoWarning("%s, failed to create dibsection", __FUNCTION__);
- return 0;
+ return nullptr;
}
if (!pixels) {
qErrnoWarning("%s, did not allocate pixel data", __FUNCTION__);
- return 0;
+ return nullptr;
}
-
- // Copy over the data
- QImage::Format imageFormat = QImage::Format_RGB32;
- if (hbitmapFormat == HBitmapAlpha)
- imageFormat = QImage::Format_ARGB32;
- else if (hbitmapFormat == HBitmapPremultipliedAlpha)
- imageFormat = QImage::Format_ARGB32_Premultiplied;
- const QImage image = rasterImage->convertToFormat(imageFormat);
- const int bytes_per_line = w * 4;
- for (int y=0; y < h; ++y)
- memcpy(pixels + y * bytes_per_line, image.scanLine(y), bytes_per_line);
-
+ memcpy(pixels, image.constBits(), bmi.bmiHeader.biSizeImage);
+ if (image.format() == QImage::Format_RGB888)
+ flipRgb3(pixels, w, h);
return bitmap;
}
+Q_GUI_EXPORT HBITMAP qt_pixmapToWinHBITMAP(const QPixmap &p, int hbitmapFormat = 0)
+{
+ if (p.isNull())
+ return nullptr;
-Q_GUI_EXPORT QPixmap qt_pixmapFromWinHBITMAP(HBITMAP bitmap, int hbitmapFormat = 0)
+ QPlatformPixmap *platformPixmap = p.handle();
+ if (platformPixmap->classId() != QPlatformPixmap::RasterClass) {
+ QRasterPlatformPixmap *data = new QRasterPlatformPixmap(p.depth() == 1 ?
+ QRasterPlatformPixmap::BitmapType : QRasterPlatformPixmap::PixmapType);
+ data->fromImage(p.toImage(), Qt::AutoColor);
+ return qt_pixmapToWinHBITMAP(QPixmap(data), hbitmapFormat);
+ }
+
+ return qt_imageToWinHBITMAP(*static_cast<QRasterPlatformPixmap*>(platformPixmap)->buffer(), hbitmapFormat);
+}
+
+static QImage::Format imageFromWinHBITMAP_Format(const BITMAPINFOHEADER &header, int hbitmapFormat)
{
- // Verify size
- BITMAP bitmap_info;
- memset(&bitmap_info, 0, sizeof(BITMAP));
+ QImage::Format result = QImage::Format_Invalid;
+ switch (header.biBitCount) {
+ case 32:
+ result = hbitmapFormat == HBitmapNoAlpha
+ ? QImage::Format_RGB32 : QImage::Format_ARGB32_Premultiplied;
+ break;
+ case 24:
+ result = QImage::Format_RGB888;
+ break;
+ case 16:
+ result = QImage::Format_RGB555;
+ break;
+ case 8:
+ result = QImage::Format_Indexed8;
+ break;
+ case 1:
+ result = QImage::Format_Mono;
+ break;
+ }
+ return result;
+}
- const int res = GetObject(bitmap, sizeof(BITMAP), &bitmap_info);
- if (!res) {
- qErrnoWarning("QPixmap::fromWinHBITMAP(), failed to get bitmap info");
- return QPixmap();
+// Fast path for creating a QImage directly from a HBITMAP created by CreateDIBSection(),
+// not requiring memory allocation.
+static QImage imageFromWinHBITMAP_DibSection(HBITMAP bitmap, int hbitmapFormat)
+{
+ DIBSECTION dibSection;
+ memset(&dibSection, 0, sizeof(dibSection));
+ dibSection.dsBmih.biSize = sizeof(dibSection.dsBmih);
+
+ if (!GetObject(bitmap, sizeof(dibSection), &dibSection)
+ || !dibSection.dsBm.bmBits
+ || dibSection.dsBmih.biBitCount <= 8 // Cannot access the color table for Indexed8, Mono
+ || dibSection.dsBmih.biCompression != BI_RGB) {
+ return QImage();
}
- const int w = bitmap_info.bmWidth;
- const int h = bitmap_info.bmHeight;
-
- // Get bitmap bits
- HDC display_dc = GetDC(0);
- QScopedArrayPointer<uchar> data(getDiBits(display_dc, bitmap, w, h, true));
- if (data.isNull()) {
- ReleaseDC(0, display_dc);
- return QPixmap();
+
+ const QImage::Format imageFormat = imageFromWinHBITMAP_Format(dibSection.dsBmih, hbitmapFormat);
+ if (imageFormat == QImage::Format_Invalid)
+ return QImage();
+
+ return copyImageData(dibSection.dsBmih, nullptr, dibSection.dsBm.bmBits, imageFormat);
+}
+
+// Create QImage from a HBITMAP using GetDIBits(), potentially with conversion.
+static QImage imageFromWinHBITMAP_GetDiBits(HBITMAP bitmap, bool forceQuads, int hbitmapFormat)
+{
+ BITMAPINFO_COLORTABLE256 bmiColorTable256;
+ BITMAPINFO &info = reinterpret_cast<BITMAPINFO &>(bmiColorTable256);
+ memset(&info, 0, sizeof(info));
+ info.bmiHeader.biSize = sizeof(info.bmiHeader);
+
+ DisplayHdc displayDc;
+ if (!GetDIBits(displayDc, bitmap, 0, 1, 0, &info, DIB_RGB_COLORS)) {
+ qErrnoWarning("%s: GetDIBits() failed to query data.", __FUNCTION__);
+ return QImage();
}
- const QImage::Format imageFormat = hbitmapFormat == HBitmapNoAlpha ?
- QImage::Format_RGB32 : QImage::Format_ARGB32_Premultiplied;
+ if (info.bmiHeader.biHeight > 0) // Force top-down
+ info.bmiHeader.biHeight = -info.bmiHeader.biHeight;
+ info.bmiHeader.biCompression = BI_RGB; // Extract using no compression (can be BI_BITFIELD)
+ if (forceQuads)
+ info.bmiHeader.biBitCount = 32;
- // Create image and copy data into image.
- QImage image(w, h, imageFormat);
- if (image.isNull()) { // failed to alloc?
- ReleaseDC(0, display_dc);
- qWarning("%s, failed create image of %dx%d", __FUNCTION__, w, h);
- return QPixmap();
+ const QImage::Format imageFormat = imageFromWinHBITMAP_Format(info.bmiHeader, hbitmapFormat);
+ if (imageFormat == QImage::Format_Invalid) {
+ qWarning().nospace() << __FUNCTION__ << ": unsupported image format:" << info.bmiHeader;
+ return QImage();
}
- copyImageDataCreateAlpha(data.data(), &image);
- ReleaseDC(0, display_dc);
- return QPixmap::fromImage(image);
+
+ QScopedPointer<uchar> data(new uchar[info.bmiHeader.biSizeImage]);
+ if (!GetDIBits(displayDc, bitmap, 0, qAbs(info.bmiHeader.biHeight), data.data(), &info, DIB_RGB_COLORS)) {
+ qErrnoWarning("%s: GetDIBits() failed to get data.", __FUNCTION__);
+ return QImage();
+ }
+ return copyImageData(info.bmiHeader, bmiColorTable256.bmiColors, data.data(), imageFormat);
}
+Q_GUI_EXPORT QImage qt_imageFromWinHBITMAP(HBITMAP bitmap, int hbitmapFormat = 0)
+{
+ QImage result = imageFromWinHBITMAP_DibSection(bitmap, hbitmapFormat);
+ if (result.isNull())
+ result = imageFromWinHBITMAP_GetDiBits(bitmap, /* forceQuads */ false, hbitmapFormat);
+ return result;
+}
+
+Q_GUI_EXPORT QPixmap qt_pixmapFromWinHBITMAP(HBITMAP bitmap, int hbitmapFormat = 0)
+{
+ const QImage image = imageFromWinHBITMAP_GetDiBits(bitmap, /* forceQuads */ true, hbitmapFormat);
+ return QPixmap::fromImage(image);
+}
Q_GUI_EXPORT HICON qt_pixmapToWinHICON(const QPixmap &p)
{
if (p.isNull())
- return 0;
+ return nullptr;
QBitmap maskBitmap = p.mask();
if (maskBitmap.isNull()) {
@@ -267,7 +499,7 @@ static QImage qt_imageFromWinIconHBITMAP(HDC hdc, HBITMAP bitmap, int w, int h)
QScopedArrayPointer<uchar> data(getDiBits(hdc, bitmap, w, h, true));
if (data.isNull())
return QImage();
- copyImageData(data.data(), &image);
+ memcpy(image.bits(), data.data(), size_t(image.sizeInBytes()));
return image;
}
@@ -287,9 +519,9 @@ static inline bool hasAlpha(const QImage &image)
Q_GUI_EXPORT QPixmap qt_pixmapFromWinHICON(HICON icon)
{
- HDC screenDevice = GetDC(0);
+ HDC screenDevice = GetDC(nullptr);
HDC hdc = CreateCompatibleDC(screenDevice);
- ReleaseDC(0, screenDevice);
+ ReleaseDC(nullptr, screenDevice);
ICONINFO iconinfo;
const bool result = GetIconInfo(icon, &iconinfo); //x and y Hotspot describes the icon center
@@ -299,25 +531,27 @@ Q_GUI_EXPORT QPixmap qt_pixmapFromWinHICON(HICON icon)
return QPixmap();
}
- const int w = iconinfo.xHotspot * 2;
- const int h = iconinfo.yHotspot * 2;
+ const int w = int(iconinfo.xHotspot) * 2;
+ const int h = int(iconinfo.yHotspot) * 2;
BITMAPINFOHEADER bitmapInfo;
- initBitMapInfoHeader(w, h, false, &bitmapInfo);
+ initBitMapInfoHeader(w, h, false, BI_RGB, 32u, &bitmapInfo);
DWORD* bits;
- HBITMAP winBitmap = CreateDIBSection(hdc, (BITMAPINFO*)&bitmapInfo, DIB_RGB_COLORS, (VOID**)&bits, NULL, 0);
- HGDIOBJ oldhdc = (HBITMAP)SelectObject(hdc, winBitmap);
- DrawIconEx( hdc, 0, 0, icon, iconinfo.xHotspot * 2, iconinfo.yHotspot * 2, 0, 0, DI_NORMAL);
+ HBITMAP winBitmap = CreateDIBSection(hdc, reinterpret_cast<BITMAPINFO *>(&bitmapInfo),
+ DIB_RGB_COLORS, reinterpret_cast<VOID **>(&bits),
+ nullptr, 0);
+ HGDIOBJ oldhdc = static_cast<HBITMAP>(SelectObject(hdc, winBitmap));
+ DrawIconEx(hdc, 0, 0, icon, w, h, 0, nullptr, DI_NORMAL);
QImage image = qt_imageFromWinIconHBITMAP(hdc, winBitmap, w, h);
if (!image.isNull() && !hasAlpha(image)) { //If no alpha was found, we use the mask to set alpha values
- DrawIconEx( hdc, 0, 0, icon, w, h, 0, 0, DI_MASK);
+ DrawIconEx( hdc, 0, 0, icon, w, h, 0, nullptr, DI_MASK);
const QImage mask = qt_imageFromWinIconHBITMAP(hdc, winBitmap, w, h);
for (int y = 0 ; y < h ; y++){
QRgb *scanlineImage = reinterpret_cast<QRgb *>(image.scanLine(y));
- const QRgb *scanlineMask = mask.isNull() ? 0 : reinterpret_cast<const QRgb *>(mask.scanLine(y));
+ const QRgb *scanlineMask = mask.isNull() ? nullptr : reinterpret_cast<const QRgb *>(mask.scanLine(y));
for (int x = 0; x < w ; x++){
if (scanlineMask && qRed(scanlineMask[x]) != 0)
scanlineImage[x] = 0; //mask out this pixel
diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp
index 4b8b1203d6..3d1652f68b 100644
--- a/src/gui/image/qpixmapcache.cpp
+++ b/src/gui/image/qpixmapcache.cpp
@@ -86,7 +86,17 @@ QT_BEGIN_NAMESPACE
\sa QCache, QPixmap
*/
-static int cache_limit = 10240; // 10 MB cache limit
+static const int cache_limit_default = 10240; // 10 MB cache limit
+
+static inline int cost(const QPixmap &pixmap)
+{
+ // make sure to do a 64bit calculation
+ const qint64 costKb = static_cast<qint64>(pixmap.width()) *
+ pixmap.height() * pixmap.depth() / (8 * 1024);
+ const qint64 costMax = std::numeric_limits<int>::max();
+ // a small pixmap should have at least a cost of 1(kb)
+ return static_cast<int>(qBound(1LL, costKb, costMax));
+}
/*!
\class QPixmapCache::Key
@@ -237,7 +247,7 @@ uint qHash(const QPixmapCache::Key &k)
QPMCache::QPMCache()
: QObject(0),
- QCache<QPixmapCache::Key, QPixmapCacheEntry>(cache_limit * 1024),
+ QCache<QPixmapCache::Key, QPixmapCacheEntry>(cache_limit_default),
keyArray(0), theid(0), ps(0), keyArraySize(0), freeKey(0), t(false)
{
}
@@ -553,7 +563,7 @@ bool QPixmapCache::find(const Key &key, QPixmap* pixmap)
bool QPixmapCache::insert(const QString &key, const QPixmap &pixmap)
{
- return pm_cache()->insert(key, pixmap, pixmap.width() * pixmap.height() * pixmap.depth() / 8);
+ return pm_cache()->insert(key, pixmap, cost(pixmap));
}
/*!
@@ -573,7 +583,7 @@ bool QPixmapCache::insert(const QString &key, const QPixmap &pixmap)
*/
QPixmapCache::Key QPixmapCache::insert(const QPixmap &pixmap)
{
- return pm_cache()->insert(pixmap, pixmap.width() * pixmap.height() * pixmap.depth() / 8);
+ return pm_cache()->insert(pixmap, cost(pixmap));
}
/*!
@@ -590,7 +600,7 @@ bool QPixmapCache::replace(const Key &key, const QPixmap &pixmap)
//The key is not valid anymore, a flush happened before probably
if (!key.d || !key.d->isValid)
return false;
- return pm_cache()->replace(key, pixmap, pixmap.width() * pixmap.height() * pixmap.depth() / 8);
+ return pm_cache()->replace(key, pixmap, cost(pixmap));
}
/*!
@@ -603,7 +613,7 @@ bool QPixmapCache::replace(const Key &key, const QPixmap &pixmap)
int QPixmapCache::cacheLimit()
{
- return cache_limit;
+ return pm_cache()->maxCost();
}
/*!
@@ -616,8 +626,7 @@ int QPixmapCache::cacheLimit()
void QPixmapCache::setCacheLimit(int n)
{
- cache_limit = n;
- pm_cache()->setMaxCost(1024 * cache_limit);
+ pm_cache()->setMaxCost(n);
}
/*!
diff --git a/src/gui/image/qxbmhandler.cpp b/src/gui/image/qxbmhandler.cpp
index 155a4f88b4..24d86e116d 100644
--- a/src/gui/image/qxbmhandler.cpp
+++ b/src/gui/image/qxbmhandler.cpp
@@ -241,7 +241,7 @@ static bool write_xbm_image(const QImage &sourceImage, QIODevice *device, const
}
}
}
-#if defined(_MSC_VER) && _MSC_VER >= 1400
+#ifdef Q_CC_MSVC
strcpy_s(p, sizeof(" };\n"), " };\n");
#else
strcpy(p, " };\n");
diff --git a/src/gui/image/qxpmhandler.cpp b/src/gui/image/qxpmhandler.cpp
index 9c54b9ada4..17272ffe69 100644
--- a/src/gui/image/qxpmhandler.cpp
+++ b/src/gui/image/qxpmhandler.cpp
@@ -741,10 +741,6 @@ static const struct XPMRGBData {
{ QRGB(139,139, 0), "yellow4" },
{ QRGB(154,205, 50), "yellowgreen" } };
-#if defined(Q_CC_MSVC) && _MSC_VER < 1600
-inline bool operator<(const XPMRGBData &data1, const XPMRGBData &data2)
-{ return qstrcmp(data1.name, data2.name) < 0; }
-#endif
inline bool operator<(const char *name, const XPMRGBData &data)
{ return qstrcmp(name, data.name) < 0; }
diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri
index 3b9afdfe8b..1f137fc46f 100644
--- a/src/gui/kernel/kernel.pri
+++ b/src/gui/kernel/kernel.pri
@@ -74,8 +74,8 @@ HEADERS += \
kernel/qplatformgraphicsbufferhelper.h \
kernel/qinputdevicemanager_p.h \
kernel/qinputdevicemanager_p_p.h \
- kernel/qhighdpiscaling_p.h
-
+ kernel/qhighdpiscaling_p.h \
+ kernel/qtestsupport_gui.h
SOURCES += \
kernel/qgenericpluginfactory.cpp \
@@ -128,7 +128,8 @@ SOURCES += \
kernel/qplatformgraphicsbuffer.cpp \
kernel/qplatformgraphicsbufferhelper.cpp \
kernel/qinputdevicemanager.cpp \
- kernel/qhighdpiscaling.cpp
+ kernel/qhighdpiscaling.cpp \
+ kernel/qtestsupport_gui.cpp
qtConfig(draganddrop) {
HEADERS += \
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index 3c412903e1..e8f3cdd504 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -963,6 +963,43 @@ QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos,
invertedScrolling(inverted)
{}
+/*!
+ Constructs a wheel event object.
+
+ The \a pos provides the location of the mouse cursor
+ within the window. The position in global coordinates is specified
+ by \a globalPos.
+
+ \a pixelDelta contains the scrolling distance in pixels on screen, while
+ \a angleDelta contains the wheel rotation distance. \a pixelDelta is
+ optional and can be null.
+
+ The mouse and keyboard states at the time of the event are specified by
+ \a buttons and \a modifiers.
+
+ The scrolling phase of the event is specified by \a phase.
+
+ If the wheel event comes from a physical mouse wheel, \a source is set to
+ Qt::MouseEventNotSynthesized. If it comes from a gesture detected by the
+ operating system, or from a non-mouse hardware device, such that \a
+ pixelDelta is directly related to finger movement, \a source is set to
+ Qt::MouseEventSynthesizedBySystem. If it comes from Qt, source would be set
+ to Qt::MouseEventSynthesizedByQt.
+
+ If the system is configured to invert the delta values delivered with the
+ event (such as natural scrolling of the touchpad on macOS), \a inverted
+ should be \c true. Otherwise, \a inverted is \c false
+
+ \sa posF(), globalPosF(), angleDelta(), pixelDelta(), phase()
+*/
+QWheelEvent::QWheelEvent(QPointF pos, QPointF globalPos, QPoint pixelDelta, QPoint angleDelta,
+ Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::ScrollPhase phase,
+ bool inverted, Qt::MouseEventSource source)
+ : QInputEvent(Wheel, modifiers), p(pos), g(globalPos), pixelD(pixelDelta),
+ angleD(angleDelta), mouseState(buttons), ph(phase), src(source),
+ invertedScrolling(inverted)
+{}
+
#endif // QT_CONFIG(wheelevent)
/*!
@@ -1536,8 +1573,8 @@ QMoveEvent::~QMoveEvent()
\ingroup events
- Expose events are sent to windows when an area of the window is invalidated
- or window exposure in the windowing system changes.
+ Expose events are sent to windows when an area of the window is invalidated,
+ for example when window exposure in the windowing system changes.
A Window with a client area that is completely covered by another window, or
is otherwise not visible may be considered obscured by Qt and may in such
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h
index 033d24d665..8d2f225809 100644
--- a/src/gui/kernel/qevent.h
+++ b/src/gui/kernel/qevent.h
@@ -193,6 +193,10 @@ public:
QWheelEvent(const QPointF &pos, const QPointF &globalPos, QPoint pixelDelta, QPoint angleDelta,
int qt4Delta, Qt::Orientation qt4Orientation, Qt::MouseButtons buttons,
Qt::KeyboardModifiers modifiers, Qt::ScrollPhase phase, Qt::MouseEventSource source, bool inverted);
+
+ QWheelEvent(QPointF pos, QPointF globalPos, QPoint pixelDelta, QPoint angleDelta,
+ Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::ScrollPhase phase,
+ bool inverted, Qt::MouseEventSource source = Qt::MouseEventNotSynthesized);
~QWheelEvent();
@@ -225,8 +229,8 @@ protected:
QPointF g;
QPoint pixelD;
QPoint angleD;
- int qt4D;
- Qt::Orientation qt4O;
+ int qt4D = 0;
+ Qt::Orientation qt4O = Qt::Vertical;
Qt::MouseButtons mouseState;
uint ph : 2;
uint src: 2;
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 2ef689b5b9..91348265cd 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -143,6 +143,8 @@ Qt::ApplicationState QGuiApplicationPrivate::applicationState = Qt::ApplicationI
bool QGuiApplicationPrivate::highDpiScalingUpdated = false;
+QPointer<QWindow> QGuiApplicationPrivate::currentDragWindow;
+
QVector<QGuiApplicationPrivate::TabletPointData> QGuiApplicationPrivate::tabletDevicePoints;
QPlatformIntegration *QGuiApplicationPrivate::platform_integration = 0;
@@ -668,6 +670,7 @@ QGuiApplication::~QGuiApplication()
QGuiApplicationPrivate::currentMousePressWindow = QGuiApplicationPrivate::currentMouseWindow = nullptr;
QGuiApplicationPrivate::applicationState = Qt::ApplicationInactive;
QGuiApplicationPrivate::highDpiScalingUpdated = false;
+ QGuiApplicationPrivate::currentDragWindow = nullptr;
QGuiApplicationPrivate::tabletDevicePoints.clear();
#ifndef QT_NO_SESSIONMANAGER
QGuiApplicationPrivate::is_fallback_session_management_enabled = true;
@@ -1409,7 +1412,7 @@ void QGuiApplicationPrivate::eventDispatcherReady()
void QGuiApplicationPrivate::init()
{
- Q_TRACE(qguiapplicationprivate_init_entry);
+ Q_TRACE(QGuiApplicationPrivate_init_entry);
#if defined(Q_OS_MACOS)
QMacAutoReleasePool pool;
@@ -1574,7 +1577,7 @@ void QGuiApplicationPrivate::init()
QObject::connect(q, &QGuiApplication::applicationNameChanged,
q, &QGuiApplication::applicationDisplayNameChanged);
- Q_TRACE(qguiapplicationprivate_init_exit);
+ Q_TRACE(QGuiApplicationPrivate_init_exit);
}
extern void qt_cleanupFontDatabase();
@@ -1690,7 +1693,7 @@ Qt::KeyboardModifiers QGuiApplication::queryKeyboardModifiers()
/*!
Returns the current state of the buttons on the mouse. The current state is
- updated syncronously as the event queue is emptied of events that will
+ updated synchronously as the event queue is emptied of events that will
spontaneously change the mouse state (QEvent::MouseButtonPress and
QEvent::MouseButtonRelease events).
@@ -1765,8 +1768,11 @@ int QGuiApplication::exec()
*/
bool QGuiApplication::notify(QObject *object, QEvent *event)
{
- if (object->isWindowType())
- QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(static_cast<QWindow *>(object), event);
+ if (object->isWindowType()) {
+ if (QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(static_cast<QWindow *>(object), event))
+ return true; // Platform plugin ate the event
+ }
+
return QCoreApplication::notify(object, event);
}
@@ -1788,18 +1794,18 @@ bool QGuiApplication::compressEvent(QEvent *event, QObject *receiver, QPostEvent
return QCoreApplication::compressEvent(event, receiver, postedEvents);
}
-void QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(QWindow *window, QEvent *event)
+bool QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(QWindow *window, QEvent *event)
{
if (!window)
- return;
+ return false;
QPlatformWindow *platformWindow = window->handle();
if (!platformWindow)
- return;
+ return false;
// spontaneous events come from the platform integration already, we don't need to send the events back
if (event->spontaneous())
- return;
+ return false;
// let the platform window do any handling it needs to as well
- platformWindow->windowEvent(event);
+ return platformWindow->windowEvent(event);
}
bool QGuiApplicationPrivate::processNativeEvent(QWindow *window, const QByteArray &eventType, void *message, long *result)
@@ -1809,7 +1815,7 @@ bool QGuiApplicationPrivate::processNativeEvent(QWindow *window, const QByteArra
void QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *e)
{
- Q_TRACE(qguiapplicationprivate_processwsevents_entry, e->type);
+ Q_TRACE(QGuiApplicationPrivate_processWindowSystemEvent_entry, e->type);
switch(e->type) {
case QWindowSystemInterfacePrivate::Mouse:
@@ -1920,7 +1926,7 @@ void QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePriv
break;
}
- Q_TRACE(qguiapplicationprivate_processwsevents_exit, e->type);
+ Q_TRACE(QGuiApplicationPrivate_processWindowSystemEvent_exit, e->type);
}
/*! \internal
@@ -3047,9 +3053,56 @@ void QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::E
#if QT_CONFIG(draganddrop)
-QPlatformDragQtResponse QGuiApplicationPrivate::processDrag(QWindow *w, const QMimeData *dropData, const QPoint &p, Qt::DropActions supportedActions)
+/*! \internal
+
+ This function updates an internal state to keep the source compatibility. Documentation of
+ QGuiApplication::mouseButtons() states - "The current state is updated synchronously as
+ the event queue is emptied of events that will spontaneously change the mouse state
+ (QEvent::MouseButtonPress and QEvent::MouseButtonRelease events)". But internally we have
+ been updating these state variables from various places to keep buttons returned by
+ mouseButtons() in sync with the systems state. This is not the documented behavior.
+
+ ### Qt6 - Remove QGuiApplication::mouseButtons()/keyboardModifiers() API? And here
+ are the reasons:
+
+ - It is an easy to misuse API by:
+
+ a) Application developers: The only place where the values of this API can be trusted is
+ when using within mouse handling callbacks. In these callbacks we work with the state
+ that was provided directly by the windowing system. Anywhere else it might not reflect what
+ user wrongly expects. We might not always receive a matching mouse release for a press event
+ (e.g. When dismissing a popup window on X11. Or when dnd enter Qt application with mouse
+ button down, we update mouse_buttons and then dnd leaves Qt application and does a drop
+ somewhere else) and hence mouseButtons() will be out-of-sync from users perspective, see
+ for example QTBUG-33161. BUT THIS IS NOT HOW THE API IS SUPPOSED TO BE USED. Since the only
+ safe place to use this API is from mouse event handlers, we might as well deprecate it and
+ pass down the button state if we are not already doing that everywhere where it matters.
+
+ b) Qt framework developers:
+
+ We see users complaining, we start adding hacks everywhere just to keep buttons in sync ;)
+ There are corner cases that can not be solved and adding this kind of hacks is never ending
+ task.
+
+ - Real mouse events, tablet mouse events, etc: all go through QGuiApplication::processMouseEvent,
+ and all share mouse_buttons. What if we want to support multiple mice in future? The API must
+ go.
+
+ - Motivation why this API is public is not clear. Could the same be achieved by a user by
+ installing an event filter?
+*/
+static void updateMouseAndModifierButtonState(Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)
{
- static QPointer<QWindow> currentDragWindow;
+ QGuiApplicationPrivate::mouse_buttons = buttons;
+ QGuiApplicationPrivate::modifier_buttons = modifiers;
+}
+
+QPlatformDragQtResponse QGuiApplicationPrivate::processDrag(QWindow *w, const QMimeData *dropData,
+ const QPoint &p, Qt::DropActions supportedActions,
+ Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)
+{
+ updateMouseAndModifierButtonState(buttons, modifiers);
+
static Qt::DropAction lastAcceptedDropAction = Qt::IgnoreAction;
QPlatformDrag *platformDrag = platformIntegration()->drag();
if (!platformDrag || (w && w->d_func()->blockedByModalWindow)) {
@@ -3058,15 +3111,13 @@ QPlatformDragQtResponse QGuiApplicationPrivate::processDrag(QWindow *w, const QM
}
if (!dropData) {
- if (currentDragWindow.data() == w)
- currentDragWindow = 0;
+ currentDragWindow = nullptr;
QDragLeaveEvent e;
QGuiApplication::sendEvent(w, &e);
lastAcceptedDropAction = Qt::IgnoreAction;
return QPlatformDragQtResponse(false, lastAcceptedDropAction, QRect());
}
- QDragMoveEvent me(p, supportedActions, dropData,
- QGuiApplication::mouseButtons(), QGuiApplication::keyboardModifiers());
+ QDragMoveEvent me(p, supportedActions, dropData, buttons, modifiers);
if (w != currentDragWindow) {
lastAcceptedDropAction = Qt::IgnoreAction;
@@ -3075,8 +3126,7 @@ QPlatformDragQtResponse QGuiApplicationPrivate::processDrag(QWindow *w, const QM
QGuiApplication::sendEvent(currentDragWindow, &e);
}
currentDragWindow = w;
- QDragEnterEvent e(p, supportedActions, dropData,
- QGuiApplication::mouseButtons(), QGuiApplication::keyboardModifiers());
+ QDragEnterEvent e(p, supportedActions, dropData, buttons, modifiers);
QGuiApplication::sendEvent(w, &e);
if (e.isAccepted() && e.dropAction() != Qt::IgnoreAction)
lastAcceptedDropAction = e.dropAction();
@@ -3094,10 +3144,15 @@ QPlatformDragQtResponse QGuiApplicationPrivate::processDrag(QWindow *w, const QM
return QPlatformDragQtResponse(me.isAccepted(), lastAcceptedDropAction, me.answerRect());
}
-QPlatformDropQtResponse QGuiApplicationPrivate::processDrop(QWindow *w, const QMimeData *dropData, const QPoint &p, Qt::DropActions supportedActions)
+QPlatformDropQtResponse QGuiApplicationPrivate::processDrop(QWindow *w, const QMimeData *dropData,
+ const QPoint &p, Qt::DropActions supportedActions,
+ Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)
{
- QDropEvent de(p, supportedActions, dropData,
- QGuiApplication::mouseButtons(), QGuiApplication::keyboardModifiers());
+ updateMouseAndModifierButtonState(buttons, modifiers);
+
+ currentDragWindow = nullptr;
+
+ QDropEvent de(p, supportedActions, dropData, buttons, modifiers);
QGuiApplication::sendEvent(w, &de);
Qt::DropAction acceptedAction = de.isAccepted() ? de.dropAction() : Qt::IgnoreAction;
diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h
index 2fefaf0af6..145e764244 100644
--- a/src/gui/kernel/qguiapplication_p.h
+++ b/src/gui/kernel/qguiapplication_p.h
@@ -163,13 +163,17 @@ public:
#endif
#if QT_CONFIG(draganddrop)
- static QPlatformDragQtResponse processDrag(QWindow *w, const QMimeData *dropData, const QPoint &p, Qt::DropActions supportedActions);
- static QPlatformDropQtResponse processDrop(QWindow *w, const QMimeData *dropData, const QPoint &p, Qt::DropActions supportedActions);
+ static QPlatformDragQtResponse processDrag(QWindow *w, const QMimeData *dropData,
+ const QPoint &p, Qt::DropActions supportedActions,
+ Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers);
+ static QPlatformDropQtResponse processDrop(QWindow *w, const QMimeData *dropData,
+ const QPoint &p, Qt::DropActions supportedActions,
+ Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers);
#endif
static bool processNativeEvent(QWindow *window, const QByteArray &eventType, void *message, long *result);
- static void sendQWindowEventToQPlatformWindow(QWindow *window, QEvent *event);
+ static bool sendQWindowEventToQPlatformWindow(QWindow *window, QEvent *event);
static inline Qt::Alignment visualAlignment(Qt::LayoutDirection direction, Qt::Alignment alignment)
{
@@ -213,6 +217,7 @@ public:
static QWindow *currentMousePressWindow;
static Qt::ApplicationState applicationState;
static bool highDpiScalingUpdated;
+ static QPointer<QWindow> currentDragWindow;
struct TabletPointData {
TabletPointData(qint64 devId = 0) : deviceId(devId), state(Qt::NoButton), target(nullptr) {}
diff --git a/src/gui/kernel/qhighdpiscaling.cpp b/src/gui/kernel/qhighdpiscaling.cpp
index 8689f9f3b1..a455aa639d 100644
--- a/src/gui/kernel/qhighdpiscaling.cpp
+++ b/src/gui/kernel/qhighdpiscaling.cpp
@@ -244,7 +244,8 @@ static inline bool usePixelDensity()
return false;
return QCoreApplication::testAttribute(Qt::AA_EnableHighDpiScaling)
|| (screenEnvValueOk && screenEnvValue > 0)
- || (qEnvironmentVariableIsSet(legacyDevicePixelEnvVar) && qgetenv(legacyDevicePixelEnvVar).toLower() == "auto");
+ || (qEnvironmentVariableIsSet(legacyDevicePixelEnvVar) &&
+ qgetenv(legacyDevicePixelEnvVar).compare("auto", Qt::CaseInsensitive) == 0);
}
void QHighDpiScaling::initHighDpiScaling()
diff --git a/src/gui/kernel/qpalette.cpp b/src/gui/kernel/qpalette.cpp
index 4905e51e01..9ccfb9b819 100644
--- a/src/gui/kernel/qpalette.cpp
+++ b/src/gui/kernel/qpalette.cpp
@@ -316,6 +316,21 @@ static void qt_palette_from_color(QPalette &pal, const QColor &button)
*/
/*!
+ \fn const QBrush & QPalette::placeholderText() const
+ \since 5.12
+
+ Returns the placeholder text brush of the current color group.
+
+ \note Before Qt 5.12, the placeholder text color was hard-coded in the code as
+ QPalette::text().color() where an alpha of 128 was applied.
+ We continue to support this behavior by default, unless you set your own brush.
+ One can get back the original placeholder color setting the special QBrush default
+ constructor as placeholder brush.
+
+ \sa ColorRole, brush()
+*/
+
+/*!
\fn ColorGroup QPalette::currentColorGroup() const
Returns the palette's current color group.
@@ -444,6 +459,9 @@ static void qt_palette_from_color(QPalette &pal, const QColor &button)
of QPalette, because tool tips are not active
windows.
+ \value PlaceholderText Used as the placeholder color for various text input widgets.
+ This enum value has been introduced in Qt 5.12
+
\value Text The foreground color used with \c Base. This is usually
the same as the \c WindowText, in which case it must provide
good contrast with \c Window and \c Base.
@@ -765,11 +783,32 @@ void QPalette::setBrush(ColorGroup cg, ColorRole cr, const QBrush &b)
cg = Active;
}
+ // For placeholder we want to continue to respect the original behavior, which is
+ // derivating the text color, but only if user has not yet set his own brush.
+ // We then use Qt::NoBrush as an inernal way to know if the brush is customized or not.
+
+ // ### Qt 6 - remove this special case
+ // Part 1 - Restore initial color to the given color group
+ if (cr == PlaceholderText && b == QBrush()) {
+ QColor col = brush(Text).color();
+ col.setAlpha(128);
+ setBrush(cg, PlaceholderText, QBrush(col, Qt::NoBrush));
+ return;
+ }
+
if (d->br[cg][cr] != b) {
detach();
d->br[cg][cr] = b;
}
data.resolve_mask |= (1<<cr);
+
+ // ### Qt 6 - remove this special case
+ // Part 2 - Update initial color to the given color group
+ if (cr == Text && d->br[cg][PlaceholderText].style() == Qt::NoBrush) {
+ QColor col = brush(Text).color();
+ col.setAlpha(128);
+ setBrush(cg, PlaceholderText, QBrush(col, Qt::NoBrush));
+ }
}
/*!
@@ -962,7 +1001,7 @@ QDataStream &operator<<(QDataStream &s, const QPalette &p)
for (int i = 0; i < NumOldRoles; ++i)
s << p.d->br[grp][oldRoles[i]].color();
} else {
- int max = QPalette::ToolTipText + 1;
+ int max = (int)QPalette::NColorRoles;
if (s.version() <= QDataStream::Qt_2_1)
max = QPalette::HighlightedText + 1;
else if (s.version() <= QDataStream::Qt_4_3)
@@ -1159,7 +1198,7 @@ QDebug operator<<(QDebug dbg, const QPalette &p)
{"WindowText", "Button", "Light", "Midlight", "Dark", "Mid", "Text",
"BrightText", "ButtonText", "Base", "Window", "Shadow", "Highlight",
"HighlightedText", "Link", "LinkVisited", "AlternateBase", "NoRole",
- "ToolTipBase","ToolTipText" };
+ "ToolTipBase","ToolTipText", "PlaceholderText" };
QDebugStateSaver saver(dbg);
QDebug nospace = dbg.nospace();
const uint mask = p.resolve();
diff --git a/src/gui/kernel/qpalette.h b/src/gui/kernel/qpalette.h
index 71f3d0c3b8..071eddbc4d 100644
--- a/src/gui/kernel/qpalette.h
+++ b/src/gui/kernel/qpalette.h
@@ -96,7 +96,8 @@ public:
AlternateBase,
NoRole,
ToolTipBase, ToolTipText,
- NColorRoles = ToolTipText + 1,
+ PlaceholderText,
+ NColorRoles = PlaceholderText + 1,
Foreground = WindowText, Background = Window
};
Q_ENUM(ColorRole)
@@ -141,6 +142,7 @@ public:
inline const QBrush &highlightedText() const { return brush(HighlightedText); }
inline const QBrush &link() const { return brush(Link); }
inline const QBrush &linkVisited() const { return brush(LinkVisited); }
+ inline const QBrush &placeholderText() const { return brush(PlaceholderText); }
bool operator==(const QPalette &p) const;
inline bool operator!=(const QPalette &p) const { return !(operator==(p)); }
diff --git a/src/gui/kernel/qplatformdialoghelper.h b/src/gui/kernel/qplatformdialoghelper.h
index f58dcf17f0..64b703e524 100644
--- a/src/gui/kernel/qplatformdialoghelper.h
+++ b/src/gui/kernel/qplatformdialoghelper.h
@@ -150,6 +150,7 @@ public:
MacModelessLayout,
AndroidLayout
};
+ Q_ENUM(ButtonLayout)
QPlatformDialogHelper();
virtual ~QPlatformDialogHelper();
diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp
index dfb8f60915..6e285a8fa5 100644
--- a/src/gui/kernel/qplatformintegration.cpp
+++ b/src/gui/kernel/qplatformintegration.cpp
@@ -99,8 +99,8 @@ QPlatformClipboard *QPlatformIntegration::clipboard() const
/*!
Accessor for the platform integration's drag object.
- Default implementation returns 0, implying no drag and drop support.
-
+ Default implementation returns QSimpleDrag. This class supports only drag
+ and drop operations within the same Qt application.
*/
QPlatformDrag *QPlatformIntegration::drag() const
{
diff --git a/src/gui/kernel/qplatformmenu.h b/src/gui/kernel/qplatformmenu.h
index e3fa5c71b1..28c29a704c 100644
--- a/src/gui/kernel/qplatformmenu.h
+++ b/src/gui/kernel/qplatformmenu.h
@@ -158,6 +158,7 @@ public:
virtual void removeMenu(QPlatformMenu *menu) = 0;
virtual void syncMenu(QPlatformMenu *menuItem) = 0;
virtual void handleReparent(QWindow *newParentWindow) = 0;
+ virtual QWindow *parentWindow() const { return nullptr; }
virtual QPlatformMenu *menuForTag(quintptr tag) const = 0;
virtual QPlatformMenu *createMenu() const;
diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp
index a66420c364..e83f76fb06 100644
--- a/src/gui/kernel/qplatformwindow.cpp
+++ b/src/gui/kernel/qplatformwindow.cpp
@@ -340,6 +340,20 @@ void QPlatformWindow::setWindowFilePath(const QString &filePath) { Q_UNUSED(file
void QPlatformWindow::setWindowIcon(const QIcon &icon) { Q_UNUSED(icon); }
/*!
+ Reimplement to let the platform handle non-spontaneous window close.
+
+ When reimplementing make sure to call the base class implementation
+ or QWindowSystemInterface::handleCloseEvent(), which will prompt the
+ user to accept the window close (if needed) and then close the QWindow.
+*/
+bool QPlatformWindow::close()
+{
+ bool accepted = false;
+ QWindowSystemInterface::handleCloseEvent<QWindowSystemInterface::SynchronousDelivery>(window(), &accepted);
+ return accepted;
+}
+
+/*!
Reimplement to be able to let Qt raise windows to the top of the desktop
*/
void QPlatformWindow::raise() { qWarning("This plugin does not support raise()"); }
@@ -447,14 +461,26 @@ bool QPlatformWindow::setWindowModified(bool modified)
/*!
Reimplement this method to be able to do any platform specific event
- handling. All events for window() are passed to this function before being
- sent to QWindow::event().
+ handling. All non-synthetic events for window() are passed to this
+ function before being sent to QWindow::event().
- The default implementation is empty and does nothing with \a event.
+ Return true if the event should not be passed on to the QWindow.
+
+ Subclasses should always call the base class implementation.
*/
-void QPlatformWindow::windowEvent(QEvent *event)
+bool QPlatformWindow::windowEvent(QEvent *event)
{
- Q_UNUSED(event);
+ Q_D(QPlatformWindow);
+
+ if (event->type() == QEvent::Timer) {
+ if (static_cast<QTimerEvent *>(event)->timerId() == d->updateTimer.timerId()) {
+ d->updateTimer.stop();
+ deliverUpdateRequest();
+ return true;
+ }
+ }
+
+ return false;
}
/*!
@@ -710,7 +736,7 @@ QRect QPlatformWindow::initialGeometry(const QWindow *w,
QPlatformWindow subclasses can re-implement this function to
provide display refresh synchronized updates. The event
- should be delivered using QWindowPrivate::deliverUpdateRequest()
+ should be delivered using QPlatformWindow::deliverUpdateRequest()
to not get out of sync with the the internal state of QWindow.
The default implementation posts an UpdateRequest event to the
@@ -720,18 +746,44 @@ QRect QPlatformWindow::initialGeometry(const QWindow *w,
*/
void QPlatformWindow::requestUpdate()
{
- static int timeout = -1;
- if (timeout == -1) {
+ Q_D(QPlatformWindow);
+
+ static int updateInterval = []() {
bool ok = false;
- timeout = qEnvironmentVariableIntValue("QT_QPA_UPDATE_IDLE_TIME", &ok);
- if (!ok)
- timeout = 5;
- }
+ int customUpdateInterval = qEnvironmentVariableIntValue("QT_QPA_UPDATE_IDLE_TIME", &ok);
+ return ok ? customUpdateInterval : 5;
+ }();
+
+ Q_ASSERT(!d->updateTimer.isActive());
+ d->updateTimer.start(updateInterval, Qt::PreciseTimer, window());
+}
+
+/*!
+ Returns true if the window has a pending update request.
+
+ \sa requestUpdate(), deliverUpdateRequest()
+*/
+bool QPlatformWindow::hasPendingUpdateRequest() const
+{
+ return qt_window_private(window())->updateRequestPending;
+}
+
+/*!
+ Delivers an QEvent::UpdateRequest event to the window.
+
+ QPlatformWindow subclasses can re-implement this function to
+ provide e.g. logging or tracing of the delivery, but should
+ always call the base class function.
+*/
+void QPlatformWindow::deliverUpdateRequest()
+{
+ Q_ASSERT(hasPendingUpdateRequest());
QWindow *w = window();
- QWindowPrivate *wp = (QWindowPrivate *) QObjectPrivate::get(w);
- Q_ASSERT(wp->updateTimer == 0);
- wp->updateTimer = w->startTimer(timeout, Qt::PreciseTimer);
+ QWindowPrivate *wp = qt_window_private(w);
+ wp->updateRequestPending = false;
+ QEvent request(QEvent::UpdateRequest);
+ QCoreApplication::sendEvent(w, &request);
}
/*!
diff --git a/src/gui/kernel/qplatformwindow.h b/src/gui/kernel/qplatformwindow.h
index 84dff681d5..1590a10554 100644
--- a/src/gui/kernel/qplatformwindow.h
+++ b/src/gui/kernel/qplatformwindow.h
@@ -100,6 +100,7 @@ public:
virtual void setWindowTitle(const QString &title);
virtual void setWindowFilePath(const QString &title);
virtual void setWindowIcon(const QIcon &icon);
+ virtual bool close();
virtual void raise();
virtual void lower();
@@ -126,7 +127,7 @@ public:
virtual bool setWindowModified(bool modified);
- virtual void windowEvent(QEvent *event);
+ virtual bool windowEvent(QEvent *event);
virtual bool startSystemResize(const QPoint &pos, Qt::Corner corner);
virtual bool startSystemMove(const QPoint &pos);
@@ -143,6 +144,8 @@ public:
const QRect &initialGeometry, int defaultWidth, int defaultHeight);
virtual void requestUpdate();
+ bool hasPendingUpdateRequest() const;
+ virtual void deliverUpdateRequest();
// Window property accessors. Platform plugins should use these
// instead of accessing QWindow directly.
diff --git a/src/gui/kernel/qplatformwindow_p.h b/src/gui/kernel/qplatformwindow_p.h
index 62ecd61d9e..00dae9334c 100644
--- a/src/gui/kernel/qplatformwindow_p.h
+++ b/src/gui/kernel/qplatformwindow_p.h
@@ -52,6 +52,7 @@
//
#include <QtGui/private/qtguiglobal_p.h>
+#include <QtCore/qbasictimer.h>
#include <QtCore/qrect.h>
QT_BEGIN_NAMESPACE
@@ -60,6 +61,7 @@ class QPlatformWindowPrivate
{
public:
QRect rect;
+ QBasicTimer updateTimer;
};
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qshortcutmap.cpp b/src/gui/kernel/qshortcutmap.cpp
index fa1eb6f6bf..3bb42c1c0b 100644
--- a/src/gui/kernel/qshortcutmap.cpp
+++ b/src/gui/kernel/qshortcutmap.cpp
@@ -540,6 +540,19 @@ void QShortcutMap::createNewSequences(QKeyEvent *e, QVector<QKeySequence> &ksl,
{
Q_D(QShortcutMap);
QList<int> possibleKeys = QKeyMapper::possibleKeys(e);
+#if defined(DEBUG_QSHORTCUTMAP)
+ {
+ QDebug debug = qDebug().nospace();
+ debug << __FUNCTION__ << '(' << e << ", ignoredModifiers="
+ << Qt::KeyboardModifiers(ignoredModifiers) << "), possibleKeys=(";
+ for (int i = 0, size = possibleKeys.size(); i < size; ++i) {
+ if (i)
+ debug << ", ";
+ debug << QKeySequence(possibleKeys.at(i));
+ }
+ debug << ')';
+ }
+#endif // DEBUG_QSHORTCUTMAP
int pkTotal = possibleKeys.count();
if (!pkTotal)
return;
diff --git a/src/gui/kernel/qsimpledrag.cpp b/src/gui/kernel/qsimpledrag.cpp
index 12e204a09f..a84f873437 100644
--- a/src/gui/kernel/qsimpledrag.cpp
+++ b/src/gui/kernel/qsimpledrag.cpp
@@ -94,11 +94,7 @@ static QWindow* topLevelAt(const QPoint &pos)
(within the Qt application or outside) accepts the drag and sets the state accordingly.
*/
-QBasicDrag::QBasicDrag() :
- m_current_window(nullptr), m_restoreCursor(false), m_eventLoop(nullptr),
- m_executed_drop_action(Qt::IgnoreAction), m_can_drop(false),
- m_drag(nullptr), m_drag_icon_window(nullptr), m_useCompositing(true),
- m_screen(nullptr)
+QBasicDrag::QBasicDrag()
{
}
@@ -158,7 +154,8 @@ bool QBasicDrag::eventFilter(QObject *o, QEvent *e)
case QEvent::MouseMove:
{
QPoint nativePosition = getNativeMousePos(e, m_drag_icon_window);
- move(nativePosition);
+ auto mouseMove = static_cast<QMouseEvent *>(e);
+ move(nativePosition, mouseMove->buttons(), mouseMove->modifiers());
return true; // Eat all mouse move events
}
case QEvent::MouseButtonRelease:
@@ -166,7 +163,8 @@ bool QBasicDrag::eventFilter(QObject *o, QEvent *e)
disableEventFilter();
if (canDrop()) {
QPoint nativePosition = getNativeMousePos(e, m_drag_icon_window);
- drop(nativePosition);
+ auto mouseRelease = static_cast<QMouseEvent *>(e);
+ drop(nativePosition, mouseRelease->buttons(), mouseRelease->modifiers());
} else {
cancel();
}
@@ -179,9 +177,9 @@ bool QBasicDrag::eventFilter(QObject *o, QEvent *e)
// make the event relative to the window where the drag started. (QTBUG-66103)
const QMouseEvent *release = static_cast<QMouseEvent *>(e);
const QWindow *releaseWindow = topLevelAt(release->globalPos());
- qCDebug(lcDnd) << "mouse released over" << releaseWindow << "after drag from" << m_current_window << "globalPos" << release->globalPos();
+ qCDebug(lcDnd) << "mouse released over" << releaseWindow << "after drag from" << m_sourceWindow << "globalPos" << release->globalPos();
if (!releaseWindow)
- releaseWindow = m_current_window;
+ releaseWindow = m_sourceWindow;
QPoint releaseWindowPos = (releaseWindow ? releaseWindow->mapFromGlobal(release->globalPos()) : release->globalPos());
QMouseEvent *newRelease = new QMouseEvent(release->type(),
releaseWindowPos, releaseWindowPos, release->screenPos(),
@@ -204,18 +202,15 @@ Qt::DropAction QBasicDrag::drag(QDrag *o)
m_drag = o;
m_executed_drop_action = Qt::IgnoreAction;
m_can_drop = false;
- m_restoreCursor = true;
-#ifndef QT_NO_CURSOR
- qApp->setOverrideCursor(Qt::DragCopyCursor);
- updateCursor(m_executed_drop_action);
-#endif
+
startDrag();
m_eventLoop = new QEventLoop;
m_eventLoop->exec();
delete m_eventLoop;
- m_eventLoop = 0;
- m_drag = 0;
+ m_eventLoop = nullptr;
+ m_drag = nullptr;
endDrag();
+
return m_executed_drop_action;
}
@@ -227,16 +222,6 @@ void QBasicDrag::cancelDrag()
}
}
-void QBasicDrag::restoreCursor()
-{
- if (m_restoreCursor) {
-#ifndef QT_NO_CURSOR
- QGuiApplication::restoreOverrideCursor();
-#endif
- m_restoreCursor = false;
- }
-}
-
void QBasicDrag::startDrag()
{
QPoint pos;
@@ -287,7 +272,7 @@ void QBasicDrag::moveShapedPixmapWindow(const QPoint &globalPos)
m_drag_icon_window->updateGeometry(globalPos);
}
-void QBasicDrag::drop(const QPoint &)
+void QBasicDrag::drop(const QPoint &, Qt::MouseButtons, Qt::KeyboardModifiers)
{
disableEventFilter();
restoreCursor();
@@ -318,25 +303,34 @@ void QBasicDrag::updateCursor(Qt::DropAction action)
}
}
- QCursor *cursor = QGuiApplication::overrideCursor();
QPixmap pixmap = m_drag->dragCursor(action);
- if (!cursor) {
- QGuiApplication::changeOverrideCursor((pixmap.isNull()) ? QCursor(cursorShape) : QCursor(pixmap));
+
+ if (!m_dndHasSetOverrideCursor) {
+ QCursor newCursor = !pixmap.isNull() ? QCursor(pixmap) : QCursor(cursorShape);
+ QGuiApplication::setOverrideCursor(newCursor);
+ m_dndHasSetOverrideCursor = true;
} else {
+ QCursor *cursor = QGuiApplication::overrideCursor();
if (!pixmap.isNull()) {
- if ((cursor->pixmap().cacheKey() != pixmap.cacheKey())) {
+ if (cursor->pixmap().cacheKey() != pixmap.cacheKey())
QGuiApplication::changeOverrideCursor(QCursor(pixmap));
- }
- } else {
- if (cursorShape != cursor->shape()) {
- QGuiApplication::changeOverrideCursor(QCursor(cursorShape));
- }
+ } else if (cursorShape != cursor->shape()) {
+ QGuiApplication::changeOverrideCursor(QCursor(cursorShape));
}
}
#endif
updateAction(action);
}
+void QBasicDrag::restoreCursor()
+{
+#ifndef QT_NO_CURSOR
+ if (m_dndHasSetOverrideCursor) {
+ QGuiApplication::restoreOverrideCursor();
+ m_dndHasSetOverrideCursor = false;
+ }
+#endif
+}
static inline QPoint fromNativeGlobalPixels(const QPoint &point)
{
@@ -374,57 +368,83 @@ QSimpleDrag::QSimpleDrag()
void QSimpleDrag::startDrag()
{
+ setExecutedDropAction(Qt::IgnoreAction);
+
QBasicDrag::startDrag();
- m_current_window = topLevelAt(QCursor::pos());
- if (m_current_window) {
- QPlatformDragQtResponse response = QWindowSystemInterface::handleDrag(m_current_window, drag()->mimeData(), QHighDpi::toNativePixels(QCursor::pos(), m_current_window), drag()->supportedActions());
- setCanDrop(response.isAccepted());
- updateCursor(response.acceptedAction());
+ // Here we can be fairly sure that QGuiApplication::mouseButtons/keyboardModifiers() will
+ // contain sensible values as startDrag() normally is called from mouse event handlers
+ // by QDrag::exec(). A better API would be if we could pass something like "input device
+ // pointer" to QDrag::exec(). My guess is that something like that might be required for
+ // QTBUG-52430.
+ m_sourceWindow = topLevelAt(QCursor::pos());
+ m_windowUnderCursor = m_sourceWindow;
+ if (m_sourceWindow) {
+ auto nativePixelPos = QHighDpi::toNativePixels(QCursor::pos(), m_sourceWindow);
+ move(nativePixelPos, QGuiApplication::mouseButtons(), QGuiApplication::keyboardModifiers());
} else {
setCanDrop(false);
updateCursor(Qt::IgnoreAction);
}
- setExecutedDropAction(Qt::IgnoreAction);
- qCDebug(lcDnd) << "drag began from" << m_current_window<< "cursor pos" << QCursor::pos() << "can drop?" << canDrop();
+
+ qCDebug(lcDnd) << "drag began from" << m_sourceWindow << "cursor pos" << QCursor::pos() << "can drop?" << canDrop();
+}
+
+static void sendDragLeave(QWindow *window)
+{
+ QWindowSystemInterface::handleDrag(window, nullptr, QPoint(), Qt::IgnoreAction, 0, 0);
}
void QSimpleDrag::cancel()
{
QBasicDrag::cancel();
- if (drag() && m_current_window) {
- QWindowSystemInterface::handleDrag(m_current_window, 0, QPoint(), Qt::IgnoreAction);
- m_current_window = 0;
+ if (drag() && m_sourceWindow) {
+ sendDragLeave(m_sourceWindow);
+ m_sourceWindow = nullptr;
}
}
-void QSimpleDrag::move(const QPoint &nativeGlobalPos)
+void QSimpleDrag::move(const QPoint &nativeGlobalPos, Qt::MouseButtons buttons,
+ Qt::KeyboardModifiers modifiers)
{
QPoint globalPos = fromNativeGlobalPixels(nativeGlobalPos);
moveShapedPixmapWindow(globalPos);
QWindow *window = topLevelAt(globalPos);
- if (!window)
- return;
+
+ if (!window || window != m_windowUnderCursor) {
+ if (m_windowUnderCursor)
+ sendDragLeave(m_windowUnderCursor);
+ m_windowUnderCursor = window;
+ if (!window) {
+ // QSimpleDrag supports only in-process dnd, we can't drop anywhere else.
+ setCanDrop(false);
+ updateCursor(Qt::IgnoreAction);
+ return;
+ }
+ }
const QPoint pos = nativeGlobalPos - window->handle()->geometry().topLeft();
- const QPlatformDragQtResponse qt_response =
- QWindowSystemInterface::handleDrag(window, drag()->mimeData(), pos, drag()->supportedActions());
+ const QPlatformDragQtResponse qt_response = QWindowSystemInterface::handleDrag(
+ window, drag()->mimeData(), pos, drag()->supportedActions(),
+ buttons, modifiers);
- updateCursor(qt_response.acceptedAction());
setCanDrop(qt_response.isAccepted());
+ updateCursor(qt_response.acceptedAction());
}
-void QSimpleDrag::drop(const QPoint &nativeGlobalPos)
+void QSimpleDrag::drop(const QPoint &nativeGlobalPos, Qt::MouseButtons buttons,
+ Qt::KeyboardModifiers modifiers)
{
QPoint globalPos = fromNativeGlobalPixels(nativeGlobalPos);
- QBasicDrag::drop(nativeGlobalPos);
+ QBasicDrag::drop(nativeGlobalPos, buttons, modifiers);
QWindow *window = topLevelAt(globalPos);
if (!window)
return;
const QPoint pos = nativeGlobalPos - window->handle()->geometry().topLeft();
- const QPlatformDropQtResponse response =
- QWindowSystemInterface::handleDrop(window, drag()->mimeData(),pos, drag()->supportedActions());
+ const QPlatformDropQtResponse response = QWindowSystemInterface::handleDrop(
+ window, drag()->mimeData(), pos, drag()->supportedActions(),
+ buttons, modifiers);
if (response.isAccepted()) {
setExecutedDropAction(response.acceptedAction());
} else {
diff --git a/src/gui/kernel/qsimpledrag_p.h b/src/gui/kernel/qsimpledrag_p.h
index d980a3c49d..f9e8a83a39 100644
--- a/src/gui/kernel/qsimpledrag_p.h
+++ b/src/gui/kernel/qsimpledrag_p.h
@@ -55,13 +55,14 @@
#include <qpa/qplatformdrag.h>
#include <QtCore/QObject>
+#include <QtCore/QPointer>
+#include <QtGui/QWindow>
QT_REQUIRE_CONFIG(draganddrop);
QT_BEGIN_NAMESPACE
class QMouseEvent;
-class QWindow;
class QEventLoop;
class QDropData;
class QShapedPixmapWindow;
@@ -82,8 +83,8 @@ protected:
virtual void startDrag();
virtual void cancel();
- virtual void move(const QPoint &globalPos) = 0;
- virtual void drop(const QPoint &globalPos) = 0;
+ virtual void move(const QPoint &globalPos, Qt::MouseButtons b, Qt::KeyboardModifiers mods) = 0;
+ virtual void drop(const QPoint &globalPos, Qt::MouseButtons b, Qt::KeyboardModifiers mods) = 0;
virtual void endDrag();
@@ -106,7 +107,8 @@ protected:
QDrag *drag() const { return m_drag; }
protected:
- QWindow *m_current_window;
+ QWindow *m_sourceWindow = nullptr;
+ QPointer<QWindow> m_windowUnderCursor = nullptr;
private:
void enableEventFilter();
@@ -114,14 +116,16 @@ private:
void restoreCursor();
void exitDndEventLoop();
- bool m_restoreCursor;
- QEventLoop *m_eventLoop;
- Qt::DropAction m_executed_drop_action;
- bool m_can_drop;
- QDrag *m_drag;
- QShapedPixmapWindow *m_drag_icon_window;
- bool m_useCompositing;
- QScreen *m_screen;
+#ifndef QT_NO_CURSOR
+ bool m_dndHasSetOverrideCursor = false;
+#endif
+ QEventLoop *m_eventLoop = nullptr;
+ Qt::DropAction m_executed_drop_action = Qt::IgnoreAction;
+ bool m_can_drop = false;
+ QDrag *m_drag = nullptr;
+ QShapedPixmapWindow *m_drag_icon_window = nullptr;
+ bool m_useCompositing = true;
+ QScreen *m_screen = nullptr;
};
class Q_GUI_EXPORT QSimpleDrag : public QBasicDrag
@@ -132,8 +136,8 @@ public:
protected:
virtual void startDrag() override;
virtual void cancel() override;
- virtual void move(const QPoint &globalPos) override;
- virtual void drop(const QPoint &globalPos) override;
+ virtual void move(const QPoint &globalPos, Qt::MouseButtons b, Qt::KeyboardModifiers mods) override;
+ virtual void drop(const QPoint &globalPos, Qt::MouseButtons b, Qt::KeyboardModifiers mods) override;
};
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qsurface.cpp b/src/gui/kernel/qsurface.cpp
index 63651ee822..415e64b39c 100644
--- a/src/gui/kernel/qsurface.cpp
+++ b/src/gui/kernel/qsurface.cpp
@@ -80,6 +80,10 @@ QT_BEGIN_NAMESPACE
in conjunction with OpenVG contexts.
\value VulkanSurface The surface is a Vulkan compatible surface and can be used
in conjunction with the Vulkan graphics API.
+ \value MetalSurface The surface is a Metal compatible surface and can be used
+ in conjunction with Apple's Metal graphics API. This surface type is supported
+ on macOS only.
+
*/
diff --git a/src/gui/kernel/qsurface.h b/src/gui/kernel/qsurface.h
index 7e09449d12..e3e5106e3a 100644
--- a/src/gui/kernel/qsurface.h
+++ b/src/gui/kernel/qsurface.h
@@ -66,7 +66,8 @@ public:
OpenGLSurface,
RasterGLSurface,
OpenVGSurface,
- VulkanSurface
+ VulkanSurface,
+ MetalSurface
};
virtual ~QSurface();
diff --git a/src/gui/kernel/qtestsupport_gui.cpp b/src/gui/kernel/qtestsupport_gui.cpp
new file mode 100644
index 0000000000..56e0eb52b3
--- /dev/null
+++ b/src/gui/kernel/qtestsupport_gui.cpp
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtTest 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qtestsupport_gui.h"
+#include "qwindow.h"
+
+#include <QtCore/qtestsupport_core.h>
+
+QT_BEGIN_NAMESPACE
+
+/*! \fn bool qWaitForWindowActive(QWindow *window, int timeout)
+ \relates QTest
+ \since 5.0
+
+ Waits for \a timeout milliseconds or until the \a window is active.
+
+ Returns \c true if \c window is active within \a timeout milliseconds, otherwise returns \c false.
+
+ \sa QTest::qWaitForWindowExposed(), QWindow::isActive()
+*/
+Q_GUI_EXPORT bool QTest::qWaitForWindowActive(QWindow *window, int timeout)
+{
+ return QTest::qWaitFor([&]() { return window->isActive(); }, timeout);
+}
+
+/*! \fn bool qWaitForWindowExposed(QWindow *window, int timeout)
+ \relates QTest
+ \since 5.0
+
+ Waits for \a timeout milliseconds or until the \a window is exposed.
+ Returns \c true if \c window is exposed within \a timeout milliseconds, otherwise returns \c false.
+
+ This is mainly useful for asynchronous systems like X11, where a window will be mapped to screen some
+ time after being asked to show itself on the screen.
+
+ Note that a window that is mapped to screen may still not be considered exposed if the window client
+ area is completely covered by other windows, or if the window is otherwise not visible. This function
+ will then time out when waiting for such a window.
+
+ \sa QTest::qWaitForWindowActive(), QWindow::isExposed()
+*/
+Q_GUI_EXPORT bool QTest::qWaitForWindowExposed(QWindow *window, int timeout)
+{
+ return QTest::qWaitFor([&]() { return window->isExposed(); }, timeout);
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/kernel/qtestsupport_gui.h b/src/gui/kernel/qtestsupport_gui.h
new file mode 100644
index 0000000000..1d84591060
--- /dev/null
+++ b/src/gui/kernel/qtestsupport_gui.h
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtTest 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QTESTSUPPORT_GUI_H
+#define QTESTSUPPORT_GUI_H
+
+#include "qtguiglobal.h"
+
+QT_BEGIN_NAMESPACE
+
+class QWindow;
+
+namespace QTest {
+Q_GUI_EXPORT Q_REQUIRED_RESULT bool qWaitForWindowActive(QWindow *window, int timeout = 5000);
+Q_GUI_EXPORT Q_REQUIRED_RESULT bool qWaitForWindowExposed(QWindow *window, int timeout = 5000);
+}
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 55fe75d220..75f63c046f 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -115,9 +115,10 @@ QT_BEGIN_NAMESPACE
physical area of the screen. On windowing systems that have exposure
notifications, the isExposed() accessor describes whether the window should
be treated as directly visible on screen. The exposeEvent() function is
- called whenever the windows exposure in the windowing system changes. On
- windowing systems that do not make this information visible to the
- application, isExposed() will simply return the same value as isVisible().
+ called whenever an area of the window is invalidated, for example due to the
+ exposure in the windowing system changing. On windowing systems that do not
+ make this information visible to the application, isExposed() will simply
+ return the same value as isVisible().
QWindow::Visibility queried through visibility() is a convenience API
combining the functions of visible() and windowStates().
@@ -2150,15 +2151,13 @@ bool QWindow::close()
if (!d->platformWindow)
return true;
- bool accepted = false;
- QWindowSystemInterface::handleCloseEvent(this, &accepted);
- QWindowSystemInterface::flushWindowSystemEvents();
- return accepted;
+ return d->platformWindow->close();
}
/*!
- The expose event (\a ev) is sent by the window system whenever the window's
- exposure on screen changes.
+ The expose event (\a ev) is sent by the window system whenever an area of
+ the window is invalidated, for example due to the exposure in the windowing
+ system changing.
The application can start rendering into the window with QBackingStore
and QOpenGLContext as soon as it gets an exposeEvent() such that
@@ -2335,18 +2334,6 @@ bool QWindow::event(QEvent *ev)
break;
#endif
- case QEvent::Timer: {
- Q_D(QWindow);
- if (static_cast<QTimerEvent *>(ev)->timerId() == d->updateTimer) {
- killTimer(d->updateTimer);
- d->updateTimer = 0;
- d->deliverUpdateRequest();
- } else {
- QObject::event(ev);
- }
- break;
- }
-
case QEvent::PlatformSurface: {
if ((static_cast<QPlatformSurfaceEvent *>(ev))->surfaceEventType() == QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed) {
#ifndef QT_NO_OPENGL
@@ -2364,14 +2351,6 @@ bool QWindow::event(QEvent *ev)
return true;
}
-void QWindowPrivate::deliverUpdateRequest()
-{
- Q_Q(QWindow);
- updateRequestPending = false;
- QEvent request(QEvent::UpdateRequest);
- QCoreApplication::sendEvent(q, &request);
-}
-
/*!
Schedules a QEvent::UpdateRequest event to be delivered to this window.
diff --git a/src/gui/kernel/qwindow_p.h b/src/gui/kernel/qwindow_p.h
index 7ef73eb410..745ff2e46f 100644
--- a/src/gui/kernel/qwindow_p.h
+++ b/src/gui/kernel/qwindow_p.h
@@ -97,7 +97,6 @@ public:
, modality(Qt::NonModal)
, blockedByModalWindow(false)
, updateRequestPending(false)
- , updateTimer(0)
, transientParent(0)
, topLevelScreen(0)
#ifndef QT_NO_CURSOR
@@ -124,8 +123,6 @@ public:
bool applyCursor();
#endif
- void deliverUpdateRequest();
-
QPoint globalPosition() const;
QWindow *topLevelWindow() const;
@@ -194,7 +191,6 @@ public:
bool blockedByModalWindow;
bool updateRequestPending;
- int updateTimer;
QPointer<QWindow> transientParent;
QPointer<QScreen> topLevelScreen;
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp
index 6edcdfc255..07ece5689e 100644
--- a/src/gui/kernel/qwindowsysteminterface.cpp
+++ b/src/gui/kernel/qwindowsysteminterface.cpp
@@ -339,12 +339,12 @@ QT_DEFINE_QPA_EVENT_HANDLER(void, handleExposeEvent, QWindow *window, const QReg
QWindowSystemInterfacePrivate::handleWindowSystemEvent<Delivery>(e);
}
-void QWindowSystemInterface::handleCloseEvent(QWindow *window, bool *accepted)
+QT_DEFINE_QPA_EVENT_HANDLER(void, handleCloseEvent, QWindow *window, bool *accepted)
{
if (window) {
QWindowSystemInterfacePrivate::CloseEvent *e =
new QWindowSystemInterfacePrivate::CloseEvent(window, accepted);
- QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
+ QWindowSystemInterfacePrivate::handleWindowSystemEvent<Delivery>(e);
}
}
@@ -795,14 +795,44 @@ void QWindowSystemInterface::handleThemeChange(QWindow *window)
}
#if QT_CONFIG(draganddrop)
-QPlatformDragQtResponse QWindowSystemInterface::handleDrag(QWindow *window, const QMimeData *dropData, const QPoint &p, Qt::DropActions supportedActions)
+#if QT_DEPRECATED_SINCE(5, 11)
+QPlatformDragQtResponse QWindowSystemInterface::handleDrag(QWindow *window, const QMimeData *dropData,
+ const QPoint &p, Qt::DropActions supportedActions)
+{
+ return QGuiApplicationPrivate::processDrag(window, dropData, p, supportedActions,
+ QGuiApplication::mouseButtons(),
+ QGuiApplication::keyboardModifiers());
+}
+
+QPlatformDropQtResponse QWindowSystemInterface::handleDrop(QWindow *window, const QMimeData *dropData,
+ const QPoint &p, Qt::DropActions supportedActions)
+{
+ return QGuiApplicationPrivate::processDrop(window, dropData, p, supportedActions,
+ QGuiApplication::mouseButtons(),
+ QGuiApplication::keyboardModifiers());
+}
+#endif // QT_DEPRECATED_SINCE(5, 11)
+/*!
+ Drag and drop events are sent immediately.
+
+ ### FIXME? Perhaps DnD API should add some convenience APIs that are more
+ intuitive for the possible DND operations. Here passing nullptr as drop data is used to
+ indicate that drop was canceled and QDragLeaveEvent should be sent as a result.
+*/
+QPlatformDragQtResponse QWindowSystemInterface::handleDrag(QWindow *window, const QMimeData *dropData,
+ const QPoint &p, Qt::DropActions supportedActions,
+ Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)
{
- return QGuiApplicationPrivate::processDrag(window, dropData, QHighDpi::fromNativeLocalPosition(p, window) ,supportedActions);
+ auto pos = QHighDpi::fromNativeLocalPosition(p, window);
+ return QGuiApplicationPrivate::processDrag(window, dropData, pos, supportedActions, buttons, modifiers);
}
-QPlatformDropQtResponse QWindowSystemInterface::handleDrop(QWindow *window, const QMimeData *dropData, const QPoint &p, Qt::DropActions supportedActions)
+QPlatformDropQtResponse QWindowSystemInterface::handleDrop(QWindow *window, const QMimeData *dropData,
+ const QPoint &p, Qt::DropActions supportedActions,
+ Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)
{
- return QGuiApplicationPrivate::processDrop(window, dropData, QHighDpi::fromNativeLocalPosition(p, window),supportedActions);
+ auto pos = QHighDpi::fromNativeLocalPosition(p, window);
+ return QGuiApplicationPrivate::processDrop(window, dropData, pos, supportedActions, buttons, modifiers);
}
#endif // QT_CONFIG(draganddrop)
diff --git a/src/gui/kernel/qwindowsysteminterface.h b/src/gui/kernel/qwindowsysteminterface.h
index bba0b05c5a..6bf6ee645c 100644
--- a/src/gui/kernel/qwindowsysteminterface.h
+++ b/src/gui/kernel/qwindowsysteminterface.h
@@ -193,6 +193,7 @@ public:
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void handleExposeEvent(QWindow *window, const QRegion &region);
+ template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void handleCloseEvent(QWindow *window, bool *accepted = nullptr);
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
@@ -215,10 +216,19 @@ public:
static void handleApplicationStateChanged(Qt::ApplicationState newState, bool forcePropagate = false);
#if QT_CONFIG(draganddrop)
- // Drag and drop. These events are sent immediately.
- static QPlatformDragQtResponse handleDrag(QWindow *window, const QMimeData *dropData, const QPoint &p, Qt::DropActions supportedActions);
- static QPlatformDropQtResponse handleDrop(QWindow *window, const QMimeData *dropData, const QPoint &p, Qt::DropActions supportedActions);
-#endif
+#if QT_DEPRECATED_SINCE(5, 11)
+ QT_DEPRECATED static QPlatformDragQtResponse handleDrag(QWindow *window, const QMimeData *dropData,
+ const QPoint &p, Qt::DropActions supportedActions);
+ QT_DEPRECATED static QPlatformDropQtResponse handleDrop(QWindow *window, const QMimeData *dropData,
+ const QPoint &p, Qt::DropActions supportedActions);
+#endif // #if QT_DEPRECATED_SINCE(5, 11)
+ static QPlatformDragQtResponse handleDrag(QWindow *window, const QMimeData *dropData,
+ const QPoint &p, Qt::DropActions supportedActions,
+ Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers);
+ static QPlatformDropQtResponse handleDrop(QWindow *window, const QMimeData *dropData,
+ const QPoint &p, Qt::DropActions supportedActions,
+ Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers);
+#endif // QT_CONFIG(draganddrop)
static bool handleNativeEvent(QWindow *window, const QByteArray &eventType, void *message, long *result);
diff --git a/src/gui/math3d/qvector2d.cpp b/src/gui/math3d/qvector2d.cpp
index 7c02b5ad5d..c04f8b1cbf 100644
--- a/src/gui/math3d/qvector2d.cpp
+++ b/src/gui/math3d/qvector2d.cpp
@@ -49,6 +49,39 @@ QT_BEGIN_NAMESPACE
#ifndef QT_NO_VECTOR2D
+Q_STATIC_ASSERT_X(std::is_standard_layout<QVector2D>::value, "QVector2D is supposed to be standard layout");
+Q_STATIC_ASSERT_X(sizeof(QVector2D) == sizeof(float) * 2, "QVector2D is not supposed to have padding at the end");
+
+// QVector2D used to be defined as class QVector2D { float x, y; };,
+// now instead it is defined as classs QVector2D { float v[2]; };.
+// Check that binary compatibility is preserved.
+// ### Qt 6: remove all of these checks.
+
+namespace {
+
+struct QVector2DOld
+{
+ float x, y;
+};
+
+struct QVector2DNew
+{
+ float v[2];
+};
+
+Q_STATIC_ASSERT_X(std::is_standard_layout<QVector2DOld>::value, "Binary compatibility break in QVector2D");
+Q_STATIC_ASSERT_X(std::is_standard_layout<QVector2DNew>::value, "Binary compatibility break in QVector2D");
+
+Q_STATIC_ASSERT_X(sizeof(QVector2DOld) == sizeof(QVector2DNew), "Binary compatibility break in QVector2D");
+
+// requires a constexpr offsetof
+#if !defined(Q_CC_MSVC) || (_MSC_VER >= 1910)
+Q_STATIC_ASSERT_X(offsetof(QVector2DOld, x) == offsetof(QVector2DNew, v) + sizeof(QVector2DNew::v[0]) * 0, "Binary compatibility break in QVector2D");
+Q_STATIC_ASSERT_X(offsetof(QVector2DOld, y) == offsetof(QVector2DNew, v) + sizeof(QVector2DNew::v[0]) * 1, "Binary compatibility break in QVector2D");
+#endif
+
+} // anonymous namespace
+
/*!
\class QVector2D
\brief The QVector2D class represents a vector or vertex in 2D space.
@@ -105,8 +138,8 @@ QT_BEGIN_NAMESPACE
*/
QVector2D::QVector2D(const QVector3D& vector)
{
- xp = vector.xp;
- yp = vector.yp;
+ v[0] = vector.v[0];
+ v[1] = vector.v[1];
}
#endif
@@ -121,8 +154,8 @@ QVector2D::QVector2D(const QVector3D& vector)
*/
QVector2D::QVector2D(const QVector4D& vector)
{
- xp = vector.xp;
- yp = vector.yp;
+ v[0] = vector.v[0];
+ v[1] = vector.v[1];
}
#endif
@@ -193,8 +226,8 @@ QVector2D::QVector2D(const QVector4D& vector)
float QVector2D::length() const
{
// Need some extra precision if the length is very small.
- double len = double(xp) * double(xp) +
- double(yp) * double(yp);
+ double len = double(v[0]) * double(v[0]) +
+ double(v[1]) * double(v[1]);
return float(std::sqrt(len));
}
@@ -206,7 +239,7 @@ float QVector2D::length() const
*/
float QVector2D::lengthSquared() const
{
- return xp * xp + yp * yp;
+ return v[0] * v[0] + v[1] * v[1];
}
/*!
@@ -221,13 +254,13 @@ float QVector2D::lengthSquared() const
QVector2D QVector2D::normalized() const
{
// Need some extra precision if the length is very small.
- double len = double(xp) * double(xp) +
- double(yp) * double(yp);
+ double len = double(v[0]) * double(v[0]) +
+ double(v[1]) * double(v[1]);
if (qFuzzyIsNull(len - 1.0f)) {
return *this;
} else if (!qFuzzyIsNull(len)) {
double sqrtLen = std::sqrt(len);
- return QVector2D(float(double(xp) / sqrtLen), float(double(yp) / sqrtLen));
+ return QVector2D(float(double(v[0]) / sqrtLen), float(double(v[1]) / sqrtLen));
} else {
return QVector2D();
}
@@ -242,15 +275,15 @@ QVector2D QVector2D::normalized() const
void QVector2D::normalize()
{
// Need some extra precision if the length is very small.
- double len = double(xp) * double(xp) +
- double(yp) * double(yp);
+ double len = double(v[0]) * double(v[0]) +
+ double(v[1]) * double(v[1]);
if (qFuzzyIsNull(len - 1.0f) || qFuzzyIsNull(len))
return;
len = std::sqrt(len);
- xp = float(double(xp) / len);
- yp = float(double(yp) / len);
+ v[0] = float(double(v[0]) / len);
+ v[1] = float(double(v[1]) / len);
}
/*!
@@ -344,7 +377,7 @@ float QVector2D::distanceToLine
*/
float QVector2D::dotProduct(const QVector2D& v1, const QVector2D& v2)
{
- return v1.xp * v2.xp + v1.yp * v2.yp;
+ return v1.v[0] * v2.v[0] + v1.v[1] * v2.v[1];
}
/*!
@@ -458,7 +491,7 @@ float QVector2D::dotProduct(const QVector2D& v1, const QVector2D& v2)
*/
QVector3D QVector2D::toVector3D() const
{
- return QVector3D(xp, yp, 0.0f);
+ return QVector3D(v[0], v[1], 0.0f);
}
#endif
@@ -472,7 +505,7 @@ QVector3D QVector2D::toVector3D() const
*/
QVector4D QVector2D::toVector4D() const
{
- return QVector4D(xp, yp, 0.0f, 0.0f);
+ return QVector4D(v[0], v[1], 0.0f, 0.0f);
}
#endif
diff --git a/src/gui/math3d/qvector2d.h b/src/gui/math3d/qvector2d.h
index 2af5132665..88d8bc199e 100644
--- a/src/gui/math3d/qvector2d.h
+++ b/src/gui/math3d/qvector2d.h
@@ -123,7 +123,7 @@ public:
operator QVariant() const;
private:
- float xp, yp;
+ float v[2];
friend class QVector3D;
friend class QVector4D;
@@ -131,76 +131,76 @@ private:
Q_DECLARE_TYPEINFO(QVector2D, Q_PRIMITIVE_TYPE);
-Q_DECL_CONSTEXPR inline QVector2D::QVector2D() : xp(0.0f), yp(0.0f) {}
+Q_DECL_CONSTEXPR inline QVector2D::QVector2D() : v{0.0f, 0.0f} {}
-Q_DECL_CONSTEXPR inline QVector2D::QVector2D(float xpos, float ypos) : xp(xpos), yp(ypos) {}
+Q_DECL_CONSTEXPR inline QVector2D::QVector2D(float xpos, float ypos) : v{xpos, ypos} {}
-Q_DECL_CONSTEXPR inline QVector2D::QVector2D(const QPoint& point) : xp(point.x()), yp(point.y()) {}
+Q_DECL_CONSTEXPR inline QVector2D::QVector2D(const QPoint& point) : v{float(point.x()), float(point.y())} {}
-Q_DECL_CONSTEXPR inline QVector2D::QVector2D(const QPointF& point) : xp(float(point.x())), yp(float(point.y())) {}
+Q_DECL_CONSTEXPR inline QVector2D::QVector2D(const QPointF& point) : v{float(point.x()), float(point.y())} {}
inline bool QVector2D::isNull() const
{
- return qIsNull(xp) && qIsNull(yp);
+ return qIsNull(v[0]) && qIsNull(v[1]);
}
-Q_DECL_CONSTEXPR inline float QVector2D::x() const { return xp; }
-Q_DECL_CONSTEXPR inline float QVector2D::y() const { return yp; }
+Q_DECL_CONSTEXPR inline float QVector2D::x() const { return v[0]; }
+Q_DECL_CONSTEXPR inline float QVector2D::y() const { return v[1]; }
-inline void QVector2D::setX(float aX) { xp = aX; }
-inline void QVector2D::setY(float aY) { yp = aY; }
+inline void QVector2D::setX(float aX) { v[0] = aX; }
+inline void QVector2D::setY(float aY) { v[1] = aY; }
inline float &QVector2D::operator[](int i)
{
Q_ASSERT(uint(i) < 2u);
- return *(&xp + i);
+ return v[i];
}
inline float QVector2D::operator[](int i) const
{
Q_ASSERT(uint(i) < 2u);
- return *(&xp + i);
+ return v[i];
}
inline QVector2D &QVector2D::operator+=(const QVector2D &vector)
{
- xp += vector.xp;
- yp += vector.yp;
+ v[0] += vector.v[0];
+ v[1] += vector.v[1];
return *this;
}
inline QVector2D &QVector2D::operator-=(const QVector2D &vector)
{
- xp -= vector.xp;
- yp -= vector.yp;
+ v[0] -= vector.v[0];
+ v[1] -= vector.v[1];
return *this;
}
inline QVector2D &QVector2D::operator*=(float factor)
{
- xp *= factor;
- yp *= factor;
+ v[0] *= factor;
+ v[1] *= factor;
return *this;
}
inline QVector2D &QVector2D::operator*=(const QVector2D &vector)
{
- xp *= vector.xp;
- yp *= vector.yp;
+ v[0] *= vector.v[0];
+ v[1] *= vector.v[1];
return *this;
}
inline QVector2D &QVector2D::operator/=(float divisor)
{
- xp /= divisor;
- yp /= divisor;
+ v[0] /= divisor;
+ v[1] /= divisor;
return *this;
}
inline QVector2D &QVector2D::operator/=(const QVector2D &vector)
{
- xp /= vector.xp;
- yp /= vector.yp;
+ v[0] /= vector.v[0];
+ v[1] /= vector.v[1];
return *this;
}
@@ -209,68 +209,68 @@ QT_WARNING_DISABLE_CLANG("-Wfloat-equal")
QT_WARNING_DISABLE_GCC("-Wfloat-equal")
Q_DECL_CONSTEXPR inline bool operator==(const QVector2D &v1, const QVector2D &v2)
{
- return v1.xp == v2.xp && v1.yp == v2.yp;
+ return v1.v[0] == v2.v[0] && v1.v[1] == v2.v[1];
}
Q_DECL_CONSTEXPR inline bool operator!=(const QVector2D &v1, const QVector2D &v2)
{
- return v1.xp != v2.xp || v1.yp != v2.yp;
+ return v1.v[0] != v2.v[0] || v1.v[1] != v2.v[1];
}
QT_WARNING_POP
Q_DECL_CONSTEXPR inline const QVector2D operator+(const QVector2D &v1, const QVector2D &v2)
{
- return QVector2D(v1.xp + v2.xp, v1.yp + v2.yp);
+ return QVector2D(v1.v[0] + v2.v[0], v1.v[1] + v2.v[1]);
}
Q_DECL_CONSTEXPR inline const QVector2D operator-(const QVector2D &v1, const QVector2D &v2)
{
- return QVector2D(v1.xp - v2.xp, v1.yp - v2.yp);
+ return QVector2D(v1.v[0] - v2.v[0], v1.v[1] - v2.v[1]);
}
Q_DECL_CONSTEXPR inline const QVector2D operator*(float factor, const QVector2D &vector)
{
- return QVector2D(vector.xp * factor, vector.yp * factor);
+ return QVector2D(vector.v[0] * factor, vector.v[1] * factor);
}
Q_DECL_CONSTEXPR inline const QVector2D operator*(const QVector2D &vector, float factor)
{
- return QVector2D(vector.xp * factor, vector.yp * factor);
+ return QVector2D(vector.v[0] * factor, vector.v[1] * factor);
}
Q_DECL_CONSTEXPR inline const QVector2D operator*(const QVector2D &v1, const QVector2D &v2)
{
- return QVector2D(v1.xp * v2.xp, v1.yp * v2.yp);
+ return QVector2D(v1.v[0] * v2.v[0], v1.v[1] * v2.v[1]);
}
Q_DECL_CONSTEXPR inline const QVector2D operator-(const QVector2D &vector)
{
- return QVector2D(-vector.xp, -vector.yp);
+ return QVector2D(-vector.v[0], -vector.v[1]);
}
Q_DECL_CONSTEXPR inline const QVector2D operator/(const QVector2D &vector, float divisor)
{
- return QVector2D(vector.xp / divisor, vector.yp / divisor);
+ return QVector2D(vector.v[0] / divisor, vector.v[1] / divisor);
}
Q_DECL_CONSTEXPR inline const QVector2D operator/(const QVector2D &vector, const QVector2D &divisor)
{
- return QVector2D(vector.xp / divisor.xp, vector.yp / divisor.yp);
+ return QVector2D(vector.v[0] / divisor.v[0], vector.v[1] / divisor.v[1]);
}
Q_DECL_CONSTEXPR inline bool qFuzzyCompare(const QVector2D& v1, const QVector2D& v2)
{
- return qFuzzyCompare(v1.xp, v2.xp) && qFuzzyCompare(v1.yp, v2.yp);
+ return qFuzzyCompare(v1.v[0], v2.v[0]) && qFuzzyCompare(v1.v[1], v2.v[1]);
}
Q_DECL_CONSTEXPR inline QPoint QVector2D::toPoint() const
{
- return QPoint(qRound(xp), qRound(yp));
+ return QPoint(qRound(v[0]), qRound(v[1]));
}
Q_DECL_CONSTEXPR inline QPointF QVector2D::toPointF() const
{
- return QPointF(qreal(xp), qreal(yp));
+ return QPointF(qreal(v[0]), qreal(v[1]));
}
#ifndef QT_NO_DEBUG_STREAM
diff --git a/src/gui/math3d/qvector3d.cpp b/src/gui/math3d/qvector3d.cpp
index 8aaf1b0eaa..12a7902272 100644
--- a/src/gui/math3d/qvector3d.cpp
+++ b/src/gui/math3d/qvector3d.cpp
@@ -51,6 +51,41 @@ QT_BEGIN_NAMESPACE
#ifndef QT_NO_VECTOR3D
+Q_STATIC_ASSERT_X(std::is_standard_layout<QVector3D>::value, "QVector3D is supposed to be standard layout");
+Q_STATIC_ASSERT_X(sizeof(QVector3D) == sizeof(float) * 3, "QVector3D is not supposed to have padding at the end");
+
+// QVector3D used to be defined as class QVector3D { float x, y, z; };,
+// now instead it is defined as classs QVector3D { float v[3]; };.
+// Check that binary compatibility is preserved.
+// ### Qt 6: remove all of these checks.
+
+namespace {
+
+struct QVector3DOld
+{
+ float x, y, z;
+};
+
+struct QVector3DNew
+{
+ float v[3];
+};
+
+Q_STATIC_ASSERT_X(std::is_standard_layout<QVector3DOld>::value, "Binary compatibility break in QVector3D");
+Q_STATIC_ASSERT_X(std::is_standard_layout<QVector3DNew>::value, "Binary compatibility break in QVector3D");
+
+Q_STATIC_ASSERT_X(sizeof(QVector3DOld) == sizeof(QVector3DNew), "Binary compatibility break in QVector3D");
+
+// requires a constexpr offsetof
+#if !defined(Q_CC_MSVC) || (_MSC_VER >= 1910)
+Q_STATIC_ASSERT_X(offsetof(QVector3DOld, x) == offsetof(QVector3DNew, v) + sizeof(QVector3DNew::v[0]) * 0, "Binary compatibility break in QVector3D");
+Q_STATIC_ASSERT_X(offsetof(QVector3DOld, y) == offsetof(QVector3DNew, v) + sizeof(QVector3DNew::v[0]) * 1, "Binary compatibility break in QVector3D");
+Q_STATIC_ASSERT_X(offsetof(QVector3DOld, z) == offsetof(QVector3DNew, v) + sizeof(QVector3DNew::v[0]) * 2, "Binary compatibility break in QVector3D");
+#endif
+
+
+} // anonymous namespace
+
/*!
\class QVector3D
\brief The QVector3D class represents a vector or vertex in 3D space.
@@ -112,9 +147,9 @@ QT_BEGIN_NAMESPACE
*/
QVector3D::QVector3D(const QVector2D& vector)
{
- xp = vector.xp;
- yp = vector.yp;
- zp = 0.0f;
+ v[0] = vector.v[0];
+ v[1] = vector.v[1];
+ v[2] = 0.0f;
}
/*!
@@ -125,9 +160,9 @@ QVector3D::QVector3D(const QVector2D& vector)
*/
QVector3D::QVector3D(const QVector2D& vector, float zpos)
{
- xp = vector.xp;
- yp = vector.yp;
- zp = zpos;
+ v[0] = vector.v[0];
+ v[1] = vector.v[1];
+ v[2] = zpos;
}
#endif
@@ -142,9 +177,9 @@ QVector3D::QVector3D(const QVector2D& vector, float zpos)
*/
QVector3D::QVector3D(const QVector4D& vector)
{
- xp = vector.xp;
- yp = vector.yp;
- zp = vector.zp;
+ v[0] = vector.v[0];
+ v[1] = vector.v[1];
+ v[2] = vector.v[2];
}
#endif
@@ -235,16 +270,16 @@ QVector3D::QVector3D(const QVector4D& vector)
QVector3D QVector3D::normalized() const
{
// Need some extra precision if the length is very small.
- double len = double(xp) * double(xp) +
- double(yp) * double(yp) +
- double(zp) * double(zp);
+ double len = double(v[0]) * double(v[0]) +
+ double(v[1]) * double(v[1]) +
+ double(v[2]) * double(v[2]);
if (qFuzzyIsNull(len - 1.0f)) {
return *this;
} else if (!qFuzzyIsNull(len)) {
double sqrtLen = std::sqrt(len);
- return QVector3D(float(double(xp) / sqrtLen),
- float(double(yp) / sqrtLen),
- float(double(zp) / sqrtLen));
+ return QVector3D(float(double(v[0]) / sqrtLen),
+ float(double(v[1]) / sqrtLen),
+ float(double(v[2]) / sqrtLen));
} else {
return QVector3D();
}
@@ -259,17 +294,17 @@ QVector3D QVector3D::normalized() const
void QVector3D::normalize()
{
// Need some extra precision if the length is very small.
- double len = double(xp) * double(xp) +
- double(yp) * double(yp) +
- double(zp) * double(zp);
+ double len = double(v[0]) * double(v[0]) +
+ double(v[1]) * double(v[1]) +
+ double(v[2]) * double(v[2]);
if (qFuzzyIsNull(len - 1.0f) || qFuzzyIsNull(len))
return;
len = std::sqrt(len);
- xp = float(double(xp) / len);
- yp = float(double(yp) / len);
- zp = float(double(zp) / len);
+ v[0] = float(double(v[0]) / len);
+ v[1] = float(double(v[1]) / len);
+ v[2] = float(double(v[2]) / len);
}
/*!
@@ -336,7 +371,7 @@ void QVector3D::normalize()
*/
float QVector3D::dotProduct(const QVector3D& v1, const QVector3D& v2)
{
- return v1.xp * v2.xp + v1.yp * v2.yp + v1.zp * v2.zp;
+ return v1.v[0] * v2.v[0] + v1.v[1] * v2.v[1] + v1.v[2] * v2.v[2];
}
/*!
@@ -347,9 +382,9 @@ float QVector3D::dotProduct(const QVector3D& v1, const QVector3D& v2)
*/
QVector3D 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);
+ return QVector3D(v1.v[1] * v2.v[2] - v1.v[2] * v2.v[1],
+ v1.v[2] * v2.v[0] - v1.v[0] * v2.v[2],
+ v1.v[0] * v2.v[1] - v1.v[1] * v2.v[0]);
}
/*!
@@ -629,7 +664,7 @@ float QVector3D::distanceToLine
*/
QVector2D QVector3D::toVector2D() const
{
- return QVector2D(xp, yp);
+ return QVector2D(v[0], v[1]);
}
#endif
@@ -643,7 +678,7 @@ QVector2D QVector3D::toVector2D() const
*/
QVector4D QVector3D::toVector4D() const
{
- return QVector4D(xp, yp, zp, 0.0f);
+ return QVector4D(v[0], v[1], v[2], 0.0f);
}
#endif
@@ -682,9 +717,9 @@ QVector3D::operator QVariant() const
float QVector3D::length() const
{
// Need some extra precision if the length is very small.
- double len = double(xp) * double(xp) +
- double(yp) * double(yp) +
- double(zp) * double(zp);
+ double len = double(v[0]) * double(v[0]) +
+ double(v[1]) * double(v[1]) +
+ double(v[2]) * double(v[2]);
return float(std::sqrt(len));
}
@@ -696,7 +731,7 @@ float QVector3D::length() const
*/
float QVector3D::lengthSquared() const
{
- return xp * xp + yp * yp + zp * zp;
+ return v[0] * v[0] + v[1] * v[1] + v[2] * v[2];
}
#ifndef QT_NO_DEBUG_STREAM
diff --git a/src/gui/math3d/qvector3d.h b/src/gui/math3d/qvector3d.h
index f3e8c976b7..1b49f3e7b9 100644
--- a/src/gui/math3d/qvector3d.h
+++ b/src/gui/math3d/qvector3d.h
@@ -59,7 +59,7 @@ class Q_GUI_EXPORT QVector3D
public:
Q_DECL_CONSTEXPR QVector3D();
explicit QVector3D(Qt::Initialization) {}
- Q_DECL_CONSTEXPR QVector3D(float xpos, float ypos, float zpos) : xp(xpos), yp(ypos), zp(zpos) {}
+ Q_DECL_CONSTEXPR QVector3D(float xpos, float ypos, float zpos) : v{xpos, ypos, zpos} {}
Q_DECL_CONSTEXPR explicit QVector3D(const QPoint& point);
Q_DECL_CONSTEXPR explicit QVector3D(const QPointF& point);
@@ -138,7 +138,7 @@ public:
operator QVariant() const;
private:
- float xp, yp, zp;
+ float v[3];
friend class QVector2D;
friend class QVector4D;
@@ -150,82 +150,82 @@ private:
Q_DECLARE_TYPEINFO(QVector3D, Q_PRIMITIVE_TYPE);
-Q_DECL_CONSTEXPR inline QVector3D::QVector3D() : xp(0.0f), yp(0.0f), zp(0.0f) {}
+Q_DECL_CONSTEXPR inline QVector3D::QVector3D() : v{0.0f, 0.0f, 0.0f} {}
-Q_DECL_CONSTEXPR inline QVector3D::QVector3D(const QPoint& point) : xp(point.x()), yp(point.y()), zp(0.0f) {}
+Q_DECL_CONSTEXPR inline QVector3D::QVector3D(const QPoint& point) : v{float(point.x()), float(point.y()), float(0.0f)} {}
-Q_DECL_CONSTEXPR inline QVector3D::QVector3D(const QPointF& point) : xp(float(point.x())), yp(float(point.y())), zp(0.0f) {}
+Q_DECL_CONSTEXPR inline QVector3D::QVector3D(const QPointF& point) : v{float(point.x()), float(point.y()), 0.0f} {}
inline bool QVector3D::isNull() const
{
- return qIsNull(xp) && qIsNull(yp) && qIsNull(zp);
+ return qIsNull(v[0]) && qIsNull(v[1]) && qIsNull(v[2]);
}
-Q_DECL_CONSTEXPR inline float QVector3D::x() const { return xp; }
-Q_DECL_CONSTEXPR inline float QVector3D::y() const { return yp; }
-Q_DECL_CONSTEXPR inline float QVector3D::z() const { return zp; }
+Q_DECL_CONSTEXPR inline float QVector3D::x() const { return v[0]; }
+Q_DECL_CONSTEXPR inline float QVector3D::y() const { return v[1]; }
+Q_DECL_CONSTEXPR inline float QVector3D::z() const { return v[2]; }
-inline void QVector3D::setX(float aX) { xp = aX; }
-inline void QVector3D::setY(float aY) { yp = aY; }
-inline void QVector3D::setZ(float aZ) { zp = aZ; }
+inline void QVector3D::setX(float aX) { v[0] = aX; }
+inline void QVector3D::setY(float aY) { v[1] = aY; }
+inline void QVector3D::setZ(float aZ) { v[2] = aZ; }
inline float &QVector3D::operator[](int i)
{
Q_ASSERT(uint(i) < 3u);
- return *(&xp + i);
+ return v[i];
}
inline float QVector3D::operator[](int i) const
{
Q_ASSERT(uint(i) < 3u);
- return *(&xp + i);
+ return v[i];
}
inline QVector3D &QVector3D::operator+=(const QVector3D &vector)
{
- xp += vector.xp;
- yp += vector.yp;
- zp += vector.zp;
+ v[0] += vector.v[0];
+ v[1] += vector.v[1];
+ v[2] += vector.v[2];
return *this;
}
inline QVector3D &QVector3D::operator-=(const QVector3D &vector)
{
- xp -= vector.xp;
- yp -= vector.yp;
- zp -= vector.zp;
+ v[0] -= vector.v[0];
+ v[1] -= vector.v[1];
+ v[2] -= vector.v[2];
return *this;
}
inline QVector3D &QVector3D::operator*=(float factor)
{
- xp *= factor;
- yp *= factor;
- zp *= factor;
+ v[0] *= factor;
+ v[1] *= factor;
+ v[2] *= factor;
return *this;
}
inline QVector3D &QVector3D::operator*=(const QVector3D& vector)
{
- xp *= vector.xp;
- yp *= vector.yp;
- zp *= vector.zp;
+ v[0] *= vector.v[0];
+ v[1] *= vector.v[1];
+ v[2] *= vector.v[2];
return *this;
}
inline QVector3D &QVector3D::operator/=(float divisor)
{
- xp /= divisor;
- yp /= divisor;
- zp /= divisor;
+ v[0] /= divisor;
+ v[1] /= divisor;
+ v[2] /= divisor;
return *this;
}
inline QVector3D &QVector3D::operator/=(const QVector3D &vector)
{
- xp /= vector.xp;
- yp /= vector.yp;
- zp /= vector.zp;
+ v[0] /= vector.v[0];
+ v[1] /= vector.v[1];
+ v[2] /= vector.v[2];
return *this;
}
@@ -234,70 +234,70 @@ QT_WARNING_DISABLE_CLANG("-Wfloat-equal")
QT_WARNING_DISABLE_GCC("-Wfloat-equal")
Q_DECL_CONSTEXPR inline bool operator==(const QVector3D &v1, const QVector3D &v2)
{
- return v1.xp == v2.xp && v1.yp == v2.yp && v1.zp == v2.zp;
+ return v1.v[0] == v2.v[0] && v1.v[1] == v2.v[1] && v1.v[2] == v2.v[2];
}
Q_DECL_CONSTEXPR inline bool operator!=(const QVector3D &v1, const QVector3D &v2)
{
- return v1.xp != v2.xp || v1.yp != v2.yp || v1.zp != v2.zp;
+ return v1.v[0] != v2.v[0] || v1.v[1] != v2.v[1] || v1.v[2] != v2.v[2];
}
QT_WARNING_POP
Q_DECL_CONSTEXPR inline const QVector3D operator+(const QVector3D &v1, const QVector3D &v2)
{
- return QVector3D(v1.xp + v2.xp, v1.yp + v2.yp, v1.zp + v2.zp);
+ return QVector3D(v1.v[0] + v2.v[0], v1.v[1] + v2.v[1], v1.v[2] + v2.v[2]);
}
Q_DECL_CONSTEXPR inline const QVector3D operator-(const QVector3D &v1, const QVector3D &v2)
{
- return QVector3D(v1.xp - v2.xp, v1.yp - v2.yp, v1.zp - v2.zp);
+ return QVector3D(v1.v[0] - v2.v[0], v1.v[1] - v2.v[1], v1.v[2] - v2.v[2]);
}
Q_DECL_CONSTEXPR inline const QVector3D operator*(float factor, const QVector3D &vector)
{
- return QVector3D(vector.xp * factor, vector.yp * factor, vector.zp * factor);
+ return QVector3D(vector.v[0] * factor, vector.v[1] * factor, vector.v[2] * factor);
}
Q_DECL_CONSTEXPR inline const QVector3D operator*(const QVector3D &vector, float factor)
{
- return QVector3D(vector.xp * factor, vector.yp * factor, vector.zp * factor);
+ return QVector3D(vector.v[0] * factor, vector.v[1] * factor, vector.v[2] * factor);
}
Q_DECL_CONSTEXPR inline const QVector3D operator*(const QVector3D &v1, const QVector3D& v2)
{
- return QVector3D(v1.xp * v2.xp, v1.yp * v2.yp, v1.zp * v2.zp);
+ return QVector3D(v1.v[0] * v2.v[0], v1.v[1] * v2.v[1], v1.v[2] * v2.v[2]);
}
Q_DECL_CONSTEXPR inline const QVector3D operator-(const QVector3D &vector)
{
- return QVector3D(-vector.xp, -vector.yp, -vector.zp);
+ return QVector3D(-vector.v[0], -vector.v[1], -vector.v[2]);
}
Q_DECL_CONSTEXPR inline const QVector3D operator/(const QVector3D &vector, float divisor)
{
- return QVector3D(vector.xp / divisor, vector.yp / divisor, vector.zp / divisor);
+ return QVector3D(vector.v[0] / divisor, vector.v[1] / divisor, vector.v[2] / divisor);
}
Q_DECL_CONSTEXPR inline const QVector3D operator/(const QVector3D &vector, const QVector3D &divisor)
{
- return QVector3D(vector.xp / divisor.xp, vector.yp / divisor.yp, vector.zp / divisor.zp);
+ return QVector3D(vector.v[0] / divisor.v[0], vector.v[1] / divisor.v[1], vector.v[2] / divisor.v[2]);
}
Q_DECL_CONSTEXPR inline bool qFuzzyCompare(const QVector3D& v1, const QVector3D& v2)
{
- return qFuzzyCompare(v1.xp, v2.xp) &&
- qFuzzyCompare(v1.yp, v2.yp) &&
- qFuzzyCompare(v1.zp, v2.zp);
+ return qFuzzyCompare(v1.v[0], v2.v[0]) &&
+ qFuzzyCompare(v1.v[1], v2.v[1]) &&
+ qFuzzyCompare(v1.v[2], v2.v[2]);
}
Q_DECL_CONSTEXPR inline QPoint QVector3D::toPoint() const
{
- return QPoint(qRound(xp), qRound(yp));
+ return QPoint(qRound(v[0]), qRound(v[1]));
}
Q_DECL_CONSTEXPR inline QPointF QVector3D::toPointF() const
{
- return QPointF(qreal(xp), qreal(yp));
+ return QPointF(qreal(v[0]), qreal(v[1]));
}
#ifndef QT_NO_DEBUG_STREAM
diff --git a/src/gui/math3d/qvector4d.cpp b/src/gui/math3d/qvector4d.cpp
index 331144ba33..3a68bd6cb7 100644
--- a/src/gui/math3d/qvector4d.cpp
+++ b/src/gui/math3d/qvector4d.cpp
@@ -49,6 +49,42 @@ QT_BEGIN_NAMESPACE
#ifndef QT_NO_VECTOR4D
+Q_STATIC_ASSERT_X(std::is_standard_layout<QVector4D>::value, "QVector4D is supposed to be standard layout");
+Q_STATIC_ASSERT_X(sizeof(QVector4D) == sizeof(float) * 4, "QVector4D is not supposed to have padding at the end");
+
+// QVector4D used to be defined as class QVector4D { float x, y, z, w; };,
+// now instead it is defined as classs QVector4D { float v[4]; };.
+// Check that binary compatibility is preserved.
+// ### Qt 6: remove all of these checks.
+
+namespace {
+
+struct QVector4DOld
+{
+ float x, y, z, w;
+};
+
+struct QVector4DNew
+{
+ float v[4];
+};
+
+Q_STATIC_ASSERT_X(std::is_standard_layout<QVector4DOld>::value, "Binary compatibility break in QVector4D");
+Q_STATIC_ASSERT_X(std::is_standard_layout<QVector4DNew>::value, "Binary compatibility break in QVector4D");
+
+Q_STATIC_ASSERT_X(sizeof(QVector4DOld) == sizeof(QVector4DNew), "Binary compatibility break in QVector4D");
+
+// requires a constexpr offsetof
+#if !defined(Q_CC_MSVC) || (_MSC_VER >= 1910)
+Q_STATIC_ASSERT_X(offsetof(QVector4DOld, x) == offsetof(QVector4DNew, v) + sizeof(QVector4DNew::v[0]) * 0, "Binary compatibility break in QVector4D");
+Q_STATIC_ASSERT_X(offsetof(QVector4DOld, y) == offsetof(QVector4DNew, v) + sizeof(QVector4DNew::v[0]) * 1, "Binary compatibility break in QVector4D");
+Q_STATIC_ASSERT_X(offsetof(QVector4DOld, z) == offsetof(QVector4DNew, v) + sizeof(QVector4DNew::v[0]) * 2, "Binary compatibility break in QVector4D");
+Q_STATIC_ASSERT_X(offsetof(QVector4DOld, w) == offsetof(QVector4DNew, v) + sizeof(QVector4DNew::v[0]) * 3, "Binary compatibility break in QVector4D");
+#endif
+
+
+} // anonymous namespace
+
/*!
\class QVector4D
\brief The QVector4D class represents a vector or vertex in 4D space.
@@ -106,10 +142,10 @@ QT_BEGIN_NAMESPACE
*/
QVector4D::QVector4D(const QVector2D& vector)
{
- xp = vector.xp;
- yp = vector.yp;
- zp = 0.0f;
- wp = 0.0f;
+ v[0] = vector.v[0];
+ v[1] = vector.v[1];
+ v[2] = 0.0f;
+ v[3] = 0.0f;
}
/*!
@@ -120,10 +156,10 @@ QVector4D::QVector4D(const QVector2D& vector)
*/
QVector4D::QVector4D(const QVector2D& vector, float zpos, float wpos)
{
- xp = vector.xp;
- yp = vector.yp;
- zp = zpos;
- wp = wpos;
+ v[0] = vector.v[0];
+ v[1] = vector.v[1];
+ v[2] = zpos;
+ v[3] = wpos;
}
#endif
@@ -138,10 +174,10 @@ QVector4D::QVector4D(const QVector2D& vector, float zpos, float wpos)
*/
QVector4D::QVector4D(const QVector3D& vector)
{
- xp = vector.xp;
- yp = vector.yp;
- zp = vector.zp;
- wp = 0.0f;
+ v[0] = vector.v[0];
+ v[1] = vector.v[1];
+ v[2] = vector.v[2];
+ v[3] = 0.0f;
}
/*!
@@ -152,10 +188,10 @@ QVector4D::QVector4D(const QVector3D& vector)
*/
QVector4D::QVector4D(const QVector3D& vector, float wpos)
{
- xp = vector.xp;
- yp = vector.yp;
- zp = vector.zp;
- wp = wpos;
+ v[0] = vector.v[0];
+ v[1] = vector.v[1];
+ v[2] = vector.v[2];
+ v[3] = wpos;
}
#endif
@@ -258,10 +294,10 @@ QVector4D::QVector4D(const QVector3D& vector, float wpos)
float QVector4D::length() const
{
// Need some extra precision if the length is very small.
- double len = double(xp) * double(xp) +
- double(yp) * double(yp) +
- double(zp) * double(zp) +
- double(wp) * double(wp);
+ double len = double(v[0]) * double(v[0]) +
+ double(v[1]) * double(v[1]) +
+ double(v[2]) * double(v[2]) +
+ double(v[3]) * double(v[3]);
return float(std::sqrt(len));
}
@@ -273,7 +309,7 @@ float QVector4D::length() const
*/
float QVector4D::lengthSquared() const
{
- return xp * xp + yp * yp + zp * zp + wp * wp;
+ return v[0] * v[0] + v[1] * v[1] + v[2] * v[2] + v[3] * v[3];
}
/*!
@@ -288,18 +324,18 @@ float QVector4D::lengthSquared() const
QVector4D QVector4D::normalized() const
{
// Need some extra precision if the length is very small.
- double len = double(xp) * double(xp) +
- double(yp) * double(yp) +
- double(zp) * double(zp) +
- double(wp) * double(wp);
+ double len = double(v[0]) * double(v[0]) +
+ double(v[1]) * double(v[1]) +
+ double(v[2]) * double(v[2]) +
+ double(v[3]) * double(v[3]);
if (qFuzzyIsNull(len - 1.0f)) {
return *this;
} else if (!qFuzzyIsNull(len)) {
double sqrtLen = std::sqrt(len);
- return QVector4D(float(double(xp) / sqrtLen),
- float(double(yp) / sqrtLen),
- float(double(zp) / sqrtLen),
- float(double(wp) / sqrtLen));
+ return QVector4D(float(double(v[0]) / sqrtLen),
+ float(double(v[1]) / sqrtLen),
+ float(double(v[2]) / sqrtLen),
+ float(double(v[3]) / sqrtLen));
} else {
return QVector4D();
}
@@ -314,19 +350,19 @@ QVector4D QVector4D::normalized() const
void QVector4D::normalize()
{
// Need some extra precision if the length is very small.
- double len = double(xp) * double(xp) +
- double(yp) * double(yp) +
- double(zp) * double(zp) +
- double(wp) * double(wp);
+ double len = double(v[0]) * double(v[0]) +
+ double(v[1]) * double(v[1]) +
+ double(v[2]) * double(v[2]) +
+ double(v[3]) * double(v[3]);
if (qFuzzyIsNull(len - 1.0f) || qFuzzyIsNull(len))
return;
len = std::sqrt(len);
- xp = float(double(xp) / len);
- yp = float(double(yp) / len);
- zp = float(double(zp) / len);
- wp = float(double(wp) / len);
+ v[0] = float(double(v[0]) / len);
+ v[1] = float(double(v[1]) / len);
+ v[2] = float(double(v[2]) / len);
+ v[3] = float(double(v[3]) / len);
}
/*!
@@ -387,7 +423,7 @@ void QVector4D::normalize()
*/
float QVector4D::dotProduct(const QVector4D& v1, const QVector4D& v2)
{
- return v1.xp * v2.xp + v1.yp * v2.yp + v1.zp * v2.zp + v1.wp * v2.wp;
+ return v1.v[0] * v2.v[0] + v1.v[1] * v2.v[1] + v1.v[2] * v2.v[2] + v1.v[3] * v2.v[3];
}
/*!
@@ -503,7 +539,7 @@ float QVector4D::dotProduct(const QVector4D& v1, const QVector4D& v2)
*/
QVector2D QVector4D::toVector2D() const
{
- return QVector2D(xp, yp);
+ return QVector2D(v[0], v[1]);
}
/*!
@@ -515,9 +551,9 @@ QVector2D QVector4D::toVector2D() const
*/
QVector2D QVector4D::toVector2DAffine() const
{
- if (qIsNull(wp))
+ if (qIsNull(v[3]))
return QVector2D();
- return QVector2D(xp / wp, yp / wp);
+ return QVector2D(v[0] / v[3], v[1] / v[3]);
}
#endif
@@ -531,7 +567,7 @@ QVector2D QVector4D::toVector2DAffine() const
*/
QVector3D QVector4D::toVector3D() const
{
- return QVector3D(xp, yp, zp);
+ return QVector3D(v[0], v[1], v[2]);
}
/*!
@@ -542,9 +578,9 @@ QVector3D QVector4D::toVector3D() const
*/
QVector3D QVector4D::toVector3DAffine() const
{
- if (qIsNull(wp))
+ if (qIsNull(v[3]))
return QVector3D();
- return QVector3D(xp / wp, yp / wp, zp / wp);
+ return QVector3D(v[0] / v[3], v[1] / v[3], v[2] / v[3]);
}
#endif
diff --git a/src/gui/math3d/qvector4d.h b/src/gui/math3d/qvector4d.h
index 3f14b41e8e..08cb423484 100644
--- a/src/gui/math3d/qvector4d.h
+++ b/src/gui/math3d/qvector4d.h
@@ -128,7 +128,7 @@ public:
operator QVariant() const;
private:
- float xp, yp, zp, wp;
+ float v[4];
friend class QVector2D;
friend class QVector3D;
@@ -140,92 +140,92 @@ private:
Q_DECLARE_TYPEINFO(QVector4D, Q_PRIMITIVE_TYPE);
-Q_DECL_CONSTEXPR inline QVector4D::QVector4D() : xp(0.0f), yp(0.0f), zp(0.0f), wp(0.0f) {}
+Q_DECL_CONSTEXPR inline QVector4D::QVector4D() : v{0.0f, 0.0f, 0.0f, 0.0f} {}
-Q_DECL_CONSTEXPR inline QVector4D::QVector4D(float xpos, float ypos, float zpos, float wpos) : xp(xpos), yp(ypos), zp(zpos), wp(wpos) {}
+Q_DECL_CONSTEXPR inline QVector4D::QVector4D(float xpos, float ypos, float zpos, float wpos) : v{xpos, ypos, zpos, wpos} {}
-Q_DECL_CONSTEXPR inline QVector4D::QVector4D(const QPoint& point) : xp(point.x()), yp(point.y()), zp(0.0f), wp(0.0f) {}
+Q_DECL_CONSTEXPR inline QVector4D::QVector4D(const QPoint& point) : v{float(point.x()), float(point.y()), 0.0f, 0.0f} {}
-Q_DECL_CONSTEXPR inline QVector4D::QVector4D(const QPointF& point) : xp(float(point.x())), yp(float(point.y())), zp(0.0f), wp(0.0f) {}
+Q_DECL_CONSTEXPR inline QVector4D::QVector4D(const QPointF& point) : v{float(point.x()), float(point.y()), 0.0f, 0.0f} {}
inline bool QVector4D::isNull() const
{
- return qIsNull(xp) && qIsNull(yp) && qIsNull(zp) && qIsNull(wp);
+ return qIsNull(v[0]) && qIsNull(v[1]) && qIsNull(v[2]) && qIsNull(v[3]);
}
-Q_DECL_CONSTEXPR inline float QVector4D::x() const { return xp; }
-Q_DECL_CONSTEXPR inline float QVector4D::y() const { return yp; }
-Q_DECL_CONSTEXPR inline float QVector4D::z() const { return zp; }
-Q_DECL_CONSTEXPR inline float QVector4D::w() const { return wp; }
+Q_DECL_CONSTEXPR inline float QVector4D::x() const { return v[0]; }
+Q_DECL_CONSTEXPR inline float QVector4D::y() const { return v[1]; }
+Q_DECL_CONSTEXPR inline float QVector4D::z() const { return v[2]; }
+Q_DECL_CONSTEXPR inline float QVector4D::w() const { return v[3]; }
-inline void QVector4D::setX(float aX) { xp = aX; }
-inline void QVector4D::setY(float aY) { yp = aY; }
-inline void QVector4D::setZ(float aZ) { zp = aZ; }
-inline void QVector4D::setW(float aW) { wp = aW; }
+inline void QVector4D::setX(float aX) { v[0] = aX; }
+inline void QVector4D::setY(float aY) { v[1] = aY; }
+inline void QVector4D::setZ(float aZ) { v[2] = aZ; }
+inline void QVector4D::setW(float aW) { v[3] = aW; }
inline float &QVector4D::operator[](int i)
{
Q_ASSERT(uint(i) < 4u);
- return *(&xp + i);
+ return v[i];
}
inline float QVector4D::operator[](int i) const
{
Q_ASSERT(uint(i) < 4u);
- return *(&xp + i);
+ return v[i];
}
inline QVector4D &QVector4D::operator+=(const QVector4D &vector)
{
- xp += vector.xp;
- yp += vector.yp;
- zp += vector.zp;
- wp += vector.wp;
+ v[0] += vector.v[0];
+ v[1] += vector.v[1];
+ v[2] += vector.v[2];
+ v[3] += vector.v[3];
return *this;
}
inline QVector4D &QVector4D::operator-=(const QVector4D &vector)
{
- xp -= vector.xp;
- yp -= vector.yp;
- zp -= vector.zp;
- wp -= vector.wp;
+ v[0] -= vector.v[0];
+ v[1] -= vector.v[1];
+ v[2] -= vector.v[2];
+ v[3] -= vector.v[3];
return *this;
}
inline QVector4D &QVector4D::operator*=(float factor)
{
- xp *= factor;
- yp *= factor;
- zp *= factor;
- wp *= factor;
+ v[0] *= factor;
+ v[1] *= factor;
+ v[2] *= factor;
+ v[3] *= factor;
return *this;
}
inline QVector4D &QVector4D::operator*=(const QVector4D &vector)
{
- xp *= vector.xp;
- yp *= vector.yp;
- zp *= vector.zp;
- wp *= vector.wp;
+ v[0] *= vector.v[0];
+ v[1] *= vector.v[1];
+ v[2] *= vector.v[2];
+ v[3] *= vector.v[3];
return *this;
}
inline QVector4D &QVector4D::operator/=(float divisor)
{
- xp /= divisor;
- yp /= divisor;
- zp /= divisor;
- wp /= divisor;
+ v[0] /= divisor;
+ v[1] /= divisor;
+ v[2] /= divisor;
+ v[3] /= divisor;
return *this;
}
inline QVector4D &QVector4D::operator/=(const QVector4D &vector)
{
- xp /= vector.xp;
- yp /= vector.yp;
- zp /= vector.zp;
- wp /= vector.wp;
+ v[0] /= vector.v[0];
+ v[1] /= vector.v[1];
+ v[2] /= vector.v[2];
+ v[3] /= vector.v[3];
return *this;
}
@@ -234,71 +234,71 @@ QT_WARNING_DISABLE_CLANG("-Wfloat-equal")
QT_WARNING_DISABLE_GCC("-Wfloat-equal")
Q_DECL_CONSTEXPR inline bool operator==(const QVector4D &v1, const QVector4D &v2)
{
- return v1.xp == v2.xp && v1.yp == v2.yp && v1.zp == v2.zp && v1.wp == v2.wp;
+ return v1.v[0] == v2.v[0] && v1.v[1] == v2.v[1] && v1.v[2] == v2.v[2] && v1.v[3] == v2.v[3];
}
Q_DECL_CONSTEXPR inline bool operator!=(const QVector4D &v1, const QVector4D &v2)
{
- return v1.xp != v2.xp || v1.yp != v2.yp || v1.zp != v2.zp || v1.wp != v2.wp;
+ return v1.v[0] != v2.v[0] || v1.v[1] != v2.v[1] || v1.v[2] != v2.v[2] || v1.v[3] != v2.v[3];
}
QT_WARNING_POP
Q_DECL_CONSTEXPR inline const QVector4D operator+(const QVector4D &v1, const QVector4D &v2)
{
- return QVector4D(v1.xp + v2.xp, v1.yp + v2.yp, v1.zp + v2.zp, v1.wp + v2.wp);
+ return QVector4D(v1.v[0] + v2.v[0], v1.v[1] + v2.v[1], v1.v[2] + v2.v[2], v1.v[3] + v2.v[3]);
}
Q_DECL_CONSTEXPR inline const QVector4D operator-(const QVector4D &v1, const QVector4D &v2)
{
- return QVector4D(v1.xp - v2.xp, v1.yp - v2.yp, v1.zp - v2.zp, v1.wp - v2.wp);
+ return QVector4D(v1.v[0] - v2.v[0], v1.v[1] - v2.v[1], v1.v[2] - v2.v[2], v1.v[3] - v2.v[3]);
}
Q_DECL_CONSTEXPR inline const QVector4D operator*(float factor, const QVector4D &vector)
{
- return QVector4D(vector.xp * factor, vector.yp * factor, vector.zp * factor, vector.wp * factor);
+ return QVector4D(vector.v[0] * factor, vector.v[1] * factor, vector.v[2] * factor, vector.v[3] * factor);
}
Q_DECL_CONSTEXPR inline const QVector4D operator*(const QVector4D &vector, float factor)
{
- return QVector4D(vector.xp * factor, vector.yp * factor, vector.zp * factor, vector.wp * factor);
+ return QVector4D(vector.v[0] * factor, vector.v[1] * factor, vector.v[2] * factor, vector.v[3] * factor);
}
Q_DECL_CONSTEXPR inline const QVector4D operator*(const QVector4D &v1, const QVector4D& v2)
{
- return QVector4D(v1.xp * v2.xp, v1.yp * v2.yp, v1.zp * v2.zp, v1.wp * v2.wp);
+ return QVector4D(v1.v[0] * v2.v[0], v1.v[1] * v2.v[1], v1.v[2] * v2.v[2], v1.v[3] * v2.v[3]);
}
Q_DECL_CONSTEXPR inline const QVector4D operator-(const QVector4D &vector)
{
- return QVector4D(-vector.xp, -vector.yp, -vector.zp, -vector.wp);
+ return QVector4D(-vector.v[0], -vector.v[1], -vector.v[2], -vector.v[3]);
}
Q_DECL_CONSTEXPR inline const QVector4D operator/(const QVector4D &vector, float divisor)
{
- return QVector4D(vector.xp / divisor, vector.yp / divisor, vector.zp / divisor, vector.wp / divisor);
+ return QVector4D(vector.v[0] / divisor, vector.v[1] / divisor, vector.v[2] / divisor, vector.v[3] / divisor);
}
Q_DECL_CONSTEXPR inline const QVector4D operator/(const QVector4D &vector, const QVector4D &divisor)
{
- return QVector4D(vector.xp / divisor.xp, vector.yp / divisor.yp, vector.zp / divisor.zp, vector.wp / divisor.wp);
+ return QVector4D(vector.v[0] / divisor.v[0], vector.v[1] / divisor.v[1], vector.v[2] / divisor.v[2], vector.v[3] / divisor.v[3]);
}
Q_DECL_CONSTEXPR inline bool qFuzzyCompare(const QVector4D& v1, const QVector4D& v2)
{
- return qFuzzyCompare(v1.xp, v2.xp) &&
- qFuzzyCompare(v1.yp, v2.yp) &&
- qFuzzyCompare(v1.zp, v2.zp) &&
- qFuzzyCompare(v1.wp, v2.wp);
+ return qFuzzyCompare(v1.v[0], v2.v[0]) &&
+ qFuzzyCompare(v1.v[1], v2.v[1]) &&
+ qFuzzyCompare(v1.v[2], v2.v[2]) &&
+ qFuzzyCompare(v1.v[3], v2.v[3]);
}
Q_DECL_CONSTEXPR inline QPoint QVector4D::toPoint() const
{
- return QPoint(qRound(xp), qRound(yp));
+ return QPoint(qRound(v[0]), qRound(v[1]));
}
Q_DECL_CONSTEXPR inline QPointF QVector4D::toPointF() const
{
- return QPointF(qreal(xp), qreal(yp));
+ return QPointF(qreal(v[0]), qreal(v[1]));
}
#ifndef QT_NO_DEBUG_STREAM
diff --git a/src/gui/opengl/qopengl.h b/src/gui/opengl/qopengl.h
index b4657fa118..3a2393ea58 100644
--- a/src/gui/opengl/qopengl.h
+++ b/src/gui/opengl/qopengl.h
@@ -239,7 +239,7 @@ typedef unsigned long long int uint64_t;
typedef long int int32_t;
typedef long long int int64_t;
typedef unsigned long long int uint64_t;
-#elif defined(_WIN32) && (defined(__GNUC__) || (defined(_MSC_VER) && _MSC_VER >= 1600))
+#elif defined(_WIN32) && (defined(__GNUC__) || defined(_MSC_VER))
#include <stdint.h>
#elif defined(_WIN32)
typedef __int32 int32_t;
diff --git a/src/gui/opengl/qopenglengineshadermanager.cpp b/src/gui/opengl/qopenglengineshadermanager.cpp
index 2f7afa4a66..f66193cb01 100644
--- a/src/gui/opengl/qopenglengineshadermanager.cpp
+++ b/src/gui/opengl/qopenglengineshadermanager.cpp
@@ -153,12 +153,8 @@ QOpenGLEngineSharedShaders::QOpenGLEngineSharedShaders(QOpenGLContext* context)
code[AffinePositionWithRadialGradientBrushVertexShader] = qopenglslAffinePositionWithRadialGradientBrushVertexShader_core;
code[AffinePositionWithTextureBrushVertexShader] = qopenglslAffinePositionWithTextureBrushVertexShader_core;
- code[MainFragmentShader_CMO] = qopenglslMainFragmentShader_CMO_core;
- code[MainFragmentShader_CM] = qopenglslMainFragmentShader_CM_core;
code[MainFragmentShader_MO] = qopenglslMainFragmentShader_MO_core;
code[MainFragmentShader_M] = qopenglslMainFragmentShader_M_core;
- code[MainFragmentShader_CO] = qopenglslMainFragmentShader_CO_core;
- code[MainFragmentShader_C] = qopenglslMainFragmentShader_C_core;
code[MainFragmentShader_O] = qopenglslMainFragmentShader_O_core;
code[MainFragmentShader] = qopenglslMainFragmentShader_core;
code[MainFragmentShader_ImageArrays] = qopenglslMainFragmentShader_ImageArrays_core;
@@ -203,12 +199,8 @@ QOpenGLEngineSharedShaders::QOpenGLEngineSharedShaders(QOpenGLContext* context)
code[AffinePositionWithRadialGradientBrushVertexShader] = qopenglslAffinePositionWithRadialGradientBrushVertexShader;
code[AffinePositionWithTextureBrushVertexShader] = qopenglslAffinePositionWithTextureBrushVertexShader;
- code[MainFragmentShader_CMO] = qopenglslMainFragmentShader_CMO;
- code[MainFragmentShader_CM] = qopenglslMainFragmentShader_CM;
code[MainFragmentShader_MO] = qopenglslMainFragmentShader_MO;
code[MainFragmentShader_M] = qopenglslMainFragmentShader_M;
- code[MainFragmentShader_CO] = qopenglslMainFragmentShader_CO;
- code[MainFragmentShader_C] = qopenglslMainFragmentShader_C;
code[MainFragmentShader_O] = qopenglslMainFragmentShader_O;
code[MainFragmentShader] = qopenglslMainFragmentShader;
code[MainFragmentShader_ImageArrays] = qopenglslMainFragmentShader_ImageArrays;
@@ -238,21 +230,20 @@ QOpenGLEngineSharedShaders::QOpenGLEngineSharedShaders(QOpenGLContext* context)
code[RgbMaskWithGammaFragmentShader] = ""; //###
}
- // These shaders are not implemented yet and therefore are the same
- // for all profiles. Implementations should make a version for both
- // profiles and put the appropriate lines in the if-statement above.
+ // The composition shaders are just layout qualifiers and the same
+ // for all profiles that support them.
code[NoCompositionModeFragmentShader] = "";
- code[MultiplyCompositionModeFragmentShader] = ""; //###
- code[ScreenCompositionModeFragmentShader] = ""; //###
- code[OverlayCompositionModeFragmentShader] = ""; //###
- code[DarkenCompositionModeFragmentShader] = ""; //###
- code[LightenCompositionModeFragmentShader] = ""; //###
- code[ColorDodgeCompositionModeFragmentShader] = ""; //###
- code[ColorBurnCompositionModeFragmentShader] = ""; //###
- code[HardLightCompositionModeFragmentShader] = ""; //###
- code[SoftLightCompositionModeFragmentShader] = ""; //###
- code[DifferenceCompositionModeFragmentShader] = ""; //###
- code[ExclusionCompositionModeFragmentShader] = ""; //###
+ code[MultiplyCompositionModeFragmentShader] = qopenglslMultiplyCompositionModeFragmentShader;
+ code[ScreenCompositionModeFragmentShader] = qopenglslScreenCompositionModeFragmentShader;
+ code[OverlayCompositionModeFragmentShader] = qopenglslOverlayCompositionModeFragmentShader;
+ code[DarkenCompositionModeFragmentShader] = qopenglslDarkenCompositionModeFragmentShader;
+ code[LightenCompositionModeFragmentShader] = qopenglslLightenCompositionModeFragmentShader;
+ code[ColorDodgeCompositionModeFragmentShader] = qopenglslColorDodgeCompositionModeFragmentShader;
+ code[ColorBurnCompositionModeFragmentShader] = qopenglslColorBurnCompositionModeFragmentShader;
+ code[HardLightCompositionModeFragmentShader] = qopenglslHardLightCompositionModeFragmentShader;
+ code[SoftLightCompositionModeFragmentShader] = qopenglslSoftLightCompositionModeFragmentShader;
+ code[DifferenceCompositionModeFragmentShader] = qopenglslDifferenceCompositionModeFragmentShader;
+ code[ExclusionCompositionModeFragmentShader] = qopenglslExclusionCompositionModeFragmentShader;
#if defined(QT_DEBUG)
// Check that all the elements have been filled:
@@ -612,8 +603,11 @@ void QOpenGLEngineShaderManager::setCompositionMode(QPainter::CompositionMode mo
if (compositionMode == mode)
return;
+ bool wasAdvanced = compositionMode > QPainter::CompositionMode_Plus;
+ bool isAdvanced = mode > QPainter::CompositionMode_Plus;
+
compositionMode = mode;
- shaderProgNeedsChanging = true; //###
+ shaderProgNeedsChanging = shaderProgNeedsChanging || wasAdvanced || isAdvanced;
}
void QOpenGLEngineShaderManager::setCustomStage(QOpenGLCustomShaderStage* stage)
@@ -783,21 +777,13 @@ bool QOpenGLEngineShaderManager::useCorrectShaderProg()
requiredProgram.mainFragShader = QOpenGLEngineSharedShaders::MainFragmentShader_ImageArrays;
} else {
bool useGlobalOpacity = (opacityMode == UniformOpacity);
- if (hasCompose && hasMask && useGlobalOpacity)
- requiredProgram.mainFragShader = QOpenGLEngineSharedShaders::MainFragmentShader_CMO;
- if (hasCompose && hasMask && !useGlobalOpacity)
- requiredProgram.mainFragShader = QOpenGLEngineSharedShaders::MainFragmentShader_CM;
- if (!hasCompose && hasMask && useGlobalOpacity)
+ if (hasMask && useGlobalOpacity)
requiredProgram.mainFragShader = QOpenGLEngineSharedShaders::MainFragmentShader_MO;
- if (!hasCompose && hasMask && !useGlobalOpacity)
+ if (hasMask && !useGlobalOpacity)
requiredProgram.mainFragShader = QOpenGLEngineSharedShaders::MainFragmentShader_M;
- if (hasCompose && !hasMask && useGlobalOpacity)
- requiredProgram.mainFragShader = QOpenGLEngineSharedShaders::MainFragmentShader_CO;
- if (hasCompose && !hasMask && !useGlobalOpacity)
- requiredProgram.mainFragShader = QOpenGLEngineSharedShaders::MainFragmentShader_C;
- if (!hasCompose && !hasMask && useGlobalOpacity)
+ if (!hasMask && useGlobalOpacity)
requiredProgram.mainFragShader = QOpenGLEngineSharedShaders::MainFragmentShader_O;
- if (!hasCompose && !hasMask && !useGlobalOpacity)
+ if (!hasMask && !useGlobalOpacity)
requiredProgram.mainFragShader = QOpenGLEngineSharedShaders::MainFragmentShader;
}
diff --git a/src/gui/opengl/qopenglengineshadermanager_p.h b/src/gui/opengl/qopenglengineshadermanager_p.h
index 377501457d..d43788d777 100644
--- a/src/gui/opengl/qopenglengineshadermanager_p.h
+++ b/src/gui/opengl/qopenglengineshadermanager_p.h
@@ -281,12 +281,8 @@ public:
AffinePositionWithTextureBrushVertexShader,
// MainFragmentShader_CMO must be first in the list:
- MainFragmentShader_CMO,
- MainFragmentShader_CM,
MainFragmentShader_MO,
MainFragmentShader_M,
- MainFragmentShader_CO,
- MainFragmentShader_C,
MainFragmentShader_O,
MainFragmentShader,
MainFragmentShader_ImageArrays,
diff --git a/src/gui/opengl/qopenglengineshadersource_p.h b/src/gui/opengl/qopenglengineshadersource_p.h
index a165643839..5d9ee8110b 100644
--- a/src/gui/opengl/qopenglengineshadersource_p.h
+++ b/src/gui/opengl/qopenglengineshadersource_p.h
@@ -403,25 +403,6 @@ static const char* const qopenglslMainFragmentShader_ImageArrays = "\n\
gl_FragColor = srcPixel() * opacity; \n\
}\n";
-static const char* const qopenglslMainFragmentShader_CMO = "\n\
- uniform lowp float globalOpacity; \n\
- lowp vec4 srcPixel(); \n\
- lowp vec4 applyMask(lowp vec4); \n\
- lowp vec4 compose(lowp vec4); \n\
- void main() \n\
- { \n\
- gl_FragColor = applyMask(compose(srcPixel()*globalOpacity))); \n\
- }\n";
-
-static const char* const qopenglslMainFragmentShader_CM = "\n\
- lowp vec4 srcPixel(); \n\
- lowp vec4 applyMask(lowp vec4); \n\
- lowp vec4 compose(lowp vec4); \n\
- void main() \n\
- { \n\
- gl_FragColor = applyMask(compose(srcPixel())); \n\
- }\n";
-
static const char* const qopenglslMainFragmentShader_MO = "\n\
uniform lowp float globalOpacity; \n\
lowp vec4 srcPixel(); \n\
@@ -439,23 +420,6 @@ static const char* const qopenglslMainFragmentShader_M = "\n\
gl_FragColor = applyMask(srcPixel()); \n\
}\n";
-static const char* const qopenglslMainFragmentShader_CO = "\n\
- uniform lowp float globalOpacity; \n\
- lowp vec4 srcPixel(); \n\
- lowp vec4 compose(lowp vec4); \n\
- void main() \n\
- { \n\
- gl_FragColor = compose(srcPixel()*globalOpacity); \n\
- }\n";
-
-static const char* const qopenglslMainFragmentShader_C = "\n\
- lowp vec4 srcPixel(); \n\
- lowp vec4 compose(lowp vec4); \n\
- void main() \n\
- { \n\
- gl_FragColor = compose(srcPixel()); \n\
- }\n";
-
static const char* const qopenglslMainFragmentShader_O = "\n\
uniform lowp float globalOpacity; \n\
lowp vec4 srcPixel(); \n\
@@ -513,22 +477,65 @@ static const char* const qopenglslRgbMaskFragmentShaderPass2 = "\n\
return src * mask; \n\
}\n";
+static const char* const qopenglslMultiplyCompositionModeFragmentShader = "\n\
+ #ifdef GL_KHR_blend_equation_advanced\n\
+ layout(blend_support_multiply) out;\n\
+ #endif\n";
+
+static const char* const qopenglslScreenCompositionModeFragmentShader = "\n\
+ #ifdef GL_KHR_blend_equation_advanced\n\
+ layout(blend_support_screen) out;\n\
+ #endif\n";
+
+static const char* const qopenglslOverlayCompositionModeFragmentShader = "\n\
+ #ifdef GL_KHR_blend_equation_advanced\n\
+ layout(blend_support_overlay) out;\n\
+ #endif\n";
+
+static const char* const qopenglslDarkenCompositionModeFragmentShader = "\n\
+ #ifdef GL_KHR_blend_equation_advanced\n\
+ layout(blend_support_darken) out;\n\
+ #endif\n";
+
+static const char* const qopenglslLightenCompositionModeFragmentShader = "\n\
+ #ifdef GL_KHR_blend_equation_advanced\n\
+ layout(blend_support_lighten) out;\n\
+ #endif\n";
+
+static const char* const qopenglslColorDodgeCompositionModeFragmentShader = "\n\
+ #ifdef GL_KHR_blend_equation_advanced\n\
+ layout(blend_support_colordodge) out;\n\
+ #endif\n";
+
+static const char* const qopenglslColorBurnCompositionModeFragmentShader = "\n\
+ #ifdef GL_KHR_blend_equation_advanced\n\
+ layout(blend_support_colorburn) out;\n\
+ #endif\n";
+
+static const char* const qopenglslHardLightCompositionModeFragmentShader = "\n\
+ #ifdef GL_KHR_blend_equation_advanced\n\
+ layout(blend_support_hardlight) out;\n\
+ #endif\n";
+
+static const char* const qopenglslSoftLightCompositionModeFragmentShader = "\n\
+ #ifdef GL_KHR_blend_equation_advanced\n\
+ layout(blend_support_softlight) out;\n\
+ #endif\n";
+
+static const char* const qopenglslDifferenceCompositionModeFragmentShader = "\n\
+ #ifdef GL_KHR_blend_equation_advanced\n\
+ layout(blend_support_difference) out;\n\
+ #endif\n";
+
+static const char* const qopenglslExclusionCompositionModeFragmentShader = "\n\
+ #ifdef GL_KHR_blend_equation_advanced\n\
+ layout(blend_support_exclusion) out;\n\
+ #endif\n";
+
/*
Left to implement:
RgbMaskFragmentShader,
RgbMaskWithGammaFragmentShader,
-
- MultiplyCompositionModeFragmentShader,
- ScreenCompositionModeFragmentShader,
- OverlayCompositionModeFragmentShader,
- DarkenCompositionModeFragmentShader,
- LightenCompositionModeFragmentShader,
- ColorDodgeCompositionModeFragmentShader,
- ColorBurnCompositionModeFragmentShader,
- HardLightCompositionModeFragmentShader,
- SoftLightCompositionModeFragmentShader,
- DifferenceCompositionModeFragmentShader,
- ExclusionCompositionModeFragmentShader,
*/
/*
@@ -880,29 +887,6 @@ static const char* const qopenglslMainFragmentShader_ImageArrays_core =
fragColor = srcPixel() * opacity; \n\
}\n";
-static const char* const qopenglslMainFragmentShader_CMO_core =
- "#version 150 core\n\
- out vec4 fragColor; \n\
- uniform float globalOpacity; \n\
- vec4 srcPixel(); \n\
- vec4 applyMask(vec4); \n\
- vec4 compose(vec4); \n\
- void main() \n\
- { \n\
- fragColor = applyMask(compose(srcPixel()*globalOpacity))); \n\
- }\n";
-
-static const char* const qopenglslMainFragmentShader_CM_core =
- "#version 150 core\n\
- out vec4 fragColor; \n\
- vec4 srcPixel(); \n\
- vec4 applyMask(vec4); \n\
- vec4 compose(vec4); \n\
- void main() \n\
- { \n\
- fragColor = applyMask(compose(srcPixel())); \n\
- }\n";
-
static const char* const qopenglslMainFragmentShader_MO_core =
"#version 150 core\n\
out vec4 fragColor; \n\
@@ -924,27 +908,6 @@ static const char* const qopenglslMainFragmentShader_M_core =
fragColor = applyMask(srcPixel()); \n\
}\n";
-static const char* const qopenglslMainFragmentShader_CO_core =
- "#version 150 core\n\
- out vec4 fragColor; \n\
- uniform float globalOpacity; \n\
- vec4 srcPixel(); \n\
- vec4 compose(vec4); \n\
- void main() \n\
- { \n\
- fragColor = compose(srcPixel()*globalOpacity); \n\
- }\n";
-
-static const char* const qopenglslMainFragmentShader_C_core =
- "#version 150 core\n\
- out vec4 fragColor; \n\
- vec4 srcPixel(); \n\
- vec4 compose(vec4); \n\
- void main() \n\
- { \n\
- fragColor = compose(srcPixel()); \n\
- }\n";
-
static const char* const qopenglslMainFragmentShader_O_core =
"#version 150 core\n\
out vec4 fragColor; \n\
@@ -1010,18 +973,6 @@ static const char* const qopenglslRgbMaskFragmentShaderPass2_core = "\n\
Left to implement:
RgbMaskFragmentShader_core,
RgbMaskWithGammaFragmentShader_core,
-
- MultiplyCompositionModeFragmentShader_core,
- ScreenCompositionModeFragmentShader_core,
- OverlayCompositionModeFragmentShader_core,
- DarkenCompositionModeFragmentShader_core,
- LightenCompositionModeFragmentShader_core,
- ColorDodgeCompositionModeFragmentShader_core,
- ColorBurnCompositionModeFragmentShader_core,
- HardLightCompositionModeFragmentShader_core,
- SoftLightCompositionModeFragmentShader_core,
- DifferenceCompositionModeFragmentShader_core,
- ExclusionCompositionModeFragmentShader_core,
*/
QT_END_NAMESPACE
diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp
index 977565516f..913b289c52 100644
--- a/src/gui/opengl/qopenglfunctions.cpp
+++ b/src/gui/opengl/qopenglfunctions.cpp
@@ -294,9 +294,19 @@ QOpenGLExtensions::QOpenGLExtensions(QOpenGLContext *context)
static int qt_gl_resolve_features()
{
QOpenGLContext *ctx = QOpenGLContext::currentContext();
+ QOpenGLExtensionMatcher extensions;
+ int features = 0;
+ if ((extensions.match("GL_KHR_blend_equation_advanced")
+ || extensions.match("GL_NV_blend_equation_advanced")) &&
+ (extensions.match("GL_KHR_blend_equation_advanced_coherent")
+ || extensions.match("GL_NV_blend_equation_advanced_coherent"))) {
+ // We need both the advanced equations and the coherency for us
+ // to be able to easily use the new blend equations
+ features |= QOpenGLFunctions::BlendEquationAdvanced;
+ }
if (ctx->isOpenGLES()) {
// OpenGL ES
- int features = QOpenGLFunctions::Multitexture |
+ features |= QOpenGLFunctions::Multitexture |
QOpenGLFunctions::Shaders |
QOpenGLFunctions::Buffers |
QOpenGLFunctions::Framebuffers |
@@ -308,7 +318,6 @@ static int qt_gl_resolve_features()
QOpenGLFunctions::CompressedTextures |
QOpenGLFunctions::Multisample |
QOpenGLFunctions::StencilSeparate;
- QOpenGLExtensionMatcher extensions;
if (extensions.match("GL_IMG_texture_npot"))
features |= QOpenGLFunctions::NPOTTextures;
if (extensions.match("GL_OES_texture_npot"))
@@ -320,14 +329,18 @@ static int qt_gl_resolve_features()
if (!(renderer && strstr(renderer, "Mesa")))
features |= QOpenGLFunctions::TextureRGFormats;
}
- if (ctx->format().majorVersion() >= 3)
+ if (ctx->format().majorVersion() >= 3) {
features |= QOpenGLFunctions::MultipleRenderTargets;
+ if (ctx->format().minorVersion() >= 2 && extensions.match("GL_KHR_blend_equation_advanced_coherent")) {
+ // GL_KHR_blend_equation_advanced is included in OpenGL ES/3.2
+ features |= QOpenGLFunctions::BlendEquationAdvanced;
+ }
+ }
return features;
} else {
// OpenGL
- int features = QOpenGLFunctions::TextureRGFormats;
+ features |= QOpenGLFunctions::TextureRGFormats;
QSurfaceFormat format = QOpenGLContext::currentContext()->format();
- QOpenGLExtensionMatcher extensions;
if (format.majorVersion() >= 3)
features |= QOpenGLFunctions::Framebuffers | QOpenGLFunctions::MultipleRenderTargets;
diff --git a/src/gui/opengl/qopenglfunctions.h b/src/gui/opengl/qopenglfunctions.h
index 1a43f13d9b..00287b0665 100644
--- a/src/gui/opengl/qopenglfunctions.h
+++ b/src/gui/opengl/qopenglfunctions.h
@@ -277,7 +277,8 @@ public:
NPOTTextureRepeat = 0x2000,
FixedFunctionPipeline = 0x4000,
TextureRGFormats = 0x8000,
- MultipleRenderTargets = 0x10000
+ MultipleRenderTargets = 0x10000,
+ BlendEquationAdvanced = 0x20000,
};
Q_DECLARE_FLAGS(OpenGLFeatures, OpenGLFeature)
diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp
index 3d1c362275..e390183893 100644
--- a/src/gui/opengl/qopenglpaintengine.cpp
+++ b/src/gui/opengl/qopenglpaintengine.cpp
@@ -87,8 +87,27 @@
#include <QDebug>
-QT_BEGIN_NAMESPACE
+#ifndef GL_KHR_blend_equation_advanced
+#define GL_KHR_blend_equation_advanced 1
+#define GL_MULTIPLY_KHR 0x9294
+#define GL_SCREEN_KHR 0x9295
+#define GL_OVERLAY_KHR 0x9296
+#define GL_DARKEN_KHR 0x9297
+#define GL_LIGHTEN_KHR 0x9298
+#define GL_COLORDODGE_KHR 0x9299
+#define GL_COLORBURN_KHR 0x929A
+#define GL_HARDLIGHT_KHR 0x929B
+#define GL_SOFTLIGHT_KHR 0x929C
+#define GL_DIFFERENCE_KHR 0x929E
+#define GL_EXCLUSION_KHR 0x92A0
+#endif /* GL_KHR_blend_equation_advanced */
+
+#ifndef GL_KHR_blend_equation_advanced_coherent
+#define GL_KHR_blend_equation_advanced_coherent 1
+#define GL_BLEND_ADVANCED_COHERENT_KHR 0x9285
+#endif /* GL_KHR_blend_equation_advanced_coherent */
+QT_BEGIN_NAMESPACE
Q_GUI_EXPORT QImage qt_imageForBrush(int brushStyle, bool invert);
@@ -498,6 +517,21 @@ void QOpenGL2PaintEngineExPrivate::updateCompositionMode()
// NOTE: The entire paint engine works on pre-multiplied data - which is why some of these
// composition modes look odd.
// qDebug() << "QOpenGL2PaintEngineExPrivate::updateCompositionMode() - Setting GL composition mode for " << q->state()->composition_mode;
+ if (ctx->functions()->hasOpenGLFeature(QOpenGLFunctions::BlendEquationAdvanced)) {
+ if (q->state()->composition_mode <= QPainter::CompositionMode_Plus) {
+ funcs.glDisable(GL_BLEND_ADVANCED_COHERENT_KHR);
+ funcs.glBlendEquation(GL_FUNC_ADD);
+ } else {
+ funcs.glEnable(GL_BLEND_ADVANCED_COHERENT_KHR);
+ }
+ shaderManager->setCompositionMode(q->state()->composition_mode);
+ } else {
+ if (q->state()->composition_mode > QPainter::CompositionMode_Plus) {
+ qWarning("Unsupported composition mode");
+ compositionModeDirty = false;
+ return;
+ }
+ }
switch(q->state()->composition_mode) {
case QPainter::CompositionMode_SourceOver:
funcs.glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
@@ -538,6 +572,39 @@ void QOpenGL2PaintEngineExPrivate::updateCompositionMode()
case QPainter::CompositionMode_Plus:
funcs.glBlendFunc(GL_ONE, GL_ONE);
break;
+ case QPainter::CompositionMode_Multiply:
+ funcs.glBlendEquation(GL_MULTIPLY_KHR);
+ break;
+ case QPainter::CompositionMode_Screen:
+ funcs.glBlendEquation(GL_SCREEN_KHR);
+ break;
+ case QPainter::CompositionMode_Overlay:
+ funcs.glBlendEquation(GL_OVERLAY_KHR);
+ break;
+ case QPainter::CompositionMode_Darken:
+ funcs.glBlendEquation(GL_DARKEN_KHR);
+ break;
+ case QPainter::CompositionMode_Lighten:
+ funcs.glBlendEquation(GL_LIGHTEN_KHR);
+ break;
+ case QPainter::CompositionMode_ColorDodge:
+ funcs.glBlendEquation(GL_COLORDODGE_KHR);
+ break;
+ case QPainter::CompositionMode_ColorBurn:
+ funcs.glBlendEquation(GL_COLORBURN_KHR);
+ break;
+ case QPainter::CompositionMode_HardLight:
+ funcs.glBlendEquation(GL_HARDLIGHT_KHR);
+ break;
+ case QPainter::CompositionMode_SoftLight:
+ funcs.glBlendEquation(GL_SOFTLIGHT_KHR);
+ break;
+ case QPainter::CompositionMode_Difference:
+ funcs.glBlendEquation(GL_DIFFERENCE_KHR);
+ break;
+ case QPainter::CompositionMode_Exclusion:
+ funcs.glBlendEquation(GL_EXCLUSION_KHR);
+ break;
default:
qWarning("Unsupported composition mode");
break;
diff --git a/src/gui/opengl/qopenglshaderprogram.cpp b/src/gui/opengl/qopenglshaderprogram.cpp
index 2ae9c6d327..6d7aecac6f 100644
--- a/src/gui/opengl/qopenglshaderprogram.cpp
+++ b/src/gui/opengl/qopenglshaderprogram.cpp
@@ -496,6 +496,13 @@ static const char redefineHighp[] =
"#endif\n";
#endif
+// Boiler-plate header to have the layout attributes available we need later
+static const char blendEquationAdvancedHeader[] =
+ "#ifdef GL_KHR_blend_equation_advanced\n"
+ "#extension GL_ARB_fragment_coord_conventions : enable\n"
+ "#extension GL_KHR_blend_equation_advanced : enable\n"
+ "#endif\n";
+
struct QVersionDirectivePosition
{
Q_DECL_CONSTEXPR QVersionDirectivePosition(int position = 0, int line = -1)
@@ -636,6 +643,10 @@ bool QOpenGLShader::compileSourceCode(const char *source)
}
}
}
+ if (d->shaderType == Fragment) {
+ sourceChunks.append(blendEquationAdvancedHeader);
+ sourceChunkLengths.append(GLint(sizeof(blendEquationAdvancedHeader) - 1));
+ }
// The precision qualifiers are useful on OpenGL/ES systems,
// but usually not present on desktop systems.
diff --git a/src/gui/painting/WEBGRADIENTS_LICENSE.txt b/src/gui/painting/WEBGRADIENTS_LICENSE.txt
new file mode 100644
index 0000000000..1a4d527a4d
--- /dev/null
+++ b/src/gui/painting/WEBGRADIENTS_LICENSE.txt
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 itmeo
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri
index 29bef14f0c..c3585a4647 100644
--- a/src/gui/painting/painting.pri
+++ b/src/gui/painting/painting.pri
@@ -99,8 +99,13 @@ SOURCES += \
painting/qplatformbackingstore.cpp \
painting/qpathsimplifier.cpp
+webgradients.files = painting/webgradients.binaryjson
+webgradients.prefix = qgradient
+webgradients.base = painting
+
RESOURCES += \
- painting/qpdf.qrc
+ painting/qpdf.qrc \
+ webgradients
darwin {
HEADERS += painting/qcoregraphics_p.h
@@ -122,7 +127,7 @@ SSE2_SOURCES += painting/qdrawhelper_sse2.cpp
SSSE3_SOURCES += painting/qdrawhelper_ssse3.cpp
SSE4_1_SOURCES += painting/qdrawhelper_sse4.cpp \
painting/qimagescale_sse4.cpp
-AVX2_SOURCES += painting/qdrawhelper_avx2.cpp
+ARCH_HASWELL_SOURCES += painting/qdrawhelper_avx2.cpp
NEON_SOURCES += painting/qdrawhelper_neon.cpp painting/qimagescale_neon.cpp
NEON_HEADERS += painting/qdrawhelper_neon_p.h
diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp
index a4a091a29f..2dd5144e40 100644
--- a/src/gui/painting/qblendfunctions.cpp
+++ b/src/gui/painting/qblendfunctions.cpp
@@ -430,28 +430,28 @@ struct Blend_RGB32_on_RGB32_ConstAlpha {
};
struct Blend_ARGB32_on_ARGB32_SourceAlpha {
- inline void write(quint32 *dst, quint32 src) {
- *dst = src + BYTE_MUL(*dst, qAlpha(~src));
+ inline void write(quint32 *dst, quint32 src)
+ {
+ blend_pixel(*dst, src);
}
inline void flush(void *) {}
};
struct Blend_ARGB32_on_ARGB32_SourceAndConstAlpha {
- inline Blend_ARGB32_on_ARGB32_SourceAndConstAlpha(quint32 alpha) {
+ inline Blend_ARGB32_on_ARGB32_SourceAndConstAlpha(quint32 alpha)
+ {
m_alpha = (alpha * 255) >> 8;
- m_ialpha = 255 - m_alpha;
}
- inline void write(quint32 *dst, quint32 src) {
- src = BYTE_MUL(src, m_alpha);
- *dst = src + BYTE_MUL(*dst, qAlpha(~src));
+ inline void write(quint32 *dst, quint32 src)
+ {
+ blend_pixel(*dst, src, m_alpha);
}
inline void flush(void *) {}
quint32 m_alpha;
- quint32 m_ialpha;
};
void qt_scale_image_rgb32_on_rgb32(uchar *destPixels, int dbpl,
diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp
index 5c13308d94..9a4e89a6cf 100644
--- a/src/gui/painting/qbrush.cpp
+++ b/src/gui/painting/qbrush.cpp
@@ -46,9 +46,13 @@
#include "qvariant.h"
#include "qline.h"
#include "qdebug.h"
+#include <QtCore/qjsondocument.h>
+#include <QtCore/qjsonarray.h>
#include <QtCore/qcoreapplication.h>
#include "private/qhexstring_p.h"
#include <QtCore/qnumeric.h>
+#include <QtCore/qfile.h>
+#include <QtCore/qmutex.h>
QT_BEGIN_NAMESPACE
@@ -1073,7 +1077,10 @@ QDataStream &operator<<(QDataStream &s, const QBrush &b)
s << type_as_int;
if (s.version() >= QDataStream::Qt_4_3) {
s << int(gradient->spread());
- s << int(gradient->coordinateMode());
+ QGradient::CoordinateMode co_mode = gradient->coordinateMode();
+ if (s.version() < QDataStream::Qt_5_12 && co_mode == QGradient::ObjectMode)
+ co_mode = QGradient::ObjectBoundingMode;
+ s << int(co_mode);
}
if (s.version() >= QDataStream::Qt_4_5)
@@ -1330,6 +1337,72 @@ QGradient::QGradient()
{
}
+/*!
+ \enum QGradient::Preset
+ \since 5.12
+
+ This enum specifies a set of predefined presets for QGradient,
+ based on the gradients from https://webgradients.com/.
+*/
+
+/*!
+ \fn QGradient::QGradient(QGradient::Preset preset)
+ \since 5.12
+
+ Constructs a gradient based on a predefined \a preset.
+
+ The coordinate mode of the resulting gradient is
+ QGradient::ObjectBoundingMode, allowing the preset
+ to be applied to arbitrary object sizes.
+*/
+QGradient::QGradient(Preset preset)
+ : QGradient()
+{
+ static QHash<int, QGradient> cachedPresets;
+ static QMutex cacheMutex;
+ QMutexLocker locker(&cacheMutex);
+ if (cachedPresets.contains(preset)) {
+ const QGradient &cachedPreset = cachedPresets.value(preset);
+ m_type = cachedPreset.m_type;
+ m_data = cachedPreset.m_data;
+ m_stops = cachedPreset.m_stops;
+ m_spread = cachedPreset.m_spread;
+ dummy = cachedPreset.dummy;
+ } else {
+ static QJsonDocument jsonPresets = []() {
+ QFile webGradients(QLatin1String(":/qgradient/webgradients.binaryjson"));
+ webGradients.open(QFile::ReadOnly);
+ return QJsonDocument::fromBinaryData(webGradients.readAll());
+ }();
+
+ const QJsonValue presetData = jsonPresets[preset - 1];
+ if (!presetData.isObject())
+ return;
+
+ m_type = LinearGradient;
+ setCoordinateMode(ObjectBoundingMode);
+ setSpread(PadSpread);
+
+ const QJsonValue start = presetData[QLatin1Literal("start")];
+ const QJsonValue end = presetData[QLatin1Literal("end")];
+ m_data.linear.x1 = start[QLatin1Literal("x")].toDouble();
+ m_data.linear.y1 = start[QLatin1Literal("y")].toDouble();
+ m_data.linear.x2 = end[QLatin1Literal("x")].toDouble();
+ m_data.linear.y2 = end[QLatin1Literal("y")].toDouble();
+
+ for (const QJsonValue &stop : presetData[QLatin1String("stops")].toArray()) {
+ setColorAt(stop[QLatin1Literal("position")].toDouble(),
+ QColor(QRgb(stop[QLatin1Literal("color")].toInt())));
+ }
+
+ cachedPresets.insert(preset, *this);
+ }
+}
+
+QT_END_NAMESPACE
+static void initGradientPresets() { Q_INIT_RESOURCE(qmake_webgradients); }
+Q_CONSTRUCTOR_FUNCTION(initGradientPresets);
+QT_BEGIN_NAMESPACE
/*!
\enum QGradient::Type
@@ -1492,14 +1565,19 @@ QGradientStops QGradient::stops() const
\value LogicalMode This is the default mode. The gradient coordinates
are specified logical space just like the object coordinates.
+ \value ObjectMode In this mode the gradient coordinates are
+ relative to the bounding rectangle of the object being drawn, with
+ (0,0) in the top left corner, and (1,1) in the bottom right corner
+ of the object's bounding rectangle. This value was added in Qt
+ 5.12.
\value StretchToDeviceMode In this mode the gradient coordinates
are relative to the bounding rectangle of the paint device,
with (0,0) in the top left corner, and (1,1) in the bottom right
corner of the paint device.
- \value ObjectBoundingMode In this mode the gradient coordinates are
- relative to the bounding rectangle of the object being drawn, with
- (0,0) in the top left corner, and (1,1) in the bottom right corner
- of the object's bounding rectangle.
+ \value ObjectBoundingMode This mode is the same as ObjectMode, except that
+ the {QBrush::transform()} {brush transform}, if any, is applied relative to
+ the logical space instead of the object space. This enum value is
+ deprecated and should not be used in new code.
*/
/*!
diff --git a/src/gui/painting/qbrush.h b/src/gui/painting/qbrush.h
index e5cff9cc9b..aee51c526d 100644
--- a/src/gui/painting/qbrush.h
+++ b/src/gui/painting/qbrush.h
@@ -194,7 +194,8 @@ public:
enum CoordinateMode {
LogicalMode,
StretchToDeviceMode,
- ObjectBoundingMode
+ ObjectBoundingMode,
+ ObjectMode
};
Q_ENUM(CoordinateMode)
@@ -203,7 +204,180 @@ public:
ComponentInterpolation
};
+ enum Preset {
+ WarmFlame = 1,
+ NightFade = 2,
+ SpringWarmth = 3,
+ JuicyPeach = 4,
+ YoungPassion = 5,
+ LadyLips = 6,
+ SunnyMorning = 7,
+ RainyAshville = 8,
+ FrozenDreams = 9,
+ WinterNeva = 10,
+ DustyGrass = 11,
+ TemptingAzure = 12,
+ HeavyRain = 13,
+ AmyCrisp = 14,
+ MeanFruit = 15,
+ DeepBlue = 16,
+ RipeMalinka = 17,
+ CloudyKnoxville = 18,
+ MalibuBeach = 19,
+ NewLife = 20,
+ TrueSunset = 21,
+ MorpheusDen = 22,
+ RareWind = 23,
+ NearMoon = 24,
+ WildApple = 25,
+ SaintPetersburg = 26,
+ PlumPlate = 28,
+ EverlastingSky = 29,
+ HappyFisher = 30,
+ Blessing = 31,
+ SharpeyeEagle = 32,
+ LadogaBottom = 33,
+ LemonGate = 34,
+ ItmeoBranding = 35,
+ ZeusMiracle = 36,
+ OldHat = 37,
+ StarWine = 38,
+ HappyAcid = 41,
+ AwesomePine = 42,
+ NewYork = 43,
+ ShyRainbow = 44,
+ MixedHopes = 46,
+ FlyHigh = 47,
+ StrongBliss = 48,
+ FreshMilk = 49,
+ SnowAgain = 50,
+ FebruaryInk = 51,
+ KindSteel = 52,
+ SoftGrass = 53,
+ GrownEarly = 54,
+ SharpBlues = 55,
+ ShadyWater = 56,
+ DirtyBeauty = 57,
+ GreatWhale = 58,
+ TeenNotebook = 59,
+ PoliteRumors = 60,
+ SweetPeriod = 61,
+ WideMatrix = 62,
+ SoftCherish = 63,
+ RedSalvation = 64,
+ BurningSpring = 65,
+ NightParty = 66,
+ SkyGlider = 67,
+ HeavenPeach = 68,
+ PurpleDivision = 69,
+ AquaSplash = 70,
+ SpikyNaga = 72,
+ LoveKiss = 73,
+ CleanMirror = 75,
+ PremiumDark = 76,
+ ColdEvening = 77,
+ CochitiLake = 78,
+ SummerGames = 79,
+ PassionateBed = 80,
+ MountainRock = 81,
+ DesertHump = 82,
+ JungleDay = 83,
+ PhoenixStart = 84,
+ OctoberSilence = 85,
+ FarawayRiver = 86,
+ AlchemistLab = 87,
+ OverSun = 88,
+ PremiumWhite = 89,
+ MarsParty = 90,
+ EternalConstance = 91,
+ JapanBlush = 92,
+ SmilingRain = 93,
+ CloudyApple = 94,
+ BigMango = 95,
+ HealthyWater = 96,
+ AmourAmour = 97,
+ RiskyConcrete = 98,
+ StrongStick = 99,
+ ViciousStance = 100,
+ PaloAlto = 101,
+ HappyMemories = 102,
+ MidnightBloom = 103,
+ Crystalline = 104,
+ PartyBliss = 106,
+ ConfidentCloud = 107,
+ LeCocktail = 108,
+ RiverCity = 109,
+ FrozenBerry = 110,
+ ChildCare = 112,
+ FlyingLemon = 113,
+ NewRetrowave = 114,
+ HiddenJaguar = 115,
+ AboveTheSky = 116,
+ Nega = 117,
+ DenseWater = 118,
+ Seashore = 120,
+ MarbleWall = 121,
+ CheerfulCaramel = 122,
+ NightSky = 123,
+ MagicLake = 124,
+ YoungGrass = 125,
+ ColorfulPeach = 126,
+ GentleCare = 127,
+ PlumBath = 128,
+ HappyUnicorn = 129,
+ AfricanField = 131,
+ SolidStone = 132,
+ OrangeJuice = 133,
+ GlassWater = 134,
+ NorthMiracle = 136,
+ FruitBlend = 137,
+ MillenniumPine = 138,
+ HighFlight = 139,
+ MoleHall = 140,
+ SpaceShift = 142,
+ ForestInei = 143,
+ RoyalGarden = 144,
+ RichMetal = 145,
+ JuicyCake = 146,
+ SmartIndigo = 147,
+ SandStrike = 148,
+ NorseBeauty = 149,
+ AquaGuidance = 150,
+ SunVeggie = 151,
+ SeaLord = 152,
+ BlackSea = 153,
+ GrassShampoo = 154,
+ LandingAircraft = 155,
+ WitchDance = 156,
+ SleeplessNight = 157,
+ AngelCare = 158,
+ CrystalRiver = 159,
+ SoftLipstick = 160,
+ SaltMountain = 161,
+ PerfectWhite = 162,
+ FreshOasis = 163,
+ StrictNovember = 164,
+ MorningSalad = 165,
+ DeepRelief = 166,
+ SeaStrike = 167,
+ NightCall = 168,
+ SupremeSky = 169,
+ LightBlue = 170,
+ MindCrawl = 171,
+ LilyMeadow = 172,
+ SugarLollipop = 173,
+ SweetDessert = 174,
+ MagicRay = 175,
+ TeenParty = 176,
+ FrozenHeat = 177,
+ GagarinView = 178,
+ FabledSunset = 179,
+ PerfectBlue = 180,
+ };
+ Q_ENUM(Preset)
+
QGradient();
+ QGradient(Preset);
Type type() const { return m_type; }
diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp
index c55bcb12c9..1d7375d1df 100644
--- a/src/gui/painting/qcolor.cpp
+++ b/src/gui/painting/qcolor.cpp
@@ -304,11 +304,6 @@ static const int rgbTblSize = sizeof(rgbTbl) / sizeof(RGBData);
#undef rgb
-#if defined(Q_CC_MSVC) && _MSC_VER < 1600
-inline bool operator<(const RGBData &data1, const RGBData &data2)
-{ return qstrcmp(data1.name, data2.name) < 0; }
-#endif
-
inline bool operator<(const char *name, const RGBData &data)
{ return qstrcmp(name, data.name) < 0; }
inline bool operator<(const RGBData &data, const char *name)
diff --git a/src/gui/painting/qcompositionfunctions.cpp b/src/gui/painting/qcompositionfunctions.cpp
index 339a9749b8..027bf23115 100644
--- a/src/gui/painting/qcompositionfunctions.cpp
+++ b/src/gui/painting/qcompositionfunctions.cpp
@@ -64,125 +64,354 @@ QT_BEGIN_NAMESPACE
where the source is an array of pixels.
*/
-#if defined __SSE2__
-# define LOAD(ptr) _mm_loadl_epi64(reinterpret_cast<const __m128i *>(ptr))
+struct Argb32OperationsC
+{
+ typedef QRgb Type;
+ typedef quint8 Scalar;
+ typedef QRgb OptimalType;
+ typedef quint8 OptimalScalar;
+
+ static const Type clear;
+ static bool isOpaque(Type val)
+ { return qAlpha(val) == 255; }
+ static bool isTransparent(Type val)
+ { return qAlpha(val) == 0; }
+ static Scalar scalarFrom8bit(uint8_t a)
+ { return a; }
+ static void memfill(Type *ptr, Type value, qsizetype len)
+ { qt_memfill32(ptr, value, len); }
+ static void memcpy(Type *Q_DECL_RESTRICT dest, const Type *Q_DECL_RESTRICT src, qsizetype len)
+ { ::memcpy(dest, src, len * sizeof(Type)); }
+
+ static OptimalType load(const Type *ptr)
+ { return *ptr; }
+ static OptimalType convert(const Type &val)
+ { return val; }
+ static void store(Type *ptr, OptimalType value)
+ { *ptr = value; }
+ static OptimalType add(OptimalType a, OptimalType b)
+ { return a + b; }
+ static OptimalScalar add(OptimalScalar a, OptimalScalar b)
+ { return a + b; }
+ static OptimalType plus(OptimalType a, OptimalType b)
+ { return comp_func_Plus_one_pixel(a, b); }
+ static OptimalScalar alpha(OptimalType val)
+ { return qAlpha(val); }
+ static OptimalScalar invAlpha(OptimalScalar c)
+ { return 255 - c; }
+ static OptimalScalar invAlpha(OptimalType val)
+ { return alpha(~val); }
+ static OptimalScalar scalar(Scalar v)
+ { return v; }
+ static OptimalType multiplyAlpha8bit(OptimalType val, uint8_t a)
+ { return BYTE_MUL(val, a); }
+ static OptimalType interpolate8bit(OptimalType x, uint8_t a1, OptimalType y, uint8_t a2)
+ { return INTERPOLATE_PIXEL_255(x, a1, y, a2); }
+ static OptimalType multiplyAlpha(OptimalType val, OptimalScalar a)
+ { return BYTE_MUL(val, a); }
+ static OptimalScalar multiplyAlpha8bit(OptimalScalar val, uint8_t a)
+ { return qt_div_255(val * a); }
+ static OptimalType interpolate(OptimalType x, OptimalScalar a1, OptimalType y, OptimalScalar a2)
+ { return INTERPOLATE_PIXEL_255(x, a1, y, a2); }
+};
+
+const Argb32OperationsC::Type Argb32OperationsC::clear = 0;
+
+struct Rgba64OperationsBase
+{
+ typedef QRgba64 Type;
+ typedef quint16 Scalar;
+
+ static const Type clear;
+
+ static bool isOpaque(Type val)
+ { return val.isOpaque(); }
+ static bool isTransparent(Type val)
+ { return val.isTransparent(); }
+ static Scalar scalarFrom8bit(uint8_t a)
+ { return a * 257; }
+
+ static void memfill(Type *ptr, Type value, qsizetype len)
+ { qt_memfill64((quint64*)ptr, value, len); }
+ static void memcpy(Type *Q_DECL_RESTRICT dest, const Type *Q_DECL_RESTRICT src, qsizetype len)
+ { ::memcpy(dest, src, len * sizeof(Type)); }
+};
+
+const Rgba64OperationsBase::Type Rgba64OperationsBase::clear = QRgba64::fromRgba64(0);
+
+struct Rgba64OperationsC : public Rgba64OperationsBase
+{
+ typedef QRgba64 OptimalType;
+ typedef quint16 OptimalScalar;
+
+ static OptimalType load(const Type *ptr)
+ { return *ptr; }
+ static OptimalType convert(const Type &val)
+ { return val; }
+ static void store(Type *ptr, OptimalType value)
+ { *ptr = value; }
+ static OptimalType add(OptimalType a, OptimalType b)
+ { return QRgba64::fromRgba64((quint64)a + (quint64)b); }
+ static OptimalScalar add(OptimalScalar a, OptimalScalar b)
+ { return a + b; }
+ static OptimalType plus(OptimalType a, OptimalType b)
+ { return addWithSaturation(a, b); }
+ static OptimalScalar alpha(OptimalType val)
+ { return val.alpha(); }
+ static OptimalScalar invAlpha(Scalar c)
+ { return 65535 - c; }
+ static OptimalScalar invAlpha(OptimalType val)
+ { return 65535 - alpha(val); }
+ static OptimalScalar scalar(Scalar v)
+ { return v; }
+ static OptimalType multiplyAlpha8bit(OptimalType val, uint8_t a)
+ { return multiplyAlpha255(val, a); }
+ static OptimalScalar multiplyAlpha8bit(OptimalScalar val, uint8_t a)
+ { return qt_div_255(val * a); }
+ static OptimalType interpolate8bit(OptimalType x, uint8_t a1, OptimalType y, uint8_t a2)
+ { return interpolate255(x, a1, y, a2); }
+ static OptimalType multiplyAlpha(OptimalType val, OptimalScalar a)
+ { return multiplyAlpha65535(val, a); }
+ static OptimalType interpolate(OptimalType x, OptimalScalar a1, OptimalType y, OptimalScalar a2)
+ { return interpolate65535(x, a1, y, a2); }
+};
+
+#if defined(__SSE2__)
+struct Rgba64OperationsSSE2 : public Rgba64OperationsBase
+{
+ typedef __m128i OptimalType;
+ typedef __m128i OptimalScalar;
+
+ static OptimalType load(const Type *ptr)
+ {
+ return _mm_loadl_epi64(reinterpret_cast<const __m128i *>(ptr));
+ }
+ static OptimalType convert(const Type &value)
+ {
#ifdef Q_PROCESSOR_X86_64
-# define CONVERT(value) _mm_cvtsi64_si128(value)
+ return _mm_cvtsi64_si128(value);
#else
-# define CONVERT(value) LOAD(&value)
+ return load(&value);
#endif
-# define STORE(ptr, value) _mm_storel_epi64(reinterpret_cast<__m128i *>(ptr), value)
-# define ADD(p, q) _mm_add_epi32(p, q)
-# define ALPHA(c) _mm_shufflelo_epi16(c, _MM_SHUFFLE(3, 3, 3, 3))
-# define CONST(n) _mm_shufflelo_epi16(_mm_cvtsi32_si128(n), _MM_SHUFFLE(0, 0, 0, 0))
-# define INVALPHA(c) _mm_sub_epi32(CONST(65535), ALPHA(c))
-#elif defined __ARM_NEON__
-# define LOAD(ptr) vreinterpret_u16_u64(vld1_u64(reinterpret_cast<const uint64_t *>(ptr)))
-# define CONVERT(value) vreinterpret_u16_u64(vmov_n_u64(value))
-# define STORE(ptr, value) vst1_u64(reinterpret_cast<uint64_t *>(ptr), vreinterpret_u64_u16(value))
-# define ADD(p, q) vadd_u16(p, q)
-# define ALPHA(c) vdup_lane_u16(c, 3)
-# define CONST(n) vdup_n_u16(n)
-# define INVALPHA(c) vmvn_u16(ALPHA(c))
-#else
-# define LOAD(ptr) *ptr
-# define CONVERT(value) value
-# define STORE(ptr, value) *ptr = value
-# define ADD(p, q) (p + q)
-# define ALPHA(c) (c).alpha()
-# define CONST(n) n
-# define INVALPHA(c) (65535 - ALPHA(c))
+ }
+ static void store(Type *ptr, OptimalType value)
+ {
+ _mm_storel_epi64(reinterpret_cast<__m128i *>(ptr), value);
+ }
+ static OptimalType add(OptimalType a, OptimalType b)
+ {
+ return _mm_add_epi16(a, b);
+ }
+// same as above:
+// static OptimalScalar add(OptimalScalar a, OptimalScalar b)
+ static OptimalType plus(OptimalType a, OptimalType b)
+ {
+ return _mm_adds_epu16(a, b);
+ }
+ static OptimalScalar alpha(OptimalType c)
+ {
+ return _mm_shufflelo_epi16(c, _MM_SHUFFLE(3, 3, 3, 3));
+ }
+ static OptimalScalar invAlpha(Scalar c)
+ {
+ return scalar(65535 - c);
+ }
+ static OptimalScalar invAlpha(OptimalType c)
+ {
+ return _mm_xor_si128(_mm_set1_epi16(-1), alpha(c));
+ }
+ static OptimalScalar scalar(Scalar n)
+ {
+ return _mm_shufflelo_epi16(_mm_cvtsi32_si128(n), _MM_SHUFFLE(0, 0, 0, 0));
+ }
+ static OptimalType multiplyAlpha8bit(OptimalType val, uint8_t a)
+ {
+ return multiplyAlpha255(val, a);
+ }
+// same as above:
+// static OptimalScalar multiplyAlpha8bit(OptimalScalar a, uint8_t a)
+ static OptimalType interpolate8bit(OptimalType x, uint8_t a1, OptimalType y, uint8_t a2)
+ {
+ return interpolate255(x, a1, y, a2);
+ }
+ static OptimalType multiplyAlpha(OptimalType val, OptimalScalar a)
+ {
+ return multiplyAlpha65535(val, a);
+ }
+ // a2 is const-ref because otherwise MSVC2015@x86 complains that it can't 16-byte align the argument.
+ static OptimalType interpolate(OptimalType x, OptimalScalar a1, OptimalType y, const OptimalScalar &a2)
+ {
+ return interpolate65535(x, a1, y, a2);
+ }
+};
#endif
+#if defined(__ARM_NEON__)
+struct Rgba64OperationsNEON : public Rgba64OperationsBase
+{
+ typedef uint16x4_t OptimalType;
+ typedef uint16x4_t OptimalScalar;
+
+ static OptimalType load(const Type *ptr)
+ {
+ return vreinterpret_u16_u64(vld1_u64(reinterpret_cast<const uint64_t *>(ptr)));
+ }
+ static OptimalType convert(const Type &val)
+ {
+ return vreinterpret_u16_u64(vmov_n_u64(val));
+ }
+ static void store(Type *ptr, OptimalType value)
+ {
+ vst1_u64(reinterpret_cast<uint64_t *>(ptr), vreinterpret_u64_u16(value));
+ }
+ static OptimalType add(OptimalType a, OptimalType b)
+ {
+ return vadd_u16(a, b);
+ }
+// same as above:
+// static OptimalScalar add(OptimalScalar a, OptimalScalar b)
+ static OptimalType plus(OptimalType a, OptimalType b)
+ {
+ return vqadd_u16(a, b);
+ }
+ static OptimalScalar alpha(OptimalType c)
+ {
+ return vdup_lane_u16(c, 3);
+ }
+ static OptimalScalar invAlpha(Scalar c)
+ {
+ return scalar(65535 - c);
+ }
+ static OptimalScalar invAlpha(OptimalType c)
+ {
+ return vmvn_u16(alpha(c));
+ }
+ static OptimalScalar scalar(Scalar n)
+ {
+ return vdup_n_u16(n);
+ }
+ static OptimalType multiplyAlpha8bit(OptimalType val, uint8_t a)
+ {
+ return multiplyAlpha255(val, a);
+ }
+// same as above:
+// static OptimalScalar multiplyAlpha8bit(OptimalScalar a, uint8_t a)
+ static OptimalType interpolate8bit(OptimalType x, uint8_t a1, OptimalType y, uint8_t a2)
+ {
+ return interpolate255(x, a1, y, a2);
+ }
+ static OptimalType multiplyAlpha(OptimalType val, OptimalScalar a)
+ {
+ return multiplyAlpha65535(val, a);
+ }
+ static OptimalType interpolate(OptimalType x, OptimalScalar a1, OptimalType y, OptimalScalar a2)
+ {
+ return interpolate65535(x, a1, y, a2);
+ }
+};
+
+#endif
+
+typedef Argb32OperationsC Argb32Operations;
+#if defined(__SSE2__)
+typedef Rgba64OperationsSSE2 Rgba64Operations;
+#elif defined(__ARM_NEON__)
+typedef Rgba64OperationsNEON Rgba64Operations;
+#else
+typedef Rgba64OperationsC Rgba64Operations;
+#endif
/*
result = 0
d = d * cia
*/
-void QT_FASTCALL comp_func_solid_Clear(uint *dest, int length, uint, uint const_alpha)
+template<class Ops>
+inline static void comp_func_Clear_template(typename Ops::Type *dest, int length, uint const_alpha)
{
- if (const_alpha == 255) {
- qt_memfill32(dest, 0, length);
- } else {
+ if (const_alpha == 255)
+ Ops::memfill(dest, Ops::clear, length);
+ else {
uint ialpha = 255 - const_alpha;
- for (int i = 0; i < length; ++i)
- dest[i] = BYTE_MUL(dest[i], ialpha);
+ for (int i = 0; i < length; ++i) {
+ Ops::store(&dest[i], Ops::multiplyAlpha8bit(Ops::load(&dest[i]), ialpha));
+ }
}
}
+void QT_FASTCALL comp_func_solid_Clear(uint *dest, int length, uint, uint const_alpha)
+{
+ comp_func_Clear_template<Argb32Operations>(dest, length, const_alpha);
+}
+
void QT_FASTCALL comp_func_solid_Clear_rgb64(QRgba64 *dest, int length, QRgba64, uint const_alpha)
{
- if (const_alpha == 255) {
- qt_memfill64((quint64*)dest, 0, length);
- } else {
- uint ialpha = 255 - const_alpha;
- for (int i = 0; i < length; ++i)
- STORE(&dest[i], multiplyAlpha255(LOAD(&dest[i]), ialpha));
- }
+ comp_func_Clear_template<Rgba64Operations>(dest, length, const_alpha);
}
void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, uint const_alpha)
{
- comp_func_solid_Clear(dest, length, 0, const_alpha);
+ comp_func_Clear_template<Argb32Operations>(dest, length, const_alpha);
}
void QT_FASTCALL comp_func_Clear_rgb64(QRgba64 *dest, const QRgba64 *, int length, uint const_alpha)
{
- comp_func_solid_Clear_rgb64(dest, length, QRgba64(), const_alpha);
+ comp_func_Clear_template<Rgba64Operations>(dest, length, const_alpha);
}
/*
result = s
dest = s * ca + d * cia
*/
-void QT_FASTCALL comp_func_solid_Source(uint *dest, int length, uint color, uint const_alpha)
+template<class Ops>
+inline static void comp_func_solid_Source_template(typename Ops::Type *dest, int length, typename Ops::Type color, uint const_alpha)
{
- if (const_alpha == 255) {
- qt_memfill32(dest, color, length);
- } else {
- uint ialpha = 255 - const_alpha;
- color = BYTE_MUL(color, const_alpha);
+ if (const_alpha == 255)
+ Ops::memfill(dest, color, length);
+ else {
+ const uint ialpha = 255 - const_alpha;
+ auto s = Ops::multiplyAlpha8bit(Ops::convert(color), const_alpha);
for (int i = 0; i < length; ++i) {
- dest[i] = color + BYTE_MUL(dest[i], ialpha);
+ auto d = Ops::multiplyAlpha8bit(Ops::load(&dest[i]), ialpha);
+ Ops::store(&dest[i], Ops::add(s, d));
}
}
}
-void QT_FASTCALL comp_func_solid_Source_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
+template<class Ops>
+inline static void comp_func_Source_template(typename Ops::Type *Q_DECL_RESTRICT dest,
+ const typename Ops::Type *Q_DECL_RESTRICT src,
+ int length, uint const_alpha)
{
if (const_alpha == 255)
- qt_memfill64((quint64*)dest, color, length);
+ Ops::memcpy(dest, src, length);
else {
- uint ialpha = 255 - const_alpha;
- auto c = multiplyAlpha255(CONVERT(color), const_alpha);
+ const uint ialpha = 255 - const_alpha;
for (int i = 0; i < length; ++i) {
- STORE(&dest[i], ADD(c, multiplyAlpha255(LOAD(&dest[i]), ialpha)));
+ auto s = Ops::load(src + i);
+ auto d = Ops::load(dest + i);
+ Ops::store(&dest[i], Ops::interpolate8bit(s, const_alpha, d, ialpha));
}
}
}
+void QT_FASTCALL comp_func_solid_Source(uint *dest, int length, uint color, uint const_alpha)
+{
+ comp_func_solid_Source_template<Argb32Operations>(dest, length, color, const_alpha);
+}
+
+void QT_FASTCALL comp_func_solid_Source_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
+{
+ comp_func_solid_Source_template<Rgba64Operations>(dest, length, color, const_alpha);
+}
+
void QT_FASTCALL comp_func_Source(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
- if (const_alpha == 255) {
- ::memcpy(dest, src, size_t(length) * sizeof(uint));
- } else {
- uint ialpha = 255 - const_alpha;
- for (int i = 0; i < length; ++i) {
- dest[i] = INTERPOLATE_PIXEL_255(src[i], const_alpha, dest[i], ialpha);
- }
- }
+ comp_func_Source_template<Argb32Operations>(dest, src, length, const_alpha);
}
void QT_FASTCALL comp_func_Source_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
- if (const_alpha == 255)
- ::memcpy(dest, src, size_t(length) * sizeof(quint64));
- else {
- uint ialpha = 255 - const_alpha;
- for (int i = 0; i < length; ++i) {
- STORE(&dest[i], interpolate255(LOAD(&src[i]), const_alpha, LOAD(&dest[i]), ialpha));
- }
- }
+ comp_func_Source_template<Rgba64Operations>(dest, src, length, const_alpha);
}
void QT_FASTCALL comp_func_solid_Destination(uint *, int, uint, uint)
@@ -207,68 +436,66 @@ void QT_FASTCALL comp_func_Destination_rgb64(QRgba64 *, const QRgba64 *, int, ui
= s * ca + d * (sia * ca + cia)
= s * ca + d * (1 - sa*ca)
*/
-void QT_FASTCALL comp_func_solid_SourceOver(uint *dest, int length, uint color, uint const_alpha)
+template<class Ops>
+inline static void comp_func_solid_SourceOver_template(typename Ops::Type *dest, int length, typename Ops::Type color, uint const_alpha)
{
- if ((const_alpha & qAlpha(color)) == 255) {
- qt_memfill32(dest, color, length);
- } else {
+ if (const_alpha == 255 && Ops::isOpaque(color))
+ Ops::memfill(dest, color, length);
+ else {
+ auto c = Ops::convert(color);
if (const_alpha != 255)
- color = BYTE_MUL(color, const_alpha);
+ c = Ops::multiplyAlpha8bit(c, const_alpha);
+ auto cAlpha = Ops::invAlpha(c);
for (int i = 0; i < length; ++i) {
- dest[i] = color + BYTE_MUL(dest[i], qAlpha(~color));
+ auto d = Ops::multiplyAlpha(Ops::load(&dest[i]), cAlpha);
+ Ops::store(&dest[i], Ops::add(c, d));
}
}
}
-void QT_FASTCALL comp_func_solid_SourceOver_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
+template<class Ops>
+inline static void comp_func_SourceOver_template(typename Ops::Type *Q_DECL_RESTRICT dest,
+ const typename Ops::Type *Q_DECL_RESTRICT src,
+ int length, uint const_alpha)
{
- if (const_alpha == 255 && color.isOpaque()) {
- qt_memfill64((quint64*)dest, color, length);
+ if (const_alpha == 255) {
+ for (int i = 0; i < length; ++i) {
+ auto c = src[i];
+ if (Ops::isOpaque(c))
+ Ops::store(&dest[i], Ops::convert(c));
+ else if (!Ops::isTransparent(c)) {
+ auto s = Ops::convert(c);
+ auto d = Ops::multiplyAlpha(Ops::load(&dest[i]), Ops::invAlpha(s));
+ Ops::store(&dest[i], Ops::add(s, d));
+ }
+ }
} else {
- auto c = CONVERT(color);
- if (const_alpha != 255)
- c = multiplyAlpha255(c, const_alpha);
- auto cAlpha = INVALPHA(c);
for (int i = 0; i < length; ++i) {
- STORE(&dest[i], ADD(c, multiplyAlpha65535(LOAD(&dest[i]), cAlpha)));
+ auto s = Ops::multiplyAlpha8bit(Ops::load(&src[i]), const_alpha);
+ auto d = Ops::multiplyAlpha(Ops::load(&dest[i]), Ops::invAlpha(s));
+ Ops::store(&dest[i], Ops::add(s, d));
}
}
}
+void QT_FASTCALL comp_func_solid_SourceOver(uint *dest, int length, uint color, uint const_alpha)
+{
+ comp_func_solid_SourceOver_template<Argb32Operations>(dest, length, color, const_alpha);
+}
+
+void QT_FASTCALL comp_func_solid_SourceOver_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
+{
+ comp_func_solid_SourceOver_template<Rgba64Operations>(dest, length, color, const_alpha);
+}
+
void QT_FASTCALL comp_func_SourceOver(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
- if (const_alpha == 255) {
- for (int i = 0; i < length; ++i) {
- uint s = src[i];
- if (s >= 0xff000000)
- dest[i] = s;
- else if (s != 0)
- dest[i] = s + BYTE_MUL(dest[i], qAlpha(~s));
- }
- } else {
- for (int i = 0; i < length; ++i) {
- uint s = BYTE_MUL(src[i], const_alpha);
- dest[i] = s + BYTE_MUL(dest[i], qAlpha(~s));
- }
- }
+ comp_func_SourceOver_template<Argb32Operations>(dest, src, length, const_alpha);
}
void QT_FASTCALL comp_func_SourceOver_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
- if (const_alpha == 255) {
- for (int i = 0; i < length; ++i) {
- QRgba64 s = src[i];
- if (s.isOpaque())
- dest[i] = s;
- else if (!s.isTransparent())
- STORE(&dest[i], ADD(CONVERT(s), multiplyAlpha65535(LOAD(&dest[i]), 65535 - s.alpha())));
- }
- } else {
- for (int i = 0; i < length; ++i) {
- auto s = multiplyAlpha255(LOAD(&src[i]), const_alpha);
- STORE(&dest[i], ADD(s, multiplyAlpha65535(LOAD(&dest[i]), INVALPHA(s))));
- }
- }
+ comp_func_SourceOver_template<Rgba64Operations>(dest, src, length, const_alpha);
}
/*
@@ -276,128 +503,122 @@ void QT_FASTCALL comp_func_SourceOver_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const
dest = (d + s * dia) * ca + d * cia
= d + s * dia * ca
*/
-void QT_FASTCALL comp_func_solid_DestinationOver(uint *dest, int length, uint color, uint const_alpha)
-{
- if (const_alpha != 255)
- color = BYTE_MUL(color, const_alpha);
- for (int i = 0; i < length; ++i) {
- uint d = dest[i];
- dest[i] = d + BYTE_MUL(color, qAlpha(~d));
- }
-}
-
-void QT_FASTCALL comp_func_solid_DestinationOver_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
+template<class Ops>
+inline static void comp_func_solid_DestinationOver_template(typename Ops::Type *dest, int length, typename Ops::Type color, uint const_alpha)
{
- auto c = CONVERT(color);
+ auto c = Ops::convert(color);
if (const_alpha != 255)
- c = multiplyAlpha255(c, const_alpha);
+ c = Ops::multiplyAlpha8bit(c, const_alpha);
for (int i = 0; i < length; ++i) {
- auto d = LOAD(&dest[i]);
- STORE(&dest[i], ADD(d, multiplyAlpha65535(c, INVALPHA(d))));
+ auto d = Ops::load(&dest[i]);
+ auto s = Ops::multiplyAlpha(c, Ops::invAlpha(d));
+ Ops::store(&dest[i], Ops::add(s, d));
}
}
-void QT_FASTCALL comp_func_DestinationOver(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
+template<class Ops>
+inline static void comp_func_DestinationOver_template(typename Ops::Type *Q_DECL_RESTRICT dest,
+ const typename Ops::Type *Q_DECL_RESTRICT src,
+ int length, uint const_alpha)
{
if (const_alpha == 255) {
for (int i = 0; i < length; ++i) {
- uint d = dest[i];
- dest[i] = d + BYTE_MUL(src[i], qAlpha(~d));
+ auto d = Ops::load(&dest[i]);
+ auto s = Ops::multiplyAlpha(Ops::load(&src[i]), Ops::invAlpha(d));
+ Ops::store(&dest[i], Ops::add(s, d));
}
} else {
for (int i = 0; i < length; ++i) {
- uint d = dest[i];
- uint s = BYTE_MUL(src[i], const_alpha);
- dest[i] = d + BYTE_MUL(s, qAlpha(~d));
+ auto d = Ops::load(&dest[i]);
+ auto s = Ops::multiplyAlpha8bit(Ops::load(&src[i]), const_alpha);
+ s = Ops::multiplyAlpha(s, Ops::invAlpha(d));
+ Ops::store(&dest[i], Ops::add(s, d));
}
}
}
+void QT_FASTCALL comp_func_solid_DestinationOver(uint *dest, int length, uint color, uint const_alpha)
+{
+ comp_func_solid_DestinationOver_template<Argb32Operations>(dest, length, color, const_alpha);
+}
+
+void QT_FASTCALL comp_func_solid_DestinationOver_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
+{
+ comp_func_solid_DestinationOver_template<Rgba64Operations>(dest, length, color, const_alpha);
+}
+
+void QT_FASTCALL comp_func_DestinationOver(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
+{
+ comp_func_DestinationOver_template<Argb32Operations>(dest, src, length, const_alpha);
+}
+
void QT_FASTCALL comp_func_DestinationOver_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
- if (const_alpha == 255) {
- for (int i = 0; i < length; ++i) {
- auto d = LOAD(&dest[i]);
- STORE(&dest[i], ADD(d, multiplyAlpha65535(LOAD(&src[i]), INVALPHA(d))));
- }
- } else {
- for (int i = 0; i < length; ++i) {
- auto d = LOAD(&dest[i]);
- auto s = multiplyAlpha255(LOAD(&src[i]), const_alpha);
- STORE(&dest[i], ADD(d, multiplyAlpha65535(s, INVALPHA(d))));
- }
- }
+ comp_func_DestinationOver_template<Rgba64Operations>(dest, src, length, const_alpha);
}
/*
result = s * da
dest = s * da * ca + d * cia
*/
-void QT_FASTCALL comp_func_solid_SourceIn(uint *dest, int length, uint color, uint const_alpha)
+template<class Ops>
+inline static void comp_func_solid_SourceIn_template(typename Ops::Type *dest, int length, typename Ops::Type color, uint const_alpha)
{
if (const_alpha == 255) {
+ auto c = Ops::convert(color);
for (int i = 0; i < length; ++i) {
- dest[i] = BYTE_MUL(color, qAlpha(dest[i]));
+ Ops::store(&dest[i], Ops::multiplyAlpha(c, Ops::alpha(Ops::load(&dest[i]))));
}
} else {
- color = BYTE_MUL(color, const_alpha);
- uint cia = 255 - const_alpha;
+ auto c = Ops::multiplyAlpha8bit(Ops::convert(color), const_alpha);
+ auto cia = Ops::invAlpha(Ops::scalarFrom8bit(const_alpha));
for (int i = 0; i < length; ++i) {
- uint d = dest[i];
- dest[i] = INTERPOLATE_PIXEL_255(color, qAlpha(d), d, cia);
+ auto d = Ops::load(&dest[i]);
+ Ops::store(&dest[i], Ops::interpolate(c, Ops::alpha(d), d, cia));
}
}
}
-void QT_FASTCALL comp_func_solid_SourceIn_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
+template<class Ops>
+inline static void comp_func_SourceIn_template(typename Ops::Type *Q_DECL_RESTRICT dest,
+ const typename Ops::Type *Q_DECL_RESTRICT src,
+ int length, uint const_alpha)
{
if (const_alpha == 255) {
- auto c = CONVERT(color);
for (int i = 0; i < length; ++i) {
- STORE(&dest[i], multiplyAlpha65535(c, dest[i].alpha()));
+ auto s = Ops::load(&src[i]);
+ Ops::store(&dest[i], Ops::multiplyAlpha(s, Ops::alpha(Ops::load(&dest[i]))));
}
} else {
- uint ca = const_alpha * 257;
- auto cia = CONST(65535 - ca);
- auto c = multiplyAlpha65535(CONVERT(color), ca);
+ auto ca = Ops::scalarFrom8bit(const_alpha);
+ auto cia = Ops::invAlpha(ca);
+ auto cav = Ops::scalar(ca);
for (int i = 0; i < length; ++i) {
- auto d = LOAD(&dest[i]);
- STORE(&dest[i], interpolate65535(c, ALPHA(d), d, cia));
+ auto d = Ops::load(&dest[i]);
+ auto s = Ops::multiplyAlpha(Ops::load(&src[i]), cav);
+ Ops::store(&dest[i], Ops::interpolate(s, Ops::alpha(d), d, cia));
}
}
}
+void QT_FASTCALL comp_func_solid_SourceIn(uint *dest, int length, uint color, uint const_alpha)
+{
+ comp_func_solid_SourceIn_template<Argb32Operations>(dest, length, color, const_alpha);
+}
+
+void QT_FASTCALL comp_func_solid_SourceIn_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
+{
+ comp_func_solid_SourceIn_template<Rgba64Operations>(dest, length, color, const_alpha);
+}
+
void QT_FASTCALL comp_func_SourceIn(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
- if (const_alpha == 255) {
- for (int i = 0; i < length; ++i) {
- dest[i] = BYTE_MUL(src[i], qAlpha(dest[i]));
- }
- } else {
- uint cia = 255 - const_alpha;
- for (int i = 0; i < length; ++i) {
- uint d = dest[i];
- uint s = BYTE_MUL(src[i], const_alpha);
- dest[i] = INTERPOLATE_PIXEL_255(s, qAlpha(d), d, cia);
- }
- }
+ comp_func_SourceIn_template<Argb32Operations>(dest, src, length, const_alpha);
}
void QT_FASTCALL comp_func_SourceIn_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
- if (const_alpha == 255) {
- for (int i = 0; i < length; ++i) {
- STORE(&dest[i], multiplyAlpha65535(LOAD(&src[i]), dest[i].alpha()));
- }
- } else {
- uint ca = const_alpha * 257;
- auto cia = CONST(65535 - ca);
- for (int i = 0; i < length; ++i) {
- auto d = LOAD(&dest[i]);
- auto s = multiplyAlpha65535(LOAD(&src[i]), ca);
- STORE(&dest[i], interpolate65535(s, ALPHA(d), d, cia));
- }
- }
+ comp_func_SourceIn_template<Rgba64Operations>(dest, src, length, const_alpha);
}
/*
@@ -405,128 +626,120 @@ void QT_FASTCALL comp_func_SourceIn_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const Q
dest = d * sa * ca + d * cia
= d * (sa * ca + cia)
*/
-void QT_FASTCALL comp_func_solid_DestinationIn(uint *dest, int length, uint color, uint const_alpha)
+template<class Ops>
+inline static void comp_func_solid_DestinationIn_template(typename Ops::Type *dest, int length, typename Ops::Type color, uint const_alpha)
{
- uint a = qAlpha(color);
+ auto sa = Ops::alpha(Ops::convert(color));
if (const_alpha != 255) {
- a = BYTE_MUL(a, const_alpha) + 255 - const_alpha;
- }
- for (int i = 0; i < length; ++i) {
- dest[i] = BYTE_MUL(dest[i], a);
+ sa = Ops::multiplyAlpha8bit(sa, const_alpha);
+ sa = Ops::add(sa, Ops::invAlpha(Ops::scalarFrom8bit(const_alpha)));
}
-}
-void QT_FASTCALL comp_func_solid_DestinationIn_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
-{
- uint a = color.alpha();
- uint ca64k = const_alpha * 257;
- if (const_alpha != 255)
- a = qt_div_65535(a * ca64k) + 65535 - ca64k;
for (int i = 0; i < length; ++i) {
- STORE(&dest[i], multiplyAlpha65535(LOAD(&dest[i]), a));
+ Ops::store(&dest[i], Ops::multiplyAlpha(Ops::load(&dest[i]), sa));
}
}
-void QT_FASTCALL comp_func_DestinationIn(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
+template<class Ops>
+inline static void comp_func_DestinationIn_template(typename Ops::Type *Q_DECL_RESTRICT dest,
+ const typename Ops::Type *Q_DECL_RESTRICT src,
+ int length, uint const_alpha)
{
if (const_alpha == 255) {
for (int i = 0; i < length; ++i) {
- dest[i] = BYTE_MUL(dest[i], qAlpha(src[i]));
+ auto a = Ops::alpha(Ops::load(&src[i]));
+ Ops::store(&dest[i], Ops::multiplyAlpha(Ops::load(&dest[i]), a));
}
} else {
- uint cia = 255 - const_alpha;
+ auto cia = Ops::invAlpha(Ops::scalarFrom8bit(const_alpha));
for (int i = 0; i < length; ++i) {
- uint a = BYTE_MUL(qAlpha(src[i]), const_alpha) + cia;
- dest[i] = BYTE_MUL(dest[i], a);
+ auto sa = Ops::multiplyAlpha8bit(Ops::alpha(Ops::load(&src[i])), const_alpha);
+ sa = Ops::add(sa, cia);
+ Ops::store(&dest[i], Ops::multiplyAlpha(Ops::load(&dest[i]), sa));
}
}
}
+void QT_FASTCALL comp_func_solid_DestinationIn(uint *dest, int length, uint color, uint const_alpha)
+{
+ comp_func_solid_DestinationIn_template<Argb32Operations>(dest, length, color, const_alpha);
+}
+
+void QT_FASTCALL comp_func_solid_DestinationIn_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
+{
+ comp_func_solid_DestinationIn_template<Rgba64Operations>(dest, length, color, const_alpha);
+}
+
+void QT_FASTCALL comp_func_DestinationIn(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
+{
+ comp_func_DestinationIn_template<Argb32Operations>(dest, src, length, const_alpha);
+}
+
void QT_FASTCALL comp_func_DestinationIn_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
- if (const_alpha == 255) {
- for (int i = 0; i < length; ++i) {
- STORE(&dest[i], multiplyAlpha65535(LOAD(&dest[i]), src[i].alpha()));
- }
- } else {
- uint ca = const_alpha * 257;
- uint cia = 65535 - ca;
- for (int i = 0; i < length; ++i) {
- uint a = qt_div_65535(src[i].alpha() * ca) + cia;
- STORE(&dest[i], multiplyAlpha65535(LOAD(&dest[i]), a));
- }
- }
+ comp_func_DestinationIn_template<Rgba64Operations>(dest, src, length, const_alpha);
}
/*
result = s * dia
dest = s * dia * ca + d * cia
*/
-
-void QT_FASTCALL comp_func_solid_SourceOut(uint *dest, int length, uint color, uint const_alpha)
+template<class Ops>
+inline static void comp_func_solid_SourceOut_template(typename Ops::Type *dest, int length, typename Ops::Type color, uint const_alpha)
{
+ auto c = Ops::convert(color);
if (const_alpha == 255) {
- for (int i = 0; i < length; ++i) {
- dest[i] = BYTE_MUL(color, qAlpha(~dest[i]));
- }
+ for (int i = 0; i < length; ++i)
+ Ops::store(&dest[i], Ops::multiplyAlpha(c, Ops::invAlpha(Ops::load(&dest[i]))));
} else {
- color = BYTE_MUL(color, const_alpha);
- uint cia = 255 - const_alpha;
+ auto cia = Ops::invAlpha(Ops::scalarFrom8bit(const_alpha));
+ c = Ops::multiplyAlpha8bit(c, const_alpha);
for (int i = 0; i < length; ++i) {
- uint d = dest[i];
- dest[i] = INTERPOLATE_PIXEL_255(color, qAlpha(~d), d, cia);
+ auto d = Ops::load(&dest[i]);
+ Ops::store(&dest[i], Ops::interpolate(c, Ops::invAlpha(d), d, cia));
}
}
}
-void QT_FASTCALL comp_func_solid_SourceOut_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
+template<class Ops>
+inline static void comp_func_SourceOut_template(typename Ops::Type *Q_DECL_RESTRICT dest,
+ const typename Ops::Type *Q_DECL_RESTRICT src,
+ int length, uint const_alpha)
{
if (const_alpha == 255) {
for (int i = 0; i < length; ++i) {
- dest[i] = multiplyAlpha65535(color, 65535 - dest[i].alpha());
+ auto s = Ops::load(&src[i]);
+ auto d = Ops::load(&dest[i]);
+ Ops::store(&dest[i], Ops::multiplyAlpha(s, Ops::invAlpha(d)));
}
} else {
- uint ca = const_alpha * 257;
- uint cia = 65535 - ca;
- color = multiplyAlpha65535(color, ca);
+ auto cia = Ops::invAlpha(Ops::scalarFrom8bit(const_alpha));
for (int i = 0; i < length; ++i) {
- QRgba64 d = dest[i];
- dest[i] = interpolate65535(color, 65535 - d.alpha(), d, cia);
+ auto s = Ops::multiplyAlpha8bit(Ops::load(&src[i]), const_alpha);
+ auto d = Ops::load(&dest[i]);
+ Ops::store(&dest[i], Ops::interpolate(s, Ops::invAlpha(d), d, cia));
}
}
}
+void QT_FASTCALL comp_func_solid_SourceOut(uint *dest, int length, uint color, uint const_alpha)
+{
+ comp_func_solid_SourceOut_template<Argb32Operations>(dest, length, color, const_alpha);
+}
+
+void QT_FASTCALL comp_func_solid_SourceOut_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
+{
+ comp_func_solid_SourceOut_template<Rgba64Operations>(dest, length, color, const_alpha);
+}
+
void QT_FASTCALL comp_func_SourceOut(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
- if (const_alpha == 255) {
- for (int i = 0; i < length; ++i) {
- dest[i] = BYTE_MUL(src[i], qAlpha(~dest[i]));
- }
- } else {
- uint cia = 255 - const_alpha;
- for (int i = 0; i < length; ++i) {
- uint s = BYTE_MUL(src[i], const_alpha);
- uint d = dest[i];
- dest[i] = INTERPOLATE_PIXEL_255(s, qAlpha(~d), d, cia);
- }
- }
+ comp_func_SourceOut_template<Argb32Operations>(dest, src, length, const_alpha);
}
void QT_FASTCALL comp_func_SourceOut_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
- if (const_alpha == 255) {
- for (int i = 0; i < length; ++i) {
- dest[i] = multiplyAlpha65535(src[i], 65535 - dest[i].alpha());
- }
- } else {
- uint ca = const_alpha * 257;
- uint cia = 65535 - ca;
- for (int i = 0; i < length; ++i) {
- QRgba64 d = dest[i];
- QRgba64 s = multiplyAlpha65535(src[i], ca);
- dest[i] = interpolate65535(s, 65535 - d.alpha(), d, cia);
- }
- }
+ comp_func_SourceOut_template<Rgba64Operations>(dest, src, length, const_alpha);
}
/*
@@ -534,56 +747,58 @@ void QT_FASTCALL comp_func_SourceOut_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const
dest = d * sia * ca + d * cia
= d * (sia * ca + cia)
*/
-void QT_FASTCALL comp_func_solid_DestinationOut(uint *dest, int length, uint color, uint const_alpha)
+template<class Ops>
+inline static void comp_func_solid_DestinationOut_template(typename Ops::Type *dest, int length, typename Ops::Type color, uint const_alpha)
{
- uint a = qAlpha(~color);
- if (const_alpha != 255)
- a = BYTE_MUL(a, const_alpha) + 255 - const_alpha;
- for (int i = 0; i < length; ++i) {
- dest[i] = BYTE_MUL(dest[i], a);
+ auto sai = Ops::invAlpha(Ops::convert(color));
+ if (const_alpha != 255) {
+ sai = Ops::multiplyAlpha8bit(sai, const_alpha);
+ sai = Ops::add(sai, Ops::invAlpha(Ops::scalarFrom8bit(const_alpha)));
}
-}
-void QT_FASTCALL comp_func_solid_DestinationOut_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
-{
- uint a = 65535 - color.alpha();
- uint ca64k = const_alpha * 257;
- if (const_alpha != 255)
- a = qt_div_65535(a * ca64k) + 65535 - ca64k;
for (int i = 0; i < length; ++i) {
- dest[i] = multiplyAlpha65535(dest[i], a);
+ Ops::store(&dest[i], Ops::multiplyAlpha(Ops::load(&dest[i]), sai));
}
}
-void QT_FASTCALL comp_func_DestinationOut(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
+template<class Ops>
+inline static void comp_func_DestinationOut_template(typename Ops::Type *Q_DECL_RESTRICT dest,
+ const typename Ops::Type *Q_DECL_RESTRICT src,
+ int length, uint const_alpha)
{
if (const_alpha == 255) {
for (int i = 0; i < length; ++i) {
- dest[i] = BYTE_MUL(dest[i], qAlpha(~src[i]));
+ auto sia = Ops::invAlpha(Ops::load(&src[i]));
+ Ops::store(&dest[i], Ops::multiplyAlpha(Ops::load(&dest[i]), sia));
}
} else {
- uint cia = 255 - const_alpha;
+ auto cia = Ops::invAlpha(Ops::scalarFrom8bit(const_alpha));
for (int i = 0; i < length; ++i) {
- uint sia = BYTE_MUL(qAlpha(~src[i]), const_alpha) + cia;
- dest[i] = BYTE_MUL(dest[i], sia);
+ auto sia = Ops::multiplyAlpha8bit(Ops::invAlpha(Ops::load(&src[i])), const_alpha);
+ sia = Ops::add(sia, cia);
+ Ops::store(&dest[i], Ops::multiplyAlpha(Ops::load(&dest[i]), sia));
}
}
}
+void QT_FASTCALL comp_func_solid_DestinationOut(uint *dest, int length, uint color, uint const_alpha)
+{
+ comp_func_solid_DestinationOut_template<Argb32Operations>(dest, length, color, const_alpha);
+}
+
+void QT_FASTCALL comp_func_solid_DestinationOut_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
+{
+ comp_func_solid_DestinationOut_template<Rgba64Operations>(dest, length, color, const_alpha);
+}
+
+void QT_FASTCALL comp_func_DestinationOut(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
+{
+ comp_func_DestinationOut_template<Argb32Operations>(dest, src, length, const_alpha);
+}
+
void QT_FASTCALL comp_func_DestinationOut_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
- if (const_alpha == 255) {
- for (int i = 0; i < length; ++i) {
- dest[i] = multiplyAlpha65535(dest[i], 65535 - src[i].alpha());
- }
- } else {
- uint ca = const_alpha * 257;
- uint cia = 65535 - ca;
- for (int i = 0; i < length; ++i) {
- uint a = qt_div_65535((65535 - src[i].alpha()) * ca) + cia;
- dest[i] = multiplyAlpha65535(dest[i], a);
- }
- }
+ comp_func_DestinationOut_template<Rgba64Operations>(dest, src, length, const_alpha);
}
/*
@@ -592,59 +807,57 @@ void QT_FASTCALL comp_func_DestinationOut_rgb64(QRgba64 *Q_DECL_RESTRICT dest, c
= s*ca * da + d * (sia*ca + cia)
= s*ca * da + d * (1 - sa*ca)
*/
-void QT_FASTCALL comp_func_solid_SourceAtop(uint *dest, int length, uint color, uint const_alpha)
-{
- if (const_alpha != 255) {
- color = BYTE_MUL(color, const_alpha);
- }
- uint sia = qAlpha(~color);
- for (int i = 0; i < length; ++i) {
- dest[i] = INTERPOLATE_PIXEL_255(color, qAlpha(dest[i]), dest[i], sia);
- }
-}
-
-void QT_FASTCALL comp_func_solid_SourceAtop_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
+template<class Ops>
+inline static void comp_func_solid_SourceAtop_template(typename Ops::Type *dest, int length, typename Ops::Type color, uint const_alpha)
{
+ auto c = Ops::convert(color);
if (const_alpha != 255)
- color = multiplyAlpha255(color, const_alpha);
- uint sia = 65535 - color.alpha();
+ c = Ops::multiplyAlpha8bit(c, const_alpha);
+ auto sia = Ops::invAlpha(c);
for (int i = 0; i < length; ++i) {
- dest[i] = interpolate65535(color, dest[i].alpha(), dest[i], sia);
+ auto d = Ops::load(&dest[i]);
+ Ops::store(&dest[i], Ops::interpolate(c, Ops::alpha(d), d, sia));
}
}
-void QT_FASTCALL comp_func_SourceAtop(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
+template<class Ops>
+inline static void comp_func_SourceAtop_template(typename Ops::Type *Q_DECL_RESTRICT dest,
+ const typename Ops::Type *Q_DECL_RESTRICT src,
+ int length, uint const_alpha)
{
if (const_alpha == 255) {
for (int i = 0; i < length; ++i) {
- uint s = src[i];
- uint d = dest[i];
- dest[i] = INTERPOLATE_PIXEL_255(s, qAlpha(d), d, qAlpha(~s));
+ auto s = Ops::load(&src[i]);
+ auto d = Ops::load(&dest[i]);
+ Ops::store(&dest[i], Ops::interpolate(s, Ops::alpha(d), d, Ops::invAlpha(s)));
}
} else {
for (int i = 0; i < length; ++i) {
- uint s = BYTE_MUL(src[i], const_alpha);
- uint d = dest[i];
- dest[i] = INTERPOLATE_PIXEL_255(s, qAlpha(d), d, qAlpha(~s));
+ auto s = Ops::multiplyAlpha8bit(Ops::load(&src[i]), const_alpha);
+ auto d = Ops::load(&dest[i]);
+ Ops::store(&dest[i], Ops::interpolate(s, Ops::alpha(d), d, Ops::invAlpha(s)));
}
}
}
+void QT_FASTCALL comp_func_solid_SourceAtop(uint *dest, int length, uint color, uint const_alpha)
+{
+ comp_func_solid_SourceAtop_template<Argb32Operations>(dest, length, color, const_alpha);
+}
+
+void QT_FASTCALL comp_func_solid_SourceAtop_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
+{
+ comp_func_solid_SourceAtop_template<Rgba64Operations>(dest, length, color, const_alpha);
+}
+
+void QT_FASTCALL comp_func_SourceAtop(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
+{
+ comp_func_SourceAtop_template<Argb32Operations>(dest, src, length, const_alpha);
+}
+
void QT_FASTCALL comp_func_SourceAtop_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
- if (const_alpha == 255) {
- for (int i = 0; i < length; ++i) {
- QRgba64 s = src[i];
- QRgba64 d = dest[i];
- dest[i] = interpolate65535(s, d.alpha(), d, 65535 - s.alpha());
- }
- } else {
- for (int i = 0; i < length; ++i) {
- QRgba64 s = multiplyAlpha255(src[i], const_alpha);
- QRgba64 d = dest[i];
- dest[i] = interpolate65535(s, d.alpha(), d, 65535 - s.alpha());
- }
- }
+ comp_func_SourceAtop_template<Rgba64Operations>(dest, src, length, const_alpha);
}
/*
@@ -652,69 +865,63 @@ void QT_FASTCALL comp_func_SourceAtop_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const
dest = d*sa*ca + s*dia*ca + d *cia
= s*ca * dia + d * (sa*ca + cia)
*/
-void QT_FASTCALL comp_func_solid_DestinationAtop(uint *dest, int length, uint color, uint const_alpha)
+template<class Ops>
+inline static void comp_func_solid_DestinationAtop_template(typename Ops::Type *dest, int length, typename Ops::Type color, uint const_alpha)
{
- uint a = qAlpha(color);
+ auto c = Ops::convert(color);
+ auto sa = Ops::alpha(c);
if (const_alpha != 255) {
- color = BYTE_MUL(color, const_alpha);
- a = qAlpha(color) + 255 - const_alpha;
- }
- for (int i = 0; i < length; ++i) {
- uint d = dest[i];
- dest[i] = INTERPOLATE_PIXEL_255(d, a, color, qAlpha(~d));
+ c = Ops::multiplyAlpha8bit(c, const_alpha);
+ auto cia = Ops::invAlpha(Ops::scalarFrom8bit(const_alpha));
+ sa = Ops::add(Ops::alpha(c), cia);
}
-}
-void QT_FASTCALL comp_func_solid_DestinationAtop_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
-{
- uint a = color.alpha();
- if (const_alpha != 255) {
- color = multiplyAlpha255(color, const_alpha);
- a = color.alpha() + 65535 - (const_alpha * 257);
- }
for (int i = 0; i < length; ++i) {
- QRgba64 d = dest[i];
- dest[i] = interpolate65535(d, a, color, 65535 - d.alpha());
+ auto d = Ops::load(&dest[i]);
+ Ops::store(&dest[i], Ops::interpolate(c, Ops::invAlpha(d), d, sa));
}
}
-void QT_FASTCALL comp_func_DestinationAtop(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
+template<class Ops>
+inline static void comp_func_DestinationAtop_template(typename Ops::Type *Q_DECL_RESTRICT dest,
+ const typename Ops::Type *Q_DECL_RESTRICT src,
+ int length, uint const_alpha)
{
if (const_alpha == 255) {
for (int i = 0; i < length; ++i) {
- uint s = src[i];
- uint d = dest[i];
- dest[i] = INTERPOLATE_PIXEL_255(d, qAlpha(s), s, qAlpha(~d));
+ auto s = Ops::load(&src[i]);
+ auto d = Ops::load(&dest[i]);
+ Ops::store(&dest[i], Ops::interpolate(s, Ops::invAlpha(d), d, Ops::alpha(s)));
}
} else {
- uint cia = 255 - const_alpha;
+ auto cia = Ops::invAlpha(Ops::scalarFrom8bit(const_alpha));
for (int i = 0; i < length; ++i) {
- uint s = BYTE_MUL(src[i], const_alpha);
- uint d = dest[i];
- uint a = qAlpha(s) + cia;
- dest[i] = INTERPOLATE_PIXEL_255(d, a, s, qAlpha(~d));
+ auto s = Ops::multiplyAlpha8bit(Ops::load(&src[i]), const_alpha);
+ auto d = Ops::load(&dest[i]);
+ auto sa = Ops::add(Ops::alpha(s), cia);
+ Ops::store(&dest[i], Ops::interpolate(s, Ops::invAlpha(d), d, sa));
}
}
}
+void QT_FASTCALL comp_func_solid_DestinationAtop(uint *dest, int length, uint color, uint const_alpha)
+{
+ comp_func_solid_DestinationAtop_template<Argb32Operations>(dest, length, color, const_alpha);
+}
+
+void QT_FASTCALL comp_func_solid_DestinationAtop_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
+{
+ comp_func_solid_DestinationAtop_template<Rgba64Operations>(dest, length, color, const_alpha);
+}
+
+void QT_FASTCALL comp_func_DestinationAtop(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
+{
+ comp_func_DestinationAtop_template<Argb32Operations>(dest, src, length, const_alpha);
+}
+
void QT_FASTCALL comp_func_DestinationAtop_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
- if (const_alpha == 255) {
- for (int i = 0; i < length; ++i) {
- QRgba64 s = src[i];
- QRgba64 d = dest[i];
- dest[i] = interpolate65535(d, s.alpha(), s, 65535 - d.alpha());
- }
- } else {
- uint ca = const_alpha * 257;
- uint cia = 65535 - ca;
- for (int i = 0; i < length; ++i) {
- QRgba64 s = multiplyAlpha65535(src[i], ca);
- QRgba64 d = dest[i];
- uint a = s.alpha() + cia;
- dest[i] = interpolate65535(d, a, s, 65535 - d.alpha());
- }
- }
+ comp_func_DestinationAtop_template<Rgba64Operations>(dest, src, length, const_alpha);
}
/*
@@ -723,62 +930,58 @@ void QT_FASTCALL comp_func_DestinationAtop_rgb64(QRgba64 *Q_DECL_RESTRICT dest,
= s*ca * dia + d * (sia*ca + cia)
= s*ca * dia + d * (1 - sa*ca)
*/
-void QT_FASTCALL comp_func_solid_XOR(uint *dest, int length, uint color, uint const_alpha)
+template<class Ops>
+inline static void comp_func_solid_XOR_template(typename Ops::Type *dest, int length, typename Ops::Type color, uint const_alpha)
{
+ auto c = Ops::convert(color);
if (const_alpha != 255)
- color = BYTE_MUL(color, const_alpha);
- uint sia = qAlpha(~color);
+ c = Ops::multiplyAlpha8bit(c, const_alpha);
+ auto sia = Ops::invAlpha(c);
for (int i = 0; i < length; ++i) {
- uint d = dest[i];
- dest[i] = INTERPOLATE_PIXEL_255(color, qAlpha(~d), d, sia);
+ auto d = Ops::load(&dest[i]);
+ Ops::store(&dest[i], Ops::interpolate(c, Ops::invAlpha(d), d, sia));
}
}
-void QT_FASTCALL comp_func_solid_XOR_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
-{
- if (const_alpha != 255)
- color = multiplyAlpha255(color, const_alpha);
- auto s = CONVERT(color);
- auto sia = CONST(65535 - color.alpha());
- for (int i = 0; i < length; ++i) {
- auto d = LOAD(&dest[i]);
- STORE(&dest[i], interpolate65535(s, INVALPHA(d), d, sia));
- }
-}
-
-void QT_FASTCALL comp_func_XOR(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
+template<class Ops>
+inline static void comp_func_XOR_template(typename Ops::Type *Q_DECL_RESTRICT dest,
+ const typename Ops::Type *Q_DECL_RESTRICT src,
+ int length, uint const_alpha)
{
if (const_alpha == 255) {
for (int i = 0; i < length; ++i) {
- uint d = dest[i];
- uint s = src[i];
- dest[i] = INTERPOLATE_PIXEL_255(s, qAlpha(~d), d, qAlpha(~s));
+ auto d = Ops::load(&dest[i]);
+ auto s = Ops::load(&src[i]);
+ Ops::store(&dest[i], Ops::interpolate(s, Ops::invAlpha(d), d, Ops::invAlpha(s)));
}
} else {
for (int i = 0; i < length; ++i) {
- uint d = dest[i];
- uint s = BYTE_MUL(src[i], const_alpha);
- dest[i] = INTERPOLATE_PIXEL_255(s, qAlpha(~d), d, qAlpha(~s));
+ auto d = Ops::load(&dest[i]);
+ auto s = Ops::multiplyAlpha8bit(Ops::load(&src[i]), const_alpha);
+ Ops::store(&dest[i], Ops::interpolate(s, Ops::invAlpha(d), d, Ops::invAlpha(s)));
}
}
}
+void QT_FASTCALL comp_func_solid_XOR(uint *dest, int length, uint color, uint const_alpha)
+{
+ comp_func_solid_XOR_template<Argb32Operations>(dest, length, color, const_alpha);
+}
+
+void QT_FASTCALL comp_func_solid_XOR_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
+{
+ comp_func_solid_XOR_template<Rgba64Operations>(dest, length, color, const_alpha);
+}
+
+void QT_FASTCALL comp_func_XOR(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
+{
+ comp_func_XOR_template<Argb32Operations>(dest, src, length, const_alpha);
+}
+
void QT_FASTCALL comp_func_XOR_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
- if (const_alpha == 255) {
- for (int i = 0; i < length; ++i) {
- auto d = LOAD(&dest[i]);
- auto s = LOAD(&src[i]);
- STORE(&dest[i], interpolate65535(s, INVALPHA(d), d, INVALPHA(s)));
- }
- } else {
- for (int i = 0; i < length; ++i) {
- auto d = LOAD(&dest[i]);
- auto s = multiplyAlpha255(LOAD(&src[i]), const_alpha);
- STORE(&dest[i], interpolate65535(s, INVALPHA(d), d, INVALPHA(s)));
- }
- }
+ comp_func_XOR_template<Rgba64Operations>(dest, src, length, const_alpha);
}
struct QFullCoverage {
@@ -827,84 +1030,67 @@ static inline uint mix_alpha_rgb64(uint da, uint sa)
Dca' = Sca.Da + Dca.Sa + Sca.(1 - Da) + Dca.(1 - Sa)
= Sca + Dca
*/
-template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Plus_impl(uint *dest, int length, uint color, const T &coverage)
+template<class Ops>
+inline static void comp_func_solid_Plus_template(typename Ops::Type *dest, int length, typename Ops::Type color, uint const_alpha)
{
- uint s = color;
-
- for (int i = 0; i < length; ++i) {
- uint d = dest[i];
- d = comp_func_Plus_one_pixel(d, s);
- coverage.store(&dest[i], d);
+ auto c = Ops::convert(color);
+ if (const_alpha == 255) {
+ for (int i = 0; i < length; ++i) {
+ auto d = Ops::load(&dest[i]);
+ d = Ops::plus(d, c);
+ Ops::store(&dest[i], d);
+ }
+ } else {
+ uint ia = 255 - const_alpha;
+ for (int i = 0; i < length; ++i) {
+ auto d = Ops::load(&dest[i]);
+ d = Ops::interpolate8bit(Ops::plus(d, c), const_alpha, d, ia);
+ Ops::store(&dest[i], d);
+ }
}
}
-void QT_FASTCALL comp_func_solid_Plus(uint *dest, int length, uint color, uint const_alpha)
+template<class Ops>
+inline static void comp_func_Plus_template(typename Ops::Type *Q_DECL_RESTRICT dest,
+ const typename Ops::Type *Q_DECL_RESTRICT src,
+ int length, uint const_alpha)
{
- if (const_alpha == 255)
- comp_func_solid_Plus_impl(dest, length, color, QFullCoverage());
- else
- comp_func_solid_Plus_impl(dest, length, color, QPartialCoverage(const_alpha));
-}
-
-void QT_FASTCALL comp_func_solid_Plus_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
-{
- auto b = CONVERT(color);
if (const_alpha == 255) {
for (int i = 0; i < length; ++i) {
- auto a = LOAD(&dest[i]);
- a = addWithSaturation(a, b);
- STORE(&dest[i], a);
+ auto d = Ops::load(&dest[i]);
+ auto s = Ops::load(&src[i]);
+ d = Ops::plus(d, s);
+ Ops::store(&dest[i], d);
}
} else {
+ uint ia = 255 - const_alpha;
for (int i = 0; i < length; ++i) {
- auto a = LOAD(&dest[i]);
- auto d = addWithSaturation(a, b);
- a = interpolate255(d, const_alpha, a, 255 - const_alpha);
- STORE(&dest[i], a);
+ auto d = Ops::load(&dest[i]);
+ auto s = Ops::load(&src[i]);
+ d = Ops::interpolate8bit(Ops::plus(d, s), const_alpha, d, ia);
+ Ops::store(&dest[i], d);
}
}
}
-template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Plus_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
+void QT_FASTCALL comp_func_solid_Plus(uint *dest, int length, uint color, uint const_alpha)
{
- for (int i = 0; i < length; ++i) {
- uint d = dest[i];
- uint s = src[i];
-
- d = comp_func_Plus_one_pixel(d, s);
+ comp_func_solid_Plus_template<Argb32Operations>(dest, length, color, const_alpha);
+}
- coverage.store(&dest[i], d);
- }
+void QT_FASTCALL comp_func_solid_Plus_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
+{
+ comp_func_solid_Plus_template<Rgba64Operations>(dest, length, color, const_alpha);
}
void QT_FASTCALL comp_func_Plus(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
- if (const_alpha == 255)
- comp_func_Plus_impl(dest, src, length, QFullCoverage());
- else
- comp_func_Plus_impl(dest, src, length, QPartialCoverage(const_alpha));
+ comp_func_Plus_template<Argb32Operations>(dest, src, length, const_alpha);
}
void QT_FASTCALL comp_func_Plus_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
- if (const_alpha == 255) {
- for (int i = 0; i < length; ++i) {
- auto a = LOAD(&dest[i]);
- auto b = LOAD(&src[i]);
- a = addWithSaturation(a, b);
- STORE(&dest[i], a);
- }
- } else {
- for (int i = 0; i < length; ++i) {
- auto a = LOAD(&dest[i]);
- auto b = LOAD(&src[i]);
- auto d = addWithSaturation(a, b);
- a = interpolate255(d, const_alpha, a, 255 - const_alpha);
- STORE(&dest[i], a);
- }
- }
+ comp_func_Plus_template<Rgba64Operations>(dest, src, length, const_alpha);
}
/*
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 34847daf55..235bba7206 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Copyright (C) 2016 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
@@ -73,9 +73,6 @@ enum {
half_point = 1 << 15
};
-// must be multiple of 4 for easier SIMD implementations
-static const int buffer_size = 2048;
-
template<QImage::Format> Q_DECL_CONSTEXPR uint redWidth();
template<QImage::Format> Q_DECL_CONSTEXPR uint redShift();
template<QImage::Format> Q_DECL_CONSTEXPR uint greenWidth();
@@ -94,6 +91,10 @@ template<> Q_DECL_CONSTEXPR uint redWidth<QImage::Format_ARGB4444_Premultiplied>
template<> Q_DECL_CONSTEXPR uint redWidth<QImage::Format_ARGB8555_Premultiplied>() { return 5; }
template<> Q_DECL_CONSTEXPR uint redWidth<QImage::Format_ARGB8565_Premultiplied>() { return 5; }
template<> Q_DECL_CONSTEXPR uint redWidth<QImage::Format_ARGB6666_Premultiplied>() { return 6; }
+template<> Q_DECL_CONSTEXPR uint redWidth<QImage::Format_RGBX8888>() { return 8; }
+template<> Q_DECL_CONSTEXPR uint redWidth<QImage::Format_RGBA8888>() { return 8; }
+template<> Q_DECL_CONSTEXPR uint redWidth<QImage::Format_RGBA8888_Premultiplied>() { return 8; }
+
template<> Q_DECL_CONSTEXPR uint redShift<QImage::Format_RGB16>() { return 11; }
template<> Q_DECL_CONSTEXPR uint redShift<QImage::Format_RGB444>() { return 8; }
template<> Q_DECL_CONSTEXPR uint redShift<QImage::Format_RGB555>() { return 10; }
@@ -103,6 +104,15 @@ template<> Q_DECL_CONSTEXPR uint redShift<QImage::Format_ARGB4444_Premultiplied>
template<> Q_DECL_CONSTEXPR uint redShift<QImage::Format_ARGB8555_Premultiplied>() { return 18; }
template<> Q_DECL_CONSTEXPR uint redShift<QImage::Format_ARGB8565_Premultiplied>() { return 19; }
template<> Q_DECL_CONSTEXPR uint redShift<QImage::Format_ARGB6666_Premultiplied>() { return 12; }
+#if Q_BYTE_ORDER == Q_BIG_ENDIAN
+template<> Q_DECL_CONSTEXPR uint redShift<QImage::Format_RGBX8888>() { return 24; }
+template<> Q_DECL_CONSTEXPR uint redShift<QImage::Format_RGBA8888>() { return 24; }
+template<> Q_DECL_CONSTEXPR uint redShift<QImage::Format_RGBA8888_Premultiplied>() { return 24; }
+#else
+template<> Q_DECL_CONSTEXPR uint redShift<QImage::Format_RGBX8888>() { return 0; }
+template<> Q_DECL_CONSTEXPR uint redShift<QImage::Format_RGBA8888>() { return 0; }
+template<> Q_DECL_CONSTEXPR uint redShift<QImage::Format_RGBA8888_Premultiplied>() { return 0; }
+#endif
template<> Q_DECL_CONSTEXPR uint greenWidth<QImage::Format_RGB16>() { return 6; }
template<> Q_DECL_CONSTEXPR uint greenWidth<QImage::Format_RGB444>() { return 4; }
template<> Q_DECL_CONSTEXPR uint greenWidth<QImage::Format_RGB555>() { return 5; }
@@ -112,6 +122,10 @@ template<> Q_DECL_CONSTEXPR uint greenWidth<QImage::Format_ARGB4444_Premultiplie
template<> Q_DECL_CONSTEXPR uint greenWidth<QImage::Format_ARGB8555_Premultiplied>() { return 5; }
template<> Q_DECL_CONSTEXPR uint greenWidth<QImage::Format_ARGB8565_Premultiplied>() { return 6; }
template<> Q_DECL_CONSTEXPR uint greenWidth<QImage::Format_ARGB6666_Premultiplied>() { return 6; }
+template<> Q_DECL_CONSTEXPR uint greenWidth<QImage::Format_RGBX8888>() { return 8; }
+template<> Q_DECL_CONSTEXPR uint greenWidth<QImage::Format_RGBA8888>() { return 8; }
+template<> Q_DECL_CONSTEXPR uint greenWidth<QImage::Format_RGBA8888_Premultiplied>() { return 8; }
+
template<> Q_DECL_CONSTEXPR uint greenShift<QImage::Format_RGB16>() { return 5; }
template<> Q_DECL_CONSTEXPR uint greenShift<QImage::Format_RGB444>() { return 4; }
template<> Q_DECL_CONSTEXPR uint greenShift<QImage::Format_RGB555>() { return 5; }
@@ -121,6 +135,15 @@ template<> Q_DECL_CONSTEXPR uint greenShift<QImage::Format_ARGB4444_Premultiplie
template<> Q_DECL_CONSTEXPR uint greenShift<QImage::Format_ARGB8555_Premultiplied>() { return 13; }
template<> Q_DECL_CONSTEXPR uint greenShift<QImage::Format_ARGB8565_Premultiplied>() { return 13; }
template<> Q_DECL_CONSTEXPR uint greenShift<QImage::Format_ARGB6666_Premultiplied>() { return 6; }
+#if Q_BYTE_ORDER == Q_BIG_ENDIAN
+template<> Q_DECL_CONSTEXPR uint greenShift<QImage::Format_RGBX8888>() { return 16; }
+template<> Q_DECL_CONSTEXPR uint greenShift<QImage::Format_RGBA8888>() { return 16; }
+template<> Q_DECL_CONSTEXPR uint greenShift<QImage::Format_RGBA8888_Premultiplied>() { return 16; }
+#else
+template<> Q_DECL_CONSTEXPR uint greenShift<QImage::Format_RGBX8888>() { return 8; }
+template<> Q_DECL_CONSTEXPR uint greenShift<QImage::Format_RGBA8888>() { return 8; }
+template<> Q_DECL_CONSTEXPR uint greenShift<QImage::Format_RGBA8888_Premultiplied>() { return 8; }
+#endif
template<> Q_DECL_CONSTEXPR uint blueWidth<QImage::Format_RGB16>() { return 5; }
template<> Q_DECL_CONSTEXPR uint blueWidth<QImage::Format_RGB444>() { return 4; }
template<> Q_DECL_CONSTEXPR uint blueWidth<QImage::Format_RGB555>() { return 5; }
@@ -130,6 +153,10 @@ template<> Q_DECL_CONSTEXPR uint blueWidth<QImage::Format_ARGB4444_Premultiplied
template<> Q_DECL_CONSTEXPR uint blueWidth<QImage::Format_ARGB8555_Premultiplied>() { return 5; }
template<> Q_DECL_CONSTEXPR uint blueWidth<QImage::Format_ARGB8565_Premultiplied>() { return 5; }
template<> Q_DECL_CONSTEXPR uint blueWidth<QImage::Format_ARGB6666_Premultiplied>() { return 6; }
+template<> Q_DECL_CONSTEXPR uint blueWidth<QImage::Format_RGBX8888>() { return 8; }
+template<> Q_DECL_CONSTEXPR uint blueWidth<QImage::Format_RGBA8888>() { return 8; }
+template<> Q_DECL_CONSTEXPR uint blueWidth<QImage::Format_RGBA8888_Premultiplied>() { return 8; }
+
template<> Q_DECL_CONSTEXPR uint blueShift<QImage::Format_RGB16>() { return 0; }
template<> Q_DECL_CONSTEXPR uint blueShift<QImage::Format_RGB444>() { return 0; }
template<> Q_DECL_CONSTEXPR uint blueShift<QImage::Format_RGB555>() { return 0; }
@@ -139,6 +166,15 @@ template<> Q_DECL_CONSTEXPR uint blueShift<QImage::Format_ARGB4444_Premultiplied
template<> Q_DECL_CONSTEXPR uint blueShift<QImage::Format_ARGB8555_Premultiplied>() { return 8; }
template<> Q_DECL_CONSTEXPR uint blueShift<QImage::Format_ARGB8565_Premultiplied>() { return 8; }
template<> Q_DECL_CONSTEXPR uint blueShift<QImage::Format_ARGB6666_Premultiplied>() { return 0; }
+#if Q_BYTE_ORDER == Q_BIG_ENDIAN
+template<> Q_DECL_CONSTEXPR uint blueShift<QImage::Format_RGBX8888>() { return 8; }
+template<> Q_DECL_CONSTEXPR uint blueShift<QImage::Format_RGBA8888>() { return 8; }
+template<> Q_DECL_CONSTEXPR uint blueShift<QImage::Format_RGBA8888_Premultiplied>() { return 8; }
+#else
+template<> Q_DECL_CONSTEXPR uint blueShift<QImage::Format_RGBX8888>() { return 16; }
+template<> Q_DECL_CONSTEXPR uint blueShift<QImage::Format_RGBA8888>() { return 16; }
+template<> Q_DECL_CONSTEXPR uint blueShift<QImage::Format_RGBA8888_Premultiplied>() { return 16; }
+#endif
template<> Q_DECL_CONSTEXPR uint alphaWidth<QImage::Format_RGB16>() { return 0; }
template<> Q_DECL_CONSTEXPR uint alphaWidth<QImage::Format_RGB444>() { return 0; }
template<> Q_DECL_CONSTEXPR uint alphaWidth<QImage::Format_RGB555>() { return 0; }
@@ -148,6 +184,10 @@ template<> Q_DECL_CONSTEXPR uint alphaWidth<QImage::Format_ARGB4444_Premultiplie
template<> Q_DECL_CONSTEXPR uint alphaWidth<QImage::Format_ARGB8555_Premultiplied>() { return 8; }
template<> Q_DECL_CONSTEXPR uint alphaWidth<QImage::Format_ARGB8565_Premultiplied>() { return 8; }
template<> Q_DECL_CONSTEXPR uint alphaWidth<QImage::Format_ARGB6666_Premultiplied>() { return 6; }
+template<> Q_DECL_CONSTEXPR uint alphaWidth<QImage::Format_RGBX8888>() { return 0; }
+template<> Q_DECL_CONSTEXPR uint alphaWidth<QImage::Format_RGBA8888>() { return 8; }
+template<> Q_DECL_CONSTEXPR uint alphaWidth<QImage::Format_RGBA8888_Premultiplied>() { return 8; }
+
template<> Q_DECL_CONSTEXPR uint alphaShift<QImage::Format_RGB16>() { return 0; }
template<> Q_DECL_CONSTEXPR uint alphaShift<QImage::Format_RGB444>() { return 0; }
template<> Q_DECL_CONSTEXPR uint alphaShift<QImage::Format_RGB555>() { return 0; }
@@ -157,54 +197,129 @@ template<> Q_DECL_CONSTEXPR uint alphaShift<QImage::Format_ARGB4444_Premultiplie
template<> Q_DECL_CONSTEXPR uint alphaShift<QImage::Format_ARGB8555_Premultiplied>() { return 0; }
template<> Q_DECL_CONSTEXPR uint alphaShift<QImage::Format_ARGB8565_Premultiplied>() { return 0; }
template<> Q_DECL_CONSTEXPR uint alphaShift<QImage::Format_ARGB6666_Premultiplied>() { return 18; }
+#if Q_BYTE_ORDER == Q_BIG_ENDIAN
+template<> Q_DECL_CONSTEXPR uint alphaShift<QImage::Format_RGBX8888>() { return 0; }
+template<> Q_DECL_CONSTEXPR uint alphaShift<QImage::Format_RGBA8888>() { return 0; }
+template<> Q_DECL_CONSTEXPR uint alphaShift<QImage::Format_RGBA8888_Premultiplied>() { return 0; }
+#else
+template<> Q_DECL_CONSTEXPR uint alphaShift<QImage::Format_RGBX8888>() { return 24; }
+template<> Q_DECL_CONSTEXPR uint alphaShift<QImage::Format_RGBA8888>() { return 24; }
+template<> Q_DECL_CONSTEXPR uint alphaShift<QImage::Format_RGBA8888_Premultiplied>() { return 24; }
+#endif
-template<QImage::Format> Q_DECL_CONSTEXPR QPixelLayout::BPP bitsPerPixel();
-template<> Q_DECL_CONSTEXPR QPixelLayout::BPP bitsPerPixel<QImage::Format_RGB16>() { return QPixelLayout::BPP16; }
-template<> Q_DECL_CONSTEXPR QPixelLayout::BPP bitsPerPixel<QImage::Format_RGB444>() { return QPixelLayout::BPP16; }
-template<> Q_DECL_CONSTEXPR QPixelLayout::BPP bitsPerPixel<QImage::Format_RGB555>() { return QPixelLayout::BPP16; }
-template<> Q_DECL_CONSTEXPR QPixelLayout::BPP bitsPerPixel<QImage::Format_RGB666>() { return QPixelLayout::BPP24; }
-template<> Q_DECL_CONSTEXPR QPixelLayout::BPP bitsPerPixel<QImage::Format_RGB888>() { return QPixelLayout::BPP24; }
-template<> Q_DECL_CONSTEXPR QPixelLayout::BPP bitsPerPixel<QImage::Format_ARGB4444_Premultiplied>() { return QPixelLayout::BPP16; }
-template<> Q_DECL_CONSTEXPR QPixelLayout::BPP bitsPerPixel<QImage::Format_ARGB8555_Premultiplied>() { return QPixelLayout::BPP24; }
-template<> Q_DECL_CONSTEXPR QPixelLayout::BPP bitsPerPixel<QImage::Format_ARGB8565_Premultiplied>() { return QPixelLayout::BPP24; }
-template<> Q_DECL_CONSTEXPR QPixelLayout::BPP bitsPerPixel<QImage::Format_ARGB6666_Premultiplied>() { return QPixelLayout::BPP24; }
+template<QImage::Format> constexpr QPixelLayout::BPP bitsPerPixel();
+template<> constexpr QPixelLayout::BPP bitsPerPixel<QImage::Format_RGB16>() { return QPixelLayout::BPP16; }
+template<> constexpr QPixelLayout::BPP bitsPerPixel<QImage::Format_RGB444>() { return QPixelLayout::BPP16; }
+template<> constexpr QPixelLayout::BPP bitsPerPixel<QImage::Format_RGB555>() { return QPixelLayout::BPP16; }
+template<> constexpr QPixelLayout::BPP bitsPerPixel<QImage::Format_RGB666>() { return QPixelLayout::BPP24; }
+template<> constexpr QPixelLayout::BPP bitsPerPixel<QImage::Format_RGB888>() { return QPixelLayout::BPP24; }
+template<> constexpr QPixelLayout::BPP bitsPerPixel<QImage::Format_ARGB4444_Premultiplied>() { return QPixelLayout::BPP16; }
+template<> constexpr QPixelLayout::BPP bitsPerPixel<QImage::Format_ARGB8555_Premultiplied>() { return QPixelLayout::BPP24; }
+template<> constexpr QPixelLayout::BPP bitsPerPixel<QImage::Format_ARGB8565_Premultiplied>() { return QPixelLayout::BPP24; }
+template<> constexpr QPixelLayout::BPP bitsPerPixel<QImage::Format_ARGB6666_Premultiplied>() { return QPixelLayout::BPP24; }
+template<> constexpr QPixelLayout::BPP bitsPerPixel<QImage::Format_RGBX8888>() { return QPixelLayout::BPP32; }
+template<> constexpr QPixelLayout::BPP bitsPerPixel<QImage::Format_RGBA8888>() { return QPixelLayout::BPP32; }
+template<> constexpr QPixelLayout::BPP bitsPerPixel<QImage::Format_RGBA8888_Premultiplied>() { return QPixelLayout::BPP32; }
-template<QImage::Format Format>
-static const uint *QT_FASTCALL convertToRGB32(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+typedef const uint *(QT_FASTCALL *FetchPixelsFunc)(uint *buffer, const uchar *src, int index, int count);
+
+template <QPixelLayout::BPP bpp> static
+uint QT_FASTCALL fetchPixel(const uchar *, int)
{
- auto conversion = [](uint s) {
- // MSVC needs these constexpr defined in here otherwise it will create a capture.
- Q_CONSTEXPR uint redMask = ((1 << redWidth<Format>()) - 1);
- Q_CONSTEXPR uint greenMask = ((1 << greenWidth<Format>()) - 1);
- Q_CONSTEXPR uint blueMask = ((1 << blueWidth<Format>()) - 1);
+ Q_UNREACHABLE();
+ return 0;
+}
- Q_CONSTEXPR uchar redLeftShift = 8 - redWidth<Format>();
- Q_CONSTEXPR uchar greenLeftShift = 8 - greenWidth<Format>();
- Q_CONSTEXPR uchar blueLeftShift = 8 - blueWidth<Format>();
+template <>
+inline uint QT_FASTCALL fetchPixel<QPixelLayout::BPP1LSB>(const uchar *src, int index)
+{
+ return (src[index >> 3] >> (index & 7)) & 1;
+}
- Q_CONSTEXPR uchar redRightShift = 2 * redWidth<Format>() - 8;
- Q_CONSTEXPR uchar greenRightShift = 2 * greenWidth<Format>() - 8;
- Q_CONSTEXPR uchar blueRightShift = 2 * blueWidth<Format>() - 8;
+template <>
+inline uint QT_FASTCALL fetchPixel<QPixelLayout::BPP1MSB>(const uchar *src, int index)
+{
+ return (src[index >> 3] >> (~index & 7)) & 1;
+}
- uint red = (s >> redShift<Format>()) & redMask;
- uint green = (s >> greenShift<Format>()) & greenMask;
- uint blue = (s >> blueShift<Format>()) & blueMask;
+template <>
+inline uint QT_FASTCALL fetchPixel<QPixelLayout::BPP8>(const uchar *src, int index)
+{
+ return src[index];
+}
- red = ((red << redLeftShift) | (red >> redRightShift)) << 16;
- green = ((green << greenLeftShift) | (green >> greenRightShift)) << 8;
- blue = (blue << blueLeftShift) | (blue >> blueRightShift);
- return 0xff000000 | red | green | blue;
- };
+template <>
+inline uint QT_FASTCALL fetchPixel<QPixelLayout::BPP16>(const uchar *src, int index)
+{
+ return reinterpret_cast<const quint16 *>(src)[index];
+}
+
+template <>
+inline uint QT_FASTCALL fetchPixel<QPixelLayout::BPP24>(const uchar *src, int index)
+{
+ return reinterpret_cast<const quint24 *>(src)[index];
+}
- UNALIASED_CONVERSION_LOOP(buffer, src, count, conversion);
+template <>
+inline uint QT_FASTCALL fetchPixel<QPixelLayout::BPP32>(const uchar *src, int index)
+{
+ return reinterpret_cast<const uint *>(src)[index];
+}
+
+template <QPixelLayout::BPP bpp>
+inline const uint *QT_FASTCALL fetchPixels(uint *buffer, const uchar *src, int index, int count)
+{
+ for (int i = 0; i < count; ++i)
+ buffer[i] = fetchPixel<bpp>(src, index + i);
return buffer;
}
+template <>
+inline const uint *QT_FASTCALL fetchPixels<QPixelLayout::BPP32>(uint *, const uchar *src, int index, int)
+{
+ return reinterpret_cast<const uint *>(src) + index;
+}
+
+template <QPixelLayout::BPP width> static
+void QT_FASTCALL storePixel(uchar *dest, int index, uint pixel);
+
+template <>
+inline void QT_FASTCALL storePixel<QPixelLayout::BPP16>(uchar *dest, int index, uint pixel)
+{
+ reinterpret_cast<quint16 *>(dest)[index] = quint16(pixel);
+}
+
+template <>
+inline void QT_FASTCALL storePixel<QPixelLayout::BPP24>(uchar *dest, int index, uint pixel)
+{
+ reinterpret_cast<quint24 *>(dest)[index] = quint24(pixel);
+}
+
+static FetchPixelsFunc qFetchPixels[QPixelLayout::BPPCount] = {
+ 0, // BPPNone
+ fetchPixels<QPixelLayout::BPP1MSB>, // BPP1MSB
+ fetchPixels<QPixelLayout::BPP1LSB>, // BPP1LSB
+ fetchPixels<QPixelLayout::BPP8>, // BPP8
+ fetchPixels<QPixelLayout::BPP16>, // BPP16
+ fetchPixels<QPixelLayout::BPP24>, // BPP24
+ fetchPixels<QPixelLayout::BPP32> // BPP32
+};
+
+typedef uint (QT_FASTCALL *FetchPixelFunc)(const uchar *src, int index);
+
+static const FetchPixelFunc qFetchPixel[QPixelLayout::BPPCount] = {
+ 0, // BPPNone
+ fetchPixel<QPixelLayout::BPP1MSB>, // BPP1MSB
+ fetchPixel<QPixelLayout::BPP1LSB>, // BPP1LSB
+ fetchPixel<QPixelLayout::BPP8>, // BPP8
+ fetchPixel<QPixelLayout::BPP16>, // BPP16
+ fetchPixel<QPixelLayout::BPP24>, // BPP24
+ fetchPixel<QPixelLayout::BPP32> // BPP32
+};
+
template<QImage::Format Format>
-static const QRgba64 *QT_FASTCALL convertToRGB64(QRgba64 *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+static Q_ALWAYS_INLINE uint convertPixelToRGB32(uint s)
{
Q_CONSTEXPR uint redMask = ((1 << redWidth<Format>()) - 1);
Q_CONSTEXPR uint greenMask = ((1 << greenWidth<Format>()) - 1);
@@ -218,23 +333,54 @@ static const QRgba64 *QT_FASTCALL convertToRGB64(QRgba64 *buffer, const uint *sr
Q_CONSTEXPR uchar greenRightShift = 2 * greenWidth<Format>() - 8;
Q_CONSTEXPR uchar blueRightShift = 2 * blueWidth<Format>() - 8;
- for (int i = 0; i < count; ++i) {
- uint red = (src[i] >> redShift<Format>()) & redMask;
- uint green = (src[i] >> greenShift<Format>()) & greenMask;
- uint blue = (src[i] >> blueShift<Format>()) & blueMask;
-
- red = ((red << redLeftShift) | (red >> redRightShift));
- green = ((green << greenLeftShift) | (green >> greenRightShift));
- blue = (blue << blueLeftShift) | (blue >> blueRightShift);
- buffer[i] = QRgba64::fromRgba(red, green, blue, 255);
+ uint red = (s >> redShift<Format>()) & redMask;
+ uint green = (s >> greenShift<Format>()) & greenMask;
+ uint blue = (s >> blueShift<Format>()) & blueMask;
+
+ red = ((red << redLeftShift) | (red >> redRightShift)) << 16;
+ green = ((green << greenLeftShift) | (green >> greenRightShift)) << 8;
+ blue = (blue << blueLeftShift) | (blue >> blueRightShift);
+ return 0xff000000 | red | green | blue;
+}
+
+template<QImage::Format Format>
+static void QT_FASTCALL convertToRGB32(uint *buffer, int count, const QVector<QRgb> *)
+{
+ for (int i = 0; i < count; ++i)
+ buffer[i] = convertPixelToRGB32<Format>(buffer[i]);
+}
+
+template<QImage::Format Format>
+static const uint *QT_FASTCALL fetchRGBToRGB32(uint *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ constexpr QPixelLayout::BPP BPP = bitsPerPixel<Format>();
+#if defined(__SSE2__) && !defined(__SSSE3__)
+ if (BPP == QPixelLayout::BPP24) {
+ // With SSE2 can convertToRGB32 be vectorized, but it takes SSSE3
+ // to vectorize the deforested version below.
+ qFetchPixels[BPP](buffer, src, index, count);
+ convertToRGB32<Format>(buffer, count, nullptr);
+ return buffer;
}
+#endif
+ for (int i = 0; i < count; ++i)
+ buffer[i] = convertPixelToRGB32<Format>(fetchPixel<BPP>(src, index + i));
+ return buffer;
+}
+
+template<QImage::Format Format>
+static const QRgba64 *QT_FASTCALL convertToRGB64(QRgba64 *buffer, const uint *src, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ for (int i = 0; i < count; ++i)
+ buffer[i] = QRgba64::fromArgb32(convertPixelToRGB32<Format>(src[i]));
return buffer;
}
template<QImage::Format Format>
-static const uint *QT_FASTCALL convertARGBPMToARGB32PM(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+static Q_ALWAYS_INLINE uint convertPixelToARGB32PM(uint s)
{
Q_CONSTEXPR uint alphaMask = ((1 << alphaWidth<Format>()) - 1);
Q_CONSTEXPR uint redMask = ((1 << redWidth<Format>()) - 1);
@@ -255,34 +401,48 @@ static const uint *QT_FASTCALL convertARGBPMToARGB32PM(uint *buffer, const uint
(alphaWidth<Format>() != greenWidth<Format>()) ||
(alphaWidth<Format>() != blueWidth<Format>());
+ uint alpha = (s >> alphaShift<Format>()) & alphaMask;
+ uint red = (s >> redShift<Format>()) & redMask;
+ uint green = (s >> greenShift<Format>()) & greenMask;
+ uint blue = (s >> blueShift<Format>()) & blueMask;
+
+ alpha = (alpha << alphaLeftShift) | (alpha >> alphaRightShift);
+ red = (red << redLeftShift) | (red >> redRightShift);
+ green = (green << greenLeftShift) | (green >> greenRightShift);
+ blue = (blue << blueLeftShift) | (blue >> blueRightShift);
+
if (mustMin) {
- for (int i = 0; i < count; ++i) {
- uint alpha = (src[i] >> alphaShift<Format>()) & alphaMask;
- uint red = (src[i] >> redShift<Format>()) & redMask;
- uint green = (src[i] >> greenShift<Format>()) & greenMask;
- uint blue = (src[i] >> blueShift<Format>()) & blueMask;
-
- alpha = (alpha << alphaLeftShift) | (alpha >> alphaRightShift);
- red = qMin(alpha, (red << redLeftShift) | (red >> redRightShift));
- green = qMin(alpha, (green << greenLeftShift) | (green >> greenRightShift));
- blue = qMin(alpha, (blue << blueLeftShift) | (blue >> blueRightShift));
- buffer[i] = (alpha << 24) | (red << 16) | (green << 8) | blue;
- }
- } else {
- for (int i = 0; i < count; ++i) {
- uint alpha = (src[i] >> alphaShift<Format>()) & alphaMask;
- uint red = (src[i] >> redShift<Format>()) & redMask;
- uint green = (src[i] >> greenShift<Format>()) & greenMask;
- uint blue = (src[i] >> blueShift<Format>()) & blueMask;
-
- alpha = ((alpha << alphaLeftShift) | (alpha >> alphaRightShift)) << 24;
- red = ((red << redLeftShift) | (red >> redRightShift)) << 16;
- green = ((green << greenLeftShift) | (green >> greenRightShift)) << 8;
- blue = (blue << blueLeftShift) | (blue >> blueRightShift);
- buffer[i] = alpha | red | green | blue;
- }
+ red = qMin(alpha, red);
+ green = qMin(alpha, green);
+ blue = qMin(alpha, blue);
}
+ return (alpha << 24) | (red << 16) | (green << 8) | blue;
+}
+
+template<QImage::Format Format>
+static void QT_FASTCALL convertARGBPMToARGB32PM(uint *buffer, int count, const QVector<QRgb> *)
+{
+ for (int i = 0; i < count; ++i)
+ buffer[i] = convertPixelToARGB32PM<Format>(buffer[i]);
+}
+
+template<QImage::Format Format>
+static const uint *QT_FASTCALL fetchARGBPMToARGB32PM(uint *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ constexpr QPixelLayout::BPP BPP = bitsPerPixel<Format>();
+#if defined(__SSE2__) && !defined(__SSSE3__)
+ if (BPP == QPixelLayout::BPP24) {
+ // With SSE2 can convertToRGB32 be vectorized, but it takes SSSE3
+ // to vectorize the deforested version below.
+ qFetchPixels[BPP](buffer, src, index, count);
+ convertARGBPMToARGB32PM<Format>(buffer, count, nullptr);
+ return buffer;
+ }
+#endif
+ for (int i = 0; i < count; ++i)
+ buffer[i] = convertPixelToARGB32PM<Format>(fetchPixel<BPP>(src, index + i));
return buffer;
}
@@ -290,81 +450,37 @@ template<QImage::Format Format>
static const QRgba64 *QT_FASTCALL convertARGBPMToARGB64PM(QRgba64 *buffer, const uint *src, int count,
const QVector<QRgb> *, QDitherInfo *)
{
- Q_CONSTEXPR uint alphaMask = ((1 << alphaWidth<Format>()) - 1);
- Q_CONSTEXPR uint redMask = ((1 << redWidth<Format>()) - 1);
- Q_CONSTEXPR uint greenMask = ((1 << greenWidth<Format>()) - 1);
- Q_CONSTEXPR uint blueMask = ((1 << blueWidth<Format>()) - 1);
-
- Q_CONSTEXPR uchar alphaLeftShift = 8 - alphaWidth<Format>();
- Q_CONSTEXPR uchar redLeftShift = 8 - redWidth<Format>();
- Q_CONSTEXPR uchar greenLeftShift = 8 - greenWidth<Format>();
- Q_CONSTEXPR uchar blueLeftShift = 8 - blueWidth<Format>();
-
- Q_CONSTEXPR uchar alphaRightShift = 2 * alphaWidth<Format>() - 8;
- Q_CONSTEXPR uchar redRightShift = 2 * redWidth<Format>() - 8;
- Q_CONSTEXPR uchar greenRightShift = 2 * greenWidth<Format>() - 8;
- Q_CONSTEXPR uchar blueRightShift = 2 * blueWidth<Format>() - 8;
-
- Q_CONSTEXPR bool mustMin = (alphaWidth<Format>() != redWidth<Format>()) ||
- (alphaWidth<Format>() != greenWidth<Format>()) ||
- (alphaWidth<Format>() != blueWidth<Format>());
-
- if (mustMin) {
- for (int i = 0; i < count; ++i) {
- uint alpha = (src[i] >> alphaShift<Format>()) & alphaMask;
- uint red = (src[i] >> redShift<Format>()) & redMask;
- uint green = (src[i] >> greenShift<Format>()) & greenMask;
- uint blue = (src[i] >> blueShift<Format>()) & blueMask;
-
- alpha = (alpha << alphaLeftShift) | (alpha >> alphaRightShift);
- red = qMin(alpha, (red << redLeftShift) | (red >> redRightShift));
- green = qMin(alpha, (green << greenLeftShift) | (green >> greenRightShift));
- blue = qMin(alpha, (blue << blueLeftShift) | (blue >> blueRightShift));
- buffer[i] = QRgba64::fromRgba(red, green, blue, alpha);
- }
- } else {
- for (int i = 0; i < count; ++i) {
- uint alpha = (src[i] >> alphaShift<Format>()) & alphaMask;
- uint red = (src[i] >> redShift<Format>()) & redMask;
- uint green = (src[i] >> greenShift<Format>()) & greenMask;
- uint blue = (src[i] >> blueShift<Format>()) & blueMask;
-
- alpha = (alpha << alphaLeftShift) | (alpha >> alphaRightShift);
- red = (red << redLeftShift) | (red >> redRightShift);
- green = (green << greenLeftShift) | (green >> greenRightShift);
- blue = (blue << blueLeftShift) | (blue >> blueRightShift);
- buffer[i] = QRgba64::fromRgba(red, green, blue, alpha);
- }
- }
+ for (int i = 0; i < count; ++i)
+ buffer[i] = QRgba64::fromArgb32(convertPixelToARGB32PM<Format>(src[i]));
return buffer;
}
template<QImage::Format Format, bool fromRGB>
-static const uint *QT_FASTCALL convertRGBFromARGB32PM(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *dither)
+static void QT_FASTCALL storeRGBFromARGB32PM(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *dither)
{
Q_CONSTEXPR uchar rWidth = redWidth<Format>();
Q_CONSTEXPR uchar gWidth = greenWidth<Format>();
Q_CONSTEXPR uchar bWidth = blueWidth<Format>();
+ constexpr QPixelLayout::BPP BPP = bitsPerPixel<Format>();
// RGB32 -> RGB888 is not a precision loss.
if (!dither || (rWidth == 8 && gWidth == 8 && bWidth == 8)) {
- auto conversion = [](uint s) {
- const uint c = fromRGB ? s : qUnpremultiply(s);
- Q_CONSTEXPR uint rMask = (1 << redWidth<Format>()) - 1;
- Q_CONSTEXPR uint gMask = (1 << greenWidth<Format>()) - 1;
- Q_CONSTEXPR uint bMask = (1 << blueWidth<Format>()) - 1;
- Q_CONSTEXPR uchar rRightShift = 24 - redWidth<Format>();
- Q_CONSTEXPR uchar gRightShift = 16 - greenWidth<Format>();
- Q_CONSTEXPR uchar bRightShift = 8 - blueWidth<Format>();
+ Q_CONSTEXPR uint rMask = (1 << redWidth<Format>()) - 1;
+ Q_CONSTEXPR uint gMask = (1 << greenWidth<Format>()) - 1;
+ Q_CONSTEXPR uint bMask = (1 << blueWidth<Format>()) - 1;
+ Q_CONSTEXPR uchar rRightShift = 24 - redWidth<Format>();
+ Q_CONSTEXPR uchar gRightShift = 16 - greenWidth<Format>();
+ Q_CONSTEXPR uchar bRightShift = 8 - blueWidth<Format>();
+ for (int i = 0; i < count; ++i) {
+ const uint c = fromRGB ? src[i] : qUnpremultiply(src[i]);
const uint r = ((c >> rRightShift) & rMask) << redShift<Format>();
const uint g = ((c >> gRightShift) & gMask) << greenShift<Format>();
const uint b = ((c >> bRightShift) & bMask) << blueShift<Format>();
- return r | g | b;
+ storePixel<BPP>(dest, index + i, r | g | b);
};
- UNALIASED_CONVERSION_LOOP(buffer, src, count, conversion);
} else {
// We do ordered dither by using a rounding conversion, but instead of
// adding half of input precision, we add the adjusted result from the
@@ -384,38 +500,39 @@ static const uint *QT_FASTCALL convertRGBFromARGB32PM(uint *buffer, const uint *
r = (r + ((dr - r) >> rWidth) + 1) >> (8 - rWidth);
g = (g + ((dg - g) >> gWidth) + 1) >> (8 - gWidth);
b = (b + ((db - b) >> bWidth) + 1) >> (8 - bWidth);
- buffer[i] = (r << redShift<Format>())
- | (g << greenShift<Format>())
- | (b << blueShift<Format>());
+ const uint s = (r << redShift<Format>())
+ | (g << greenShift<Format>())
+ | (b << blueShift<Format>());
+ storePixel<BPP>(dest, index + i, s);
}
}
- return buffer;
}
template<QImage::Format Format, bool fromRGB>
-static const uint *QT_FASTCALL convertARGBPMFromARGB32PM(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *dither)
+static void QT_FASTCALL storeARGBPMFromARGB32PM(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *dither)
{
+ constexpr QPixelLayout::BPP BPP = bitsPerPixel<Format>();
if (!dither) {
- auto conversion = [](uint c) {
- Q_CONSTEXPR uint aMask = (1 << alphaWidth<Format>()) - 1;
- Q_CONSTEXPR uint rMask = (1 << redWidth<Format>()) - 1;
- Q_CONSTEXPR uint gMask = (1 << greenWidth<Format>()) - 1;
- Q_CONSTEXPR uint bMask = (1 << blueWidth<Format>()) - 1;
-
- Q_CONSTEXPR uchar aRightShift = 32 - alphaWidth<Format>();
- Q_CONSTEXPR uchar rRightShift = 24 - redWidth<Format>();
- Q_CONSTEXPR uchar gRightShift = 16 - greenWidth<Format>();
- Q_CONSTEXPR uchar bRightShift = 8 - blueWidth<Format>();
-
- Q_CONSTEXPR uint aOpaque = aMask << alphaShift<Format>();
+ Q_CONSTEXPR uint aMask = (1 << alphaWidth<Format>()) - 1;
+ Q_CONSTEXPR uint rMask = (1 << redWidth<Format>()) - 1;
+ Q_CONSTEXPR uint gMask = (1 << greenWidth<Format>()) - 1;
+ Q_CONSTEXPR uint bMask = (1 << blueWidth<Format>()) - 1;
+
+ Q_CONSTEXPR uchar aRightShift = 32 - alphaWidth<Format>();
+ Q_CONSTEXPR uchar rRightShift = 24 - redWidth<Format>();
+ Q_CONSTEXPR uchar gRightShift = 16 - greenWidth<Format>();
+ Q_CONSTEXPR uchar bRightShift = 8 - blueWidth<Format>();
+
+ Q_CONSTEXPR uint aOpaque = aMask << alphaShift<Format>();
+ for (int i = 0; i < count; ++i) {
+ const uint c = src[i];
const uint a = fromRGB ? aOpaque : (((c >> aRightShift) & aMask) << alphaShift<Format>());
const uint r = ((c >> rRightShift) & rMask) << redShift<Format>();
const uint g = ((c >> gRightShift) & gMask) << greenShift<Format>();
const uint b = ((c >> bRightShift) & bMask) << blueShift<Format>();
- return a | r | g | b;
+ storePixel<BPP>(dest, index + i, a | r | g | b);
};
- UNALIASED_CONVERSION_LOOP(buffer, src, count, conversion);
} else {
Q_CONSTEXPR uchar aWidth = alphaWidth<Format>();
Q_CONSTEXPR uchar rWidth = redWidth<Format>();
@@ -441,55 +558,117 @@ static const uint *QT_FASTCALL convertARGBPMFromARGB32PM(uint *buffer, const uin
r = (r + ((dr - r) >> rWidth) + 1) >> (8 - rWidth);
g = (g + ((dg - g) >> gWidth) + 1) >> (8 - gWidth);
b = (b + ((db - b) >> bWidth) + 1) >> (8 - bWidth);
- buffer[i] = (a << alphaShift<Format>())
- | (r << redShift<Format>())
- | (g << greenShift<Format>())
- | (b << blueShift<Format>());
+ uint s = (a << alphaShift<Format>())
+ | (r << redShift<Format>())
+ | (g << greenShift<Format>())
+ | (b << blueShift<Format>());
+ storePixel<BPP>(dest, index + i, s);
}
}
- return buffer;
}
+template<QImage::Format Format>
+static void QT_FASTCALL rbSwap(uchar *dst, const uchar *src, int count)
+{
+ Q_CONSTEXPR uchar aWidth = alphaWidth<Format>();
+ Q_CONSTEXPR uchar aShift = alphaShift<Format>();
+ Q_CONSTEXPR uchar rWidth = redWidth<Format>();
+ Q_CONSTEXPR uchar rShift = redShift<Format>();
+ Q_CONSTEXPR uchar gWidth = greenWidth<Format>();
+ Q_CONSTEXPR uchar gShift = greenShift<Format>();
+ Q_CONSTEXPR uchar bWidth = blueWidth<Format>();
+ Q_CONSTEXPR uchar bShift = blueShift<Format>();
#ifdef Q_COMPILER_CONSTEXPR
+ Q_STATIC_ASSERT(rWidth == bWidth);
+#endif
+ Q_CONSTEXPR uint redBlueMask = (1 << rWidth) - 1;
+ Q_CONSTEXPR uint alphaGreenMask = (((1 << aWidth) - 1) << aShift)
+ | (((1 << gWidth) - 1) << gShift);
+ constexpr QPixelLayout::BPP bpp = bitsPerPixel<Format>();
+
+ for (int i = 0; i < count; ++i) {
+ const uint c = fetchPixel<bpp>(src, i);
+ const uint r = (c >> rShift) & redBlueMask;
+ const uint b = (c >> bShift) & redBlueMask;
+ const uint t = (c & alphaGreenMask)
+ | (r << bShift)
+ | (b << rShift);
+ storePixel<bpp>(dst, i, t);
+ }
+}
+
+static void QT_FASTCALL rbSwap_rgb32(uchar *d, const uchar *s, int count)
+{
+ const uint *src = reinterpret_cast<const uint *>(s);
+ uint *dest = reinterpret_cast<uint *>(d);
+ for (int i = 0; i < count; ++i) {
+ const uint c = src[i];
+ const uint ag = c & 0xff00ff00;
+ const uint rb = c & 0x00ff00ff;
+ dest[i] = ag | (rb << 16) | (rb >> 16);
+ }
+}
+
+#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
+template<>
+void QT_FASTCALL rbSwap<QImage::Format_RGBA8888>(uchar *d, const uchar *s, int count)
+{
+ return rbSwap_rgb32(d, s, count);
+}
+#endif
+
+static void QT_FASTCALL rbSwap_rgb30(uchar *d, const uchar *s, int count)
+{
+ const uint *src = reinterpret_cast<const uint *>(s);
+ uint *dest = reinterpret_cast<uint *>(d);
+ for (int i = 0; i < count; ++i)
+ dest[i] = qRgbSwapRgb30(src[i]);
+}
template<QImage::Format Format> Q_DECL_CONSTEXPR static inline QPixelLayout pixelLayoutRGB()
{
return QPixelLayout{
- uchar(redWidth<Format>()), uchar(redShift<Format>()),
- uchar(greenWidth<Format>()), uchar(greenShift<Format>()),
- uchar(blueWidth<Format>()), uchar(blueShift<Format>()),
- 0, 0,
- false, bitsPerPixel<Format>(),
+ false,
+ false,
+ bitsPerPixel<Format>(),
+ rbSwap<Format>,
convertToRGB32<Format>,
- convertRGBFromARGB32PM<Format, false>,
- convertRGBFromARGB32PM<Format, true>,
- convertToRGB64<Format>
+ convertToRGB64<Format>,
+ fetchRGBToRGB32<Format>,
+ storeRGBFromARGB32PM<Format, false>,
+ storeRGBFromARGB32PM<Format, true>
};
}
template<QImage::Format Format> Q_DECL_CONSTEXPR static inline QPixelLayout pixelLayoutARGBPM()
{
return QPixelLayout{
- uchar(redWidth<Format>()), uchar(redShift<Format>()),
- uchar(greenWidth<Format>()), uchar(greenShift<Format>()),
- uchar(blueWidth<Format>()), uchar(blueShift<Format>()),
- uchar(alphaWidth<Format>()), uchar(alphaShift<Format>()),
- true, bitsPerPixel<Format>(),
+ true,
+ true,
+ bitsPerPixel<Format>(),
+ rbSwap<Format>,
convertARGBPMToARGB32PM<Format>,
- convertARGBPMFromARGB32PM<Format, false>,
- convertARGBPMFromARGB32PM<Format, true>,
- convertARGBPMToARGB64PM<Format>
+ convertARGBPMToARGB64PM<Format>,
+ fetchARGBPMToARGB32PM<Format>,
+ storeARGBPMFromARGB32PM<Format, false>,
+ storeARGBPMFromARGB32PM<Format, true>
};
}
-#endif
-
-// To convert in place, let 'dest' and 'src' be the same.
-static const uint *QT_FASTCALL convertIndexedToARGB32PM(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *clut, QDitherInfo *)
+static void QT_FASTCALL convertIndexedToARGB32PM(uint *buffer, int count, const QVector<QRgb> *clut)
{
for (int i = 0; i < count; ++i)
- buffer[i] = qPremultiply(clut->at(src[i]));
+ buffer[i] = qPremultiply(clut->at(buffer[i]));
+}
+
+template<QPixelLayout::BPP BPP>
+static const uint *QT_FASTCALL fetchIndexedToARGB32PM(uint *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *clut, QDitherInfo *)
+{
+ for (int i = 0; i < count; ++i) {
+ const uint s = fetchPixel<BPP>(src, index + i);
+ buffer[i] = qPremultiply(clut->at(s));
+ }
return buffer;
}
@@ -501,44 +680,71 @@ static const QRgba64 *QT_FASTCALL convertIndexedToARGB64PM(QRgba64 *buffer, cons
return buffer;
}
-static const uint *QT_FASTCALL convertPassThrough(uint *, const uint *src, int,
- const QVector<QRgb> *, QDitherInfo *)
+static void QT_FASTCALL convertPassThrough(uint *, int, const QVector<QRgb> *)
{
- return src;
}
-static const uint *QT_FASTCALL convertARGB32ToARGB32PM(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+static const uint *QT_FASTCALL fetchPassThrough(uint *, const uchar *src, int index, int,
+ const QVector<QRgb> *, QDitherInfo *)
{
- return qt_convertARGB32ToARGB32PM(buffer, src, count);
+ return reinterpret_cast<const uint *>(src) + index;
}
-static const uint *QT_FASTCALL convertRGBA8888PMToARGB32PM(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+static void QT_FASTCALL storePassThrough(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
{
- UNALIASED_CONVERSION_LOOP(buffer, src, count, RGBA2ARGB);
- return buffer;
+ uint *d = reinterpret_cast<uint *>(dest) + index;
+ if (d != src)
+ memcpy(d, src, count * sizeof(uint));
}
-static const uint *QT_FASTCALL convertRGBA8888ToARGB32PM(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+static void QT_FASTCALL convertARGB32ToARGB32PM(uint *buffer, int count, const QVector<QRgb> *)
{
- return qt_convertRGBA8888ToARGB32PM(buffer, src, count);
+ qt_convertARGB32ToARGB32PM(buffer, buffer, count);
}
-static const uint *QT_FASTCALL convertAlpha8ToRGB32(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+static const uint *QT_FASTCALL fetchARGB32ToARGB32PM(uint *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ return qt_convertARGB32ToARGB32PM(buffer, reinterpret_cast<const uint *>(src) + index, count);
+}
+
+static void QT_FASTCALL convertRGBA8888PMToARGB32PM(uint *buffer, int count, const QVector<QRgb> *)
{
for (int i = 0; i < count; ++i)
- buffer[i] = qRgba(0, 0, 0, src[i]);
+ buffer[i] = RGBA2ARGB(buffer[i]);
+}
+
+static const uint *QT_FASTCALL fetchRGBA8888PMToARGB32PM(uint *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ const uint *s = reinterpret_cast<const uint *>(src) + index;
+ UNALIASED_CONVERSION_LOOP(buffer, s, count, RGBA2ARGB);
return buffer;
}
-static const uint *QT_FASTCALL convertGrayscale8ToRGB32(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+static void QT_FASTCALL convertRGBA8888ToARGB32PM(uint *buffer, int count, const QVector<QRgb> *)
+{
+ qt_convertRGBA8888ToARGB32PM(buffer, buffer, count);
+}
+
+static const uint *QT_FASTCALL fetchRGBA8888ToARGB32PM(uint *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ return qt_convertRGBA8888ToARGB32PM(buffer, reinterpret_cast<const uint *>(src) + index, count);
+}
+
+static void QT_FASTCALL convertAlpha8ToRGB32(uint *buffer, int count, const QVector<QRgb> *)
+{
+ for (int i = 0; i < count; ++i)
+ buffer[i] = qRgba(0, 0, 0, buffer[i]);
+}
+
+static const uint *QT_FASTCALL fetchAlpha8ToRGB32(uint *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
{
for (int i = 0; i < count; ++i)
- buffer[i] = qRgb(src[i], src[i], src[i]);
+ buffer[i] = qRgba(0, 0, 0, src[index + i]);
return buffer;
}
@@ -550,6 +756,24 @@ static const QRgba64 *QT_FASTCALL convertAlpha8ToRGB64(QRgba64 *buffer, const ui
return buffer;
}
+static void QT_FASTCALL convertGrayscale8ToRGB32(uint *buffer, int count, const QVector<QRgb> *)
+{
+ for (int i = 0; i < count; ++i) {
+ const uint s = buffer[i];
+ buffer[i] = qRgb(s, s, s);
+ }
+}
+
+static const uint *QT_FASTCALL fetchGrayscale8ToRGB32(uint *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ for (int i = 0; i < count; ++i) {
+ const uint s = src[index + i];
+ buffer[i] = qRgb(s, s, s);
+ }
+ return buffer;
+}
+
static const QRgba64 *QT_FASTCALL convertGrayscale8ToRGB64(QRgba64 *buffer, const uint *src, int count,
const QVector<QRgb> *, QDitherInfo *)
{
@@ -558,19 +782,18 @@ static const QRgba64 *QT_FASTCALL convertGrayscale8ToRGB64(QRgba64 *buffer, cons
return buffer;
}
-static const uint *QT_FASTCALL convertARGB32FromARGB32PM(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+static void QT_FASTCALL storeARGB32FromARGB32PM(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
{
- for (int i = 0; i < count; ++i)
- buffer[i] = qUnpremultiply(src[i]);
- return buffer;
+ uint *d = reinterpret_cast<uint *>(dest) + index;
+ UNALIASED_CONVERSION_LOOP(d, src, count, [](uint c) { return qUnpremultiply(c); });
}
-static const uint *QT_FASTCALL convertRGBA8888PMFromARGB32PM(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+static void QT_FASTCALL storeRGBA8888PMFromARGB32PM(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
{
- UNALIASED_CONVERSION_LOOP(buffer, src, count, ARGB2RGBA);
- return buffer;
+ uint *d = reinterpret_cast<uint *>(dest) + index;
+ UNALIASED_CONVERSION_LOOP(d, src, count, ARGB2RGBA);
}
#ifdef __SSE2__
@@ -684,33 +907,39 @@ static const QRgba64 *QT_FASTCALL convertRGBA8888PMToARGB64PM(QRgba64 *buffer, c
return buffer;
}
-static const uint *QT_FASTCALL convertRGBA8888FromARGB32PM(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+static void QT_FASTCALL storeRGBA8888FromARGB32PM(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
{
- for (int i = 0; i < count; ++i)
- buffer[i] = ARGB2RGBA(qUnpremultiply(src[i]));
- return buffer;
+ uint *d = reinterpret_cast<uint *>(dest) + index;
+ UNALIASED_CONVERSION_LOOP(d, src, count, [](uint c) { return ARGB2RGBA(qUnpremultiply(c)); });
}
-static const uint *QT_FASTCALL convertRGBXFromRGB32(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+static void QT_FASTCALL storeRGBXFromRGB32(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
{
- UNALIASED_CONVERSION_LOOP(buffer, src, count, [](uint c) { return ARGB2RGBA(0xff000000 | c); });
- return buffer;
+ uint *d = reinterpret_cast<uint *>(dest) + index;
+ UNALIASED_CONVERSION_LOOP(d, src, count, [](uint c) { return ARGB2RGBA(0xff000000 | c); });
}
-static const uint *QT_FASTCALL convertRGBXFromARGB32PM(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+static void QT_FASTCALL storeRGBXFromARGB32PM(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ uint *d = reinterpret_cast<uint *>(dest) + index;
+ UNALIASED_CONVERSION_LOOP(d, src, count, [](uint c) { return ARGB2RGBA(0xff000000 | qUnpremultiply(c)); });
+}
+
+template<QtPixelOrder PixelOrder>
+static void QT_FASTCALL convertA2RGB30PMToARGB32PM(uint *buffer, int count, const QVector<QRgb> *)
{
for (int i = 0; i < count; ++i)
- buffer[i] = ARGB2RGBA(0xff000000 | qUnpremultiply(src[i]));
- return buffer;
+ buffer[i] = qConvertA2rgb30ToArgb32<PixelOrder>(buffer[i]);
}
template<QtPixelOrder PixelOrder>
-static const uint *QT_FASTCALL convertA2RGB30PMToARGB32PM(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *dither)
+static const uint *QT_FASTCALL fetchA2RGB30PMToARGB32PM(uint *buffer, const uchar *s, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *dither)
{
+ const uint *src = reinterpret_cast<const uint *>(s) + index;
if (!dither) {
UNALIASED_CONVERSION_LOOP(buffer, src, count, qConvertA2rgb30ToArgb32<PixelOrder>);
} else {
@@ -791,178 +1020,71 @@ static const QRgba64 *QT_FASTCALL convertA2RGB30PMToARGB64PM(QRgba64 *buffer, co
}
template<QtPixelOrder PixelOrder>
-static const uint *QT_FASTCALL convertA2RGB30PMFromARGB32PM(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+static void QT_FASTCALL storeA2RGB30PMFromARGB32PM(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
{
- UNALIASED_CONVERSION_LOOP(buffer, src, count, qConvertArgb32ToA2rgb30<PixelOrder>);
- return buffer;
+ uint *d = reinterpret_cast<uint *>(dest) + index;
+ UNALIASED_CONVERSION_LOOP(d, src, count, qConvertArgb32ToA2rgb30<PixelOrder>);
}
template<QtPixelOrder PixelOrder>
-static const uint *QT_FASTCALL convertRGB30FromRGB32(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+static void QT_FASTCALL storeRGB30FromRGB32(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
{
- for (int i = 0; i < count; ++i)
- buffer[i] = qConvertRgb32ToRgb30<PixelOrder>(src[i]);
- return buffer;
+ uint *d = reinterpret_cast<uint *>(dest) + index;
+ UNALIASED_CONVERSION_LOOP(d, src, count, qConvertRgb32ToRgb30<PixelOrder>);
}
template<QtPixelOrder PixelOrder>
-static const uint *QT_FASTCALL convertRGB30FromARGB32PM(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
-{
- UNALIASED_CONVERSION_LOOP(buffer, src, count, qConvertRgb32ToRgb30<PixelOrder>);
- return buffer;
-}
-
-static const uint *QT_FASTCALL convertAlpha8FromARGB32PM(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
-{
- for (int i = 0; i < count; ++i)
- buffer[i] = qAlpha(src[i]);
- return buffer;
-}
-
-static const uint *QT_FASTCALL convertGrayscale8FromRGB32(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+static void QT_FASTCALL storeRGB30FromARGB32PM(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
{
- for (int i = 0; i < count; ++i)
- buffer[i] = qGray(src[i]);
- return buffer;
+ uint *d = reinterpret_cast<uint *>(dest) + index;
+ UNALIASED_CONVERSION_LOOP(d, src, count, qConvertRgb32ToRgb30<PixelOrder>);
}
-static const uint *QT_FASTCALL convertGrayscale8FromARGB32PM(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+static void QT_FASTCALL storeAlpha8FromARGB32PM(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
{
for (int i = 0; i < count; ++i)
- buffer[i] = qGray(qUnpremultiply(src[i]));
- return buffer;
-}
-
-template <QPixelLayout::BPP bpp> static
-uint QT_FASTCALL fetchPixel(const uchar *, int)
-{
- Q_UNREACHABLE();
- return 0;
-}
-
-template <>
-inline uint QT_FASTCALL fetchPixel<QPixelLayout::BPP1LSB>(const uchar *src, int index)
-{
- return (src[index >> 3] >> (index & 7)) & 1;
-}
-
-template <>
-inline uint QT_FASTCALL fetchPixel<QPixelLayout::BPP1MSB>(const uchar *src, int index)
-{
- return (src[index >> 3] >> (~index & 7)) & 1;
-}
-
-template <>
-inline uint QT_FASTCALL fetchPixel<QPixelLayout::BPP8>(const uchar *src, int index)
-{
- return src[index];
-}
-
-template <>
-inline uint QT_FASTCALL fetchPixel<QPixelLayout::BPP16>(const uchar *src, int index)
-{
- return reinterpret_cast<const quint16 *>(src)[index];
-}
-
-template <>
-inline uint QT_FASTCALL fetchPixel<QPixelLayout::BPP24>(const uchar *src, int index)
-{
- return reinterpret_cast<const quint24 *>(src)[index];
+ dest[index + i] = qAlpha(src[i]);
}
-template <>
-inline uint QT_FASTCALL fetchPixel<QPixelLayout::BPP32>(const uchar *src, int index)
-{
- return reinterpret_cast<const uint *>(src)[index];
-}
-
-template <QPixelLayout::BPP bpp>
-inline const uint *QT_FASTCALL fetchPixels(uint *buffer, const uchar *src, int index, int count)
+static void QT_FASTCALL storeGrayscale8FromRGB32(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
{
for (int i = 0; i < count; ++i)
- buffer[i] = fetchPixel<bpp>(src, index + i);
- return buffer;
-}
-
-template <>
-inline const uint *QT_FASTCALL fetchPixels<QPixelLayout::BPP32>(uint *, const uchar *src, int index, int)
-{
- return reinterpret_cast<const uint *>(src) + index;
-}
-
-template <QPixelLayout::BPP width> static
-void QT_FASTCALL storePixel(uchar *dest, int index, uint pixel);
-
-template <>
-inline void QT_FASTCALL storePixel<QPixelLayout::BPP1LSB>(uchar *dest, int index, uint pixel)
-{
- if (pixel)
- dest[index >> 3] |= 1 << (index & 7);
- else
- dest[index >> 3] &= ~(1 << (index & 7));
-}
-
-template <>
-inline void QT_FASTCALL storePixel<QPixelLayout::BPP1MSB>(uchar *dest, int index, uint pixel)
-{
- if (pixel)
- dest[index >> 3] |= 1 << (~index & 7);
- else
- dest[index >> 3] &= ~(1 << (~index & 7));
-}
-
-template <>
-inline void QT_FASTCALL storePixel<QPixelLayout::BPP8>(uchar *dest, int index, uint pixel)
-{
- dest[index] = uchar(pixel);
-}
-
-template <>
-inline void QT_FASTCALL storePixel<QPixelLayout::BPP16>(uchar *dest, int index, uint pixel)
-{
- reinterpret_cast<quint16 *>(dest)[index] = quint16(pixel);
-}
-
-template <>
-inline void QT_FASTCALL storePixel<QPixelLayout::BPP24>(uchar *dest, int index, uint pixel)
-{
- reinterpret_cast<quint24 *>(dest)[index] = quint24(pixel);
+ dest[index + i] = qGray(src[i]);
}
-template <QPixelLayout::BPP width>
-inline void QT_FASTCALL storePixels(uchar *dest, const uint *src, int index, int count)
+static void QT_FASTCALL storeGrayscale8FromARGB32PM(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
{
for (int i = 0; i < count; ++i)
- storePixel<width>(dest, index + i, src[i]);
+ dest[index + i] = qGray(qUnpremultiply(src[i]));
}
-template <>
-inline void QT_FASTCALL storePixels<QPixelLayout::BPP32>(uchar *dest, const uint *src, int index, int count)
-{
- memcpy(reinterpret_cast<uint *>(dest) + index, src, count * sizeof(uint));
-}
// Note:
// convertToArgb32() assumes that no color channel is less than 4 bits.
-// convertFromArgb32() assumes that no color channel is more than 8 bits.
+// storeRGBFromARGB32PM() assumes that no color channel is more than 8 bits.
// QImage::rgbSwapped() assumes that the red and blue color channels have the same number of bits.
QPixelLayout qPixelLayouts[QImage::NImageFormats] = {
- { 0, 0, 0, 0, 0, 0, 0, 0, false, QPixelLayout::BPPNone, 0, 0, 0, 0 }, // Format_Invalid
- { 0, 0, 0, 0, 0, 0, 0, 0, false, QPixelLayout::BPP1MSB, convertIndexedToARGB32PM, 0, 0, convertIndexedToARGB64PM }, // Format_Mono
- { 0, 0, 0, 0, 0, 0, 0, 0, false, QPixelLayout::BPP1LSB, convertIndexedToARGB32PM, 0, 0, convertIndexedToARGB64PM }, // Format_MonoLSB
- { 0, 0, 0, 0, 0, 0, 0, 0, false, QPixelLayout::BPP8, convertIndexedToARGB32PM, 0, 0, convertIndexedToARGB64PM }, // Format_Indexed8
+ { false, false, QPixelLayout::BPPNone, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr }, // Format_Invalid
+ { false, false, QPixelLayout::BPP1MSB, nullptr, convertIndexedToARGB32PM,
+ convertIndexedToARGB64PM, fetchIndexedToARGB32PM<QPixelLayout::BPP1MSB>, nullptr, nullptr }, // Format_Mono
+ { false, false, QPixelLayout::BPP1LSB, nullptr, convertIndexedToARGB32PM,
+ convertIndexedToARGB64PM, fetchIndexedToARGB32PM<QPixelLayout::BPP1LSB>, nullptr, nullptr }, // Format_MonoLSB
+ { false, false, QPixelLayout::BPP8, nullptr, convertIndexedToARGB32PM,
+ convertIndexedToARGB64PM, fetchIndexedToARGB32PM<QPixelLayout::BPP8>, nullptr, nullptr }, // Format_Indexed8
// Technically using convertPassThrough to convert from ARGB32PM to RGB32 is wrong,
// but everywhere this generic conversion would be wrong is currently overloaded.
- { 8, 16, 8, 8, 8, 0, 0, 0, false, QPixelLayout::BPP32, convertPassThrough, convertPassThrough, convertPassThrough, convertRGB32ToRGB64 }, // Format_RGB32
- { 8, 16, 8, 8, 8, 0, 8, 24, false, QPixelLayout::BPP32, convertARGB32ToARGB32PM, convertARGB32FromARGB32PM, convertPassThrough, convertARGB32ToARGB64PM }, // Format_ARGB32
- { 8, 16, 8, 8, 8, 0, 8, 24, true, QPixelLayout::BPP32, convertPassThrough, convertPassThrough, convertPassThrough, convertARGB32PMToARGB64PM }, // Format_ARGB32_Premultiplied
-#ifdef Q_COMPILER_CONSTEXPR
+ { false, false, QPixelLayout::BPP32, rbSwap_rgb32, convertPassThrough,
+ convertRGB32ToRGB64, fetchPassThrough, storePassThrough, storePassThrough }, // Format_RGB32
+ { true, false, QPixelLayout::BPP32, rbSwap_rgb32, convertARGB32ToARGB32PM,
+ convertARGB32ToARGB64PM, fetchARGB32ToARGB32PM, storeARGB32FromARGB32PM, storePassThrough }, // Format_ARGB32
+ { true, true, QPixelLayout::BPP32, rbSwap_rgb32, convertPassThrough,
+ convertARGB32PMToARGB64PM, fetchPassThrough, storePassThrough, storePassThrough }, // Format_ARGB32_Premultiplied
pixelLayoutRGB<QImage::Format_RGB16>(),
pixelLayoutARGBPM<QImage::Format_ARGB8565_Premultiplied>(),
pixelLayoutRGB<QImage::Format_RGB666>(),
@@ -972,109 +1094,44 @@ QPixelLayout qPixelLayouts[QImage::NImageFormats] = {
pixelLayoutRGB<QImage::Format_RGB888>(),
pixelLayoutRGB<QImage::Format_RGB444>(),
pixelLayoutARGBPM<QImage::Format_ARGB4444_Premultiplied>(),
-#else
- { 5, 11, 6, 5, 5, 0, 0, 0, false, QPixelLayout::BPP16,
- convertToRGB32<QImage::Format_RGB16>,
- convertRGBFromARGB32PM<QImage::Format_RGB16, false>,
- convertRGBFromARGB32PM<QImage::Format_RGB16, true>,
- convertToRGB64<QImage::Format_RGB16>,
- },
- { 5, 19, 6, 13, 5, 8, 8, 0, true, QPixelLayout::BPP24,
- convertARGBPMToARGB32PM<QImage::Format_ARGB8565_Premultiplied>,
- convertARGBPMFromARGB32PM<QImage::Format_ARGB8565_Premultiplied, false>,
- convertARGBPMFromARGB32PM<QImage::Format_ARGB8565_Premultiplied, true>,
- convertARGBPMToARGB64PM<QImage::Format_ARGB8565_Premultiplied>,
- },
- { 6, 12, 6, 6, 6, 0, 0, 0, false, QPixelLayout::BPP24,
- convertToRGB32<QImage::Format_RGB666>,
- convertRGBFromARGB32PM<QImage::Format_RGB666, false>,
- convertRGBFromARGB32PM<QImage::Format_RGB666, true>,
- convertToRGB64<QImage::Format_RGB666>,
- },
- { 6, 12, 6, 6, 6, 0, 6, 18, true, QPixelLayout::BPP24,
- convertARGBPMToARGB32PM<QImage::Format_ARGB6666_Premultiplied>,
- convertARGBPMFromARGB32PM<QImage::Format_ARGB6666_Premultiplied, false>,
- convertARGBPMFromARGB32PM<QImage::Format_ARGB6666_Premultiplied, true>,
- convertARGBPMToARGB64PM<QImage::Format_ARGB6666_Premultiplied>,
- },
- { 5, 10, 5, 5, 5, 0, 0, 0, false, QPixelLayout::BPP16,
- convertToRGB32<QImage::Format_RGB555>,
- convertRGBFromARGB32PM<QImage::Format_RGB555, false>,
- convertRGBFromARGB32PM<QImage::Format_RGB555, true>,
- convertToRGB64<QImage::Format_RGB555>,
- },
- { 5, 18, 5, 13, 5, 8, 8, 0, true, QPixelLayout::BPP24,
- convertARGBPMToARGB32PM<QImage::Format_ARGB8555_Premultiplied>,
- convertARGBPMFromARGB32PM<QImage::Format_ARGB8555_Premultiplied, false>,
- convertARGBPMFromARGB32PM<QImage::Format_ARGB8555_Premultiplied, true>,
- convertARGBPMToARGB64PM<QImage::Format_ARGB8555_Premultiplied>,
- },
- { 8, 16, 8, 8, 8, 0, 0, 0, false, QPixelLayout::BPP24,
- convertToRGB32<QImage::Format_RGB888>,
- convertRGBFromARGB32PM<QImage::Format_RGB888, false>,
- convertRGBFromARGB32PM<QImage::Format_RGB888, true>,
- convertToRGB64<QImage::Format_RGB888>,
- },
- { 4, 8, 4, 4, 4, 0, 0, 0, false, QPixelLayout::BPP16,
- convertToRGB32<QImage::Format_RGB444>,
- convertRGBFromARGB32PM<QImage::Format_RGB444, false>,
- convertRGBFromARGB32PM<QImage::Format_RGB444, true>,
- convertToRGB64<QImage::Format_RGB444>,
- },
- { 4, 8, 4, 4, 4, 0, 4, 12, true, QPixelLayout::BPP16,
- convertARGBPMToARGB32PM<QImage::Format_ARGB4444_Premultiplied>,
- convertARGBPMFromARGB32PM<QImage::Format_ARGB4444_Premultiplied, false>,
- convertARGBPMFromARGB32PM<QImage::Format_ARGB4444_Premultiplied, true>,
- convertARGBPMToARGB64PM<QImage::Format_ARGB4444_Premultiplied>,
- },
-#endif
-#if Q_BYTE_ORDER == Q_BIG_ENDIAN
- { 8, 24, 8, 16, 8, 8, 0, 0, false, QPixelLayout::BPP32, convertRGBA8888PMToARGB32PM, convertRGBXFromARGB32PM, convertRGBXFromRGB32, convertRGBA8888PMToARGB64PM }, // Format_RGBX8888
- { 8, 24, 8, 16, 8, 8, 8, 0, false, QPixelLayout::BPP32, convertRGBA8888ToARGB32PM, convertRGBA8888FromARGB32PM, convertRGBXFromRGB32, convertRGBA8888ToARGB64PM }, // Format_RGBA8888
- { 8, 24, 8, 16, 8, 8, 8, 0, true, QPixelLayout::BPP32, convertRGBA8888PMToARGB32PM, convertRGBA8888PMFromARGB32PM, convertRGBXFromRGB32, convertRGBA8888PMToARGB64PM}, // Format_RGBA8888_Premultiplied
-#else
- { 8, 0, 8, 8, 8, 16, 0, 24, false, QPixelLayout::BPP32, convertRGBA8888PMToARGB32PM, convertRGBXFromARGB32PM, convertRGBXFromRGB32, convertRGBA8888PMToARGB64PM }, // Format_RGBX8888
- { 8, 0, 8, 8, 8, 16, 8, 24, false, QPixelLayout::BPP32, convertRGBA8888ToARGB32PM, convertRGBA8888FromARGB32PM, convertRGBXFromRGB32, convertRGBA8888ToARGB64PM }, // Format_RGBA8888 (ABGR32)
- { 8, 0, 8, 8, 8, 16, 8, 24, true, QPixelLayout::BPP32, convertRGBA8888PMToARGB32PM, convertRGBA8888PMFromARGB32PM, convertRGBXFromRGB32, convertRGBA8888PMToARGB64PM }, // Format_RGBA8888_Premultiplied
-#endif
- { 10, 20, 10, 10, 10, 0, 0, 30, false, QPixelLayout::BPP32, convertA2RGB30PMToARGB32PM<PixelOrderBGR>, convertRGB30FromARGB32PM<PixelOrderBGR>, convertRGB30FromRGB32<PixelOrderBGR>, convertA2RGB30PMToARGB64PM<PixelOrderBGR> }, // Format_BGR30
- { 10, 20, 10, 10, 10, 0, 2, 30, true, QPixelLayout::BPP32, convertA2RGB30PMToARGB32PM<PixelOrderBGR>, convertA2RGB30PMFromARGB32PM<PixelOrderBGR>, convertRGB30FromRGB32<PixelOrderBGR>, convertA2RGB30PMToARGB64PM<PixelOrderBGR> }, // Format_A2BGR30_Premultiplied
- { 10, 0, 10, 10, 10, 20, 0, 30, false, QPixelLayout::BPP32, convertA2RGB30PMToARGB32PM<PixelOrderRGB>, convertRGB30FromARGB32PM<PixelOrderRGB>, convertRGB30FromRGB32<PixelOrderRGB>, convertA2RGB30PMToARGB64PM<PixelOrderRGB> }, // Format_RGB30
- { 10, 0, 10, 10, 10, 20, 2, 30, true, QPixelLayout::BPP32, convertA2RGB30PMToARGB32PM<PixelOrderRGB>, convertA2RGB30PMFromARGB32PM<PixelOrderRGB>, convertRGB30FromRGB32<PixelOrderRGB>, convertA2RGB30PMToARGB64PM<PixelOrderRGB> }, // Format_A2RGB30_Premultiplied
- { 0, 0, 0, 0, 0, 0, 8, 0, true, QPixelLayout::BPP8, convertAlpha8ToRGB32, convertAlpha8FromARGB32PM, 0, convertAlpha8ToRGB64 }, // Format_Alpha8
- { 0, 0, 0, 0, 0, 0, 0, 0, false, QPixelLayout::BPP8, convertGrayscale8ToRGB32, convertGrayscale8FromARGB32PM, convertGrayscale8FromRGB32, convertGrayscale8ToRGB64 } // Format_Grayscale8
-};
-
-const FetchPixelsFunc qFetchPixels[QPixelLayout::BPPCount] = {
- 0, // BPPNone
- fetchPixels<QPixelLayout::BPP1MSB>, // BPP1MSB
- fetchPixels<QPixelLayout::BPP1LSB>, // BPP1LSB
- fetchPixels<QPixelLayout::BPP8>, // BPP8
- fetchPixels<QPixelLayout::BPP16>, // BPP16
- fetchPixels<QPixelLayout::BPP24>, // BPP24
- fetchPixels<QPixelLayout::BPP32> // BPP32
-};
-
-StorePixelsFunc qStorePixels[QPixelLayout::BPPCount] = {
- 0, // BPPNone
- storePixels<QPixelLayout::BPP1MSB>, // BPP1MSB
- storePixels<QPixelLayout::BPP1LSB>, // BPP1LSB
- storePixels<QPixelLayout::BPP8>, // BPP8
- storePixels<QPixelLayout::BPP16>, // BPP16
- storePixels<QPixelLayout::BPP24>, // BPP24
- storePixels<QPixelLayout::BPP32> // BPP32
-};
-
-typedef uint (QT_FASTCALL *FetchPixelFunc)(const uchar *src, int index);
-
-static const FetchPixelFunc qFetchPixel[QPixelLayout::BPPCount] = {
- 0, // BPPNone
- fetchPixel<QPixelLayout::BPP1MSB>, // BPP1MSB
- fetchPixel<QPixelLayout::BPP1LSB>, // BPP1LSB
- fetchPixel<QPixelLayout::BPP8>, // BPP8
- fetchPixel<QPixelLayout::BPP16>, // BPP16
- fetchPixel<QPixelLayout::BPP24>, // BPP24
- fetchPixel<QPixelLayout::BPP32> // BPP32
+ { false, false, QPixelLayout::BPP32, rbSwap<QImage::Format_RGBA8888>, convertRGBA8888PMToARGB32PM,
+ convertRGBA8888PMToARGB64PM, fetchRGBA8888PMToARGB32PM, storeRGBXFromARGB32PM, storeRGBXFromRGB32 }, // Format_RGBX8888
+ { true, false, QPixelLayout::BPP32, rbSwap<QImage::Format_RGBA8888>, convertRGBA8888ToARGB32PM,
+ convertRGBA8888ToARGB64PM, fetchRGBA8888ToARGB32PM, storeRGBA8888FromARGB32PM, storeRGBXFromRGB32 }, // Format_RGBA8888
+ { true, true, QPixelLayout::BPP32, rbSwap<QImage::Format_RGBA8888>, convertRGBA8888PMToARGB32PM,
+ convertRGBA8888PMToARGB64PM, fetchRGBA8888PMToARGB32PM, storeRGBA8888PMFromARGB32PM, storeRGBXFromRGB32 }, // Format_RGBA8888_Premultiplied
+ { false, false, QPixelLayout::BPP32, rbSwap_rgb30,
+ convertA2RGB30PMToARGB32PM<PixelOrderBGR>,
+ convertA2RGB30PMToARGB64PM<PixelOrderBGR>,
+ fetchA2RGB30PMToARGB32PM<PixelOrderBGR>,
+ storeRGB30FromARGB32PM<PixelOrderBGR>,
+ storeRGB30FromRGB32<PixelOrderBGR>
+ }, // Format_BGR30
+ { true, true, QPixelLayout::BPP32, rbSwap_rgb30,
+ convertA2RGB30PMToARGB32PM<PixelOrderBGR>,
+ convertA2RGB30PMToARGB64PM<PixelOrderBGR>,
+ fetchA2RGB30PMToARGB32PM<PixelOrderBGR>,
+ storeA2RGB30PMFromARGB32PM<PixelOrderBGR>,
+ storeRGB30FromRGB32<PixelOrderBGR>
+ }, // Format_A2BGR30_Premultiplied
+ { false, false, QPixelLayout::BPP32, rbSwap_rgb30,
+ convertA2RGB30PMToARGB32PM<PixelOrderRGB>,
+ convertA2RGB30PMToARGB64PM<PixelOrderRGB>,
+ fetchA2RGB30PMToARGB32PM<PixelOrderRGB>,
+ storeRGB30FromARGB32PM<PixelOrderRGB>,
+ storeRGB30FromRGB32<PixelOrderRGB>
+ }, // Format_RGB30
+ { true, true, QPixelLayout::BPP32, rbSwap_rgb30,
+ convertA2RGB30PMToARGB32PM<PixelOrderRGB>,
+ convertA2RGB30PMToARGB64PM<PixelOrderRGB>,
+ fetchA2RGB30PMToARGB32PM<PixelOrderRGB>,
+ storeA2RGB30PMFromARGB32PM<PixelOrderRGB>,
+ storeRGB30FromRGB32<PixelOrderRGB>
+ }, // Format_A2RGB30_Premultiplied
+ { true, true, QPixelLayout::BPP8, nullptr, convertAlpha8ToRGB32,
+ convertAlpha8ToRGB64, fetchAlpha8ToRGB32, storeAlpha8FromARGB32PM, nullptr }, // Format_Alpha8
+ { false, false, QPixelLayout::BPP8, nullptr, convertGrayscale8ToRGB32,
+ convertGrayscale8ToRGB64, fetchGrayscale8ToRGB32, storeGrayscale8FromARGB32PM, storeGrayscale8FromRGB32 } // Format_Grayscale8
};
/*
@@ -1124,14 +1181,13 @@ static uint * QT_FASTCALL destFetchRGB16(uint *buffer, QRasterBuffer *rasterBuff
static uint *QT_FASTCALL destFetch(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length)
{
const QPixelLayout *layout = &qPixelLayouts[rasterBuffer->format];
- const uint *ptr = qFetchPixels[layout->bpp](buffer, rasterBuffer->scanLine(y), x, length);
- return const_cast<uint *>(layout->convertToARGB32PM(buffer, ptr, length, 0, 0));
+ return const_cast<uint *>(layout->fetchToARGB32PM(buffer, rasterBuffer->scanLine(y), x, length, nullptr, nullptr));
}
static QRgba64 *QT_FASTCALL destFetch64(QRgba64 *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length)
{
const QPixelLayout *layout = &qPixelLayouts[rasterBuffer->format];
- uint buffer32[buffer_size];
+ uint buffer32[BufferSize];
const uint *ptr = qFetchPixels[layout->bpp](buffer32, rasterBuffer->scanLine(y), x, length);
return const_cast<QRgba64 *>(layout->convertToARGB64PM(buffer, ptr, length, 0, 0));
}
@@ -1304,22 +1360,12 @@ static void QT_FASTCALL destStoreRGB16(QRasterBuffer *rasterBuffer, int x, int y
static void QT_FASTCALL destStore(QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length)
{
- uint buf[buffer_size];
const QPixelLayout *layout = &qPixelLayouts[rasterBuffer->format];
- StorePixelsFunc store = qStorePixels[layout->bpp];
+ ConvertAndStorePixelsFunc store = layout->storeFromARGB32PM;
+ if (!layout->premultiplied && !layout->hasAlphaChannel)
+ store = layout->storeFromRGB32;
uchar *dest = rasterBuffer->scanLine(y);
- while (length) {
- int l = qMin(length, buffer_size);
- const uint *ptr = 0;
- if (!layout->premultiplied && !layout->alphaWidth)
- ptr = layout->convertFromRGB32(buf, buffer, l, 0, 0);
- else
- ptr = layout->convertFromARGB32PM(buf, buffer, l, 0, 0);
- store(dest, ptr, x, l);
- length -= l;
- buffer += l;
- x += l;
- }
+ store(dest, buffer, x, length, nullptr, nullptr);
}
static void QT_FASTCALL convertFromRgb64(uint *dest, const QRgba64 *src, int length)
@@ -1331,19 +1377,16 @@ static void QT_FASTCALL convertFromRgb64(uint *dest, const QRgba64 *src, int len
static void QT_FASTCALL destStore64(QRasterBuffer *rasterBuffer, int x, int y, const QRgba64 *buffer, int length)
{
- uint buf[buffer_size];
+ uint buf[BufferSize];
const QPixelLayout *layout = &qPixelLayouts[rasterBuffer->format];
- StorePixelsFunc store = qStorePixels[layout->bpp];
+ ConvertAndStorePixelsFunc store = layout->storeFromARGB32PM;
+ if (!layout->premultiplied && !layout->hasAlphaChannel)
+ store = layout->storeFromRGB32;
uchar *dest = rasterBuffer->scanLine(y);
while (length) {
- int l = qMin(length, buffer_size);
- const uint *ptr = 0;
+ int l = qMin(length, BufferSize);
convertFromRgb64(buf, buffer, l);
- if (!layout->premultiplied && !layout->alphaWidth)
- ptr = layout->convertFromRGB32(buf, buf, l, 0, 0);
- else
- ptr = layout->convertFromARGB32PM(buf, buf, l, 0, 0);
- store(dest, ptr, x, l);
+ store(dest, buf, x, l, nullptr, nullptr);
length -= l;
buffer += l;
x += l;
@@ -1528,8 +1571,7 @@ static const uint *QT_FASTCALL fetchUntransformed(uint *buffer, const Operator *
const QSpanData *data, int y, int x, int length)
{
const QPixelLayout *layout = &qPixelLayouts[data->texture.format];
- const uint *ptr = qFetchPixels[layout->bpp](buffer, data->texture.scanLine(y), x, length);
- return layout->convertToARGB32PM(buffer, ptr, length, data->texture.colorTable, 0);
+ return layout->fetchToARGB32PM(buffer, data->texture.scanLine(y), x, length, data->texture.colorTable, nullptr);
}
static const uint *QT_FASTCALL fetchUntransformedARGB32PM(uint *, const Operator *,
@@ -1554,7 +1596,7 @@ static const QRgba64 *QT_FASTCALL fetchUntransformed64(QRgba64 *buffer, const Op
{
const QPixelLayout *layout = &qPixelLayouts[data->texture.format];
if (layout->bpp != QPixelLayout::BPP32) {
- uint buffer32[buffer_size];
+ uint buffer32[BufferSize];
const uint *ptr = qFetchPixels[layout->bpp](buffer32, data->texture.scanLine(y), x, length);
return layout->convertToARGB64PM(buffer, ptr, length, data->texture.colorTable, 0);
} else {
@@ -1563,17 +1605,26 @@ static const QRgba64 *QT_FASTCALL fetchUntransformed64(QRgba64 *buffer, const Op
}
}
+template<TextureBlendType blendType>
+inline void fetchTransformed_pixelBounds(int max, int l1, int l2, int &v)
+{
+ Q_STATIC_ASSERT(blendType == BlendTransformed || blendType == BlendTransformedTiled);
+ if (blendType == BlendTransformedTiled) {
+ if (v < 0 || v >= max) {
+ v %= max;
+ if (v < 0) v += max;
+ }
+ } else {
+ v = qBound(l1, v, l2);
+ }
+}
+
template<TextureBlendType blendType, QPixelLayout::BPP bpp>
-static const uint *QT_FASTCALL fetchTransformed(uint *buffer, const Operator *, const QSpanData *data,
- int y, int x, int length)
+static void QT_FASTCALL fetchTransformed_fetcher(uint *buffer, const QSpanData *data,
+ int y, int x, int length)
{
Q_STATIC_ASSERT(blendType == BlendTransformed || blendType == BlendTransformedTiled);
- const int image_width = data->texture.width;
- const int image_height = data->texture.height;
- const int image_x1 = data->texture.x1;
- const int image_y1 = data->texture.y1;
- const int image_x2 = data->texture.x2 - 1;
- const int image_y2 = data->texture.y2 - 1;
+ const QTextureData &image = data->texture;
const qreal cx = x + qreal(0.5);
const qreal cy = y + qreal(0.5);
@@ -1584,8 +1635,6 @@ static const uint *QT_FASTCALL fetchTransformed(uint *buffer, const Operator *,
// When templated 'fetch' should be inlined at compile time:
const FetchPixelFunc fetch = (bpp == QPixelLayout::BPPNone) ? qFetchPixel[layout->bpp] : FetchPixelFunc(fetchPixel<bpp>);
- uint *const end = buffer + length;
- uint *b = buffer;
if (data->fast_matrix) {
// The increment pr x in the scanline
int fdx = (int)(data->m11 * fixed_scale);
@@ -1596,24 +1645,87 @@ static const uint *QT_FASTCALL fetchTransformed(uint *buffer, const Operator *,
int fy = int((data->m22 * cy
+ data->m12 * cx + data->dy) * fixed_scale);
- while (b < end) {
- int px = fx >> 16;
- int py = fy >> 16;
-
- if (blendType == BlendTransformedTiled) {
- px %= image_width;
- py %= image_height;
- if (px < 0) px += image_width;
- if (py < 0) py += image_height;
- } else {
- px = qBound(image_x1, px, image_x2);
- py = qBound(image_y1, py, image_y2);
+ if (fdy == 0) { // simple scale, no rotation or shear
+ int py = (fy >> 16);
+ fetchTransformed_pixelBounds<blendType>(image.height, image.y1, image.y2 - 1, py);
+ const uchar *src = image.scanLine(py);
+
+ int i = 0;
+ if (blendType == BlendTransformed) {
+ int fastLen = length;
+ if (fdx > 0)
+ fastLen = qMin(fastLen, int((qint64(image.x2 - 1) * fixed_scale - fx) / fdx));
+ else if (fdx < 0)
+ fastLen = qMin(fastLen, int((qint64(image.x1) * fixed_scale - fx) / fdx));
+
+ for (; i < fastLen; ++i) {
+ int x1 = (fx >> 16);
+ int x2 = x1;
+ fetchTransformed_pixelBounds<blendType>(image.width, image.x1, image.x2 - 1, x1);
+ if (x1 == x2)
+ break;
+ buffer[i] = fetch(src, x1);
+ fx += fdx;
+ }
+
+ for (; i < fastLen; ++i) {
+ int px = (fx >> 16);
+ buffer[i] = fetch(src, px);
+ fx += fdx;
+ }
}
- *b = fetch(data->texture.scanLine(py), px);
- fx += fdx;
- fy += fdy;
- ++b;
+ for (; i < length; ++i) {
+ int px = (fx >> 16);
+ fetchTransformed_pixelBounds<blendType>(image.width, image.x1, image.x2 - 1, px);
+ buffer[i] = fetch(src, px);
+ fx += fdx;
+ }
+ } else { // rotation or shear
+ int i = 0;
+ if (blendType == BlendTransformed) {
+ int fastLen = length;
+ if (fdx > 0)
+ fastLen = qMin(fastLen, int((qint64(image.x2 - 1) * fixed_scale - fx) / fdx));
+ else if (fdx < 0)
+ fastLen = qMin(fastLen, int((qint64(image.x1) * fixed_scale - fx) / fdx));
+ if (fdy > 0)
+ fastLen = qMin(fastLen, int((qint64(image.y2 - 1) * fixed_scale - fy) / fdy));
+ else if (fdy < 0)
+ fastLen = qMin(fastLen, int((qint64(image.y1) * fixed_scale - fy) / fdy));
+
+ for (; i < fastLen; ++i) {
+ int x1 = (fx >> 16);
+ int y1 = (fy >> 16);
+ int x2 = x1;
+ int y2 = y1;
+ fetchTransformed_pixelBounds<blendType>(image.width, image.x1, image.x2 - 1, x1);
+ fetchTransformed_pixelBounds<blendType>(image.height, image.y1, image.y2 - 1, y1);
+ if (x1 == x2 && y1 == y2)
+ break;
+ buffer[i] = fetch(image.scanLine(y1), x1);
+ fx += fdx;
+ fy += fdy;
+ }
+
+ for (; i < fastLen; ++i) {
+ int px = (fx >> 16);
+ int py = (fy >> 16);
+ buffer[i] = fetch(image.scanLine(py), px);
+ fx += fdx;
+ fy += fdy;
+ }
+ }
+
+ for (; i < length; ++i) {
+ int px = (fx >> 16);
+ int py = (fy >> 16);
+ fetchTransformed_pixelBounds<blendType>(image.width, image.x1, image.x2 - 1, px);
+ fetchTransformed_pixelBounds<blendType>(image.height, image.y1, image.y2 - 1, py);
+ buffer[i] = fetch(image.scanLine(py), px);
+ fx += fdx;
+ fy += fdy;
+ }
}
} else {
const qreal fdx = data->m11;
@@ -1624,23 +1736,18 @@ static const uint *QT_FASTCALL fetchTransformed(uint *buffer, const Operator *,
qreal fy = data->m22 * cy + data->m12 * cx + data->dy;
qreal fw = data->m23 * cy + data->m13 * cx + data->m33;
+ uint *const end = buffer + length;
+ uint *b = buffer;
while (b < end) {
const qreal iw = fw == 0 ? 1 : 1 / fw;
const qreal tx = fx * iw;
const qreal ty = fy * iw;
- int px = int(tx) - (tx < 0);
- int py = int(ty) - (ty < 0);
-
- if (blendType == BlendTransformedTiled) {
- px %= image_width;
- py %= image_height;
- if (px < 0) px += image_width;
- if (py < 0) py += image_height;
- } else {
- px = qBound(image_x1, px, image_x2);
- py = qBound(image_y1, py, image_y2);
- }
- *b = fetch(data->texture.scanLine(py), px);
+ int px = qFloor(tx);
+ int py = qFloor(ty);
+
+ fetchTransformed_pixelBounds<blendType>(image.height, image.y1, image.y2 - 1, py);
+ fetchTransformed_pixelBounds<blendType>(image.width, image.x1, image.x2 - 1, px);
+ *b = fetch(image.scanLine(py), px);
fx += fdx;
fy += fdy;
@@ -1652,115 +1759,31 @@ static const uint *QT_FASTCALL fetchTransformed(uint *buffer, const Operator *,
++b;
}
}
- return layout->convertToARGB32PM(buffer, buffer, length, data->texture.colorTable, 0);
}
-template<TextureBlendType blendType> /* either BlendTransformed or BlendTransformedTiled */
+template<TextureBlendType blendType, QPixelLayout::BPP bpp>
+static const uint *QT_FASTCALL fetchTransformed(uint *buffer, const Operator *, const QSpanData *data,
+ int y, int x, int length)
+{
+ Q_STATIC_ASSERT(blendType == BlendTransformed || blendType == BlendTransformedTiled);
+ const QPixelLayout *layout = &qPixelLayouts[data->texture.format];
+ fetchTransformed_fetcher<blendType, bpp>(buffer, data, y, x, length);
+ layout->convertToARGB32PM(buffer, length, data->texture.colorTable);
+ return buffer;
+}
+
+template<TextureBlendType blendType>
static const QRgba64 *QT_FASTCALL fetchTransformed64(QRgba64 *buffer, const Operator *, const QSpanData *data,
int y, int x, int length)
{
- const int image_width = data->texture.width;
- const int image_height = data->texture.height;
- const int image_x1 = data->texture.x1;
- const int image_y1 = data->texture.y1;
- const int image_x2 = data->texture.x2 - 1;
- const int image_y2 = data->texture.y2 - 1;
-
- const qreal cx = x + qreal(0.5);
- const qreal cy = y + qreal(0.5);
-
+ Q_STATIC_ASSERT(blendType == BlendTransformed || blendType == BlendTransformedTiled);
const QPixelLayout *layout = &qPixelLayouts[data->texture.format];
- FetchPixelFunc fetch = qFetchPixel[layout->bpp];
- const QVector<QRgb> *clut = data->texture.colorTable;
-
- uint buffer32[buffer_size];
- QRgba64 *b = buffer;
- if (data->fast_matrix) {
- // The increment pr x in the scanline
- int fdx = (int)(data->m11 * fixed_scale);
- int fdy = (int)(data->m12 * fixed_scale);
-
- int fx = int((data->m21 * cy
- + data->m11 * cx + data->dx) * fixed_scale);
- int fy = int((data->m22 * cy
- + data->m12 * cx + data->dy) * fixed_scale);
-
- int i = 0, j = 0;
- while (i < length) {
- if (j == buffer_size) {
- layout->convertToARGB64PM(b, buffer32, buffer_size, clut, 0);
- b += buffer_size;
- j = 0;
- }
- int px = fx >> 16;
- int py = fy >> 16;
-
- if (blendType == BlendTransformedTiled) {
- px %= image_width;
- py %= image_height;
- if (px < 0) px += image_width;
- if (py < 0) py += image_height;
- } else {
- px = qBound(image_x1, px, image_x2);
- py = qBound(image_y1, py, image_y2);
- }
- buffer32[j] = fetch(data->texture.scanLine(py), px);
-
- fx += fdx;
- fy += fdy;
- ++i; ++j;
- }
- if (j > 0) {
- layout->convertToARGB64PM(b, buffer32, j, clut, 0);
- b += j;
- }
- } else {
- const qreal fdx = data->m11;
- const qreal fdy = data->m12;
- const qreal fdw = data->m13;
-
- qreal fx = data->m21 * cy + data->m11 * cx + data->dx;
- qreal fy = data->m22 * cy + data->m12 * cx + data->dy;
- qreal fw = data->m23 * cy + data->m13 * cx + data->m33;
-
- int i = 0, j = 0;
- while (i < length) {
- if (j == buffer_size) {
- layout->convertToARGB64PM(b, buffer32, buffer_size, clut, 0);
- b += buffer_size;
- j = 0;
- }
- const qreal iw = fw == 0 ? 1 : 1 / fw;
- const qreal tx = fx * iw;
- const qreal ty = fy * iw;
- int px = int(tx) - (tx < 0);
- int py = int(ty) - (ty < 0);
-
- if (blendType == BlendTransformedTiled) {
- px %= image_width;
- py %= image_height;
- if (px < 0) px += image_width;
- if (py < 0) py += image_height;
- } else {
- px = qBound(image_x1, px, image_x2);
- py = qBound(image_y1, py, image_y2);
- }
- buffer32[j] = fetch(data->texture.scanLine(py), px);
-
- fx += fdx;
- fy += fdy;
- fw += fdw;
- //force increment to avoid /0
- if (!fw) {
- fw += fdw;
- }
- ++i; ++j;
- }
- if (j > 0) {
- layout->convertToARGB64PM(b, buffer32, j, clut, 0);
- b += j;
- }
- }
+ uint buffer32[BufferSize];
+ if (layout->bpp == QPixelLayout::BPP32)
+ fetchTransformed_fetcher<blendType, QPixelLayout::BPP32>(buffer32, data, y, x, length);
+ else
+ fetchTransformed_fetcher<blendType, QPixelLayout::BPPNone>(buffer32, data, y, x, length);
+ layout->convertToARGB64PM(buffer, buffer32, length, data->texture.colorTable, nullptr);
return buffer;
}
@@ -1921,7 +1944,7 @@ inline void fetchTransformedBilinear_pixelBounds<BlendTransformedBilinear>(int,
}
enum FastTransformTypes {
- SimpleUpscaleTransform,
+ SimpleScaleTransform,
UpscaleTransform,
DownscaleTransform,
RotateTransform,
@@ -1929,11 +1952,38 @@ enum FastTransformTypes {
NFastTransformTypes
};
+// Completes the partial interpolation stored in IntermediateBuffer.
+// by performing the x-axis interpolation and joining the RB and AG buffers.
+static void QT_FASTCALL intermediate_adder(uint *b, uint *end, const IntermediateBuffer &intermediate, int offset, int &fx, int fdx)
+{
+#if defined(QT_COMPILER_SUPPORTS_AVX2)
+ extern void QT_FASTCALL intermediate_adder_avx2(uint *b, uint *end, const IntermediateBuffer &intermediate, int offset, int &fx, int fdx);
+ if (qCpuHasFeature(AVX2))
+ return intermediate_adder_avx2(b, end, intermediate, offset, fx, fdx);
+#endif
+
+ // Switch to intermediate buffer coordinates
+ fx -= offset * fixed_scale;
+
+ while (b < end) {
+ const int x = (fx >> 16);
+
+ const uint distx = (fx & 0x0000ffff) >> 8;
+ const uint idistx = 256 - distx;
+ const uint rb = (intermediate.buffer_rb[x] * idistx + intermediate.buffer_rb[x + 1] * distx) & 0xff00ff00;
+ const uint ag = (intermediate.buffer_ag[x] * idistx + intermediate.buffer_ag[x + 1] * distx) & 0xff00ff00;
+ *b = (rb >> 8) | ag;
+ b++;
+ fx += fdx;
+ }
+ fx += offset * fixed_scale;
+}
+
typedef void (QT_FASTCALL *BilinearFastTransformHelper)(uint *b, uint *end, const QTextureData &image, int &fx, int &fy, int fdx, int fdy);
template<TextureBlendType blendType>
-static void QT_FASTCALL fetchTransformedBilinearARGB32PM_simple_upscale_helper(uint *b, uint *end, const QTextureData &image,
- int &fx, int &fy, int fdx, int /*fdy*/)
+static void QT_FASTCALL fetchTransformedBilinearARGB32PM_simple_scale_helper(uint *b, uint *end, const QTextureData &image,
+ int &fx, int &fy, int fdx, int /*fdy*/)
{
int y1 = (fy >> 16);
int y2;
@@ -1950,16 +2000,12 @@ static void QT_FASTCALL fetchTransformedBilinearARGB32PM_simple_upscale_helper(u
const int offset = (fx + adjust) >> 16;
int x = offset;
- // The idea is first to do the interpolation between the row s1 and the row s2
- // into an intermediate buffer, then we interpolate between two pixel of this buffer.
-
- // intermediate_buffer[0] is a buffer of red-blue component of the pixel, in the form 0x00RR00BB
- // intermediate_buffer[1] is the alpha-green component of the pixel, in the form 0x00AA00GG
- // +1 for the last pixel to interpolate with, and +1 for rounding errors.
- quint32 intermediate_buffer[2][buffer_size + 2];
- // count is the size used in the intermediate_buffer.
+ IntermediateBuffer intermediate;
+ // count is the size used in the intermediate.buffer.
int count = (qint64(length) * qAbs(fdx) + fixed_scale - 1) / fixed_scale + 2;
- Q_ASSERT(count <= buffer_size + 2); //length is supposed to be <= buffer_size and data->m11 < 1 in this case
+ // length is supposed to be <= BufferSize either because data->m11 < 1 or
+ // data->m11 < 2, and any larger buffers split
+ Q_ASSERT(count <= BufferSize + 2);
int f = 0;
int lim = count;
if (blendType == BlendTransformedBilinearTiled) {
@@ -1974,8 +2020,8 @@ static void QT_FASTCALL fetchTransformedBilinearARGB32PM_simple_upscale_helper(u
quint32 rb = (((t & 0xff00ff) * idisty + (b & 0xff00ff) * disty) >> 8) & 0xff00ff;
quint32 ag = ((((t>>8) & 0xff00ff) * idisty + ((b>>8) & 0xff00ff) * disty) >> 8) & 0xff00ff;
do {
- intermediate_buffer[0][f] = rb;
- intermediate_buffer[1][f] = ag;
+ intermediate.buffer_rb[f] = rb;
+ intermediate.buffer_ag[f] = ag;
f++;
x++;
} while (x < image.x1 && f < lim);
@@ -2008,10 +2054,10 @@ static void QT_FASTCALL fetchTransformedBilinearARGB32PM_simple_upscale_helper(u
// Add the values, and shift to only keep 8 significant bits per colors
__m128i rAG =_mm_add_epi16(topAG, bottomAG);
rAG = _mm_srli_epi16(rAG, 8);
- _mm_storeu_si128((__m128i*)(&intermediate_buffer[1][f]), rAG);
+ _mm_storeu_si128((__m128i*)(&intermediate.buffer_ag[f]), rAG);
__m128i rRB =_mm_add_epi16(topRB, bottomRB);
rRB = _mm_srli_epi16(rRB, 8);
- _mm_storeu_si128((__m128i*)(&intermediate_buffer[0][f]), rRB);
+ _mm_storeu_si128((__m128i*)(&intermediate.buffer_rb[f]), rRB);
}
#elif defined(__ARM_NEON__)
const int16x8_t disty_ = vdupq_n_s16(disty);
@@ -2038,10 +2084,10 @@ static void QT_FASTCALL fetchTransformedBilinearARGB32PM_simple_upscale_helper(u
// Add the values, and shift to only keep 8 significant bits per colors
int16x8_t rAG = vaddq_s16(topAG, bottomAG);
rAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(rAG), 8));
- vst1q_s16((int16_t*)(&intermediate_buffer[1][f]), rAG);
+ vst1q_s16((int16_t*)(&intermediate.buffer_ag[f]), rAG);
int16x8_t rRB = vaddq_s16(topRB, bottomRB);
rRB = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(rRB), 8));
- vst1q_s16((int16_t*)(&intermediate_buffer[0][f]), rRB);
+ vst1q_s16((int16_t*)(&intermediate.buffer_rb[f]), rRB);
}
#endif
}
@@ -2055,28 +2101,13 @@ static void QT_FASTCALL fetchTransformedBilinearARGB32PM_simple_upscale_helper(u
uint t = s1[x];
uint b = s2[x];
- intermediate_buffer[0][f] = (((t & 0xff00ff) * idisty + (b & 0xff00ff) * disty) >> 8) & 0xff00ff;
- intermediate_buffer[1][f] = ((((t>>8) & 0xff00ff) * idisty + ((b>>8) & 0xff00ff) * disty) >> 8) & 0xff00ff;
+ intermediate.buffer_rb[f] = (((t & 0xff00ff) * idisty + (b & 0xff00ff) * disty) >> 8) & 0xff00ff;
+ intermediate.buffer_ag[f] = ((((t>>8) & 0xff00ff) * idisty + ((b>>8) & 0xff00ff) * disty) >> 8) & 0xff00ff;
x++;
}
- // Now interpolate the values from the intermediate_buffer to get the final result.
- fx -= offset * fixed_scale; // Switch to intermediate buffer coordinates
-
- while (b < end) {
- int x1 = (fx >> 16);
- int x2 = x1 + 1;
- Q_ASSERT(x1 >= 0);
- Q_ASSERT(x2 < count);
-
- int distx = (fx & 0x0000ffff) >> 8;
- int idistx = 256 - distx;
- int rb = ((intermediate_buffer[0][x1] * idistx + intermediate_buffer[0][x2] * distx) >> 8) & 0xff00ff;
- int ag = (intermediate_buffer[1][x1] * idistx + intermediate_buffer[1][x2] * distx) & 0xff00ff00;
- *b = rb | ag;
- b++;
- fx += fdx;
- }
+ // Now interpolate the values from the intermediate.buffer to get the final result.
+ intermediate_adder(b, end, intermediate, offset, fx, fdx);
}
template<TextureBlendType blendType>
@@ -2542,14 +2573,14 @@ static void QT_FASTCALL fetchTransformedBilinearARGB32PM_fast_rotate_helper(uint
static BilinearFastTransformHelper bilinearFastTransformHelperARGB32PM[2][NFastTransformTypes] = {
{
- fetchTransformedBilinearARGB32PM_simple_upscale_helper<BlendTransformedBilinear>,
+ fetchTransformedBilinearARGB32PM_simple_scale_helper<BlendTransformedBilinear>,
fetchTransformedBilinearARGB32PM_upscale_helper<BlendTransformedBilinear>,
fetchTransformedBilinearARGB32PM_downscale_helper<BlendTransformedBilinear>,
fetchTransformedBilinearARGB32PM_rotate_helper<BlendTransformedBilinear>,
fetchTransformedBilinearARGB32PM_fast_rotate_helper<BlendTransformedBilinear>
},
{
- fetchTransformedBilinearARGB32PM_simple_upscale_helper<BlendTransformedBilinearTiled>,
+ fetchTransformedBilinearARGB32PM_simple_scale_helper<BlendTransformedBilinearTiled>,
fetchTransformedBilinearARGB32PM_upscale_helper<BlendTransformedBilinearTiled>,
fetchTransformedBilinearARGB32PM_downscale_helper<BlendTransformedBilinearTiled>,
fetchTransformedBilinearARGB32PM_rotate_helper<BlendTransformedBilinearTiled>,
@@ -2584,7 +2615,13 @@ static const uint * QT_FASTCALL fetchTransformedBilinearARGB32PM(uint *buffer, c
if (fdy == 0) { // simple scale, no rotation or shear
if (qAbs(fdx) <= fixed_scale) {
// simple scale up on X
- bilinearFastTransformHelperARGB32PM[tiled][SimpleUpscaleTransform](b, end, data->texture, fx, fy, fdx, fdy);
+ bilinearFastTransformHelperARGB32PM[tiled][SimpleScaleTransform](b, end, data->texture, fx, fy, fdx, fdy);
+ } else if (qAbs(fdx) <= 2 * fixed_scale) {
+ // simple scale down on X, less than 2x
+ const int mid = (length * 2 < BufferSize) ? length : ((length + 1) / 2);
+ bilinearFastTransformHelperARGB32PM[tiled][SimpleScaleTransform](buffer, buffer + mid, data->texture, fx, fy, fdx, fdy);
+ if (mid != length)
+ bilinearFastTransformHelperARGB32PM[tiled][SimpleScaleTransform](buffer + mid, buffer + length, data->texture, fx, fy, fdx, fdy);
} else if (qAbs(data->m22) < qreal(1./8.)) {
// scale up more than 8x (on Y)
bilinearFastTransformHelperARGB32PM[tiled][UpscaleTransform](b, end, data->texture, fx, fy, fdx, fdy);
@@ -2652,16 +2689,13 @@ static const uint * QT_FASTCALL fetchTransformedBilinearARGB32PM(uint *buffer, c
return buffer;
}
-template<TextureBlendType blendType, QPixelLayout::BPP bpp>
-static void QT_FASTCALL fetchTransformedBilinear_simple_upscale_helper(uint *b, uint *end, const QTextureData &image,
- int &fx, int &fy, int fdx, int /*fdy*/)
+template<TextureBlendType blendType>
+static void QT_FASTCALL fetchTransformedBilinear_simple_scale_helper(uint *b, uint *end, const QTextureData &image,
+ int &fx, int &fy, int fdx, int /*fdy*/)
{
const QPixelLayout *layout = &qPixelLayouts[image.format];
const QVector<QRgb> *clut = image.colorTable;
- Q_ASSERT(bpp == QPixelLayout::BPPNone || bpp == layout->bpp);
- // When templated 'fetch' should be inlined at compile time:
- const FetchPixelsFunc fetch = (bpp == QPixelLayout::BPPNone) ? qFetchPixels[layout->bpp] : fetchPixels<bpp>;
- const ConvertFunc convertToARGB32PM = layout->convertToARGB32PM;
+ const FetchAndConvertPixelsFunc fetch = layout->fetchToARGB32PM;
int y1 = (fy >> 16);
int y2;
@@ -2678,16 +2712,14 @@ static void QT_FASTCALL fetchTransformedBilinear_simple_upscale_helper(uint *b,
const int offset = (fx + adjust) >> 16;
int x = offset;
- // The idea is first to do the interpolation between the row s1 and the row s2
- // into an intermediate buffer, then we interpolate between two pixel of this buffer.
- // +1 for the last pixel to interpolate with, and +1 for rounding errors.
- uint buf1[buffer_size + 2];
- uint buf2[buffer_size + 2];
+ IntermediateBuffer intermediate;
+ uint *buf1 = intermediate.buffer_rb;
+ uint *buf2 = intermediate.buffer_ag;
const uint *ptr1;
const uint *ptr2;
int count = (qint64(length) * qAbs(fdx) + fixed_scale - 1) / fixed_scale + 2;
- Q_ASSERT(count <= buffer_size + 2); //length is supposed to be <= buffer_size and data->m11 < 1 in this case
+ Q_ASSERT(count <= BufferSize + 2);
if (blendType == BlendTransformedBilinearTiled) {
x %= image.width;
@@ -2696,10 +2728,8 @@ static void QT_FASTCALL fetchTransformedBilinear_simple_upscale_helper(uint *b,
int len1 = qMin(count, image.width - x);
int len2 = qMin(x, count - len1);
- ptr1 = fetch(buf1, s1, x, len1);
- ptr1 = convertToARGB32PM(buf1, ptr1, len1, clut, 0);
- ptr2 = fetch(buf2, s2, x, len1);
- ptr2 = convertToARGB32PM(buf2, ptr2, len1, clut, 0);
+ ptr1 = fetch(buf1, s1, x, len1, clut, nullptr);
+ ptr2 = fetch(buf2, s2, x, len1, clut, nullptr);
for (int i = 0; i < len1; ++i) {
uint t = ptr1[i];
uint b = ptr2[i];
@@ -2708,10 +2738,8 @@ static void QT_FASTCALL fetchTransformedBilinear_simple_upscale_helper(uint *b,
}
if (len2) {
- ptr1 = fetch(buf1 + len1, s1, 0, len2);
- ptr1 = convertToARGB32PM(buf1 + len1, ptr1, len2, clut, 0);
- ptr2 = fetch(buf2 + len1, s2, 0, len2);
- ptr2 = convertToARGB32PM(buf2 + len1, ptr2, len2, clut, 0);
+ ptr1 = fetch(buf1 + len1, s1, 0, len2, clut, nullptr);
+ ptr2 = fetch(buf2 + len1, s2, 0, len2, clut, nullptr);
for (int i = 0; i < len2; ++i) {
uint t = ptr1[i];
uint b = ptr2[i];
@@ -2719,6 +2747,7 @@ static void QT_FASTCALL fetchTransformedBilinear_simple_upscale_helper(uint *b,
buf2[i + len1] = ((((t >> 8) & 0xff00ff) * idisty + ((b >> 8) & 0xff00ff) * disty) >> 8) & 0xff00ff;
}
}
+ // Generate the rest by repeatedly repeating the previous set of pixels
for (int i = image.width; i < count; ++i) {
buf1[i] = buf1[i - image.width];
buf2[i] = buf2[i - image.width];
@@ -2729,10 +2758,8 @@ static void QT_FASTCALL fetchTransformedBilinear_simple_upscale_helper(uint *b,
int len = qMax(1, end - start);
int leading = start - x;
- ptr1 = fetch(buf1 + leading, s1, start, len);
- ptr1 = convertToARGB32PM(buf1 + leading, ptr1, len, clut, 0);
- ptr2 = fetch(buf2 + leading, s2, start, len);
- ptr2 = convertToARGB32PM(buf2 + leading, ptr2, len, clut, 0);
+ ptr1 = fetch(buf1 + leading, s1, start, len, clut, nullptr);
+ ptr2 = fetch(buf2 + leading, s2, start, len, clut, nullptr);
for (int i = 0; i < len; ++i) {
uint t = ptr1[i];
@@ -2751,22 +2778,8 @@ static void QT_FASTCALL fetchTransformedBilinear_simple_upscale_helper(uint *b,
}
}
- // Now interpolate the values from the intermediate_buffer to get the final result.
- fx -= offset * fixed_scale; // Switch to intermediate buffer coordinates
-
- while (b < end) {
- int x1 = (fx >> 16);
- int x2 = x1 + 1;
- Q_ASSERT(x1 >= 0);
- Q_ASSERT(x2 < count);
-
- int distx = (fx & 0x0000ffff) >> 8;
- int idistx = 256 - distx;
- int rb = ((buf1[x1] * idistx + buf1[x2] * distx) >> 8) & 0xff00ff;
- int ag = (buf2[x1] * idistx + buf2[x2] * distx) & 0xff00ff00;
- *b++ = rb | ag;
- fx += fdx;
- }
+ // Now interpolate the values from the intermediate.buffer to get the final result.
+ intermediate_adder(b, end, intermediate, offset, fx, fdx);
}
@@ -2916,18 +2929,23 @@ static const uint *QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Oper
if (fdy == 0) { // simple scale, no rotation or shear
if (qAbs(fdx) <= fixed_scale) { // scale up on X
- fetchTransformedBilinear_simple_upscale_helper<blendType, bpp>(buffer, buffer + length, data->texture, fx, fy, fdx, fdy);
+ fetchTransformedBilinear_simple_scale_helper<blendType>(buffer, buffer + length, data->texture, fx, fy, fdx, fdy);
+ } else if (qAbs(fdx) <= 2 * fixed_scale) { // scale down on X less than 2x
+ const int mid = (length * 2 < BufferSize) ? length : ((length + 1) / 2);
+ fetchTransformedBilinear_simple_scale_helper<blendType>(buffer, buffer + mid, data->texture, fx, fy, fdx, fdy);
+ if (mid != length)
+ fetchTransformedBilinear_simple_scale_helper<blendType>(buffer + mid, buffer + length, data->texture, fx, fy, fdx, fdy);
} else {
const BilinearFastTransformFetcher fetcher = fetchTransformedBilinear_fetcher<blendType,bpp>;
- uint buf1[buffer_size];
- uint buf2[buffer_size];
+ uint buf1[BufferSize];
+ uint buf2[BufferSize];
uint *b = buffer;
while (length) {
- int len = qMin(length, buffer_size / 2);
+ int len = qMin(length, BufferSize / 2);
fetcher(buf1, buf2, len, data->texture, fx, fy, fdx, 0);
- layout->convertToARGB32PM(buf1, buf1, len * 2, clut, 0);
- layout->convertToARGB32PM(buf2, buf2, len * 2, clut, 0);
+ layout->convertToARGB32PM(buf1, len * 2, clut);
+ layout->convertToARGB32PM(buf2, len * 2, clut);
if (hasFastInterpolate4() || qAbs(data->m22) < qreal(1./8.)) { // scale up more than 8x (on Y)
int disty = (fy & 0x0000ffff) >> 8;
@@ -2955,14 +2973,14 @@ static const uint *QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Oper
} else { // rotation or shear
const BilinearFastTransformFetcher fetcher = fetchTransformedBilinear_fetcher<blendType,bpp>;
- uint buf1[buffer_size];
- uint buf2[buffer_size];
+ uint buf1[BufferSize];
+ uint buf2[BufferSize];
uint *b = buffer;
while (length) {
- int len = qMin(length, buffer_size / 2);
+ int len = qMin(length, BufferSize / 2);
fetcher(buf1, buf2, len, data->texture, fx, fy, fdx, fdy);
- layout->convertToARGB32PM(buf1, buf1, len * 2, clut, 0);
- layout->convertToARGB32PM(buf2, buf2, len * 2, clut, 0);
+ layout->convertToARGB32PM(buf1, len * 2, clut);
+ layout->convertToARGB32PM(buf2, len * 2, clut);
if (hasFastInterpolate4() || qAbs(data->m11) < qreal(1./8.) || qAbs(data->m22) < qreal(1./8.)) {
// If we are zooming more than 8 times, we use 8bit precision for the position.
@@ -3009,15 +3027,15 @@ static const uint *QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Oper
qreal fy = data->m22 * cy + data->m12 * cx + data->dy;
qreal fw = data->m23 * cy + data->m13 * cx + data->m33;
- uint buf1[buffer_size];
- uint buf2[buffer_size];
+ uint buf1[BufferSize];
+ uint buf2[BufferSize];
uint *b = buffer;
- int distxs[buffer_size / 2];
- int distys[buffer_size / 2];
+ int distxs[BufferSize / 2];
+ int distys[BufferSize / 2];
while (length) {
- int len = qMin(length, buffer_size / 2);
+ int len = qMin(length, BufferSize / 2);
for (int i = 0; i < len; ++i) {
const qreal iw = fw == 0 ? 1 : 1 / fw;
const qreal px = fx * iw - qreal(0.5);
@@ -3049,8 +3067,8 @@ static const uint *QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Oper
fw += fdw;
}
- layout->convertToARGB32PM(buf1, buf1, len * 2, clut, 0);
- layout->convertToARGB32PM(buf2, buf2, len * 2, clut, 0);
+ layout->convertToARGB32PM(buf1, len * 2, clut);
+ layout->convertToARGB32PM(buf2, len * 2, clut);
for (int i = 0; i < len; ++i) {
int distx = distxs[i];
@@ -3094,13 +3112,13 @@ static const QRgba64 *QT_FASTCALL fetchTransformedBilinear64(QRgba64 *buffer, co
if (fdy == 0) { //simple scale, no rotation
- uint sbuf1[buffer_size];
- uint sbuf2[buffer_size];
- quint64 buf1[buffer_size];
- quint64 buf2[buffer_size];
+ uint sbuf1[BufferSize];
+ uint sbuf2[BufferSize];
+ quint64 buf1[BufferSize];
+ quint64 buf2[BufferSize];
QRgba64 *b = buffer;
while (length) {
- int len = qMin(length, buffer_size / 2);
+ int len = qMin(length, BufferSize / 2);
int disty = (fy & 0x0000ffff);
#if defined(__SSE2__)
const __m128i vdy = _mm_set1_epi16(disty);
@@ -3138,15 +3156,15 @@ static const QRgba64 *QT_FASTCALL fetchTransformedBilinear64(QRgba64 *buffer, co
b += len;
}
} else { //rotation
- uint sbuf1[buffer_size];
- uint sbuf2[buffer_size];
- quint64 buf1[buffer_size];
- quint64 buf2[buffer_size];
+ uint sbuf1[BufferSize];
+ uint sbuf2[BufferSize];
+ quint64 buf1[BufferSize];
+ quint64 buf2[BufferSize];
QRgba64 *end = buffer + length;
QRgba64 *b = buffer;
while (b < end) {
- int len = qMin(length, buffer_size / 2);
+ int len = qMin(length, BufferSize / 2);
fetcher(sbuf1, sbuf2, len, data->texture, fx, fy, fdx, fdy);
@@ -3177,17 +3195,17 @@ static const QRgba64 *QT_FASTCALL fetchTransformedBilinear64(QRgba64 *buffer, co
qreal fw = data->m23 * cy + data->m13 * cx + data->m33;
FetchPixelFunc fetch = qFetchPixel[layout->bpp];
- uint sbuf1[buffer_size];
- uint sbuf2[buffer_size];
- quint64 buf1[buffer_size];
- quint64 buf2[buffer_size];
+ uint sbuf1[BufferSize];
+ uint sbuf2[BufferSize];
+ quint64 buf1[BufferSize];
+ quint64 buf2[BufferSize];
QRgba64 *b = buffer;
- int distxs[buffer_size / 2];
- int distys[buffer_size / 2];
+ int distxs[BufferSize / 2];
+ int distys[BufferSize / 2];
while (length) {
- int len = qMin(length, buffer_size / 2);
+ int len = qMin(length, BufferSize / 2);
for (int i = 0; i < len; ++i) {
const qreal iw = fw == 0 ? 1 : 1 / fw;
const qreal px = fx * iw - qreal(0.5);
@@ -3292,6 +3310,15 @@ static SourceFetchProc sourceFetchARGB32PM[NBlendTypes] = {
fetchTransformedBilinearARGB32PM<BlendTransformedBilinearTiled> // BilinearTiled
};
+static SourceFetchProc sourceFetchAny16[NBlendTypes] = {
+ fetchUntransformed, // Untransformed
+ fetchUntransformed, // Tiled
+ fetchTransformed<BlendTransformed, QPixelLayout::BPP16>, // Transformed
+ fetchTransformed<BlendTransformedTiled, QPixelLayout::BPP16>, // TransformedTiled
+ fetchTransformedBilinear<BlendTransformedBilinear, QPixelLayout::BPP16>, // TransformedBilinear
+ fetchTransformedBilinear<BlendTransformedBilinearTiled, QPixelLayout::BPP16> // TransformedBilinearTiled
+};
+
static SourceFetchProc sourceFetchAny32[NBlendTypes] = {
fetchUntransformed, // Untransformed
fetchUntransformed, // Tiled
@@ -3316,6 +3343,8 @@ static inline SourceFetchProc getSourceFetch(TextureBlendType blendType, QImage:
return sourceFetchARGB32PM[blendType];
if (blendType == BlendUntransformed || blendType == BlendTiled)
return sourceFetchUntransformed[format];
+ if (qPixelLayouts[format].bpp == QPixelLayout::BPP16)
+ return sourceFetchAny16[blendType];
if (qPixelLayouts[format].bpp == QPixelLayout::BPP32)
return sourceFetchAny32[blendType];
return sourceFetchGeneric[blendType];
@@ -3717,7 +3746,7 @@ static
void blend_color_generic(int count, const QSpan *spans, void *userData)
{
QSpanData *data = reinterpret_cast<QSpanData *>(userData);
- uint buffer[buffer_size];
+ uint buffer[BufferSize];
Operator op = getOperator(data, spans, count);
const uint color = data->solid.color.toArgb32();
@@ -3725,7 +3754,7 @@ void blend_color_generic(int count, const QSpan *spans, void *userData)
int x = spans->x;
int length = spans->len;
while (length) {
- int l = qMin(buffer_size, length);
+ int l = qMin(BufferSize, length);
uint *dest = op.destFetch ? op.destFetch(buffer, data->rasterBuffer, x, spans->y, l) : buffer;
op.funcSolid(dest, l, color, spans->coverage);
if (op.destStore)
@@ -3777,14 +3806,27 @@ void blend_color_generic_rgb64(int count, const QSpan *spans, void *userData)
return blend_color_generic(count, spans, userData);
}
- quint64 buffer[buffer_size];
+ quint64 buffer[BufferSize];
const QRgba64 color = data->solid.color;
+ bool solidFill = data->rasterBuffer->compositionMode == QPainter::CompositionMode_Source
+ || (data->rasterBuffer->compositionMode == QPainter::CompositionMode_SourceOver && color.isOpaque());
+ bool isBpp32 = qPixelLayouts[data->rasterBuffer->format].bpp == QPixelLayout::BPP32;
while (count--) {
int x = spans->x;
int length = spans->len;
+ if (solidFill && isBpp32 && spans->coverage == 255) {
+ // If dest doesn't matter we don't need to bother with blending or converting all the identical pixels
+ if (length > 0) {
+ op.destStore64(data->rasterBuffer, x, spans->y, &color, 1);
+ uint *dest = (uint*)data->rasterBuffer->scanLine(spans->y) + x;
+ qt_memfill32(dest + 1, dest[0], length - 1);
+ length = 0;
+ }
+ }
+
while (length) {
- int l = qMin(buffer_size, length);
+ int l = qMin(BufferSize, length);
QRgba64 *dest = op.destFetch64((QRgba64 *)buffer, data->rasterBuffer, x, spans->y, l);
op.funcSolid64(dest, l, color, spans->coverage);
op.destStore64(data->rasterBuffer, x, spans->y, dest, l);
@@ -3889,7 +3931,7 @@ void handleSpans(int count, const QSpan *spans, const QSpanData *data, T &handle
int length = right - x;
while (length) {
- int l = qMin(buffer_size, length);
+ int l = qMin(BufferSize, length);
length -= l;
int process_length = l;
@@ -3936,8 +3978,8 @@ struct QBlendBase
BlendType *dest;
- BlendType buffer[buffer_size];
- BlendType src_buffer[buffer_size];
+ BlendType buffer[BufferSize];
+ BlendType src_buffer[BufferSize];
};
class BlendSrcGeneric : public QBlendBase<uint>
@@ -4021,8 +4063,8 @@ static void blend_untransformed_generic(int count, const QSpan *spans, void *use
{
QSpanData *data = reinterpret_cast<QSpanData *>(userData);
- uint buffer[buffer_size];
- uint src_buffer[buffer_size];
+ uint buffer[BufferSize];
+ uint src_buffer[BufferSize];
Operator op = getOperator(data, spans, count);
const int image_width = data->texture.width;
@@ -4046,7 +4088,7 @@ static void blend_untransformed_generic(int count, const QSpan *spans, void *use
if (length > 0) {
const int coverage = (spans->coverage * data->texture.const_alpha) >> 8;
while (length) {
- int l = qMin(buffer_size, length);
+ int l = qMin(BufferSize, length);
const uint *src = op.srcFetch(src_buffer, &op, data, sy, sx, l);
uint *dest = op.destFetch ? op.destFetch(buffer, data->rasterBuffer, x, spans->y, l) : buffer;
op.func(dest, src, l, coverage);
@@ -4071,8 +4113,8 @@ static void blend_untransformed_generic_rgb64(int count, const QSpan *spans, voi
qCDebug(lcQtGuiDrawHelper, "blend_untransformed_generic_rgb64: unsupported 64-bit blend attempted, falling back to 32-bit");
return blend_untransformed_generic(count, spans, userData);
}
- quint64 buffer[buffer_size];
- quint64 src_buffer[buffer_size];
+ quint64 buffer[BufferSize];
+ quint64 src_buffer[BufferSize];
const int image_width = data->texture.width;
const int image_height = data->texture.height;
@@ -4095,7 +4137,7 @@ static void blend_untransformed_generic_rgb64(int count, const QSpan *spans, voi
if (length > 0) {
const int coverage = (spans->coverage * data->texture.const_alpha) >> 8;
while (length) {
- int l = qMin(buffer_size, length);
+ int l = qMin(BufferSize, length);
const QRgba64 *src = op.srcFetch64((QRgba64 *)src_buffer, &op, data, sy, sx, l);
QRgba64 *dest = op.destFetch64((QRgba64 *)buffer, data->rasterBuffer, x, spans->y, l);
op.func64(dest, src, l, coverage);
@@ -4259,8 +4301,8 @@ static void blend_tiled_generic(int count, const QSpan *spans, void *userData)
{
QSpanData *data = reinterpret_cast<QSpanData *>(userData);
- uint buffer[buffer_size];
- uint src_buffer[buffer_size];
+ uint buffer[BufferSize];
+ uint src_buffer[BufferSize];
Operator op = getOperator(data, spans, count);
const int image_width = data->texture.width;
@@ -4286,8 +4328,8 @@ static void blend_tiled_generic(int count, const QSpan *spans, void *userData)
const int coverage = (spans->coverage * data->texture.const_alpha) >> 8;
while (length) {
int l = qMin(image_width - sx, length);
- if (buffer_size < l)
- l = buffer_size;
+ if (BufferSize < l)
+ l = BufferSize;
const uint *src = op.srcFetch(src_buffer, &op, data, sy, sx, l);
uint *dest = op.destFetch ? op.destFetch(buffer, data->rasterBuffer, x, spans->y, l) : buffer;
op.func(dest, src, l, coverage);
@@ -4312,8 +4354,8 @@ static void blend_tiled_generic_rgb64(int count, const QSpan *spans, void *userD
qCDebug(lcQtGuiDrawHelper, "blend_tiled_generic_rgb64: unsupported 64-bit blend attempted, falling back to 32-bit");
return blend_tiled_generic(count, spans, userData);
}
- quint64 buffer[buffer_size];
- quint64 src_buffer[buffer_size];
+ quint64 buffer[BufferSize];
+ quint64 src_buffer[BufferSize];
const int image_width = data->texture.width;
const int image_height = data->texture.height;
@@ -4325,6 +4367,50 @@ static void blend_tiled_generic_rgb64(int count, const QSpan *spans, void *userD
if (yoff < 0)
yoff += image_height;
+ bool isBpp32 = qPixelLayouts[data->rasterBuffer->format].bpp == QPixelLayout::BPP32;
+ if (op.destFetch64 == destFetch64Undefined && image_width <= BufferSize && isBpp32) {
+ // If destination isn't blended into the result, we can do the tiling directly on destination pixels.
+ while (count--) {
+ int x = spans->x;
+ int y = spans->y;
+ int length = spans->len;
+ int sx = (xoff + spans->x) % image_width;
+ int sy = (spans->y + yoff) % image_height;
+ if (sx < 0)
+ sx += image_width;
+ if (sy < 0)
+ sy += image_height;
+
+ int sl = qMin(image_width, length);
+ if (sx > 0 && sl > 0) {
+ int l = qMin(image_width - sx, sl);
+ const QRgba64 *src = op.srcFetch64((QRgba64 *)src_buffer, &op, data, sy, sx, l);
+ op.destStore64(data->rasterBuffer, x, y, src, l);
+ x += l;
+ sx += l;
+ sl -= l;
+ if (sx >= image_width)
+ sx = 0;
+ }
+ if (sl > 0) {
+ Q_ASSERT(sx == 0);
+ const QRgba64 *src = op.srcFetch64((QRgba64 *)src_buffer, &op, data, sy, sx, sl);
+ op.destStore64(data->rasterBuffer, x, y, src, sl);
+ x += sl;
+ sx += sl;
+ sl -= sl;
+ if (sx >= image_width)
+ sx = 0;
+ }
+ uint *dest = (uint*)data->rasterBuffer->scanLine(y) + x - image_width;
+ for (int i = image_width; i < length; ++i) {
+ dest[i] = dest[i - image_width];
+ }
+ ++spans;
+ }
+ return;
+ }
+
while (count--) {
int x = spans->x;
int length = spans->len;
@@ -4338,8 +4424,8 @@ static void blend_tiled_generic_rgb64(int count, const QSpan *spans, void *userD
const int coverage = (spans->coverage * data->texture.const_alpha) >> 8;
while (length) {
int l = qMin(image_width - sx, length);
- if (buffer_size < l)
- l = buffer_size;
+ if (BufferSize < l)
+ l = BufferSize;
const QRgba64 *src = op.srcFetch64((QRgba64 *)src_buffer, &op, data, sy, sx, l);
QRgba64 *dest = op.destFetch64((QRgba64 *)buffer, data->rasterBuffer, x, spans->y, l);
op.func64(dest, src, l, coverage);
@@ -4388,8 +4474,8 @@ static void blend_tiled_argb(int count, const QSpan *spans, void *userData)
const int coverage = (spans->coverage * data->texture.const_alpha) >> 8;
while (length) {
int l = qMin(image_width - sx, length);
- if (buffer_size < l)
- l = buffer_size;
+ if (BufferSize < l)
+ l = BufferSize;
const uint *src = (const uint *)data->texture.scanLine(sy) + sx;
uint *dest = ((uint *)data->rasterBuffer->scanLine(spans->y)) + x;
op.func(dest, src, l, coverage);
@@ -4448,8 +4534,8 @@ static void blend_tiled_rgb565(int count, const QSpan *spans, void *userData)
int tx = x;
while (length) {
int l = qMin(image_width - sx, length);
- if (buffer_size < l)
- l = buffer_size;
+ if (BufferSize < l)
+ l = BufferSize;
quint16 *dest = ((quint16 *)data->rasterBuffer->scanLine(spans->y)) + tx;
const quint16 *src = (const quint16 *)data->texture.scanLine(sy) + sx;
memcpy(dest, src, l * sizeof(quint16));
@@ -4484,8 +4570,8 @@ static void blend_tiled_rgb565(int count, const QSpan *spans, void *userData)
if (alpha > 0) {
while (length) {
int l = qMin(image_width - sx, length);
- if (buffer_size < l)
- l = buffer_size;
+ if (BufferSize < l)
+ l = BufferSize;
quint16 *dest = ((quint16 *)data->rasterBuffer->scanLine(spans->y)) + x;
const quint16 *src = (const quint16 *)data->texture.scanLine(sy) + sx;
blend_sourceOver_rgb16_rgb16(dest, src, l, alpha, ialpha);
@@ -4501,723 +4587,12 @@ static void blend_tiled_rgb565(int count, const QSpan *spans, void *userData)
}
}
-static void blend_transformed_bilinear_rgb565(int count, const QSpan *spans, void *userData)
-{
- QSpanData *data = reinterpret_cast<QSpanData*>(userData);
- QPainter::CompositionMode mode = data->rasterBuffer->compositionMode;
-
- if (data->texture.format != QImage::Format_RGB16
- || (mode != QPainter::CompositionMode_SourceOver
- && mode != QPainter::CompositionMode_Source))
- {
- blend_src_generic(count, spans, userData);
- return;
- }
-
- quint16 buffer[buffer_size];
-
- const int src_minx = data->texture.x1;
- const int src_miny = data->texture.y1;
- const int src_maxx = data->texture.x2 - 1;
- const int src_maxy = data->texture.y2 - 1;
-
- if (data->fast_matrix) {
- // The increment pr x in the scanline
- const int fdx = (int)(data->m11 * fixed_scale);
- const int fdy = (int)(data->m12 * fixed_scale);
-
- while (count--) {
- const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8;
- const quint8 alpha = (coverage + 1) >> 3;
- const quint8 ialpha = 0x20 - alpha;
- if (alpha == 0) {
- ++spans;
- continue;
- }
-
- quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + spans->x;
- const qreal cx = spans->x + qreal(0.5);
- const qreal cy = spans->y + qreal(0.5);
- int x = int((data->m21 * cy
- + data->m11 * cx + data->dx) * fixed_scale) - half_point;
- int y = int((data->m22 * cy
- + data->m12 * cx + data->dy) * fixed_scale) - half_point;
- int length = spans->len;
-
- while (length) {
- int l;
- quint16 *b;
- if (ialpha == 0) {
- l = length;
- b = dest;
- } else {
- l = qMin(length, buffer_size);
- b = buffer;
- }
- const quint16 *end = b + l;
-
- while (b < end) {
- int x1 = (x >> 16);
- int x2;
- int y1 = (y >> 16);
- int y2;
-
- fetchTransformedBilinear_pixelBounds<BlendTransformedBilinear>(0, src_minx, src_maxx, x1, x2);
- fetchTransformedBilinear_pixelBounds<BlendTransformedBilinear>(0, src_miny, src_maxy, y1, y2);
-
- const quint16 *src1 = (const quint16*)data->texture.scanLine(y1);
- const quint16 *src2 = (const quint16*)data->texture.scanLine(y2);
- quint16 tl = src1[x1];
- const quint16 tr = src1[x2];
- quint16 bl = src2[x1];
- const quint16 br = src2[x2];
-
- const uint distxsl8 = x & 0xff00;
- const uint distysl8 = y & 0xff00;
- const uint distx = distxsl8 >> 8;
- const uint disty = distysl8 >> 8;
- const uint distxy = distx * disty;
-
- const uint tlw = 0x10000 - distxsl8 - distysl8 + distxy; // (256 - distx) * (256 - disty)
- const uint trw = distxsl8 - distxy; // distx * (256 - disty)
- const uint blw = distysl8 - distxy; // (256 - distx) * disty
- const uint brw = distxy; // distx * disty
- uint red = ((tl & 0xf800) * tlw + (tr & 0xf800) * trw
- + (bl & 0xf800) * blw + (br & 0xf800) * brw) & 0xf8000000;
- uint green = ((tl & 0x07e0) * tlw + (tr & 0x07e0) * trw
- + (bl & 0x07e0) * blw + (br & 0x07e0) * brw) & 0x07e00000;
- uint blue = ((tl & 0x001f) * tlw + (tr & 0x001f) * trw
- + (bl & 0x001f) * blw + (br & 0x001f) * brw);
- *b = quint16((red | green | blue) >> 16);
-
- ++b;
- x += fdx;
- y += fdy;
- }
-
- if (ialpha != 0)
- blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha);
-
- dest += l;
- length -= l;
- }
- ++spans;
- }
- } else {
- const qreal fdx = data->m11;
- const qreal fdy = data->m12;
- const qreal fdw = data->m13;
-
- while (count--) {
- const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8;
- const quint8 alpha = (coverage + 1) >> 3;
- const quint8 ialpha = 0x20 - alpha;
- if (alpha == 0) {
- ++spans;
- continue;
- }
-
- quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + spans->x;
-
- const qreal cx = spans->x + qreal(0.5);
- const qreal cy = spans->y + qreal(0.5);
-
- qreal x = data->m21 * cy + data->m11 * cx + data->dx;
- qreal y = data->m22 * cy + data->m12 * cx + data->dy;
- qreal w = data->m23 * cy + data->m13 * cx + data->m33;
-
- int length = spans->len;
- while (length) {
- int l;
- quint16 *b;
- if (ialpha == 0) {
- l = length;
- b = dest;
- } else {
- l = qMin(length, buffer_size);
- b = buffer;
- }
- const quint16 *end = b + l;
-
- while (b < end) {
- const qreal iw = w == 0 ? 1 : 1 / w;
- const qreal px = x * iw - qreal(0.5);
- const qreal py = y * iw - qreal(0.5);
-
- int x1 = int(px) - (px < 0);
- int x2;
- int y1 = int(py) - (py < 0);
- int y2;
-
- fetchTransformedBilinear_pixelBounds<BlendTransformedBilinear>(0, src_minx, src_maxx, x1, x2);
- fetchTransformedBilinear_pixelBounds<BlendTransformedBilinear>(0, src_miny, src_maxy, y1, y2);
-
- const quint16 *src1 = (const quint16 *)data->texture.scanLine(y1);
- const quint16 *src2 = (const quint16 *)data->texture.scanLine(y2);
- quint16 tl = src1[x1];
- const quint16 tr = src1[x2];
- quint16 bl = src2[x1];
- const quint16 br = src2[x2];
-
- const uint distx = uint((px - x1) * 256);
- const uint disty = uint((py - y1) * 256);
- const uint distxsl8 = distx << 8;
- const uint distysl8 = disty << 8;
- const uint distxy = distx * disty;
-
- const uint tlw = 0x10000 - distxsl8 - distysl8 + distxy; // (256 - distx) * (256 - disty)
- const uint trw = distxsl8 - distxy; // distx * (256 - disty)
- const uint blw = distysl8 - distxy; // (256 - distx) * disty
- const uint brw = distxy; // distx * disty
- uint red = ((tl & 0xf800) * tlw + (tr & 0xf800) * trw
- + (bl & 0xf800) * blw + (br & 0xf800) * brw) & 0xf8000000;
- uint green = ((tl & 0x07e0) * tlw + (tr & 0x07e0) * trw
- + (bl & 0x07e0) * blw + (br & 0x07e0) * brw) & 0x07e00000;
- uint blue = ((tl & 0x001f) * tlw + (tr & 0x001f) * trw
- + (bl & 0x001f) * blw + (br & 0x001f) * brw);
- *b = quint16((red | green | blue) >> 16);
-
- ++b;
- x += fdx;
- y += fdy;
- w += fdw;
- }
-
- if (ialpha != 0)
- blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha);
-
- dest += l;
- length -= l;
- }
- ++spans;
- }
- }
-}
-
-static void blend_transformed_argb(int count, const QSpan *spans, void *userData)
-{
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
- if (data->texture.format != QImage::Format_ARGB32_Premultiplied
- && data->texture.format != QImage::Format_RGB32) {
- blend_src_generic(count, spans, userData);
- return;
- }
-
- CompositionFunction func = functionForMode[data->rasterBuffer->compositionMode];
- uint buffer[buffer_size];
- quint32 mask = (data->texture.format == QImage::Format_RGB32) ? 0xff000000 : 0;
-
- const int image_x1 = data->texture.x1;
- const int image_y1 = data->texture.y1;
- const int image_x2 = data->texture.x2 - 1;
- const int image_y2 = data->texture.y2 - 1;
-
- if (data->fast_matrix) {
- // The increment pr x in the scanline
- int fdx = (int)(data->m11 * fixed_scale);
- int fdy = (int)(data->m12 * fixed_scale);
-
- while (count--) {
- void *t = data->rasterBuffer->scanLine(spans->y);
-
- uint *target = ((uint *)t) + spans->x;
-
- const qreal cx = spans->x + qreal(0.5);
- const qreal cy = spans->y + qreal(0.5);
-
- int x = int((data->m21 * cy
- + data->m11 * cx + data->dx) * fixed_scale);
- int y = int((data->m22 * cy
- + data->m12 * cx + data->dy) * fixed_scale);
-
- int length = spans->len;
- const int coverage = (spans->coverage * data->texture.const_alpha) >> 8;
- while (length) {
- int l = qMin(length, buffer_size);
- const uint *end = buffer + l;
- uint *b = buffer;
- while (b < end) {
- int px = qBound(image_x1, x >> 16, image_x2);
- int py = qBound(image_y1, y >> 16, image_y2);
- *b = reinterpret_cast<const uint *>(data->texture.scanLine(py))[px] | mask;
-
- x += fdx;
- y += fdy;
- ++b;
- }
- func(target, buffer, l, coverage);
- target += l;
- length -= l;
- }
- ++spans;
- }
- } else {
- const qreal fdx = data->m11;
- const qreal fdy = data->m12;
- const qreal fdw = data->m13;
- while (count--) {
- void *t = data->rasterBuffer->scanLine(spans->y);
-
- uint *target = ((uint *)t) + spans->x;
-
- const qreal cx = spans->x + qreal(0.5);
- const qreal cy = spans->y + qreal(0.5);
-
- qreal x = data->m21 * cy + data->m11 * cx + data->dx;
- qreal y = data->m22 * cy + data->m12 * cx + data->dy;
- qreal w = data->m23 * cy + data->m13 * cx + data->m33;
-
- int length = spans->len;
- const int coverage = (spans->coverage * data->texture.const_alpha) >> 8;
- while (length) {
- int l = qMin(length, buffer_size);
- const uint *end = buffer + l;
- uint *b = buffer;
- while (b < end) {
- const qreal iw = w == 0 ? 1 : 1 / w;
- const qreal tx = x * iw;
- const qreal ty = y * iw;
- const int px = qBound(image_x1, int(tx) - (tx < 0), image_x2);
- const int py = qBound(image_y1, int(ty) - (ty < 0), image_y2);
-
- *b = reinterpret_cast<const uint *>(data->texture.scanLine(py))[px] | mask;
- x += fdx;
- y += fdy;
- w += fdw;
-
- ++b;
- }
- func(target, buffer, l, coverage);
- target += l;
- length -= l;
- }
- ++spans;
- }
- }
-}
-
-static void blend_transformed_rgb565(int count, const QSpan *spans, void *userData)
-{
- QSpanData *data = reinterpret_cast<QSpanData*>(userData);
- QPainter::CompositionMode mode = data->rasterBuffer->compositionMode;
-
- if (data->texture.format != QImage::Format_RGB16
- || (mode != QPainter::CompositionMode_SourceOver
- && mode != QPainter::CompositionMode_Source))
- {
- blend_src_generic(count, spans, userData);
- return;
- }
-
- quint16 buffer[buffer_size];
- const int image_x1 = data->texture.x1;
- const int image_y1 = data->texture.y1;
- const int image_x2 = data->texture.x2 - 1;
- const int image_y2 = data->texture.y2 - 1;
-
- if (data->fast_matrix) {
- // The increment pr x in the scanline
- const int fdx = (int)(data->m11 * fixed_scale);
- const int fdy = (int)(data->m12 * fixed_scale);
-
- while (count--) {
- const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8;
- const quint8 alpha = (coverage + 1) >> 3;
- const quint8 ialpha = 0x20 - alpha;
- if (alpha == 0) {
- ++spans;
- continue;
- }
-
- quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + spans->x;
- const qreal cx = spans->x + qreal(0.5);
- const qreal cy = spans->y + qreal(0.5);
- int x = int((data->m21 * cy
- + data->m11 * cx + data->dx) * fixed_scale);
- int y = int((data->m22 * cy
- + data->m12 * cx + data->dy) * fixed_scale);
- int length = spans->len;
-
- while (length) {
- int l;
- quint16 *b;
- if (ialpha == 0) {
- l = length;
- b = dest;
- } else {
- l = qMin(length, buffer_size);
- b = buffer;
- }
- const quint16 *end = b + l;
-
- while (b < end) {
- const int px = qBound(image_x1, x >> 16, image_x2);
- const int py = qBound(image_y1, y >> 16, image_y2);
-
- *b = ((const quint16 *)data->texture.scanLine(py))[px];
- ++b;
-
- x += fdx;
- y += fdy;
- }
-
- if (ialpha != 0)
- blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha);
-
- dest += l;
- length -= l;
- }
- ++spans;
- }
- } else {
- const qreal fdx = data->m11;
- const qreal fdy = data->m12;
- const qreal fdw = data->m13;
-
- while (count--) {
- const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8;
- const quint8 alpha = (coverage + 1) >> 3;
- const quint8 ialpha = 0x20 - alpha;
- if (alpha == 0) {
- ++spans;
- continue;
- }
-
- quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + spans->x;
-
- const qreal cx = spans->x + qreal(0.5);
- const qreal cy = spans->y + qreal(0.5);
-
- qreal x = data->m21 * cy + data->m11 * cx + data->dx;
- qreal y = data->m22 * cy + data->m12 * cx + data->dy;
- qreal w = data->m23 * cy + data->m13 * cx + data->m33;
-
- int length = spans->len;
- while (length) {
- int l;
- quint16 *b;
- if (ialpha == 0) {
- l = length;
- b = dest;
- } else {
- l = qMin(length, buffer_size);
- b = buffer;
- }
- const quint16 *end = b + l;
-
- while (b < end) {
- const qreal iw = w == 0 ? 1 : 1 / w;
- const qreal tx = x * iw;
- const qreal ty = y * iw;
-
- const int px = qBound(image_x1, int(tx) - (tx < 0), image_x2);
- const int py = qBound(image_y1, int(ty) - (ty < 0), image_y2);
-
- *b = ((const quint16 *)data->texture.scanLine(py))[px];
- ++b;
-
- x += fdx;
- y += fdy;
- w += fdw;
- }
-
- if (ialpha != 0)
- blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha);
-
- dest += l;
- length -= l;
- }
- ++spans;
- }
- }
-}
-
-static void blend_transformed_tiled_argb(int count, const QSpan *spans, void *userData)
-{
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
- if (data->texture.format != QImage::Format_ARGB32_Premultiplied
- && data->texture.format != QImage::Format_RGB32) {
- blend_src_generic(count, spans, userData);
- return;
- }
-
- CompositionFunction func = functionForMode[data->rasterBuffer->compositionMode];
- uint buffer[buffer_size];
-
- int image_width = data->texture.width;
- int image_height = data->texture.height;
- const qsizetype scanline_offset = data->texture.bytesPerLine / 4;
-
- if (data->fast_matrix) {
- // The increment pr x in the scanline
- int fdx = (int)(data->m11 * fixed_scale);
- int fdy = (int)(data->m12 * fixed_scale);
-
- while (count--) {
- void *t = data->rasterBuffer->scanLine(spans->y);
-
- uint *target = ((uint *)t) + spans->x;
- const uint *image_bits = (const uint *)data->texture.imageData;
-
- const qreal cx = spans->x + qreal(0.5);
- const qreal cy = spans->y + qreal(0.5);
-
- int x = int((data->m21 * cy
- + data->m11 * cx + data->dx) * fixed_scale);
- int y = int((data->m22 * cy
- + data->m12 * cx + data->dy) * fixed_scale);
-
- const int coverage = (spans->coverage * data->texture.const_alpha) >> 8;
- int length = spans->len;
- while (length) {
- int l = qMin(length, buffer_size);
- const uint *end = buffer + l;
- uint *b = buffer;
- int px16 = x % (image_width << 16);
- int py16 = y % (image_height << 16);
- int px_delta = fdx % (image_width << 16);
- int py_delta = fdy % (image_height << 16);
- while (b < end) {
- if (px16 < 0) px16 += image_width << 16;
- if (py16 < 0) py16 += image_height << 16;
- int px = px16 >> 16;
- int py = py16 >> 16;
- int y_offset = py * scanline_offset;
-
- Q_ASSERT(px >= 0 && px < image_width);
- Q_ASSERT(py >= 0 && py < image_height);
-
- *b = image_bits[y_offset + px];
- x += fdx;
- y += fdy;
- px16 += px_delta;
- if (px16 >= image_width << 16)
- px16 -= image_width << 16;
- py16 += py_delta;
- if (py16 >= image_height << 16)
- py16 -= image_height << 16;
- ++b;
- }
- func(target, buffer, l, coverage);
- target += l;
- length -= l;
- }
- ++spans;
- }
- } else {
- const qreal fdx = data->m11;
- const qreal fdy = data->m12;
- const qreal fdw = data->m13;
- while (count--) {
- void *t = data->rasterBuffer->scanLine(spans->y);
-
- uint *target = ((uint *)t) + spans->x;
- const uint *image_bits = (const uint *)data->texture.imageData;
-
- const qreal cx = spans->x + qreal(0.5);
- const qreal cy = spans->y + qreal(0.5);
-
- qreal x = data->m21 * cy + data->m11 * cx + data->dx;
- qreal y = data->m22 * cy + data->m12 * cx + data->dy;
- qreal w = data->m23 * cy + data->m13 * cx + data->m33;
-
- const int coverage = (spans->coverage * data->texture.const_alpha) >> 8;
- int length = spans->len;
- while (length) {
- int l = qMin(length, buffer_size);
- const uint *end = buffer + l;
- uint *b = buffer;
- while (b < end) {
- const qreal iw = w == 0 ? 1 : 1 / w;
- const qreal tx = x * iw;
- const qreal ty = y * iw;
- int px = int(tx) - (tx < 0);
- int py = int(ty) - (ty < 0);
-
- px %= image_width;
- py %= image_height;
- if (px < 0) px += image_width;
- if (py < 0) py += image_height;
- int y_offset = py * scanline_offset;
-
- Q_ASSERT(px >= 0 && px < image_width);
- Q_ASSERT(py >= 0 && py < image_height);
-
- *b = image_bits[y_offset + px];
- x += fdx;
- y += fdy;
- w += fdw;
- //force increment to avoid /0
- if (!w) {
- w += fdw;
- }
- ++b;
- }
- func(target, buffer, l, coverage);
- target += l;
- length -= l;
- }
- ++spans;
- }
- }
-}
-
-static void blend_transformed_tiled_rgb565(int count, const QSpan *spans, void *userData)
-{
- QSpanData *data = reinterpret_cast<QSpanData*>(userData);
- QPainter::CompositionMode mode = data->rasterBuffer->compositionMode;
-
- if (data->texture.format != QImage::Format_RGB16
- || (mode != QPainter::CompositionMode_SourceOver
- && mode != QPainter::CompositionMode_Source))
- {
- blend_src_generic(count, spans, userData);
- return;
- }
-
- quint16 buffer[buffer_size];
- const int image_width = data->texture.width;
- const int image_height = data->texture.height;
-
- if (data->fast_matrix) {
- // The increment pr x in the scanline
- const int fdx = (int)(data->m11 * fixed_scale);
- const int fdy = (int)(data->m12 * fixed_scale);
-
- while (count--) {
- const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8;
- const quint8 alpha = (coverage + 1) >> 3;
- const quint8 ialpha = 0x20 - alpha;
- if (alpha == 0) {
- ++spans;
- continue;
- }
-
- quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + spans->x;
- const qreal cx = spans->x + qreal(0.5);
- const qreal cy = spans->y + qreal(0.5);
- int x = int((data->m21 * cy
- + data->m11 * cx + data->dx) * fixed_scale);
- int y = int((data->m22 * cy
- + data->m12 * cx + data->dy) * fixed_scale);
- int length = spans->len;
-
- while (length) {
- int l;
- quint16 *b;
- if (ialpha == 0) {
- l = length;
- b = dest;
- } else {
- l = qMin(length, buffer_size);
- b = buffer;
- }
- const quint16 *end = b + l;
-
- while (b < end) {
- int px = (x >> 16) % image_width;
- int py = (y >> 16) % image_height;
-
- if (px < 0)
- px += image_width;
- if (py < 0)
- py += image_height;
-
- *b = ((const quint16 *)data->texture.scanLine(py))[px];
- ++b;
-
- x += fdx;
- y += fdy;
- }
-
- if (ialpha != 0)
- blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha);
-
- dest += l;
- length -= l;
- }
- ++spans;
- }
- } else {
- const qreal fdx = data->m11;
- const qreal fdy = data->m12;
- const qreal fdw = data->m13;
-
- while (count--) {
- const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8;
- const quint8 alpha = (coverage + 1) >> 3;
- const quint8 ialpha = 0x20 - alpha;
- if (alpha == 0) {
- ++spans;
- continue;
- }
-
- quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + spans->x;
-
- const qreal cx = spans->x + qreal(0.5);
- const qreal cy = spans->y + qreal(0.5);
-
- qreal x = data->m21 * cy + data->m11 * cx + data->dx;
- qreal y = data->m22 * cy + data->m12 * cx + data->dy;
- qreal w = data->m23 * cy + data->m13 * cx + data->m33;
-
- int length = spans->len;
- while (length) {
- int l;
- quint16 *b;
- if (ialpha == 0) {
- l = length;
- b = dest;
- } else {
- l = qMin(length, buffer_size);
- b = buffer;
- }
- const quint16 *end = b + l;
-
- while (b < end) {
- const qreal iw = w == 0 ? 1 : 1 / w;
- const qreal tx = x * iw;
- const qreal ty = y * iw;
-
- int px = int(tx) - (tx < 0);
- int py = int(ty) - (ty < 0);
-
- px %= image_width;
- py %= image_height;
- if (px < 0)
- px += image_width;
- if (py < 0)
- py += image_height;
-
- *b = ((const quint16 *)data->texture.scanLine(py))[px];
- ++b;
-
- x += fdx;
- y += fdy;
- w += fdw;
- // force increment to avoid /0
- if (!w)
- w += fdw;
- }
-
- if (ialpha != 0)
- blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha);
-
- dest += l;
- length -= l;
- }
- ++spans;
- }
- }
-}
-
-
/* Image formats here are target formats */
static const ProcessSpans processTextureSpansARGB32PM[NBlendTypes] = {
blend_untransformed_argb, // Untransformed
blend_tiled_argb, // Tiled
- blend_transformed_argb, // Transformed
- blend_transformed_tiled_argb, // TransformedTiled
+ blend_src_generic, // Transformed
+ blend_src_generic, // TransformedTiled
blend_src_generic, // TransformedBilinear
blend_src_generic // TransformedBilinearTiled
};
@@ -5225,9 +4600,9 @@ static const ProcessSpans processTextureSpansARGB32PM[NBlendTypes] = {
static const ProcessSpans processTextureSpansRGB16[NBlendTypes] = {
blend_untransformed_rgb565, // Untransformed
blend_tiled_rgb565, // Tiled
- blend_transformed_rgb565, // Transformed
- blend_transformed_tiled_rgb565, // TransformedTiled
- blend_transformed_bilinear_rgb565, // TransformedBilinear
+ blend_src_generic, // Transformed
+ blend_src_generic, // TransformedTiled
+ blend_src_generic, // TransformedBilinear
blend_src_generic // TransformedBilinearTiled
};
@@ -5523,7 +4898,7 @@ static void qt_alphamapblit_generic(QRasterBuffer *rasterBuffer,
srcColor = colorProfile->toLinear(srcColor.unpremultiplied()).premultiplied();
}
- quint64 buffer[buffer_size];
+ quint64 buffer[BufferSize];
const DestFetchProc64 destFetch64 = destFetchProc64[rasterBuffer->format];
const DestStoreProc64 destStore64 = destStoreProc64[rasterBuffer->format];
@@ -5532,7 +4907,7 @@ static void qt_alphamapblit_generic(QRasterBuffer *rasterBuffer,
int i = x;
int length = mapWidth;
while (length > 0) {
- int l = qMin(buffer_size, length);
+ int l = qMin(BufferSize, length);
QRgba64 *dest = destFetch64((QRgba64*)buffer, rasterBuffer, i, y + ly, l);
for (int j=0; j < l; ++j) {
const int coverage = map[j + (i - x)];
@@ -5561,7 +4936,7 @@ static void qt_alphamapblit_generic(QRasterBuffer *rasterBuffer,
int end = qMin<int>(x + mapWidth, clip.x + clip.len);
if (end <= start)
continue;
- Q_ASSERT(end - start <= buffer_size);
+ Q_ASSERT(end - start <= BufferSize);
QRgba64 *dest = destFetch64((QRgba64*)buffer, rasterBuffer, start, clip.y, end - start);
for (int xp=start; xp<end; ++xp) {
@@ -5800,7 +5175,7 @@ static void qt_alphargbblit_generic(QRasterBuffer *rasterBuffer,
srcColor = colorProfile->toLinear(srcColor.unpremultiplied()).premultiplied();
}
- quint64 buffer[buffer_size];
+ quint64 buffer[BufferSize];
const DestFetchProc64 destFetch64 = destFetchProc64[rasterBuffer->format];
const DestStoreProc64 destStore64 = destStoreProc64[rasterBuffer->format];
@@ -5809,7 +5184,7 @@ static void qt_alphargbblit_generic(QRasterBuffer *rasterBuffer,
int i = x;
int length = mapWidth;
while (length > 0) {
- int l = qMin(buffer_size, length);
+ int l = qMin(BufferSize, length);
QRgba64 *dest = destFetch64((QRgba64*)buffer, rasterBuffer, i, y + ly, l);
for (int j=0; j < l; ++j) {
const uint coverage = src[j + (i - x)];
@@ -5838,7 +5213,7 @@ static void qt_alphargbblit_generic(QRasterBuffer *rasterBuffer,
int end = qMin<int>(x + mapWidth, clip.x + clip.len);
if (end <= start)
continue;
- Q_ASSERT(end - start <= buffer_size);
+ Q_ASSERT(end - start <= BufferSize);
QRgba64 *dest = destFetch64((QRgba64*)buffer, rasterBuffer, start, clip.y, end - start);
for (int xp=start; xp<end; ++xp) {
@@ -5928,8 +5303,24 @@ static void qt_rectfill_quint16(QRasterBuffer *rasterBuffer,
int x, int y, int width, int height,
const QRgba64 &color)
{
+ const QPixelLayout &layout = qPixelLayouts[rasterBuffer->format];
+ quint32 c32 = color.toArgb32();
+ quint16 c16;
+ layout.storeFromARGB32PM(reinterpret_cast<uchar *>(&c16), &c32, 0, 1, nullptr, nullptr);
qt_rectfill<quint16>(reinterpret_cast<quint16 *>(rasterBuffer->buffer()),
- color.toRgb16(), x, y, width, height, rasterBuffer->bytesPerLine());
+ c16, x, y, width, height, rasterBuffer->bytesPerLine());
+}
+
+static void qt_rectfill_quint24(QRasterBuffer *rasterBuffer,
+ int x, int y, int width, int height,
+ const QRgba64 &color)
+{
+ const QPixelLayout &layout = qPixelLayouts[rasterBuffer->format];
+ quint32 c32 = color.toArgb32();
+ quint24 c24;
+ layout.storeFromARGB32PM(reinterpret_cast<uchar *>(&c24), &c32, 0, 1, nullptr, nullptr);
+ qt_rectfill<quint24>(reinterpret_cast<quint24 *>(rasterBuffer->buffer()),
+ c24, x, y, width, height, rasterBuffer->bytesPerLine());
}
static void qt_rectfill_nonpremul_argb32(QRasterBuffer *rasterBuffer,
@@ -6049,7 +5440,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
0,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
- 0
+ qt_rectfill_quint24
},
// Format_RGB666
{
@@ -6058,7 +5449,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
0,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
- 0
+ qt_rectfill_quint24
},
// Format_ARGB6666_Premultiplied
{
@@ -6067,7 +5458,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
0,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
- 0
+ qt_rectfill_quint24
},
// Format_RGB555
{
@@ -6076,7 +5467,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
0,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
- 0
+ qt_rectfill_quint16
},
// Format_ARGB8555_Premultiplied
{
@@ -6085,7 +5476,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
0,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
- 0
+ qt_rectfill_quint24
},
// Format_RGB888
{
@@ -6094,7 +5485,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
0,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
- 0
+ qt_rectfill_quint24
},
// Format_RGB444
{
@@ -6103,7 +5494,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
0,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
- 0
+ qt_rectfill_quint16
},
// Format_ARGB4444_Premultiplied
{
@@ -6112,7 +5503,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
0,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
- 0
+ qt_rectfill_quint16
},
// Format_RGBX8888
{
@@ -6267,7 +5658,7 @@ void qt_memfill32(quint32 *dest, quint32 color, int count)
#endif
#ifdef QT_COMPILER_SUPPORTS_SSE4_1
-template<QtPixelOrder> const uint *QT_FASTCALL convertA2RGB30PMFromARGB32PM_sse4(uint *buffer, const uint *src, int count, const QVector<QRgb> *, QDitherInfo *);
+template<QtPixelOrder> void QT_FASTCALL storeA2RGB30PMFromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count, const QVector<QRgb> *, QDitherInfo *);
#endif
extern void qInitBlendFunctions();
@@ -6336,42 +5727,52 @@ static void qInitDrawhelperFunctions()
int w, int h,
int const_alpha);
- extern void QT_FASTCALL storePixelsBPP24_ssse3(uchar *dest, const uint *src, int index, int count);
extern const uint * QT_FASTCALL qt_fetchUntransformed_888_ssse3(uint *buffer, const Operator *, const QSpanData *data,
int y, int x, int length);
qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_ssse3;
qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_ssse3;
qBlendFunctions[QImage::Format_RGBX8888][QImage::Format_RGBA8888_Premultiplied] = qt_blend_argb32_on_argb32_ssse3;
qBlendFunctions[QImage::Format_RGBA8888_Premultiplied][QImage::Format_RGBA8888_Premultiplied] = qt_blend_argb32_on_argb32_ssse3;
- qStorePixels[QPixelLayout::BPP24] = storePixelsBPP24_ssse3;
sourceFetchUntransformed[QImage::Format_RGB888] = qt_fetchUntransformed_888_ssse3;
+#ifndef __SSSE3__
+ extern const uint * QT_FASTCALL fetchPixelsBPP24_ssse3(uint *dest, const uchar*src, int index, int count);
+ qFetchPixels[QPixelLayout::BPP24] = fetchPixelsBPP24_ssse3;
+#endif
}
#endif // SSSE3
#if defined(QT_COMPILER_SUPPORTS_SSE4_1)
if (qCpuHasFeature(SSE4_1)) {
- extern const uint *QT_FASTCALL convertARGB32ToARGB32PM_sse4(uint *buffer, const uint *src, int count,
+ extern void QT_FASTCALL convertARGB32ToARGB32PM_sse4(uint *buffer, int count, const QVector<QRgb> *);
+ extern void QT_FASTCALL convertRGBA8888ToARGB32PM_sse4(uint *buffer, int count, const QVector<QRgb> *);
+ extern const uint *QT_FASTCALL fetchARGB32ToARGB32PM_sse4(uint *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *);
+ extern const uint *QT_FASTCALL fetchRGBA8888ToARGB32PM_sse4(uint *buffer, const uchar *src, int index, int count,
const QVector<QRgb> *, QDitherInfo *);
- extern const uint *QT_FASTCALL convertRGBA8888ToARGB32PM_sse4(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *);
- extern const uint *QT_FASTCALL convertARGB32FromARGB32PM_sse4(uint *buffer, const uint *src, int count,
+ extern void QT_FASTCALL storeARGB32FromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count,
const QVector<QRgb> *, QDitherInfo *);
- extern const uint *QT_FASTCALL convertRGBA8888FromARGB32PM_sse4(uint *buffer, const uint *src, int count,
+ extern void QT_FASTCALL storeRGBA8888FromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count,
const QVector<QRgb> *, QDitherInfo *);
- extern const uint *QT_FASTCALL convertRGBXFromARGB32PM_sse4(uint *buffer, const uint *src, int count,
+ extern void QT_FASTCALL storeRGBXFromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count,
const QVector<QRgb> *, QDitherInfo *);
+ extern void QT_FASTCALL destStore64ARGB32_sse4(QRasterBuffer *rasterBuffer, int x, int y, const QRgba64 *buffer, int length);
+ extern void QT_FASTCALL destStore64RGBA8888_sse4(QRasterBuffer *rasterBuffer, int x, int y, const QRgba64 *buffer, int length);
+ qPixelLayouts[QImage::Format_ARGB32].fetchToARGB32PM = fetchARGB32ToARGB32PM_sse4;
qPixelLayouts[QImage::Format_ARGB32].convertToARGB32PM = convertARGB32ToARGB32PM_sse4;
+ qPixelLayouts[QImage::Format_RGBA8888].fetchToARGB32PM = fetchRGBA8888ToARGB32PM_sse4;
qPixelLayouts[QImage::Format_RGBA8888].convertToARGB32PM = convertRGBA8888ToARGB32PM_sse4;
- qPixelLayouts[QImage::Format_ARGB32].convertFromARGB32PM = convertARGB32FromARGB32PM_sse4;
- qPixelLayouts[QImage::Format_RGBA8888].convertFromARGB32PM = convertRGBA8888FromARGB32PM_sse4;
- qPixelLayouts[QImage::Format_RGBX8888].convertFromARGB32PM = convertRGBXFromARGB32PM_sse4;
- qPixelLayouts[QImage::Format_A2BGR30_Premultiplied].convertFromARGB32PM = convertA2RGB30PMFromARGB32PM_sse4<PixelOrderBGR>;
- qPixelLayouts[QImage::Format_A2RGB30_Premultiplied].convertFromARGB32PM = convertA2RGB30PMFromARGB32PM_sse4<PixelOrderRGB>;
+ qPixelLayouts[QImage::Format_ARGB32].storeFromARGB32PM = storeARGB32FromARGB32PM_sse4;
+ qPixelLayouts[QImage::Format_RGBA8888].storeFromARGB32PM = storeRGBA8888FromARGB32PM_sse4;
+ qPixelLayouts[QImage::Format_RGBX8888].storeFromARGB32PM = storeRGBXFromARGB32PM_sse4;
+ qPixelLayouts[QImage::Format_A2BGR30_Premultiplied].storeFromARGB32PM = storeA2RGB30PMFromARGB32PM_sse4<PixelOrderBGR>;
+ qPixelLayouts[QImage::Format_A2RGB30_Premultiplied].storeFromARGB32PM = storeA2RGB30PMFromARGB32PM_sse4<PixelOrderRGB>;
+ destStoreProc64[QImage::Format_ARGB32] = destStore64ARGB32_sse4;
+ destStoreProc64[QImage::Format_RGBA8888] = destStore64RGBA8888_sse4;
}
#endif
#if defined(QT_COMPILER_SUPPORTS_AVX2)
- if (qCpuHasFeature(AVX2)) {
+ if (qCpuHasFeature(ArchHaswell)) {
extern void qt_blend_rgb32_on_rgb32_avx2(uchar *destPixels, int dbpl,
const uchar *srcPixels, int sbpl,
int w, int h, int const_alpha);
@@ -6401,14 +5802,14 @@ static void qInitDrawhelperFunctions()
qt_functionForModeSolid_C[QPainter::CompositionMode_SourceOver] = comp_func_solid_SourceOver_avx2;
qt_functionForModeSolid64_C[QPainter::CompositionMode_SourceOver] = comp_func_solid_SourceOver_rgb64_avx2;
- extern void QT_FASTCALL fetchTransformedBilinearARGB32PM_simple_upscale_helper_avx2(uint *b, uint *end, const QTextureData &image,
- int &fx, int &fy, int fdx, int /*fdy*/);
+ extern void QT_FASTCALL fetchTransformedBilinearARGB32PM_simple_scale_helper_avx2(uint *b, uint *end, const QTextureData &image,
+ int &fx, int &fy, int fdx, int /*fdy*/);
extern void QT_FASTCALL fetchTransformedBilinearARGB32PM_downscale_helper_avx2(uint *b, uint *end, const QTextureData &image,
int &fx, int &fy, int fdx, int /*fdy*/);
extern void QT_FASTCALL fetchTransformedBilinearARGB32PM_fast_rotate_helper_avx2(uint *b, uint *end, const QTextureData &image,
int &fx, int &fy, int fdx, int fdy);
- bilinearFastTransformHelperARGB32PM[0][SimpleUpscaleTransform] = fetchTransformedBilinearARGB32PM_simple_upscale_helper_avx2;
+ bilinearFastTransformHelperARGB32PM[0][SimpleScaleTransform] = fetchTransformedBilinearARGB32PM_simple_scale_helper_avx2;
bilinearFastTransformHelperARGB32PM[0][DownscaleTransform] = fetchTransformedBilinearARGB32PM_downscale_helper_avx2;
bilinearFastTransformHelperARGB32PM[0][FastRotateTransform] = fetchTransformedBilinearARGB32PM_fast_rotate_helper_avx2;
}
@@ -6440,10 +5841,8 @@ static void qInitDrawhelperFunctions()
sourceFetchUntransformed[QImage::Format_RGB888] = qt_fetchUntransformed_888_neon;
#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
- extern const uint *QT_FASTCALL convertARGB32ToARGB32PM_neon(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *);
- extern const uint *QT_FASTCALL convertRGBA8888ToARGB32PM_neon(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *);
+ extern void QT_FASTCALL convertARGB32ToARGB32PM_neon(uint *buffer, int count, const QVector<QRgb> *);
+ extern void QT_FASTCALL convertRGBA8888ToARGB32PM_neon(uint *buffer, int count, const QVector<QRgb> *);
qPixelLayouts[QImage::Format_ARGB32].convertToARGB32PM = convertARGB32ToARGB32PM_neon;
qPixelLayouts[QImage::Format_RGBA8888].convertToARGB32PM = convertRGBA8888ToARGB32PM_neon;
#endif
diff --git a/src/gui/painting/qdrawhelper_avx2.cpp b/src/gui/painting/qdrawhelper_avx2.cpp
index 3a70524a9d..ec6643deed 100644
--- a/src/gui/painting/qdrawhelper_avx2.cpp
+++ b/src/gui/painting/qdrawhelper_avx2.cpp
@@ -45,8 +45,6 @@
QT_BEGIN_NAMESPACE
-static Q_CONSTEXPR int BufferSize = 2048;
-
enum {
FixedScale = 1 << 16,
HalfPoint = 1 << 15
@@ -576,8 +574,10 @@ inline void fetchTransformedBilinear_pixelBounds(int, int l1, int l2, int &v1, i
Q_ASSERT(v2 >= l1 && v2 <= l2);
}
-void QT_FASTCALL fetchTransformedBilinearARGB32PM_simple_upscale_helper_avx2(uint *b, uint *end, const QTextureData &image,
- int &fx, int &fy, int fdx, int /*fdy*/)
+void QT_FASTCALL intermediate_adder_avx2(uint *b, uint *end, const IntermediateBuffer &intermediate, int offset, int &fx, int fdx);
+
+void QT_FASTCALL fetchTransformedBilinearARGB32PM_simple_scale_helper_avx2(uint *b, uint *end, const QTextureData &image,
+ int &fx, int &fy, int fdx, int /*fdy*/)
{
int y1 = (fy >> 16);
int y2;
@@ -594,16 +594,12 @@ void QT_FASTCALL fetchTransformedBilinearARGB32PM_simple_upscale_helper_avx2(uin
const int offset = (fx + adjust) >> 16;
int x = offset;
- // The idea is first to do the interpolation between the row s1 and the row s2
- // into an intermediate buffer, then we interpolate between two pixel of this buffer.
-
- // intermediate_buffer[0] is a buffer of red-blue component of the pixel, in the form 0x00RR00BB
- // intermediate_buffer[1] is the alpha-green component of the pixel, in the form 0x00AA00GG
- // +1 for the last pixel to interpolate with, and +1 for rounding errors.
- quint32 intermediate_buffer[2][BufferSize + 2];
+ IntermediateBuffer intermediate;
// count is the size used in the intermediate_buffer.
int count = (qint64(length) * qAbs(fdx) + FixedScale - 1) / FixedScale + 2;
- Q_ASSERT(count <= BufferSize + 2); //length is supposed to be <= buffer_size and data->m11 < 1 in this case
+ // length is supposed to be <= BufferSize either because data->m11 < 1 or
+ // data->m11 < 2, and any larger buffers split
+ Q_ASSERT(count <= BufferSize + 2);
int f = 0;
int lim = qMin(count, image.x2 - x);
if (x < image.x1) {
@@ -613,8 +609,8 @@ void QT_FASTCALL fetchTransformedBilinearARGB32PM_simple_upscale_helper_avx2(uin
quint32 rb = (((t & 0xff00ff) * idisty + (b & 0xff00ff) * disty) >> 8) & 0xff00ff;
quint32 ag = ((((t>>8) & 0xff00ff) * idisty + ((b>>8) & 0xff00ff) * disty) >> 8) & 0xff00ff;
do {
- intermediate_buffer[0][f] = rb;
- intermediate_buffer[1][f] = ag;
+ intermediate.buffer_rb[f] = rb;
+ intermediate.buffer_ag[f] = ag;
f++;
x++;
} while (x < image.x1 && f < lim);
@@ -644,10 +640,10 @@ void QT_FASTCALL fetchTransformedBilinearARGB32PM_simple_upscale_helper_avx2(uin
// Add the values, and shift to only keep 8 significant bits per colors
__m256i rAG =_mm256_add_epi16(topAG, bottomAG);
rAG = _mm256_srli_epi16(rAG, 8);
- _mm256_storeu_si256((__m256i*)(&intermediate_buffer[1][f]), rAG);
+ _mm256_storeu_si256((__m256i*)(&intermediate.buffer_ag[f]), rAG);
__m256i rRB =_mm256_add_epi16(topRB, bottomRB);
rRB = _mm256_srli_epi16(rRB, 8);
- _mm256_storeu_si256((__m256i*)(&intermediate_buffer[0][f]), rRB);
+ _mm256_storeu_si256((__m256i*)(&intermediate.buffer_rb[f]), rRB);
}
for (; f < count; f++) { // Same as above but without simd
@@ -656,30 +652,37 @@ void QT_FASTCALL fetchTransformedBilinearARGB32PM_simple_upscale_helper_avx2(uin
uint t = s1[x];
uint b = s2[x];
- intermediate_buffer[0][f] = (((t & 0xff00ff) * idisty + (b & 0xff00ff) * disty) >> 8) & 0xff00ff;
- intermediate_buffer[1][f] = ((((t>>8) & 0xff00ff) * idisty + ((b>>8) & 0xff00ff) * disty) >> 8) & 0xff00ff;
+ intermediate.buffer_rb[f] = (((t & 0xff00ff) * idisty + (b & 0xff00ff) * disty) >> 8) & 0xff00ff;
+ intermediate.buffer_ag[f] = ((((t>>8) & 0xff00ff) * idisty + ((b>>8) & 0xff00ff) * disty) >> 8) & 0xff00ff;
x++;
}
+
// Now interpolate the values from the intermediate_buffer to get the final result.
+ intermediate_adder_avx2(b, end, intermediate, offset, fx, fdx);
+}
+
+void QT_FASTCALL intermediate_adder_avx2(uint *b, uint *end, const IntermediateBuffer &intermediate, int offset, int &fx, int fdx)
+{
fx -= offset * FixedScale;
const __m128i v_fdx = _mm_set1_epi32(fdx * 4);
const __m128i v_blend = _mm_set1_epi32(0x00800080);
+ const __m128i vdx_shuffle = _mm_set_epi8(char(0x80), 13, char(0x80), 13, char(0x80), 9, char(0x80), 9,
+ char(0x80), 5, char(0x80), 5, char(0x80), 1, char(0x80), 1);
__m128i v_fx = _mm_setr_epi32(fx, fx + fdx, fx + fdx + fdx, fx + fdx + fdx + fdx);
while (b < end - 3) {
const __m128i offset = _mm_srli_epi32(v_fx, 16);
- __m256i vrb = _mm256_i32gather_epi64((const long long *)intermediate_buffer[0], offset, 4);
- __m256i vag = _mm256_i32gather_epi64((const long long *)intermediate_buffer[1], offset, 4);
+ __m256i vrb = _mm256_i32gather_epi64((const long long *)intermediate.buffer_rb, offset, 4);
+ __m256i vag = _mm256_i32gather_epi64((const long long *)intermediate.buffer_ag, offset, 4);
- __m128i vdx = _mm_and_si128(v_fx, _mm_set1_epi32(0x0000ffff));
- vdx = _mm_srli_epi16(vdx, 8);
- __m128i vidx = _mm_sub_epi32(_mm_set1_epi32(256), vdx);
+ __m128i vdx = _mm_shuffle_epi8(v_fx, vdx_shuffle);
+ __m128i vidx = _mm_sub_epi16(_mm_set1_epi16(256), vdx);
__m256i vmulx = _mm256_castsi128_si256(_mm_unpacklo_epi32(vidx, vdx));
vmulx = _mm256_inserti128_si256(vmulx, _mm_unpackhi_epi32(vidx, vdx), 1);
- vrb = _mm256_mullo_epi32(vrb, vmulx);
- vag = _mm256_mullo_epi32(vag, vmulx);
+ vrb = _mm256_mullo_epi16(vrb, vmulx);
+ vag = _mm256_mullo_epi16(vag, vmulx);
__m256i vrbag = _mm256_hadd_epi32(vrb, vag);
vrbag = _mm256_permute4x64_epi64(vrbag, _MM_SHUFFLE(3, 1, 2, 0));
@@ -691,21 +694,21 @@ void QT_FASTCALL fetchTransformedBilinearARGB32PM_simple_upscale_helper_avx2(uin
_mm_storeu_si128((__m128i*)b, _mm_blendv_epi8(ag, rb, v_blend));
b += 4;
- fx += 4 * fdx;
v_fx = _mm_add_epi32(v_fx, v_fdx);
}
+ fx = _mm_cvtsi128_si32(v_fx);
while (b < end) {
- int x = (fx >> 16);
-
- uint distx = (fx & 0x0000ffff) >> 8;
- uint idistx = 256 - distx;
+ const int x = (fx >> 16);
- uint rb = ((intermediate_buffer[0][x] * idistx + intermediate_buffer[0][x + 1] * distx) >> 8) & 0xff00ff;
- uint ag = (intermediate_buffer[1][x] * idistx + intermediate_buffer[1][x + 1] * distx) & 0xff00ff00;
- *b = rb | ag;
+ const uint distx = (fx & 0x0000ffff) >> 8;
+ const uint idistx = 256 - distx;
+ const uint rb = (intermediate.buffer_rb[x] * idistx + intermediate.buffer_rb[x + 1] * distx) & 0xff00ff00;
+ const uint ag = (intermediate.buffer_ag[x] * idistx + intermediate.buffer_ag[x + 1] * distx) & 0xff00ff00;
+ *b = (rb >> 8) | ag;
b++;
fx += fdx;
}
+ fx += offset * FixedScale;
}
void QT_FASTCALL fetchTransformedBilinearARGB32PM_downscale_helper_avx2(uint *b, uint *end, const QTextureData &image,
diff --git a/src/gui/painting/qdrawhelper_neon.cpp b/src/gui/painting/qdrawhelper_neon.cpp
index e126f4b670..44d4037c0d 100644
--- a/src/gui/painting/qdrawhelper_neon.cpp
+++ b/src/gui/painting/qdrawhelper_neon.cpp
@@ -1153,18 +1153,14 @@ static inline void convertARGBToARGB32PM_neon(uint *buffer, const uint *src, int
}
}
-const uint *QT_FASTCALL convertARGB32ToARGB32PM_neon(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+void QT_FASTCALL convertARGB32ToARGB32PM_neon(uint *buffer, int count, const QVector<QRgb> *)
{
- convertARGBToARGB32PM_neon<false>(buffer, src, count);
- return buffer;
+ convertARGBToARGB32PM_neon<false>(buffer, buffer, count);
}
-const uint *QT_FASTCALL convertRGBA8888ToARGB32PM_neon(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+void QT_FASTCALL convertRGBA8888ToARGB32PM_neon(uint *buffer, int count, const QVector<QRgb> *)
{
- convertARGBToARGB32PM_neon<true>(buffer, src, count);
- return buffer;
+ convertARGBToARGB32PM_neon<true>(buffer, buffer, count);
}
#endif // Q_BYTE_ORDER == Q_LITTLE_ENDIAN
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h
index 6f3c92ca64..bddd6899e3 100644
--- a/src/gui/painting/qdrawhelper_p.h
+++ b/src/gui/painting/qdrawhelper_p.h
@@ -798,6 +798,7 @@ static Q_ALWAYS_INLINE uint qAlphaRgb30(uint c)
}
struct quint24 {
+ quint24() = default;
quint24(uint value);
operator uint() const;
uchar data[3];
@@ -1205,15 +1206,37 @@ inline uint comp_func_Plus_one_pixel(uint d, const uint s)
#undef MIX
#undef AMIX
+// must be multiple of 4 for easier SIMD implementations
+static Q_CONSTEXPR int BufferSize = 2048;
+
+// A buffer of intermediate results used by simple bilinear scaling.
+struct IntermediateBuffer
+{
+ // The idea is first to do the interpolation between the row s1 and the row s2
+ // into this intermediate buffer, then later interpolate between two pixel of this buffer.
+ //
+ // buffer_rb is a buffer of red-blue component of the pixel, in the form 0x00RR00BB
+ // buffer_ag is the alpha-green component of the pixel, in the form 0x00AA00GG
+ // +1 for the last pixel to interpolate with, and +1 for rounding errors.
+ quint32 buffer_rb[BufferSize+2];
+ quint32 buffer_ag[BufferSize+2];
+};
+
struct QDitherInfo {
int x;
int y;
};
-typedef const uint *(QT_FASTCALL *ConvertFunc)(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *clut, QDitherInfo *dither);
+typedef const uint *(QT_FASTCALL *FetchAndConvertPixelsFunc)(uint *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *clut, QDitherInfo *dither);
+typedef void (QT_FASTCALL *ConvertAndStorePixelsFunc)(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *clut, QDitherInfo *dither);
+
+typedef void (QT_FASTCALL *ConvertFunc)(uint *buffer, int count, const QVector<QRgb> *clut);
typedef const QRgba64 *(QT_FASTCALL *ConvertFunc64)(QRgba64 *buffer, const uint *src, int count,
const QVector<QRgb> *clut, QDitherInfo *dither);
+typedef void (QT_FASTCALL *RbSwapFunc)(uchar *dst, const uchar *src, int count);
+
struct QPixelLayout
{
@@ -1229,29 +1252,18 @@ struct QPixelLayout
BPPCount
};
- // All numbers in bits.
- uchar redWidth;
- uchar redShift;
- uchar greenWidth;
- uchar greenShift;
- uchar blueWidth;
- uchar blueShift;
- uchar alphaWidth;
- uchar alphaShift;
+ bool hasAlphaChannel;
bool premultiplied;
BPP bpp;
+ RbSwapFunc rbSwap;
ConvertFunc convertToARGB32PM;
- ConvertFunc convertFromARGB32PM;
- ConvertFunc convertFromRGB32;
ConvertFunc64 convertToARGB64PM;
+ FetchAndConvertPixelsFunc fetchToARGB32PM;
+ ConvertAndStorePixelsFunc storeFromARGB32PM;
+ ConvertAndStorePixelsFunc storeFromRGB32;
};
-typedef const uint *(QT_FASTCALL *FetchPixelsFunc)(uint *buffer, const uchar *src, int index, int count);
-typedef void (QT_FASTCALL *StorePixelsFunc)(uchar *dest, const uint *src, int index, int count);
-
extern QPixelLayout qPixelLayouts[QImage::NImageFormats];
-extern const FetchPixelsFunc qFetchPixels[QPixelLayout::BPPCount];
-extern StorePixelsFunc qStorePixels[QPixelLayout::BPPCount];
extern MemRotateFunc qMemRotateFunctions[QPixelLayout::BPPCount][3];
diff --git a/src/gui/painting/qdrawhelper_sse4.cpp b/src/gui/painting/qdrawhelper_sse4.cpp
index 14bfaabf09..0b6f963168 100644
--- a/src/gui/painting/qdrawhelper_sse4.cpp
+++ b/src/gui/painting/qdrawhelper_sse4.cpp
@@ -39,13 +39,14 @@
#include <private/qdrawhelper_p.h>
#include <private/qdrawingprimitive_sse2_p.h>
+#include <private/qpaintengine_raster_p.h>
#if defined(QT_COMPILER_SUPPORTS_SSE4_1)
QT_BEGIN_NAMESPACE
template<bool RGBA>
-static inline void convertARGBToARGB32PM_sse4(uint *buffer, const uint *src, int count)
+static void convertARGBToARGB32PM_sse4(uint *buffer, const uint *src, int count)
{
int i = 0;
const __m128i alphaMask = _mm_set1_epi32(0xff000000);
@@ -83,7 +84,7 @@ static inline void convertARGBToARGB32PM_sse4(uint *buffer, const uint *src, int
_mm_storeu_si128((__m128i *)&buffer[i], srcVector);
}
} else {
- _mm_storeu_si128((__m128i *)&buffer[i], _mm_setzero_si128());
+ _mm_storeu_si128((__m128i *)&buffer[i], zero);
}
}
@@ -93,59 +94,250 @@ static inline void convertARGBToARGB32PM_sse4(uint *buffer, const uint *src, int
}
}
-const uint *QT_FASTCALL convertARGB32ToARGB32PM_sse4(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+static inline __m128 reciprocal_mul_ps(__m128 a, float mul)
{
- convertARGBToARGB32PM_sse4<false>(buffer, src, count);
- return buffer;
+ __m128 ia = _mm_rcp_ps(a); // Approximate 1/a
+ // Improve precision of ia using Newton-Raphson
+ ia = _mm_sub_ps(_mm_add_ps(ia, ia), _mm_mul_ps(ia, _mm_mul_ps(ia, a)));
+ ia = _mm_mul_ps(ia, _mm_set1_ps(mul));
+ return ia;
}
-const uint *QT_FASTCALL convertRGBA8888ToARGB32PM_sse4(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+template<bool RGBA, bool RGBx>
+static inline void convertARGBFromARGB32PM_sse4(uint *buffer, const uint *src, int count)
{
- convertARGBToARGB32PM_sse4<true>(buffer, src, count);
- return buffer;
+ int i = 0;
+ const __m128i alphaMask = _mm_set1_epi32(0xff000000);
+ const __m128i rgbaMask = _mm_setr_epi8(2, 1, 0, 3, 6, 5, 4, 7, 10, 9, 8, 11, 14, 13, 12, 15);
+ const __m128i zero = _mm_setzero_si128();
+
+ for (; i < count - 3; i += 4) {
+ __m128i srcVector = _mm_loadu_si128((const __m128i *)&src[i]);
+ if (!_mm_testz_si128(srcVector, alphaMask)) {
+ if (!_mm_testc_si128(srcVector, alphaMask)) {
+ __m128i srcVectorAlpha = _mm_srli_epi32(srcVector, 24);
+ if (RGBA)
+ srcVector = _mm_shuffle_epi8(srcVector, rgbaMask);
+ const __m128 a = _mm_cvtepi32_ps(srcVectorAlpha);
+ const __m128 ia = reciprocal_mul_ps(a, 255.0f);
+ __m128i src1 = _mm_unpacklo_epi8(srcVector, zero);
+ __m128i src3 = _mm_unpackhi_epi8(srcVector, zero);
+ __m128i src2 = _mm_unpackhi_epi16(src1, zero);
+ __m128i src4 = _mm_unpackhi_epi16(src3, zero);
+ src1 = _mm_unpacklo_epi16(src1, zero);
+ src3 = _mm_unpacklo_epi16(src3, zero);
+ __m128 ia1 = _mm_shuffle_ps(ia, ia, _MM_SHUFFLE(0, 0, 0, 0));
+ __m128 ia2 = _mm_shuffle_ps(ia, ia, _MM_SHUFFLE(1, 1, 1, 1));
+ __m128 ia3 = _mm_shuffle_ps(ia, ia, _MM_SHUFFLE(2, 2, 2, 2));
+ __m128 ia4 = _mm_shuffle_ps(ia, ia, _MM_SHUFFLE(3, 3, 3, 3));
+ src1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_cvtepi32_ps(src1), ia1));
+ src2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_cvtepi32_ps(src2), ia2));
+ src3 = _mm_cvtps_epi32(_mm_mul_ps(_mm_cvtepi32_ps(src3), ia3));
+ src4 = _mm_cvtps_epi32(_mm_mul_ps(_mm_cvtepi32_ps(src4), ia4));
+ src1 = _mm_packus_epi32(src1, src2);
+ src3 = _mm_packus_epi32(src3, src4);
+ src1 = _mm_packus_epi16(src1, src3);
+ // Handle potential alpha == 0 values:
+ __m128i srcVectorAlphaMask = _mm_cmpeq_epi32(srcVectorAlpha, zero);
+ src1 = _mm_andnot_si128(srcVectorAlphaMask, src1);
+ // Fixup alpha values:
+ if (RGBx)
+ srcVector = _mm_or_si128(src1, alphaMask);
+ else
+ srcVector = _mm_blendv_epi8(src1, srcVector, alphaMask);
+ _mm_storeu_si128((__m128i *)&buffer[i], srcVector);
+ } else {
+ if (RGBA)
+ _mm_storeu_si128((__m128i *)&buffer[i], _mm_shuffle_epi8(srcVector, rgbaMask));
+ else if (buffer != src)
+ _mm_storeu_si128((__m128i *)&buffer[i], srcVector);
+ }
+ } else {
+ if (RGBx)
+ _mm_storeu_si128((__m128i *)&buffer[i], alphaMask);
+ else
+ _mm_storeu_si128((__m128i *)&buffer[i], zero);
+ }
+ }
+
+ SIMD_EPILOGUE(i, count, 3) {
+ uint v = qUnpremultiply_sse4(src[i]);
+ if (RGBx)
+ v = 0xff000000 | v;
+ if (RGBA)
+ v = ARGB2RGBA(v);
+ buffer[i] = v;
+ }
}
-const uint *QT_FASTCALL convertARGB32FromARGB32PM_sse4(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+template<bool RGBA>
+static inline void convertARGBFromRGBA64PM_sse4(uint *buffer, const QRgba64 *src, int count)
{
- for (int i = 0; i < count; ++i)
- buffer[i] = qUnpremultiply_sse4(src[i]);
- return buffer;
+ int i = 0;
+ const __m128i alphaMask = _mm_set1_epi64x(Q_UINT64_C(0xffff) << 48);
+ const __m128i alphaMask32 = _mm_set1_epi32(0xff000000);
+ const __m128i rgbaMask = _mm_setr_epi8(2, 1, 0, 3, 6, 5, 4, 7, 10, 9, 8, 11, 14, 13, 12, 15);
+ const __m128i zero = _mm_setzero_si128();
+
+ for (; i < count - 3; i += 4) {
+ __m128i srcVector1 = _mm_loadu_si128((const __m128i *)&src[i]);
+ __m128i srcVector2 = _mm_loadu_si128((const __m128i *)&src[i + 2]);
+ bool transparent1 = _mm_testz_si128(srcVector1, alphaMask);
+ bool opaque1 = _mm_testc_si128(srcVector1, alphaMask);
+ bool transparent2 = _mm_testz_si128(srcVector2, alphaMask);
+ bool opaque2 = _mm_testc_si128(srcVector2, alphaMask);
+
+ if (!(transparent1 && transparent2)) {
+ if (!(opaque1 && opaque2)) {
+ __m128i srcVector1Alpha = _mm_srli_epi64(srcVector1, 48);
+ __m128i srcVector2Alpha = _mm_srli_epi64(srcVector2, 48);
+ __m128i srcVectorAlpha = _mm_packus_epi32(srcVector1Alpha, srcVector2Alpha);
+ const __m128 a = _mm_cvtepi32_ps(srcVectorAlpha);
+ // Convert srcVectorAlpha to final 8-bit alpha channel
+ srcVectorAlpha = _mm_add_epi32(srcVectorAlpha, _mm_set1_epi32(128));
+ srcVectorAlpha = _mm_sub_epi32(srcVectorAlpha, _mm_srli_epi32(srcVectorAlpha, 8));
+ srcVectorAlpha = _mm_srli_epi32(srcVectorAlpha, 8);
+ srcVectorAlpha = _mm_slli_epi32(srcVectorAlpha, 24);
+ const __m128 ia = reciprocal_mul_ps(a, 255.0f);
+ __m128i src1 = _mm_unpacklo_epi16(srcVector1, zero);
+ __m128i src2 = _mm_unpackhi_epi16(srcVector1, zero);
+ __m128i src3 = _mm_unpacklo_epi16(srcVector2, zero);
+ __m128i src4 = _mm_unpackhi_epi16(srcVector2, zero);
+ __m128 ia1 = _mm_shuffle_ps(ia, ia, _MM_SHUFFLE(0, 0, 0, 0));
+ __m128 ia2 = _mm_shuffle_ps(ia, ia, _MM_SHUFFLE(1, 1, 1, 1));
+ __m128 ia3 = _mm_shuffle_ps(ia, ia, _MM_SHUFFLE(2, 2, 2, 2));
+ __m128 ia4 = _mm_shuffle_ps(ia, ia, _MM_SHUFFLE(3, 3, 3, 3));
+ src1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_cvtepi32_ps(src1), ia1));
+ src2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_cvtepi32_ps(src2), ia2));
+ src3 = _mm_cvtps_epi32(_mm_mul_ps(_mm_cvtepi32_ps(src3), ia3));
+ src4 = _mm_cvtps_epi32(_mm_mul_ps(_mm_cvtepi32_ps(src4), ia4));
+ src1 = _mm_packus_epi32(src1, src2);
+ src3 = _mm_packus_epi32(src3, src4);
+ // Handle potential alpha == 0 values:
+ __m128i srcVector1AlphaMask = _mm_cmpeq_epi64(srcVector1Alpha, zero);
+ __m128i srcVector2AlphaMask = _mm_cmpeq_epi64(srcVector2Alpha, zero);
+ src1 = _mm_andnot_si128(srcVector1AlphaMask, src1);
+ src3 = _mm_andnot_si128(srcVector2AlphaMask, src3);
+ src1 = _mm_packus_epi16(src1, src3);
+ // Fixup alpha values:
+ src1 = _mm_blendv_epi8(src1, srcVectorAlpha, alphaMask32);
+ // Fix RGB order
+ if (!RGBA)
+ src1 = _mm_shuffle_epi8(src1, rgbaMask);
+ _mm_storeu_si128((__m128i *)&buffer[i], src1);
+ } else {
+ __m128i src1 = _mm_unpacklo_epi16(srcVector1, zero);
+ __m128i src2 = _mm_unpackhi_epi16(srcVector1, zero);
+ __m128i src3 = _mm_unpacklo_epi16(srcVector2, zero);
+ __m128i src4 = _mm_unpackhi_epi16(srcVector2, zero);
+ src1 = _mm_add_epi32(src1, _mm_set1_epi32(128));
+ src2 = _mm_add_epi32(src2, _mm_set1_epi32(128));
+ src3 = _mm_add_epi32(src3, _mm_set1_epi32(128));
+ src4 = _mm_add_epi32(src4, _mm_set1_epi32(128));
+ src1 = _mm_sub_epi32(src1, _mm_srli_epi32(src1, 8));
+ src2 = _mm_sub_epi32(src2, _mm_srli_epi32(src2, 8));
+ src3 = _mm_sub_epi32(src3, _mm_srli_epi32(src3, 8));
+ src4 = _mm_sub_epi32(src4, _mm_srli_epi32(src4, 8));
+ src1 = _mm_srli_epi32(src1, 8);
+ src2 = _mm_srli_epi32(src2, 8);
+ src3 = _mm_srli_epi32(src3, 8);
+ src4 = _mm_srli_epi32(src4, 8);
+ src1 = _mm_packus_epi32(src1, src2);
+ src3 = _mm_packus_epi32(src3, src4);
+ src1 = _mm_packus_epi16(src1, src3);
+ if (!RGBA)
+ src1 = _mm_shuffle_epi8(src1, rgbaMask);
+ _mm_storeu_si128((__m128i *)&buffer[i], src1);
+ }
+ } else {
+ _mm_storeu_si128((__m128i *)&buffer[i], zero);
+ }
+ }
+
+ SIMD_EPILOGUE(i, count, 3) {
+ buffer[i] = qConvertRgba64ToRgb32_sse4<RGBA ? PixelOrderRGB : PixelOrderBGR>(src[i]);
+ }
}
-const uint *QT_FASTCALL convertRGBA8888FromARGB32PM_sse4(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+void QT_FASTCALL convertARGB32ToARGB32PM_sse4(uint *buffer, int count, const QVector<QRgb> *)
{
- for (int i = 0; i < count; ++i)
- buffer[i] = ARGB2RGBA(qUnpremultiply_sse4(src[i]));
+ convertARGBToARGB32PM_sse4<false>(buffer, buffer, count);
+}
+
+void QT_FASTCALL convertRGBA8888ToARGB32PM_sse4(uint *buffer, int count, const QVector<QRgb> *)
+{
+ convertARGBToARGB32PM_sse4<true>(buffer, buffer, count);
+}
+
+const uint *QT_FASTCALL fetchARGB32ToARGB32PM_sse4(uint *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ convertARGBToARGB32PM_sse4<false>(buffer, reinterpret_cast<const uint *>(src) + index, count);
return buffer;
}
-const uint *QT_FASTCALL convertRGBXFromARGB32PM_sse4(uint *buffer, const uint *src, int count,
+const uint *QT_FASTCALL fetchRGBA8888ToARGB32PM_sse4(uint *buffer, const uchar *src, int index, int count,
const QVector<QRgb> *, QDitherInfo *)
{
- for (int i = 0; i < count; ++i)
- buffer[i] = ARGB2RGBA(0xff000000 | qUnpremultiply_sse4(src[i]));
+ convertARGBToARGB32PM_sse4<true>(buffer, reinterpret_cast<const uint *>(src) + index, count);
return buffer;
}
+void QT_FASTCALL storeRGB32FromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ uint *d = reinterpret_cast<uint *>(dest) + index;
+ convertARGBFromARGB32PM_sse4<false,true>(d, src, count);
+}
+
+void QT_FASTCALL storeARGB32FromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ uint *d = reinterpret_cast<uint *>(dest) + index;
+ convertARGBFromARGB32PM_sse4<false,false>(d, src, count);
+}
+
+void QT_FASTCALL storeRGBA8888FromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ uint *d = reinterpret_cast<uint *>(dest) + index;
+ convertARGBFromARGB32PM_sse4<true,false>(d, src, count);
+}
+
+void QT_FASTCALL storeRGBXFromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ uint *d = reinterpret_cast<uint *>(dest) + index;
+ convertARGBFromARGB32PM_sse4<true,true>(d, src, count);
+}
+
template<QtPixelOrder PixelOrder>
-const uint *QT_FASTCALL convertA2RGB30PMFromARGB32PM_sse4(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *)
+void QT_FASTCALL storeA2RGB30PMFromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
{
+ uint *d = reinterpret_cast<uint *>(dest) + index;
for (int i = 0; i < count; ++i)
- buffer[i] = qConvertArgb32ToA2rgb30_sse4<PixelOrder>(src[i]);
- return buffer;
+ d[i] = qConvertArgb32ToA2rgb30_sse4<PixelOrder>(src[i]);
+}
+
+void QT_FASTCALL destStore64ARGB32_sse4(QRasterBuffer *rasterBuffer, int x, int y, const QRgba64 *buffer, int length)
+{
+ uint *dest = (uint*)rasterBuffer->scanLine(y) + x;
+ convertARGBFromRGBA64PM_sse4<false>(dest, buffer, length);
+}
+
+void QT_FASTCALL destStore64RGBA8888_sse4(QRasterBuffer *rasterBuffer, int x, int y, const QRgba64 *buffer, int length)
+{
+ uint *dest = (uint*)rasterBuffer->scanLine(y) + x;
+ convertARGBFromRGBA64PM_sse4<true>(dest, buffer, length);
}
template
-const uint *QT_FASTCALL convertA2RGB30PMFromARGB32PM_sse4<PixelOrderBGR>(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *);
+void QT_FASTCALL storeA2RGB30PMFromARGB32PM_sse4<PixelOrderBGR>(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *);
template
-const uint *QT_FASTCALL convertA2RGB30PMFromARGB32PM_sse4<PixelOrderRGB>(uint *buffer, const uint *src, int count,
- const QVector<QRgb> *, QDitherInfo *);
+void QT_FASTCALL storeA2RGB30PMFromARGB32PM_sse4<PixelOrderRGB>(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *);
QT_END_NAMESPACE
diff --git a/src/gui/painting/qdrawhelper_ssse3.cpp b/src/gui/painting/qdrawhelper_ssse3.cpp
index 45ecc8b422..42d760d5cc 100644
--- a/src/gui/painting/qdrawhelper_ssse3.cpp
+++ b/src/gui/painting/qdrawhelper_ssse3.cpp
@@ -167,61 +167,12 @@ void qt_blend_argb32_on_argb32_ssse3(uchar *destPixels, int dbpl,
}
}
-static inline void store_uint24_ssse3(uchar *dst, const uint *src, int len)
+const uint *QT_FASTCALL fetchPixelsBPP24_ssse3(uint *buffer, const uchar *src, int index, int count)
{
- int i = 0;
-
- quint24 *dst24 = reinterpret_cast<quint24*>(dst);
- // Align dst on 16 bytes
- for (; i < len && (reinterpret_cast<quintptr>(dst24) & 0xf); ++i)
- *dst24++ = quint24(*src++);
-
- // Shuffle masks for first and second half of every output, all outputs are aligned so the shuffled ends are not used.
- const __m128i shuffleMask1 = _mm_setr_epi8(char(0x80), char(0x80), char(0x80), char(0x80), 2, 1, 0, 6, 5, 4, 10, 9, 8, 14, 13, 12);
- const __m128i shuffleMask2 = _mm_setr_epi8(2, 1, 0, 6, 5, 4, 10, 9, 8, 14, 13, 12, char(0x80), char(0x80), char(0x80), char(0x80));
-
- const __m128i *inVectorPtr = (const __m128i *)src;
- __m128i *dstVectorPtr = (__m128i *)dst24;
-
- for (; i < (len - 15); i += 16) {
- // Load four vectors, store three.
- // Create each output vector by combining two shuffled input vectors.
- __m128i srcVector1 = _mm_loadu_si128(inVectorPtr);
- ++inVectorPtr;
- __m128i srcVector2 = _mm_loadu_si128(inVectorPtr);
- ++inVectorPtr;
- __m128i outputVector1 = _mm_shuffle_epi8(srcVector1, shuffleMask1);
- __m128i outputVector2 = _mm_shuffle_epi8(srcVector2, shuffleMask2);
- __m128i outputVector = _mm_alignr_epi8(outputVector2, outputVector1, 4);
- _mm_store_si128(dstVectorPtr, outputVector);
- ++dstVectorPtr;
-
- srcVector1 = _mm_loadu_si128(inVectorPtr);
- ++inVectorPtr;
- outputVector1 = _mm_shuffle_epi8(srcVector2, shuffleMask1);
- outputVector2 = _mm_shuffle_epi8(srcVector1, shuffleMask2);
- outputVector = _mm_alignr_epi8(outputVector2, outputVector1, 8);
- _mm_store_si128(dstVectorPtr, outputVector);
- ++dstVectorPtr;
-
- srcVector2 = _mm_loadu_si128(inVectorPtr);
- ++inVectorPtr;
- outputVector1 = _mm_shuffle_epi8(srcVector1, shuffleMask1);
- outputVector2 = _mm_shuffle_epi8(srcVector2, shuffleMask2);
- outputVector = _mm_alignr_epi8(outputVector2, outputVector1, 12);
- _mm_store_si128(dstVectorPtr, outputVector);
- ++dstVectorPtr;
- }
- dst24 = reinterpret_cast<quint24*>(dstVectorPtr);
- src = reinterpret_cast<const uint*>(inVectorPtr);
-
- SIMD_EPILOGUE(i, len, 15)
- *dst24++ = quint24(*src++);
-}
-
-void QT_FASTCALL storePixelsBPP24_ssse3(uchar *dest, const uint *src, int index, int count)
-{
- store_uint24_ssse3(dest + index * 3, src, count);
+ const quint24 *s = reinterpret_cast<const quint24 *>(src);
+ for (int i = 0; i < count; ++i)
+ buffer[i] = s[index + i];
+ return buffer;
}
extern void QT_FASTCALL qt_convert_rgb888_to_rgb32_ssse3(quint32 *dst, const uchar *src, int len);
diff --git a/src/gui/painting/qdrawingprimitive_sse2_p.h b/src/gui/painting/qdrawingprimitive_sse2_p.h
index 93e4b9f572..b237ea1611 100644
--- a/src/gui/painting/qdrawingprimitive_sse2_p.h
+++ b/src/gui/painting/qdrawingprimitive_sse2_p.h
@@ -43,6 +43,7 @@
#include <QtGui/private/qtguiglobal_p.h>
#include <private/qsimd_p.h>
#include "qdrawhelper_p.h"
+#include "qrgba64_p.h"
#ifdef __SSE2__
@@ -230,21 +231,31 @@ QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
#if QT_COMPILER_SUPPORTS_HERE(SSE4_1)
+QT_FUNCTION_TARGET(SSE2)
+Q_ALWAYS_INLINE void reciprocal_mul_ss(__m128 &ia, const __m128 a, float mul)
+{
+ ia = _mm_rcp_ss(a); // Approximate 1/a
+ // Improve precision of ia using Newton-Raphson
+ ia = _mm_sub_ss(_mm_add_ss(ia, ia), _mm_mul_ss(ia, _mm_mul_ss(ia, a)));
+ ia = _mm_mul_ss(ia, _mm_set_ss(mul));
+ ia = _mm_shuffle_ps(ia, ia, _MM_SHUFFLE(0,0,0,0));
+}
+
QT_FUNCTION_TARGET(SSE4_1)
inline QRgb qUnpremultiply_sse4(QRgb p)
{
const uint alpha = qAlpha(p);
- if (alpha == 255 || alpha == 0)
+ if (alpha == 255)
return p;
- const uint invAlpha = qt_inv_premul_factor[alpha];
- const __m128i via = _mm_set1_epi32(invAlpha);
- const __m128i vr = _mm_set1_epi32(0x8000);
+ if (alpha == 0)
+ return 0;
+ const __m128 va = _mm_set1_ps(alpha);
+ __m128 via;
+ reciprocal_mul_ss(via, va, 255.0f); // Approximate 1/a
__m128i vl = _mm_cvtepu8_epi32(_mm_cvtsi32_si128(p));
- vl = _mm_mullo_epi32(vl, via);
- vl = _mm_add_epi32(vl, vr);
- vl = _mm_srai_epi32(vl, 16);
- vl = _mm_insert_epi32(vl, alpha, 3);
+ vl = _mm_cvtps_epi32(_mm_mul_ps(_mm_cvtepi32_ps(vl), via));
vl = _mm_packus_epi32(vl, vl);
+ vl = _mm_insert_epi16(vl, alpha, 3);
vl = _mm_packus_epi16(vl, vl);
return _mm_cvtsi128_si32(vl);
}
@@ -258,21 +269,14 @@ inline uint qConvertArgb32ToA2rgb30_sse4(QRgb p)
return qConvertRgb32ToRgb30<PixelOrder>(p);
if (alpha == 0)
return 0;
- Q_CONSTEXPR uint mult = 255 / (255 >> 6);
- const uint invAlpha = qt_inv_premul_factor[alpha];
+ Q_CONSTEXPR float mult = 1023.0f / (255 >> 6);
const uint newalpha = (alpha >> 6);
- const __m128i via = _mm_set1_epi32(invAlpha);
- const __m128i vna = _mm_set1_epi32(mult * newalpha);
- const __m128i vr1 = _mm_set1_epi32(0x1000);
- const __m128i vr2 = _mm_set1_epi32(0x80);
- __m128i vl = _mm_cvtepu8_epi32(_mm_cvtsi32_si128(p));
- vl = _mm_mullo_epi32(vl, via);
- vl = _mm_add_epi32(vl, vr1);
- vl = _mm_srli_epi32(vl, 14);
- vl = _mm_mullo_epi32(vl, vna);
- vl = _mm_add_epi32(vl, _mm_srli_epi32(vl, 8));
- vl = _mm_add_epi32(vl, vr2);
- vl = _mm_srli_epi32(vl, 8);
+ const __m128 va = _mm_set1_ps(alpha);
+ __m128 via;
+ reciprocal_mul_ss(via, va, mult * newalpha);
+ __m128i vl = _mm_cvtsi32_si128(p);
+ vl = _mm_cvtepu8_epi32(vl);
+ vl = _mm_cvtps_epi32(_mm_mul_ps(_mm_cvtepi32_ps(vl), via));
vl = _mm_packus_epi32(vl, vl);
uint rgb30 = (newalpha << 30);
rgb30 |= ((uint)_mm_extract_epi16(vl, 1)) << 10;
@@ -285,6 +289,27 @@ inline uint qConvertArgb32ToA2rgb30_sse4(QRgb p)
}
return rgb30;
}
+
+template<enum QtPixelOrder PixelOrder>
+QT_FUNCTION_TARGET(SSE4_1)
+inline uint qConvertRgba64ToRgb32_sse4(QRgba64 p)
+{
+ if (p.isTransparent())
+ return 0;
+ __m128i vl = _mm_loadl_epi64(reinterpret_cast<const __m128i *>(&p));
+ if (!p.isOpaque()) {
+ const __m128 va = _mm_set1_ps(p.alpha());
+ __m128 via;
+ reciprocal_mul_ss(via, va, 65535.0f);
+ vl = _mm_unpacklo_epi16(vl, _mm_setzero_si128());
+ vl = _mm_cvtps_epi32(_mm_mul_ps(_mm_cvtepi32_ps(vl) , via));
+ vl = _mm_packus_epi32(vl, vl);
+ vl = _mm_insert_epi16(vl, p.alpha(), 3);
+ }
+ if (PixelOrder == PixelOrderBGR)
+ vl = _mm_shufflelo_epi16(vl, _MM_SHUFFLE(3, 0, 1, 2));
+ return toArgb32(vl);
+}
#endif
QT_END_NAMESPACE
diff --git a/src/gui/painting/qemulationpaintengine.cpp b/src/gui/painting/qemulationpaintengine.cpp
index e6686e3721..0c0df0fb13 100644
--- a/src/gui/painting/qemulationpaintengine.cpp
+++ b/src/gui/painting/qemulationpaintengine.cpp
@@ -74,10 +74,11 @@ QPainterState *QEmulationPaintEngine::createState(QPainterState *orig) const
static inline void combineXForm(QBrush *brush, const QRectF &r)
{
- QTransform t = brush->transform();
- t.translate(r.x(), r.y());
- t.scale(r.width(), r.height());
- brush->setTransform(t);
+ QTransform t(r.width(), 0, 0, r.height(), r.x(), r.y());
+ if (brush->gradient() && brush->gradient()->coordinateMode() != QGradient::ObjectMode)
+ brush->setTransform(t * brush->transform()); // compat mode
+ else
+ brush->setTransform(brush->transform() * t);
}
void QEmulationPaintEngine::fill(const QVectorPath &path, const QBrush &brush)
@@ -96,11 +97,19 @@ void QEmulationPaintEngine::fill(const QVectorPath &path, const QBrush &brush)
if (coMode > QGradient::LogicalMode) {
QBrush copy = brush;
const QPaintDevice *d = real_engine->painter()->device();
- QRectF r = (coMode == QGradient::ObjectBoundingMode) ? path.controlPointRect() : QRectF(0, 0, d->width(), d->height());
+ QRectF r = (coMode == QGradient::StretchToDeviceMode) ? QRectF(0, 0, d->width(), d->height()) : path.controlPointRect();
combineXForm(&copy, r);
real_engine->fill(path, copy);
return;
}
+ } else if (style == Qt::TexturePattern) {
+ qreal dpr = qHasPixmapTexture(brush) ? brush.texture().devicePixelRatioF() : brush.textureImage().devicePixelRatioF();
+ if (!qFuzzyCompare(dpr, 1.0)) {
+ QBrush copy = brush;
+ combineXForm(&copy, QRectF(0, 0, 1.0/dpr, 1.0/dpr));
+ real_engine->fill(path, copy);
+ return;
+ }
}
real_engine->fill(path, brush);
@@ -124,7 +133,7 @@ void QEmulationPaintEngine::stroke(const QVectorPath &path, const QPen &pen)
QGradient::CoordinateMode coMode = brush.gradient()->coordinateMode();
if (coMode > QGradient::LogicalMode) {
const QPaintDevice *d = real_engine->painter()->device();
- QRectF r = (coMode == QGradient::ObjectBoundingMode) ? path.controlPointRect() : QRectF(0, 0, d->width(), d->height());
+ QRectF r = (coMode == QGradient::StretchToDeviceMode) ? QRectF(0, 0, d->width(), d->height()) : path.controlPointRect();
combineXForm(&brush, r);
copy.setBrush(brush);
real_engine->stroke(path, copy);
@@ -166,9 +175,9 @@ void QEmulationPaintEngine::drawTextItem(const QPointF &p, const QTextItem &text
QBrush copy = s->pen.brush();
const QPaintDevice *d = real_engine->painter()->device();
const QTextItemInt &ti = static_cast<const QTextItemInt &>(textItem);
- QRectF r = (g.coordinateMode() == QGradient::ObjectBoundingMode) ?
- QRectF(p.x(), p.y() - ti.ascent.toReal(), ti.width.toReal(), (ti.ascent + ti.descent + 1).toReal()) :
- QRectF(0, 0, d->width(), d->height());
+ QRectF r = (g.coordinateMode() == QGradient::StretchToDeviceMode) ?
+ QRectF(0, 0, d->width(), d->height()) :
+ QRectF(p.x(), p.y() - ti.ascent.toReal(), ti.width.toReal(), (ti.ascent + ti.descent + 1).toReal());
combineXForm(&copy, r);
g.setCoordinateMode(QGradient::LogicalMode);
QBrush brush(g);
diff --git a/src/gui/painting/qpagedpaintdevice.cpp b/src/gui/painting/qpagedpaintdevice.cpp
index 1c7d6471b6..613a686848 100644
--- a/src/gui/painting/qpagedpaintdevice.cpp
+++ b/src/gui/painting/qpagedpaintdevice.cpp
@@ -42,6 +42,41 @@
QT_BEGIN_NAMESPACE
+class QDummyPagedPaintDevicePrivate : public QPagedPaintDevicePrivate
+{
+ bool setPageLayout(const QPageLayout &newPageLayout) override
+ {
+ m_pageLayout = newPageLayout;
+ return m_pageLayout.isEquivalentTo(newPageLayout);
+ }
+
+ bool setPageSize(const QPageSize &pageSize) override
+ {
+ m_pageLayout.setPageSize(pageSize);
+ return m_pageLayout.pageSize().isEquivalentTo(pageSize);
+ }
+
+ bool setPageOrientation(QPageLayout::Orientation orientation) override
+ {
+ m_pageLayout.setOrientation(orientation);
+ return m_pageLayout.orientation() == orientation;
+ }
+
+ bool setPageMargins(const QMarginsF &margins, QPageLayout::Unit units) override
+ {
+ m_pageLayout.setUnits(units);
+ m_pageLayout.setMargins(margins);
+ return m_pageLayout.margins() == margins && m_pageLayout.units() == units;
+ }
+
+ QPageLayout pageLayout() const override
+ {
+ return m_pageLayout;
+ }
+
+ QPageLayout m_pageLayout;
+};
+
QPagedPaintDevicePrivate::~QPagedPaintDevicePrivate()
{
}
@@ -61,9 +96,11 @@ QPagedPaintDevicePrivate::~QPagedPaintDevicePrivate()
/*!
Constructs a new paged paint device.
+
+ \deprecated
*/
QPagedPaintDevice::QPagedPaintDevice()
- : d(new QPagedPaintDevicePrivate)
+ : d(new QDummyPagedPaintDevicePrivate)
{
}
@@ -263,7 +300,7 @@ QPagedPaintDevicePrivate *QPagedPaintDevice::dd()
*/
void QPagedPaintDevice::setPageSize(PageSize size)
{
- d->m_pageLayout.setPageSize(QPageSize(QPageSize::PageSizeId(size)));
+ d->setPageSize(QPageSize(QPageSize::PageSizeId(size)));
}
/*!
@@ -271,7 +308,7 @@ void QPagedPaintDevice::setPageSize(PageSize size)
*/
QPagedPaintDevice::PageSize QPagedPaintDevice::pageSize() const
{
- return PageSize(d->m_pageLayout.pageSize().id());
+ return PageSize(d->pageLayout().pageSize().id());
}
/*!
@@ -282,7 +319,7 @@ QPagedPaintDevice::PageSize QPagedPaintDevice::pageSize() const
*/
void QPagedPaintDevice::setPageSizeMM(const QSizeF &size)
{
- d->m_pageLayout.setPageSize(QPageSize(size, QPageSize::Millimeter));
+ d->setPageSize(QPageSize(size, QPageSize::Millimeter));
}
/*!
@@ -290,7 +327,7 @@ void QPagedPaintDevice::setPageSizeMM(const QSizeF &size)
*/
QSizeF QPagedPaintDevice::pageSizeMM() const
{
- return d->m_pageLayout.pageSize().size(QPageSize::Millimeter);
+ return d->pageLayout().pageSize().size(QPageSize::Millimeter);
}
/*!
@@ -305,8 +342,7 @@ QSizeF QPagedPaintDevice::pageSizeMM() const
*/
void QPagedPaintDevice::setMargins(const Margins &margins)
{
- d->m_pageLayout.setUnits(QPageLayout::Millimeter);
- d->m_pageLayout.setMargins(QMarginsF(margins.left, margins.top, margins.right, margins.bottom));
+ d->setPageMargins(QMarginsF(margins.left, margins.top, margins.right, margins.bottom), QPageLayout::Millimeter);
}
/*!
@@ -318,7 +354,7 @@ void QPagedPaintDevice::setMargins(const Margins &margins)
*/
QPagedPaintDevice::Margins QPagedPaintDevice::margins() const
{
- QMarginsF margins = d->m_pageLayout.margins(QPageLayout::Millimeter);
+ QMarginsF margins = d->pageLayout().margins(QPageLayout::Millimeter);
Margins result;
result.left = margins.left();
result.top = margins.top();
@@ -413,7 +449,7 @@ bool QPagedPaintDevice::setPageOrientation(QPageLayout::Orientation orientation)
bool QPagedPaintDevice::setPageMargins(const QMarginsF &margins)
{
- return d->setPageMargins(margins);
+ return setPageMargins(margins, pageLayout().units());
}
/*!
@@ -458,23 +494,30 @@ QPageLayout QPagedPaintDevice::pageLayout() const
/*!
\internal
+ \deprecated
+
Returns the internal device page layout.
*/
QPageLayout QPagedPaintDevice::devicePageLayout() const
{
- return d->m_pageLayout;
+ qWarning("QPagedPaintDevice::devicePageLayout() is deprecated, just use QPagedPaintDevice::pageLayout()");
+ return d->pageLayout();
}
/*!
\internal
+ \deprecated
+
Returns the internal device page layout.
*/
QPageLayout &QPagedPaintDevice::devicePageLayout()
{
- return d->m_pageLayout;
+ qWarning("QPagedPaintDevice::devicePageLayout() is deprecated, you shouldn't be using this at all.");
+ static QPageLayout dummy;
+ return dummy;
}
QT_END_NAMESPACE
diff --git a/src/gui/painting/qpagedpaintdevice.h b/src/gui/painting/qpagedpaintdevice.h
index 66dd6fa8cf..c8957edab8 100644
--- a/src/gui/painting/qpagedpaintdevice.h
+++ b/src/gui/painting/qpagedpaintdevice.h
@@ -55,7 +55,7 @@ class QPagedPaintDevicePrivate;
class Q_GUI_EXPORT QPagedPaintDevice : public QPaintDevice
{
public:
- QPagedPaintDevice();
+ QT_DEPRECATED QPagedPaintDevice();
~QPagedPaintDevice();
virtual bool newPage() = 0;
@@ -243,8 +243,8 @@ public:
protected:
QPagedPaintDevice(QPagedPaintDevicePrivate *dd);
QPagedPaintDevicePrivate *dd();
- QPageLayout devicePageLayout() const;
- QPageLayout &devicePageLayout();
+ QT_DEPRECATED QPageLayout devicePageLayout() const;
+ QT_DEPRECATED QPageLayout &devicePageLayout();
friend class QPagedPaintDevicePrivate;
QPagedPaintDevicePrivate *d;
};
diff --git a/src/gui/painting/qpagedpaintdevice_p.h b/src/gui/painting/qpagedpaintdevice_p.h
index a993ea4cac..3a43bd7828 100644
--- a/src/gui/painting/qpagedpaintdevice_p.h
+++ b/src/gui/painting/qpagedpaintdevice_p.h
@@ -60,8 +60,7 @@ class Q_GUI_EXPORT QPagedPaintDevicePrivate
{
public:
QPagedPaintDevicePrivate()
- : m_pageLayout(QPageSize(QPageSize::A4), QPageLayout::Portrait, QMarginsF(0, 0, 0, 0)),
- fromPage(0),
+ : fromPage(0),
toPage(0),
pageOrderAscending(true),
printSelectionOnly(false)
@@ -70,46 +69,19 @@ public:
virtual ~QPagedPaintDevicePrivate();
- // ### Qt6 Remove these and make public class methods virtual
- virtual bool setPageLayout(const QPageLayout &newPageLayout)
- {
- m_pageLayout = newPageLayout;
- return m_pageLayout.isEquivalentTo(newPageLayout);;
- }
- virtual bool setPageSize(const QPageSize &pageSize)
- {
- m_pageLayout.setPageSize(pageSize);
- return m_pageLayout.pageSize().isEquivalentTo(pageSize);
- }
+ virtual bool setPageLayout(const QPageLayout &newPageLayout) = 0;
- virtual bool setPageOrientation(QPageLayout::Orientation orientation)
- {
- m_pageLayout.setOrientation(orientation);
- return m_pageLayout.orientation() == orientation;
- }
+ virtual bool setPageSize(const QPageSize &pageSize) = 0;
- virtual bool setPageMargins(const QMarginsF &margins)
- {
- return setPageMargins(margins, m_pageLayout.units());
- }
+ virtual bool setPageOrientation(QPageLayout::Orientation orientation) = 0;
- virtual bool setPageMargins(const QMarginsF &margins, QPageLayout::Unit units)
- {
- m_pageLayout.setUnits(units);
- m_pageLayout.setMargins(margins);
- return m_pageLayout.margins() == margins && m_pageLayout.units() == units;
- }
+ virtual bool setPageMargins(const QMarginsF &margins, QPageLayout::Unit units) = 0;
- virtual QPageLayout pageLayout() const
- {
- return m_pageLayout;
- }
+ virtual QPageLayout pageLayout() const = 0;
static inline QPagedPaintDevicePrivate *get(QPagedPaintDevice *pd) { return pd->d; }
- QPageLayout m_pageLayout;
-
// These are currently required to keep QPrinter functionality working in QTextDocument::print()
int fromPage;
int toPage;
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 6336b2943e..e0dd789dfd 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -2502,10 +2502,13 @@ void QRasterPaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap,
if (image.depth() == 1)
image = d->rasterBuffer->colorizeBitmap(image, s->pen.color());
- if (s->matrix.type() > QTransform::TxTranslate) {
+ const qreal pixmapDevicePixelRatio = pixmap.devicePixelRatio();
+ if (s->matrix.type() > QTransform::TxTranslate || pixmapDevicePixelRatio > qreal(1.0)) {
QTransform copy = s->matrix;
copy.translate(r.x(), r.y());
copy.translate(-sr.x(), -sr.y());
+ const qreal inverseDpr = qreal(1.0) / pixmapDevicePixelRatio;
+ copy.scale(inverseDpr, inverseDpr);
d->image_filler_xform.clip = d->clip();
d->image_filler_xform.initTexture(&image, s->intOpacity, QTextureData::Tiled);
if (!d->image_filler_xform.blend)
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp
index 0643a7cbb6..9f07af92e4 100644
--- a/src/gui/painting/qpaintengineex.cpp
+++ b/src/gui/painting/qpaintengineex.cpp
@@ -948,6 +948,8 @@ void QPaintEngineEx::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, con
{
QBrush brush(state()->pen.color(), pixmap);
QTransform xform = QTransform::fromTranslate(r.x() - s.x(), r.y() - s.y());
+ if (!qFuzzyCompare(pixmap.devicePixelRatioF(), 1.0))
+ xform.scale(1.0/pixmap.devicePixelRatioF(), 1.0/pixmap.devicePixelRatioF());
brush.setTransform(xform);
qreal pts[] = { r.x(), r.y(),
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index b992e8f55d..41e81c5fbe 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -190,6 +190,13 @@ void QPainterPrivate::checkEmulation()
if (pg && pg->coordinateMode() > QGradient::LogicalMode)
doEmulation = true;
+ if (state->brush.style() == Qt::TexturePattern) {
+ if (qHasPixmapTexture(state->brush))
+ doEmulation |= !qFuzzyCompare(state->brush.texture().devicePixelRatioF(), 1.0);
+ else
+ doEmulation |= !qFuzzyCompare(state->brush.textureImage().devicePixelRatioF(), 1.0);
+ }
+
if (doEmulation && extended->flags() & QPaintEngineEx::DoNotEmulate)
return;
@@ -523,7 +530,10 @@ static inline QBrush stretchGradientToUserSpace(const QBrush &brush, const QRect
g.setCoordinateMode(QGradient::LogicalMode);
QBrush b(g);
- b.setTransform(gradientToUser * b.transform());
+ if (brush.gradient()->coordinateMode() == QGradient::ObjectMode)
+ b.setTransform(b.transform() * gradientToUser);
+ else
+ b.setTransform(gradientToUser * b.transform());
return b;
}
@@ -562,7 +572,7 @@ void QPainterPrivate::drawStretchedGradient(const QPainterPath &path, DrawOperat
} else {
needsFill = true;
- if (brushMode == QGradient::ObjectBoundingMode) {
+ if (brushMode == QGradient::ObjectBoundingMode || brushMode == QGradient::ObjectMode) {
Q_ASSERT(engine->hasFeature(QPaintEngine::PatternTransform));
boundingRect = path.boundingRect();
q->setBrush(stretchGradientToUserSpace(brush, boundingRect));
@@ -606,11 +616,11 @@ void QPainterPrivate::drawStretchedGradient(const QPainterPath &path, DrawOperat
changedBrush = true;
}
- if (penMode == QGradient::ObjectBoundingMode) {
+ if (penMode == QGradient::ObjectBoundingMode || penMode == QGradient::ObjectMode) {
Q_ASSERT(engine->hasFeature(QPaintEngine::PatternTransform));
// avoid computing the bounding rect twice
- if (!needsFill || brushMode != QGradient::ObjectBoundingMode)
+ if (!needsFill || (brushMode != QGradient::ObjectBoundingMode && brushMode != QGradient::ObjectMode))
boundingRect = path.boundingRect();
QPen p = pen;
@@ -842,8 +852,8 @@ void QPainterPrivate::updateEmulationSpecifier(QPainterState *s)
gradientStretch |= (brushMode == QGradient::StretchToDeviceMode);
gradientStretch |= (penMode == QGradient::StretchToDeviceMode);
- objectBoundingMode |= (brushMode == QGradient::ObjectBoundingMode);
- objectBoundingMode |= (penMode == QGradient::ObjectBoundingMode);
+ objectBoundingMode |= (brushMode == QGradient::ObjectBoundingMode || brushMode == QGradient::ObjectMode);
+ objectBoundingMode |= (penMode == QGradient::ObjectBoundingMode || penMode == QGradient::ObjectMode);
}
if (gradientStretch)
s->emulationSpecifier |= QGradient_StretchToDevice;
@@ -6657,6 +6667,16 @@ QRectF QPainter::boundingRect(const QRectF &r, const QString &text, const QTextO
potentially much more efficient depending on the underlying window
system.
+ drawTiledPixmap() will produce the same visual tiling pattern on
+ high-dpi displays (with devicePixelRatio > 1), compared to normal-
+ dpi displays. Set the devicePixelRatio on the \a pixmap to control
+ the tile size. For example, setting it to 2 halves the tile width
+ and height (on both 1x and 2x displays), and produces high-resolution
+ output on 2x displays.
+
+ The \a position offset is always in the painter coordinate system,
+ indepentent of display devicePixelRatio.
+
\sa drawPixmap()
*/
void QPainter::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &sp)
@@ -6840,7 +6860,8 @@ static inline bool needsResolving(const QBrush &brush)
Qt::BrushStyle s = brush.style();
return ((s == Qt::LinearGradientPattern || s == Qt::RadialGradientPattern ||
s == Qt::ConicalGradientPattern) &&
- brush.gradient()->coordinateMode() == QGradient::ObjectBoundingMode);
+ (brush.gradient()->coordinateMode() == QGradient::ObjectBoundingMode ||
+ brush.gradient()->coordinateMode() == QGradient::ObjectMode));
}
/*!
@@ -7068,6 +7089,37 @@ void QPainter::fillRect(const QRectF &r, const QColor &color)
*/
/*!
+ \fn void QPainter::fillRect(int x, int y, int width, int height, QGradient::Preset preset)
+
+ \overload
+
+ Fills the rectangle beginning at (\a{x}, \a{y}) with the given \a
+ width and \a height, using the given gradient \a preset.
+
+ \since 5.12
+*/
+
+/*!
+ \fn void QPainter::fillRect(const QRect &rectangle, QGradient::Preset preset);
+
+ \overload
+
+ Fills the given \a rectangle with the specified gradient \a preset.
+
+ \since 5.12
+*/
+
+/*!
+ \fn void QPainter::fillRect(const QRectF &rectangle, QGradient::Preset preset);
+
+ \overload
+
+ Fills the given \a rectangle with the specified gradient \a preset.
+
+ \since 5.12
+*/
+
+/*!
Sets the given render \a hint on the painter if \a on is true;
otherwise clears the render hint.
diff --git a/src/gui/painting/qpainter.h b/src/gui/painting/qpainter.h
index 12a9c720a8..482f5fb63d 100644
--- a/src/gui/painting/qpainter.h
+++ b/src/gui/painting/qpainter.h
@@ -448,6 +448,10 @@ public:
inline void fillRect(const QRect &r, Qt::BrushStyle style);
inline void fillRect(const QRectF &r, Qt::BrushStyle style);
+ inline void fillRect(int x, int y, int w, int h, QGradient::Preset preset);
+ inline void fillRect(const QRect &r, QGradient::Preset preset);
+ inline void fillRect(const QRectF &r, QGradient::Preset preset);
+
void eraseRect(const QRectF &);
inline void eraseRect(int x, int y, int w, int h);
inline void eraseRect(const QRect &);
@@ -746,6 +750,20 @@ inline void QPainter::fillRect(const QRectF &r, Qt::BrushStyle style)
fillRect(r, QBrush(style));
}
+inline void QPainter::fillRect(int x, int y, int w, int h, QGradient::Preset p)
+{
+ fillRect(QRect(x, y, w, h), QGradient(p));
+}
+
+inline void QPainter::fillRect(const QRect &r, QGradient::Preset p)
+{
+ fillRect(r, QGradient(p));
+}
+
+inline void QPainter::fillRect(const QRectF &r, QGradient::Preset p)
+{
+ fillRect(r, QGradient(p));
+}
inline void QPainter::setBrushOrigin(int x, int y)
{
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index e58f9cee4c..4fd0d3c8fe 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -1109,8 +1109,9 @@ void QPdfEngine::updateState(const QPaintEngineState &state)
d->hasPen = d->pen.style() != Qt::NoPen;
d->stroker.setPen(d->pen, state.renderHints());
QBrush penBrush = d->pen.brush();
+ bool cosmeticPen = qt_pen_is_cosmetic(d->pen, state.renderHints());
bool oldSimple = d->simplePen;
- d->simplePen = (d->hasPen && (penBrush.style() == Qt::SolidPattern) && penBrush.isOpaque() && d->opacity == 1.0);
+ d->simplePen = (d->hasPen && !cosmeticPen && (penBrush.style() == Qt::SolidPattern) && penBrush.isOpaque() && d->opacity == 1.0);
if (oldSimple != d->simplePen)
flags |= DirtyTransform;
} else if (flags & DirtyHints) {
diff --git a/src/gui/painting/qpdfwriter.cpp b/src/gui/painting/qpdfwriter.cpp
index 2f24c7efcb..e6c5cabd7f 100644
--- a/src/gui/painting/qpdfwriter.cpp
+++ b/src/gui/painting/qpdfwriter.cpp
@@ -83,41 +83,28 @@ public:
{
// Try to set the paint engine page layout
pd->engine->setPageLayout(newPageLayout);
- // Set QPagedPaintDevice layout to match the current paint engine layout
- m_pageLayout = pd->engine->pageLayout();
- return m_pageLayout.isEquivalentTo(newPageLayout);
+ return pageLayout().isEquivalentTo(newPageLayout);
}
bool setPageSize(const QPageSize &pageSize) override
{
// Try to set the paint engine page size
pd->engine->setPageSize(pageSize);
- // Set QPagedPaintDevice layout to match the current paint engine layout
- m_pageLayout = pd->engine->pageLayout();
- return m_pageLayout.pageSize().isEquivalentTo(pageSize);
+ return pageLayout().pageSize().isEquivalentTo(pageSize);
}
bool setPageOrientation(QPageLayout::Orientation orientation) override
{
// Set the print engine value
pd->engine->setPageOrientation(orientation);
- // Set QPagedPaintDevice layout to match the current paint engine layout
- m_pageLayout = pd->engine->pageLayout();
- return m_pageLayout.orientation() == orientation;
- }
-
- bool setPageMargins(const QMarginsF &margins) override
- {
- return setPageMargins(margins, pageLayout().units());
+ return pageLayout().orientation() == orientation;
}
bool setPageMargins(const QMarginsF &margins, QPageLayout::Unit units) override
{
// Try to set engine margins
pd->engine->setPageMargins(margins, units);
- // Set QPagedPaintDevice layout to match the current paint engine layout
- m_pageLayout = pd->engine->pageLayout();
- return m_pageLayout.margins() == margins && m_pageLayout.units() == units;
+ return pageLayout().margins() == margins && pageLayout().units() == units;
}
QPageLayout pageLayout() const override
@@ -150,9 +137,6 @@ QPdfWriter::QPdfWriter(const QString &filename)
Q_D(QPdfWriter);
d->engine->setOutputFilename(filename);
-
- // Set QPagedPaintDevice layout to match the current paint engine layout
- devicePageLayout() = d->engine->pageLayout();
}
/*!
@@ -165,9 +149,6 @@ QPdfWriter::QPdfWriter(QIODevice *device)
Q_D(QPdfWriter);
d->engine->d_func()->outDevice = device;
-
- // Set QPagedPaintDevice layout to match the current paint engine layout
- devicePageLayout() = d->engine->pageLayout();
}
/*!
diff --git a/src/gui/painting/qrgba64.h b/src/gui/painting/qrgba64.h
index 2c8f8fa8c4..0e5344cacb 100644
--- a/src/gui/painting/qrgba64.h
+++ b/src/gui/painting/qrgba64.h
@@ -127,6 +127,10 @@ public:
Q_DECL_RELAXED_CONSTEXPR QRgba64 premultiplied() const
{
+ if (isOpaque())
+ return *this;
+ if (isTransparent())
+ return QRgba64::fromRgba64(0);
const quint32 a = alpha();
const quint16 r = div_65535(red() * a);
const quint16 g = div_65535(green() * a);
diff --git a/src/gui/painting/qrgba64_p.h b/src/gui/painting/qrgba64_p.h
index adceda2210..1ed0e82182 100644
--- a/src/gui/painting/qrgba64_p.h
+++ b/src/gui/painting/qrgba64_p.h
@@ -51,10 +51,11 @@
// We mean it.
//
+#include "qrgba64.h"
+#include "qdrawhelper_p.h"
+
+#include <QtCore/private/qsimd_p.h>
#include <QtGui/private/qtguiglobal_p.h>
-#include <QtGui/qrgba64.h>
-#include <QtGui/private/qdrawhelper_p.h>
-#include <private/qsimd_p.h>
QT_BEGIN_NAMESPACE
@@ -159,7 +160,7 @@ Q_ALWAYS_INLINE __m128i interpolate65535(__m128i x, uint alpha1, __m128i y, uint
{
return _mm_add_epi32(multiplyAlpha65535(x, alpha1), multiplyAlpha65535(y, alpha2));
}
-// alpha2 below is const-ref because otherwise MSVC2013 complains that it can't 16-byte align the argument.
+// alpha2 below is const-ref because otherwise MSVC2015 complains that it can't 16-byte align the argument.
Q_ALWAYS_INLINE __m128i interpolate65535(__m128i x, __m128i alpha1, __m128i y, const __m128i &alpha2)
{
return _mm_add_epi32(multiplyAlpha65535(x, alpha1), multiplyAlpha65535(y, alpha2));
@@ -185,7 +186,8 @@ inline QRgba64 addWithSaturation(QRgba64 a, QRgba64 b)
qMin(a.alpha() + b.alpha(), 65535));
}
-#if defined __SSE2__
+#if QT_COMPILER_SUPPORTS_HERE(SSE2)
+QT_FUNCTION_TARGET(SSE2)
Q_ALWAYS_INLINE uint toArgb32(__m128i v)
{
v = _mm_unpacklo_epi16(v, _mm_setzero_si128());
@@ -239,20 +241,6 @@ inline uint toRgba8888(QRgba64 rgba64)
#endif
}
-#if defined(__SSE2__)
-Q_ALWAYS_INLINE __m128i addWithSaturation(__m128i a, __m128i b)
-{
- return _mm_adds_epu16(a, b);
-}
-#endif
-
-#if defined(__ARM_NEON__)
-Q_ALWAYS_INLINE uint16x4_t addWithSaturation(uint16x4_t a, uint16x4_t b)
-{
- return vqmovn_u32(vaddl_u16(a, b));
-}
-#endif
-
inline QRgba64 rgbBlend(QRgba64 d, QRgba64 s, uint rgbAlpha)
{
QRgba64 blend;
diff --git a/src/gui/painting/qt_attribution.json b/src/gui/painting/qt_attribution.json
index 7eb7db4876..9d3debc1b9 100644
--- a/src/gui/painting/qt_attribution.json
+++ b/src/gui/painting/qt_attribution.json
@@ -27,5 +27,19 @@
"Copyright": "Copyright (C) 2004, 2005 Daniel M. Duley.
(C) Carsten Haitzler and various contributors.
(C) Willem Monsuwe <willem@stack.nl>"
+ },
+ {
+ "Id": "webgradients",
+ "Name": "WebGradients",
+ "QDocModule": "qtgui",
+ "QtUsage": "Used in Qt GUI to provide presets for QGradient.",
+ "Files": "webgradients.css",
+
+ "Description": "WebGradients is a free collection of 180 linear gradients.",
+ "Homepage": "https://webgradients.com/",
+ "License": "MIT License",
+ "LicenseId": "MIT",
+ "LicenseFile": "WEBGRADIENTS_LICENSE.txt",
+ "Copyright": "Copyright (c) 2017 itmeo"
}
]
diff --git a/src/gui/painting/webgradients.binaryjson b/src/gui/painting/webgradients.binaryjson
new file mode 100644
index 0000000000..75edd487be
--- /dev/null
+++ b/src/gui/painting/webgradients.binaryjson
Binary files differ
diff --git a/src/gui/painting/webgradients.css b/src/gui/painting/webgradients.css
new file mode 100644
index 0000000000..870866bb46
--- /dev/null
+++ b/src/gui/painting/webgradients.css
@@ -0,0 +1,909 @@
+/*001 Warm Flame*/
+.warm_flame{
+ background-image: linear-gradient(45deg, #ff9a9e 0%, #fad0c4 99%, #fad0c4 100%);
+}
+
+/*002 Night Fade*/
+.night_fade{
+ background-image: linear-gradient(to top, #a18cd1 0%, #fbc2eb 100%);
+}
+
+/*003 Spring Warmth*/
+.spring_warmth{
+ background-image: linear-gradient(to top, #fad0c4 0%, #fad0c4 1%, #ffd1ff 100%);
+}
+
+/*004 Juicy Peach*/
+.juicy_peach{
+ background-image: linear-gradient(to right, #ffecd2 0%, #fcb69f 100%);
+}
+
+/*005 Young Passion*/
+.young_passion{
+ background-image: linear-gradient(to right, #ff8177 0%, #ff867a 0%, #ff8c7f 21%, #f99185 52%, #cf556c 78%, #b12a5b 100%);
+}
+
+/*006 Lady Lips*/
+.lady_lips{
+ background-image: linear-gradient(to top, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
+}
+
+/*007 Sunny Morning*/
+.sunny_morning{
+ background-image: linear-gradient(120deg, #f6d365 0%, #fda085 100%);
+}
+
+/*008 Rainy Ashville*/
+.rainy_ashville{
+ background-image: linear-gradient(to top, #fbc2eb 0%, #a6c1ee 100%);
+}
+
+/*009 Frozen Dreams*/
+.frozen_dreams{
+ background-image: linear-gradient(to top, #fdcbf1 0%, #fdcbf1 1%, #e6dee9 100%);
+}
+
+/*010 Winter Neva*/
+.winter_neva{
+ background-image: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
+}
+
+/*011 Dusty Grass*/
+.dusty_grass{
+ background-image: linear-gradient(120deg, #d4fc79 0%, #96e6a1 100%);
+}
+
+/*012 Tempting Azure*/
+.tempting_azure{
+ background-image: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%);
+}
+
+/*013 Heavy Rain*/
+.heavy_rain{
+ background-image: linear-gradient(to top, #cfd9df 0%, #e2ebf0 100%);
+}
+
+/*014 Amy Crisp*/
+.amy_crisp{
+ background-image: linear-gradient(120deg, #a6c0fe 0%, #f68084 100%);
+}
+
+/*015 Mean Fruit*/
+.mean_fruit{
+ background-image: linear-gradient(120deg, #fccb90 0%, #d57eeb 100%);
+}
+
+/*016 Deep Blue*/
+.deep_blue{
+ background-image: linear-gradient(120deg, #e0c3fc 0%, #8ec5fc 100%);
+}
+
+/*017 Ripe Malinka*/
+.ripe_malinka{
+ background-image: linear-gradient(120deg, #f093fb 0%, #f5576c 100%);
+}
+
+/*018 Cloudy Knoxville*/
+.cloudy_knoxville{
+ background-image: linear-gradient(120deg, #fdfbfb 0%, #ebedee 100%);
+}
+
+/*019 Malibu Beach*/
+.malibu_beach{
+ background-image: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
+}
+
+/*020 New Life*/
+.new_life{
+ background-image: linear-gradient(to right, #43e97b 0%, #38f9d7 100%);
+}
+
+/*021 True Sunset*/
+.true_sunset{
+ background-image: linear-gradient(to right, #fa709a 0%, #fee140 100%);
+}
+
+/*022 Morpheus Den*/
+.morpheus_den{
+ background-image: linear-gradient(to top, #30cfd0 0%, #330867 100%);
+}
+
+/*023 Rare Wind*/
+.rare_wind{
+ background-image: linear-gradient(to top, #a8edea 0%, #fed6e3 100%);
+}
+
+/*024 Near Moon*/
+.near_moon{
+ background-image: linear-gradient(to top, #5ee7df 0%, #b490ca 100%);
+}
+
+/*025 Wild Apple*/
+.wild_apple{
+ background-image: linear-gradient(to top, #d299c2 0%, #fef9d7 100%);
+}
+
+/*026 Saint Petersburg*/
+.saint_petersburg{
+ background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
+}
+
+/*027 Arielle's Smile*/
+.arielles_smile{
+ background-image: radial-gradient(circle 248px at center, #16d9e3 0%, #30c7ec 47%, #46aef7 100%);
+}
+
+/*028 Plum Plate*/
+.plum_plate{
+ background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+}
+
+/*029 Everlasting Sky*/
+.everlasting_sky{
+ background-image: linear-gradient(135deg, #fdfcfb 0%, #e2d1c3 100%);
+}
+
+/*030 Happy Fisher*/
+.happy_fisher{
+ background-image: linear-gradient(120deg, #89f7fe 0%, #66a6ff 100%);
+}
+
+/*031 Blessing*/
+.blessing{
+ background-image: linear-gradient(to top, #fddb92 0%, #d1fdff 100%);
+}
+
+/*032 Sharpeye Eagle*/
+.sharpeye_eagle{
+ background-image: linear-gradient(to top, #9890e3 0%, #b1f4cf 100%);
+}
+
+/*033 Ladoga Bottom*/
+.ladoga_bottom{
+ background-image: linear-gradient(to top, #ebc0fd 0%, #d9ded8 100%);
+}
+
+/*034 Lemon Gate*/
+.lemon_gate{
+ background-image: linear-gradient(to top, #96fbc4 0%, #f9f586 100%);
+}
+
+/*035 Itmeo Branding*/
+.itmeo_branding{
+ background-image: linear-gradient(180deg, #2af598 0%, #009efd 100%);
+}
+
+/*036 Zeus Miracle*/
+.zeus_miracle{
+ background-image: linear-gradient(to top, #cd9cf2 0%, #f6f3ff 100%);
+}
+
+/*037 Old Hat*/
+.old_hat{
+ background-image: linear-gradient(to right, #e4afcb 0%, #b8cbb8 0%, #b8cbb8 0%, #e2c58b 30%, #c2ce9c 64%, #7edbdc 100%);
+}
+
+/*038 Star Wine*/
+.star_wine{
+ background-image: linear-gradient(to right, #b8cbb8 0%, #b8cbb8 0%, #b465da 0%, #cf6cc9 33%, #ee609c 66%, #ee609c 100%);
+}
+
+/*039 Deep Blue*/
+.deep_blue{
+ background-image: linear-gradient(to right, #6a11cb 0%, #2575fc 100%);
+}
+
+/*040 Coup de Grace*/
+.coup_de_grace{
+ background: #DCD9D4 linear-gradient(to bottom, rgba(255, 255, 255, 0.50) 0%, rgba(0, 0, 0, 0.50) 100%), radial-gradient(at 50% 0%, rgba(255, 255, 255, 0.10) 0%, rgba(0, 0, 0, 0.50) 50%);
+ background-blend-mode: soft-light,screen;
+}
+
+/*041 Happy Acid*/
+.happy_acid{
+ background-image: linear-gradient(to top, #37ecba 0%, #72afd3 100%);
+}
+
+/*042 Awesome Pine*/
+.awesome_pine{
+ background-image: linear-gradient(to top, #ebbba7 0%, #cfc7f8 100%);
+}
+
+/*043 New York*/
+.new_york{
+ background-image: linear-gradient(to top, #fff1eb 0%, #ace0f9 100%);
+}
+
+/*044 Shy Rainbow*/
+.shy_rainbow{
+ background-image: linear-gradient(to right, #eea2a2 0%, #bbc1bf 19%, #57c6e1 42%, #b49fda 79%, #7ac5d8 100%);
+}
+
+/*045 Loon Crest*/
+.loon_crest{
+ background: linear-gradient(to bottom, rgba(255,255,255,0.15) 0%, rgba(0,0,0,0.15) 100%), radial-gradient(at top center, rgba(255,255,255,0.40) 0%, rgba(0,0,0,0.40) 120%) #989898;
+ background-blend-mode: multiply,multiply;
+}
+
+/*046 Mixed Hopes*/
+.mixed_hopes{
+ background-image: linear-gradient(to top, #c471f5 0%, #fa71cd 100%);
+}
+
+/*047 Fly High*/
+.fly_high{
+ background-image: linear-gradient(to top, #48c6ef 0%, #6f86d6 100%);
+}
+
+/*048 Strong Bliss*/
+.strong_bliss{
+ background-image: linear-gradient(to right, #f78ca0 0%, #f9748f 19%, #fd868c 60%, #fe9a8b 100%);
+}
+
+/*049 Fresh Milk*/
+.fresh_milk{
+ background-image: linear-gradient(to top, #feada6 0%, #f5efef 100%);
+}
+
+/*050 Snow Again*/
+.snow_again{
+ background-image: linear-gradient(to top, #e6e9f0 0%, #eef1f5 100%);
+}
+
+/*051 February Ink*/
+.february_ink{
+ background-image: linear-gradient(to top, #accbee 0%, #e7f0fd 100%);
+}
+
+/*052 Kind Steel*/
+.kind_steel{
+ background-image: linear-gradient(-20deg, #e9defa 0%, #fbfcdb 100%);
+}
+
+/*053 Soft Grass*/
+.soft_grass{
+ background-image: linear-gradient(to top, #c1dfc4 0%, #deecdd 100%);
+}
+
+/*054 Grown Early*/
+.grown_early{
+ background-image: linear-gradient(to top, #0ba360 0%, #3cba92 100%);
+}
+
+/*055 Sharp Blues*/
+.sharp_blues{
+ background-image: linear-gradient(to top, #00c6fb 0%, #005bea 100%);
+}
+
+/*056 Shady Water*/
+.shady_water{
+ background-image: linear-gradient(to right, #74ebd5 0%, #9face6 100%);
+}
+
+/*057 Dirty Beauty*/
+.dirty_beauty{
+ background-image: linear-gradient(to top, #6a85b6 0%, #bac8e0 100%);
+}
+
+/*058 Great Whale*/
+.great_whale{
+ background-image: linear-gradient(to top, #a3bded 0%, #6991c7 100%);
+}
+
+/*059 Teen Notebook*/
+.teen_notebook{
+ background-image: linear-gradient(to top, #9795f0 0%, #fbc8d4 100%);
+}
+
+/*060 Polite Rumors*/
+.polite_rumors{
+ background-image: linear-gradient(to top, #a7a6cb 0%, #8989ba 52%, #8989ba 100%);
+}
+
+/*061 Sweet Period*/
+.sweet_period{
+ background-image: linear-gradient(to top, #3f51b1 0%, #5a55ae 13%, #7b5fac 25%, #8f6aae 38%, #a86aa4 50%, #cc6b8e 62%, #f18271 75%, #f3a469 87%, #f7c978 100%);
+}
+
+/*062 Wide Matrix*/
+.wide_matrix{
+ background-image: linear-gradient(to top, #fcc5e4 0%, #fda34b 15%, #ff7882 35%, #c8699e 52%, #7046aa 71%, #0c1db8 87%, #020f75 100%);
+}
+
+/*063 Soft Cherish*/
+.soft_cherish{
+ background-image: linear-gradient(to top, #dbdcd7 0%, #dddcd7 24%, #e2c9cc 30%, #e7627d 46%, #b8235a 59%, #801357 71%, #3d1635 84%, #1c1a27 100%);
+}
+
+/*064 Red Salvation*/
+.red_salvation{
+ background-image: linear-gradient(to top, #f43b47 0%, #453a94 100%);
+}
+
+/*065 Burning Spring*/
+.burning_spring{
+ background-image: linear-gradient(to top, #4fb576 0%, #44c489 30%, #28a9ae 46%, #28a2b7 59%, #4c7788 71%, #6c4f63 86%, #432c39 100%);
+}
+
+/*066 Night Party*/
+.night_party{
+ background-image: linear-gradient(to top, #0250c5 0%, #d43f8d 100%);
+}
+
+/*067 Sky Glider*/
+.sky_glider{
+ background-image: linear-gradient(to top, #88d3ce 0%, #6e45e2 100%);
+}
+
+/*068 Heaven Peach*/
+.heaven_peach{
+ background-image: linear-gradient(to top, #d9afd9 0%, #97d9e1 100%);
+}
+
+/*069 Purple Division*/
+.purple_division{
+ background-image: linear-gradient(to top, #7028e4 0%, #e5b2ca 100%);
+}
+
+/*070 Aqua Splash*/
+.aqua_splash{
+ background-image: linear-gradient(15deg, #13547a 0%, #80d0c7 100%);
+}
+
+/*071 Above Clouds*/
+.above_clouds{
+ background-image: linear-gradient(to left, #BDBBBE 0%, #9D9EA3 100%), radial-gradient(88% 271%, rgba(255, 255, 255, 0.25) 0%, rgba(254, 254, 254, 0.25) 1%, rgba(0, 0, 0, 0.25) 100%), radial-gradient(50% 100%, rgba(255, 255, 255, 0.30) 0%, rgba(0, 0, 0, 0.30) 100%);
+ background-blend-mode: normal, lighten, soft-light;
+}
+
+/*072 Spiky Naga*/
+.spiky_naga{
+ background-image: linear-gradient(to top, #505285 0%, #585e92 12%, #65689f 25%, #7474b0 37%, #7e7ebb 50%, #8389c7 62%, #9795d4 75%, #a2a1dc 87%, #b5aee4 100%);
+}
+
+/*073 Love Kiss*/
+.love_kiss{
+ background-image: linear-gradient(to top, #ff0844 0%, #ffb199 100%);
+}
+
+/*074 Sharp Glass*/
+.sharp_glass{
+ background: #C9CCD3 linear-gradient(-180deg, rgba(255, 255, 255, 0.50) 0%, rgba(0, 0, 0, 0.50) 100%);
+ background-blend-mode: lighten;
+}
+
+/*075 Clean Mirror*/
+.clean_mirror{
+ background-image: linear-gradient(45deg, #93a5cf 0%, #e4efe9 100%);
+}
+
+/*076 Premium Dark*/
+.premium_dark{
+ background-image: linear-gradient(to right, #434343 0%, black 100%);
+}
+
+/*077 Cold Evening*/
+.cold_evening{
+ background-image: linear-gradient(to top, #0c3483 0%, #a2b6df 100%, #6b8cce 100%, #a2b6df 100%);
+}
+
+/*078 Cochiti Lake*/
+.cochiti_lake{
+ background-image: linear-gradient(45deg, #93a5cf 0%, #e4efe9 100%);
+}
+
+/*079 Summer Games*/
+.summer_games{
+ background-image: linear-gradient(to right, #92fe9d 0%, #00c9ff 100%);
+}
+
+/*080 Passionate Bed*/
+.passionate_bed{
+ background-image: linear-gradient(to right, #ff758c 0%, #ff7eb3 100%);
+}
+
+/*081 Mountain Rock*/
+.mountain_rock{
+ background-image: linear-gradient(to right, #868f96 0%, #596164 100%);
+}
+
+/*082 Desert Hump*/
+.desert_hump{
+ background-image: linear-gradient(to top, #c79081 0%, #dfa579 100%);
+}
+
+/*083 Jungle Day*/
+.jungle_day{
+ background-image: linear-gradient(45deg, #8baaaa 0%, #ae8b9c 100%);
+}
+
+/*084 Phoenix Start*/
+.phoenix_start{
+ background-image: linear-gradient(to right, #f83600 0%, #f9d423 100%);
+}
+
+/*085 October Silence*/
+.october_silence{
+ background-image: linear-gradient(-20deg, #b721ff 0%, #21d4fd 100%);
+}
+
+/*086 Faraway River*/
+.faraway_river{
+ background-image: linear-gradient(-20deg, #6e45e2 0%, #88d3ce 100%);
+}
+
+/*087 Alchemist Lab*/
+.alchemist_lab{
+ background-image: linear-gradient(-20deg, #d558c8 0%, #24d292 100%);
+}
+
+/*088 Over Sun*/
+.over_sun{
+ background-image: linear-gradient(60deg, #abecd6 0%, #fbed96 100%);
+}
+
+/*089 Premium White*/
+.premium_white{
+ background-image: linear-gradient(to top, #d5d4d0 0%, #d5d4d0 1%, #eeeeec 31%, #efeeec 75%, #e9e9e7 100%);
+}
+
+/*090 Mars Party*/
+.mars_party{
+ background-image: linear-gradient(to top, #5f72bd 0%, #9b23ea 100%);
+}
+
+/*091 Eternal Constance*/
+.eternal_constance{
+ background-image: linear-gradient(to top, #09203f 0%, #537895 100%);
+}
+
+/*092 Japan Blush*/
+.japan_blush{
+ background-image: linear-gradient(-20deg, #ddd6f3 0%, #faaca8 100%, #faaca8 100%);
+}
+
+/*093 Smiling Rain*/
+.smiling_rain{
+ background-image: linear-gradient(-20deg, #dcb0ed 0%, #99c99c 100%);
+}
+
+/*094 Cloudy Apple*/
+.cloudy_apple{
+ background-image: linear-gradient(to top, #f3e7e9 0%, #e3eeff 99%, #e3eeff 100%);
+}
+
+/*095 Big Mango*/
+.big_mango{
+ background-image: linear-gradient(to top, #c71d6f 0%, #d09693 100%);
+}
+
+/*096 Healthy Water*/
+.healthy_water{
+ background-image: linear-gradient(60deg, #96deda 0%, #50c9c3 100%);
+}
+
+/*097 Amour Amour*/
+.amour_amour{
+ background-image: linear-gradient(to top, #f77062 0%, #fe5196 100%);
+}
+
+/*098 Risky Concrete*/
+.risky_concrete{
+ background-image: linear-gradient(to top, #c4c5c7 0%, #dcdddf 52%, #ebebeb 100%);
+}
+
+/*099 Strong Stick*/
+.strong_stick{
+ background-image: linear-gradient(to right, #a8caba 0%, #5d4157 100%);
+}
+
+/*100 Vicious Stance*/
+.vicious_stance{
+ background-image: linear-gradient(60deg, #29323c 0%, #485563 100%);
+}
+
+/*101 Palo Alto*/
+.palo_alto{
+ background-image: linear-gradient(-60deg, #16a085 0%, #f4d03f 100%);
+}
+
+/*102 Happy Memories*/
+.happy_memories{
+ background-image: linear-gradient(-60deg, #ff5858 0%, #f09819 100%);
+}
+
+/*103 Midnight Bloom*/
+.midnight_bloom{
+ background-image: linear-gradient(-20deg, #2b5876 0%, #4e4376 100%);
+}
+
+/*104 Crystalline*/
+.crystalline{
+ background-image: linear-gradient(-20deg, #00cdac 0%, #8ddad5 100%);
+}
+
+/*105 Raccoon Back*/
+.raccoon_back{
+ background: linear-gradient(-180deg, #BCC5CE 0%, #929EAD 98%), radial-gradient(at top left, rgba(255,255,255,0.30) 0%, rgba(0,0,0,0.30) 100%);
+ background-blend-mode: screen;
+}
+
+/*106 Party Bliss*/
+.party_bliss{
+ background-image: linear-gradient(to top, #4481eb 0%, #04befe 100%);
+}
+
+/*107 Confident Cloud*/
+.confident_cloud{
+ background-image: linear-gradient(to top, #dad4ec 0%, #dad4ec 1%, #f3e7e9 100%);
+}
+
+/*108 Le Cocktail*/
+.le_cocktail{
+ background-image: linear-gradient(45deg, #874da2 0%, #c43a30 100%);
+}
+
+/*109 River City*/
+.river_city{
+ background-image: linear-gradient(to top, #4481eb 0%, #04befe 100%);
+}
+
+/*110 Frozen Berry*/
+.frozen_berry{
+ background-image: linear-gradient(to top, #e8198b 0%, #c7eafd 100%);
+}
+
+/*111 Elegance*/
+.elegance{
+ background-image: radial-gradient(73% 147%, #EADFDF 59%, #ECE2DF 100%), radial-gradient(91% 146%, rgba(255,255,255,0.50) 47%, rgba(0,0,0,0.50) 100%);
+ background-blend-mode: screen;
+}
+
+/*112 Child Care*/
+.child_care{
+ background-image: linear-gradient(-20deg, #f794a4 0%, #fdd6bd 100%);
+}
+
+/*113 Flying Lemon*/
+.flying_lemon{
+ background-image: linear-gradient(60deg, #64b3f4 0%, #c2e59c 100%);
+}
+
+/*114 New Retrowave*/
+.new_retrowave{
+ background-image: linear-gradient(to top, #3b41c5 0%, #a981bb 49%, #ffc8a9 100%);
+}
+
+/*115 Hidden Jaguar*/
+.hidden_jaguar{
+ background-image: linear-gradient(to top, #0fd850 0%, #f9f047 100%);
+}
+
+/*116 Above The Sky*/
+.above_the_sky{
+ background-image: linear-gradient(to top, lightgrey 0%, lightgrey 1%, #e0e0e0 26%, #efefef 48%, #d9d9d9 75%, #bcbcbc 100%);
+}
+
+/*117 Nega*/
+.nega{
+ background-image: linear-gradient(45deg, #ee9ca7 0%, #ffdde1 100%);
+}
+
+/*118 Dense Water*/
+.dense_water{
+ background-image: linear-gradient(to right, #3ab5b0 0%, #3d99be 31%, #56317a 100%);
+}
+
+/*119 Chemic Aqua*/
+.chemic_aqua{
+ background: #CDDCDC radial-gradient(at 50% 100%, rgba(255, 255, 255, 0.50) 0%, rgba(0, 0, 0, 0.50) 100%), linear-gradient(to bottom, rgba(255, 255, 255, 0.25) 0%, rgba(0, 0, 0, 0.25) 100%);
+ background-blend-mode: screen, overlay;
+}
+
+/*120 Seashore*/
+.seashore{
+ background-image: linear-gradient(to top, #209cff 0%, #68e0cf 100%);
+}
+
+/*121 Marble Wall*/
+.marble_wall{
+ background-image: linear-gradient(to top, #bdc2e8 0%, #bdc2e8 1%, #e6dee9 100%);
+}
+
+/*122 Cheerful Caramel*/
+.cheerful_caramel{
+ background-image: linear-gradient(to top, #e6b980 0%, #eacda3 100%);
+}
+
+/*123 Night Sky*/
+.night_sky{
+ background-image: linear-gradient(to top, #1e3c72 0%, #1e3c72 1%, #2a5298 100%);
+}
+
+/*124 Magic Lake*/
+.magic_lake{
+ background-image: linear-gradient(to top, #d5dee7 0%, #ffafbd 0%, #c9ffbf 100%);
+}
+
+/*125 Young Grass*/
+.young_grass{
+ background-image: linear-gradient(to top, #9be15d 0%, #00e3ae 100%);
+}
+
+/*126 Colorful Peach*/
+.colorful_peach{
+ background-image: linear-gradient(to right, #ed6ea0 0%, #ec8c69 100%);
+}
+
+/*127 Gentle Care*/
+.gentle_care{
+ background-image: linear-gradient(to right, #ffc3a0 0%, #ffafbd 100%);
+}
+
+/*128 Plum Bath*/
+.plum_bath{
+ background-image: linear-gradient(to top, #cc208e 0%, #6713d2 100%);
+}
+
+/*129 Happy Unicorn*/
+.happy_unicorn{
+ background-image: linear-gradient(to top, #b3ffab 0%, #12fff7 100%);
+}
+
+/*130 Full Metal*/
+.full_metal{
+ background: linear-gradient(to bottom, #D5DEE7 0%, #E8EBF2 50%, #E2E7ED 100%), linear-gradient(to bottom, rgba(0,0,0,0.02) 50%, rgba(255,255,255,0.02) 61%, rgba(0,0,0,0.02) 73%), linear-gradient(33deg, rgba(255,255,255,0.20) 0%, rgba(0,0,0,0.20) 100%);
+ background-blend-mode: normal,color-burn;
+}
+
+/*131 African Field*/
+.african_field{
+ background-image: linear-gradient(to top, #65bd60 0%, #5ac1a8 25%, #3ec6ed 50%, #b7ddb7 75%, #fef381 100%);
+}
+
+/*132 Solid Stone*/
+.solid_stone{
+ background-image: linear-gradient(to right, #243949 0%, #517fa4 100%);
+}
+
+/*133 Orange Juice*/
+.orange_juice{
+ background-image: linear-gradient(-20deg, #fc6076 0%, #ff9a44 100%);
+}
+
+/*134 Glass Water*/
+.glass_water{
+ background-image: linear-gradient(to top, #dfe9f3 0%, white 100%);
+}
+
+/*135 Slick Carbon*/
+.slick_carbon{
+ background: linear-gradient(to bottom, #323232 0%, #3F3F3F 40%, #1C1C1C 150%), linear-gradient(to top, rgba(255,255,255,0.40) 0%, rgba(0,0,0,0.25) 200%);
+ background-blend-mode: multiply;
+}
+
+/*136 North Miracle*/
+.north_miracle{
+ background-image: linear-gradient(to right, #00dbde 0%, #fc00ff 100%);
+}
+
+/*137 Fruit Blend*/
+.fruit_blend{
+ background-image: linear-gradient(to right, #f9d423 0%, #ff4e50 100%);
+}
+
+/*138 Millennium Pine*/
+.millennium_pine{
+ background-image: linear-gradient(to top, #50cc7f 0%, #f5d100 100%);
+}
+
+/*139 High Flight*/
+.high_flight{
+ background-image: linear-gradient(to right, #0acffe 0%, #495aff 100%);
+}
+
+/*140 Mole Hall*/
+.mole_hall{
+ background-image: linear-gradient(-20deg, #616161 0%, #9bc5c3 100%);
+}
+
+/*141 Earl Gray*/
+.earl_gray{
+ background: #E4E4E1 radial-gradient(at top center, rgba(255, 255, 255, 0.03) 0%, rgba(0, 0, 0, 0.03) 100%), linear-gradient(to top, rgba(255, 255, 255, 0.1) 0%, rgba(143, 152, 157, 0.60) 100%);
+ background-blend-mode: normal, multiply;
+}
+
+/*142 Space Shift*/
+.space_shift{
+ background-image: linear-gradient(60deg, #3d3393 0%, #2b76b9 37%, #2cacd1 65%, #35eb93 100%);
+}
+
+/*143 Forest Inei*/
+.forest_inei{
+ background-image: linear-gradient(to top, #df89b5 0%, #bfd9fe 100%);
+}
+
+/*144 Royal Garden*/
+.royal_garden{
+ background-image: linear-gradient(to right, #ed6ea0 0%, #ec8c69 100%);
+}
+
+/*145 Rich Metal*/
+.rich_metal{
+ background-image: linear-gradient(to right, #d7d2cc 0%, #304352 100%);
+}
+
+/*146 Juicy Cake*/
+.juicy_cake{
+ background-image: linear-gradient(to top, #e14fad 0%, #f9d423 100%);
+}
+
+/*147 Smart Indigo*/
+.smart_indigo{
+ background-image: linear-gradient(to top, #b224ef 0%, #7579ff 100%);
+}
+
+/*148 Sand Strike*/
+.sand_strike{
+ background-image: linear-gradient(to right, #c1c161 0%, #c1c161 0%, #d4d4b1 100%);
+}
+
+/*149 Norse Beauty*/
+.norse_beauty{
+ background-image: linear-gradient(to right, #ec77ab 0%, #7873f5 100%);
+}
+
+/*150 Aqua Guidance*/
+.aqua_guidance{
+ background-image: linear-gradient(to top, #007adf 0%, #00ecbc 100%);
+}
+
+/*151 Sun Veggie*/
+.sun_veggie{
+ background-image: linear-gradient(-225deg, #20E2D7 0%, #F9FEA5 100%);
+}
+
+/*152 Sea Lord*/
+.sea_lord{
+ background-image: linear-gradient(-225deg, #2CD8D5 0%, #C5C1FF 56%, #FFBAC3 100%);
+}
+
+/*153 Black Sea*/
+.black_sea{
+ background-image: linear-gradient(-225deg, #2CD8D5 0%, #6B8DD6 48%, #8E37D7 100%);
+}
+
+/*154 Grass Shampoo*/
+.grass_shampoo{
+ background-image: linear-gradient(-225deg, #DFFFCD 0%, #90F9C4 48%, #39F3BB 100%);
+}
+
+/*155 Landing Aircraft*/
+.landing_aircraft{
+ background-image: linear-gradient(-225deg, #5D9FFF 0%, #B8DCFF 48%, #6BBBFF 100%);
+}
+
+/*156 Witch Dance*/
+.witch_dance{
+ background-image: linear-gradient(-225deg, #A8BFFF 0%, #884D80 100%);
+}
+
+/*157 Sleepless Night*/
+.sleepless_night{
+ background-image: linear-gradient(-225deg, #5271C4 0%, #B19FFF 48%, #ECA1FE 100%);
+}
+
+/*158 Angel Care*/
+.angel_care{
+ background-image: linear-gradient(-225deg, #FFE29F 0%, #FFA99F 48%, #FF719A 100%);
+}
+
+/*159 Crystal River*/
+.crystal_river{
+ background-image: linear-gradient(-225deg, #22E1FF 0%, #1D8FE1 48%, #625EB1 100%);
+}
+
+/*160 Soft Lipstick*/
+.soft_lipstick{
+ background-image: linear-gradient(-225deg, #B6CEE8 0%, #F578DC 100%);
+}
+
+/*161 Salt Mountain*/
+.salt_mountain{
+ background-image: linear-gradient(-225deg, #FFFEFF 0%, #D7FFFE 100%);
+}
+
+/*162 Perfect White*/
+.perfect_white{
+ background-image: linear-gradient(-225deg, #E3FDF5 0%, #FFE6FA 100%);
+}
+
+/*163 Fresh Oasis*/
+.fresh_oasis{
+ background-image: linear-gradient(-225deg, #7DE2FC 0%, #B9B6E5 100%);
+}
+
+/*164 Strict November*/
+.strict_november{
+ background-image: linear-gradient(-225deg, #CBBACC 0%, #2580B3 100%);
+}
+
+/*165 Morning Salad*/
+.morning_salad{
+ background-image: linear-gradient(-225deg, #B7F8DB 0%, #50A7C2 100%);
+}
+
+/*166 Deep Relief*/
+.deep_relief{
+ background-image: linear-gradient(-225deg, #7085B6 0%, #87A7D9 50%, #DEF3F8 100%);
+}
+
+/*167 Sea Strike*/
+.sea_strike{
+ background-image: linear-gradient(-225deg, #77FFD2 0%, #6297DB 48%, #1EECFF 100%);
+}
+
+/*168 Night Call*/
+.night_call{
+ background-image: linear-gradient(-225deg, #AC32E4 0%, #7918F2 48%, #4801FF 100%);
+}
+
+/*169 Supreme Sky*/
+.supreme_sky{
+ background-image: linear-gradient(-225deg, #D4FFEC 0%, #57F2CC 48%, #4596FB 100%);
+}
+
+/*170 Light Blue*/
+.light_blue{
+ background-image: linear-gradient(-225deg, #9EFBD3 0%, #57E9F2 48%, #45D4FB 100%);
+}
+
+/*171 Mind Crawl*/
+.mind_crawl{
+ background-image: linear-gradient(-225deg, #473B7B 0%, #3584A7 51%, #30D2BE 100%);
+}
+
+/*172 Lily Meadow*/
+.lily_meadow{
+ background-image: linear-gradient(-225deg, #65379B 0%, #886AEA 53%, #6457C6 100%);
+}
+
+/*173 Sugar Lollipop*/
+.sugar_lollipop{
+ background-image: linear-gradient(-225deg, #A445B2 0%, #D41872 52%, #FF0066 100%);
+}
+
+/*174 Sweet Dessert*/
+.sweet_dessert{
+ background-image: linear-gradient(-225deg, #7742B2 0%, #F180FF 52%, #FD8BD9 100%);
+}
+
+/*175 Magic Ray*/
+.magic_ray{
+ background-image: linear-gradient(-225deg, #FF3CAC 0%, #562B7C 52%, #2B86C5 100%);
+}
+
+/*176 Teen Party*/
+.teen_party{
+ background-image: linear-gradient(-225deg, #FF057C 0%, #8D0B93 50%, #321575 100%);
+}
+
+/*177 Frozen Heat*/
+.frozen_heat{
+ background-image: linear-gradient(-225deg, #FF057C 0%, #7C64D5 48%, #4CC3FF 100%);
+}
+
+/*178 Gagarin View*/
+.gagarin_view{
+ background-image: linear-gradient(-225deg, #69EACB 0%, #EACCF8 48%, #6654F1 100%);
+}
+
+/*179 Fabled Sunset*/
+.fabled_sunset{
+ background-image: linear-gradient(-225deg, #231557 0%, #44107A 29%, #FF1361 67%, #FFF800 100%);
+}
+
+/*180 Perfect Blue*/
+.perfect_blue{
+ background-image: linear-gradient(-225deg, #3D4E81 0%, #5753C9 48%, #6E7FF3 100%);
+}
diff --git a/src/gui/qtgui.tracepoints b/src/gui/qtgui.tracepoints
index aa8a8ede57..2c232a0af8 100644
--- a/src/gui/qtgui.tracepoints
+++ b/src/gui/qtgui.tracepoints
@@ -1,8 +1,10 @@
-qfontdatabase_addapplicationfont(const QString &filename)
-qfontdatabase_load(const QString &family, int pointSize)
-qfontdatabase_loadengine(const QString &family, int pointSize)
-qfontdatabaseprivate_addappfont(const QString &fileName)
-qguiapplicationprivate_init_entry()
-qguiapplicationprivate_init_exit()
-qguiapplicationprivate_processwsevents_entry(int type)
-qguiapplicationprivate_processwsevents_exit(int type)
+QGuiApplicationPrivate_init_entry()
+QGuiApplicationPrivate_init_exit()
+
+QGuiApplicationPrivate_processWindowSystemEvent_entry(int type)
+QGuiApplicationPrivate_processWindowSystemEvent_exit(int type)
+
+QFontDatabase_addApplicationFont(const QString &filename)
+QFontDatabase_load(const QString &family, int pointSize)
+QFontDatabase_loadEngine(const QString &family, int pointSize)
+QFontDatabasePrivate_addAppFont(const QString &fileName)
diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp
index 64adeaa260..70623939e1 100644
--- a/src/gui/text/qcssparser.cpp
+++ b/src/gui/text/qcssparser.cpp
@@ -345,13 +345,6 @@ static const QCssKnownValue styleFeatures[NumKnownStyleFeatures - 1] = {
{ "none", StyleFeature_None }
};
-#if defined(Q_CC_MSVC) && _MSC_VER < 1600
-static bool operator<(const QCssKnownValue &prop1, const QCssKnownValue &prop2)
-{
- return QString::compare(QString::fromLatin1(prop1.name), QLatin1String(prop2.name), Qt::CaseInsensitive) < 0;
-}
-#endif
-
static bool operator<(const QString &name, const QCssKnownValue &prop)
{
return QString::compare(name, QLatin1String(prop.name), Qt::CaseInsensitive) < 0;
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index a4e5130937..196eebb353 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -689,7 +689,6 @@ static void initFontDef(const QtFontDesc &desc, const QFontDef &request, QFontDe
if (!multi)
fontDef->style = desc.style->key.style;
fontDef->fixedPitch = desc.family->fixedPitch;
- fontDef->stretch = desc.style->key.stretch;
fontDef->ignorePitch = false;
}
@@ -1010,7 +1009,7 @@ QFontEngine *loadEngine(int script, const QFontDef &request,
QFontEngine *engine = loadSingleEngine(script, request, family, foundry, style, size);
if (engine && !(request.styleStrategy & QFont::NoFontMerging) && !engine->symbol) {
- Q_TRACE(qfontdatabase_loadengine, request.family, request.pointSize);
+ Q_TRACE(QFontDatabase_loadEngine, request.family, request.pointSize);
QPlatformFontDatabase *pfdb = QGuiApplicationPrivate::platformIntegration()->fontDatabase();
QFontEngineMulti *pfMultiEngine = pfdb->fontEngineMulti(engine, QChar::Script(script));
@@ -2442,7 +2441,7 @@ int QFontDatabasePrivate::addAppFont(const QByteArray &fontData, const QString &
font.data = fontData;
font.fileName = fileName;
- Q_TRACE(qfontdatabaseprivate_addappfont, fileName);
+ Q_TRACE(QFontDatabasePrivate_addAppFont, fileName);
int i;
for (i = 0; i < applicationFonts.count(); ++i)
@@ -2500,7 +2499,7 @@ int QFontDatabase::addApplicationFont(const QString &fileName)
if (!f.open(QIODevice::ReadOnly))
return -1;
- Q_TRACE(qfontdatabase_addapplicationfont, fileName);
+ Q_TRACE(QFontDatabase_addApplicationFont, fileName);
data = f.readAll();
}
@@ -2800,7 +2799,7 @@ void QFontDatabase::load(const QFontPrivate *d, int script)
QFontEngine *fe = nullptr;
- Q_TRACE(qfontdatabase_load, req.family, req.pointSize);
+ Q_TRACE(QFontDatabase_load, req.family, req.pointSize);
req.fallBackFamilies = fallBackFamilies;
if (!req.fallBackFamilies.isEmpty())
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp
index 2f90754274..0026e3edfb 100644
--- a/src/gui/text/qstatictext.cpp
+++ b/src/gui/text/qstatictext.cpp
@@ -39,6 +39,7 @@
#include "qstatictext.h"
#include "qstatictext_p.h"
+#include <qmath.h>
#include <private/qtextengine_p.h>
#include <private/qfontengine_p.h>
#include <qabstracttextdocumentlayout.h>
@@ -611,22 +612,22 @@ void QStaticTextPrivate::paintText(const QPointF &topLeftPosition, QPainter *p,
textLayout.setTextOption(textOption);
textLayout.setCacheEnabled(true);
- qreal leading = QFontMetricsF(font).leading();
- qreal height = -leading;
-
+ qreal height = 0;
textLayout.beginLayout();
while (1) {
QTextLine line = textLayout.createLine();
if (!line.isValid())
break;
+ line.setLeadingIncluded(true);
if (textWidth >= 0.0)
line.setLineWidth(textWidth);
else
line.setLineWidth(QFIXED_MAX);
- height += leading;
line.setPosition(QPointF(0.0, height));
height += line.height();
+ if (line.leading() < 0)
+ height += qCeil(line.leading());
}
textLayout.endLayout();
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index 44d1b2f201..5d8eed409e 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -75,6 +75,18 @@ QT_BEGIN_NAMESPACE
Q_CORE_EXPORT Q_DECL_CONST_FUNCTION unsigned int qt_int_sqrt(unsigned int n);
+
+/*!
+ Returns \c true if the string \a text is likely to be rich text;
+ otherwise returns \c false.
+
+ This function uses a fast and therefore simple heuristic. It
+ mainly checks whether there is something that looks like a tag
+ before the first line break. Although the result may be correct
+ for common cases, there is no guarantee.
+
+ This function is defined in the \c <QTextDocument> header file.
+*/
bool Qt::mightBeRichText(const QString& text)
{
if (text.isEmpty())
@@ -133,6 +145,16 @@ bool Qt::mightBeRichText(const QString& text)
return false;
}
+/*!
+ Converts the plain text string \a plain to an HTML-formatted
+ paragraph while preserving most of its look.
+
+ \a mode defines how whitespace is handled.
+
+ This function is defined in the \c <QTextDocument> header file.
+
+ \sa escape(), mightBeRichText()
+*/
QString Qt::convertFromPlainText(const QString &plain, Qt::WhiteSpaceMode mode)
{
int col = 0;
@@ -181,6 +203,12 @@ QString Qt::convertFromPlainText(const QString &plain, Qt::WhiteSpaceMode mode)
return rich;
}
+/*!
+ \fn QTextCodec *Qt::codecForHtml(const QByteArray &ba)
+ \internal
+
+ This function is defined in the \c <QTextDocument> header file.
+*/
#ifndef QT_NO_TEXTCODEC
QTextCodec *Qt::codecForHtml(const QByteArray &ba)
{
@@ -2908,7 +2936,11 @@ void QTextHtmlExporter::emitBlock(const QTextBlock &block)
html += QLatin1Char('>');
html += QLatin1String("<pre");
} else if (!list) {
- html += QLatin1String("<p");
+ int headingLevel = blockFormat.headingLevel();
+ if (headingLevel > 0 && headingLevel <= 6)
+ html += QLatin1String("<h") + QString::number(headingLevel);
+ else
+ html += QLatin1String("<p");
}
emitBlockAttributes(block);
@@ -2931,8 +2963,13 @@ void QTextHtmlExporter::emitBlock(const QTextBlock &block)
html += QLatin1String("</pre>");
else if (list)
html += QLatin1String("</li>");
- else
- html += QLatin1String("</p>");
+ else {
+ int headingLevel = blockFormat.headingLevel();
+ if (headingLevel > 0 && headingLevel <= 6)
+ html += QLatin1String("</h") + QString::number(headingLevel) + QLatin1Char('>');
+ else
+ html += QLatin1String("</p>");
+ }
if (list) {
if (list->itemNumber(block) == list->count() - 1) { // last item? close list
diff --git a/src/gui/text/qtextdocument.h b/src/gui/text/qtextdocument.h
index 64e39d4648..33c0b48683 100644
--- a/src/gui/text/qtextdocument.h
+++ b/src/gui/text/qtextdocument.h
@@ -70,17 +70,15 @@ class QTextCursor;
template<typename T> class QVector;
-#ifndef Q_CLANG_QDOC
namespace Qt
{
Q_GUI_EXPORT bool mightBeRichText(const QString&);
Q_GUI_EXPORT QString convertFromPlainText(const QString &plain, WhiteSpaceMode mode = WhiteSpacePre);
-#ifndef QT_NO_TEXTCODEC
+#if !defined(QT_NO_TEXTCODEC) || defined(Q_CLANG_QDOC)
Q_GUI_EXPORT QTextCodec *codecForHtml(const QByteArray &ba);
#endif
}
-#endif
class Q_GUI_EXPORT QAbstractUndoItem
{
diff --git a/src/gui/text/qtextdocumentfragment.cpp b/src/gui/text/qtextdocumentfragment.cpp
index ea37695f4e..3ad49b3f88 100644
--- a/src/gui/text/qtextdocumentfragment.cpp
+++ b/src/gui/text/qtextdocumentfragment.cpp
@@ -420,7 +420,7 @@ static QTextListFormat::Style nextListStyle(QTextListFormat::Style style)
}
QTextHtmlImporter::QTextHtmlImporter(QTextDocument *_doc, const QString &_html, ImportMode mode, const QTextDocument *resourceProvider)
- : indent(0), compressNextWhitespace(PreserveWhiteSpace), doc(_doc), importMode(mode)
+ : indent(0), headingLevel(0), compressNextWhitespace(PreserveWhiteSpace), doc(_doc), importMode(mode)
{
cursor = QTextCursor(doc);
wsm = QTextHtmlParserNode::WhiteSpaceNormal;
@@ -747,8 +747,28 @@ QTextHtmlImporter::ProcessNodeResult QTextHtmlImporter::processSpecialNodes()
return ContinueWithNextNode;
}
+ case Html_h1:
+ headingLevel = 1;
+ break;
+ case Html_h2:
+ headingLevel = 2;
+ break;
+ case Html_h3:
+ headingLevel = 3;
+ break;
+ case Html_h4:
+ headingLevel = 4;
+ break;
+ case Html_h5:
+ headingLevel = 5;
+ break;
+ case Html_h6:
+ headingLevel = 6;
+ break;
+
default: break;
}
+
return ContinueWithCurrentNode;
}
@@ -832,6 +852,15 @@ bool QTextHtmlImporter::closeTag()
}
}
break;
+ case Html_h1:
+ case Html_h2:
+ case Html_h3:
+ case Html_h4:
+ case Html_h5:
+ case Html_h6:
+ headingLevel = 0;
+ blockTagClosed = true;
+ break;
default:
if (closedNode->isBlock())
blockTagClosed = true;
@@ -1093,6 +1122,11 @@ QTextHtmlImporter::ProcessNodeResult QTextHtmlImporter::processBlockNode()
modifiedBlockFormat = true;
}
+ if (headingLevel) {
+ block.setHeadingLevel(headingLevel);
+ modifiedBlockFormat = true;
+ }
+
if (currentNode->blockFormat.propertyCount() > 0) {
modifiedBlockFormat = true;
block.merge(currentNode->blockFormat);
diff --git a/src/gui/text/qtextdocumentfragment_p.h b/src/gui/text/qtextdocumentfragment_p.h
index e8699545f7..02a6a429fa 100644
--- a/src/gui/text/qtextdocumentfragment_p.h
+++ b/src/gui/text/qtextdocumentfragment_p.h
@@ -152,6 +152,7 @@ private:
friend class QTypeInfo<List>;
QVector<List> lists;
int indent;
+ int headingLevel;
// insert a named anchor the next time we emit a char format,
// either in a block or in regular text
diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp
index 2957b8d5c0..a9227f0171 100644
--- a/src/gui/text/qtextdocumentlayout.cpp
+++ b/src/gui/text/qtextdocumentlayout.cpp
@@ -399,26 +399,6 @@ static bool operator<(const QCheckPoint &checkPoint, int pos)
return checkPoint.positionInFrame < pos;
}
-#if defined(Q_CC_MSVC) && _MSC_VER < 1600
-//The STL implementation of MSVC 2008 requires the definitions
-
-static bool operator<(const QCheckPoint &checkPoint1, const QCheckPoint &checkPoint2)
-{
- return checkPoint1.y < checkPoint2.y;
-}
-
-static bool operator<(QFixed y, const QCheckPoint &checkPoint)
-{
- return y < checkPoint.y;
-}
-
-static bool operator<(int pos, const QCheckPoint &checkPoint)
-{
- return pos < checkPoint.positionInFrame;
-}
-
-#endif
-
static void fillBackground(QPainter *p, const QRectF &rect, QBrush brush, const QPointF &origin, const QRectF &gradientRect = QRectF())
{
p->save();
@@ -2569,12 +2549,14 @@ void QTextDocumentLayoutPrivate::layoutFlow(QTextFrame::Iterator it, QTextLayout
}
static inline void getLineHeightParams(const QTextBlockFormat &blockFormat, const QTextLine &line, qreal scaling,
- QFixed *lineAdjustment, QFixed *lineBreakHeight, QFixed *lineHeight)
+ QFixed *lineAdjustment, QFixed *lineBreakHeight, QFixed *lineHeight, QFixed *lineBottom)
{
- *lineHeight = QFixed::fromReal(blockFormat.lineHeight(line.height(), scaling));
+ qreal rawHeight = qCeil(line.ascent() + line.descent() + line.leading());
+ *lineHeight = QFixed::fromReal(blockFormat.lineHeight(rawHeight, scaling));
+ *lineBottom = QFixed::fromReal(blockFormat.lineHeight(line.height(), scaling));
if (blockFormat.lineHeightType() == QTextBlockFormat::FixedHeight || blockFormat.lineHeightType() == QTextBlockFormat::MinimumHeight) {
- *lineBreakHeight = *lineHeight;
+ *lineBreakHeight = *lineBottom;
if (blockFormat.lineHeightType() == QTextBlockFormat::FixedHeight)
*lineAdjustment = QFixed::fromReal(line.ascent() + qMax(line.leading(), qreal(0.0))) - ((*lineHeight * 4) / 5);
else
@@ -2652,6 +2634,7 @@ void QTextDocumentLayoutPrivate::layoutBlock(const QTextBlock &bl, int blockPosi
const QFixed cy = layoutStruct->y;
const QFixed l = layoutStruct->x_left + totalLeftMargin;
const QFixed r = layoutStruct->x_right - totalRightMargin;
+ QFixed bottom;
tl->beginLayout();
bool firstLine = true;
@@ -2721,10 +2704,10 @@ void QTextDocumentLayoutPrivate::layoutBlock(const QTextBlock &bl, int blockPosi
}
- QFixed lineBreakHeight, lineHeight, lineAdjustment;
+ QFixed lineBreakHeight, lineHeight, lineAdjustment, lineBottom;
qreal scaling = (q->paintDevice() && q->paintDevice()->logicalDpiY() != qt_defaultDpi()) ?
qreal(q->paintDevice()->logicalDpiY()) / qreal(qt_defaultDpi()) : 1;
- getLineHeightParams(blockFormat, line, scaling, &lineAdjustment, &lineBreakHeight, &lineHeight);
+ getLineHeightParams(blockFormat, line, scaling, &lineAdjustment, &lineBreakHeight, &lineHeight, &lineBottom);
if (layoutStruct->pageHeight > 0 && layoutStruct->absoluteY() + lineBreakHeight > layoutStruct->pageBottom) {
layoutStruct->newPage();
@@ -2739,6 +2722,7 @@ void QTextDocumentLayoutPrivate::layoutBlock(const QTextBlock &bl, int blockPosi
}
line.setPosition(QPointF((left - layoutStruct->x_left).toReal(), (layoutStruct->y - cy - lineAdjustment).toReal()));
+ bottom = layoutStruct->y + lineBottom;
layoutStruct->y += lineHeight;
layoutStruct->contentsWidth
= qMax<QFixed>(layoutStruct->contentsWidth, QFixed::fromReal(line.x() + line.naturalTextWidth()) + totalRightMargin);
@@ -2750,27 +2734,31 @@ void QTextDocumentLayoutPrivate::layoutBlock(const QTextBlock &bl, int blockPosi
}
layoutStruct->pendingFloats.clear();
}
+ layoutStruct->y = qMax(layoutStruct->y, bottom);
tl->endLayout();
} else {
const int cnt = tl->lineCount();
+ QFixed bottom;
for (int i = 0; i < cnt; ++i) {
LDEBUG << "going to move text line" << i;
QTextLine line = tl->lineAt(i);
layoutStruct->contentsWidth
= qMax(layoutStruct->contentsWidth, QFixed::fromReal(line.x() + tl->lineAt(i).naturalTextWidth()) + totalRightMargin);
- QFixed lineBreakHeight, lineHeight, lineAdjustment;
+ QFixed lineBreakHeight, lineHeight, lineAdjustment, lineBottom;
qreal scaling = (q->paintDevice() && q->paintDevice()->logicalDpiY() != qt_defaultDpi()) ?
qreal(q->paintDevice()->logicalDpiY()) / qreal(qt_defaultDpi()) : 1;
- getLineHeightParams(blockFormat, line, scaling, &lineAdjustment, &lineBreakHeight, &lineHeight);
+ getLineHeightParams(blockFormat, line, scaling, &lineAdjustment, &lineBreakHeight, &lineHeight, &lineBottom);
if (layoutStruct->pageHeight != QFIXED_MAX) {
if (layoutStruct->absoluteY() + lineBreakHeight > layoutStruct->pageBottom)
layoutStruct->newPage();
line.setPosition(QPointF(line.position().x(), (layoutStruct->y - lineAdjustment).toReal() - tl->position().y()));
}
+ bottom = layoutStruct->y + lineBottom;
layoutStruct->y += lineHeight;
}
+ layoutStruct->y = qMax(layoutStruct->y, bottom);
if (layoutStruct->updateRect.isValid()
&& blockLength > 1) {
if (layoutFrom >= blockPosition + blockLength) {
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index 5e38311fa1..2d1f0fa823 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -1927,7 +1927,7 @@ const QCharAttributes *QTextEngine::attributes() const
QVarLengthArray<QUnicodeTools::ScriptItem> scriptItems(layoutData->items.size());
for (int i = 0; i < layoutData->items.size(); ++i) {
- const QScriptItem &si = layoutData->items[i];
+ const QScriptItem &si = layoutData->items.at(i);
scriptItems[i].position = si.position;
scriptItems[i].script = si.analysis.script;
}
@@ -1944,14 +1944,14 @@ const QCharAttributes *QTextEngine::attributes() const
void QTextEngine::shape(int item) const
{
- if (layoutData->items[item].analysis.flags == QScriptAnalysis::Object) {
+ if (layoutData->items.at(item).analysis.flags == QScriptAnalysis::Object) {
ensureSpace(1);
if (block.docHandle()) {
docLayout()->resizeInlineObject(QTextInlineObject(item, const_cast<QTextEngine *>(this)),
layoutData->items[item].position + block.position(),
format(&layoutData->items[item]));
}
- } else if (layoutData->items[item].analysis.flags == QScriptAnalysis::Tab) {
+ } else if (layoutData->items.at(item).analysis.flags == QScriptAnalysis::Tab) {
// set up at least the ascent/descent/leading of the script item for the tab
fontEngine(layoutData->items[item],
&layoutData->items[item].ascent,
@@ -2064,7 +2064,7 @@ void QTextEngine::itemize() const
case QChar::Space:
case QChar::Nbsp:
if (option.flags() & QTextOption::ShowTabsAndSpaces) {
- analysis->flags = QScriptAnalysis::Space;
+ analysis->flags = (*uc == QChar::Space) ? QScriptAnalysis::Space : QScriptAnalysis::Nbsp;
analysis->bidiLevel = bidi.baseLevel;
break;
}
@@ -2193,9 +2193,9 @@ int QTextEngine::findItem(int strPos, int firstItem) const
int right = layoutData->items.size()-1;
while(left <= right) {
int middle = ((right-left)/2)+left;
- if (strPos > layoutData->items[middle].position)
+ if (strPos > layoutData->items.at(middle).position)
left = middle+1;
- else if(strPos < layoutData->items[middle].position)
+ else if (strPos < layoutData->items.at(middle).position)
right = middle-1;
else {
return middle;
@@ -2587,7 +2587,7 @@ void QTextEngine::justify(const QScriptLine &line)
int end = line.from + (int)line.length + line.trailingSpaces;
if (end == layoutData->string.length())
return; // no justification at end of paragraph
- if (end && layoutData->items[findItem(end-1)].analysis.flags == QScriptAnalysis::LineOrParagraphSeparator)
+ if (end && layoutData->items.at(findItem(end - 1)).analysis.flags == QScriptAnalysis::LineOrParagraphSeparator)
return; // no justification at the end of an explicitly separated line
}
@@ -2621,13 +2621,13 @@ void QTextEngine::justify(const QScriptLine &line)
// store pointers to the glyph data that could get reallocated by the shaping
// process.
for (int i = 0; i < nItems; ++i) {
- QScriptItem &si = layoutData->items[firstItem + i];
+ const QScriptItem &si = layoutData->items.at(firstItem + i);
if (!si.num_glyphs)
shape(firstItem + i);
}
for (int i = 0; i < nItems; ++i) {
- QScriptItem &si = layoutData->items[firstItem + i];
+ const QScriptItem &si = layoutData->items.at(firstItem + i);
int kashida_type = Justification_Arabic_Normal;
int kashida_pos = -1;
@@ -2923,7 +2923,7 @@ int QTextEngine::formatIndex(const QScriptItem *si) const
if (specialData && !specialData->resolvedFormats.isEmpty()) {
QTextFormatCollection *collection = formatCollection();
Q_ASSERT(collection);
- return collection->indexForFormat(specialData->resolvedFormats.at(si - &layoutData->items[0]));
+ return collection->indexForFormat(specialData->resolvedFormats.at(si - &layoutData->items.at(0)));
}
QTextDocumentPrivate *p = block.docHandle();
@@ -3129,7 +3129,7 @@ QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int
if (!attributes)
return QString();
for (int i = 0; i < layoutData->items.size(); ++i) {
- QScriptItem &si = layoutData->items[i];
+ const QScriptItem &si = layoutData->items.at(i);
if (!si.num_glyphs)
shape(i);
@@ -3314,24 +3314,29 @@ QFixed QTextEngine::calculateTabWidth(int item, QFixed x) const
QList<QTextOption::Tab> tabArray = option.tabs();
if (!tabArray.isEmpty()) {
if (isRightToLeft()) { // rebase the tabArray positions.
- QList<QTextOption::Tab> newTabs;
- newTabs.reserve(tabArray.count());
- QList<QTextOption::Tab>::Iterator iter = tabArray.begin();
- while(iter != tabArray.end()) {
- QTextOption::Tab tab = *iter;
- if (tab.type == QTextOption::LeftTab)
- tab.type = QTextOption::RightTab;
- else if (tab.type == QTextOption::RightTab)
- tab.type = QTextOption::LeftTab;
- newTabs << tab;
- ++iter;
- }
- tabArray = newTabs;
- }
- for (int i = 0; i < tabArray.size(); ++i) {
- QFixed tab = QFixed::fromReal(tabArray[i].position) * dpiScale;
+ auto isLeftOrRightTab = [](const QTextOption::Tab &tab) {
+ return tab.type == QTextOption::LeftTab || tab.type == QTextOption::RightTab;
+ };
+ const auto cbegin = tabArray.cbegin();
+ const auto cend = tabArray.cend();
+ const auto cit = std::find_if(cbegin, cend, isLeftOrRightTab);
+ if (cit != cend) {
+ const int index = std::distance(cbegin, cit);
+ auto iter = tabArray.begin() + index;
+ const auto end = tabArray.end();
+ while (iter != end) {
+ QTextOption::Tab &tab = *iter;
+ if (tab.type == QTextOption::LeftTab)
+ tab.type = QTextOption::RightTab;
+ else if (tab.type == QTextOption::RightTab)
+ tab.type = QTextOption::LeftTab;
+ ++iter;
+ }
+ }
+ }
+ for (const QTextOption::Tab &tabSpec : qAsConst(tabArray)) {
+ QFixed tab = QFixed::fromReal(tabSpec.position) * dpiScale;
if (tab > x) { // this is the tab we need.
- QTextOption::Tab tabSpec = tabArray[i];
int tabSectionEnd = layoutData->string.count();
if (tabSpec.type == QTextOption::RightTab || tabSpec.type == QTextOption::CenterTab) {
// find next tab to calculate the width required.
@@ -3352,7 +3357,7 @@ QFixed QTextEngine::calculateTabWidth(int item, QFixed x) const
QFixed length;
// Calculate the length of text between this tab and the tabSectionEnd
for (int i=item; i < layoutData->items.count(); i++) {
- QScriptItem &item = layoutData->items[i];
+ const QScriptItem &item = layoutData->items.at(i);
if (item.position > tabSectionEnd || item.position <= si.position)
continue;
shape(i); // first, lets make sure relevant text is already shaped
@@ -3652,11 +3657,12 @@ int QTextEngine::lineNumberForTextPosition(int pos)
return -1;
}
-void QTextEngine::insertionPointsForLine(int lineNum, QVector<int> &insertionPoints)
+std::vector<int> QTextEngine::insertionPointsForLine(int lineNum)
{
QTextLineItemIterator iterator(this, lineNum);
- insertionPoints.reserve(iterator.line.length);
+ std::vector<int> insertionPoints;
+ insertionPoints.reserve(size_t(iterator.line.length));
bool lastLine = lineNum >= lines.size() - 1;
@@ -3674,25 +3680,22 @@ void QTextEngine::insertionPointsForLine(int lineNum, QVector<int> &insertionPoi
insertionPoints.push_back(i);
}
}
+ return insertionPoints;
}
int QTextEngine::endOfLine(int lineNum)
{
- QVector<int> insertionPoints;
- insertionPointsForLine(lineNum, insertionPoints);
-
+ const auto insertionPoints = insertionPointsForLine(lineNum);
if (insertionPoints.size() > 0)
- return insertionPoints.constLast();
+ return insertionPoints.back();
return 0;
}
int QTextEngine::beginningOfLine(int lineNum)
{
- QVector<int> insertionPoints;
- insertionPointsForLine(lineNum, insertionPoints);
-
+ const auto insertionPoints = insertionPointsForLine(lineNum);
if (insertionPoints.size() > 0)
- return insertionPoints.constFirst();
+ return insertionPoints.front();
return 0;
}
@@ -3709,10 +3712,8 @@ int QTextEngine::positionAfterVisualMovement(int pos, QTextCursor::MoveOperation
if (lineNum < 0)
return pos;
- QVector<int> insertionPoints;
- insertionPointsForLine(lineNum, insertionPoints);
- int i, max = insertionPoints.size();
- for (i = 0; i < max; i++)
+ const auto insertionPoints = insertionPointsForLine(lineNum);
+ for (size_t i = 0, max = insertionPoints.size(); i < max; ++i)
if (pos == insertionPoints[i]) {
if (moveRight) {
if (i + 1 < max)
@@ -3990,7 +3991,7 @@ QTextLineItemIterator::QTextLineItemIterator(QTextEngine *_eng, int _lineNum, co
QVarLengthArray<uchar> levels(nItems);
for (int i = 0; i < nItems; ++i)
- levels[i] = eng->layoutData->items[i+firstItem].analysis.bidiLevel;
+ levels[i] = eng->layoutData->items.at(i + firstItem).analysis.bidiLevel;
QTextEngine::bidiReorder(nItems, levels.data(), visualOrder.data());
eng->shapeLine(line);
diff --git a/src/gui/text/qtextengine_p.h b/src/gui/text/qtextengine_p.h
index f9eb055478..e9187ea605 100644
--- a/src/gui/text/qtextengine_p.h
+++ b/src/gui/text/qtextengine_p.h
@@ -74,6 +74,7 @@
#include <private/qunicodetools_p.h>
#include <stdlib.h>
+#include <vector>
QT_BEGIN_NAMESPACE
@@ -142,9 +143,10 @@ struct Q_AUTOTEST_EXPORT QScriptAnalysis
LineOrParagraphSeparator = 4,
Space = 5,
SpaceTabOrObject = Space,
- Tab = 6,
+ Nbsp = 6,
+ Tab = 7,
TabOrObject = Tab,
- Object = 7
+ Object = 8
};
enum BidiFlags {
BidiBN = 1,
@@ -632,7 +634,7 @@ public:
int nextLogicalPosition(int oldPos) const;
int lineNumberForTextPosition(int pos);
int positionAfterVisualMovement(int oldPos, QTextCursor::MoveOperation op);
- void insertionPointsForLine(int lineNum, QVector<int> &insertionPoints);
+ std::vector<int> insertionPointsForLine(int lineNum);
void resetFontEngineCache();
void enableDelayDecorations(bool enable = true) { delayDecorations = enable; }
diff --git a/src/gui/text/qtextformat.cpp b/src/gui/text/qtextformat.cpp
index 08106db6ce..4957da1908 100644
--- a/src/gui/text/qtextformat.cpp
+++ b/src/gui/text/qtextformat.cpp
@@ -514,7 +514,7 @@ Q_GUI_EXPORT QDataStream &operator>>(QDataStream &stream, QTextFormat &fmt)
\value BlockFormat The object formats a text block
\value CharFormat The object formats a single character
\value ListFormat The object formats a list
- \omitvalue TableFormat Unused Value, a table's FormatType is FrameFormat.
+ \omitvalue TableFormat \omit Unused Value, a table's FormatType is FrameFormat. \endomit
\value FrameFormat The object formats a frame
\value UserFormat
@@ -556,6 +556,8 @@ Q_GUI_EXPORT QDataStream &operator>>(QDataStream &stream, QTextFormat &fmt)
\value LineHeightType
\value BlockNonBreakableLines
\value BlockTrailingHorizontalRulerWidth The width of a horizontal ruler element.
+ \value HeadingLevel The level of a heading, for example 1 corresponds to an HTML H1 tag; otherwise 0.
+ This enum value has been added in Qt 5.12.
Character properties
@@ -2246,6 +2248,34 @@ QList<QTextOption::Tab> QTextBlockFormat::tabPositions() const
/*!
+ \fn void QTextBlockFormat::setHeadingLevel(int level)
+ \since 5.12
+
+ Sets the paragraph's heading level, where 1 is the highest-level heading
+ type (usually with the largest possible heading font size), and increasing
+ values are progressively deeper into the document (and usually with smaller
+ font sizes). For example when reading an HTML H1 tag, the heading level is
+ set to 1. Setting the heading level does not automatically change the font
+ size; however QTextDocumentFragment::fromHtml() sets both the heading level
+ and the font size simultaneously.
+
+ If the paragraph is not a heading, the level should be set to 0 (the default).
+
+ \sa headingLevel()
+*/
+
+
+/*!
+ \fn int QTextBlockFormat::headingLevel() const
+ \since 5.12
+
+ Returns the paragraph's heading level if it is a heading, or 0 if not.
+
+ \sa setHeadingLevel()
+*/
+
+
+/*!
\fn void QTextBlockFormat::setLineHeight(qreal height, int heightType)
\since 4.8
@@ -3047,7 +3077,8 @@ QTextTableFormat::QTextTableFormat(const QTextFormat &fmt)
REPLACEMENT CHARACTER) which has an associated QTextImageFormat. The
image format specifies a name with setName() that is used to
locate the image. The size of the rectangle that the image will
- occupy is specified using setWidth() and setHeight().
+ occupy is specified in pixels using setWidth() and setHeight().
+ The desired image quality may be set with setQuality().
Images can be supplied in any format for which Qt has an image
reader, so SVG drawings can be included alongside PNG, TIFF and
@@ -3137,6 +3168,28 @@ QTextImageFormat::QTextImageFormat(const QTextFormat &fmt)
*/
/*!
+ \fn void QTextImageFormat::setQuality(int quality = 100)
+ \since 5.12
+
+ Sets the quality that should be used by exporters when exporting the image. QTextDocumentWriter
+ will export jpg images with the \a quality set here when exporting to ODF files if \a quality is
+ set to a value between 0 and 100. Or it will export png images if \a quality is set to 100
+ (default) or greater.
+
+ \sa quality()
+*/
+
+
+/*!
+ \fn qreal QTextImageFormat::quality() const
+ \since 5.12
+
+ Returns the value set by setQuality().
+
+ \sa setQuality()
+*/
+
+/*!
\fn void QTextCharFormat::setFontCapitalization(QFont::Capitalization capitalization)
\since 4.4
diff --git a/src/gui/text/qtextformat.h b/src/gui/text/qtextformat.h
index 28c3035537..a8e573d5a4 100644
--- a/src/gui/text/qtextformat.h
+++ b/src/gui/text/qtextformat.h
@@ -175,6 +175,7 @@ public:
LineHeightType = 0x1049,
BlockNonBreakableLines = 0x1050,
BlockTrailingHorizontalRulerWidth = 0x1060,
+ HeadingLevel = 0x1070,
// character properties
FirstFontProperty = 0x1FE0,
@@ -249,6 +250,7 @@ public:
ImageName = 0x5000,
ImageWidth = 0x5010,
ImageHeight = 0x5011,
+ ImageQuality = 0x5014,
// internal
/*
@@ -624,6 +626,11 @@ public:
inline int indent() const
{ return intProperty(BlockIndent); }
+ inline void setHeadingLevel(int alevel)
+ { setProperty(HeadingLevel, alevel); }
+ inline int headingLevel() const
+ { return intProperty(HeadingLevel); }
+
inline void setLineHeight(qreal height, int heightType)
{ setProperty(LineHeight, height); setProperty(LineHeightType, heightType); }
inline qreal lineHeight(qreal scriptLineHeight, qreal scaling) const;
@@ -748,6 +755,10 @@ public:
inline qreal height() const
{ return doubleProperty(ImageHeight); }
+ inline void setQuality(int quality = 100);
+ inline int quality() const
+ { return intProperty(ImageQuality); }
+
protected:
explicit QTextImageFormat(const QTextFormat &format);
friend class QTextFormat;
@@ -764,6 +775,9 @@ inline void QTextImageFormat::setWidth(qreal awidth)
inline void QTextImageFormat::setHeight(qreal aheight)
{ setProperty(ImageHeight, aheight); }
+inline void QTextImageFormat::setQuality(int aquality)
+{ setProperty(ImageQuality, aquality); }
+
class Q_GUI_EXPORT QTextFrameFormat : public QTextFormat
{
public:
diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp
index 9154182df1..4be800b251 100644
--- a/src/gui/text/qtexthtmlparser.cpp
+++ b/src/gui/text/qtexthtmlparser.cpp
@@ -448,13 +448,6 @@ static const QTextHtmlElement elements[Html_NumElements]= {
{ "var", Html_var, QTextHtmlElement::DisplayInline },
};
-#if defined(Q_CC_MSVC) && _MSC_VER < 1600
-static bool operator<(const QTextHtmlElement &e1, const QTextHtmlElement &e2)
-{
- return QLatin1String(e1.name) < QLatin1String(e2.name);
-}
-#endif
-
static bool operator<(const QString &str, const QTextHtmlElement &e)
{
return str < QLatin1String(e.name);
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index 6e824b2ed1..ca6866d836 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -1006,10 +1006,8 @@ static void addSelectedRegionsToPath(QTextEngine *eng, int lineNumber, const QPo
}
if (lastSelectionWidth > 0) {
- QRectF rect = boundingRect & QRectF(lastSelectionX.toReal(), selectionY, lastSelectionWidth.toReal(), lineHeight);
- rect.moveLeft(qFloor(rect.left()));
- rect.moveTop(qFloor(rect.top()));
- region->addRect(rect);
+ const QRectF rect = boundingRect & QRectF(lastSelectionX.toReal(), selectionY, lastSelectionWidth.toReal(), lineHeight);
+ region->addRect(rect.toAlignedRect());
}
lastSelectionX = selectionX;
@@ -1017,10 +1015,8 @@ static void addSelectedRegionsToPath(QTextEngine *eng, int lineNumber, const QPo
}
}
if (lastSelectionWidth > 0) {
- QRectF rect = boundingRect & QRectF(lastSelectionX.toReal(), selectionY, lastSelectionWidth.toReal(), lineHeight);
- rect.moveLeft(qFloor(rect.left()));
- rect.moveTop(qFloor(rect.top()));
- region->addRect(rect);
+ const QRectF rect = boundingRect & QRectF(lastSelectionX.toReal(), selectionY, lastSelectionWidth.toReal(), lineHeight);
+ region->addRect(rect.toAlignedRect());
}
}
@@ -2135,7 +2131,7 @@ static void setPenAndDrawBackground(QPainter *p, const QPen &defaultPen, const Q
QBrush bg = chf.background();
if (bg.style() != Qt::NoBrush && !chf.property(SuppressBackground).toBool())
- p->fillRect(QRectF(qFloor(r.x()), qFloor(r.y()), r.width(), r.height()), bg);
+ p->fillRect(r.toAlignedRect(), bg);
if (c.style() != Qt::NoBrush) {
p->setPen(QPen(c, 0));
}
@@ -2614,12 +2610,13 @@ void QTextLine::draw(QPainter *p, const QPointF &pos, const QTextLayout::FormatR
QPainterPrivate::get(p)->drawTextItem(pos, gf, eng);
}
- if (si.analysis.flags == QScriptAnalysis::Space
+ if ((si.analysis.flags == QScriptAnalysis::Space
+ || si.analysis.flags == QScriptAnalysis::Nbsp)
&& (eng->option.flags() & QTextOption::ShowTabsAndSpaces)) {
QBrush c = format.foreground();
if (c.style() != Qt::NoBrush)
p->setPen(c.color());
- QChar visualSpace((ushort)0xb7);
+ QChar visualSpace(si.analysis.flags == QScriptAnalysis::Space ? (ushort)0xb7 : (ushort)0xb0);
p->drawText(QPointF(iterator.x.toReal(), itemBaseLine.toReal()), visualSpace);
p->setPen(pen);
}
@@ -2845,9 +2842,7 @@ int QTextLine::xToCursor(qreal _x, CursorPosition cpos) const
bool rtl = eng->isRightToLeft();
eng->shapeLine(line);
- QVector<int> insertionPoints;
- if (visual && rtl)
- eng->insertionPointsForLine(lineNum, insertionPoints);
+ const auto insertionPoints = (visual && rtl) ? eng->insertionPointsForLine(lineNum) : std::vector<int>();
int nchars = 0;
for (int i = 0; i < nItems; ++i) {
int item = visualOrder[i]+firstItem;
@@ -2979,7 +2974,7 @@ int QTextLine::xToCursor(qreal _x, CursorPosition cpos) const
continue;
}
if (rtl && nchars > 0)
- return insertionPoints[lastLine ? nchars : nchars - 1];
+ return insertionPoints[size_t(lastLine ? nchars : nchars - 1)];
}
return eng->positionInLigature(&si, end, x, pos, -1,
cpos == QTextLine::CursorOnCharacter);
@@ -3007,9 +3002,8 @@ int QTextLine::xToCursor(qreal _x, CursorPosition cpos) const
// character between lines is a space and we want
// to position the cursor to the left of that
// character.
- // ###### breaks with japanese for example
if (this->index < eng->lines.count() - 1)
- --maxPos;
+ maxPos = eng->previousLogicalPosition(maxPos);
pos = qMin(pos, maxPos);
return pos;
diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp
index 30f5bc1051..d8218ab613 100644
--- a/src/gui/text/qtextodfwriter.cpp
+++ b/src/gui/text/qtextodfwriter.cpp
@@ -183,6 +183,35 @@ static QString bulletChar(QTextListFormat::Style style)
}
}
+static QString borderStyleName(QTextFrameFormat::BorderStyle style)
+{
+ switch (style) {
+ case QTextFrameFormat::BorderStyle_None:
+ return QString::fromLatin1("none");
+ case QTextFrameFormat::BorderStyle_Dotted:
+ return QString::fromLatin1("dotted");
+ case QTextFrameFormat::BorderStyle_Dashed:
+ return QString::fromLatin1("dashed");
+ case QTextFrameFormat::BorderStyle_Solid:
+ return QString::fromLatin1("solid");
+ case QTextFrameFormat::BorderStyle_Double:
+ return QString::fromLatin1("double");
+ case QTextFrameFormat::BorderStyle_DotDash:
+ return QString::fromLatin1("dashed");
+ case QTextFrameFormat::BorderStyle_DotDotDash:
+ return QString::fromLatin1("dotted");
+ case QTextFrameFormat::BorderStyle_Groove:
+ return QString::fromLatin1("groove");
+ case QTextFrameFormat::BorderStyle_Ridge:
+ return QString::fromLatin1("ridge");
+ case QTextFrameFormat::BorderStyle_Inset:
+ return QString::fromLatin1("inset");
+ case QTextFrameFormat::BorderStyle_Outset:
+ return QString::fromLatin1("outset");
+ }
+ return QString::fromLatin1("");
+}
+
void QTextOdfWriter::writeFrame(QXmlStreamWriter &writer, const QTextFrame *frame)
{
Q_ASSERT(frame);
@@ -190,8 +219,21 @@ void QTextOdfWriter::writeFrame(QXmlStreamWriter &writer, const QTextFrame *fram
if (table) { // Start a table.
writer.writeStartElement(tableNS, QString::fromLatin1("table"));
- writer.writeEmptyElement(tableNS, QString::fromLatin1("table-column"));
- writer.writeAttribute(tableNS, QString::fromLatin1("number-columns-repeated"), QString::number(table->columns()));
+ writer.writeAttribute(tableNS, QString::fromLatin1("style-name"),
+ QString::fromLatin1("Table%1").arg(table->formatIndex()));
+ // check if column widths are set, if so add TableNS line above for all columns and link to style
+ if (m_tableFormatsWithColWidthConstraints.contains(table->formatIndex())) {
+ for (int colit = 0; colit < table->columns(); ++colit) {
+ writer.writeStartElement(tableNS, QString::fromLatin1("table-column"));
+ writer.writeAttribute(tableNS, QString::fromLatin1("style-name"),
+ QString::fromLatin1("Table%1.%2").arg(table->formatIndex()).arg(colit));
+ writer.writeEndElement();
+ }
+ } else {
+ writer.writeEmptyElement(tableNS, QString::fromLatin1("table-column"));
+ writer.writeAttribute(tableNS, QString::fromLatin1("number-columns-repeated"),
+ QString::number(table->columns()));
+ }
} else if (frame->document() && frame->document()->rootFrame() != frame) { // start a section
writer.writeStartElement(textNS, QString::fromLatin1("section"));
}
@@ -219,7 +261,15 @@ void QTextOdfWriter::writeFrame(QXmlStreamWriter &writer, const QTextFrame *fram
if (cell.rowSpan() > 1)
writer.writeAttribute(tableNS, QString::fromLatin1("number-rows-spanned"), QString::number(cell.rowSpan()));
if (cell.format().isTableCellFormat()) {
- writer.writeAttribute(tableNS, QString::fromLatin1("style-name"), QString::fromLatin1("T%1").arg(cell.tableCellFormatIndex()));
+ if (m_cellFormatsInTablesWithBorders.contains(cell.tableCellFormatIndex()) ) {
+ // writing table:style-name tag in <table:table-cell> element
+ writer.writeAttribute(tableNS, QString::fromLatin1("style-name"),
+ QString::fromLatin1("TB%1.%2").arg(table->formatIndex())
+ .arg(cell.tableCellFormatIndex()));
+ } else {
+ writer.writeAttribute(tableNS, QString::fromLatin1("style-name"),
+ QString::fromLatin1("T%1").arg(cell.tableCellFormatIndex()));
+ }
}
}
writeBlock(writer, block);
@@ -326,7 +376,10 @@ void QTextOdfWriter::writeBlock(QXmlStreamWriter &writer, const QTextBlock &bloc
if (i < fragmentText.count()) {
if (character.unicode() == 0x2028) { // soft-return
//if (exportedIndex < i)
- writer.writeCharacters(fragmentText.mid(exportedIndex, i - exportedIndex));
+ writer.writeCharacters(fragmentText.mid(exportedIndex, i - exportedIndex));
+ // adding tab before line-break, so last line in justified paragraph
+ // will not stretch to the end
+ writer.writeEmptyElement(textNS, QString::fromLatin1("tab"));
writer.writeEmptyElement(textNS, QString::fromLatin1("line-break"));
exportedIndex = i+1;
continue;
@@ -367,7 +420,6 @@ void QTextOdfWriter::writeInlineCharacter(QXmlStreamWriter &writer, const QTextF
QTextImageFormat imageFormat = fragment.charFormat().toImageFormat();
writer.writeAttribute(drawNS, QString::fromLatin1("name"), imageFormat.name());
- // vvv Copy pasted mostly from Qt =================
QImage image;
QString name = imageFormat.name();
if (name.startsWith(QLatin1String(":/"))) // auto-detect resources
@@ -387,26 +439,33 @@ void QTextOdfWriter::writeInlineCharacter(QXmlStreamWriter &writer, const QTextF
}
}
- // ^^^ Copy pasted mostly from Qt =================
if (! image.isNull()) {
QBuffer imageBytes;
- QImageWriter imageWriter(&imageBytes, "png");
- imageWriter.write(image);
QString filename = m_strategy->createUniqueImageName();
- m_strategy->addFile(filename, QString::fromLatin1("image/png"), imageBytes.data());
-
+ int imgQuality = imageFormat.quality();
+ if (imgQuality >= 100 || imgQuality < 0 || image.hasAlphaChannel()) {
+ QImageWriter imageWriter(&imageBytes, "png");
+ imageWriter.write(image);
+ m_strategy->addFile(filename, QString::fromLatin1("image/png"), imageBytes.data());
+ } else {
+ // Write images without alpha channel as jpg with quality set by QTextImageFormat
+ QImageWriter imageWriter(&imageBytes, "jpg");
+ imageWriter.setQuality(imgQuality);
+ imageWriter.write(image);
+ m_strategy->addFile(filename, QString::fromLatin1("image/jpg"), imageBytes.data());
+ }
// get the width/height from the format.
- qreal width = (imageFormat.hasProperty(QTextFormat::ImageWidth)) ? imageFormat.width() : image.width();
+ qreal width = imageFormat.hasProperty(QTextFormat::ImageWidth)
+ ? imageFormat.width() : image.width();
writer.writeAttribute(svgNS, QString::fromLatin1("width"), pixelToPoint(width));
- qreal height = (imageFormat.hasProperty(QTextFormat::ImageHeight)) ? imageFormat.height() : image.height();
+ qreal height = imageFormat.hasProperty(QTextFormat::ImageHeight)
+ ? imageFormat.height() : image.height();
writer.writeAttribute(svgNS, QString::fromLatin1("height"), pixelToPoint(height));
-
writer.writeStartElement(drawNS, QString::fromLatin1("image"));
writer.writeAttribute(xlinkNS, QString::fromLatin1("href"), filename);
writer.writeEndElement(); // image
}
}
-
writer.writeEndElement(); // frame
}
@@ -421,7 +480,7 @@ void QTextOdfWriter::writeFormats(QXmlStreamWriter &writer, const QSet<int> &for
switch (textFormat.type()) {
case QTextFormat::CharFormat:
if (textFormat.isTableCellFormat())
- writeTableCellFormat(writer, textFormat.toTableCellFormat(), formatIndex);
+ writeTableCellFormat(writer, textFormat.toTableCellFormat(), formatIndex, allStyles);
else
writeCharacterFormat(writer, textFormat.toCharFormat(), formatIndex);
break;
@@ -432,10 +491,15 @@ void QTextOdfWriter::writeFormats(QXmlStreamWriter &writer, const QSet<int> &for
writeListFormat(writer, textFormat.toListFormat(), formatIndex);
break;
case QTextFormat::FrameFormat:
- writeFrameFormat(writer, textFormat.toFrameFormat(), formatIndex);
+ if (textFormat.isTableFormat())
+ writeTableFormat(writer, textFormat.toTableFormat(), formatIndex);
+ else
+ writeFrameFormat(writer, textFormat.toFrameFormat(), formatIndex);
break;
case QTextFormat::TableFormat:
- ;break;
+ // this case never happens, because TableFormat is a FrameFormat
+ Q_UNREACHABLE();
+ break;
}
}
@@ -449,6 +513,36 @@ void QTextOdfWriter::writeBlockFormat(QXmlStreamWriter &writer, QTextBlockFormat
writer.writeAttribute(styleNS, QString::fromLatin1("family"), QString::fromLatin1("paragraph"));
writer.writeStartElement(styleNS, QString::fromLatin1("paragraph-properties"));
+ if (format.hasProperty(QTextBlockFormat::LineHeightType)) {
+ const int blockLineHeightType = format.lineHeightType();
+ const qreal blockLineHeight = format.lineHeight();
+ QString type, value;
+ switch (blockLineHeightType) {
+ case QTextBlockFormat::SingleHeight:
+ type = QString::fromLatin1("line-height");
+ value = QString::fromLatin1("100%");
+ break;
+ case QTextBlockFormat::ProportionalHeight:
+ type = QString::fromLatin1("line-height");
+ value = QString::number(blockLineHeight) + QString::fromLatin1("%");
+ break;
+ case QTextBlockFormat::FixedHeight:
+ type = QString::fromLatin1("line-height");
+ value = pixelToPoint(qMax(qreal(0.), blockLineHeight));
+ break;
+ case QTextBlockFormat::MinimumHeight:
+ type = QString::fromLatin1("line-height-at-least");
+ value = pixelToPoint(qMax(qreal(0.), blockLineHeight));
+ break;
+ case QTextBlockFormat::LineDistanceHeight:
+ type = QString::fromLatin1("line-spacing");
+ value = pixelToPoint(qMax(qreal(0.), blockLineHeight));
+ }
+
+ if (!type.isNull())
+ writer.writeAttribute(styleNS, type, value);
+ }
+
if (format.hasProperty(QTextFormat::BlockAlignment)) {
const Qt::Alignment alignment = format.alignment() & Qt::AlignHorizontal_Mask;
QString value;
@@ -693,14 +787,108 @@ void QTextOdfWriter::writeFrameFormat(QXmlStreamWriter &writer, QTextFrameFormat
// PageBreakFlags pageBreakPolicy () const
}
-void QTextOdfWriter::writeTableCellFormat(QXmlStreamWriter &writer, QTextTableCellFormat format, int formatIndex) const
+void QTextOdfWriter::writeTableFormat(QXmlStreamWriter &writer, QTextTableFormat format, int formatIndex) const
{
+ // start writing table style element
writer.writeStartElement(styleNS, QString::fromLatin1("style"));
- writer.writeAttribute(styleNS, QString::fromLatin1("name"), QString::fromLatin1("T%1").arg(formatIndex));
+ writer.writeAttribute(styleNS, QString::fromLatin1("name"),
+ QString::fromLatin1("Table%1").arg(formatIndex));
writer.writeAttribute(styleNS, QString::fromLatin1("family"), QString::fromLatin1("table"));
writer.writeEmptyElement(styleNS, QString::fromLatin1("table-properties"));
+ if (m_tableFormatsWithBorders.contains(formatIndex)) {
+ // write border format collapsing to table style
+ writer.writeAttribute(tableNS, QString::fromLatin1("border-model"),
+ QString::fromLatin1("collapsing"));
+ }
+ const char* align = nullptr;
+ switch (format.alignment()) {
+ case Qt::AlignLeft:
+ align = "left";
+ break;
+ case Qt::AlignRight:
+ align = "right";
+ break;
+ case Qt::AlignHCenter:
+ align = "center";
+ break;
+ case Qt::AlignJustify:
+ align = "margins";
+ break;
+ }
+ if (align)
+ writer.writeAttribute(tableNS, QString::fromLatin1("align"), QString::fromLatin1(align));
+ if (format.width().rawValue()) {
+ writer.writeAttribute(styleNS, QString::fromLatin1("width"),
+ QString::number(format.width().rawValue()) + QLatin1String("pt"));
+ }
+ writer.writeEndElement();
+ // start writing table-column style element
+ if (format.columnWidthConstraints().size()) {
+ // write table-column-properties for columns with constraints
+ m_tableFormatsWithColWidthConstraints.insert(formatIndex); // needed for linking of columns to styles
+ for (int colit = 0; colit < format.columnWidthConstraints().size(); ++colit) {
+ writer.writeStartElement(styleNS, QString::fromLatin1("style"));
+ writer.writeAttribute(styleNS, QString::fromLatin1("name"),
+ QString::fromLatin1("Table%1.%2").arg(formatIndex).arg(colit));
+ writer.writeAttribute(styleNS, QString::fromLatin1("family"), QString::fromLatin1("table-column"));
+ writer.writeEmptyElement(styleNS, QString::fromLatin1("table-column-properties"));
+ QString columnWidth;
+ if (format.columnWidthConstraints().at(colit).type() == QTextLength::PercentageLength) {
+ columnWidth = QString::number(format.columnWidthConstraints().at(colit).rawValue())
+ + QLatin1String("%");
+ } else if (format.columnWidthConstraints().at(colit).type() == QTextLength::FixedLength) {
+ columnWidth = QString::number(format.columnWidthConstraints().at(colit).rawValue())
+ + QLatin1String("pt");
+ } else {
+ //!! HARD-CODING variableWidth Constraints to 100% / nr constraints
+ columnWidth = QString::number(100 / format.columnWidthConstraints().size())
+ + QLatin1String("%");
+ }
+ writer.writeAttribute(styleNS, QString::fromLatin1("column-width"), columnWidth);
+ writer.writeEndElement();
+ }
+ }
+}
+
+void QTextOdfWriter::writeTableCellFormat(QXmlStreamWriter &writer, QTextTableCellFormat format,
+ int formatIndex, QVector<QTextFormat> &styles) const
+{
+ // check for all table cells here if they are in a table with border
+ if (m_cellFormatsInTablesWithBorders.contains(formatIndex)) {
+ const QVector<int> tableIdVector = m_cellFormatsInTablesWithBorders.value(formatIndex);
+ for (const auto &tableId : tableIdVector) {
+ const auto &tmpStyle = styles.at(tableId);
+ if (tmpStyle.isTableFormat()) {
+ QTextTableFormat tableFormatTmp = tmpStyle.toTableFormat();
+ tableCellStyleElement(writer, formatIndex, format, true, tableId, tableFormatTmp);
+ } else {
+ qDebug("QTextOdfWriter::writeTableCellFormat: ERROR writing table border format");
+ }
+ }
+ }
+ tableCellStyleElement(writer, formatIndex, format, false);
+}
+void QTextOdfWriter::tableCellStyleElement(QXmlStreamWriter &writer, const int &formatIndex,
+ const QTextTableCellFormat &format,
+ bool hasBorder, int tableId,
+ const QTextTableFormat tableFormatTmp) const {
+ writer.writeStartElement(styleNS, QString::fromLatin1("style"));
+ if (hasBorder) {
+ writer.writeAttribute(styleNS, QString::fromLatin1("name"),
+ QString::fromLatin1("TB%1.%2").arg(tableId).arg(formatIndex));
+ } else {
+ writer.writeAttribute(styleNS, QString::fromLatin1("name"), QString::fromLatin1("T%1").arg(formatIndex));
+ }
+ writer.writeAttribute(styleNS, QString::fromLatin1("family"), QString::fromLatin1("table-cell"));
+ writer.writeEmptyElement(styleNS, QString::fromLatin1("table-cell-properties"));
+ if (hasBorder) {
+ writer.writeAttribute(foNS, QString::fromLatin1("border"),
+ pixelToPoint(tableFormatTmp.border()) + QLatin1String(" ")
+ + borderStyleName(tableFormatTmp.borderStyle())
+ + QLatin1String(" #000000")); //!! HARD-CODING color black
+ }
qreal padding = format.topPadding();
if (padding > 0 && padding == format.bottomPadding()
&& padding == format.leftPadding() && padding == format.rightPadding()) {
@@ -710,16 +898,19 @@ void QTextOdfWriter::writeTableCellFormat(QXmlStreamWriter &writer, QTextTableCe
if (padding > 0)
writer.writeAttribute(foNS, QString::fromLatin1("padding-top"), pixelToPoint(padding));
if (format.bottomPadding() > 0)
- writer.writeAttribute(foNS, QString::fromLatin1("padding-bottom"), pixelToPoint(format.bottomPadding()));
+ writer.writeAttribute(foNS, QString::fromLatin1("padding-bottom"),
+ pixelToPoint(format.bottomPadding()));
if (format.leftPadding() > 0)
- writer.writeAttribute(foNS, QString::fromLatin1("padding-left"), pixelToPoint(format.leftPadding()));
+ writer.writeAttribute(foNS, QString::fromLatin1("padding-left"),
+ pixelToPoint(format.leftPadding()));
if (format.rightPadding() > 0)
- writer.writeAttribute(foNS, QString::fromLatin1("padding-right"), pixelToPoint(format.rightPadding()));
+ writer.writeAttribute(foNS, QString::fromLatin1("padding-right"),
+ pixelToPoint(format.rightPadding()));
}
if (format.hasProperty(QTextFormat::TextVerticalAlignment)) {
QString pos;
- switch (format.verticalAlignment()) {
+ switch (format.verticalAlignment()) { // TODO - review: doesn't handle all cases
case QTextCharFormat::AlignMiddle:
pos = QString::fromLatin1("middle"); break;
case QTextCharFormat::AlignTop:
@@ -736,8 +927,6 @@ void QTextOdfWriter::writeTableCellFormat(QXmlStreamWriter &writer, QTextTableCe
// ODF just search for style-table-cell-properties-attlist)
// QTextFormat::BackgroundImageUrl
// format.background
- // QTextFormat::FrameBorder
-
writer.writeEndElement(); // style
}
@@ -815,8 +1004,28 @@ bool QTextOdfWriter::writeAll()
const QList<int> copy = formats.toList();
for (auto index : copy) {
QTextObject *object = m_document->objectForFormat(allFormats[index]);
- if (object)
+ if (object) {
formats << object->formatIndex();
+ if (auto *tableobject = qobject_cast<QTextTable *>(object)) {
+ if (tableobject->format().borderStyle()) {
+ int tableID = tableobject->formatIndex();
+ m_tableFormatsWithBorders.insert(tableID);
+ // loop through all rows and cols of table and store cell IDs,
+ // create Hash with cell ID as Key and table IDs as Vector
+ for (int rowindex = 0; rowindex < tableobject->rows(); ++rowindex) {
+ for (int colindex = 0; colindex < tableobject->columns(); ++colindex) {
+ const int cellFormatID = tableobject->cellAt(rowindex, colindex).tableCellFormatIndex();
+ QVector<int> tableIdsTmp;
+ if (m_cellFormatsInTablesWithBorders.contains(cellFormatID))
+ tableIdsTmp = m_cellFormatsInTablesWithBorders.value(cellFormatID);
+ if (!tableIdsTmp.contains(tableID))
+ tableIdsTmp.append(tableID);
+ m_cellFormatsInTablesWithBorders.insert(cellFormatID, tableIdsTmp);
+ }
+ }
+ }
+ }
+ }
}
writeFormats(writer, formats);
diff --git a/src/gui/text/qtextodfwriter_p.h b/src/gui/text/qtextodfwriter_p.h
index d0dd7d2b5c..98a6fdfa96 100644
--- a/src/gui/text/qtextodfwriter_p.h
+++ b/src/gui/text/qtextodfwriter_p.h
@@ -56,8 +56,10 @@
//
#include <QtCore/QXmlStreamWriter>
+#include <QtCore/qhash.h>
#include <QtCore/qset.h>
#include <QtCore/qstack.h>
+#include <QtCore/qvector.h>
#include "qtextdocument_p.h"
#include "qtextdocumentwriter.h"
@@ -94,11 +96,21 @@ public:
void writeCharacterFormat(QXmlStreamWriter &writer, QTextCharFormat format, int formatIndex) const;
void writeListFormat(QXmlStreamWriter &writer, QTextListFormat format, int formatIndex) const;
void writeFrameFormat(QXmlStreamWriter &writer, QTextFrameFormat format, int formatIndex) const;
- void writeTableCellFormat(QXmlStreamWriter &writer, QTextTableCellFormat format, int formatIndex) const;
+ void writeTableFormat(QXmlStreamWriter &writer, QTextTableFormat format, int formatIndex) const;
+ void writeTableCellFormat(QXmlStreamWriter &writer, QTextTableCellFormat format, int formatIndex,
+ QVector<QTextFormat> &styles) const;
void writeFrame(QXmlStreamWriter &writer, const QTextFrame *frame);
void writeInlineCharacter(QXmlStreamWriter &writer, const QTextFragment &fragment) const;
const QString officeNS, textNS, styleNS, foNS, tableNS, drawNS, xlinkNS, svgNS;
+ const int defaultImageResolution = 11811; // 11811 dots per meter = (about) 300 dpi
+
+protected:
+ void tableCellStyleElement(QXmlStreamWriter &writer, const int &formatIndex,
+ const QTextTableCellFormat &format,
+ bool hasBorder, int tableId = 0,
+ const QTextTableFormat tableFormatTmp = QTextTableFormat()) const;
+
private:
const QTextDocument *m_document;
QIODevice *m_device;
@@ -108,6 +120,10 @@ private:
bool m_createArchive;
QStack<QTextList *> m_listStack;
+
+ QHash<int, QVector<int>> m_cellFormatsInTablesWithBorders;
+ QSet<int> m_tableFormatsWithBorders;
+ mutable QSet<int> m_tableFormatsWithColWidthConstraints;
};
QT_END_NAMESPACE
diff --git a/src/gui/text/qtextoption.cpp b/src/gui/text/qtextoption.cpp
index a3fa0e7351..2c2c05567f 100644
--- a/src/gui/text/qtextoption.cpp
+++ b/src/gui/text/qtextoption.cpp
@@ -307,7 +307,8 @@ QList<QTextOption::Tab> QTextOption::tabs() const
\value IncludeTrailingSpaces When this option is set, QTextLine::naturalTextWidth() and naturalTextRect() will
return a value that includes the width of trailing spaces in the text; otherwise
this width is excluded.
- \value ShowTabsAndSpaces Visualize spaces with little dots, and tabs with little arrows.
+ \value ShowTabsAndSpaces Visualize spaces with little dots, and tabs with little arrows. Non-breaking spaces are
+ shown differently to breaking spaces.
\value ShowLineAndParagraphSeparators Visualize line and paragraph separators with appropriate symbol characters.
\value ShowDocumentTerminator Visualize the end of the document with a section sign. This enum value was added
in Qt 5.7.
diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp
index dfd190ddd0..de9d087c21 100644
--- a/src/gui/util/qdesktopservices.cpp
+++ b/src/gui/util/qdesktopservices.cpp
@@ -141,6 +141,10 @@ void QOpenUrlHandlerRegistry::handlerDestroyed(QObject *handler)
same argument, and it will try to open the URL using the
appropriate mechanism for the user's desktop environment.
+ Combined with platform specific settings, the schemes registered by the
+ openUrl() function can also be exposed to other applications, opening up
+ for application deep linking or a very basic URL-based IPC mechanism.
+
\note Since Qt 5, storageLocation() and displayName() are replaced by functionality
provided by the QStandardPaths class.
@@ -245,6 +249,24 @@ bool QDesktopServices::openUrl(const QUrl &url)
The provided method must be implemented as a slot that only accepts a single QUrl
argument.
+ To use this function for receiving data from other apps on iOS you also need to
+ add the custom scheme to the \c CFBundleURLSchemes list in your Info.plist file:
+
+ \code
+ <key>CFBundleURLTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleURLSchemes</key>
+ <array>
+ <string>myapp</string>
+ </array>
+ </dict>
+ </array>
+ \endcode
+
+ For more information, see the Apple Developer Documentation for
+ \l{https://developer.apple.com/documentation/uikit/core_app/allowing_apps_and_websites_to_link_to_your_content/communicating_with_other_apps_using_custom_urls?language=objc}{Communicating with Other Apps Using Custom URLs}.
+
If setUrlHandler() is used to set a new handler for a scheme which already
has a handler, the existing handler is simply replaced with the new one.
Since QDesktopServices does not take ownership of handlers, no objects are
diff --git a/src/gui/util/qvalidator.cpp b/src/gui/util/qvalidator.cpp
index 7982ad967e..ae4f56a12e 100644
--- a/src/gui/util/qvalidator.cpp
+++ b/src/gui/util/qvalidator.cpp
@@ -411,13 +411,15 @@ QValidator::State QIntValidator::validate(QString & input, int&) const
if (buff.isEmpty())
return Intermediate;
- if (b >= 0 && buff.startsWith('-'))
+ const bool startsWithMinus(buff[0] == '-');
+ if (b >= 0 && startsWithMinus)
return Invalid;
- if (t < 0 && buff.startsWith('+'))
+ const bool startsWithPlus(buff[0] == '+');
+ if (t < 0 && startsWithPlus)
return Invalid;
- if (buff.size() == 1 && (buff.at(0) == '+' || buff.at(0) == '-'))
+ if (buff.size() == 1 && (startsWithPlus || startsWithMinus))
return Intermediate;
bool ok;
@@ -433,7 +435,15 @@ QValidator::State QIntValidator::validate(QString & input, int&) const
if (entered >= 0) {
// the -entered < b condition is necessary to allow people to type
// the minus last (e.g. for right-to-left languages)
- return (entered > t && -entered < b) ? Invalid : Intermediate;
+ // The buffLength > tLength condition validates values consisting
+ // of a number of digits equal to or less than the max value as intermediate.
+
+ int buffLength = buff.size();
+ if (startsWithPlus)
+ buffLength--;
+ const int tLength = t != 0 ? static_cast<int>(std::log10(qAbs(t))) + 1 : 1;
+
+ return (entered > t && -entered < b && buffLength > tLength) ? Invalid : Intermediate;
} else {
return (entered < b) ? Invalid : Intermediate;
}
@@ -624,10 +634,10 @@ QDoubleValidator::~QDoubleValidator()
that is within the valid range and is in the correct format.
Returns \l Intermediate if \a input contains a double that is
- outside the range or is in the wrong format; e.g. with too many
- digits after the decimal point or is empty.
+ outside the range or is in the wrong format; e.g. is empty.
- Returns \l Invalid if the \a input is not a double.
+ Returns \l Invalid if the \a input is not a double or with too many
+ digits after the decimal point.
Note: If the valid range consists of just positive doubles (e.g. 0.0 to 100.0)
and \a input is a negative double then \l Invalid is returned. If notation()
@@ -690,8 +700,16 @@ QValidator::State QDoubleValidatorPrivate::validateWithLocale(QString &input, QL
if (notation == QDoubleValidator::StandardNotation) {
double max = qMax(qAbs(q->b), qAbs(q->t));
if (max < LLONG_MAX) {
- qlonglong n = pow10(numDigits(qlonglong(max))) - 1;
- if (qAbs(i) > n)
+ qlonglong n = pow10(numDigits(qlonglong(max)));
+ // In order to get the highest possible number in the intermediate
+ // range we need to get 10 to the power of the number of digits
+ // after the decimal's and subtract that from the top number.
+ //
+ // For example, where q->dec == 2 and with a range of 0.0 - 9.0
+ // then the minimum possible number is 0.00 and the maximum
+ // possible is 9.99. Therefore 9.999 and 10.0 should be seen as
+ // invalid.
+ if (qAbs(i) > (n - std::pow(10, -q->dec)))
return QValidator::Invalid;
}
}
diff --git a/src/network/access/http2/http2protocol.cpp b/src/network/access/http2/http2protocol.cpp
index f51af4be5c..0be72042c6 100644
--- a/src/network/access/http2/http2protocol.cpp
+++ b/src/network/access/http2/http2protocol.cpp
@@ -287,7 +287,8 @@ bool is_protocol_upgraded(const QHttpNetworkReply &reply)
// Do some minimal checks here - we expect 'Upgrade: h2c' to be found.
const auto &header = reply.header();
for (const QPair<QByteArray, QByteArray> &field : header) {
- if (field.first.toLower() == "upgrade" && field.second.toLower() == "h2c")
+ if (field.first.compare("upgrade", Qt::CaseInsensitive) == 0 &&
+ field.second.compare("h2c", Qt::CaseInsensitive) == 0)
return true;
}
}
diff --git a/src/network/access/qhsts.cpp b/src/network/access/qhsts.cpp
index 43a8a3663e..a015feb044 100644
--- a/src/network/access/qhsts.cpp
+++ b/src/network/access/qhsts.cpp
@@ -453,8 +453,7 @@ bool QHstsHeaderParser::processDirective(const QByteArray &name, const QByteArra
{
Q_ASSERT(name.size());
// RFC6797 6.1/3 Directive names are case-insensitive
- const auto lcName = name.toLower();
- if (lcName == "max-age") {
+ if (name.compare("max-age", Qt::CaseInsensitive) == 0) {
// RFC 6797, 6.1.1
// The syntax of the max-age directive's REQUIRED value (after
// quoted-string unescaping, if necessary) is defined as:
@@ -477,7 +476,7 @@ bool QHstsHeaderParser::processDirective(const QByteArray &name, const QByteArra
maxAge = age;
maxAgeFound = true;
- } else if (lcName == "includesubdomains") {
+ } else if (name.compare("includesubdomains", Qt::CaseInsensitive) == 0) {
// RFC 6797, 6.1.2. The includeSubDomains Directive.
// The OPTIONAL "includeSubDomains" directive is a valueless directive.
diff --git a/src/network/access/qhttp2protocolhandler.cpp b/src/network/access/qhttp2protocolhandler.cpp
index c207d6e240..df7f87efd4 100644
--- a/src/network/access/qhttp2protocolhandler.cpp
+++ b/src/network/access/qhttp2protocolhandler.cpp
@@ -97,16 +97,18 @@ HPack::HttpHeader build_headers(const QHttpNetworkRequest &request, quint32 maxH
if (size.second > maxHeaderListSize)
break;
- QByteArray key(field.first.toLower());
- if (key == "connection" || key == "host" || key == "keep-alive"
- || key == "proxy-connection" || key == "transfer-encoding")
+ if (field.first.compare("connection", Qt::CaseInsensitive) == 0 ||
+ field.first.compare("host", Qt::CaseInsensitive) == 0 ||
+ field.first.compare("keep-alive", Qt::CaseInsensitive) == 0 ||
+ field.first.compare("proxy-connection", Qt::CaseInsensitive) == 0 ||
+ field.first.compare("transfer-encoding", Qt::CaseInsensitive) == 0)
continue; // Those headers are not valid (section 3.2.1) - from QSpdyProtocolHandler
// TODO: verify with specs, which fields are valid to send ....
// toLower - 8.1.2 .... "header field names MUST be converted to lowercase prior
// to their encoding in HTTP/2.
// A request or response containing uppercase header field names
// MUST be treated as malformed (Section 8.1.2.6)".
- header.push_back(HeaderField(key, field.second));
+ header.push_back(HeaderField(field.first.toLower(), field.second));
}
return header;
@@ -1404,8 +1406,9 @@ bool QHttp2ProtocolHandler::tryReserveStream(const Http2::Frame &pushPromiseFram
return false;
}
- const auto method = pseudoHeaders[":method"].toLower();
- if (method != "get" && method != "head")
+ const QByteArray method = pseudoHeaders[":method"];
+ if (method.compare("get", Qt::CaseInsensitive) != 0 &&
+ method.compare("head", Qt::CaseInsensitive) != 0)
return false;
QUrl url;
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index 0e2c257952..c58fd24a44 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -528,7 +528,7 @@ QUrl QHttpNetworkConnectionPrivate::parseRedirectResponse(QAbstractSocket *socke
QUrl redirectUrl;
const QList<QPair<QByteArray, QByteArray> > fields = reply->header();
for (const QNetworkReply::RawHeaderPair &header : fields) {
- if (header.first.toLower() == "location") {
+ if (header.first.compare("location", Qt::CaseInsensitive) == 0) {
redirectUrl = QUrl::fromEncoded(header.second);
break;
}
diff --git a/src/network/access/qhttpnetworkheader.cpp b/src/network/access/qhttpnetworkheader.cpp
index 3326f89d2f..8ad01174b4 100644
--- a/src/network/access/qhttpnetworkheader.cpp
+++ b/src/network/access/qhttpnetworkheader.cpp
@@ -64,7 +64,7 @@ qint64 QHttpNetworkHeaderPrivate::contentLength() const
QList<QPair<QByteArray, QByteArray> >::ConstIterator it = fields.constBegin(),
end = fields.constEnd();
for ( ; it != end; ++it)
- if (qstricmp("content-length", it->first) == 0) {
+ if (it->first.compare("content-length", Qt::CaseInsensitive) == 0) {
value = it->second;
break;
}
@@ -95,7 +95,7 @@ QList<QByteArray> QHttpNetworkHeaderPrivate::headerFieldValues(const QByteArray
QList<QPair<QByteArray, QByteArray> >::ConstIterator it = fields.constBegin(),
end = fields.constEnd();
for ( ; it != end; ++it)
- if (qstricmp(name.constData(), it->first) == 0)
+ if (name.compare(it->first, Qt::CaseInsensitive) == 0)
result += it->second;
return result;
@@ -104,7 +104,7 @@ QList<QByteArray> QHttpNetworkHeaderPrivate::headerFieldValues(const QByteArray
void QHttpNetworkHeaderPrivate::setHeaderField(const QByteArray &name, const QByteArray &data)
{
auto firstEqualsName = [&name](const QPair<QByteArray, QByteArray> &header) {
- return qstricmp(name.constData(), header.first) == 0;
+ return name.compare(header.first, Qt::CaseInsensitive) == 0;
};
fields.erase(std::remove_if(fields.begin(), fields.end(),
firstEqualsName),
diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp
index a657346958..c9c3172304 100644
--- a/src/network/access/qhttpnetworkreply.cpp
+++ b/src/network/access/qhttpnetworkreply.cpp
@@ -390,7 +390,8 @@ qint64 QHttpNetworkReplyPrivate::bytesAvailable() const
bool QHttpNetworkReplyPrivate::isCompressed()
{
QByteArray encoding = headerField("content-encoding");
- return qstricmp(encoding.constData(), "gzip") == 0 || qstricmp(encoding.constData(), "deflate") == 0;
+ return encoding.compare("gzip", Qt::CaseInsensitive) == 0 ||
+ encoding.compare("deflate", Qt::CaseInsensitive) == 0;
}
void QHttpNetworkReplyPrivate::removeAutoDecompressHeader()
@@ -401,7 +402,7 @@ void QHttpNetworkReplyPrivate::removeAutoDecompressHeader()
QList<QPair<QByteArray, QByteArray> >::Iterator it = fields.begin(),
end = fields.end();
while (it != end) {
- if (qstricmp(name.constData(), it->first.constData()) == 0) {
+ if (name.compare(it->first, Qt::CaseInsensitive) == 0) {
removedContentLength = strtoull(it->second.constData(), nullptr, 0);
fields.erase(it);
break;
diff --git a/src/network/access/qnetworkaccessftpbackend.cpp b/src/network/access/qnetworkaccessftpbackend.cpp
index c5404e4221..269845ed39 100644
--- a/src/network/access/qnetworkaccessftpbackend.cpp
+++ b/src/network/access/qnetworkaccessftpbackend.cpp
@@ -102,8 +102,8 @@ public:
};
QNetworkAccessFtpBackend::QNetworkAccessFtpBackend()
- : ftp(0), uploadDevice(0), totalBytes(0), helpId(-1), sizeId(-1), mdtmId(-1),
- supportsSize(false), supportsMdtm(false), state(Idle)
+ : ftp(0), uploadDevice(0), totalBytes(0), helpId(-1), sizeId(-1), mdtmId(-1), pwdId(-1),
+ supportsSize(false), supportsMdtm(false), supportsPwd(false), state(Idle)
{
}
@@ -302,13 +302,38 @@ void QNetworkAccessFtpBackend::ftpDone()
if (state == LoggingIn) {
state = CheckingFeatures;
- if (operation() == QNetworkAccessManager::GetOperation) {
- // send help command to find out if server supports "SIZE" and "MDTM"
+ // send help command to find out if server supports SIZE, MDTM, and PWD
+ if (operation() == QNetworkAccessManager::GetOperation
+ || operation() == QNetworkAccessManager::PutOperation) {
helpId = ftp->rawCommand(QLatin1String("HELP")); // get supported commands
} else {
ftpDone();
}
} else if (state == CheckingFeatures) {
+ // If a URL path starts with // prefix (/%2F decoded), the resource will
+ // be retrieved by an absolute path starting with the root directory.
+ // For the other URLs, the working directory is retrieved by PWD command
+ // and prepended to the resource path as an absolute path starting with
+ // the working directory.
+ state = ResolvingPath;
+ QString path = url().path();
+ if (path.startsWith(QLatin1String("//")) || supportsPwd == false) {
+ ftpDone(); // no commands sent, move to the next state
+ } else {
+ // If a path starts with /~/ prefix, its prefix will be replaced by
+ // the working directory as an absolute path starting with working
+ // directory.
+ if (path.startsWith(QLatin1String("/~/"))) {
+ // Remove leading /~ symbols
+ QUrl newUrl = url();
+ newUrl.setPath(path.mid(2));
+ setUrl(newUrl);
+ }
+
+ // send PWD command to retrieve the working directory
+ pwdId = ftp->rawCommand(QLatin1String("PWD"));
+ }
+ } else if (state == ResolvingPath) {
state = Statting;
if (operation() == QNetworkAccessManager::GetOperation) {
// logged in successfully, send the stat requests (if supported)
@@ -366,6 +391,34 @@ void QNetworkAccessFtpBackend::ftpRawCommandReply(int code, const QString &text)
supportsSize = true;
if (text.contains(QLatin1String("MDTM"), Qt::CaseSensitive))
supportsMdtm = true;
+ if (text.contains(QLatin1String("PWD"), Qt::CaseSensitive))
+ supportsPwd = true;
+ } else if (id == pwdId && code == 257) {
+ QString pwdPath;
+ int startIndex = text.indexOf('"');
+ int stopIndex = text.lastIndexOf('"');
+ if (stopIndex - startIndex) {
+ // The working directory is a substring between \" symbols.
+ startIndex++; // skip the first \" symbol
+ pwdPath = text.mid(startIndex, stopIndex - startIndex);
+ } else {
+ // If there is no or only one \" symbol, use all the characters of
+ // text.
+ pwdPath = text;
+ }
+
+ // If a URL path starts with the working directory prefix, its resource
+ // will be retrieved from the working directory. Otherwise, the path of
+ // the working directory is prepended to the resource path.
+ QString urlPath = url().path();
+ if (!urlPath.startsWith(pwdPath)) {
+ if (pwdPath.endsWith(QLatin1Char('/')))
+ pwdPath.chop(1);
+ // Prepend working directory to the URL path
+ QUrl newUrl = url();
+ newUrl.setPath(pwdPath % urlPath);
+ setUrl(newUrl);
+ }
} else if (code == 213) { // file status
if (id == sizeId) {
// reply to the size command
diff --git a/src/network/access/qnetworkaccessftpbackend_p.h b/src/network/access/qnetworkaccessftpbackend_p.h
index 4bd082fb67..0b3d35dcd3 100644
--- a/src/network/access/qnetworkaccessftpbackend_p.h
+++ b/src/network/access/qnetworkaccessftpbackend_p.h
@@ -76,6 +76,7 @@ public:
//Connecting,
LoggingIn,
CheckingFeatures,
+ ResolvingPath,
Statting,
Transferring,
Disconnecting
@@ -107,8 +108,8 @@ private:
QPointer<QNetworkAccessCachedFtpConnection> ftp;
QIODevice *uploadDevice;
qint64 totalBytes;
- int helpId, sizeId, mdtmId;
- bool supportsSize, supportsMdtm;
+ int helpId, sizeId, mdtmId, pwdId;
+ bool supportsSize, supportsMdtm, supportsPwd;
State state;
};
diff --git a/src/network/access/qnetworkdiskcache.cpp b/src/network/access/qnetworkdiskcache.cpp
index c9d658225e..df2e4902a4 100644
--- a/src/network/access/qnetworkdiskcache.cpp
+++ b/src/network/access/qnetworkdiskcache.cpp
@@ -189,7 +189,7 @@ QIODevice *QNetworkDiskCache::prepare(const QNetworkCacheMetaData &metaData)
const auto headers = metaData.rawHeaders();
for (const auto &header : headers) {
- if (header.first.toLower() == "content-length") {
+ if (header.first.compare("content-length", Qt::CaseInsensitive) == 0) {
const qint64 size = header.second.toLongLong();
if (size > (maximumCacheSize() * 3)/4)
return 0;
@@ -642,7 +642,7 @@ bool QCacheItem::canCompress() const
bool typeOk = false;
const auto headers = metaData.rawHeaders();
for (const auto &header : headers) {
- if (header.first.toLower() == "content-length") {
+ if (header.first.compare("content-length", Qt::CaseInsensitive) == 0) {
qint64 size = header.second.toLongLong();
if (size > MAX_COMPRESSION_SIZE)
return false;
@@ -650,7 +650,7 @@ bool QCacheItem::canCompress() const
sizeOk = true;
}
- if (header.first.toLower() == "content-type") {
+ if (header.first.compare("content-type", Qt::CaseInsensitive) == 0) {
QByteArray type = header.second;
if (type.startsWith("text/")
|| (type.startsWith("application/")
diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp
index 9067dea8e3..8750a841f6 100644
--- a/src/network/access/qnetworkreplyhttpimpl.cpp
+++ b/src/network/access/qnetworkreplyhttpimpl.cpp
@@ -1318,7 +1318,7 @@ void QNetworkReplyHttpImplPrivate::replyDownloadMetaData(const QList<QPair<QByte
if (!value.isEmpty()) {
// Why are we appending values for headers which are already
// present?
- if (qstricmp(it->first.constData(), "set-cookie") == 0)
+ if (it->first.compare("set-cookie", Qt::CaseInsensitive) == 0)
value += '\n';
else
value += ", ";
@@ -1584,7 +1584,7 @@ bool QNetworkReplyHttpImplPrivate::sendCacheContents(const QNetworkCacheMetaData
QUrl redirectUrl;
for ( ; it != end; ++it) {
if (httpRequest.isFollowRedirects() &&
- !qstricmp(it->first.toLower().constData(), "location"))
+ !it->first.compare("location", Qt::CaseInsensitive))
redirectUrl = QUrl::fromEncoded(it->second);
setRawHeader(it->first, it->second);
}
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp
index 9ce2128ead..c2b388bbce 100644
--- a/src/network/access/qnetworkrequest.cpp
+++ b/src/network/access/qnetworkrequest.cpp
@@ -98,6 +98,25 @@ QT_BEGIN_NAMESPACE
header and contains a QDateTime representing the last modification
date of the contents.
+ \value IfModifiedSinceHeader Corresponds to the HTTP If-Modified-Since
+ header and contains a QDateTime. It is usually added to a
+ QNetworkRequest. The server shall send a 304 (Not Modified) response
+ if the resource has not changed since this time.
+
+ \value ETagHeader Corresponds to the HTTP ETag
+ header and contains a QString representing the last modification
+ state of the contents.
+
+ \value IfMatchHeader Corresponds to the HTTP If-Match
+ header and contains a QStringList. It is usually added to a
+ QNetworkRequest. The server shall send a 412 (Precondition Failed)
+ response if the resource does not match.
+
+ \value IfNoneMatchHeader Corresponds to the HTTP If-None-Match
+ header and contains a QStringList. It is usually added to a
+ QNetworkRequest. The server shall send a 304 (Not Modified) response
+ if the resource does match.
+
\value CookieHeader Corresponds to the HTTP Cookie header
and contains a QList<QNetworkCookie> representing the cookies to
be sent back to the server.
@@ -788,6 +807,18 @@ static QByteArray headerName(QNetworkRequest::KnownHeaders header)
case QNetworkRequest::LastModifiedHeader:
return "Last-Modified";
+ case QNetworkRequest::IfModifiedSinceHeader:
+ return "If-Modified-Since";
+
+ case QNetworkRequest::ETagHeader:
+ return "ETag";
+
+ case QNetworkRequest::IfMatchHeader:
+ return "If-Match";
+
+ case QNetworkRequest::IfNoneMatchHeader:
+ return "If-None-Match";
+
case QNetworkRequest::CookieHeader:
return "Cookie";
@@ -818,6 +849,9 @@ static QByteArray headerValue(QNetworkRequest::KnownHeaders header, const QVaria
case QNetworkRequest::ContentDispositionHeader:
case QNetworkRequest::UserAgentHeader:
case QNetworkRequest::ServerHeader:
+ case QNetworkRequest::ETagHeader:
+ case QNetworkRequest::IfMatchHeader:
+ case QNetworkRequest::IfNoneMatchHeader:
return value.toByteArray();
case QNetworkRequest::LocationHeader:
@@ -830,6 +864,7 @@ static QByteArray headerValue(QNetworkRequest::KnownHeaders header, const QVaria
}
case QNetworkRequest::LastModifiedHeader:
+ case QNetworkRequest::IfModifiedSinceHeader:
switch (value.userType()) {
case QMetaType::QDate:
case QMetaType::QDateTime:
@@ -883,32 +918,46 @@ static int parseHeaderName(const QByteArray &headerName)
switch (tolower(headerName.at(0))) {
case 'c':
- if (qstricmp(headerName.constData(), "content-type") == 0)
+ if (headerName.compare("content-type", Qt::CaseInsensitive) == 0)
return QNetworkRequest::ContentTypeHeader;
- else if (qstricmp(headerName.constData(), "content-length") == 0)
+ else if (headerName.compare("content-length", Qt::CaseInsensitive) == 0)
return QNetworkRequest::ContentLengthHeader;
- else if (qstricmp(headerName.constData(), "cookie") == 0)
+ else if (headerName.compare("cookie", Qt::CaseInsensitive) == 0)
return QNetworkRequest::CookieHeader;
else if (qstricmp(headerName.constData(), "content-disposition") == 0)
return QNetworkRequest::ContentDispositionHeader;
break;
+ case 'e':
+ if (qstricmp(headerName.constData(), "etag") == 0)
+ return QNetworkRequest::ETagHeader;
+ break;
+
+ case 'i':
+ if (qstricmp(headerName.constData(), "if-modified-since") == 0)
+ return QNetworkRequest::IfModifiedSinceHeader;
+ if (qstricmp(headerName.constData(), "if-match") == 0)
+ return QNetworkRequest::IfMatchHeader;
+ if (qstricmp(headerName.constData(), "if-none-match") == 0)
+ return QNetworkRequest::IfNoneMatchHeader;
+ break;
+
case 'l':
- if (qstricmp(headerName.constData(), "location") == 0)
+ if (headerName.compare("location", Qt::CaseInsensitive) == 0)
return QNetworkRequest::LocationHeader;
- else if (qstricmp(headerName.constData(), "last-modified") == 0)
+ else if (headerName.compare("last-modified", Qt::CaseInsensitive) == 0)
return QNetworkRequest::LastModifiedHeader;
break;
case 's':
- if (qstricmp(headerName.constData(), "set-cookie") == 0)
+ if (headerName.compare("set-cookie", Qt::CaseInsensitive) == 0)
return QNetworkRequest::SetCookieHeader;
- else if (qstricmp(headerName.constData(), "server") == 0)
+ else if (headerName.compare("server", Qt::CaseInsensitive) == 0)
return QNetworkRequest::ServerHeader;
break;
case 'u':
- if (qstricmp(headerName.constData(), "user-agent") == 0)
+ if (headerName.compare("user-agent", Qt::CaseInsensitive) == 0)
return QNetworkRequest::UserAgentHeader;
break;
}
@@ -939,6 +988,61 @@ static QVariant parseCookieHeader(const QByteArray &raw)
return QVariant::fromValue(result);
}
+static QVariant parseETag(const QByteArray &raw)
+{
+ const QByteArray trimmed = raw.trimmed();
+ if (!trimmed.startsWith('"') && !trimmed.startsWith(R"(W/")"))
+ return QVariant();
+
+ if (!trimmed.endsWith('"'))
+ return QVariant();
+
+ return QString::fromLatin1(trimmed);
+}
+
+static QVariant parseIfMatch(const QByteArray &raw)
+{
+ const QByteArray trimmedRaw = raw.trimmed();
+ if (trimmedRaw == "*")
+ return QStringList(QStringLiteral("*"));
+
+ QStringList tags;
+ const QList<QByteArray> split = trimmedRaw.split(',');
+ for (const QByteArray &element : split) {
+ const QByteArray trimmed = element.trimmed();
+ if (!trimmed.startsWith('"'))
+ continue;
+
+ if (!trimmed.endsWith('"'))
+ continue;
+
+ tags += QString::fromLatin1(trimmed);
+ }
+ return tags;
+}
+
+static QVariant parseIfNoneMatch(const QByteArray &raw)
+{
+ const QByteArray trimmedRaw = raw.trimmed();
+ if (trimmedRaw == "*")
+ return QStringList(QStringLiteral("*"));
+
+ QStringList tags;
+ const QList<QByteArray> split = trimmedRaw.split(',');
+ for (const QByteArray &element : split) {
+ const QByteArray trimmed = element.trimmed();
+ if (!trimmed.startsWith('"') && !trimmed.startsWith(R"(W/")"))
+ continue;
+
+ if (!trimmed.endsWith('"'))
+ continue;
+
+ tags += QString::fromLatin1(trimmed);
+ }
+ return tags;
+}
+
+
static QVariant parseHeaderValue(QNetworkRequest::KnownHeaders header, const QByteArray &value)
{
// header is always a valid value
@@ -966,8 +1070,18 @@ static QVariant parseHeaderValue(QNetworkRequest::KnownHeaders header, const QBy
}
case QNetworkRequest::LastModifiedHeader:
+ case QNetworkRequest::IfModifiedSinceHeader:
return parseHttpDate(value);
+ case QNetworkRequest::ETagHeader:
+ return parseETag(value);
+
+ case QNetworkRequest::IfMatchHeader:
+ return parseIfMatch(value);
+
+ case QNetworkRequest::IfNoneMatchHeader:
+ return parseIfNoneMatch(value);
+
case QNetworkRequest::CookieHeader:
return parseCookieHeader(value);
@@ -986,7 +1100,7 @@ QNetworkHeadersPrivate::findRawHeader(const QByteArray &key) const
RawHeadersList::ConstIterator it = rawHeaders.constBegin();
RawHeadersList::ConstIterator end = rawHeaders.constEnd();
for ( ; it != end; ++it)
- if (qstricmp(it->first.constData(), key.constData()) == 0)
+ if (it->first.compare(key, Qt::CaseInsensitive) == 0)
return it;
return end; // not found
@@ -1067,7 +1181,7 @@ void QNetworkHeadersPrivate::setCookedHeader(QNetworkRequest::KnownHeaders heade
void QNetworkHeadersPrivate::setRawHeaderInternal(const QByteArray &key, const QByteArray &value)
{
auto firstEqualsKey = [&key](const RawHeaderPair &header) {
- return qstricmp(header.first.constData(), key.constData()) == 0;
+ return header.first.compare(key, Qt::CaseInsensitive) == 0;
};
rawHeaders.erase(std::remove_if(rawHeaders.begin(), rawHeaders.end(),
firstEqualsKey),
diff --git a/src/network/access/qnetworkrequest.h b/src/network/access/qnetworkrequest.h
index e104c139d9..8462eae8c8 100644
--- a/src/network/access/qnetworkrequest.h
+++ b/src/network/access/qnetworkrequest.h
@@ -63,7 +63,11 @@ public:
SetCookieHeader,
ContentDispositionHeader, // added for QMultipartMessage
UserAgentHeader,
- ServerHeader
+ ServerHeader,
+ IfModifiedSinceHeader,
+ ETagHeader,
+ IfMatchHeader,
+ IfNoneMatchHeader
};
enum Attribute {
HttpStatusCodeAttribute,
diff --git a/src/network/configure.json b/src/network/configure.json
index 4cbc476837..0215ad73c5 100644
--- a/src/network/configure.json
+++ b/src/network/configure.json
@@ -14,6 +14,7 @@
"openssl": { "type": "optionalString", "values": [ "no", "yes", "linked", "runtime" ] },
"openssl-linked": { "type": "void", "name": "openssl", "value": "linked" },
"openssl-runtime": { "type": "void", "name": "openssl", "value": "runtime" },
+ "dtls": "boolean",
"sctp": "boolean",
"securetransport": "boolean",
"ssl": "boolean",
@@ -149,6 +150,19 @@
"type": "compile",
"test": "unix/openssl11",
"use": "openssl"
+ },
+ "dtls": {
+ "label": "DTLS support in OpenSSL",
+ "type": "compile",
+ "test": {
+ "include": "openssl/ssl.h",
+ "tail": [
+ "#if defined(OPENSSL_NO_DTLS) || !defined(DTLS1_2_VERSION)",
+ "# error OpenSSL without DTLS support",
+ "#endif"
+ ]
+ },
+ "use": "openssl"
}
},
@@ -216,6 +230,13 @@
"condition": "config.winrt || features.securetransport || features.openssl",
"output": [ "publicFeature", "feature" ]
},
+ "dtls": {
+ "label": "DTLS",
+ "purpose": "Provides a DTLS implementation",
+ "section": "Networking",
+ "condition": "features.openssl && tests.dtls",
+ "output": [ "publicFeature" ]
+ },
"opensslv11": {
"label": "OpenSSL 1.1",
"condition": "features.openssl && tests.openssl11",
@@ -346,6 +367,7 @@ For example:
"openssl",
"openssl-linked",
"opensslv11",
+ "dtls",
"sctp",
"system-proxies"
]
diff --git a/src/network/configure.pri b/src/network/configure.pri
index f87b7f635f..fa502db1d1 100644
--- a/src/network/configure.pri
+++ b/src/network/configure.pri
@@ -3,7 +3,7 @@
defineTest(qtConfLibrary_openssl) {
libs = $$getenv("OPENSSL_LIBS")
!isEmpty(libs) {
- $${1}.libs = $$libs
+ eval($${1}.libs = $$libs)
export($${1}.libs)
return(true)
}
diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp
index c995e3fef2..34db5b4b31 100644
--- a/src/network/kernel/qauthenticator.cpp
+++ b/src/network/kernel/qauthenticator.cpp
@@ -412,7 +412,7 @@ void QAuthenticatorPrivate::parseHttpResponse(const QList<QPair<QByteArray, QByt
QByteArray headerVal;
for (int i = 0; i < values.size(); ++i) {
const QPair<QByteArray, QByteArray> &current = values.at(i);
- if (current.first.toLower() != search)
+ if (current.first.compare(search, Qt::CaseInsensitive) != 0)
continue;
QByteArray str = current.second.toLower();
if (method < Basic && str.startsWith("basic")) {
@@ -443,7 +443,7 @@ void QAuthenticatorPrivate::parseHttpResponse(const QList<QPair<QByteArray, QByt
break;
case DigestMd5: {
this->options[QLatin1String("realm")] = realm = QString::fromLatin1(options.value("realm"));
- if (options.value("stale").toLower() == "true")
+ if (options.value("stale").compare("true", Qt::CaseInsensitive) == 0)
phase = Start;
if (user.isEmpty() && password.isEmpty())
phase = Done;
@@ -630,7 +630,7 @@ static QByteArray digestMd5ResponseHelper(
hash.addData(":", 1);
hash.addData(password);
QByteArray ha1 = hash.result();
- if (alg.toLower() == "md5-sess") {
+ if (alg.compare("md5-sess", Qt::CaseInsensitive) == 0) {
hash.reset();
// RFC 2617 contains an error, it was:
// hash.addData(ha1);
@@ -650,7 +650,7 @@ static QByteArray digestMd5ResponseHelper(
hash.addData(method);
hash.addData(":", 1);
hash.addData(digestUri);
- if (qop.toLower() == "auth-int") {
+ if (qop.compare("auth-int", Qt::CaseInsensitive) == 0) {
hash.addData(":", 1);
hash.addData(hEntity);
}
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index 13e10e4102..4d9fda00ce 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -1609,7 +1609,10 @@ bool QAbstractSocketPrivate::bind(const QHostAddress &address, quint16 port, QAb
localPort = socketEngine->localPort();
emit q->stateChanged(state);
- if (socketType == QAbstractSocket::UdpSocket)
+ // A slot attached to stateChanged() signal can break our invariant:
+ // by closing the socket it will reset its socket engine - thus we
+ // have additional check (isValid()) ...
+ if (q->isValid() && socketType == QAbstractSocket::UdpSocket)
socketEngine->setReadNotificationEnabled(true);
return true;
}
diff --git a/src/network/socket/qhttpsocketengine.cpp b/src/network/socket/qhttpsocketengine.cpp
index b543ea7981..9427c3b00d 100644
--- a/src/network/socket/qhttpsocketengine.cpp
+++ b/src/network/socket/qhttpsocketengine.cpp
@@ -627,10 +627,9 @@ void QHttpSocketEngine::slotSocketReadNotification()
// from http spec is also allowed.
if (proxyConnectionHeader.isEmpty())
proxyConnectionHeader = d->reply->headerField("Connection");
- proxyConnectionHeader = proxyConnectionHeader.toLower();
- if (proxyConnectionHeader == "close") {
+ if (proxyConnectionHeader.compare("close", Qt::CaseSensitive) == 0) {
willClose = true;
- } else if (proxyConnectionHeader == "keep-alive") {
+ } else if (proxyConnectionHeader.compare("keep-alive", Qt::CaseInsensitive) == 0) {
willClose = false;
} else {
// no Proxy-Connection header, so use the default
diff --git a/src/network/ssl/qasn1element_p.h b/src/network/ssl/qasn1element_p.h
index 2c5019b4f7..2068254a95 100644
--- a/src/network/ssl/qasn1element_p.h
+++ b/src/network/ssl/qasn1element_p.h
@@ -58,10 +58,62 @@
QT_BEGIN_NAMESPACE
-#define RSA_ENCRYPTION_OID QByteArrayLiteral("1.2.840.113549.1.1.1")
+// General
+#define RSADSI_OID "1.2.840.113549."
+
+#define RSA_ENCRYPTION_OID QByteArrayLiteral(RSADSI_OID "1.1.1")
#define DSA_ENCRYPTION_OID QByteArrayLiteral("1.2.840.10040.4.1")
#define EC_ENCRYPTION_OID QByteArrayLiteral("1.2.840.10045.2.1")
+// These are mostly from the RFC for PKCS#5
+// PKCS#5: https://tools.ietf.org/html/rfc8018#appendix-B
+#define PKCS5_OID RSADSI_OID "1.5."
+// PKCS#12: https://tools.ietf.org/html/rfc7292#appendix-D)
+#define PKCS12_OID RSADSI_OID "1.12."
+
+// -PBES1
+#define PKCS5_MD2_DES_CBC_OID QByteArrayLiteral(PKCS5_OID "1") // Not (yet) implemented
+#define PKCS5_MD2_RC2_CBC_OID QByteArrayLiteral(PKCS5_OID "4") // Not (yet) implemented
+#define PKCS5_MD5_DES_CBC_OID QByteArrayLiteral(PKCS5_OID "3")
+#define PKCS5_MD5_RC2_CBC_OID QByteArrayLiteral(PKCS5_OID "6")
+#define PKCS5_SHA1_DES_CBC_OID QByteArrayLiteral(PKCS5_OID "10")
+#define PKCS5_SHA1_RC2_CBC_OID QByteArrayLiteral(PKCS5_OID "11")
+#define PKCS12_SHA1_RC4_128_OID QByteArrayLiteral(PKCS12_OID "1.1") // Not (yet) implemented
+#define PKCS12_SHA1_RC4_40_OID QByteArrayLiteral(PKCS12_OID "1.2") // Not (yet) implemented
+#define PKCS12_SHA1_3KEY_3DES_CBC_OID QByteArrayLiteral(PKCS12_OID "1.3")
+#define PKCS12_SHA1_2KEY_3DES_CBC_OID QByteArrayLiteral(PKCS12_OID "1.4")
+#define PKCS12_SHA1_RC2_128_CBC_OID QByteArrayLiteral(PKCS12_OID "1.5")
+#define PKCS12_SHA1_RC2_40_CBC_OID QByteArrayLiteral(PKCS12_OID "1.6")
+
+// -PBKDF2
+#define PKCS5_PBKDF2_ENCRYPTION_OID QByteArrayLiteral(PKCS5_OID "12")
+
+// -PBES2
+#define PKCS5_PBES2_ENCRYPTION_OID QByteArrayLiteral(PKCS5_OID "13")
+
+// Digest
+#define DIGEST_ALGORITHM_OID RSADSI_OID "2."
+// -HMAC-SHA-1
+#define HMAC_WITH_SHA1 QByteArrayLiteral(DIGEST_ALGORITHM_OID "7")
+// -HMAC-SHA-2
+#define HMAC_WITH_SHA224 QByteArrayLiteral(DIGEST_ALGORITHM_OID "8")
+#define HMAC_WITH_SHA256 QByteArrayLiteral(DIGEST_ALGORITHM_OID "9")
+#define HMAC_WITH_SHA384 QByteArrayLiteral(DIGEST_ALGORITHM_OID "10")
+#define HMAC_WITH_SHA512 QByteArrayLiteral(DIGEST_ALGORITHM_OID "11")
+#define HMAC_WITH_SHA512_224 QByteArrayLiteral(DIGEST_ALGORITHM_OID "12")
+#define HMAC_WITH_SHA512_256 QByteArrayLiteral(DIGEST_ALGORITHM_OID "13")
+
+// Encryption algorithms
+#define ENCRYPTION_ALGORITHM_OID RSADSI_OID "3."
+#define DES_CBC_ENCRYPTION_OID QByteArrayLiteral("1.3.14.3.2.7")
+#define DES_EDE3_CBC_ENCRYPTION_OID QByteArrayLiteral(ENCRYPTION_ALGORITHM_OID "7")
+#define RC2_CBC_ENCRYPTION_OID QByteArrayLiteral(ENCRYPTION_ALGORITHM_OID "2")
+#define RC5_CBC_ENCRYPTION_OID QByteArrayLiteral(ENCRYPTION_ALGORITHM_OID "9") // Not (yet) implemented
+#define AES_OID "2.16.840.1.101.3.4.1."
+#define AES128_CBC_ENCRYPTION_OID QByteArrayLiteral(AES_OID "2")
+#define AES192_CBC_ENCRYPTION_OID QByteArrayLiteral(AES_OID "22") // Not (yet) implemented
+#define AES256_CBC_ENCRYPTION_OID QByteArrayLiteral(AES_OID "42") // Not (yet) implemented
+
class Q_AUTOTEST_EXPORT QAsn1Element
{
public:
diff --git a/src/network/ssl/qdtls.cpp b/src/network/ssl/qdtls.cpp
new file mode 100644
index 0000000000..0b31da3d74
--- /dev/null
+++ b/src/network/ssl/qdtls.cpp
@@ -0,0 +1,568 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtNetwork 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qsslconfiguration.h"
+#include "qudpsocket.h"
+#include "qdtls_p.h"
+#include "qssl_p.h"
+#include "qdtls.h"
+
+#include "qglobal.h"
+
+#if QT_CONFIG(openssl)
+#include "qdtls_openssl_p.h"
+#endif // QT_CONFIG
+
+QT_BEGIN_NAMESPACE
+
+namespace
+{
+
+bool isDtlsProtocol(QSsl::SslProtocol protocol)
+{
+ switch (protocol) {
+ case QSsl::DtlsV1_0:
+ case QSsl::DtlsV1_0OrLater:
+ case QSsl::DtlsV1_2:
+ case QSsl::DtlsV1_2OrLater:
+ return true;
+ default:
+ return false;
+ }
+}
+
+}
+
+QSslConfiguration QDtlsBasePrivate::configuration() const
+{
+ auto copyPrivate = new QSslConfigurationPrivate(dtlsConfiguration);
+ copyPrivate->ref.store(0); // the QSslConfiguration constructor refs up
+ QSslConfiguration copy(copyPrivate);
+ copyPrivate->sessionCipher = sessionCipher;
+ copyPrivate->sessionProtocol = sessionProtocol;
+
+ return copy;
+}
+
+void QDtlsBasePrivate::setConfiguration(const QSslConfiguration &configuration)
+{
+ dtlsConfiguration.localCertificateChain = configuration.localCertificateChain();
+ dtlsConfiguration.privateKey = configuration.privateKey();
+ dtlsConfiguration.ciphers = configuration.ciphers();
+ dtlsConfiguration.ellipticCurves = configuration.ellipticCurves();
+ dtlsConfiguration.preSharedKeyIdentityHint = configuration.preSharedKeyIdentityHint();
+ dtlsConfiguration.dhParams = configuration.diffieHellmanParameters();
+ dtlsConfiguration.caCertificates = configuration.caCertificates();
+ dtlsConfiguration.peerVerifyDepth = configuration.peerVerifyDepth();
+ dtlsConfiguration.peerVerifyMode = configuration.peerVerifyMode();
+ Q_ASSERT(isDtlsProtocol(configuration.protocol()));
+ dtlsConfiguration.protocol = configuration.protocol();
+ dtlsConfiguration.sslOptions = configuration.d->sslOptions;
+ dtlsConfiguration.sslSession = configuration.sessionTicket();
+ dtlsConfiguration.sslSessionTicketLifeTimeHint = configuration.sessionTicketLifeTimeHint();
+ dtlsConfiguration.nextAllowedProtocols = configuration.allowedNextProtocols();
+ dtlsConfiguration.nextNegotiatedProtocol = configuration.nextNegotiatedProtocol();
+ dtlsConfiguration.nextProtocolNegotiationStatus = configuration.nextProtocolNegotiationStatus();
+ dtlsConfiguration.dtlsCookieEnabled = configuration.dtlsCookieVerificationEnabled();
+
+ clearDtlsError();
+}
+
+bool QDtlsBasePrivate::setCookieGeneratorParameters(QCryptographicHash::Algorithm alg,
+ const QByteArray &key)
+{
+ if (!key.size()) {
+ setDtlsError(QDtlsError::InvalidInputParameters,
+ QDtls::tr("Invalid (empty) secret"));
+ return false;
+ }
+
+ clearDtlsError();
+
+ hashAlgorithm = alg;
+ secret = key;
+
+ return true;
+}
+
+QDtlsClientVerifier::QDtlsClientVerifier(QObject *parent)
+#if QT_CONFIG(openssl)
+ : QObject(*new QDtlsClientVerifierOpenSSL, parent)
+#endif // openssl
+{
+ Q_D(QDtlsClientVerifier);
+
+ d->mode = QSslSocket::SslServerMode;
+ // The default configuration suffices: verifier never does a full
+ // handshake and upon verifying a cookie in a client hello message,
+ // it reports success.
+ auto conf = QSslConfiguration::defaultDtlsConfiguration();
+ conf.setPeerVerifyMode(QSslSocket::VerifyNone);
+ d->setConfiguration(conf);
+}
+
+bool QDtlsClientVerifier::setCookieGeneratorParameters(const GeneratorParameters &params)
+{
+ Q_D(QDtlsClientVerifier);
+
+ return d->setCookieGeneratorParameters(params.hash, params.secret);
+}
+
+QDtlsClientVerifier::GeneratorParameters QDtlsClientVerifier::cookieGeneratorParameters() const
+{
+ Q_D(const QDtlsClientVerifier);
+
+ return {d->hashAlgorithm, d->secret};
+}
+
+static QString msgUnsupportedMulticastAddress()
+{
+ return QDtls::tr("Multicast and broadcast addresses are not supported");
+}
+
+bool QDtlsClientVerifier::verifyClient(QUdpSocket *socket, const QByteArray &dgram,
+ const QHostAddress &address, quint16 port)
+{
+ Q_D(QDtlsClientVerifier);
+
+ if (!socket || address.isNull() || !dgram.size()) {
+ d->setDtlsError(QDtlsError::InvalidInputParameters,
+ tr("A valid UDP socket, non-empty datagram, valid address/port were expected"));
+ return false;
+ }
+
+ if (address.isBroadcast() || address.isMulticast()) {
+ d->setDtlsError(QDtlsError::InvalidInputParameters,
+ msgUnsupportedMulticastAddress());
+ return false;
+ }
+
+ return d->verifyClient(socket, dgram, address, port);
+}
+
+QByteArray QDtlsClientVerifier::verifiedHello() const
+{
+ Q_D(const QDtlsClientVerifier);
+
+ return d->verifiedClientHello;
+}
+
+QDtlsError QDtlsClientVerifier::dtlsError() const
+{
+ Q_D(const QDtlsClientVerifier);
+
+ return d->errorCode;
+}
+
+QString QDtlsClientVerifier::dtlsErrorString() const
+{
+ Q_D(const QDtlsBase);
+
+ return d->errorDescription;
+}
+
+QDtls::QDtls(QSslSocket::SslMode mode, QObject *parent)
+#if QT_CONFIG(openssl)
+ : QObject(*new QDtlsPrivateOpenSSL, parent)
+#endif
+{
+ Q_D(QDtls);
+
+ d->mode = mode;
+ setDtlsConfiguration(QSslConfiguration::defaultDtlsConfiguration());
+}
+
+bool QDtls::setRemote(const QHostAddress &address, quint16 port,
+ const QString &verificationName)
+{
+ Q_D(QDtls);
+
+ if (d->handshakeState != HandshakeNotStarted) {
+ d->setDtlsError(QDtlsError::InvalidOperation,
+ tr("Cannot set remote after handshake started"));
+ return false;
+ }
+
+ if (address.isNull()) {
+ d->setDtlsError(QDtlsError::InvalidInputParameters,
+ tr("Invalid address"));
+ return false;
+ }
+
+ if (address.isBroadcast() || address.isMulticast()) {
+ d->setDtlsError(QDtlsError::InvalidInputParameters,
+ msgUnsupportedMulticastAddress());
+ return false;
+ }
+
+ d->clearDtlsError();
+
+ d->remoteAddress = address;
+ d->remotePort = port;
+ d->peerVerificationName = verificationName;
+
+ return true;
+}
+
+bool QDtls::setPeerVerificationName(const QString &name)
+{
+ Q_D(QDtls);
+
+ if (d->handshakeState != HandshakeNotStarted) {
+ d->setDtlsError(QDtlsError::InvalidOperation,
+ tr("Cannot set verification name after handshake started"));
+ return false;
+ }
+
+ d->clearDtlsError();
+ d->peerVerificationName = name;
+
+ return true;
+}
+
+QHostAddress QDtls::remoteAddress() const
+{
+ Q_D(const QDtls);
+
+ return d->remoteAddress;
+}
+
+quint16 QDtls::remotePort() const
+{
+ Q_D(const QDtlsBase);
+
+ return d->remotePort;
+}
+
+QString QDtls::peerVerificationName() const
+{
+ Q_D(const QDtls);
+
+ return d->peerVerificationName;
+}
+
+QSslSocket::SslMode QDtls::sslMode() const
+{
+ Q_D(const QDtls);
+
+ return d->mode;
+}
+
+void QDtls::setMtuHint(quint16 mtuHint)
+{
+ Q_D(QDtls);
+
+ d->mtuHint = mtuHint;
+}
+
+quint16 QDtls::mtuHint() const
+{
+ Q_D(const QDtls);
+
+ return d->mtuHint;
+}
+
+bool QDtls::setCookieGeneratorParameters(const GeneratorParameters &params)
+{
+ Q_D(QDtls);
+
+ return d->setCookieGeneratorParameters(params.hash, params.secret);
+}
+
+QDtls::GeneratorParameters QDtls::cookieGeneratorParameters() const
+{
+ Q_D(const QDtls);
+
+ return {d->hashAlgorithm, d->secret};
+}
+
+bool QDtls::setDtlsConfiguration(const QSslConfiguration &configuration)
+{
+ Q_D(QDtls);
+
+ if (d->handshakeState != HandshakeNotStarted) {
+ d->setDtlsError(QDtlsError::InvalidOperation,
+ tr("Cannot set configuration after handshake started"));
+ return false;
+ }
+
+ if (isDtlsProtocol(configuration.protocol())) {
+ d->setConfiguration(configuration);
+ return true;
+ }
+
+ d->setDtlsError(QDtlsError::InvalidInputParameters, tr("Unsupported protocol"));
+ return false;
+}
+
+QSslConfiguration QDtls::dtlsConfiguration() const
+{
+ Q_D(const QDtls);
+
+ return d->configuration();
+}
+
+QDtls::HandshakeState QDtls::handshakeState()const
+{
+ Q_D(const QDtls);
+
+ return d->handshakeState;
+}
+
+bool QDtls::doHandshake(QUdpSocket *socket, const QByteArray &dgram)
+{
+ Q_D(QDtls);
+
+ if (d->handshakeState == HandshakeNotStarted)
+ return startHandshake(socket, dgram);
+ else if (d->handshakeState == HandshakeInProgress)
+ return continueHandshake(socket, dgram);
+
+ d->setDtlsError(QDtlsError::InvalidOperation,
+ tr("Cannot start/continue handshake, invalid handshake state"));
+ return false;
+}
+
+bool QDtls::startHandshake(QUdpSocket *socket, const QByteArray &datagram)
+{
+ Q_D(QDtls);
+
+ if (!socket) {
+ d->setDtlsError(QDtlsError::InvalidInputParameters, tr("Invalid (nullptr) socket"));
+ return false;
+ }
+
+ if (d->remoteAddress.isNull()) {
+ d->setDtlsError(QDtlsError::InvalidOperation,
+ tr("To start a handshake you must set remote address and port first"));
+ return false;
+ }
+
+ if (sslMode() == QSslSocket::SslServerMode && !datagram.size()) {
+ d->setDtlsError(QDtlsError::InvalidInputParameters,
+ tr("To start a handshake, DTLS server requires non-empty datagram (client hello)"));
+ return false;
+ }
+
+ if (d->handshakeState != HandshakeNotStarted) {
+ d->setDtlsError(QDtlsError::InvalidOperation,
+ tr("Cannot start handshake, already done/in progress"));
+ return false;
+ }
+
+ return d->startHandshake(socket, datagram);
+}
+
+bool QDtls::handleTimeout(QUdpSocket *socket)
+{
+ Q_D(QDtls);
+
+ if (!socket) {
+ d->setDtlsError(QDtlsError::InvalidInputParameters, tr("Invalid (nullptr) socket"));
+ return false;
+ }
+
+ return d->handleTimeout(socket);
+}
+
+bool QDtls::continueHandshake(QUdpSocket *socket, const QByteArray &datagram)
+{
+ Q_D(QDtls);
+
+ if (!socket || !datagram.size()) {
+ d->setDtlsError(QDtlsError::InvalidInputParameters,
+ tr("A valid QUdpSocket and non-empty datagram are needed to continue the handshake"));
+ return false;
+ }
+
+ if (d->handshakeState != HandshakeInProgress) {
+ d->setDtlsError(QDtlsError::InvalidOperation,
+ tr("Cannot continue handshake, not in InProgress state"));
+ return false;
+ }
+
+ return d->continueHandshake(socket, datagram);
+}
+
+bool QDtls::resumeHandshakeAfterError(QUdpSocket *socket)
+{
+ Q_D(QDtls);
+
+ if (!socket) {
+ d->setDtlsError(QDtlsError::InvalidInputParameters, tr("Invalid (nullptr) socket"));
+ return false;
+ }
+
+ if (d->handshakeState != PeerVerificationFailed) {
+ d->setDtlsError(QDtlsError::InvalidOperation,
+ tr("Cannot resume, not in VerificationError state"));
+ return false;
+ }
+
+ return d->resumeHandshake(socket);
+}
+
+bool QDtls::abortHandshakeAfterError(QUdpSocket *socket)
+{
+ Q_D(QDtls);
+
+ if (!socket) {
+ d->setDtlsError(QDtlsError::InvalidInputParameters, tr("Invalid (nullptr) socket"));
+ return false;
+ }
+
+ if (d->handshakeState != PeerVerificationFailed) {
+ d->setDtlsError(QDtlsError::InvalidOperation,
+ tr("Not in VerificationError state, nothing to abort"));
+ return false;
+ }
+
+ d->abortHandshake(socket);
+ return true;
+}
+
+bool QDtls::sendShutdownAlert(QUdpSocket *socket)
+{
+ Q_D(QDtls);
+
+ if (!socket) {
+ d->setDtlsError(QDtlsError::InvalidInputParameters,
+ tr("Invalid (nullptr) socket"));
+ return false;
+ }
+
+ if (!d->connectionEncrypted) {
+ d->setDtlsError(QDtlsError::InvalidOperation,
+ tr("Cannot send shutdown alert, not encrypted"));
+ return false;
+ }
+
+ d->sendShutdownAlert(socket);
+ return true;
+}
+
+bool QDtls::connectionEncrypted() const
+{
+ Q_D(const QDtls);
+
+ return d->connectionEncrypted;
+}
+
+QSslCipher QDtls::sessionCipher() const
+{
+ Q_D(const QDtls);
+
+ return d->sessionCipher;
+}
+
+QSsl::SslProtocol QDtls::sessionProtocol() const
+{
+ Q_D(const QDtls);
+
+ return d->sessionProtocol;
+}
+
+qint64 QDtls::writeDatagramEncrypted(QUdpSocket *socket, const QByteArray &dgram)
+{
+ Q_D(QDtls);
+
+ if (!socket) {
+ d->setDtlsError(QDtlsError::InvalidInputParameters, tr("Invalid (nullptr) socket"));
+ return -1;
+ }
+
+ if (!connectionEncrypted()) {
+ d->setDtlsError(QDtlsError::InvalidOperation,
+ tr("Cannot write a datagram, not in encrypted state"));
+ return -1;
+ }
+
+ return d->writeDatagramEncrypted(socket, dgram);
+}
+
+QByteArray QDtls::decryptDatagram(QUdpSocket *socket, const QByteArray &dgram)
+{
+ Q_D(QDtls);
+
+ if (!socket) {
+ d->setDtlsError(QDtlsError::InvalidInputParameters, tr("Invalid (nullptr) socket"));
+ return {};
+ }
+
+ if (!connectionEncrypted()) {
+ d->setDtlsError(QDtlsError::InvalidOperation,
+ tr("Cannot read a datagram, not in encrypted state"));
+ return {};
+ }
+
+ if (!dgram.size())
+ return {};
+
+ return d->decryptDatagram(socket, dgram);
+}
+
+QDtlsError QDtls::dtlsError() const
+{
+ Q_D(const QDtls);
+
+ return d->errorCode;
+}
+
+QString QDtls::dtlsErrorString() const
+{
+ Q_D(const QDtls);
+
+ return d->errorDescription;
+}
+
+QVector<QSslError> QDtls::peerVerificationErrors() const
+{
+ Q_D(const QDtls);
+
+ return d->tlsErrors;
+}
+
+void QDtls::ignoreVerificationErrors(const QVector<QSslError> &errorsToIgnore)
+{
+ Q_D(QDtls);
+
+ d->tlsErrorsToIgnore = errorsToIgnore;
+}
+
+QT_END_NAMESPACE
diff --git a/src/network/ssl/qdtls.h b/src/network/ssl/qdtls.h
new file mode 100644
index 0000000000..34362e6f13
--- /dev/null
+++ b/src/network/ssl/qdtls.h
@@ -0,0 +1,187 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtNetwork 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDTLS_H
+#define QDTLS_H
+
+#include <QtNetwork/qtnetworkglobal.h>
+
+#include <QtNetwork/qsslsocket.h>
+#include <QtNetwork/qssl.h>
+
+#include <QtCore/qcryptographichash.h>
+#include <QtCore/qobject.h>
+
+QT_REQUIRE_CONFIG(dtls);
+
+QT_BEGIN_NAMESPACE
+
+enum class QDtlsError : unsigned char
+{
+ NoError,
+ InvalidInputParameters,
+ InvalidOperation,
+ UnderlyingSocketError,
+ RemoteClosedConnectionError,
+ PeerVerificationError,
+ TlsInitializationError,
+ TlsFatalError,
+ TlsNonFatalError
+};
+
+class QHostAddress;
+class QUdpSocket;
+class QByteArray;
+class QString;
+
+class QDtlsClientVerifierPrivate;
+class Q_NETWORK_EXPORT QDtlsClientVerifier : public QObject
+{
+ Q_OBJECT
+
+public:
+
+ explicit QDtlsClientVerifier(QObject *parent = nullptr);
+
+ struct GeneratorParameters
+ {
+ GeneratorParameters() = default;
+ GeneratorParameters(QCryptographicHash::Algorithm a, const QByteArray &s)
+ : hash(a), secret(s)
+ {
+ }
+ QCryptographicHash::Algorithm hash = QCryptographicHash::Sha1;
+ QByteArray secret;
+ };
+
+ bool setCookieGeneratorParameters(const GeneratorParameters &params);
+ GeneratorParameters cookieGeneratorParameters() const;
+
+ bool verifyClient(QUdpSocket *socket, const QByteArray &dgram,
+ const QHostAddress &address, quint16 port);
+ QByteArray verifiedHello() const;
+
+ QDtlsError dtlsError() const;
+ QString dtlsErrorString() const;
+
+private:
+
+ Q_DECLARE_PRIVATE(QDtlsClientVerifier)
+ Q_DISABLE_COPY(QDtlsClientVerifier)
+};
+
+class QSslPreSharedKeyAuthenticator;
+template<class> class QVector;
+class QSslConfiguration;
+class QSslCipher;
+class QSslError;
+
+class QDtlsPrivate;
+class Q_NETWORK_EXPORT QDtls : public QObject
+{
+ Q_OBJECT
+
+public:
+
+ enum HandshakeState
+ {
+ HandshakeNotStarted,
+ HandshakeInProgress,
+ PeerVerificationFailed,
+ HandshakeComplete
+ };
+
+ explicit QDtls(QSslSocket::SslMode mode, QObject *parent = nullptr);
+
+ bool setRemote(const QHostAddress &address, quint16 port,
+ const QString &verificationName = {});
+ bool setPeerVerificationName(const QString &name);
+ QHostAddress remoteAddress() const;
+ quint16 remotePort() const;
+ QString peerVerificationName() const;
+ QSslSocket::SslMode sslMode() const;
+
+ void setMtuHint(quint16 mtuHint);
+ quint16 mtuHint() const;
+
+ using GeneratorParameters = QDtlsClientVerifier::GeneratorParameters;
+ bool setCookieGeneratorParameters(const GeneratorParameters &params);
+ GeneratorParameters cookieGeneratorParameters() const;
+
+ bool setDtlsConfiguration(const QSslConfiguration &configuration);
+ QSslConfiguration dtlsConfiguration() const;
+
+ HandshakeState handshakeState() const;
+
+ bool doHandshake(QUdpSocket *socket, const QByteArray &dgram = {});
+ bool handleTimeout(QUdpSocket *socket);
+ bool resumeHandshakeAfterError(QUdpSocket *socket);
+ bool abortHandshakeAfterError(QUdpSocket *socket);
+ bool sendShutdownAlert(QUdpSocket *socket);
+
+ bool connectionEncrypted() const;
+ QSslCipher sessionCipher() const;
+ QSsl::SslProtocol sessionProtocol() const;
+
+ qint64 writeDatagramEncrypted(QUdpSocket *socket, const QByteArray &dgram);
+ QByteArray decryptDatagram(QUdpSocket *socket, const QByteArray &dgram);
+
+ QDtlsError dtlsError() const;
+ QString dtlsErrorString() const;
+
+ QVector<QSslError> peerVerificationErrors() const;
+ void ignoreVerificationErrors(const QVector<QSslError> &errorsToIgnore);
+
+Q_SIGNALS:
+
+ void pskRequired(QSslPreSharedKeyAuthenticator *authenticator);
+ void handshakeTimeout();
+
+private:
+
+ bool startHandshake(QUdpSocket *socket, const QByteArray &dgram);
+ bool continueHandshake(QUdpSocket *socket, const QByteArray &dgram);
+
+ Q_DECLARE_PRIVATE(QDtls)
+ Q_DISABLE_COPY(QDtls)
+};
+
+QT_END_NAMESPACE
+
+#endif // QDTLS_H
diff --git a/src/network/ssl/qdtls_openssl.cpp b/src/network/ssl/qdtls_openssl.cpp
new file mode 100644
index 0000000000..90457c3724
--- /dev/null
+++ b/src/network/ssl/qdtls_openssl.cpp
@@ -0,0 +1,1447 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtNetwork 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef NOMINMAX
+#define NOMINMAX
+#endif // NOMINMAX
+#include "private/qnativesocketengine_p.h"
+
+#include "qsslpresharedkeyauthenticator_p.h"
+#include "qsslsocket_openssl_symbols_p.h"
+#include "qsslsocket_openssl_p.h"
+#include "qsslcertificate_p.h"
+#include "qdtls_openssl_p.h"
+#include "qudpsocket.h"
+#include "qssl_p.h"
+
+#include "qmessageauthenticationcode.h"
+#include "qcryptographichash.h"
+
+#include "qdebug.h"
+
+#include <cstring>
+#include <cstddef>
+
+QT_BEGIN_NAMESPACE
+
+#define QT_DTLS_VERBOSE 0
+
+#if QT_DTLS_VERBOSE
+
+#define qDtlsWarning(arg) qWarning(arg)
+#define qDtlsDebug(arg) qDebug(arg)
+
+#else
+
+#define qDtlsWarning(arg)
+#define qDtlsDebug(arg)
+
+#endif // QT_DTLS_VERBOSE
+
+namespace dtlsutil
+{
+
+QByteArray cookie_for_peer(SSL *ssl)
+{
+ Q_ASSERT(ssl);
+
+ // SSL_get_rbio does not increment the reference count
+ BIO *readBIO = q_SSL_get_rbio(ssl);
+ if (!readBIO) {
+ qCWarning(lcSsl, "No BIO (dgram) found in SSL object");
+ return {};
+ }
+
+ auto listener = static_cast<dtlsopenssl::DtlsState *>(q_BIO_get_app_data(readBIO));
+ if (!listener) {
+ qCWarning(lcSsl, "BIO_get_app_data returned invalid (nullptr) value");
+ return {};
+ }
+
+ const QHostAddress peerAddress(listener->remoteAddress);
+ const quint16 peerPort(listener->remotePort);
+ QByteArray peerData;
+ if (peerAddress.protocol() == QAbstractSocket::IPv6Protocol) {
+ const Q_IPV6ADDR sin6_addr(peerAddress.toIPv6Address());
+ peerData.resize(int(sizeof sin6_addr + sizeof peerPort));
+ char *dst = peerData.data();
+ std::memcpy(dst, &peerPort, sizeof peerPort);
+ dst += sizeof peerPort;
+ std::memcpy(dst, &sin6_addr, sizeof sin6_addr);
+ } else if (peerAddress.protocol() == QAbstractSocket::IPv4Protocol) {
+ const quint32 sin_addr(peerAddress.toIPv4Address());
+ peerData.resize(int(sizeof sin_addr + sizeof peerPort));
+ char *dst = peerData.data();
+ std::memcpy(dst, &peerPort, sizeof peerPort);
+ dst += sizeof peerPort;
+ std::memcpy(dst, &sin_addr, sizeof sin_addr);
+ } else {
+ Q_UNREACHABLE();
+ }
+
+ return peerData;
+}
+
+struct FallbackCookieSecret
+{
+ FallbackCookieSecret()
+ {
+ key.resize(32);
+ const int status = q_RAND_bytes(reinterpret_cast<unsigned char *>(key.data()),
+ key.size());
+ if (status <= 0)
+ key.clear();
+ }
+
+ QByteArray key;
+
+ Q_DISABLE_COPY(FallbackCookieSecret)
+};
+
+QByteArray fallbackSecret()
+{
+ static const FallbackCookieSecret generator;
+ return generator.key;
+}
+
+int next_timeoutMs(SSL *tlsConnection)
+{
+ Q_ASSERT(tlsConnection);
+ timeval timeLeft = {};
+ q_DTLSv1_get_timeout(tlsConnection, &timeLeft);
+ return timeLeft.tv_sec * 1000;
+}
+
+
+void delete_connection(SSL *ssl)
+{
+ // The 'deleter' for QSharedPointer<SSL>.
+ if (ssl)
+ q_SSL_free(ssl);
+}
+
+#if QT_CONFIG(opensslv11)
+
+void delete_BIO_ADDR(BIO_ADDR *bio)
+{
+ // A deleter for QSharedPointer<BIO_ADDR>
+ if (bio)
+ q_BIO_ADDR_free(bio);
+}
+
+void delete_bio_method(BIO_METHOD *method)
+{
+ // The 'deleter' for QSharedPointer<BIO_METHOD>.
+ if (method)
+ q_BIO_meth_free(method);
+}
+
+#endif // openssl 1.1
+
+// The 'deleter' for QScopedPointer<BIO>.
+struct bio_deleter
+{
+ static void cleanup(BIO *bio)
+ {
+ if (bio)
+ q_BIO_free(bio);
+ }
+};
+
+// The path MTU discovery is non-trivial: it's a mix of getsockopt/setsockopt
+// (IP_MTU/IP6_MTU/IP_MTU_DISCOVER) and fallback MTU values. It's not
+// supported on all platforms, worse so - imposes specific requirements on
+// underlying UDP socket etc. So for now, we either try a user-proposed MTU
+// hint or rely on our own fallback value. As a fallback mtu OpenSSL uses 576
+// for IPv4 and 1280 for IPv6 (RFC 791, RFC 2460). To KIS we use 576. This
+// rather small MTU value does not affect the size that can be read/written
+// by QDtls, only a handshake (which is allowed to fragment).
+enum class MtuGuess : long
+{
+ defaultMtu = 576
+};
+
+} // namespace dtlsutil
+
+namespace dtlscallbacks
+{
+
+extern "C" int q_generate_cookie_callback(SSL *ssl, unsigned char *dst,
+ unsigned *cookieLength)
+{
+ if (!ssl || !dst || !cookieLength) {
+ qCWarning(lcSsl,
+ "Failed to generate cookie - invalid (nullptr) parameter(s)");
+ return 0;
+ }
+
+ void *generic = q_SSL_get_ex_data(ssl, QSslSocketBackendPrivate::s_indexForSSLExtraData);
+ if (!generic) {
+ qCWarning(lcSsl, "SSL_get_ex_data returned nullptr, cannot generate cookie");
+ return 0;
+ }
+
+ *cookieLength = 0;
+
+ auto dtls = static_cast<dtlsopenssl::DtlsState *>(generic);
+ if (!dtls->secret.size())
+ return 0;
+
+ const QByteArray peerData(dtlsutil::cookie_for_peer(ssl));
+ if (!peerData.size())
+ return 0;
+
+ QMessageAuthenticationCode hmac(dtls->hashAlgorithm, dtls->secret);
+ hmac.addData(peerData);
+ const QByteArray cookie = hmac.result();
+ Q_ASSERT(cookie.size() >= 0);
+ // DTLS1_COOKIE_LENGTH is erroneously 256 bytes long, must be 255 - RFC 6347, 4.2.1.
+ *cookieLength = qMin(DTLS1_COOKIE_LENGTH - 1, cookie.size());
+ std::memcpy(dst, cookie.constData(), *cookieLength);
+
+ return 1;
+}
+
+extern "C" int q_verify_cookie_callback(SSL *ssl, const unsigned char *cookie,
+ unsigned cookieLength)
+{
+ if (!ssl || !cookie || !cookieLength) {
+ qCWarning(lcSsl, "Could not verify cookie, invalid (nullptr or zero) parameters");
+ return 0;
+ }
+
+ unsigned char newCookie[DTLS1_COOKIE_LENGTH] = {};
+ unsigned newCookieLength = 0;
+ if (q_generate_cookie_callback(ssl, newCookie, &newCookieLength) != 1)
+ return 0;
+
+ return newCookieLength == cookieLength
+ && !std::memcmp(cookie, newCookie, cookieLength);
+}
+
+extern "C" int q_X509DtlsCallback(int ok, X509_STORE_CTX *ctx)
+{
+ if (!ok) {
+ // Store the error and at which depth the error was detected.
+ SSL *ssl = static_cast<SSL *>(q_X509_STORE_CTX_get_ex_data(ctx, q_SSL_get_ex_data_X509_STORE_CTX_idx()));
+ if (!ssl) {
+ qCWarning(lcSsl, "X509_STORE_CTX_get_ex_data returned nullptr, handshake failure");
+ return 0;
+ }
+
+ void *generic = q_SSL_get_ex_data(ssl, QSslSocketBackendPrivate::s_indexForSSLExtraData);
+ if (!generic) {
+ qCWarning(lcSsl, "SSL_get_ex_data returned nullptr, handshake failure");
+ return 0;
+ }
+
+ auto dtls = static_cast<dtlsopenssl::DtlsState *>(generic);
+ dtls->x509Errors.append(QSslErrorEntry::fromStoreContext(ctx));
+ }
+
+ // Always return 1 (OK) to allow verification to continue. We handle the
+ // errors gracefully after collecting all errors, after verification has
+ // completed.
+ return 1;
+}
+
+extern "C" unsigned q_PSK_client_callback(SSL *ssl, const char *hint, char *identity,
+ unsigned max_identity_len, unsigned char *psk,
+ unsigned max_psk_len)
+{
+ auto *dtls = static_cast<dtlsopenssl::DtlsState *>(q_SSL_get_ex_data(ssl,
+ QSslSocketBackendPrivate::s_indexForSSLExtraData));
+ if (!dtls)
+ return 0;
+
+ Q_ASSERT(dtls->dtlsPrivate);
+ return dtls->dtlsPrivate->pskClientCallback(hint, identity, max_identity_len, psk, max_psk_len);
+}
+
+extern "C" unsigned q_PSK_server_callback(SSL *ssl, const char *identity, unsigned char *psk,
+ unsigned max_psk_len)
+{
+ auto *dtls = static_cast<dtlsopenssl::DtlsState *>(q_SSL_get_ex_data(ssl,
+ QSslSocketBackendPrivate::s_indexForSSLExtraData));
+ if (!dtls)
+ return 0;
+
+ Q_ASSERT(dtls->dtlsPrivate);
+ return dtls->dtlsPrivate->pskServerCallback(identity, psk, max_psk_len);
+}
+
+} // namespace dtlscallbacks
+
+namespace dtlsbio
+{
+
+extern "C" int q_dgram_read(BIO *bio, char *dst, int bytesToRead)
+{
+ if (!bio || !dst || bytesToRead <= 0) {
+ qCWarning(lcSsl, "invalid input parameter(s)");
+ return 0;
+ }
+
+ q_BIO_clear_retry_flags(bio);
+
+ auto dtls = static_cast<dtlsopenssl::DtlsState *>(q_BIO_get_app_data(bio));
+ // It's us who set data, if OpenSSL does too, the logic here is wrong
+ // then and we have to use BIO_set_app_data then!
+ Q_ASSERT(dtls);
+ int bytesRead = 0;
+ if (dtls->dgram.size()) {
+ bytesRead = qMin(dtls->dgram.size(), bytesToRead);
+ std::memcpy(dst, dtls->dgram.constData(), bytesRead);
+
+ if (!dtls->peeking)
+ dtls->dgram = dtls->dgram.mid(bytesRead);
+ } else {
+ bytesRead = -1;
+ }
+
+ if (bytesRead <= 0)
+ q_BIO_set_retry_read(bio);
+
+ return bytesRead;
+}
+
+extern "C" int q_dgram_write(BIO *bio, const char *src, int bytesToWrite)
+{
+ if (!bio || !src || bytesToWrite <= 0) {
+ qCWarning(lcSsl, "invalid input parameter(s)");
+ return 0;
+ }
+
+ q_BIO_clear_retry_flags(bio);
+
+ auto dtls = static_cast<dtlsopenssl::DtlsState *>(q_BIO_get_app_data(bio));
+ Q_ASSERT(dtls);
+ if (dtls->writeSuppressed) {
+ // See the comment in QDtls::startHandshake.
+ return bytesToWrite;
+ }
+
+ QUdpSocket *udpSocket = dtls->udpSocket;
+ Q_ASSERT(udpSocket);
+
+ const QByteArray dgram(QByteArray::fromRawData(src, bytesToWrite));
+ qint64 bytesWritten = -1;
+ if (udpSocket->state() == QAbstractSocket::ConnectedState) {
+ bytesWritten = udpSocket->write(dgram);
+ } else {
+ bytesWritten = udpSocket->writeDatagram(dgram, dtls->remoteAddress,
+ dtls->remotePort);
+ }
+
+ if (bytesWritten <= 0)
+ q_BIO_set_retry_write(bio);
+
+ Q_ASSERT(bytesWritten <= std::numeric_limits<int>::max());
+ return int(bytesWritten);
+}
+
+extern "C" int q_dgram_puts(BIO *bio, const char *src)
+{
+ if (!bio || !src) {
+ qCWarning(lcSsl, "invalid input parameter(s)");
+ return 0;
+ }
+
+ return q_dgram_write(bio, src, int(std::strlen(src)));
+}
+
+extern "C" long q_dgram_ctrl(BIO *bio, int cmd, long num, void *ptr)
+{
+ // This is our custom BIO_ctrl. bio.h defines a lot of BIO_CTRL_*
+ // and BIO_* constants and BIO_somename macros that expands to BIO_ctrl
+ // call with one of those constants as argument. What exactly BIO_ctrl
+ // does - depends on the 'cmd' and the type of BIO (so BIO_ctrl does
+ // not even have a single well-defined value meaning success or failure).
+ // We handle only the most generic commands - the ones documented for
+ // BIO_ctrl - and also DGRAM specific ones. And even for them - in most
+ // cases we do nothing but report a success or some non-error value.
+ // Documents also state: "Source/sink BIOs return an 0 if they do not
+ // recognize the BIO_ctrl() operation." - these are covered by 'default'
+ // label in the switch-statement below. Debug messages in the switch mean:
+ // 1) we got a command that is unexpected for dgram BIO, or:
+ // 2) we do not call any function that would lead to OpenSSL using this
+ // command.
+
+ if (!bio) {
+ qDebug(lcSsl, "invalid 'bio' parameter (nullptr)");
+ return -1;
+ }
+
+ auto dtls = static_cast<dtlsopenssl::DtlsState *>(q_BIO_get_app_data(bio));
+ Q_ASSERT(dtls);
+
+#if !QT_CONFIG(opensslv11)
+ Q_UNUSED(num)
+#endif
+
+ switch (cmd) {
+ // Let's start from the most generic ones, in the order in which they are
+ // documented (as BIO_ctrl):
+ case BIO_CTRL_RESET:
+ // BIO_reset macro.
+ // From documentation:
+ // "BIO_reset() normally returns 1 for success and 0 or -1 for failure.
+ // File BIOs are an exception, they return 0 for success and -1 for
+ // failure."
+ // We have nothing to reset and we are not file BIO.
+ return 1;
+ case BIO_C_FILE_SEEK:
+ case BIO_C_FILE_TELL:
+ qDtlsWarning("Unexpected cmd (BIO_C_FILE_SEEK/BIO_C_FILE_TELL)");
+ // These are for BIO_seek, BIO_tell. We are not a file BIO.
+ // Non-negative return value means success.
+ return 0;
+ case BIO_CTRL_FLUSH:
+ // BIO_flush, nothing to do, we do not buffer any data.
+ // 0 or -1 means error, 1 - success.
+ return 1;
+ case BIO_CTRL_EOF:
+ qDtlsWarning("Unexpected cmd (BIO_CTRL_EOF)");
+ // BIO_eof, 1 means EOF read. Makes no sense for us.
+ return 0;
+ case BIO_CTRL_SET_CLOSE:
+ // BIO_set_close with BIO_CLOSE/BIO_NOCLOSE flags. Documented as
+ // always returning 1.
+ // From the documentation:
+ // "Typically BIO_CLOSE is used in a source/sink BIO to indicate that
+ // the underlying I/O stream should be closed when the BIO is freed."
+ //
+ // QUdpSocket we work with is not BIO's business, ignoring.
+ return 1;
+ case BIO_CTRL_GET_CLOSE:
+ // BIO_get_close. No, never, see the comment above.
+ return 0;
+ case BIO_CTRL_PENDING:
+ qDtlsWarning("Unexpected cmd (BIO_CTRL_PENDING)");
+ // BIO_pending. Not used by DTLS/OpenSSL (we are not buffering).
+ return 0;
+ case BIO_CTRL_WPENDING:
+ // No, we have nothing buffered.
+ return 0;
+ // The constants below are not documented as a part BIO_ctrl documentation,
+ // but they are also not type-specific.
+ case BIO_CTRL_DUP:
+ qDtlsWarning("Unexpected cmd (BIO_CTRL_DUP)");
+ // BIO_dup_state, not used by DTLS (and socket-related BIOs in general).
+ // For some very specific BIO type this 'cmd' would copy some state
+ // from 'bio' to (BIO*)'ptr'. 1 means success.
+ return 0;
+ case BIO_CTRL_SET_CALLBACK:
+ qDtlsWarning("Unexpected cmd (BIO_CTRL_SET_CALLBACK)");
+ // BIO_set_info_callback. We never call this, OpenSSL does not do this
+ // on its own (normally it's used if client code wants to have some
+ // debug information, for example, dumping handshake state via
+ // BIO_printf from SSL info_callback).
+ return 0;
+ case BIO_CTRL_GET_CALLBACK:
+ qDtlsWarning("Unexpected cmd (BIO_CTRL_GET_CALLBACK)");
+ // BIO_get_info_callback. We never call this.
+ if (ptr)
+ *static_cast<bio_info_cb **>(ptr) = nullptr;
+ return 0;
+ case BIO_CTRL_SET:
+ case BIO_CTRL_GET:
+ qDtlsWarning("Unexpected cmd (BIO_CTRL_SET/BIO_CTRL_GET)");
+ // Somewhat 'documented' as setting/getting IO type. Not used anywhere
+ // except BIO_buffer_get_num_lines (which contradics 'get IO type').
+ // Ignoring.
+ return 0;
+ // DGRAM-specific operation, we have to return some reasonable value
+ // (so far, I've encountered only peek mode switching, connect).
+ case BIO_CTRL_DGRAM_CONNECT:
+ // BIO_ctrl_dgram_connect. Not needed. Our 'dtls' already knows
+ // the peer's address/port. Report success though.
+ return 1;
+ case BIO_CTRL_DGRAM_SET_CONNECTED:
+ qDtlsWarning("Unexpected cmd (BIO_CTRL_DGRAM_SET_CONNECTED)");
+ // BIO_ctrl_dgram_set_connected. We never call it, OpenSSL does
+ // not call it on its own (so normally it's done by client code).
+ // Similar to BIO_CTRL_DGRAM_CONNECT, but it also informs the BIO
+ // that its UDP socket is connected. We never need it though.
+ return -1;
+ case BIO_CTRL_DGRAM_SET_RECV_TIMEOUT:
+ qDtlsWarning("Unexpected cmd (BIO_CTRL_DGRAM_SET_RECV_TIMEOUT)");
+ // Essentially setsockopt with SO_RCVTIMEO, not needed, our sockets
+ // are non-blocking.
+ return -1;
+ case BIO_CTRL_DGRAM_GET_RECV_TIMEOUT:
+ qDtlsWarning("Unexpected cmd (BIO_CTRL_DGRAM_GET_RECV_TIMEOUT)");
+ // getsockopt with SO_RCVTIMEO, not needed, our sockets are
+ // non-blocking. ptr is timeval *.
+ return -1;
+ case BIO_CTRL_DGRAM_SET_SEND_TIMEOUT:
+ qDtlsWarning("Unexpected cmd (BIO_CTRL_DGRAM_SET_SEND_TIMEOUT)");
+ // setsockopt, SO_SNDTIMEO, cannot happen.
+ return -1;
+ case BIO_CTRL_DGRAM_GET_SEND_TIMEOUT:
+ qDtlsWarning("Unexpected cmd (BIO_CTRL_DGRAM_GET_SEND_TIMEOUT)");
+ // getsockopt, SO_SNDTIMEO, cannot happen.
+ return -1;
+ case BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP:
+ // BIO_dgram_recv_timedout. No, we are non-blocking.
+ return 0;
+ case BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP:
+ // BIO_dgram_send_timedout. No, we are non-blocking.
+ return 0;
+ case BIO_CTRL_DGRAM_MTU_DISCOVER:
+ qDtlsWarning("Unexpected cmd (BIO_CTRL_DGRAM_MTU_DISCOVER)");
+ // setsockopt, IP_MTU_DISCOVER/IP6_MTU_DISCOVER, to be done
+ // in QUdpSocket instead. OpenSSL never calls it, only client
+ // code.
+ return 1;
+ case BIO_CTRL_DGRAM_QUERY_MTU:
+ qDtlsWarning("Unexpected cmd (BIO_CTRL_DGRAM_QUERY_MTU)");
+ // To be done in QUdpSocket instead.
+ return 1;
+ case BIO_CTRL_DGRAM_GET_FALLBACK_MTU:
+ qDtlsWarning("Unexpected command *BIO_CTRL_DGRAM_GET_FALLBACK_MTU)");
+ // Without SSL_OP_NO_QUERY_MTU set on SSL, OpenSSL can request for
+ // fallback MTU after several re-transmissions.
+ // Should never happen in our case.
+ return long(dtlsutil::MtuGuess::defaultMtu);
+ case BIO_CTRL_DGRAM_GET_MTU:
+ qDtlsWarning("Unexpected cmd (BIO_CTRL_DGRAM_GET_MTU)");
+ return -1;
+ case BIO_CTRL_DGRAM_SET_MTU:
+ qDtlsWarning("Unexpected cmd (BIO_CTRL_DGRAM_SET_MTU)");
+ // Should not happen (we don't call BIO_ctrl with this parameter)
+ // and set MTU on SSL instead.
+ return -1; // num is mtu and it's a return value meaning success.
+ case BIO_CTRL_DGRAM_MTU_EXCEEDED:
+ qDtlsWarning("Unexpected cmd (BIO_CTRL_DGRAM_MTU_EXCEEDED)");
+ return 0;
+ case BIO_CTRL_DGRAM_GET_PEER:
+ qDtlsDebug("BIO_CTRL_DGRAM_GET_PEER");
+ // BIO_dgram_get_peer. We do not return a real address (DTLS is not
+ // using this address), but let's pretend a success.
+ switch (dtls->remoteAddress.protocol()) {
+ case QAbstractSocket::IPv6Protocol:
+ return sizeof(sockaddr_in6);
+ case QAbstractSocket::IPv4Protocol:
+ return sizeof(sockaddr_in);
+ default:
+ return -1;
+ }
+ case BIO_CTRL_DGRAM_SET_PEER:
+ // Similar to BIO_CTRL_DGRAM_CONNECTED.
+ return 1;
+ case BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT:
+ // DTLSTODO: I'm not sure yet, how it's used by OpenSSL.
+ return 1;
+ case BIO_CTRL_DGRAM_SET_DONT_FRAG:
+ qDtlsDebug("BIO_CTRL_DGRAM_SET_DONT_FRAG");
+ // To be done in QUdpSocket, it's about IP_DONTFRAG etc.
+ return 1;
+ case BIO_CTRL_DGRAM_GET_MTU_OVERHEAD:
+ // AFAIK it's 28 for IPv4 and 48 for IPv6, but let's pretend it's 0
+ // so that OpenSSL does not start suddenly fragmenting the first
+ // client hello (which will result in DTLSv1_listen rejecting it).
+ return 0;
+#if QT_CONFIG(opensslv11)
+ case BIO_CTRL_DGRAM_SET_PEEK_MODE:
+ dtls->peeking = num;
+ return 1;
+#endif
+ default:;
+#if QT_DTLS_VERBOSE
+ qWarning() << "Unexpected cmd (" << cmd << ")";
+#endif
+ }
+
+ return 0;
+}
+
+extern "C" int q_dgram_create(BIO *bio)
+{
+#if QT_CONFIG(opensslv11)
+ q_BIO_set_init(bio, 1);
+#else
+ bio->init = 1;
+#endif
+ // With a custom BIO you'd normally allocate some implementation-specific
+ // data and append it to this new BIO: bio->ptr = ... (pre 1.0.2) or
+ // BIO_set_data (1.1). We don't need it and thus q_dgram_destroy below
+ // is a noop.
+ return 1;
+}
+
+extern "C" int q_dgram_destroy(BIO *bio)
+{
+ Q_UNUSED(bio)
+ return 1;
+}
+
+const char * const qdtlsMethodName = "qdtlsbio";
+
+#if !QT_CONFIG(opensslv11)
+
+/*
+typedef struct bio_method_st {
+ int type;
+ const char *name;
+ int (*bwrite) (BIO *, const char *, int);
+ int (*bread) (BIO *, char *, int);
+ int (*bputs) (BIO *, const char *);
+ int (*bgets) (BIO *, char *, int);
+ long (*ctrl) (BIO *, int, long, void *);
+ int (*create) (BIO *);
+ int (*destroy) (BIO *);
+ long (*callback_ctrl) (BIO *, int, bio_info_cb *);
+} BIO_METHOD;
+*/
+
+bio_method_st qdtlsCustomBioMethod =
+{
+ BIO_TYPE_DGRAM,
+ qdtlsMethodName,
+ q_dgram_write,
+ q_dgram_read,
+ q_dgram_puts,
+ nullptr,
+ q_dgram_ctrl,
+ q_dgram_create,
+ q_dgram_destroy,
+ nullptr
+};
+
+#endif // openssl < 1.1
+
+} // namespace dtlsbio
+
+namespace dtlsopenssl
+{
+
+bool DtlsState::init(QDtlsBasePrivate *dtlsBase, QUdpSocket *socket,
+ const QHostAddress &remote, quint16 port,
+ const QByteArray &receivedMessage)
+{
+ Q_ASSERT(dtlsBase);
+ Q_ASSERT(socket);
+
+ if (!tlsContext.data() && !initTls(dtlsBase))
+ return false;
+
+ udpSocket = socket;
+
+ setLinkMtu(dtlsBase);
+
+ dgram = receivedMessage;
+ remoteAddress = remote;
+ remotePort = port;
+
+ // SSL_get_rbio does not increment a reference count.
+ BIO *bio = q_SSL_get_rbio(tlsConnection.data());
+ Q_ASSERT(bio);
+ q_BIO_set_app_data(bio, this);
+
+ return true;
+}
+
+void DtlsState::reset()
+{
+ tlsConnection.reset();
+ tlsContext.reset();
+}
+
+bool DtlsState::initTls(QDtlsBasePrivate *dtlsBase)
+{
+ if (tlsContext.data())
+ return true;
+
+ if (!QSslSocket::supportsSsl())
+ return false;
+
+ if (!initCtxAndConnection(dtlsBase))
+ return false;
+
+ if (!initBIO(dtlsBase)) {
+ tlsConnection.reset();
+ tlsContext.reset();
+ return false;
+ }
+
+ return true;
+}
+
+static QString msgFunctionFailed(const char *function)
+{
+ //: %1: Some function
+ return QDtls::tr("%1 failed").arg(QLatin1String(function));
+}
+
+bool DtlsState::initCtxAndConnection(QDtlsBasePrivate *dtlsBase)
+{
+ Q_ASSERT(dtlsBase);
+ Q_ASSERT(QSslSocket::supportsSsl());
+
+ // create a deep copy of our configuration
+ auto configurationCopy = new QSslConfigurationPrivate(dtlsBase->dtlsConfiguration);
+ configurationCopy->ref.store(0); // the QSslConfiguration constructor refs up
+
+ // DTLSTODO: check we do not set something DTLS-incompatible there ...
+ // 'true' - means load root certs on-demand loading - double check how this
+ // expected to be done (QSslSocket).
+ TlsContext newContext(QSslContext::sharedFromConfiguration(dtlsBase->mode,
+ configurationCopy,
+ true));
+
+ if (newContext->error() != QSslError::NoError) {
+ dtlsBase->setDtlsError(QDtlsError::TlsInitializationError, newContext->errorString());
+ return false;
+ }
+
+ TlsConnection newConnection(newContext->createSsl(), dtlsutil::delete_connection);
+ if (!newConnection.data()) {
+ dtlsBase->setDtlsError(QDtlsError::TlsInitializationError,
+ msgFunctionFailed("SSL_new"));
+ return false;
+ }
+
+ const int set = q_SSL_set_ex_data(newConnection.data(),
+ QSslSocketBackendPrivate::s_indexForSSLExtraData,
+ this);
+
+ if (set != 1 && configurationCopy->peerVerifyMode != QSslSocket::VerifyNone) {
+ dtlsBase->setDtlsError(QDtlsError::TlsInitializationError,
+ msgFunctionFailed("SSL_set_ex_data"));
+ return false;
+ }
+
+ if (dtlsBase->mode == QSslSocket::SslServerMode) {
+ if (dtlsBase->dtlsConfiguration.dtlsCookieEnabled)
+ q_SSL_set_options(newConnection.data(), SSL_OP_COOKIE_EXCHANGE);
+ q_SSL_set_psk_server_callback(newConnection.data(), dtlscallbacks::q_PSK_server_callback);
+ } else {
+ q_SSL_set_psk_client_callback(newConnection.data(), dtlscallbacks::q_PSK_client_callback);
+ }
+
+ tlsContext.swap(newContext);
+ tlsConnection.swap(newConnection);
+
+ return true;
+}
+
+bool DtlsState::initBIO(QDtlsBasePrivate *dtlsBase)
+{
+ Q_ASSERT(dtlsBase);
+ Q_ASSERT(tlsContext.data() && tlsConnection.data());
+
+#if QT_CONFIG(opensslv11)
+ BioMethod customMethod(q_BIO_meth_new(BIO_TYPE_DGRAM, dtlsbio::qdtlsMethodName),
+ dtlsutil::delete_bio_method);
+ if (!customMethod.data()) {
+ dtlsBase->setDtlsError(QDtlsError::TlsInitializationError,
+ msgFunctionFailed("BIO_meth_new"));
+ return false;
+ }
+
+ BIO_METHOD *biom = customMethod.data();
+ q_BIO_meth_set_create(biom, dtlsbio::q_dgram_create);
+ q_BIO_meth_set_destroy(biom, dtlsbio::q_dgram_destroy);
+ q_BIO_meth_set_read(biom, dtlsbio::q_dgram_read);
+ q_BIO_meth_set_write(biom, dtlsbio::q_dgram_write);
+ q_BIO_meth_set_puts(biom, dtlsbio::q_dgram_puts);
+ q_BIO_meth_set_ctrl(biom, dtlsbio::q_dgram_ctrl);
+#else
+ BIO_METHOD *biom = &dtlsbio::qdtlsCustomBioMethod;
+#endif // openssl 1.1
+
+ QScopedPointer<BIO, dtlsutil::bio_deleter> newBio(q_BIO_new(biom));
+ BIO *bio = newBio.data();
+ if (!bio) {
+ dtlsBase->setDtlsError(QDtlsError::TlsInitializationError,
+ msgFunctionFailed("BIO_new"));
+ return false;
+ }
+
+ q_SSL_set_bio(tlsConnection.data(), bio, bio);
+ newBio.take();
+
+#if QT_CONFIG(opensslv11)
+ bioMethod.swap(customMethod);
+#endif // openssl 1.1
+
+ return true;
+}
+
+void DtlsState::setLinkMtu(QDtlsBasePrivate *dtlsBase)
+{
+ Q_ASSERT(dtlsBase);
+ Q_ASSERT(udpSocket);
+ Q_ASSERT(tlsConnection.data());
+
+ long mtu = dtlsBase->mtuHint;
+ if (!mtu) {
+ // If the underlying QUdpSocket was connected, getsockopt with
+ // IP_MTU/IP6_MTU can give us some hint:
+ bool optionFound = false;
+ if (udpSocket->state() == QAbstractSocket::ConnectedState) {
+ const QVariant val(udpSocket->socketOption(QAbstractSocket::PathMtuSocketOption));
+ if (val.isValid() && val.canConvert<int>())
+ mtu = val.toInt(&optionFound);
+ }
+
+ if (!optionFound || mtu <= 0) {
+ // OK, our own initial guess.
+ mtu = long(dtlsutil::MtuGuess::defaultMtu);
+ }
+ }
+
+ // For now, we disable this option.
+ q_SSL_set_options(tlsConnection.data(), SSL_OP_NO_QUERY_MTU);
+
+ q_DTLS_set_link_mtu(tlsConnection.data(), mtu);
+}
+
+} // namespace dtlsopenssl
+
+QDtlsClientVerifierOpenSSL::QDtlsClientVerifierOpenSSL()
+{
+ secret = dtlsutil::fallbackSecret();
+}
+
+bool QDtlsClientVerifierOpenSSL::verifyClient(QUdpSocket *socket, const QByteArray &dgram,
+ const QHostAddress &address, quint16 port)
+{
+ Q_ASSERT(socket);
+ Q_ASSERT(dgram.size());
+ Q_ASSERT(!address.isNull());
+ Q_ASSERT(port);
+
+ clearDtlsError();
+ verifiedClientHello.clear();
+
+ if (!dtls.init(this, socket, address, port, dgram))
+ return false;
+
+ dtls.secret = secret;
+ dtls.hashAlgorithm = hashAlgorithm;
+
+ Q_ASSERT(dtls.tlsConnection.data());
+#if QT_CONFIG(opensslv11)
+ QSharedPointer<BIO_ADDR> peer(q_BIO_ADDR_new(), dtlsutil::delete_BIO_ADDR);
+ if (!peer.data()) {
+ setDtlsError(QDtlsError::TlsInitializationError,
+ QDtlsClientVerifier::tr("BIO_ADDR_new failed, ignoring client hello"));
+ return false;
+ }
+
+ const int ret = q_DTLSv1_listen(dtls.tlsConnection.data(), peer.data());
+ if (ret < 0) {
+ // Since 1.1 - it's a fatal error (not so in 1.0.2 for non-blocking socket)
+ setDtlsError(QDtlsError::TlsFatalError, QSslSocketBackendPrivate::getErrorsFromOpenSsl());
+ return false;
+ }
+#else
+ qt_sockaddr peer;
+ const int ret = q_DTLSv1_listen(dtls.tlsConnection.data(), &peer);
+#endif
+ if (ret > 0) {
+ verifiedClientHello = dgram;
+ return true;
+ }
+
+ return false;
+}
+
+void QDtlsPrivateOpenSSL::TimeoutHandler::start(int hintMs)
+{
+ Q_ASSERT(timerId == -1);
+ timerId = startTimer(hintMs > 0 ? hintMs : timeoutMs, Qt::PreciseTimer);
+}
+
+void QDtlsPrivateOpenSSL::TimeoutHandler::doubleTimeout()
+{
+ if (timeoutMs * 2 < 60000)
+ timeoutMs *= 2;
+ else
+ timeoutMs = 60000;
+}
+
+void QDtlsPrivateOpenSSL::TimeoutHandler::stop()
+{
+ if (timerId != -1) {
+ killTimer(timerId);
+ timerId = -1;
+ }
+}
+
+void QDtlsPrivateOpenSSL::TimeoutHandler::timerEvent(QTimerEvent *event)
+{
+ Q_UNUSED(event)
+ Q_ASSERT(timerId != -1);
+
+ killTimer(timerId);
+ timerId = -1;
+
+ Q_ASSERT(dtlsConnection);
+ dtlsConnection->reportTimeout();
+}
+
+QDtlsPrivateOpenSSL::QDtlsPrivateOpenSSL()
+{
+ secret = dtlsutil::fallbackSecret();
+ dtls.dtlsPrivate = this;
+}
+
+bool QDtlsPrivateOpenSSL::startHandshake(QUdpSocket *socket, const QByteArray &dgram)
+{
+ Q_ASSERT(socket);
+ Q_ASSERT(handshakeState == QDtls::HandshakeNotStarted);
+
+ clearDtlsError();
+ connectionEncrypted = false;
+
+ if (!dtls.init(this, socket, remoteAddress, remotePort, dgram))
+ return false;
+
+ if (mode == QSslSocket::SslServerMode && dtlsConfiguration.dtlsCookieEnabled) {
+ dtls.secret = secret;
+ dtls.hashAlgorithm = hashAlgorithm;
+ // Let's prepare the state machine so that message sequence 1 does not
+ // surprise DTLS/OpenSSL (such a message would be disregarded as
+ // 'stale or future' in SSL_accept otherwise):
+ int result = 0;
+#if QT_CONFIG(opensslv11)
+ QSharedPointer<BIO_ADDR> peer(q_BIO_ADDR_new(), dtlsutil::delete_BIO_ADDR);
+ if (!peer.data()) {
+ setDtlsError(QDtlsError::TlsInitializationError,
+ QDtls::tr("BIO_ADD_new failed, cannot start handshake"));
+ return false;
+ }
+
+ // If it's an invalid/unexpected ClientHello, we don't want to send
+ // VerifyClientRequest - it's a job of QDtlsClientVerifier - so we
+ // suppress any attempts to write into socket:
+ dtls.writeSuppressed = true;
+ result = q_DTLSv1_listen(dtls.tlsConnection.data(), peer.data());
+ dtls.writeSuppressed = false;
+#else
+ qt_sockaddr peer;
+ result = q_DTLSv1_listen(dtls.tlsConnection.data(), &peer);
+#endif
+ if (result <= 0) {
+ setDtlsError(QDtlsError::TlsFatalError,
+ QDtls::tr("Cannot start the handshake, verified client hello expected"));
+ dtls.reset();
+ return false;
+ }
+ }
+
+ handshakeState = QDtls::HandshakeInProgress;
+ opensslErrors.clear();
+ tlsErrors.clear();
+
+ return continueHandshake(socket, dgram);
+}
+
+bool QDtlsPrivateOpenSSL::continueHandshake(QUdpSocket *socket, const QByteArray &dgram)
+{
+ Q_ASSERT(socket);
+
+ Q_ASSERT(handshakeState == QDtls::HandshakeInProgress);
+
+ clearDtlsError();
+
+ if (timeoutHandler.data())
+ timeoutHandler->stop();
+
+ if (!dtls.init(this, socket, remoteAddress, remotePort, dgram))
+ return false;
+
+ dtls.x509Errors.clear();
+
+ int result = 0;
+ if (mode == QSslSocket::SslServerMode)
+ result = q_SSL_accept(dtls.tlsConnection.data());
+ else
+ result = q_SSL_connect(dtls.tlsConnection.data());
+
+ // DTLSTODO: Investigate/test if it makes sense - QSslSocket can emit
+ // peerVerifyError at this point (and thus potentially client code
+ // will close the underlying TCP connection immediately), but we are using
+ // QUdpSocket, no connection to close, our verification callback returns 1
+ // (verified OK) and this probably means OpenSSL has already sent a reply
+ // to the server's hello/certificate.
+
+ opensslErrors << dtls.x509Errors;
+
+ if (result <= 0) {
+ const auto code = q_SSL_get_error(dtls.tlsConnection.data(), result);
+ switch (code) {
+ case SSL_ERROR_WANT_READ:
+ case SSL_ERROR_WANT_WRITE:
+ // DTLSTODO: to be tested - in principle, if it was the first call to
+ // continueHandshake and server for some reason discards the client
+ // hello message (even the verified one) - our 'this' will probably
+ // forever stay in this strange InProgress state? (the client
+ // will dully re-transmit the same hello and we discard it again?)
+ // SSL_get_state can provide more information about state
+ // machine and we can switch to NotStarted (since we have not
+ // replied with our hello ...)
+ if (!timeoutHandler.data()) {
+ timeoutHandler.reset(new TimeoutHandler);
+ timeoutHandler->dtlsConnection = this;
+ } else {
+ // Back to 1s.
+ timeoutHandler->resetTimeout();
+ }
+
+ timeoutHandler->start();
+
+ return true; // The handshake is not yet complete.
+ default:
+ storePeerCertificates();
+ setDtlsError(QDtlsError::TlsFatalError,
+ QSslSocketBackendPrivate::msgErrorsDuringHandshake());
+ dtls.reset();
+ handshakeState = QDtls::HandshakeNotStarted;
+ return false;
+ }
+ }
+
+ storePeerCertificates();
+ fetchNegotiatedParameters();
+
+ const bool doVerifyPeer = dtlsConfiguration.peerVerifyMode == QSslSocket::VerifyPeer
+ || (dtlsConfiguration.peerVerifyMode == QSslSocket::AutoVerifyPeer
+ && mode == QSslSocket::SslClientMode);
+
+ if (!doVerifyPeer || verifyPeer()) {
+ connectionEncrypted = true;
+ handshakeState = QDtls::HandshakeComplete;
+ return true;
+ }
+
+ setDtlsError(QDtlsError::PeerVerificationError, QDtls::tr("Peer verification failed"));
+ handshakeState = QDtls::PeerVerificationFailed;
+ return false;
+}
+
+
+bool QDtlsPrivateOpenSSL::handleTimeout(QUdpSocket *socket)
+{
+ Q_ASSERT(socket);
+
+ Q_ASSERT(timeoutHandler.data());
+ Q_ASSERT(dtls.tlsConnection.data());
+
+ clearDtlsError();
+
+ dtls.udpSocket = socket;
+
+ if (q_DTLSv1_handle_timeout(dtls.tlsConnection.data()) > 0) {
+ timeoutHandler->doubleTimeout();
+ timeoutHandler->start();
+ } else {
+ timeoutHandler->start(dtlsutil::next_timeoutMs(dtls.tlsConnection.data()));
+ }
+
+ return true;
+}
+
+bool QDtlsPrivateOpenSSL::resumeHandshake(QUdpSocket *socket)
+{
+ Q_UNUSED(socket);
+ Q_ASSERT(socket);
+ Q_ASSERT(handshakeState == QDtls::PeerVerificationFailed);
+
+ clearDtlsError();
+
+ if (tlsErrorsWereIgnored()) {
+ handshakeState = QDtls::HandshakeComplete;
+ connectionEncrypted = true;
+ tlsErrors.clear();
+ tlsErrorsToIgnore.clear();
+ return true;
+ }
+
+ return false;
+}
+
+void QDtlsPrivateOpenSSL::abortHandshake(QUdpSocket *socket)
+{
+ Q_ASSERT(socket);
+ Q_ASSERT(handshakeState == QDtls::PeerVerificationFailed);
+
+ clearDtlsError();
+
+ // Yes, while peer verification failed, we were actually encrypted.
+ // Let's play it nice - inform our peer about connection shut down.
+ sendShutdownAlert(socket);
+}
+
+void QDtlsPrivateOpenSSL::sendShutdownAlert(QUdpSocket *socket)
+{
+ Q_ASSERT(socket);
+
+ clearDtlsError();
+
+ if (connectionEncrypted && !connectionWasShutdown) {
+ dtls.udpSocket = socket;
+ Q_ASSERT(dtls.tlsConnection.data());
+ q_SSL_shutdown(dtls.tlsConnection.data());
+ }
+
+ resetDtls();
+}
+
+qint64 QDtlsPrivateOpenSSL::writeDatagramEncrypted(QUdpSocket *socket,
+ const QByteArray &dgram)
+{
+ Q_ASSERT(socket);
+ Q_ASSERT(dtls.tlsConnection.data());
+ Q_ASSERT(connectionEncrypted);
+
+ clearDtlsError();
+
+ dtls.udpSocket = socket;
+ const int written = q_SSL_write(dtls.tlsConnection.data(),
+ dgram.constData(), dgram.size());
+ if (written > 0)
+ return written;
+
+ const unsigned long errorCode = q_ERR_get_error();
+ if (!dgram.size() && errorCode == SSL_ERROR_NONE) {
+ // With OpenSSL <= 1.1 this can happen. For example, DTLS client
+ // tries to reconnect (while re-using the same address/port) -
+ // DTLS server drops a message with unexpected epoch but says - no
+ // error. We leave to client code to resolve such problems until
+ // OpenSSL provides something better.
+ return 0;
+ }
+
+ switch (errorCode) {
+ case SSL_ERROR_WANT_WRITE:
+ case SSL_ERROR_WANT_READ:
+ // We do not set any error/description ... a user can probably re-try
+ // sending a datagram.
+ break;
+ case SSL_ERROR_ZERO_RETURN:
+ connectionWasShutdown = true;
+ setDtlsError(QDtlsError::TlsFatalError, QDtls::tr("The DTLS connection has been closed"));
+ handshakeState = QDtls::HandshakeNotStarted;
+ dtls.reset();
+ break;
+ case SSL_ERROR_SYSCALL:
+ case SSL_ERROR_SSL:
+ default:
+ // DTLSTODO: we don't know yet what to do. Tests needed - probably,
+ // some errors can be just ignored (it's UDP, not TCP after all).
+ // Unlike QSslSocket we do not abort though.
+ QString description(QSslSocketBackendPrivate::getErrorsFromOpenSsl());
+ if (socket->error() != QAbstractSocket::UnknownSocketError && description.isEmpty()) {
+ setDtlsError(QDtlsError::UnderlyingSocketError, socket->errorString());
+ } else {
+ setDtlsError(QDtlsError::TlsFatalError,
+ QDtls::tr("Error while writing: %1").arg(description));
+ }
+ }
+
+ return -1;
+}
+
+QByteArray QDtlsPrivateOpenSSL::decryptDatagram(QUdpSocket *socket, const QByteArray &tlsdgram)
+{
+ Q_ASSERT(socket);
+ Q_ASSERT(tlsdgram.size());
+
+ Q_ASSERT(dtls.tlsConnection.data());
+ Q_ASSERT(connectionEncrypted);
+
+ dtls.dgram = tlsdgram;
+ dtls.udpSocket = socket;
+
+ clearDtlsError();
+
+ QByteArray dgram;
+ dgram.resize(tlsdgram.size());
+ const int read = q_SSL_read(dtls.tlsConnection.data(), dgram.data(),
+ dgram.size());
+
+ if (read > 0) {
+ dgram.resize(read);
+ return dgram;
+ }
+
+ dgram.clear();
+ unsigned long errorCode = q_ERR_get_error();
+ if (errorCode == SSL_ERROR_NONE) {
+ const int shutdown = q_SSL_get_shutdown(dtls.tlsConnection.data());
+ if (shutdown & SSL_RECEIVED_SHUTDOWN)
+ errorCode = SSL_ERROR_ZERO_RETURN;
+ else
+ return dgram;
+ }
+
+ switch (errorCode) {
+ case SSL_ERROR_WANT_READ:
+ case SSL_ERROR_WANT_WRITE:
+ return dgram;
+ case SSL_ERROR_ZERO_RETURN:
+ // "The connection was shut down cleanly" ... hmm, whatever,
+ // needs testing (DTLSTODO).
+ connectionWasShutdown = true;
+ setDtlsError(QDtlsError::RemoteClosedConnectionError,
+ QDtls::tr("The DTLS connection has been shutdown"));
+ dtls.reset();
+ connectionEncrypted = false;
+ handshakeState = QDtls::HandshakeNotStarted;
+ return dgram;
+ case SSL_ERROR_SYSCALL: // some IO error
+ case SSL_ERROR_SSL: // error in the SSL library
+ // DTLSTODO: Apparently, some errors can be ignored, for example,
+ // ECONNRESET etc. This all needs a lot of testing!!!
+ default:
+ setDtlsError(QDtlsError::TlsNonFatalError,
+ QDtls::tr("Error while reading: %1")
+ .arg(QSslSocketBackendPrivate::getErrorsFromOpenSsl()));
+ return dgram;
+ }
+}
+
+unsigned QDtlsPrivateOpenSSL::pskClientCallback(const char *hint, char *identity,
+ unsigned max_identity_len,
+ unsigned char *psk,
+ unsigned max_psk_len)
+{
+ // The code below is taken (with some modifications) from qsslsocket_openssl
+ // - alas, we cannot simply re-use it, it's in QSslSocketPrivate.
+
+ Q_Q(QDtls);
+
+ {
+ QSslPreSharedKeyAuthenticator authenticator;
+ // Fill in some read-only fields (for client code)
+ if (hint) {
+ identityHint.clear();
+ identityHint.append(hint);
+ // From the original code in QSslSocket:
+ // "it's NULL terminated, but do not include the NULL" == this fromRawData(ptr/size).
+ authenticator.d->identityHint = QByteArray::fromRawData(identityHint.constData(),
+ int(std::strlen(hint)));
+ }
+
+ authenticator.d->maximumIdentityLength = int(max_identity_len) - 1; // needs to be NULL terminated
+ authenticator.d->maximumPreSharedKeyLength = int(max_psk_len);
+
+ pskAuthenticator.swap(authenticator);
+ }
+
+ // Let the client provide the remaining bits...
+ emit q->pskRequired(&pskAuthenticator);
+
+ // No PSK set? Return now to make the handshake fail
+ if (pskAuthenticator.preSharedKey().isEmpty())
+ return 0;
+
+ // Copy data back into OpenSSL
+ const int identityLength = qMin(pskAuthenticator.identity().length(),
+ pskAuthenticator.maximumIdentityLength());
+ std::memcpy(identity, pskAuthenticator.identity().constData(), identityLength);
+ identity[identityLength] = 0;
+
+ const int pskLength = qMin(pskAuthenticator.preSharedKey().length(),
+ pskAuthenticator.maximumPreSharedKeyLength());
+ std::memcpy(psk, pskAuthenticator.preSharedKey().constData(), pskLength);
+
+ return pskLength;
+}
+
+unsigned QDtlsPrivateOpenSSL::pskServerCallback(const char *identity, unsigned char *psk,
+ unsigned max_psk_len)
+{
+ Q_Q(QDtls);
+
+ {
+ QSslPreSharedKeyAuthenticator authenticator;
+ // Fill in some read-only fields (for the user)
+ authenticator.d->identityHint = dtlsConfiguration.preSharedKeyIdentityHint;
+ authenticator.d->identity = identity;
+ authenticator.d->maximumIdentityLength = 0; // user cannot set an identity
+ authenticator.d->maximumPreSharedKeyLength = int(max_psk_len);
+
+ pskAuthenticator.swap(authenticator);
+ }
+
+ // Let the client provide the remaining bits...
+ emit q->pskRequired(&pskAuthenticator);
+
+ // No PSK set? Return now to make the handshake fail
+ if (pskAuthenticator.preSharedKey().isEmpty())
+ return 0;
+
+ // Copy data back into OpenSSL
+ const int pskLength = qMin(pskAuthenticator.preSharedKey().length(),
+ pskAuthenticator.maximumPreSharedKeyLength());
+
+ std::memcpy(psk, pskAuthenticator.preSharedKey().constData(), pskLength);
+
+ return pskLength;
+}
+
+// The definition is located in qsslsocket_openssl.cpp.
+QSslError _q_OpenSSL_to_QSslError(int errorCode, const QSslCertificate &cert);
+
+bool QDtlsPrivateOpenSSL::verifyPeer()
+{
+ // DTLSTODO: Windows-specific code for CA fetcher is not here yet.
+ QVector<QSslError> errors;
+
+ // Check the whole chain for blacklisting (including root, as we check for
+ // subjectInfo and issuer)
+ for (const QSslCertificate &cert : qAsConst(dtlsConfiguration.peerCertificateChain)) {
+ if (QSslCertificatePrivate::isBlacklisted(cert))
+ errors << QSslError(QSslError::CertificateBlacklisted, cert);
+ }
+
+ if (dtlsConfiguration.peerCertificate.isNull()) {
+ errors << QSslError(QSslError::NoPeerCertificate);
+ } else if (mode == QSslSocket::SslClientMode) {
+ // Check the peer certificate itself. First try the subject's common name
+ // (CN) as a wildcard, then try all alternate subject name DNS entries the
+ // same way.
+
+ // QSslSocket has a rather twisted logic: if verificationPeerName
+ // is empty, we call QAbstractSocket::peerName(), which returns
+ // either peerName (can be set by setPeerName) or host name
+ // (can be set as a result of connectToHost).
+ QString name = peerVerificationName;
+ if (name.isEmpty()) {
+ Q_ASSERT(dtls.udpSocket);
+ name = dtls.udpSocket->peerName();
+ }
+
+ if (!QSslSocketPrivate::isMatchingHostname(dtlsConfiguration.peerCertificate, name))
+ errors << QSslError(QSslError::HostNameMismatch, dtlsConfiguration.peerCertificate);
+ }
+
+ // Translate errors from the error list into QSslErrors
+ errors.reserve(errors.size() + opensslErrors.size());
+ for (const auto &error : qAsConst(opensslErrors)) {
+ errors << _q_OpenSSL_to_QSslError(error.code,
+ dtlsConfiguration.peerCertificateChain.value(error.depth));
+ }
+
+ tlsErrors = errors;
+ return tlsErrors.isEmpty();
+}
+
+void QDtlsPrivateOpenSSL::storePeerCertificates()
+{
+ Q_ASSERT(dtls.tlsConnection.data());
+ // Store the peer certificate and chain. For clients, the peer certificate
+ // chain includes the peer certificate; for servers, it doesn't. Both the
+ // peer certificate and the chain may be empty if the peer didn't present
+ // any certificate.
+ X509 *x509 = q_SSL_get_peer_certificate(dtls.tlsConnection.data());
+ dtlsConfiguration.peerCertificate = QSslCertificatePrivate::QSslCertificate_from_X509(x509);
+ q_X509_free(x509);
+ if (dtlsConfiguration.peerCertificateChain.isEmpty()) {
+ auto stack = q_SSL_get_peer_cert_chain(dtls.tlsConnection.data());
+ dtlsConfiguration.peerCertificateChain = QSslSocketBackendPrivate::STACKOFX509_to_QSslCertificates(stack);
+ if (!dtlsConfiguration.peerCertificate.isNull() && mode == QSslSocket::SslServerMode)
+ dtlsConfiguration.peerCertificateChain.prepend(dtlsConfiguration.peerCertificate);
+ }
+}
+
+bool QDtlsPrivateOpenSSL::tlsErrorsWereIgnored() const
+{
+ // check whether the errors we got are all in the list of expected errors
+ // (applies only if the method QDtlsConnection::ignoreTlsErrors(const
+ // QVector<QSslError> &errors) was called)
+ for (const QSslError &error : tlsErrors) {
+ if (!tlsErrorsToIgnore.contains(error))
+ return false;
+ }
+
+ return !tlsErrorsToIgnore.empty();
+}
+
+void QDtlsPrivateOpenSSL::fetchNegotiatedParameters()
+{
+ Q_ASSERT(dtls.tlsConnection.data());
+
+ const SSL_CIPHER *cipher = q_SSL_get_current_cipher(dtls.tlsConnection.data());
+ sessionCipher = cipher ? QSslSocketBackendPrivate::QSslCipher_from_SSL_CIPHER(cipher)
+ : QSslCipher();
+
+ // Note: cipher's protocol version will be reported as either TLS 1.0 or
+ // TLS 1.2, that's how it's set by OpenSSL (and that's what they are?).
+
+ switch (q_SSL_version(dtls.tlsConnection.data())) {
+ case DTLS1_VERSION:
+ sessionProtocol = QSsl::DtlsV1_0;
+ break;
+ case DTLS1_2_VERSION:
+ sessionProtocol = QSsl::DtlsV1_2;
+ break;
+ default:
+ qCWarning(lcSsl, "unknown protocol version");
+ sessionProtocol = QSsl::UnknownProtocol;
+ }
+}
+
+void QDtlsPrivateOpenSSL::reportTimeout()
+{
+ Q_Q(QDtls);
+
+ emit q->handshakeTimeout();
+}
+
+void QDtlsPrivateOpenSSL::resetDtls()
+{
+ dtls.reset();
+ connectionEncrypted = false;
+ tlsErrors.clear();
+ tlsErrorsToIgnore.clear();
+ dtlsConfiguration.peerCertificate.clear();
+ dtlsConfiguration.peerCertificateChain.clear();
+ connectionWasShutdown = false;
+ handshakeState = QDtls::HandshakeNotStarted;
+ sessionCipher = {};
+ sessionProtocol = QSsl::UnknownProtocol;
+}
+
+QT_END_NAMESPACE
diff --git a/src/network/ssl/qdtls_openssl_p.h b/src/network/ssl/qdtls_openssl_p.h
new file mode 100644
index 0000000000..9306fa2433
--- /dev/null
+++ b/src/network/ssl/qdtls_openssl_p.h
@@ -0,0 +1,213 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtNetwork 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDTLS_OPENSSL_P_H
+#define QDTLS_OPENSSL_P_H
+
+#include <private/qtnetworkglobal_p.h>
+
+#include <QtCore/qglobal.h>
+
+#include <openssl/ossl_typ.h>
+
+#include "qdtls_p.h"
+
+#include <private/qsslcontext_openssl_p.h>
+#include <private/qsslsocket_openssl_p.h>
+
+#include <QtNetwork/qsslpresharedkeyauthenticator.h>
+#include <QtNetwork/qhostaddress.h>
+
+#include <QtCore/qcryptographichash.h>
+#include <QtCore/qsharedpointer.h>
+#include <QtCore/qbytearray.h>
+#include <QtCore/qvector.h>
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+QT_REQUIRE_CONFIG(openssl);
+QT_REQUIRE_CONFIG(dtls);
+
+QT_BEGIN_NAMESPACE
+
+class QDtlsPrivateOpenSSL;
+class QUdpSocket;
+
+namespace dtlsopenssl
+{
+
+class DtlsState
+{
+public:
+ // Note, bioMethod, if allocated (i.e. OpenSSL version >= 1.1) _must_
+ // outlive BIOs it was used to create. Thus the order of declarations
+ // here matters.
+ using BioMethod = QSharedPointer<BIO_METHOD>;
+ BioMethod bioMethod;
+
+ using TlsContext = QSharedPointer<QSslContext>;
+ TlsContext tlsContext;
+
+ using TlsConnection = QSharedPointer<SSL>;
+ TlsConnection tlsConnection;
+
+ QByteArray dgram;
+
+ QHostAddress remoteAddress;
+ quint16 remotePort = 0;
+
+ QVector<QSslErrorEntry> x509Errors;
+
+ long peeking = false;
+ QUdpSocket *udpSocket = nullptr;
+ bool writeSuppressed = false;
+
+ bool init(QDtlsBasePrivate *dtlsBase, QUdpSocket *socket,
+ const QHostAddress &remote, quint16 port,
+ const QByteArray &receivedMessage);
+
+ void reset();
+
+ QDtlsPrivateOpenSSL *dtlsPrivate = nullptr;
+ QByteArray secret;
+
+#ifdef QT_CRYPTOGRAPHICHASH_ONLY_SHA1
+ QCryptographicHash::Algorithm hashAlgorithm = QCryptographicHash::Sha1;
+#else
+ QCryptographicHash::Algorithm hashAlgorithm = QCryptographicHash::Sha256;
+#endif
+
+private:
+
+ bool initTls(QDtlsBasePrivate *dtlsBase);
+ bool initCtxAndConnection(QDtlsBasePrivate *dtlsBase);
+ bool initBIO(QDtlsBasePrivate *dtlsBase);
+ void setLinkMtu(QDtlsBasePrivate *dtlsBase);
+};
+
+} // namespace dtlsopenssl
+
+class QDtlsClientVerifierOpenSSL : public QDtlsClientVerifierPrivate
+{
+public:
+
+ QDtlsClientVerifierOpenSSL();
+
+ bool verifyClient(QUdpSocket *socket, const QByteArray &dgram,
+ const QHostAddress &address, quint16 port) override;
+
+private:
+ dtlsopenssl::DtlsState dtls;
+};
+
+class QDtlsPrivateOpenSSL : public QDtlsPrivate
+{
+public:
+ QDtlsPrivateOpenSSL();
+
+ bool startHandshake(QUdpSocket *socket, const QByteArray &datagram) override;
+ bool continueHandshake(QUdpSocket *socket, const QByteArray &datagram) override;
+ bool resumeHandshake(QUdpSocket *socket) override;
+ void abortHandshake(QUdpSocket *socket) override;
+ bool handleTimeout(QUdpSocket *socket) override;
+ void sendShutdownAlert(QUdpSocket *socket) override;
+
+ qint64 writeDatagramEncrypted(QUdpSocket *socket, const QByteArray &datagram) override;
+ QByteArray decryptDatagram(QUdpSocket *socket, const QByteArray &tlsdgram) override;
+
+ unsigned pskClientCallback(const char *hint, char *identity, unsigned max_identity_len,
+ unsigned char *psk, unsigned max_psk_len);
+ unsigned pskServerCallback(const char *identity, unsigned char *psk,
+ unsigned max_psk_len);
+
+private:
+
+ bool verifyPeer();
+ void storePeerCertificates();
+ bool tlsErrorsWereIgnored() const;
+ void fetchNegotiatedParameters();
+ void reportTimeout();
+ void resetDtls();
+
+ QVector<QSslErrorEntry> opensslErrors;
+ dtlsopenssl::DtlsState dtls;
+
+ // We have to externally handle timeouts since we have non-blocking
+ // sockets and OpenSSL(DTLS) with non-blocking UDP sockets does not
+ // know if a timeout has occurred.
+ struct TimeoutHandler : QObject
+ {
+ TimeoutHandler() = default;
+
+ void start(int hintMs = 0);
+ void doubleTimeout();
+ void resetTimeout() {timeoutMs = 1000;}
+ void stop();
+ void timerEvent(QTimerEvent *event);
+
+ int timerId = -1;
+ int timeoutMs = 1000;
+
+ QDtlsPrivateOpenSSL *dtlsConnection = nullptr;
+ };
+
+ // We will initialize it 'lazily', just in case somebody wants to move
+ // QDtls to another thread.
+ QScopedPointer<TimeoutHandler> timeoutHandler;
+ bool connectionWasShutdown = false;
+ QSslPreSharedKeyAuthenticator pskAuthenticator;
+ QByteArray identityHint;
+
+ Q_DECLARE_PUBLIC(QDtls)
+};
+
+
+
+QT_END_NAMESPACE
+
+#endif // QDTLS_OPENSSL_P_H
diff --git a/src/network/ssl/qdtls_p.h b/src/network/ssl/qdtls_p.h
new file mode 100644
index 0000000000..ca4af0d129
--- /dev/null
+++ b/src/network/ssl/qdtls_p.h
@@ -0,0 +1,153 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtNetwork 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDTLS_P_H
+#define QDTLS_P_H
+
+#include <private/qtnetworkglobal_p.h>
+
+#include "qdtls.h"
+
+#include <private/qsslconfiguration_p.h>
+#include <private/qobject_p.h>
+
+#include <QtNetwork/qabstractsocket.h>
+#include <QtNetwork/qhostaddress.h>
+#include <QtNetwork/qsslsocket.h>
+#include <QtNetwork/qsslcipher.h>
+#include <QtNetwork/qssl.h>
+
+#include <QtCore/qcryptographichash.h>
+#include <QtCore/qbytearray.h>
+#include <QtCore/qstring.h>
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+QT_REQUIRE_CONFIG(dtls);
+
+QT_BEGIN_NAMESPACE
+
+class QHostAddress;
+
+class QDtlsBasePrivate : public QObjectPrivate
+{
+public:
+
+ void setDtlsError(QDtlsError code, const QString &description)
+ {
+ errorCode = code;
+ errorDescription = description;
+ }
+
+ void clearDtlsError()
+ {
+ errorCode = QDtlsError::NoError;
+ errorDescription.clear();
+ }
+
+ void setConfiguration(const QSslConfiguration &configuration);
+ QSslConfiguration configuration() const;
+
+ bool setCookieGeneratorParameters(QCryptographicHash::Algorithm alg,
+ const QByteArray &secret);
+
+ QHostAddress remoteAddress;
+ quint16 remotePort = 0;
+ quint16 mtuHint = 0;
+
+ QDtlsError errorCode = QDtlsError::NoError;
+ QString errorDescription;
+ QSslConfigurationPrivate dtlsConfiguration;
+ QSslSocket::SslMode mode = QSslSocket::SslClientMode;
+ QSslCipher sessionCipher;
+ QSsl::SslProtocol sessionProtocol = QSsl::UnknownProtocol;
+ QString peerVerificationName;
+ QByteArray secret;
+
+#ifdef QT_CRYPTOGRAPHICHASH_ONLY_SHA1
+ QCryptographicHash::Algorithm hashAlgorithm = QCryptographicHash::Sha1;
+#else
+ QCryptographicHash::Algorithm hashAlgorithm = QCryptographicHash::Sha256;
+#endif
+};
+
+class QDtlsClientVerifierPrivate : public QDtlsBasePrivate
+{
+public:
+
+ QByteArray verifiedClientHello;
+
+ virtual bool verifyClient(QUdpSocket *socket, const QByteArray &dgram,
+ const QHostAddress &address, quint16 port) = 0;
+};
+
+class QDtlsPrivate : public QDtlsBasePrivate
+{
+public:
+
+ virtual bool startHandshake(QUdpSocket *socket, const QByteArray &dgram) = 0;
+ virtual bool handleTimeout(QUdpSocket *socket) = 0;
+ virtual bool continueHandshake(QUdpSocket *socket, const QByteArray &dgram) = 0;
+ virtual bool resumeHandshake(QUdpSocket *socket) = 0;
+ virtual void abortHandshake(QUdpSocket *socket) = 0;
+ virtual void sendShutdownAlert(QUdpSocket *socket) = 0;
+
+ virtual qint64 writeDatagramEncrypted(QUdpSocket *socket, const QByteArray &dgram) = 0;
+ virtual QByteArray decryptDatagram(QUdpSocket *socket, const QByteArray &dgram) = 0;
+
+ QDtls::HandshakeState handshakeState = QDtls::HandshakeNotStarted;
+
+ QVector<QSslError> tlsErrors;
+ QVector<QSslError> tlsErrorsToIgnore;
+
+ bool connectionEncrypted = false;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDTLS_P_H
diff --git a/src/network/ssl/qpassworddigestor.cpp b/src/network/ssl/qpassworddigestor.cpp
new file mode 100644
index 0000000000..127d94e849
--- /dev/null
+++ b/src/network/ssl/qpassworddigestor.cpp
@@ -0,0 +1,187 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qpassworddigestor.h"
+
+#include <QtCore/QDebug>
+#include <QtCore/QMessageAuthenticationCode>
+#include <QtCore/QtEndian>
+
+#include <limits>
+
+QT_BEGIN_NAMESPACE
+namespace QPasswordDigestor {
+
+/*!
+ \namespace QPasswordDigestor
+ \inmodule QtNetwork
+
+ \brief The QPasswordDigestor namespace contains functions which you can use
+ to generate hashes or keys.
+*/
+
+/*!
+ \since 5.12
+
+ Returns a hash computed using the PBKDF1-algorithm as defined in
+ \l {https://tools.ietf.org/html/rfc8018#section-5.1} {RFC 8018}.
+
+ The function takes the \a data and \a salt, and then hashes it repeatedly
+ for \a iterations iterations using the specified hash \a algorithm. If the
+ resulting hash is longer than \a dkLen then it is truncated before it is
+ returned.
+
+ This function only supports SHA-1 and MD5! The max output size is 160 bits
+ (20 bytes) when using SHA-1, or 128 bits (16 bytes) when using MD5.
+ Specifying a value for \a dkLen which is greater than this results in a
+ warning and an empty QByteArray is returned. To programmatically check this
+ limit you can use \l {QCryptographicHash::hashLength}. Furthermore: the
+ \a salt must always be 8 bytes long!
+
+ \note This function is provided for use with legacy applications and all
+ new applications are recommended to use \l {pbkdf2} {PBKDF2}.
+
+ \sa deriveKeyPbkdf2, QCryptographicHash, QCryptographicHash::hashLength
+*/
+Q_NETWORK_EXPORT QByteArray deriveKeyPbkdf1(QCryptographicHash::Algorithm algorithm,
+ const QByteArray &data, const QByteArray &salt,
+ int iterations, quint64 dkLen)
+{
+ // https://tools.ietf.org/html/rfc8018#section-5.1
+
+ if (algorithm != QCryptographicHash::Sha1
+#ifndef QT_CRYPTOGRAPHICHASH_ONLY_SHA1
+ && algorithm != QCryptographicHash::Md5
+#endif
+ ) {
+ qWarning("The only supported algorithms for pbkdf1 are SHA-1 and MD5!");
+ return QByteArray();
+ }
+
+ if (salt.size() != 8) {
+ qWarning("The salt must be 8 bytes long!");
+ return QByteArray();
+ }
+ if (iterations < 1 || dkLen < 1)
+ return QByteArray();
+
+ if (dkLen > quint64(QCryptographicHash::hashLength(algorithm))) {
+ qWarning() << "Derived key too long:\n"
+ << algorithm << "was chosen which produces output of length"
+ << QCryptographicHash::hashLength(algorithm) << "but" << dkLen
+ << "was requested.";
+ return QByteArray();
+ }
+
+ QCryptographicHash hash(algorithm);
+ hash.addData(data);
+ hash.addData(salt);
+ QByteArray key = hash.result();
+
+ for (int i = 1; i < iterations; i++) {
+ hash.reset();
+ hash.addData(key);
+ key = hash.result();
+ }
+ return key.left(dkLen);
+}
+
+/*!
+ \since 5.12
+
+ Derive a key using the PBKDF2-algorithm as defined in
+ \l {https://tools.ietf.org/html/rfc8018#section-5.2} {RFC 8018}.
+
+ This function takes the \a data and \a salt, and then applies HMAC-X, where
+ the X is \a algorithm, repeatedly. It internally concatenates intermediate
+ results to the final output until at least \a dkLen amount of bytes have
+ been computed and it will execute HMAC-X \a iterations times each time a
+ concatenation is required. The total number of times it will execute HMAC-X
+ depends on \a iterations, \a dkLen and \a algorithm and can be calculated
+ as
+ \c{iterations * ceil(dkLen / QCryptographicHash::hashLength(algorithm))}.
+
+ \sa deriveKeyPbkdf1, QMessageAuthenticationCode, QCryptographicHash
+*/
+Q_NETWORK_EXPORT QByteArray deriveKeyPbkdf2(QCryptographicHash::Algorithm algorithm,
+ const QByteArray &data, const QByteArray &salt,
+ int iterations, quint64 dkLen)
+{
+ // https://tools.ietf.org/html/rfc8018#section-5.2
+
+ // The RFC recommends checking that 'dkLen' is not greater than '(2^32 - 1) * hLen'
+ int hashLen = QCryptographicHash::hashLength(algorithm);
+ const quint64 maxLen = quint64(std::numeric_limits<quint32>::max() - 1) * hashLen;
+ if (dkLen > maxLen) {
+ qWarning().nospace() << "Derived key too long:\n"
+ << algorithm << " was chosen which produces output of length "
+ << maxLen << " but " << dkLen << " was requested.";
+ return QByteArray();
+ }
+
+ if (iterations < 1 || dkLen < 1)
+ return QByteArray();
+
+ QByteArray key;
+ quint32 currentIteration = 1;
+ QMessageAuthenticationCode hmac(algorithm, data);
+ QByteArray index(4, Qt::Uninitialized);
+ while (quint64(key.length()) < dkLen) {
+ hmac.addData(salt);
+
+ qToBigEndian(currentIteration, index.data());
+ hmac.addData(index);
+
+ QByteArray u = hmac.result();
+ hmac.reset();
+ QByteArray tkey = u;
+ for (int iter = 1; iter < iterations; iter++) {
+ hmac.addData(u);
+ u = hmac.result();
+ hmac.reset();
+ std::transform(tkey.cbegin(), tkey.cend(), u.cbegin(), tkey.begin(),
+ std::bit_xor<char>());
+ }
+ key += tkey;
+ currentIteration++;
+ }
+ return key.left(dkLen);
+}
+} // namespace QPasswordDigestor
+QT_END_NAMESPACE
diff --git a/src/network/ssl/qpassworddigestor.h b/src/network/ssl/qpassworddigestor.h
new file mode 100644
index 0000000000..0f88643298
--- /dev/null
+++ b/src/network/ssl/qpassworddigestor.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPASSWORDDIGESTOR_H
+#define QPASSWORDDIGESTOR_H
+
+#include <QtNetwork/qtnetworkglobal.h>
+#include <QtCore/QByteArray>
+#include <QtCore/QCryptographicHash>
+
+QT_BEGIN_NAMESPACE
+
+namespace QPasswordDigestor {
+Q_NETWORK_EXPORT QByteArray deriveKeyPbkdf1(QCryptographicHash::Algorithm algorithm,
+ const QByteArray &password, const QByteArray &salt,
+ int iterations, quint64 dkLen);
+Q_NETWORK_EXPORT QByteArray deriveKeyPbkdf2(QCryptographicHash::Algorithm algorithm,
+ const QByteArray &password, const QByteArray &salt,
+ int iterations, quint64 dkLen);
+} // namespace QPasswordDigestor
+
+QT_END_NAMESPACE
+
+#endif // QPASSWORDDIGESTOR_H
diff --git a/src/network/ssl/qssl.cpp b/src/network/ssl/qssl.cpp
index 51779dec33..3a0983e8b5 100644
--- a/src/network/ssl/qssl.cpp
+++ b/src/network/ssl/qssl.cpp
@@ -125,6 +125,10 @@ Q_LOGGING_CATEGORY(lcSsl, "qt.network.ssl");
\value TlsV1_1OrLater TLSv1.1 and later versions. This option is not available when using the WinRT backend due to platform limitations.
\value TlsV1_2 TLSv1.2. When using the WinRT backend this option will also enable TLSv1.0 and TLSv1.1.
\value TlsV1_2OrLater TLSv1.2 and later versions. This option is not available when using the WinRT backend due to platform limitations.
+ \value DtlsV1_0 DTLSv1.0
+ \value DtlsV1_0OrLater DTLSv1.0 and later versions.
+ \value DtlsV1_2 DTLSv1.2
+ \value DtlsV1_2OrLater DTLSv1.2 and later versions.
\value UnknownProtocol The cipher's protocol cannot be determined.
\value AnyProtocol The socket understands SSLv2, SSLv3, TLSv1.0 and all
supported later versions of TLS. This value is used by QSslSocket only.
diff --git a/src/network/ssl/qssl.h b/src/network/ssl/qssl.h
index c2a468c97c..8ab24d89e1 100644
--- a/src/network/ssl/qssl.h
+++ b/src/network/ssl/qssl.h
@@ -91,6 +91,13 @@ namespace QSsl {
TlsV1_1OrLater,
TlsV1_2OrLater,
+#if QT_CONFIG(dtls)
+ DtlsV1_0,
+ DtlsV1_0OrLater,
+ DtlsV1_2,
+ DtlsV1_2OrLater,
+#endif
+
UnknownProtocol = -1
};
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index 6433b84e80..135dc9f7a9 100644
--- a/src/network/ssl/qsslcertificate.cpp
+++ b/src/network/ssl/qsslcertificate.cpp
@@ -125,7 +125,9 @@
#include "qssl_p.h"
#include "qsslcertificate.h"
#include "qsslcertificate_p.h"
+#ifndef QT_NO_SSL
#include "qsslkey_p.h"
+#endif
#include <QtCore/qdir.h>
#include <QtCore/qdiriterator.h>
@@ -142,8 +144,12 @@ QT_BEGIN_NAMESPACE
QSslCertificate::QSslCertificate(QIODevice *device, QSsl::EncodingFormat format)
: d(new QSslCertificatePrivate)
{
+#ifndef QT_NO_OPENSSL
QSslSocketPrivate::ensureInitialized();
if (device && QSslSocket::supportsSsl())
+#else
+ if (device)
+#endif
d->init(device->readAll(), format);
}
@@ -156,8 +162,10 @@ QSslCertificate::QSslCertificate(QIODevice *device, QSsl::EncodingFormat format)
QSslCertificate::QSslCertificate(const QByteArray &data, QSsl::EncodingFormat format)
: d(new QSslCertificatePrivate)
{
+#ifndef QT_NO_OPENSSL
QSslSocketPrivate::ensureInitialized();
if (QSslSocket::supportsSsl())
+#endif
d->init(data, format);
}
@@ -557,6 +565,8 @@ QList<QSslCertificate> QSslCertificate::fromData(const QByteArray &data, QSsl::E
: QSslCertificatePrivate::certificatesFromDer(data);
}
+#ifndef QT_NO_SSL
+
/*!
Verifies a certificate chain. The chain to be verified is passed in the
\a certificateChain parameter. The first certificate in the list should
@@ -600,6 +610,8 @@ bool QSslCertificate::importPkcs12(QIODevice *device,
return QSslSocketBackendPrivate::importPkcs12(device, key, certificate, caCertificates, passPhrase);
}
+#endif
+
// These certificates are known to be fraudulent and were created during the comodo
// compromise. See http://www.comodo.com/Comodo-Fraud-Incident-2011-03-23.html
static const char *const certificate_blacklist[] = {
diff --git a/src/network/ssl/qsslcertificate.h b/src/network/ssl/qsslcertificate.h
index 6cd66fd20f..553fb8884d 100644
--- a/src/network/ssl/qsslcertificate.h
+++ b/src/network/ssl/qsslcertificate.h
@@ -55,8 +55,6 @@
#include <QtCore/qmap.h>
#include <QtNetwork/qssl.h>
-#ifndef QT_NO_SSL
-
QT_BEGIN_NAMESPACE
class QDateTime;
@@ -131,7 +129,9 @@ public:
QMultiMap<QSsl::AlternativeNameEntryType, QString> subjectAlternativeNames() const;
QDateTime effectiveDate() const;
QDateTime expiryDate() const;
+#ifndef QT_NO_SSL
QSslKey publicKey() const;
+#endif
QList<QSslCertificateExtension> extensions() const;
QByteArray toPem() const;
@@ -146,6 +146,7 @@ public:
static QList<QSslCertificate> fromData(
const QByteArray &data, QSsl::EncodingFormat format = QSsl::Pem);
+#ifndef QT_NO_SSL
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
static QList<QSslError> verify(const QList<QSslCertificate> &certificateChain, const QString &hostName = QString());
#else
@@ -156,6 +157,7 @@ public:
QSslKey *key, QSslCertificate *cert,
QList<QSslCertificate> *caCertificates = nullptr,
const QByteArray &passPhrase=QByteArray());
+#endif
Qt::HANDLE handle() const;
@@ -178,6 +180,4 @@ QT_END_NAMESPACE
Q_DECLARE_METATYPE(QSslCertificate)
-#endif // QT_NO_SSL
-
#endif
diff --git a/src/network/ssl/qsslcertificate_p.h b/src/network/ssl/qsslcertificate_p.h
index 0397845f8d..dfdceab502 100644
--- a/src/network/ssl/qsslcertificate_p.h
+++ b/src/network/ssl/qsslcertificate_p.h
@@ -55,7 +55,9 @@
// We mean it.
//
+#ifndef QT_NO_SSL
#include "qsslsocket_p.h"
+#endif
#include "qsslcertificateextension.h"
#include <QtCore/qdatetime.h>
#include <QtCore/qmap.h>
@@ -83,7 +85,9 @@ public:
QSslCertificatePrivate()
: null(true), x509(0)
{
+#ifndef QT_NO_SSL
QSslSocketPrivate::ensureInitialized();
+#endif
}
~QSslCertificatePrivate()
diff --git a/src/network/ssl/qsslcertificate_qt.cpp b/src/network/ssl/qsslcertificate_qt.cpp
index 1cc2b1f964..4efc477dc3 100644
--- a/src/network/ssl/qsslcertificate_qt.cpp
+++ b/src/network/ssl/qsslcertificate_qt.cpp
@@ -41,8 +41,10 @@
#include "qsslcertificate_p.h"
#include "qssl_p.h"
+#ifndef QT_NO_SSL
#include "qsslkey.h"
#include "qsslkey_p.h"
+#endif
#include "qsslcertificateextension.h"
#include "qsslcertificateextension_p.h"
#include "qasn1element_p.h"
@@ -145,6 +147,7 @@ Qt::HANDLE QSslCertificate::handle() const
}
#endif
+#ifndef QT_NO_SSL
QSslKey QSslCertificate::publicKey() const
{
QSslKey key;
@@ -155,6 +158,7 @@ QSslKey QSslCertificate::publicKey() const
}
return key;
}
+#endif
QList<QSslCertificateExtension> QSslCertificate::extensions() const
{
diff --git a/src/network/ssl/qsslcertificateextension.h b/src/network/ssl/qsslcertificateextension.h
index 2ce2112687..c2910e1707 100644
--- a/src/network/ssl/qsslcertificateextension.h
+++ b/src/network/ssl/qsslcertificateextension.h
@@ -48,9 +48,6 @@
QT_BEGIN_NAMESPACE
-
-#ifndef QT_NO_SSL
-
class QSslCertificateExtensionPrivate;
class Q_NETWORK_EXPORT QSslCertificateExtension
@@ -80,8 +77,6 @@ private:
Q_DECLARE_SHARED(QSslCertificateExtension)
-#endif // QT_NO_SSL
-
QT_END_NAMESPACE
diff --git a/src/network/ssl/qsslconfiguration.cpp b/src/network/ssl/qsslconfiguration.cpp
index 46df181496..12fbb9a8e4 100644
--- a/src/network/ssl/qsslconfiguration.cpp
+++ b/src/network/ssl/qsslconfiguration.cpp
@@ -227,7 +227,8 @@ bool QSslConfiguration::operator==(const QSslConfiguration &other) const
d->sslSessionTicketLifeTimeHint == other.d->sslSessionTicketLifeTimeHint &&
d->nextAllowedProtocols == other.d->nextAllowedProtocols &&
d->nextNegotiatedProtocol == other.d->nextNegotiatedProtocol &&
- d->nextProtocolNegotiationStatus == other.d->nextProtocolNegotiationStatus;
+ d->nextProtocolNegotiationStatus == other.d->nextProtocolNegotiationStatus &&
+ d->dtlsCookieEnabled == other.d->dtlsCookieEnabled;
}
/*!
@@ -1030,6 +1031,65 @@ void QSslConfiguration::setDefaultConfiguration(const QSslConfiguration &configu
QSslConfigurationPrivate::setDefaultConfiguration(configuration);
}
+#if QT_CONFIG(dtls)
+
+/*!
+ This function returns true if DTLS cookie verification was enabled on a
+ server-side socket.
+
+ \sa setDtlsCookieVerificationEnabled()
+ */
+bool QSslConfiguration::dtlsCookieVerificationEnabled() const
+{
+ return d->dtlsCookieEnabled;
+}
+
+/*!
+ This function enables DTLS cookie verification when \a enable is true.
+
+ \sa dtlsCookieVerificationEnabled()
+ */
+void QSslConfiguration::setDtlsCookieVerificationEnabled(bool enable)
+{
+ d->dtlsCookieEnabled = enable;
+}
+
+/*!
+ Returns the default DTLS configuration to be used in new DTLS
+ connections.
+
+ The default DTLS configuration consists of:
+
+ \list
+ \li no local certificate and no private key
+ \li protocol DtlsV1_2OrLater
+ \li the system's default CA certificate list
+ \li the cipher list equal to the list of the SSL libraries'
+ supported TLS 1.2 ciphers that use 128 or more secret bits
+ for the cipher.
+ \endlist
+
+ \sa setDefaultDtlsConfiguration()
+*/
+QSslConfiguration QSslConfiguration::defaultDtlsConfiguration()
+{
+ return QSslConfigurationPrivate::defaultDtlsConfiguration();
+}
+
+/*!
+ Sets the default DTLS configuration to be used in new DTLS
+ connections to be \a configuration. Existing connections are not
+ affected by this call.
+
+ \sa defaultDtlsConfiguration()
+*/
+void QSslConfiguration::setDefaultDtlsConfiguration(const QSslConfiguration &configuration)
+{
+ QSslConfigurationPrivate::setDefaultDtlsConfiguration(configuration);
+}
+
+#endif // dtls
+
/*! \internal
*/
bool QSslConfigurationPrivate::peerSessionWasShared(const QSslConfiguration &configuration) {
diff --git a/src/network/ssl/qsslconfiguration.h b/src/network/ssl/qsslconfiguration.h
index fe4181d755..7f6028db27 100644
--- a/src/network/ssl/qsslconfiguration.h
+++ b/src/network/ssl/qsslconfiguration.h
@@ -73,6 +73,11 @@ class QSslKey;
class QSslEllipticCurve;
class QSslDiffieHellmanParameters;
+namespace dtlsopenssl
+{
+class DtlsState;
+}
+
class QSslConfigurationPrivate;
class Q_NETWORK_EXPORT QSslConfiguration
{
@@ -157,6 +162,14 @@ public:
static QSslConfiguration defaultConfiguration();
static void setDefaultConfiguration(const QSslConfiguration &configuration);
+#if QT_CONFIG(dtls)
+ bool dtlsCookieVerificationEnabled() const;
+ void setDtlsCookieVerificationEnabled(bool enable);
+
+ static QSslConfiguration defaultDtlsConfiguration();
+ static void setDefaultDtlsConfiguration(const QSslConfiguration &configuration);
+#endif // dtls
+
enum NextProtocolNegotiationStatus {
NextProtocolNegotiationNone,
NextProtocolNegotiationNegotiated,
@@ -182,6 +195,8 @@ private:
friend class QSslConfigurationPrivate;
friend class QSslSocketBackendPrivate;
friend class QSslContext;
+ friend class QDtlsBasePrivate;
+ friend class dtlsopenssl::DtlsState;
QSslConfiguration(QSslConfigurationPrivate *dd);
QSharedDataPointer<QSslConfigurationPrivate> d;
};
diff --git a/src/network/ssl/qsslconfiguration_p.h b/src/network/ssl/qsslconfiguration_p.h
index 38a98239db..6c23165c6a 100644
--- a/src/network/ssl/qsslconfiguration_p.h
+++ b/src/network/ssl/qsslconfiguration_p.h
@@ -137,10 +137,19 @@ public:
QByteArray nextNegotiatedProtocol;
QSslConfiguration::NextProtocolNegotiationStatus nextProtocolNegotiationStatus;
+#if QT_CONFIG(dtls)
+ bool dtlsCookieEnabled = true;
+#else
+ const bool dtlsCookieEnabled = false;
+#endif // dtls
+
// in qsslsocket.cpp:
static QSslConfiguration defaultConfiguration();
static void setDefaultConfiguration(const QSslConfiguration &configuration);
static void deepCopyDefaultConfiguration(QSslConfigurationPrivate *config);
+
+ static QSslConfiguration defaultDtlsConfiguration();
+ static void setDefaultDtlsConfiguration(const QSslConfiguration &configuration);
};
// implemented here for inlining purposes
diff --git a/src/network/ssl/qsslcontext_openssl11.cpp b/src/network/ssl/qsslcontext_openssl11.cpp
index 5c68ed41db..b3bee64dde 100644
--- a/src/network/ssl/qsslcontext_openssl11.cpp
+++ b/src/network/ssl/qsslcontext_openssl11.cpp
@@ -59,11 +59,26 @@ QT_BEGIN_NAMESPACE
extern int q_X509Callback(int ok, X509_STORE_CTX *ctx);
extern QString getErrorsFromOpenSsl();
+#if QT_CONFIG(dtls)
+// defined in qdtls_openssl.cpp:
+namespace dtlscallbacks
+{
+extern "C" int q_X509DtlsCallback(int ok, X509_STORE_CTX *ctx);
+extern "C" int q_generate_cookie_callback(SSL *ssl, unsigned char *dst,
+ unsigned *cookieLength);
+extern "C" int q_verify_cookie_callback(SSL *ssl, const unsigned char *cookie,
+ unsigned cookieLength);
+}
+#endif // dtls
+
static inline QString msgErrorSettingEllipticCurves(const QString &why)
{
return QSslSocket::tr("Error when setting the elliptic curves (%1)").arg(why);
}
+// Defined in qsslsocket.cpp
+QList<QSslCipher> q_getDefaultDtlsCiphers();
+
// static
void QSslContext::initSslContext(QSslContext *sslContext, QSslSocket::SslMode mode, const QSslConfiguration &configuration, bool allowRootCertOnDemandLoading)
{
@@ -74,14 +89,27 @@ void QSslContext::initSslContext(QSslContext *sslContext, QSslSocket::SslMode mo
bool reinitialized = false;
bool unsupportedProtocol = false;
+ bool isDtls = false;
init_context:
if (sslContext->sslConfiguration.protocol() == QSsl::SslV2) {
// SSL 2 is no longer supported, but chosen deliberately -> error
sslContext->ctx = nullptr;
unsupportedProtocol = true;
} else {
- // The ssl options will actually control the supported methods
- sslContext->ctx = q_SSL_CTX_new(client ? q_TLS_client_method() : q_TLS_server_method());
+ switch (sslContext->sslConfiguration.protocol()) {
+#if QT_CONFIG(dtls)
+ case QSsl::DtlsV1_0:
+ case QSsl::DtlsV1_0OrLater:
+ case QSsl::DtlsV1_2:
+ case QSsl::DtlsV1_2OrLater:
+ isDtls = true;
+ sslContext->ctx = q_SSL_CTX_new(client ? q_DTLS_client_method() : q_DTLS_server_method());
+ break;
+#endif // dtls
+ default:
+ // The ssl options will actually control the supported methods
+ sslContext->ctx = q_SSL_CTX_new(client ? q_TLS_client_method() : q_TLS_server_method());
+ }
}
if (!sslContext->ctx) {
@@ -100,8 +128,15 @@ init_context:
return;
}
- long minVersion = TLS_ANY_VERSION;
- long maxVersion = TLS_ANY_VERSION;
+ const long anyVersion =
+#if QT_CONFIG(dtls)
+ isDtls ? DTLS_ANY_VERSION : TLS_ANY_VERSION;
+#else
+ TLS_ANY_VERSION;
+#endif // dtls
+ long minVersion = anyVersion;
+ long maxVersion = anyVersion;
+
switch (sslContext->sslConfiguration.protocol()) {
// The single-protocol versions first:
case QSsl::SslV3:
@@ -139,6 +174,24 @@ init_context:
minVersion = TLS1_2_VERSION;
maxVersion = TLS_MAX_VERSION;
break;
+#if QT_CONFIG(dtls)
+ case QSsl::DtlsV1_0:
+ minVersion = DTLS1_VERSION;
+ maxVersion = DTLS1_VERSION;
+ break;
+ case QSsl::DtlsV1_0OrLater:
+ minVersion = DTLS1_VERSION;
+ maxVersion = DTLS_MAX_VERSION;
+ break;
+ case QSsl::DtlsV1_2:
+ minVersion = DTLS1_2_VERSION;
+ maxVersion = DTLS1_2_VERSION;
+ break;
+ case QSsl::DtlsV1_2OrLater:
+ minVersion = DTLS1_2_VERSION;
+ maxVersion = DTLS_MAX_VERSION;
+ break;
+#endif // dtls
case QSsl::SslV2:
// This protocol is not supported by OpenSSL 1.1 and we handle
// it as an error (see the code above).
@@ -148,14 +201,14 @@ init_context:
break;
}
- if (minVersion != TLS_ANY_VERSION
+ if (minVersion != anyVersion
&& !q_SSL_CTX_set_min_proto_version(sslContext->ctx, minVersion)) {
sslContext->errorStr = QSslSocket::tr("Error while setting the minimal protocol version");
sslContext->errorCode = QSslError::UnspecifiedError;
return;
}
- if (maxVersion != TLS_ANY_VERSION
+ if (maxVersion != anyVersion
&& !q_SSL_CTX_set_max_proto_version(sslContext->ctx, maxVersion)) {
sslContext->errorStr = QSslSocket::tr("Error while setting the maximum protocol version");
sslContext->errorCode = QSslError::UnspecifiedError;
@@ -175,7 +228,8 @@ init_context:
bool first = true;
QList<QSslCipher> ciphers = sslContext->sslConfiguration.ciphers();
if (ciphers.isEmpty())
- ciphers = QSslSocketPrivate::defaultCiphers();
+ ciphers = isDtls ? q_getDefaultDtlsCiphers() : QSslSocketPrivate::defaultCiphers();
+
for (const QSslCipher &cipher : qAsConst(ciphers)) {
if (first)
first = false;
@@ -282,8 +336,19 @@ init_context:
if (sslContext->sslConfiguration.peerVerifyMode() == QSslSocket::VerifyNone) {
q_SSL_CTX_set_verify(sslContext->ctx, SSL_VERIFY_NONE, nullptr);
} else {
- q_SSL_CTX_set_verify(sslContext->ctx, SSL_VERIFY_PEER, q_X509Callback);
+ q_SSL_CTX_set_verify(sslContext->ctx, SSL_VERIFY_PEER,
+#if QT_CONFIG(dtls)
+ isDtls ? dtlscallbacks::q_X509DtlsCallback :
+#endif // dtls
+ q_X509Callback);
+ }
+
+#if QT_CONFIG(dtls)
+ if (mode == QSslSocket::SslServerMode && isDtls && configuration.dtlsCookieVerificationEnabled()) {
+ q_SSL_CTX_set_cookie_generate_cb(sslContext->ctx, dtlscallbacks::q_generate_cookie_callback);
+ q_SSL_CTX_set_cookie_verify_cb(sslContext->ctx, dtlscallbacks::q_verify_cookie_callback);
}
+#endif // dtls
// Set verification depth.
if (sslContext->sslConfiguration.peerVerifyDepth() != 0)
diff --git a/src/network/ssl/qsslcontext_opensslpre11.cpp b/src/network/ssl/qsslcontext_opensslpre11.cpp
index eea821804f..c8be2ecb31 100644
--- a/src/network/ssl/qsslcontext_opensslpre11.cpp
+++ b/src/network/ssl/qsslcontext_opensslpre11.cpp
@@ -56,11 +56,26 @@ QT_BEGIN_NAMESPACE
extern int q_X509Callback(int ok, X509_STORE_CTX *ctx);
extern QString getErrorsFromOpenSsl();
+#if QT_CONFIG(dtls)
+// defined in qdtls_openssl.cpp:
+namespace dtlscallbacks
+{
+extern "C" int q_X509DtlsCallback(int ok, X509_STORE_CTX *ctx);
+extern "C" int q_generate_cookie_callback(SSL *ssl, unsigned char *dst,
+ unsigned *cookieLength);
+extern "C" int q_verify_cookie_callback(SSL *ssl, const unsigned char *cookie,
+ unsigned cookieLength);
+}
+#endif // dtls
+
static inline QString msgErrorSettingEllipticCurves(const QString &why)
{
return QSslSocket::tr("Error when setting the elliptic curves (%1)").arg(why);
}
+// Defined in qsslsocket.cpp
+QList<QSslCipher> q_getDefaultDtlsCiphers();
+
// static
void QSslContext::initSslContext(QSslContext *sslContext, QSslSocket::SslMode mode, const QSslConfiguration &configuration, bool allowRootCertOnDemandLoading)
{
@@ -68,11 +83,28 @@ void QSslContext::initSslContext(QSslContext *sslContext, QSslSocket::SslMode mo
sslContext->errorCode = QSslError::NoError;
bool client = (mode == QSslSocket::SslClientMode);
-
bool reinitialized = false;
bool unsupportedProtocol = false;
+ bool isDtls = false;
init_context:
switch (sslContext->sslConfiguration.protocol()) {
+#if QT_CONFIG(dtls)
+ case QSsl::DtlsV1_0:
+ isDtls = true;
+ sslContext->ctx = q_SSL_CTX_new(client ? q_DTLSv1_client_method() : q_DTLSv1_server_method());
+ break;
+ case QSsl::DtlsV1_2:
+ case QSsl::DtlsV1_2OrLater:
+ // OpenSSL 1.0.2 and below will probably never receive TLS 1.3, so
+ // technically 1.2 or later is 1.2 and will stay so.
+ isDtls = true;
+ sslContext->ctx = q_SSL_CTX_new(client ? q_DTLSv1_2_client_method() : q_DTLSv1_2_server_method());
+ break;
+ case QSsl::DtlsV1_0OrLater:
+ isDtls = true;
+ sslContext->ctx = q_SSL_CTX_new(client ? q_DTLS_client_method() : q_DTLS_server_method());
+ break;
+#endif // dtls
case QSsl::SslV2:
#ifndef OPENSSL_NO_SSL2
sslContext->ctx = q_SSL_CTX_new(client ? q_SSLv2_client_method() : q_SSLv2_server_method());
@@ -138,6 +170,12 @@ init_context:
break;
}
+ if (!client && isDtls && configuration.peerVerifyMode() != QSslSocket::VerifyNone) {
+ sslContext->errorStr = QSslSocket::tr("DTLS server requires a 'VerifyNone' mode with your version of OpenSSL");
+ sslContext->errorCode = QSslError::UnspecifiedError;
+ return;
+ }
+
if (!sslContext->ctx) {
// After stopping Flash 10 the SSL library loses its ciphers. Try re-adding them
// by re-initializing the library.
@@ -155,6 +193,7 @@ init_context:
}
// Enable bug workarounds.
+ // DTLSTODO: check this setupOpenSslOptions ...
long options = QSslSocketBackendPrivate::setupOpenSslOptions(configuration.protocol(), configuration.d->sslOptions);
q_SSL_CTX_set_options(sslContext->ctx, options);
@@ -170,7 +209,7 @@ init_context:
bool first = true;
QList<QSslCipher> ciphers = sslContext->sslConfiguration.ciphers();
if (ciphers.isEmpty())
- ciphers = QSslSocketPrivate::defaultCiphers();
+ ciphers = isDtls ? q_getDefaultDtlsCiphers() : QSslSocketPrivate::defaultCiphers();
for (const QSslCipher &cipher : qAsConst(ciphers)) {
if (first)
first = false;
@@ -277,8 +316,19 @@ init_context:
if (sslContext->sslConfiguration.peerVerifyMode() == QSslSocket::VerifyNone) {
q_SSL_CTX_set_verify(sslContext->ctx, SSL_VERIFY_NONE, 0);
} else {
- q_SSL_CTX_set_verify(sslContext->ctx, SSL_VERIFY_PEER, q_X509Callback);
+ q_SSL_CTX_set_verify(sslContext->ctx, SSL_VERIFY_PEER,
+#if QT_CONFIG(dtls)
+ isDtls ? dtlscallbacks::q_X509DtlsCallback :
+#endif // dtls
+ q_X509Callback);
+ }
+
+#if QT_CONFIG(dtls)
+ if (mode == QSslSocket::SslServerMode && isDtls && configuration.dtlsCookieVerificationEnabled()) {
+ q_SSL_CTX_set_cookie_generate_cb(sslContext->ctx, dtlscallbacks::q_generate_cookie_callback);
+ q_SSL_CTX_set_cookie_verify_cb(sslContext->ctx, CookieVerifyCallback(dtlscallbacks::q_verify_cookie_callback));
}
+#endif // dtls
// Set verification depth.
if (sslContext->sslConfiguration.peerVerifyDepth() != 0)
diff --git a/src/network/ssl/qsslkey_openssl.cpp b/src/network/ssl/qsslkey_openssl.cpp
index 58df544a0e..6e5a4c76e9 100644
--- a/src/network/ssl/qsslkey_openssl.cpp
+++ b/src/network/ssl/qsslkey_openssl.cpp
@@ -125,10 +125,10 @@ bool QSslKeyPrivate::fromEVP_PKEY(EVP_PKEY *pkey)
return false;
}
-void QSslKeyPrivate::decodeDer(const QByteArray &der, bool deepClear)
+void QSslKeyPrivate::decodeDer(const QByteArray &der, const QByteArray &passPhrase, bool deepClear)
{
QMap<QByteArray, QByteArray> headers;
- decodePem(pemFromDer(der, headers), QByteArray(), deepClear);
+ decodePem(pemFromDer(der, headers), passPhrase, deepClear);
}
void QSslKeyPrivate::decodePem(const QByteArray &pem, const QByteArray &passPhrase,
diff --git a/src/network/ssl/qsslkey_p.cpp b/src/network/ssl/qsslkey_p.cpp
index e66ec953a0..28e3e2efd8 100644
--- a/src/network/ssl/qsslkey_p.cpp
+++ b/src/network/ssl/qsslkey_p.cpp
@@ -61,6 +61,7 @@
#endif
#include "qsslsocket.h"
#include "qsslsocket_p.h"
+#include "qasn1element_p.h"
#include <QtCore/qatomic.h>
#include <QtCore/qbytearray.h>
@@ -120,6 +121,13 @@ QByteArray QSslKeyPrivate::pemHeader() const
return QByteArray();
}
+static QByteArray pkcs8Header(bool encrypted)
+{
+ return encrypted
+ ? QByteArrayLiteral("-----BEGIN ENCRYPTED PRIVATE KEY-----")
+ : QByteArrayLiteral("-----BEGIN PRIVATE KEY-----");
+}
+
/*!
\internal
*/
@@ -138,6 +146,13 @@ QByteArray QSslKeyPrivate::pemFooter() const
return QByteArray();
}
+static QByteArray pkcs8Footer(bool encrypted)
+{
+ return encrypted
+ ? QByteArrayLiteral("-----END ENCRYPTED PRIVATE KEY-----")
+ : QByteArrayLiteral("-----END PRIVATE KEY-----");
+}
+
/*!
\internal
@@ -166,8 +181,19 @@ QByteArray QSslKeyPrivate::pemFromDer(const QByteArray &der, const QMap<QByteArr
} while (it != headers.constBegin());
extra += '\n';
}
- pem.prepend(pemHeader() + '\n' + extra);
- pem.append(pemFooter() + '\n');
+
+ if (isEncryptedPkcs8(der)) {
+ pem.prepend(pkcs8Header(true) + '\n' + extra);
+ pem.append(pkcs8Footer(true) + '\n');
+#if !QT_CONFIG(openssl)
+ } else if (isPkcs8) {
+ pem.prepend(pkcs8Header(false) + '\n' + extra);
+ pem.append(pkcs8Footer(false) + '\n');
+#endif
+ } else {
+ pem.prepend(pemHeader() + '\n' + extra);
+ pem.append(pemFooter() + '\n');
+ }
return pem;
}
@@ -179,13 +205,27 @@ QByteArray QSslKeyPrivate::pemFromDer(const QByteArray &der, const QMap<QByteArr
*/
QByteArray QSslKeyPrivate::derFromPem(const QByteArray &pem, QMap<QByteArray, QByteArray> *headers) const
{
- const QByteArray header = pemHeader();
- const QByteArray footer = pemFooter();
+ QByteArray header = pemHeader();
+ QByteArray footer = pemFooter();
QByteArray der(pem);
- const int headerIndex = der.indexOf(header);
- const int footerIndex = der.indexOf(footer);
+ int headerIndex = der.indexOf(header);
+ int footerIndex = der.indexOf(footer, headerIndex + header.length());
+ if (type != QSsl::PublicKey) {
+ if (headerIndex == -1 || footerIndex == -1) {
+ header = pkcs8Header(true);
+ footer = pkcs8Footer(true);
+ headerIndex = der.indexOf(header);
+ footerIndex = der.indexOf(footer, headerIndex + header.length());
+ }
+ if (headerIndex == -1 || footerIndex == -1) {
+ header = pkcs8Header(false);
+ footer = pkcs8Footer(false);
+ headerIndex = der.indexOf(header);
+ footerIndex = der.indexOf(footer, headerIndex + header.length());
+ }
+ }
if (headerIndex == -1 || footerIndex == -1)
return QByteArray();
@@ -225,13 +265,47 @@ QByteArray QSslKeyPrivate::derFromPem(const QByteArray &pem, QMap<QByteArray, QB
return QByteArray::fromBase64(der); // ignores newlines
}
+bool QSslKeyPrivate::isEncryptedPkcs8(const QByteArray &der) const
+{
+ static const QVector<QByteArray> pbes1OIds {
+ // PKCS5
+ {PKCS5_MD2_DES_CBC_OID},
+ {PKCS5_MD2_RC2_CBC_OID},
+ {PKCS5_MD5_DES_CBC_OID},
+ {PKCS5_MD5_RC2_CBC_OID},
+ {PKCS5_SHA1_DES_CBC_OID},
+ {PKCS5_SHA1_RC2_CBC_OID},
+ };
+ QAsn1Element elem;
+ if (!elem.read(der) || elem.type() != QAsn1Element::SequenceType)
+ return false;
+
+ const QVector<QAsn1Element> items = elem.toVector();
+ if (items.size() != 2
+ || items[0].type() != QAsn1Element::SequenceType
+ || items[1].type() != QAsn1Element::OctetStringType) {
+ return false;
+ }
+
+ const QVector<QAsn1Element> encryptionSchemeContainer = items[0].toVector();
+ if (encryptionSchemeContainer.size() != 2
+ || encryptionSchemeContainer[0].type() != QAsn1Element::ObjectIdentifierType
+ || encryptionSchemeContainer[1].type() != QAsn1Element::SequenceType) {
+ return false;
+ }
+
+ const QByteArray encryptionScheme = encryptionSchemeContainer[0].toObjectId();
+ return encryptionScheme == PKCS5_PBES2_ENCRYPTION_OID
+ || pbes1OIds.contains(encryptionScheme)
+ || encryptionScheme.startsWith(PKCS12_OID);
+}
+
/*!
Constructs a QSslKey by decoding the string in the byte array
\a encoded using a specified \a algorithm and \a encoding format.
\a type specifies whether the key is public or private.
- If the key is encoded as PEM and encrypted, \a passPhrase is used
- to decrypt it.
+ If the key is encrypted then \a passPhrase is used to decrypt it.
After construction, use isNull() to check if \a encoded contained
a valid key.
@@ -243,7 +317,7 @@ QSslKey::QSslKey(const QByteArray &encoded, QSsl::KeyAlgorithm algorithm,
d->type = type;
d->algorithm = algorithm;
if (encoding == QSsl::Der)
- d->decodeDer(encoded);
+ d->decodeDer(encoded, passPhrase);
else
d->decodePem(encoded, passPhrase);
}
@@ -253,8 +327,7 @@ QSslKey::QSslKey(const QByteArray &encoded, QSsl::KeyAlgorithm algorithm,
\a device using a specified \a algorithm and \a encoding format.
\a type specifies whether the key is public or private.
- If the key is encoded as PEM and encrypted, \a passPhrase is used
- to decrypt it.
+ If the key is encrypted then \a passPhrase is used to decrypt it.
After construction, use isNull() to check if \a device provided
a valid key.
@@ -269,7 +342,7 @@ QSslKey::QSslKey(QIODevice *device, QSsl::KeyAlgorithm algorithm, QSsl::Encoding
d->type = type;
d->algorithm = algorithm;
if (encoding == QSsl::Der)
- d->decodeDer(encoded);
+ d->decodeDer(encoded, passPhrase);
else
d->decodePem(encoded, passPhrase);
}
diff --git a/src/network/ssl/qsslkey_p.h b/src/network/ssl/qsslkey_p.h
index c93941c198..7ae2cc740b 100644
--- a/src/network/ssl/qsslkey_p.h
+++ b/src/network/ssl/qsslkey_p.h
@@ -81,9 +81,8 @@ public:
#ifndef QT_NO_OPENSSL
bool fromEVP_PKEY(EVP_PKEY *pkey);
#endif
- void decodeDer(const QByteArray &der, bool deepClear = true);
- void decodePem(const QByteArray &pem, const QByteArray &passPhrase,
- bool deepClear = true);
+ void decodeDer(const QByteArray &der, const QByteArray &passPhrase = {}, bool deepClear = true);
+ void decodePem(const QByteArray &pem, const QByteArray &passPhrase, bool deepClear = true);
QByteArray pemHeader() const;
QByteArray pemFooter() const;
QByteArray pemFromDer(const QByteArray &der, const QMap<QByteArray, QByteArray> &headers) const;
@@ -93,6 +92,12 @@ public:
QByteArray toPem(const QByteArray &passPhrase) const;
Qt::HANDLE handle() const;
+ bool isEncryptedPkcs8(const QByteArray &der) const;
+#if !QT_CONFIG(openssl)
+ QByteArray decryptPkcs8(const QByteArray &encrypted, const QByteArray &passPhrase);
+ bool isPkcs8 = false;
+#endif
+
bool isNull;
QSsl::KeyType type;
QSsl::KeyAlgorithm algorithm;
diff --git a/src/network/ssl/qsslkey_qt.cpp b/src/network/ssl/qsslkey_qt.cpp
index a85fed21ed..a13275f3bb 100644
--- a/src/network/ssl/qsslkey_qt.cpp
+++ b/src/network/ssl/qsslkey_qt.cpp
@@ -43,8 +43,11 @@
#include <QtCore/qdatastream.h>
#include <QtCore/qcryptographichash.h>
+#include <QtCore/QMessageAuthenticationCode>
#include <QtCore/qrandom.h>
+#include <QtNetwork/qpassworddigestor.h>
+
QT_USE_NAMESPACE
static const quint8 bits_table[256] = {
@@ -154,15 +157,86 @@ void QSslKeyPrivate::clear(bool deep)
keyLength = -1;
}
-void QSslKeyPrivate::decodeDer(const QByteArray &der, bool deepClear)
+static int extractPkcs8KeyLength(const QVector<QAsn1Element> &items, QSslKeyPrivate *that) {
+ Q_ASSERT(items.size() == 3);
+ int keyLength;
+
+ auto getName = [](QSsl::KeyAlgorithm algorithm) {
+ switch (algorithm){
+ case QSsl::Rsa: return "RSA";
+ case QSsl::Dsa: return "DSA";
+ case QSsl::Ec: return "EC";
+ case QSsl::Opaque: return "Opaque";
+ }
+ Q_UNREACHABLE();
+ };
+
+ const QVector<QAsn1Element> pkcs8Info = items[1].toVector();
+ if (pkcs8Info.size() != 2 || pkcs8Info[0].type() != QAsn1Element::ObjectIdentifierType)
+ return -1;
+ const QByteArray value = pkcs8Info[0].toObjectId();
+ if (value == RSA_ENCRYPTION_OID) {
+ if (Q_UNLIKELY(that->algorithm != QSsl::Rsa)) {
+ // We could change the 'algorithm' of QSslKey here and continue loading, but
+ // this is not supported in the openssl back-end, so we'll fail here and give
+ // the user some feedback.
+ qWarning() << "QSslKey: Found RSA key when asked to use" << getName(that->algorithm)
+ << "\nLoading will fail.";
+ return -1;
+ }
+ // Luckily it contains the 'normal' RSA-key format inside, so we can just recurse
+ // and read the key's info.
+ that->decodeDer(items[2].value());
+ // The real info has been filled out in the call above, so return as if it was invalid
+ // to avoid overwriting the data.
+ return -1;
+ } else if (value == EC_ENCRYPTION_OID) {
+ if (Q_UNLIKELY(that->algorithm != QSsl::Ec)) {
+ // As above for RSA.
+ qWarning() << "QSslKey: Found EC key when asked to use" << getName(that->algorithm)
+ << "\nLoading will fail.";
+ return -1;
+ }
+ // I don't know where this is documented, but the elliptic-curve identifier has been
+ // moved into the "pkcs#8 wrapper", which is what we're interested in.
+ if (pkcs8Info[1].type() != QAsn1Element::ObjectIdentifierType)
+ return -1;
+ keyLength = curveBits(pkcs8Info[1].toObjectId());
+ } else if (value == DSA_ENCRYPTION_OID) {
+ if (Q_UNLIKELY(that->algorithm != QSsl::Dsa)) {
+ // As above for RSA.
+ qWarning() << "QSslKey: Found DSA when asked to use" << getName(that->algorithm)
+ << "\nLoading will fail.";
+ return -1;
+ }
+ // DSA's structure is documented here:
+ // https://www.cryptsoft.com/pkcs11doc/STANDARD/v201-95.pdf in section 11.9.
+ if (pkcs8Info[1].type() != QAsn1Element::SequenceType)
+ return -1;
+ const QVector<QAsn1Element> dsaInfo = pkcs8Info[1].toVector();
+ if (dsaInfo.size() != 3 || dsaInfo[0].type() != QAsn1Element::IntegerType)
+ return -1;
+ keyLength = numberOfBits(dsaInfo[0].value());
+ } else {
+ // in case of unexpected formats:
+ qWarning() << "QSslKey: Unsupported PKCS#8 key algorithm:" << value
+ << "\nFile a bugreport to Qt (include the line above).";
+ return -1;
+ }
+ return keyLength;
+}
+
+void QSslKeyPrivate::decodeDer(const QByteArray &der, const QByteArray &passPhrase, bool deepClear)
{
clear(deepClear);
if (der.isEmpty())
return;
+ // decryptPkcs8 decrypts if necessary or returns 'der' unaltered
+ QByteArray decryptedDer = decryptPkcs8(der, passPhrase);
QAsn1Element elem;
- if (!elem.read(der) || elem.type() != QAsn1Element::SequenceType)
+ if (!elem.read(decryptedDer) || elem.type() != QAsn1Element::SequenceType)
return;
if (type == QSsl::PublicKey) {
@@ -212,7 +286,16 @@ void QSslKeyPrivate::decodeDer(const QByteArray &der, bool deepClear)
return;
const QByteArray versionHex = items[0].value().toHex();
- if (algorithm == QSsl::Rsa) {
+ if (items.size() == 3 && items[1].type() == QAsn1Element::SequenceType
+ && items[2].type() == QAsn1Element::OctetStringType) {
+ if (versionHex != "00" && versionHex != "01")
+ return;
+ int pkcs8KeyLength = extractPkcs8KeyLength(items, this);
+ if (pkcs8KeyLength == -1)
+ return;
+ isPkcs8 = true;
+ keyLength = pkcs8KeyLength;
+ } else if (algorithm == QSsl::Rsa) {
if (versionHex != "00")
return;
if (items.size() != 9 || items[1].type() != QAsn1Element::IntegerType)
@@ -240,7 +323,7 @@ void QSslKeyPrivate::decodeDer(const QByteArray &der, bool deepClear)
}
}
- derData = der;
+ derData = decryptedDer;
isNull = false;
}
@@ -272,7 +355,7 @@ void QSslKeyPrivate::decodePem(const QByteArray &pem, const QByteArray &passPhra
const QByteArray key = deriveKey(cipher, passPhrase, iv);
data = decrypt(cipher, data, key, iv);
}
- decodeDer(data, deepClear);
+ decodeDer(data, passPhrase, deepClear);
}
int QSslKeyPrivate::length() const
@@ -307,3 +390,320 @@ Qt::HANDLE QSslKeyPrivate::handle() const
{
return opaque;
}
+
+// Maps OIDs to the encryption cipher they specify
+static const QMap<QByteArray, QSslKeyPrivate::Cipher> oidCipherMap {
+ {DES_CBC_ENCRYPTION_OID, QSslKeyPrivate::Cipher::DesCbc},
+ {DES_EDE3_CBC_ENCRYPTION_OID, QSslKeyPrivate::Cipher::DesEde3Cbc},
+ // {PKCS5_MD2_DES_CBC_OID, QSslKeyPrivate::Cipher::DesCbc}, // No MD2
+ {PKCS5_MD5_DES_CBC_OID, QSslKeyPrivate::Cipher::DesCbc},
+ {PKCS5_SHA1_DES_CBC_OID, QSslKeyPrivate::Cipher::DesCbc},
+ // {PKCS5_MD2_RC2_CBC_OID, QSslKeyPrivate::Cipher::Rc2Cbc}, // No MD2
+ {PKCS5_MD5_RC2_CBC_OID, QSslKeyPrivate::Cipher::Rc2Cbc},
+ {PKCS5_SHA1_RC2_CBC_OID, QSslKeyPrivate::Cipher::Rc2Cbc},
+ {RC2_CBC_ENCRYPTION_OID, QSslKeyPrivate::Cipher::Rc2Cbc}
+ // {RC5_CBC_ENCRYPTION_OID, QSslKeyPrivate::Cipher::Rc5Cbc}, // No RC5
+ // {AES128_CBC_ENCRYPTION_OID, QSslKeyPrivate::Cipher::Aes128}, // no AES
+ // {AES192_CBC_ENCRYPTION_OID, QSslKeyPrivate::Cipher::Aes192},
+ // {AES256_CBC_ENCRYPTION_OID, QSslKeyPrivate::Cipher::Aes256}
+};
+
+struct EncryptionData
+{
+ EncryptionData() : initialized(false)
+ {}
+ EncryptionData(QSslKeyPrivate::Cipher cipher, QByteArray key, QByteArray iv)
+ : initialized(true), cipher(cipher), key(key), iv(iv)
+ {}
+ bool initialized;
+ QSslKeyPrivate::Cipher cipher;
+ QByteArray key;
+ QByteArray iv;
+};
+
+static EncryptionData readPbes2(const QVector<QAsn1Element> &element, const QByteArray &passPhrase)
+{
+ // RFC 8018: https://tools.ietf.org/html/rfc8018#section-6.2
+ /*** Scheme: ***
+ * Sequence (scheme-specific info..)
+ * Sequence (key derivation info)
+ * Object Identifier (Key derivation algorithm (e.g. PBKDF2))
+ * Sequence (salt)
+ * CHOICE (this entry can be either of the types it contains)
+ * Octet string (actual salt)
+ * Object identifier (Anything using this is deferred to a later version of PKCS #5)
+ * Integer (iteration count)
+ * Sequence (encryption algorithm info)
+ * Object identifier (identifier for the algorithm)
+ * Algorithm dependent, is covered in the switch further down
+ */
+
+ static const QMap<QByteArray, QCryptographicHash::Algorithm> pbes2OidHashFunctionMap {
+ // PBES2/PBKDF2
+ {HMAC_WITH_SHA1, QCryptographicHash::Sha1},
+ {HMAC_WITH_SHA224, QCryptographicHash::Sha224},
+ {HMAC_WITH_SHA256, QCryptographicHash::Sha256},
+ {HMAC_WITH_SHA512, QCryptographicHash::Sha512},
+ {HMAC_WITH_SHA512_224, QCryptographicHash::Sha512},
+ {HMAC_WITH_SHA512_256, QCryptographicHash::Sha512},
+ {HMAC_WITH_SHA384, QCryptographicHash::Sha384}
+ };
+
+ // Values from their respective sections here: https://tools.ietf.org/html/rfc8018#appendix-B.2
+ static const QMap<QSslKeyPrivate::Cipher, int> cipherKeyLengthMap {
+ {QSslKeyPrivate::Cipher::DesCbc, 8},
+ {QSslKeyPrivate::Cipher::DesEde3Cbc, 24},
+ // @note: variable key-length (https://tools.ietf.org/html/rfc8018#appendix-B.2.3)
+ {QSslKeyPrivate::Cipher::Rc2Cbc, 4}
+ // @todo: AES(, rc5?)
+ };
+
+ const QVector<QAsn1Element> keyDerivationContainer = element[0].toVector();
+ if (keyDerivationContainer.size() != 2
+ || keyDerivationContainer[0].type() != QAsn1Element::ObjectIdentifierType
+ || keyDerivationContainer[1].type() != QAsn1Element::SequenceType) {
+ return {};
+ }
+
+ const QByteArray keyDerivationAlgorithm = keyDerivationContainer[0].toObjectId();
+ const QVector<QAsn1Element> keyDerivationParams = keyDerivationContainer[1].toVector();
+
+ const QVector<QAsn1Element> encryptionAlgorithmContainer = element[1].toVector();
+ if (encryptionAlgorithmContainer.size() != 2
+ || encryptionAlgorithmContainer[0].type() != QAsn1Element::ObjectIdentifierType) {
+ return {};
+ }
+
+ auto iterator = oidCipherMap.constFind(encryptionAlgorithmContainer[0].toObjectId());
+ if (iterator == oidCipherMap.cend()) {
+ qWarning()
+ << "QSslKey: Unsupported encryption cipher OID:" << encryptionAlgorithmContainer[0].toObjectId()
+ << "\nFile a bugreport to Qt (include the line above).";
+ return {};
+ }
+
+ QSslKeyPrivate::Cipher cipher = *iterator;
+ QByteArray key;
+ QByteArray iv;
+ switch (cipher) {
+ case QSslKeyPrivate::Cipher::DesCbc:
+ case QSslKeyPrivate::Cipher::DesEde3Cbc:
+ // https://tools.ietf.org/html/rfc8018#appendix-B.2.1 (DES-CBC-PAD)
+ // https://tools.ietf.org/html/rfc8018#appendix-B.2.2 (DES-EDE3-CBC-PAD)
+ // @todo https://tools.ietf.org/html/rfc8018#appendix-B.2.5 (AES-CBC-PAD)
+ /*** Scheme: ***
+ * Octet string (IV)
+ */
+ if (encryptionAlgorithmContainer[1].type() != QAsn1Element::OctetStringType)
+ return {};
+
+ // @note: All AES identifiers should be able to use this branch!!
+ iv = encryptionAlgorithmContainer[1].value();
+
+ if (iv.size() != 8) // @note: AES needs 16 bytes
+ return {};
+ break;
+ case QSslKeyPrivate::Cipher::Rc2Cbc: {
+ // https://tools.ietf.org/html/rfc8018#appendix-B.2.3
+ /*** Scheme: ***
+ * Sequence (rc2 parameters)
+ * Integer (rc2 parameter version)
+ * Octet string (IV)
+ */
+ if (encryptionAlgorithmContainer[1].type() != QAsn1Element::SequenceType)
+ return {};
+ const QVector<QAsn1Element> rc2ParametersContainer = encryptionAlgorithmContainer[1].toVector();
+ if ((rc2ParametersContainer.size() != 1 && rc2ParametersContainer.size() != 2)
+ || rc2ParametersContainer.back().type() != QAsn1Element::OctetStringType) {
+ return {};
+ }
+ iv = rc2ParametersContainer.back().value();
+ if (iv.size() != 8)
+ return {};
+ break;
+ } // @todo(?): case (RC5 , AES)
+ }
+
+ if (Q_LIKELY(keyDerivationAlgorithm == PKCS5_PBKDF2_ENCRYPTION_OID)) {
+ // Definition: https://tools.ietf.org/html/rfc8018#appendix-A.2
+ QByteArray salt;
+ if (keyDerivationParams[0].type() == QAsn1Element::OctetStringType) {
+ salt = keyDerivationParams[0].value();
+ } else if (keyDerivationParams[0].type() == QAsn1Element::ObjectIdentifierType) {
+ Q_UNIMPLEMENTED();
+ /* See paragraph from https://tools.ietf.org/html/rfc8018#appendix-A.2
+ which ends with: "such facilities are deferred to a future version of PKCS #5"
+ */
+ return {};
+ } else {
+ return {};
+ }
+
+ // Iterations needed to derive the key
+ int iterationCount = keyDerivationParams[1].toInteger();
+ // Optional integer
+ int keyLength = -1;
+ int vectorPos = 2;
+ if (keyDerivationParams.size() > vectorPos
+ && keyDerivationParams[vectorPos].type() == QAsn1Element::IntegerType) {
+ keyLength = keyDerivationParams[vectorPos].toInteger(nullptr);
+ ++vectorPos;
+ } else {
+ keyLength = cipherKeyLengthMap[cipher];
+ }
+
+ // Optional algorithm identifier (default: HMAC-SHA-1)
+ QCryptographicHash::Algorithm hashAlgorithm = QCryptographicHash::Sha1;
+ if (keyDerivationParams.size() > vectorPos
+ && keyDerivationParams[vectorPos].type() == QAsn1Element::SequenceType) {
+ QVector<QAsn1Element> hashAlgorithmContainer = keyDerivationParams[vectorPos].toVector();
+ hashAlgorithm = pbes2OidHashFunctionMap[hashAlgorithmContainer.front().toObjectId()];
+ Q_ASSERT(hashAlgorithmContainer[1].type() == QAsn1Element::NullType);
+ ++vectorPos;
+ }
+ Q_ASSERT(keyDerivationParams.size() == vectorPos);
+
+ key = QPasswordDigestor::deriveKeyPbkdf2(hashAlgorithm, passPhrase, salt, iterationCount, keyLength);
+ } else {
+ qWarning()
+ << "QSslKey: Unsupported key derivation algorithm OID:" << keyDerivationAlgorithm
+ << "\nFile a bugreport to Qt (include the line above).";
+ return {};
+ }
+ return {cipher, key, iv};
+}
+
+// Maps OIDs to the hash function it specifies
+static const QMap<QByteArray, QCryptographicHash::Algorithm> pbes1OidHashFunctionMap {
+#ifndef QT_CRYPTOGRAPHICHASH_ONLY_SHA1
+ // PKCS5
+ //{PKCS5_MD2_DES_CBC_OID, QCryptographicHash::Md2}, No MD2
+ //{PKCS5_MD2_RC2_CBC_OID, QCryptographicHash::Md2},
+ {PKCS5_MD5_DES_CBC_OID, QCryptographicHash::Md5},
+ {PKCS5_MD5_RC2_CBC_OID, QCryptographicHash::Md5},
+#endif
+ {PKCS5_SHA1_DES_CBC_OID, QCryptographicHash::Sha1},
+ {PKCS5_SHA1_RC2_CBC_OID, QCryptographicHash::Sha1},
+ // PKCS12 (unimplemented)
+ // {PKCS12_SHA1_RC4_128_OID, QCryptographicHash::Sha1}, // No RC4
+ // {PKCS12_SHA1_RC4_40_OID, QCryptographicHash::Sha1},
+ // @todo: lacking support. @note: there might be code to do this inside qsslsocket_mac...
+ // further note that more work may be required for the 3DES variations listed to be available.
+ // {PKCS12_SHA1_3KEY_3DES_CBC_OID, QCryptographicHash::Sha1},
+ // {PKCS12_SHA1_2KEY_3DES_CBC_OID, QCryptographicHash::Sha1},
+ // {PKCS12_SHA1_RC2_128_CBC_OID, QCryptographicHash::Sha1},
+ // {PKCS12_SHA1_RC2_40_CBC_OID, QCryptographicHash::Sha1}
+};
+
+
+static EncryptionData readPbes1(const QVector<QAsn1Element> &element, const QByteArray &encryptionScheme, const QByteArray &passPhrase)
+{
+ // RFC 8018: https://tools.ietf.org/html/rfc8018#section-6.1
+ // Steps refer to this section: https://tools.ietf.org/html/rfc8018#section-6.1.2
+ /*** Scheme: ***
+ * Sequence (PBE Parameter)
+ * Octet string (salt)
+ * Integer (iteration counter)
+ */
+ // Step 1
+ if (element.size() != 2
+ || element[0].type() != QAsn1Element::ElementType::OctetStringType
+ || element[1].type() != QAsn1Element::ElementType::IntegerType) {
+ return {};
+ }
+ QByteArray salt = element[0].value();
+ if (salt.size() != 8)
+ return {};
+
+ int iterationCount = element[1].toInteger();
+ if (iterationCount < 0)
+ return {};
+
+ // Step 2
+ auto iterator = pbes1OidHashFunctionMap.constFind(encryptionScheme);
+ if (iterator == pbes1OidHashFunctionMap.cend()) {
+ // Qt was compiled with ONLY_SHA1 (or it's MD2)
+ return {};
+ }
+ QCryptographicHash::Algorithm hashAlgorithm = *iterator;
+ QByteArray key = QPasswordDigestor::deriveKeyPbkdf1(hashAlgorithm, passPhrase, salt, iterationCount, 16);
+ if (key.size() != 16)
+ return {};
+
+ // Step 3
+ QByteArray iv = key.right(8); // last 8 bytes are used as IV
+ key.truncate(8); // first 8 bytes are used for the key
+
+ QSslKeyPrivate::Cipher cipher = oidCipherMap[encryptionScheme];
+#ifdef Q_OS_WINRT
+ // @todo: document this instead? find some other solution?
+ if (cipher == QSslKeyPrivate::Cipher::Rc2Cbc)
+ qWarning("PBES1 with RC2_CBC doesn't work properly on WinRT.");
+#endif
+ // Steps 4-6 are done after returning
+ return {cipher, key, iv};
+}
+
+QByteArray QSslKeyPrivate::decryptPkcs8(const QByteArray &encrypted, const QByteArray &passPhrase)
+{
+ // RFC 5958: https://tools.ietf.org/html/rfc5958
+ /*** Scheme: ***
+ * Sequence
+ * Sequence
+ * Object Identifier (encryption scheme (currently PBES2, PBES1, @todo PKCS12))
+ * Sequence (scheme parameters)
+ * Octet String (the encrypted data)
+ */
+ QAsn1Element elem;
+ if (!elem.read(encrypted) || elem.type() != QAsn1Element::SequenceType)
+ return encrypted;
+
+ const QVector<QAsn1Element> items = elem.toVector();
+ if (items.size() != 2
+ || items[0].type() != QAsn1Element::SequenceType
+ || items[1].type() != QAsn1Element::OctetStringType) {
+ return encrypted;
+ }
+
+ const QVector<QAsn1Element> encryptionSchemeContainer = items[0].toVector();
+
+ if (encryptionSchemeContainer.size() != 2
+ || encryptionSchemeContainer[0].type() != QAsn1Element::ObjectIdentifierType
+ || encryptionSchemeContainer[1].type() != QAsn1Element::SequenceType) {
+ return encrypted;
+ }
+
+ const QByteArray encryptionScheme = encryptionSchemeContainer[0].toObjectId();
+ const QVector<QAsn1Element> schemeParameterContainer = encryptionSchemeContainer[1].toVector();
+
+ if (schemeParameterContainer.size() != 2
+ && schemeParameterContainer[0].type() != QAsn1Element::SequenceType
+ && schemeParameterContainer[1].type() != QAsn1Element::SequenceType) {
+ return encrypted;
+ }
+
+ EncryptionData data;
+ if (encryptionScheme == PKCS5_PBES2_ENCRYPTION_OID) {
+ data = readPbes2(schemeParameterContainer, passPhrase);
+ } else if (pbes1OidHashFunctionMap.contains(encryptionScheme)) {
+ data = readPbes1(schemeParameterContainer, encryptionScheme, passPhrase);
+ } else if (encryptionScheme.startsWith(PKCS12_OID)) {
+ Q_UNIMPLEMENTED(); // this isn't some 'unknown', I know these aren't implemented
+ return encrypted;
+ } else {
+ qWarning()
+ << "QSslKey: Unsupported encryption scheme OID:" << encryptionScheme
+ << "\nFile a bugreport to Qt (include the line above).";
+ return encrypted;
+ }
+
+ if (!data.initialized) {
+ // something went wrong, return
+ return encrypted;
+ }
+
+ QByteArray decryptedKey = decrypt(data.cipher, items[1].value(), data.key, data.iv);
+ // The data is still wrapped in a octet string, so let's unwrap it
+ QAsn1Element decryptedKeyElement(QAsn1Element::ElementType::OctetStringType, decryptedKey);
+ return decryptedKeyElement.value();
+}
diff --git a/src/network/ssl/qsslpresharedkeyauthenticator.h b/src/network/ssl/qsslpresharedkeyauthenticator.h
index a012ff489a..d0e2eda973 100644
--- a/src/network/ssl/qsslpresharedkeyauthenticator.h
+++ b/src/network/ssl/qsslpresharedkeyauthenticator.h
@@ -76,6 +76,7 @@ public:
private:
friend Q_NETWORK_EXPORT bool operator==(const QSslPreSharedKeyAuthenticator &lhs, const QSslPreSharedKeyAuthenticator &rhs);
friend class QSslSocketBackendPrivate;
+ friend class QDtlsPrivateOpenSSL;
QSharedDataPointer<QSslPreSharedKeyAuthenticatorPrivate> d;
};
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index 4273904c12..2cfe347867 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -336,12 +336,20 @@ QT_BEGIN_NAMESPACE
class QSslSocketGlobalData
{
public:
- QSslSocketGlobalData() : config(new QSslConfigurationPrivate) {}
+ QSslSocketGlobalData()
+ : config(new QSslConfigurationPrivate),
+ dtlsConfig(new QSslConfigurationPrivate)
+ {
+#if QT_CONFIG(dtls)
+ dtlsConfig->protocol = QSsl::DtlsV1_2OrLater;
+#endif // dtls
+ }
QMutex mutex;
QList<QSslCipher> supportedCiphers;
QVector<QSslEllipticCurve> supportedEllipticCurves;
QExplicitlySharedDataPointer<QSslConfigurationPrivate> config;
+ QExplicitlySharedDataPointer<QSslConfigurationPrivate> dtlsConfig;
};
Q_GLOBAL_STATIC(QSslSocketGlobalData, globalData)
@@ -442,6 +450,12 @@ void QSslSocket::connectToHostEncrypted(const QString &hostName, quint16 port, O
return;
}
+ if (!supportsSsl()) {
+ qCWarning(lcSsl, "QSslSocket::connectToHostEncrypted: TLS initialization failed");
+ d->setErrorAndEmit(QAbstractSocket::SslInternalError, tr("TLS initialization failed"));
+ return;
+ }
+
d->init();
d->autoStartHandshake = true;
d->initialized = true;
@@ -473,6 +487,12 @@ void QSslSocket::connectToHostEncrypted(const QString &hostName, quint16 port,
return;
}
+ if (!supportsSsl()) {
+ qCWarning(lcSsl, "QSslSocket::connectToHostEncrypted: TLS initialization failed");
+ d->setErrorAndEmit(QAbstractSocket::SslInternalError, tr("TLS initialization failed"));
+ return;
+ }
+
d->init();
d->autoStartHandshake = true;
d->initialized = true;
@@ -1817,6 +1837,12 @@ void QSslSocket::startClientEncryption()
"QSslSocket::startClientEncryption: cannot start handshake when not connected");
return;
}
+
+ if (!supportsSsl()) {
+ qCWarning(lcSsl, "QSslSocket::startClientEncryption: TLS initialization failed");
+ d->setErrorAndEmit(QAbstractSocket::SslInternalError, tr("TLS initialization failed"));
+ return;
+ }
#ifdef QSSLSOCKET_DEBUG
qCDebug(lcSsl) << "QSslSocket::startClientEncryption()";
#endif
@@ -1855,6 +1881,11 @@ void QSslSocket::startServerEncryption()
#ifdef QSSLSOCKET_DEBUG
qCDebug(lcSsl) << "QSslSocket::startServerEncryption()";
#endif
+ if (!supportsSsl()) {
+ qCWarning(lcSsl, "QSslSocket::startServerEncryption: TLS initialization failed");
+ d->setErrorAndEmit(QAbstractSocket::SslInternalError, tr("TLS initialization failed"));
+ return;
+ }
d->mode = SslServerMode;
emit modeChanged(d->mode);
d->startServerEncryption();
@@ -2128,6 +2159,26 @@ void QSslSocketPrivate::setDefaultSupportedCiphers(const QList<QSslCipher> &ciph
/*!
\internal
*/
+void q_setDefaultDtlsCiphers(const QList<QSslCipher> &ciphers)
+{
+ QMutexLocker locker(&globalData()->mutex);
+ globalData()->dtlsConfig.detach();
+ globalData()->dtlsConfig->ciphers = ciphers;
+}
+
+/*!
+ \internal
+*/
+QList<QSslCipher> q_getDefaultDtlsCiphers()
+{
+ QSslSocketPrivate::ensureInitialized();
+ QMutexLocker locker(&globalData()->mutex);
+ return globalData()->dtlsConfig->ciphers;
+}
+
+/*!
+ \internal
+*/
QVector<QSslEllipticCurve> QSslSocketPrivate::supportedEllipticCurves()
{
QSslSocketPrivate::ensureInitialized();
@@ -2142,6 +2193,7 @@ void QSslSocketPrivate::setDefaultSupportedEllipticCurves(const QVector<QSslElli
{
const QMutexLocker locker(&globalData()->mutex);
globalData()->config.detach();
+ globalData()->dtlsConfig.detach();
globalData()->supportedEllipticCurves = curves;
}
@@ -2164,6 +2216,8 @@ void QSslSocketPrivate::setDefaultCaCertificates(const QList<QSslCertificate> &c
QMutexLocker locker(&globalData()->mutex);
globalData()->config.detach();
globalData()->config->caCertificates = certs;
+ globalData()->dtlsConfig.detach();
+ globalData()->dtlsConfig->caCertificates = certs;
// when the certificates are set explicitly, we do not want to
// load the system certificates on demand
s_loadRootCertsOnDemand = false;
@@ -2183,6 +2237,8 @@ bool QSslSocketPrivate::addDefaultCaCertificates(const QString &path, QSsl::Enco
QMutexLocker locker(&globalData()->mutex);
globalData()->config.detach();
globalData()->config->caCertificates += certs;
+ globalData()->dtlsConfig.detach();
+ globalData()->dtlsConfig->caCertificates += certs;
return true;
}
@@ -2195,6 +2251,8 @@ void QSslSocketPrivate::addDefaultCaCertificate(const QSslCertificate &cert)
QMutexLocker locker(&globalData()->mutex);
globalData()->config.detach();
globalData()->config->caCertificates += cert;
+ globalData()->dtlsConfig.detach();
+ globalData()->dtlsConfig->caCertificates += cert;
}
/*!
@@ -2206,6 +2264,8 @@ void QSslSocketPrivate::addDefaultCaCertificates(const QList<QSslCertificate> &c
QMutexLocker locker(&globalData()->mutex);
globalData()->config.detach();
globalData()->config->caCertificates += certs;
+ globalData()->dtlsConfig.detach();
+ globalData()->dtlsConfig->caCertificates += certs;
}
/*!
@@ -2258,6 +2318,33 @@ void QSslConfigurationPrivate::deepCopyDefaultConfiguration(QSslConfigurationPri
ptr->sslOptions = global->sslOptions;
ptr->ellipticCurves = global->ellipticCurves;
ptr->backendConfig = global->backendConfig;
+#if QT_CONFIG(dtls)
+ ptr->dtlsCookieEnabled = global->dtlsCookieEnabled;
+#endif
+}
+
+/*!
+ \internal
+*/
+QSslConfiguration QSslConfigurationPrivate::defaultDtlsConfiguration()
+{
+ QSslSocketPrivate::ensureInitialized();
+ QMutexLocker locker(&globalData()->mutex);
+
+ return QSslConfiguration(globalData()->dtlsConfig.data());
+}
+
+/*!
+ \internal
+*/
+void QSslConfigurationPrivate::setDefaultDtlsConfiguration(const QSslConfiguration &configuration)
+{
+ QSslSocketPrivate::ensureInitialized();
+ QMutexLocker locker(&globalData()->mutex);
+ if (globalData()->dtlsConfig == configuration.d)
+ return; // nothing to do
+
+ globalData()->dtlsConfig = const_cast<QSslConfigurationPrivate*>(configuration.d.constData());
}
/*!
diff --git a/src/network/ssl/qsslsocket_mac.cpp b/src/network/ssl/qsslsocket_mac.cpp
index 046b432252..59c246a112 100644
--- a/src/network/ssl/qsslsocket_mac.cpp
+++ b/src/network/ssl/qsslsocket_mac.cpp
@@ -231,11 +231,6 @@ static const uint8_t dhparam[] =
"\x90\x0b\x35\x64\xff\xd9\xe3\xac\xf2\xf2\xeb\x3a\x63\x02\x01\x02";
#endif
-// No ioErr on iOS/tvOS/watchOS. (defined in MacErrors.h on macOS)
-#if defined(QT_PLATFORM_UIKIT)
-# define ioErr -36
-#endif
-
static OSStatus _q_SSLRead(QTcpSocket *plainSocket, char *data, size_t *dataLength)
{
Q_ASSERT(plainSocket);
@@ -248,10 +243,10 @@ static OSStatus _q_SSLRead(QTcpSocket *plainSocket, char *data, size_t *dataLeng
#endif
if (bytes < 0) {
*dataLength = 0;
- return ioErr;
+ return errSecIO;
}
- const OSStatus err = (size_t(bytes) < *dataLength) ? errSSLWouldBlock : noErr;
+ const OSStatus err = (size_t(bytes) < *dataLength) ? errSSLWouldBlock : errSecSuccess;
*dataLength = bytes;
return err;
@@ -269,10 +264,10 @@ static OSStatus _q_SSLWrite(QTcpSocket *plainSocket, const char *data, size_t *d
#endif
if (bytes < 0) {
*dataLength = 0;
- return ioErr;
+ return errSecIO;
}
- const OSStatus err = (size_t(bytes) < *dataLength) ? errSSLWouldBlock : noErr;
+ const OSStatus err = (size_t(bytes) < *dataLength) ? errSSLWouldBlock : errSecSuccess;
*dataLength = bytes;
return err;
@@ -441,7 +436,7 @@ void QSslSocketBackendPrivate::disconnectFromHost()
QSslCipher QSslSocketBackendPrivate::sessionCipher() const
{
SSLCipherSuite cipher = 0;
- if (context && SSLGetNegotiatedCipher(context, &cipher) == noErr)
+ if (context && SSLGetNegotiatedCipher(context, &cipher) == errSecSuccess)
return QSslCipher_from_SSLCipherSuite(cipher);
return QSslCipher();
@@ -454,7 +449,7 @@ QSsl::SslProtocol QSslSocketBackendPrivate::sessionProtocol() const
SSLProtocol protocol = kSSLProtocolUnknown;
const OSStatus err = SSLGetNegotiatedProtocolVersion(context, &protocol);
- if (err != noErr) {
+ if (err != errSecSuccess) {
qCWarning(lcSsl) << "SSLGetNegotiatedProtocolVersion failed:" << err;
return QSsl::UnknownProtocol;
}
@@ -522,7 +517,7 @@ void QSslSocketBackendPrivate::transmit()
#ifdef QSSLSOCKET_DEBUG
qCDebug(lcSsl) << plainSocket << "SSLWrite returned" << err;
#endif
- if (err != noErr && err != errSSLWouldBlock) {
+ if (err != errSecSuccess && err != errSSLWouldBlock) {
setErrorAndEmit(QAbstractSocket::SslInternalError,
QStringLiteral("SSLWrite failed: %1").arg(err));
break;
@@ -562,7 +557,7 @@ void QSslSocketBackendPrivate::transmit()
setErrorAndEmit(QAbstractSocket::RemoteHostClosedError,
QSslSocket::tr("The TLS/SSL connection has been closed"));
break;
- } else if (err != noErr && err != errSSLWouldBlock) {
+ } else if (err != errSecSuccess && err != errSSLWouldBlock) {
setErrorAndEmit(QAbstractSocket::SslInternalError,
QStringLiteral("SSLRead failed: %1").arg(err));
break;
@@ -852,7 +847,7 @@ bool QSslSocketBackendPrivate::initSslContext()
const OSStatus err = SSLSetIOFuncs(context, reinterpret_cast<SSLReadFunc>(&_q_SSLRead),
reinterpret_cast<SSLWriteFunc>(&_q_SSLWrite));
- if (err != noErr) {
+ if (err != errSecSuccess) {
destroySslContext();
setErrorAndEmit(QAbstractSocket::SslInternalError,
QStringLiteral("SSLSetIOFuncs failed: %1").arg(err));
@@ -911,10 +906,10 @@ bool QSslSocketBackendPrivate::initSslContext()
SSLSetPeerDomainName(context, ace.data(), ace.size());
// tell SecureTransport we handle peer verification ourselves
OSStatus err = SSLSetSessionOption(context, kSSLSessionOptionBreakOnServerAuth, true);
- if (err == noErr)
+ if (err == errSecSuccess)
err = SSLSetSessionOption(context, kSSLSessionOptionBreakOnCertRequested, true);
- if (err != noErr) {
+ if (err != errSecSuccess) {
destroySslContext();
setErrorAndEmit(QSslSocket::SslInternalError,
QStringLiteral("SSLSetSessionOption failed: %1").arg(err));
@@ -925,13 +920,13 @@ bool QSslSocketBackendPrivate::initSslContext()
if (configuration.peerVerifyMode != QSslSocket::VerifyNone) {
// kAlwaysAuthenticate - always fails even if we set break on client auth.
OSStatus err = SSLSetClientSideAuthenticate(context, kTryAuthenticate);
- if (err == noErr) {
+ if (err == errSecSuccess) {
// We'd like to verify peer ourselves, otherwise handshake will
// most probably fail before we can do anything.
err = SSLSetSessionOption(context, kSSLSessionOptionBreakOnClientAuth, true);
}
- if (err != noErr) {
+ if (err != errSecSuccess) {
destroySslContext();
setErrorAndEmit(QAbstractSocket::SslInternalError,
QStringLiteral("failed to set SSL context option in server mode: %1").arg(err));
@@ -994,7 +989,7 @@ bool QSslSocketBackendPrivate::setSessionCertificate(QString &errorDescription,
nullptr, nullptr);
QCFType<CFArrayRef> items;
OSStatus err = SecPKCS12Import(pkcs12, options, &items);
- if (err != noErr) {
+ if (err != errSecSuccess) {
#ifdef QSSLSOCKET_DEBUG
qCWarning(lcSsl) << plainSocket
<< QStringLiteral("SecPKCS12Import failed: %1").arg(err);
@@ -1040,7 +1035,7 @@ bool QSslSocketBackendPrivate::setSessionCertificate(QString &errorDescription,
}
err = SSLSetCertificate(context, certs);
- if (err != noErr) {
+ if (err != errSecSuccess) {
#ifdef QSSLSOCKET_DEBUG
qCWarning(lcSsl) << plainSocket
<< QStringLiteral("Cannot set certificate and key: %1").arg(err);
@@ -1068,35 +1063,35 @@ bool QSslSocketBackendPrivate::setSessionProtocol()
return false;
}
- OSStatus err = noErr;
+ OSStatus err = errSecSuccess;
if (configuration.protocol == QSsl::SslV3) {
#ifdef QSSLSOCKET_DEBUG
qCDebug(lcSsl) << plainSocket << "requesting : SSLv3";
#endif
err = SSLSetProtocolVersionMin(context, kSSLProtocol3);
- if (err == noErr)
+ if (err == errSecSuccess)
err = SSLSetProtocolVersionMax(context, kSSLProtocol3);
} else if (configuration.protocol == QSsl::TlsV1_0) {
#ifdef QSSLSOCKET_DEBUG
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1.0";
#endif
err = SSLSetProtocolVersionMin(context, kTLSProtocol1);
- if (err == noErr)
+ if (err == errSecSuccess)
err = SSLSetProtocolVersionMax(context, kTLSProtocol1);
} else if (configuration.protocol == QSsl::TlsV1_1) {
#ifdef QSSLSOCKET_DEBUG
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1.1";
#endif
err = SSLSetProtocolVersionMin(context, kTLSProtocol11);
- if (err == noErr)
+ if (err == errSecSuccess)
err = SSLSetProtocolVersionMax(context, kTLSProtocol11);
} else if (configuration.protocol == QSsl::TlsV1_2) {
#ifdef QSSLSOCKET_DEBUG
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1.2";
#endif
err = SSLSetProtocolVersionMin(context, kTLSProtocol12);
- if (err == noErr)
+ if (err == errSecSuccess)
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
} else if (configuration.protocol == QSsl::AnyProtocol) {
#ifdef QSSLSOCKET_DEBUG
@@ -1104,42 +1099,42 @@ bool QSslSocketBackendPrivate::setSessionProtocol()
#endif
// kSSLProtocol3, since kSSLProtocol2 is disabled:
err = SSLSetProtocolVersionMin(context, kSSLProtocol3);
- if (err == noErr)
+ if (err == errSecSuccess)
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
} else if (configuration.protocol == QSsl::TlsV1SslV3) {
#ifdef QSSLSOCKET_DEBUG
qCDebug(lcSsl) << plainSocket << "requesting : SSLv3 - TLSv1.2";
#endif
err = SSLSetProtocolVersionMin(context, kSSLProtocol3);
- if (err == noErr)
+ if (err == errSecSuccess)
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
} else if (configuration.protocol == QSsl::SecureProtocols) {
#ifdef QSSLSOCKET_DEBUG
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1 - TLSv1.2";
#endif
err = SSLSetProtocolVersionMin(context, kTLSProtocol1);
- if (err == noErr)
+ if (err == errSecSuccess)
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
} else if (configuration.protocol == QSsl::TlsV1_0OrLater) {
#ifdef QSSLSOCKET_DEBUG
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1 - TLSv1.2";
#endif
err = SSLSetProtocolVersionMin(context, kTLSProtocol1);
- if (err == noErr)
+ if (err == errSecSuccess)
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
} else if (configuration.protocol == QSsl::TlsV1_1OrLater) {
#ifdef QSSLSOCKET_DEBUG
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1.1 - TLSv1.2";
#endif
err = SSLSetProtocolVersionMin(context, kTLSProtocol11);
- if (err == noErr)
+ if (err == errSecSuccess)
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
} else if (configuration.protocol == QSsl::TlsV1_2OrLater) {
#ifdef QSSLSOCKET_DEBUG
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1.2";
#endif
err = SSLSetProtocolVersionMin(context, kTLSProtocol12);
- if (err == noErr)
+ if (err == errSecSuccess)
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
} else {
#ifdef QSSLSOCKET_DEBUG
@@ -1148,7 +1143,7 @@ bool QSslSocketBackendPrivate::setSessionProtocol()
return false;
}
- return err == noErr;
+ return err == errSecSuccess;
}
bool QSslSocketBackendPrivate::canIgnoreTrustVerificationFailure() const
@@ -1193,8 +1188,8 @@ bool QSslSocketBackendPrivate::verifyPeerTrust()
QCFType<SecTrustRef> trust;
OSStatus err = SSLCopyPeerTrust(context, &trust);
- // !trust - SSLCopyPeerTrust can return noErr but null trust.
- if (err != noErr || !trust) {
+ // !trust - SSLCopyPeerTrust can return errSecSuccess but null trust.
+ if (err != errSecSuccess || !trust) {
if (!canIgnoreVerify) {
setErrorAndEmit(QAbstractSocket::SslHandshakeFailedError,
QStringLiteral("Failed to obtain peer trust: %1").arg(err));
@@ -1217,7 +1212,7 @@ bool QSslSocketBackendPrivate::verifyPeerTrust()
// and evaluate again).
SecTrustResultType res = kSecTrustResultInvalid;
err = SecTrustEvaluate(trust, &res);
- if (err != noErr) {
+ if (err != errSecSuccess) {
// We can not ignore this, it's not even about trust verification
// probably ...
setErrorAndEmit(QAbstractSocket::SslHandshakeFailedError,
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index cecb4fb753..038d32ae13 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -66,6 +66,10 @@
#include "qsslpresharedkeyauthenticator.h"
#include "qsslpresharedkeyauthenticator_p.h"
+#ifdef Q_OS_WIN
+#include "qwindowscarootfetcher_p.h"
+#endif
+
#include <QtCore/qdatetime.h>
#include <QtCore/qdebug.h>
#include <QtCore/qdir.h>
@@ -77,6 +81,7 @@
#include <QtCore/qthread.h>
#include <QtCore/qurl.h>
#include <QtCore/qvarlengtharray.h>
+#include <QtCore/qscopedvaluerollback.h>
#include <string.h>
@@ -99,12 +104,13 @@ int QSslSocketBackendPrivate::s_indexForSSLExtraData = -1;
QString QSslSocketBackendPrivate::getErrorsFromOpenSsl()
{
QString errorString;
+ char buf[256] = {}; // OpenSSL docs claim both 120 and 256; use the larger.
unsigned long errNum;
while ((errNum = q_ERR_get_error())) {
- if (! errorString.isEmpty())
+ if (!errorString.isEmpty())
errorString.append(QLatin1String(", "));
- const char *error = q_ERR_error_string(errNum, NULL);
- errorString.append(QString::fromLatin1(error)); // error is ascii according to man ERR_error_string
+ q_ERR_error_string_n(errNum, buf, sizeof buf);
+ errorString.append(QString::fromLatin1(buf)); // error is ascii according to man ERR_error_string
}
return errorString;
}
@@ -188,8 +194,7 @@ QSslCipher QSslSocketBackendPrivate::QSslCipher_from_SSL_CIPHER(const SSL_CIPHER
return ciph;
}
-// static
-inline QSslErrorEntry QSslErrorEntry::fromStoreContext(X509_STORE_CTX *ctx)
+QSslErrorEntry QSslErrorEntry::fromStoreContext(X509_STORE_CTX *ctx)
{
return {
q_X509_STORE_CTX_get_error(ctx),
@@ -242,6 +247,33 @@ int q_X509Callback(int ok, X509_STORE_CTX *ctx)
return 1;
}
+static void q_loadCiphersForConnection(SSL *connection, QList<QSslCipher> &ciphers,
+ QList<QSslCipher> &defaultCiphers)
+{
+ Q_ASSERT(connection);
+
+ STACK_OF(SSL_CIPHER) *supportedCiphers = q_SSL_get_ciphers(connection);
+ for (int i = 0; i < q_sk_SSL_CIPHER_num(supportedCiphers); ++i) {
+ if (SSL_CIPHER *cipher = q_sk_SSL_CIPHER_value(supportedCiphers, i)) {
+ QSslCipher ciph = QSslSocketBackendPrivate::QSslCipher_from_SSL_CIPHER(cipher);
+ if (!ciph.isNull()) {
+ // Unconditionally exclude ADH and AECDH ciphers since they offer no MITM protection
+ if (!ciph.name().toLower().startsWith(QLatin1String("adh")) &&
+ !ciph.name().toLower().startsWith(QLatin1String("exp-adh")) &&
+ !ciph.name().toLower().startsWith(QLatin1String("aecdh"))) {
+ ciphers << ciph;
+
+ if (ciph.usedBits() >= 128)
+ defaultCiphers << ciph;
+ }
+ }
+ }
+ }
+}
+
+// Defined in qsslsocket.cpp
+void q_setDefaultDtlsCiphers(const QList<QSslCipher> &ciphers);
+
long QSslSocketBackendPrivate::setupOpenSslOptions(QSsl::SslProtocol protocol, QSsl::SslOptions sslOptions)
{
long options;
@@ -447,29 +479,28 @@ void QSslSocketPrivate::resetDefaultCiphers()
QList<QSslCipher> ciphers;
QList<QSslCipher> defaultCiphers;
- STACK_OF(SSL_CIPHER) *supportedCiphers = q_SSL_get_ciphers(mySsl);
- for (int i = 0; i < q_sk_SSL_CIPHER_num(supportedCiphers); ++i) {
- if (SSL_CIPHER *cipher = q_sk_SSL_CIPHER_value(supportedCiphers, i)) {
- QSslCipher ciph = QSslSocketBackendPrivate::QSslCipher_from_SSL_CIPHER(cipher);
- if (!ciph.isNull()) {
- // Unconditionally exclude ADH and AECDH ciphers since they offer no MITM protection
- if (!ciph.name().toLower().startsWith(QLatin1String("adh")) &&
- !ciph.name().toLower().startsWith(QLatin1String("exp-adh")) &&
- !ciph.name().toLower().startsWith(QLatin1String("aecdh"))) {
- ciphers << ciph;
-
- if (ciph.usedBits() >= 128)
- defaultCiphers << ciph;
- }
- }
- }
- }
+ q_loadCiphersForConnection(mySsl, ciphers, defaultCiphers);
q_SSL_CTX_free(myCtx);
q_SSL_free(mySsl);
setDefaultSupportedCiphers(ciphers);
setDefaultCiphers(defaultCiphers);
+
+#if QT_CONFIG(dtls)
+ ciphers.clear();
+ defaultCiphers.clear();
+ myCtx = q_SSL_CTX_new(q_DTLS_client_method());
+ if (myCtx) {
+ mySsl = q_SSL_new(myCtx);
+ if (mySsl) {
+ q_loadCiphersForConnection(mySsl, ciphers, defaultCiphers);
+ q_setDefaultDtlsCiphers(defaultCiphers);
+ q_SSL_free(mySsl);
+ }
+ q_SSL_CTX_free(myCtx);
+ }
+#endif // dtls
}
void QSslSocketPrivate::resetDefaultEllipticCurves()
@@ -615,6 +646,11 @@ void QSslSocketBackendPrivate::transmit()
{
Q_Q(QSslSocket);
+ using ScopedBool = QScopedValueRollback<bool>;
+
+ if (inSetAndEmitError)
+ return;
+
// If we don't have any SSL context, don't bother transmitting.
if (!ssl)
return;
@@ -642,6 +678,7 @@ void QSslSocketBackendPrivate::transmit()
break;
} else {
// ### Better error handling.
+ const ScopedBool bg(inSetAndEmitError, true);
setErrorAndEmit(QAbstractSocket::SslInternalError,
QSslSocket::tr("Unable to write data: %1").arg(
getErrorsFromOpenSsl()));
@@ -687,6 +724,7 @@ void QSslSocketBackendPrivate::transmit()
#endif
if (actualWritten < 0) {
//plain socket write fails if it was in the pending close state.
+ const ScopedBool bg(inSetAndEmitError, true);
setErrorAndEmit(plainSocket->error(), plainSocket->errorString());
return;
}
@@ -712,6 +750,7 @@ void QSslSocketBackendPrivate::transmit()
plainSocket->skip(writtenToBio);
} else {
// ### Better error handling.
+ const ScopedBool bg(inSetAndEmitError, true);
setErrorAndEmit(QAbstractSocket::SslInternalError,
QSslSocket::tr("Unable to decrypt data: %1").arg(
getErrorsFromOpenSsl()));
@@ -789,15 +828,21 @@ void QSslSocketBackendPrivate::transmit()
qCDebug(lcSsl) << "QSslSocketBackendPrivate::transmit: remote disconnect";
#endif
shutdown = true; // the other side shut down, make sure we do not send shutdown ourselves
- setErrorAndEmit(QAbstractSocket::RemoteHostClosedError,
- QSslSocket::tr("The TLS/SSL connection has been closed"));
+ {
+ const ScopedBool bg(inSetAndEmitError, true);
+ setErrorAndEmit(QAbstractSocket::RemoteHostClosedError,
+ QSslSocket::tr("The TLS/SSL connection has been closed"));
+ }
return;
case SSL_ERROR_SYSCALL: // some IO error
case SSL_ERROR_SSL: // error in the SSL library
// we do not know exactly what the error is, nor whether we can recover from it,
// so just return to prevent an endless loop in the outer "while" statement
- setErrorAndEmit(QAbstractSocket::SslInternalError,
- QSslSocket::tr("Error while reading: %1").arg(getErrorsFromOpenSsl()));
+ {
+ const ScopedBool bg(inSetAndEmitError, true);
+ setErrorAndEmit(QAbstractSocket::SslInternalError,
+ QSslSocket::tr("Error while reading: %1").arg(getErrorsFromOpenSsl()));
+ }
return;
default:
// SSL_ERROR_WANT_CONNECT, SSL_ERROR_WANT_ACCEPT: can only happen with a
@@ -805,15 +850,18 @@ void QSslSocketBackendPrivate::transmit()
// SSL_ERROR_WANT_X509_LOOKUP: can only happen with a
// SSL_CTX_set_client_cert_cb(), which we do not call.
// So this default case should never be triggered.
- setErrorAndEmit(QAbstractSocket::SslInternalError,
- QSslSocket::tr("Error while reading: %1").arg(getErrorsFromOpenSsl()));
+ {
+ const ScopedBool bg(inSetAndEmitError, true);
+ setErrorAndEmit(QAbstractSocket::SslInternalError,
+ QSslSocket::tr("Error while reading: %1").arg(getErrorsFromOpenSsl()));
+ }
break;
}
} while (ssl && readBytes > 0);
} while (ssl && transmitting);
}
-static QSslError _q_OpenSSL_to_QSslError(int errorCode, const QSslCertificate &cert)
+QSslError _q_OpenSSL_to_QSslError(int errorCode, const QSslCertificate &cert)
{
QSslError error;
switch (errorCode) {
@@ -862,12 +910,24 @@ static QSslError _q_OpenSSL_to_QSslError(int errorCode, const QSslCertificate &c
return error;
}
+QString QSslSocketBackendPrivate::msgErrorsDuringHandshake()
+{
+ return QSslSocket::tr("Error during SSL handshake: %1")
+ .arg(QSslSocketBackendPrivate::getErrorsFromOpenSsl());
+}
+
bool QSslSocketBackendPrivate::startHandshake()
{
Q_Q(QSslSocket);
// Check if the connection has been established. Get all errors from the
// verification stage.
+
+ using ScopedBool = QScopedValueRollback<bool>;
+
+ if (inSetAndEmitError)
+ return false;
+
QMutexLocker locker(&_q_sslErrorList()->mutex);
_q_sslErrorList()->errors.clear();
int result = (mode == QSslSocket::SslClientMode) ? q_SSL_connect(ssl) : q_SSL_accept(ssl);
@@ -897,12 +957,14 @@ bool QSslSocketBackendPrivate::startHandshake()
// The handshake is not yet complete.
break;
default:
- QString errorString
- = QSslSocket::tr("Error during SSL handshake: %1").arg(getErrorsFromOpenSsl());
+ QString errorString = QSslSocketBackendPrivate::msgErrorsDuringHandshake();
#ifdef QSSLSOCKET_DEBUG
qCDebug(lcSsl) << "QSslSocketBackendPrivate::startHandshake: error!" << errorString;
#endif
- setErrorAndEmit(QAbstractSocket::SslHandshakeFailedError, errorString);
+ {
+ const ScopedBool bg(inSetAndEmitError, true);
+ setErrorAndEmit(QAbstractSocket::SslHandshakeFailedError, errorString);
+ }
q->abort();
}
return false;
@@ -1172,119 +1234,6 @@ void QSslSocketBackendPrivate::_q_caRootLoaded(QSslCertificate cert, QSslCertifi
}
}
-class QWindowsCaRootFetcherThread : public QThread
-{
-public:
- QWindowsCaRootFetcherThread()
- {
- qRegisterMetaType<QSslCertificate>();
- setObjectName(QStringLiteral("QWindowsCaRootFetcher"));
- start();
- }
- ~QWindowsCaRootFetcherThread()
- {
- quit();
- wait(15500); // worst case, a running request can block for 15 seconds
- }
-};
-
-Q_GLOBAL_STATIC(QWindowsCaRootFetcherThread, windowsCaRootFetcherThread);
-
-QWindowsCaRootFetcher::QWindowsCaRootFetcher(const QSslCertificate &certificate, QSslSocket::SslMode sslMode)
- : cert(certificate), mode(sslMode)
-{
- moveToThread(windowsCaRootFetcherThread());
-}
-
-QWindowsCaRootFetcher::~QWindowsCaRootFetcher()
-{
-}
-
-void QWindowsCaRootFetcher::start()
-{
- QByteArray der = cert.toDer();
- PCCERT_CONTEXT wincert = CertCreateCertificateContext(X509_ASN_ENCODING, (const BYTE *)der.constData(), der.length());
- if (!wincert) {
-#ifdef QSSLSOCKET_DEBUG
- qCDebug(lcSsl, "QWindowsCaRootFetcher failed to convert certificate to windows form");
-#endif
- emit finished(cert, QSslCertificate());
- deleteLater();
- return;
- }
-
- CERT_CHAIN_PARA parameters;
- memset(&parameters, 0, sizeof(parameters));
- parameters.cbSize = sizeof(parameters);
- // set key usage constraint
- parameters.RequestedUsage.dwType = USAGE_MATCH_TYPE_AND;
- parameters.RequestedUsage.Usage.cUsageIdentifier = 1;
- LPSTR oid = (LPSTR)(mode == QSslSocket::SslClientMode ? szOID_PKIX_KP_SERVER_AUTH : szOID_PKIX_KP_CLIENT_AUTH);
- parameters.RequestedUsage.Usage.rgpszUsageIdentifier = &oid;
-
-#ifdef QSSLSOCKET_DEBUG
- QElapsedTimer stopwatch;
- stopwatch.start();
-#endif
- PCCERT_CHAIN_CONTEXT chain;
- BOOL result = CertGetCertificateChain(
- 0, //default engine
- wincert,
- 0, //current date/time
- 0, //default store
- &parameters,
- 0, //default dwFlags
- 0, //reserved
- &chain);
-#ifdef QSSLSOCKET_DEBUG
- qCDebug(lcSsl) << "QWindowsCaRootFetcher" << stopwatch.elapsed() << "ms to get chain";
-#endif
-
- QSslCertificate trustedRoot;
- if (result) {
-#ifdef QSSLSOCKET_DEBUG
- qCDebug(lcSsl) << "QWindowsCaRootFetcher - examining windows chains";
- if (chain->TrustStatus.dwErrorStatus == CERT_TRUST_NO_ERROR)
- qCDebug(lcSsl) << " - TRUSTED";
- else
- qCDebug(lcSsl) << " - NOT TRUSTED" << chain->TrustStatus.dwErrorStatus;
- if (chain->TrustStatus.dwInfoStatus & CERT_TRUST_IS_SELF_SIGNED)
- qCDebug(lcSsl) << " - SELF SIGNED";
- qCDebug(lcSsl) << "QSslSocketBackendPrivate::fetchCaRootForCert - dumping simple chains";
- for (unsigned int i = 0; i < chain->cChain; i++) {
- if (chain->rgpChain[i]->TrustStatus.dwErrorStatus == CERT_TRUST_NO_ERROR)
- qCDebug(lcSsl) << " - TRUSTED SIMPLE CHAIN" << i;
- else
- qCDebug(lcSsl) << " - UNTRUSTED SIMPLE CHAIN" << i << "reason:" << chain->rgpChain[i]->TrustStatus.dwErrorStatus;
- for (unsigned int j = 0; j < chain->rgpChain[i]->cElement; j++) {
- QSslCertificate foundCert(QByteArray((const char *)chain->rgpChain[i]->rgpElement[j]->pCertContext->pbCertEncoded
- , chain->rgpChain[i]->rgpElement[j]->pCertContext->cbCertEncoded), QSsl::Der);
- qCDebug(lcSsl) << " - " << foundCert;
- }
- }
- qCDebug(lcSsl) << " - and" << chain->cLowerQualityChainContext << "low quality chains"; //expect 0, we haven't asked for them
-#endif
-
- //based on http://msdn.microsoft.com/en-us/library/windows/desktop/aa377182%28v=vs.85%29.aspx
- //about the final chain rgpChain[cChain-1] which must begin with a trusted root to be valid
- if (chain->TrustStatus.dwErrorStatus == CERT_TRUST_NO_ERROR
- && chain->cChain > 0) {
- const PCERT_SIMPLE_CHAIN finalChain = chain->rgpChain[chain->cChain - 1];
- // http://msdn.microsoft.com/en-us/library/windows/desktop/aa377544%28v=vs.85%29.aspx
- // rgpElement[0] is the end certificate chain element. rgpElement[cElement-1] is the self-signed "root" certificate element.
- if (finalChain->TrustStatus.dwErrorStatus == CERT_TRUST_NO_ERROR
- && finalChain->cElement > 0) {
- trustedRoot = QSslCertificate(QByteArray((const char *)finalChain->rgpElement[finalChain->cElement - 1]->pCertContext->pbCertEncoded
- , finalChain->rgpElement[finalChain->cElement - 1]->pCertContext->cbCertEncoded), QSsl::Der);
- }
- }
- CertFreeCertificateChain(chain);
- }
- CertFreeCertificateContext(wincert);
-
- emit finished(cert, trustedRoot);
- deleteLater();
-}
#endif
void QSslSocketBackendPrivate::disconnectFromHost()
diff --git a/src/network/ssl/qsslsocket_openssl11_symbols_p.h b/src/network/ssl/qsslsocket_openssl11_symbols_p.h
index ac8d46ce6d..844c3437be 100644
--- a/src/network/ssl/qsslsocket_openssl11_symbols_p.h
+++ b/src/network/ssl/qsslsocket_openssl11_symbols_p.h
@@ -128,6 +128,45 @@ long q_OpenSSL_version_num();
const char *q_OpenSSL_version(int type);
unsigned long q_SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *session);
+unsigned long q_SSL_set_options(SSL *s, unsigned long op);
+
+#if QT_CONFIG(dtls)
+// Functions and types required for DTLS support:
+extern "C"
+{
+
+typedef int (*CookieVerifyCallback)(SSL *, const unsigned char *, unsigned);
+typedef int (*DgramWriteCallback) (BIO *, const char *, int);
+typedef int (*DgramReadCallback) (BIO *, char *, int);
+typedef int (*DgramPutsCallback) (BIO *, const char *);
+typedef long (*DgramCtrlCallback) (BIO *, int, long, void *);
+typedef int (*DgramCreateCallback) (BIO *);
+typedef int (*DgramDestroyCallback) (BIO *);
+
+}
+
+int q_DTLSv1_listen(SSL *s, BIO_ADDR *client);
+BIO_ADDR *q_BIO_ADDR_new();
+void q_BIO_ADDR_free(BIO_ADDR *ap);
+
+// API we need for a custom dgram BIO:
+
+BIO_METHOD *q_BIO_meth_new(int type, const char *name);
+void q_BIO_meth_free(BIO_METHOD *biom);
+int q_BIO_meth_set_write(BIO_METHOD *biom, DgramWriteCallback);
+int q_BIO_meth_set_read(BIO_METHOD *biom, DgramReadCallback);
+int q_BIO_meth_set_puts(BIO_METHOD *biom, DgramPutsCallback);
+int q_BIO_meth_set_ctrl(BIO_METHOD *biom, DgramCtrlCallback);
+int q_BIO_meth_set_create(BIO_METHOD *biom, DgramCreateCallback);
+int q_BIO_meth_set_destroy(BIO_METHOD *biom, DgramDestroyCallback);
+
+#endif // dtls
+
+void q_BIO_set_data(BIO *a, void *ptr);
+void *q_BIO_get_data(BIO *a);
+void q_BIO_set_init(BIO *a, int init);
+int q_BIO_get_shutdown(BIO *a);
+void q_BIO_set_shutdown(BIO *a, int shut);
#define q_SSL_CTX_set_min_proto_version(ctx, version) \
q_SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MIN_PROTO_VERSION, version, nullptr)
diff --git a/src/network/ssl/qsslsocket_openssl_p.h b/src/network/ssl/qsslsocket_openssl_p.h
index 2a800cdc34..c16b9d5f76 100644
--- a/src/network/ssl/qsslsocket_openssl_p.h
+++ b/src/network/ssl/qsslsocket_openssl_p.h
@@ -131,6 +131,8 @@ public:
static int s_indexForSSLExtraData; // index used in SSL_get_ex_data to get the matching QSslSocketBackendPrivate
#endif
+ bool inSetAndEmitError = false;
+
// Platform specific functions
void startClientEncryption() override;
void startServerEncryption() override;
@@ -159,24 +161,9 @@ public:
QSslKey *key, QSslCertificate *cert,
QList<QSslCertificate> *caCertificates,
const QByteArray &passPhrase);
-};
-#ifdef Q_OS_WIN
-class QWindowsCaRootFetcher : public QObject
-{
- Q_OBJECT;
-public:
- QWindowsCaRootFetcher(const QSslCertificate &certificate, QSslSocket::SslMode sslMode);
- ~QWindowsCaRootFetcher();
-public slots:
- void start();
-signals:
- void finished(QSslCertificate brokenChain, QSslCertificate caroot);
-private:
- QSslCertificate cert;
- QSslSocket::SslMode mode;
+ static QString msgErrorsDuringHandshake();
};
-#endif
QT_END_NAMESPACE
diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
index 466eba0bd0..7961118f00 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
@@ -162,6 +162,7 @@ DEFINEFUNC2(unsigned long, SSL_CTX_set_options, SSL_CTX *ctx, ctx, unsigned long
DEFINEFUNC3(size_t, SSL_get_client_random, SSL *a, a, unsigned char *out, out, size_t outlen, outlen, return 0, return)
DEFINEFUNC3(size_t, SSL_SESSION_get_master_key, const SSL_SESSION *ses, ses, unsigned char *out, out, size_t outlen, outlen, return 0, return)
DEFINEFUNC6(int, CRYPTO_get_ex_new_index, int class_index, class_index, long argl, argl, void *argp, argp, CRYPTO_EX_new *new_func, new_func, CRYPTO_EX_dup *dup_func, dup_func, CRYPTO_EX_free *free_func, free_func, return -1, return)
+DEFINEFUNC2(unsigned long, SSL_set_options, SSL *ssl, ssl, unsigned long op, op, return 0, return)
DEFINEFUNC(const SSL_METHOD *, TLS_method, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC(const SSL_METHOD *, TLS_client_method, DUMMYARG, DUMMYARG, return 0, return)
@@ -179,6 +180,26 @@ DEFINEFUNC(unsigned long, SSL_SESSION_get_ticket_lifetime_hint, const SSL_SESSIO
DEFINEFUNC4(void, DH_get0_pqg, const DH *dh, dh, const BIGNUM **p, p, const BIGNUM **q, q, const BIGNUM **g, g, return, DUMMYARG)
DEFINEFUNC(int, DH_bits, DH *dh, dh, return 0, return)
+#if QT_CONFIG(dtls)
+DEFINEFUNC2(int, DTLSv1_listen, SSL *s, s, BIO_ADDR *c, c, return -1, return)
+DEFINEFUNC(BIO_ADDR *, BIO_ADDR_new, DUMMYARG, DUMMYARG, return nullptr, return)
+DEFINEFUNC(void, BIO_ADDR_free, BIO_ADDR *ap, ap, return, DUMMYARG)
+DEFINEFUNC2(BIO_METHOD *, BIO_meth_new, int type, type, const char *name, name, return nullptr, return)
+DEFINEFUNC(void, BIO_meth_free, BIO_METHOD *biom, biom, return, DUMMYARG)
+DEFINEFUNC2(int, BIO_meth_set_write, BIO_METHOD *biom, biom, DgramWriteCallback write, write, return 0, return)
+DEFINEFUNC2(int, BIO_meth_set_read, BIO_METHOD *biom, biom, DgramReadCallback read, read, return 0, return)
+DEFINEFUNC2(int, BIO_meth_set_puts, BIO_METHOD *biom, biom, DgramPutsCallback puts, puts, return 0, return)
+DEFINEFUNC2(int, BIO_meth_set_ctrl, BIO_METHOD *biom, biom, DgramCtrlCallback ctrl, ctrl, return 0, return)
+DEFINEFUNC2(int, BIO_meth_set_create, BIO_METHOD *biom, biom, DgramCreateCallback crt, crt, return 0, return)
+DEFINEFUNC2(int, BIO_meth_set_destroy, BIO_METHOD *biom, biom, DgramDestroyCallback dtr, dtr, return 0, return)
+#endif // dtls
+
+DEFINEFUNC2(void, BIO_set_data, BIO *a, a, void *ptr, ptr, return, DUMMYARG)
+DEFINEFUNC(void *, BIO_get_data, BIO *a, a, return nullptr, return)
+DEFINEFUNC2(void, BIO_set_init, BIO *a, a, int init, init, return, DUMMYARG)
+DEFINEFUNC(int, BIO_get_shutdown, BIO *a, a, return -1, return)
+DEFINEFUNC2(void, BIO_set_shutdown, BIO *a, a, int shut, shut, return, DUMMYARG)
+
#else // QT_CONFIG(opensslv11)
// Functions below are either deprecated or removed in OpenSSL >= 1.1:
@@ -286,6 +307,14 @@ DEFINEFUNC3(DSA *, d2i_DSAPrivateKey, DSA **a, a, unsigned char **b, b, long c,
DEFINEFUNC3(EC_KEY *, d2i_ECPrivateKey, EC_KEY **a, a, unsigned char **b, b, long c, c, return 0, return)
#endif
#endif
+
+#if QT_CONFIG(dtls)
+DEFINEFUNC(const SSL_METHOD *, DTLSv1_server_method, void, DUMMYARG, return nullptr, return)
+DEFINEFUNC(const SSL_METHOD *, DTLSv1_client_method, void, DUMMYARG, return nullptr, return)
+DEFINEFUNC(const SSL_METHOD *, DTLSv1_2_server_method, void, DUMMYARG, return nullptr, return)
+DEFINEFUNC(const SSL_METHOD *, DTLSv1_2_client_method, void, DUMMYARG, return nullptr, return)
+#endif // dtls
+
DEFINEFUNC(char *, CONF_get1_default_config_file, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC(void, OPENSSL_add_all_algorithms_noconf, void, DUMMYARG, return, DUMMYARG)
DEFINEFUNC(void, OPENSSL_add_all_algorithms_conf, void, DUMMYARG, return, DUMMYARG)
@@ -313,6 +342,7 @@ DEFINEFUNC(DSA *, DSA_new, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC(void, DSA_free, DSA *a, a, return, DUMMYARG)
DEFINEFUNC3(X509 *, d2i_X509, X509 **a, a, const unsigned char **b, b, long c, c, return 0, return)
DEFINEFUNC2(char *, ERR_error_string, unsigned long a, a, char *b, b, return 0, return)
+DEFINEFUNC3(void, ERR_error_string_n, unsigned long e, e, char *b, b, size_t len, len, return, DUMMYARG)
DEFINEFUNC(unsigned long, ERR_get_error, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC(EVP_CIPHER_CTX *, EVP_CIPHER_CTX_new, void, DUMMYARG, return 0, return)
DEFINEFUNC(void, EVP_CIPHER_CTX_free, EVP_CIPHER_CTX *a, a, return, DUMMYARG)
@@ -381,12 +411,14 @@ DEFINEFUNC2(int, PEM_write_bio_EC_PUBKEY, BIO *a, a, EC_KEY *b, b, return 0, ret
#endif
DEFINEFUNC2(void, RAND_seed, const void *a, a, int b, b, return, DUMMYARG)
DEFINEFUNC(int, RAND_status, void, DUMMYARG, return -1, return)
+DEFINEFUNC2(int, RAND_bytes, unsigned char *b, b, int n, n, return 0, return)
DEFINEFUNC(RSA *, RSA_new, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC(void, RSA_free, RSA *a, a, return, DUMMYARG)
DEFINEFUNC(int, SSL_accept, SSL *a, a, return -1, return)
DEFINEFUNC(int, SSL_clear, SSL *a, a, return -1, return)
DEFINEFUNC3(char *, SSL_CIPHER_description, const SSL_CIPHER *a, a, char *b, b, int c, c, return 0, return)
DEFINEFUNC2(int, SSL_CIPHER_get_bits, const SSL_CIPHER *a, a, int *b, b, return 0, return)
+DEFINEFUNC(BIO *, SSL_get_rbio, const SSL *s, s, return nullptr, return)
DEFINEFUNC(int, SSL_connect, SSL *a, a, return -1, return)
DEFINEFUNC(int, SSL_CTX_check_private_key, const SSL_CTX *a, a, return -1, return)
DEFINEFUNC4(long, SSL_CTX_ctrl, SSL_CTX *a, a, int b, b, long c, c, void *d, d, return -1, return)
@@ -438,6 +470,7 @@ DEFINEFUNC3(void, SSL_set_bio, SSL *a, a, BIO *b, b, BIO *c, c, return, DUMMYARG
DEFINEFUNC(void, SSL_set_accept_state, SSL *a, a, return, DUMMYARG)
DEFINEFUNC(void, SSL_set_connect_state, SSL *a, a, return, DUMMYARG)
DEFINEFUNC(int, SSL_shutdown, SSL *a, a, return -1, return)
+DEFINEFUNC(int, SSL_get_shutdown, const SSL *ssl, ssl, return 0, return)
DEFINEFUNC2(int, SSL_set_session, SSL* to, to, SSL_SESSION *session, session, return -1, return)
DEFINEFUNC(void, SSL_SESSION_free, SSL_SESSION *ses, ses, return, DUMMYARG)
DEFINEFUNC(SSL_SESSION*, SSL_get1_session, SSL *ssl, ssl, return 0, return)
@@ -495,6 +528,8 @@ DEFINEFUNC(int, X509_STORE_CTX_get_error, X509_STORE_CTX *a, a, return -1, retur
DEFINEFUNC(int, X509_STORE_CTX_get_error_depth, X509_STORE_CTX *a, a, return -1, return)
DEFINEFUNC(X509 *, X509_STORE_CTX_get_current_cert, X509_STORE_CTX *a, a, return 0, return)
DEFINEFUNC(X509_STORE_CTX *, X509_STORE_CTX_new, DUMMYARG, DUMMYARG, return 0, return)
+DEFINEFUNC2(void *, X509_STORE_CTX_get_ex_data, X509_STORE_CTX *ctx, ctx, int idx, idx, return nullptr, return)
+DEFINEFUNC(int, SSL_get_ex_data_X509_STORE_CTX_idx, DUMMYARG, DUMMYARG, return -1, return)
DEFINEFUNC3(int, SSL_CTX_load_verify_locations, SSL_CTX *ctx, ctx, const char *CAfile, CAfile, const char *CApath, CApath, return 0, return)
DEFINEFUNC2(int, i2d_SSL_SESSION, SSL_SESSION *in, in, unsigned char **pp, pp, return 0, return)
DEFINEFUNC3(SSL_SESSION *, d2i_SSL_SESSION, SSL_SESSION **a, a, const unsigned char **pp, pp, long length, length, return 0, return)
@@ -524,6 +559,19 @@ DEFINEFUNC3(void, SSL_get0_alpn_selected, const SSL *s, s, const unsigned char *
unsigned *len, len, return, DUMMYARG)
#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L ...
#endif // OPENSSL_VERSION_NUMBER >= 0x1000100fL ...
+
+// DTLS:
+#if QT_CONFIG(dtls)
+DEFINEFUNC2(void, SSL_CTX_set_cookie_generate_cb, SSL_CTX *ctx, ctx, CookieGenerateCallback cb, cb, return, DUMMYARG)
+DEFINEFUNC2(void, SSL_CTX_set_cookie_verify_cb, SSL_CTX *ctx, ctx, CookieVerifyCallback cb, cb, return, DUMMYARG)
+DEFINEFUNC(const SSL_METHOD *, DTLS_server_method, DUMMYARG, DUMMYARG, return nullptr, return)
+DEFINEFUNC(const SSL_METHOD *, DTLS_client_method, DUMMYARG, DUMMYARG, return nullptr, return)
+#endif // dtls
+DEFINEFUNC2(void, BIO_set_flags, BIO *b, b, int flags, flags, return, DUMMYARG)
+DEFINEFUNC2(void, BIO_clear_flags, BIO *b, b, int flags, flags, return, DUMMYARG)
+DEFINEFUNC2(void *, BIO_get_ex_data, BIO *b, b, int idx, idx, return nullptr, return)
+DEFINEFUNC3(int, BIO_set_ex_data, BIO *b, b, int idx, idx, void *data, data, return -1, return)
+
DEFINEFUNC(DH *, DH_new, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC(void, DH_free, DH *dh, dh, return, DUMMYARG)
DEFINEFUNC3(DH *, d2i_DHparams, DH**a, a, const unsigned char **pp, pp, long length, length, return 0, return)
@@ -897,6 +945,7 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(SSL_SESSION_get_master_key)
RESOLVEFUNC(SSL_session_reused)
RESOLVEFUNC(SSL_get_session)
+ RESOLVEFUNC(SSL_set_options)
RESOLVEFUNC(CRYPTO_get_ex_new_index)
RESOLVEFUNC(TLS_method)
RESOLVEFUNC(TLS_client_method)
@@ -923,6 +972,25 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(DH_bits)
RESOLVEFUNC(DSA_bits)
+#if QT_CONFIG(dtls)
+ RESOLVEFUNC(DTLSv1_listen)
+ RESOLVEFUNC(BIO_ADDR_new)
+ RESOLVEFUNC(BIO_ADDR_free)
+ RESOLVEFUNC(BIO_meth_new)
+ RESOLVEFUNC(BIO_meth_free)
+ RESOLVEFUNC(BIO_meth_set_write)
+ RESOLVEFUNC(BIO_meth_set_read)
+ RESOLVEFUNC(BIO_meth_set_puts)
+ RESOLVEFUNC(BIO_meth_set_ctrl)
+ RESOLVEFUNC(BIO_meth_set_create)
+ RESOLVEFUNC(BIO_meth_set_destroy)
+#endif // dtls
+
+ RESOLVEFUNC(BIO_set_data)
+ RESOLVEFUNC(BIO_get_data)
+ RESOLVEFUNC(BIO_set_init)
+ RESOLVEFUNC(BIO_get_shutdown)
+ RESOLVEFUNC(BIO_set_shutdown)
#else // !opensslv11
RESOLVEFUNC(ASN1_STRING_data)
@@ -987,6 +1055,14 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(d2i_DSAPrivateKey)
RESOLVEFUNC(d2i_RSAPrivateKey)
#endif
+
+#if QT_CONFIG(dtls)
+ RESOLVEFUNC(DTLSv1_server_method)
+ RESOLVEFUNC(DTLSv1_client_method)
+ RESOLVEFUNC(DTLSv1_2_server_method)
+ RESOLVEFUNC(DTLSv1_2_client_method)
+#endif // dtls
+
RESOLVEFUNC(CONF_get1_default_config_file)
RESOLVEFUNC(OPENSSL_add_all_algorithms_noconf)
RESOLVEFUNC(OPENSSL_add_all_algorithms_conf)
@@ -1025,6 +1101,11 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(BIO_read)
RESOLVEFUNC(BIO_s_mem)
RESOLVEFUNC(BIO_write)
+ RESOLVEFUNC(BIO_set_flags)
+ RESOLVEFUNC(BIO_clear_flags)
+ RESOLVEFUNC(BIO_set_ex_data)
+ RESOLVEFUNC(BIO_get_ex_data)
+
#ifndef OPENSSL_NO_EC
RESOLVEFUNC(EC_KEY_get0_group)
RESOLVEFUNC(EC_GROUP_get_degree)
@@ -1037,6 +1118,7 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(DSA_new)
RESOLVEFUNC(DSA_free)
RESOLVEFUNC(ERR_error_string)
+ RESOLVEFUNC(ERR_error_string_n)
RESOLVEFUNC(ERR_get_error)
RESOLVEFUNC(EVP_CIPHER_CTX_new)
RESOLVEFUNC(EVP_CIPHER_CTX_free)
@@ -1104,10 +1186,12 @@ bool q_resolveOpenSslSymbols()
#endif
RESOLVEFUNC(RAND_seed)
RESOLVEFUNC(RAND_status)
+ RESOLVEFUNC(RAND_bytes)
RESOLVEFUNC(RSA_new)
RESOLVEFUNC(RSA_free)
RESOLVEFUNC(SSL_CIPHER_description)
RESOLVEFUNC(SSL_CIPHER_get_bits)
+ RESOLVEFUNC(SSL_get_rbio)
RESOLVEFUNC(SSL_CTX_check_private_key)
RESOLVEFUNC(SSL_CTX_ctrl)
RESOLVEFUNC(SSL_CTX_free)
@@ -1148,6 +1232,7 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(SSL_set_bio)
RESOLVEFUNC(SSL_set_connect_state)
RESOLVEFUNC(SSL_shutdown)
+ RESOLVEFUNC(SSL_get_shutdown)
RESOLVEFUNC(SSL_set_session)
RESOLVEFUNC(SSL_SESSION_free)
RESOLVEFUNC(SSL_get1_session)
@@ -1155,6 +1240,7 @@ bool q_resolveOpenSslSymbols()
#if OPENSSL_VERSION_NUMBER >= 0x10001000L
RESOLVEFUNC(SSL_set_ex_data)
RESOLVEFUNC(SSL_get_ex_data)
+ RESOLVEFUNC(SSL_get_ex_data_X509_STORE_CTX_idx)
#endif
#if OPENSSL_VERSION_NUMBER >= 0x10001000L && !defined(OPENSSL_NO_PSK)
RESOLVEFUNC(SSL_set_psk_client_callback)
@@ -1178,6 +1264,8 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(X509_STORE_CTX_get_error_depth)
RESOLVEFUNC(X509_STORE_CTX_get_current_cert)
RESOLVEFUNC(X509_cmp)
+ RESOLVEFUNC(X509_STORE_CTX_get_ex_data)
+
#ifndef SSLEAY_MACROS
RESOLVEFUNC(X509_dup)
#endif
@@ -1216,6 +1304,12 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(SSL_CTX_set_alpn_select_cb)
RESOLVEFUNC(SSL_get0_alpn_selected)
#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L ...
+#if QT_CONFIG(dtls)
+ RESOLVEFUNC(SSL_CTX_set_cookie_generate_cb)
+ RESOLVEFUNC(SSL_CTX_set_cookie_verify_cb)
+ RESOLVEFUNC(DTLS_server_method)
+ RESOLVEFUNC(DTLS_client_method)
+#endif // dtls
RESOLVEFUNC(DH_new)
RESOLVEFUNC(DH_free)
RESOLVEFUNC(d2i_DHparams)
diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h
index 68b519d74e..bfdfbf0efc 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols_p.h
+++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h
@@ -257,6 +257,7 @@ DSA *q_DSA_new();
void q_DSA_free(DSA *a);
X509 *q_d2i_X509(X509 **a, const unsigned char **b, long c);
char *q_ERR_error_string(unsigned long a, char *b);
+void q_ERR_error_string_n(unsigned long e, char *buf, size_t len);
unsigned long q_ERR_get_error();
EVP_CIPHER_CTX *q_EVP_CIPHER_CTX_new();
void q_EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *a);
@@ -331,12 +332,14 @@ int q_PEM_write_bio_EC_PUBKEY(BIO *a, EC_KEY *b);
#endif
void q_RAND_seed(const void *a, int b);
int q_RAND_status();
+int q_RAND_bytes(unsigned char *b, int n);
RSA *q_RSA_new();
void q_RSA_free(RSA *a);
int q_SSL_accept(SSL *a);
int q_SSL_clear(SSL *a);
char *q_SSL_CIPHER_description(const SSL_CIPHER *a, char *b, int c);
int q_SSL_CIPHER_get_bits(const SSL_CIPHER *a, int *b);
+BIO *q_SSL_get_rbio(const SSL *s);
int q_SSL_connect(SSL *a);
int q_SSL_CTX_check_private_key(const SSL_CTX *a);
long q_SSL_CTX_ctrl(SSL_CTX *a, int b, long c, void *d);
@@ -383,6 +386,7 @@ void q_SSL_set_bio(SSL *a, BIO *b, BIO *c);
void q_SSL_set_accept_state(SSL *a);
void q_SSL_set_connect_state(SSL *a);
int q_SSL_shutdown(SSL *a);
+int q_SSL_get_shutdown(const SSL *ssl);
int q_SSL_set_session(SSL *to, SSL_SESSION *session);
void q_SSL_SESSION_free(SSL_SESSION *ses);
SSL_SESSION *q_SSL_get1_session(SSL *ssl);
@@ -529,6 +533,40 @@ void q_SSL_get0_alpn_selected(const SSL *ssl, const unsigned char **data,
#endif
#endif // OPENSSL_VERSION_NUMBER >= 0x1000100fL ...
+#if QT_CONFIG(dtls)
+
+extern "C"
+{
+typedef int (*CookieGenerateCallback)(SSL *, unsigned char *, unsigned *);
+}
+
+void q_SSL_CTX_set_cookie_generate_cb(SSL_CTX *ctx, CookieGenerateCallback cb);
+void q_SSL_CTX_set_cookie_verify_cb(SSL_CTX *ctx, CookieVerifyCallback cb);
+const SSL_METHOD *q_DTLS_server_method();
+const SSL_METHOD *q_DTLS_client_method();
+
+#endif // dtls
+
+void *q_X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx, int idx);
+int q_SSL_get_ex_data_X509_STORE_CTX_idx();
+
+#if QT_CONFIG(dtls)
+#define q_DTLS_set_link_mtu(ssl, mtu) q_SSL_ctrl((ssl), DTLS_CTRL_SET_LINK_MTU, (mtu), nullptr)
+#define q_DTLSv1_get_timeout(ssl, arg) q_SSL_ctrl(ssl, DTLS_CTRL_GET_TIMEOUT, 0, arg)
+#define q_DTLSv1_handle_timeout(ssl) q_SSL_ctrl(ssl, DTLS_CTRL_HANDLE_TIMEOUT, 0, nullptr)
+#endif // dtls
+
+void q_BIO_set_flags(BIO *b, int flags);
+void q_BIO_clear_flags(BIO *b, int flags);
+void *q_BIO_get_ex_data(BIO *b, int idx);
+int q_BIO_set_ex_data(BIO *b, int idx, void *data);
+
+#define q_BIO_set_retry_read(b) q_BIO_set_flags(b, (BIO_FLAGS_READ|BIO_FLAGS_SHOULD_RETRY))
+#define q_BIO_set_retry_write(b) q_BIO_set_flags(b, (BIO_FLAGS_WRITE|BIO_FLAGS_SHOULD_RETRY))
+#define q_BIO_clear_retry_flags(b) q_BIO_clear_flags(b, (BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY))
+#define q_BIO_set_app_data(s,arg) q_BIO_set_ex_data(s,0,arg)
+#define q_BIO_get_app_data(s) q_BIO_get_ex_data(s,0)
+
// Helper function
class QDateTime;
QDateTime q_getTimeFromASN1(const ASN1_TIME *aTime);
diff --git a/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h b/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h
index 9686d22b98..b7bac5d2a2 100644
--- a/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h
+++ b/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h
@@ -204,6 +204,7 @@ DSA *q_d2i_DSAPrivateKey(DSA **a, unsigned char **pp, long length);
#endif // SSLEAY_MACROS
#define q_SSL_CTX_set_options(ctx,op) q_SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,(op),NULL)
+#define q_SSL_set_options(ssl,op) q_SSL_ctrl((ssl),SSL_CTRL_OPTIONS,(op),nullptr)
#define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_sk_num)(st)
#define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_sk_value)(st, i)
#define q_X509_getm_notAfter(x) X509_get_notAfter(x)
@@ -226,5 +227,19 @@ void q_OPENSSL_add_all_algorithms_conf();
long q_SSLeay();
const char *q_SSLeay_version(int type);
+#if QT_CONFIG(dtls)
+// DTLS:
+extern "C"
+{
+typedef int (*CookieVerifyCallback)(SSL *, unsigned char *, unsigned);
+}
+
+#define q_DTLSv1_listen(ssl, peer) q_SSL_ctrl(ssl, DTLS_CTRL_LISTEN, 0, (void *)peer)
+
+const SSL_METHOD *q_DTLSv1_server_method();
+const SSL_METHOD *q_DTLSv1_client_method();
+const SSL_METHOD *q_DTLSv1_2_server_method();
+const SSL_METHOD *q_DTLSv1_2_client_method();
+#endif // dtls
#endif // QSSLSOCKET_OPENSSL_PRE11_SYMBOLS_P_H
diff --git a/src/network/ssl/qwindowscarootfetcher.cpp b/src/network/ssl/qwindowscarootfetcher.cpp
new file mode 100644
index 0000000000..409a7d70d7
--- /dev/null
+++ b/src/network/ssl/qwindowscarootfetcher.cpp
@@ -0,0 +1,168 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtNetwork 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qwindowscarootfetcher_p.h"
+
+#include <QtCore/QThread>
+#include <QtGlobal>
+
+#ifdef QSSLSOCKET_DEBUG
+#include "qssl_p.h" // for debug categories
+#include <QtCore/QElapsedTimer>
+#endif
+
+#include "qsslsocket_p.h" // Transitively includes Wincrypt.h
+
+QT_BEGIN_NAMESPACE
+
+class QWindowsCaRootFetcherThread : public QThread
+{
+public:
+ QWindowsCaRootFetcherThread()
+ {
+ qRegisterMetaType<QSslCertificate>();
+ setObjectName(QStringLiteral("QWindowsCaRootFetcher"));
+ start();
+ }
+ ~QWindowsCaRootFetcherThread()
+ {
+ quit();
+ wait(15500); // worst case, a running request can block for 15 seconds
+ }
+};
+
+Q_GLOBAL_STATIC(QWindowsCaRootFetcherThread, windowsCaRootFetcherThread);
+
+QWindowsCaRootFetcher::QWindowsCaRootFetcher(const QSslCertificate &certificate, QSslSocket::SslMode sslMode)
+ : cert(certificate), mode(sslMode)
+{
+ moveToThread(windowsCaRootFetcherThread());
+}
+
+QWindowsCaRootFetcher::~QWindowsCaRootFetcher()
+{
+}
+
+void QWindowsCaRootFetcher::start()
+{
+ QByteArray der = cert.toDer();
+ PCCERT_CONTEXT wincert = CertCreateCertificateContext(X509_ASN_ENCODING, (const BYTE *)der.constData(), der.length());
+ if (!wincert) {
+#ifdef QSSLSOCKET_DEBUG
+ qCDebug(lcSsl, "QWindowsCaRootFetcher failed to convert certificate to windows form");
+#endif
+ emit finished(cert, QSslCertificate());
+ deleteLater();
+ return;
+ }
+
+ CERT_CHAIN_PARA parameters;
+ memset(&parameters, 0, sizeof(parameters));
+ parameters.cbSize = sizeof(parameters);
+ // set key usage constraint
+ parameters.RequestedUsage.dwType = USAGE_MATCH_TYPE_AND;
+ parameters.RequestedUsage.Usage.cUsageIdentifier = 1;
+ LPSTR oid = (LPSTR)(mode == QSslSocket::SslClientMode ? szOID_PKIX_KP_SERVER_AUTH : szOID_PKIX_KP_CLIENT_AUTH);
+ parameters.RequestedUsage.Usage.rgpszUsageIdentifier = &oid;
+
+#ifdef QSSLSOCKET_DEBUG
+ QElapsedTimer stopwatch;
+ stopwatch.start();
+#endif
+ PCCERT_CHAIN_CONTEXT chain;
+ BOOL result = CertGetCertificateChain(
+ 0, //default engine
+ wincert,
+ 0, //current date/time
+ 0, //default store
+ &parameters,
+ 0, //default dwFlags
+ 0, //reserved
+ &chain);
+#ifdef QSSLSOCKET_DEBUG
+ qCDebug(lcSsl) << "QWindowsCaRootFetcher" << stopwatch.elapsed() << "ms to get chain";
+#endif
+
+ QSslCertificate trustedRoot;
+ if (result) {
+#ifdef QSSLSOCKET_DEBUG
+ qCDebug(lcSsl) << "QWindowsCaRootFetcher - examining windows chains";
+ if (chain->TrustStatus.dwErrorStatus == CERT_TRUST_NO_ERROR)
+ qCDebug(lcSsl) << " - TRUSTED";
+ else
+ qCDebug(lcSsl) << " - NOT TRUSTED" << chain->TrustStatus.dwErrorStatus;
+ if (chain->TrustStatus.dwInfoStatus & CERT_TRUST_IS_SELF_SIGNED)
+ qCDebug(lcSsl) << " - SELF SIGNED";
+ qCDebug(lcSsl) << "QSslSocketBackendPrivate::fetchCaRootForCert - dumping simple chains";
+ for (unsigned int i = 0; i < chain->cChain; i++) {
+ if (chain->rgpChain[i]->TrustStatus.dwErrorStatus == CERT_TRUST_NO_ERROR)
+ qCDebug(lcSsl) << " - TRUSTED SIMPLE CHAIN" << i;
+ else
+ qCDebug(lcSsl) << " - UNTRUSTED SIMPLE CHAIN" << i << "reason:" << chain->rgpChain[i]->TrustStatus.dwErrorStatus;
+ for (unsigned int j = 0; j < chain->rgpChain[i]->cElement; j++) {
+ QSslCertificate foundCert(QByteArray((const char *)chain->rgpChain[i]->rgpElement[j]->pCertContext->pbCertEncoded
+ , chain->rgpChain[i]->rgpElement[j]->pCertContext->cbCertEncoded), QSsl::Der);
+ qCDebug(lcSsl) << " - " << foundCert;
+ }
+ }
+ qCDebug(lcSsl) << " - and" << chain->cLowerQualityChainContext << "low quality chains"; //expect 0, we haven't asked for them
+#endif
+
+ //based on http://msdn.microsoft.com/en-us/library/windows/desktop/aa377182%28v=vs.85%29.aspx
+ //about the final chain rgpChain[cChain-1] which must begin with a trusted root to be valid
+ if (chain->TrustStatus.dwErrorStatus == CERT_TRUST_NO_ERROR
+ && chain->cChain > 0) {
+ const PCERT_SIMPLE_CHAIN finalChain = chain->rgpChain[chain->cChain - 1];
+ // http://msdn.microsoft.com/en-us/library/windows/desktop/aa377544%28v=vs.85%29.aspx
+ // rgpElement[0] is the end certificate chain element. rgpElement[cElement-1] is the self-signed "root" certificate element.
+ if (finalChain->TrustStatus.dwErrorStatus == CERT_TRUST_NO_ERROR
+ && finalChain->cElement > 0) {
+ trustedRoot = QSslCertificate(QByteArray((const char *)finalChain->rgpElement[finalChain->cElement - 1]->pCertContext->pbCertEncoded
+ , finalChain->rgpElement[finalChain->cElement - 1]->pCertContext->cbCertEncoded), QSsl::Der);
+ }
+ }
+ CertFreeCertificateChain(chain);
+ }
+ CertFreeCertificateContext(wincert);
+
+ emit finished(cert, trustedRoot);
+ deleteLater();
+}
+
+QT_END_NAMESPACE
diff --git a/src/network/ssl/qwindowscarootfetcher_p.h b/src/network/ssl/qwindowscarootfetcher_p.h
new file mode 100644
index 0000000000..181c309388
--- /dev/null
+++ b/src/network/ssl/qwindowscarootfetcher_p.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtNetwork 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINDOWSCAROOTFETCHER_P_H
+#define QWINDOWSCAROOTFETCHER_P_H
+
+#include <QtCore/QtGlobal>
+#include <QtCore/QObject>
+
+#include "qsslsocket.h"
+#include "qsslcertificate.h"
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+QT_BEGIN_NAMESPACE
+
+class QWindowsCaRootFetcher : public QObject
+{
+ Q_OBJECT;
+public:
+ QWindowsCaRootFetcher(const QSslCertificate &certificate, QSslSocket::SslMode sslMode);
+ ~QWindowsCaRootFetcher();
+public slots:
+ void start();
+signals:
+ void finished(QSslCertificate brokenChain, QSslCertificate caroot);
+private:
+ QSslCertificate cert;
+ QSslSocket::SslMode mode;
+};
+
+QT_END_NAMESPACE
+
+#endif // QWINDOWSCAROOTFETCHER_P_H
diff --git a/src/network/ssl/ssl.pri b/src/network/ssl/ssl.pri
index 2783effaf1..6975264038 100644
--- a/src/network/ssl/ssl.pri
+++ b/src/network/ssl/ssl.pri
@@ -1,12 +1,23 @@
# OpenSSL support; compile in QSslSocket.
+
+HEADERS += ssl/qasn1element_p.h \
+ ssl/qssl.h \
+ ssl/qssl_p.h \
+ ssl/qsslcertificate.h \
+ ssl/qsslcertificate_p.h \
+ ssl/qsslcertificateextension.h \
+ ssl/qsslcertificateextension_p.h
+
+SOURCES += ssl/qasn1element.cpp \
+ ssl/qssl.cpp \
+ ssl/qsslcertificate.cpp \
+ ssl/qsslcertificateextension.cpp
+
+!qtConfig(openssl): SOURCES += ssl/qsslcertificate_qt.cpp
+
qtConfig(ssl) {
- HEADERS += ssl/qasn1element_p.h \
- ssl/qssl.h \
- ssl/qssl_p.h \
- ssl/qsslcertificate.h \
- ssl/qsslcertificate_p.h \
- ssl/qsslconfiguration.h \
- ssl/qsslconfiguration_p.h \
+ HEADERS += ssl/qsslconfiguration.h \
+ ssl/qsslconfiguration_p.h \
ssl/qsslcipher.h \
ssl/qsslcipher_p.h \
ssl/qssldiffiehellmanparameters.h \
@@ -18,26 +29,19 @@ qtConfig(ssl) {
ssl/qsslsocket.h \
ssl/qsslsocket_p.h \
ssl/qsslpresharedkeyauthenticator.h \
- ssl/qsslpresharedkeyauthenticator_p.h \
- ssl/qsslcertificateextension.h \
- ssl/qsslcertificateextension_p.h
- SOURCES += ssl/qasn1element.cpp \
- ssl/qssl.cpp \
- ssl/qsslcertificate.cpp \
- ssl/qsslconfiguration.cpp \
+ ssl/qsslpresharedkeyauthenticator_p.h
+ SOURCES += ssl/qsslconfiguration.cpp \
ssl/qsslcipher.cpp \
ssl/qssldiffiehellmanparameters.cpp \
ssl/qsslellipticcurve.cpp \
ssl/qsslkey_p.cpp \
ssl/qsslerror.cpp \
ssl/qsslsocket.cpp \
- ssl/qsslpresharedkeyauthenticator.cpp \
- ssl/qsslcertificateextension.cpp
+ ssl/qsslpresharedkeyauthenticator.cpp
winrt {
HEADERS += ssl/qsslsocket_winrt_p.h
- SOURCES += ssl/qsslcertificate_qt.cpp \
- ssl/qsslcertificate_winrt.cpp \
+ SOURCES += ssl/qsslcertificate_winrt.cpp \
ssl/qssldiffiehellmanparameters_dummy.cpp \
ssl/qsslkey_qt.cpp \
ssl/qsslkey_winrt.cpp \
@@ -47,8 +51,7 @@ qtConfig(ssl) {
qtConfig(securetransport) {
HEADERS += ssl/qsslsocket_mac_p.h
- SOURCES += ssl/qsslcertificate_qt.cpp \
- ssl/qssldiffiehellmanparameters_dummy.cpp \
+ SOURCES += ssl/qssldiffiehellmanparameters_dummy.cpp \
ssl/qsslkey_qt.cpp \
ssl/qsslkey_mac.cpp \
ssl/qsslsocket_mac_shared.cpp \
@@ -56,6 +59,13 @@ qtConfig(ssl) {
ssl/qsslellipticcurve_dummy.cpp
}
+ qtConfig(dtls) {
+ HEADERS += ssl/qdtls.h \
+ ssl/qdtls_p.h
+
+ SOURCES += ssl/qdtls.cpp
+ }
+
qtConfig(openssl) {
HEADERS += ssl/qsslcontext_openssl_p.h \
ssl/qsslsocket_openssl_p.h \
@@ -66,7 +76,12 @@ qtConfig(ssl) {
ssl/qsslellipticcurve_openssl.cpp \
ssl/qsslkey_openssl.cpp \
ssl/qsslsocket_openssl.cpp \
- ssl/qsslcontext_openssl.cpp
+ ssl/qsslcontext_openssl.cpp \
+
+ qtConfig(dtls) {
+ HEADERS += ssl/qdtls_openssl_p.h
+ SOURCES += ssl/qdtls_openssl.cpp
+ }
qtConfig(opensslv11) {
HEADERS += ssl/qsslsocket_openssl11_symbols_p.h
@@ -95,6 +110,13 @@ qtConfig(ssl) {
QMAKE_USE_FOR_PRIVATE += openssl
else: \
QMAKE_USE_FOR_PRIVATE += openssl/nolink
- win32: LIBS_PRIVATE += -lcrypt32
+ win32 {
+ LIBS_PRIVATE += -lcrypt32
+ HEADERS += ssl/qwindowscarootfetcher_p.h
+ SOURCES += ssl/qwindowscarootfetcher.cpp
+ }
}
}
+
+HEADERS += ssl/qpassworddigestor.h
+SOURCES += ssl/qpassworddigestor.cpp
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index d9f2113c14..4eb7a194d9 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -2104,17 +2104,17 @@ struct DDSFormat {
would mirror the image and automatically generate mipmaps. This
option helps preserve this default behavior.
- \omitvalue CanFlipNativePixmapBindOption Used by x11 from pixmap to choose
- whether or not it can bind the pixmap upside down or not.
+ \omitvalue CanFlipNativePixmapBindOption \omit Used by x11 from pixmap to choose
+ whether or not it can bind the pixmap upside down or not. \endomit
- \omitvalue MemoryManagedBindOption Used by paint engines to
+ \omitvalue MemoryManagedBindOption \omit Used by paint engines to
indicate that the pixmap should be memory managed along side with
the pixmap/image that it stems from, e.g. installing destruction
- hooks in them.
+ hooks in them. \endomit
- \omitvalue TemporarilyCachedBindOption Used by paint engines on some
+ \omitvalue TemporarilyCachedBindOption \omit Used by paint engines on some
platforms to indicate that the pixmap or image texture is possibly
- cached only temporarily and must be destroyed immediately after the use.
+ cached only temporarily and must be destroyed immediately after the use. \endomit
\omitvalue InternalBindOption
*/
diff --git a/src/platformheaders/xcbfunctions/qxcbwindowfunctions.h b/src/platformheaders/xcbfunctions/qxcbwindowfunctions.h
index b6c3b1db73..b0e6cb6a1d 100644
--- a/src/platformheaders/xcbfunctions/qxcbwindowfunctions.h
+++ b/src/platformheaders/xcbfunctions/qxcbwindowfunctions.h
@@ -90,27 +90,6 @@ public:
return QPlatformHeaderHelper::callPlatformFunction<void, SetWmWindowIconText, QWindow *, const QString &>(setWmWindowIconTextIdentifier(), window, text);
}
- typedef void (*SetParentRelativeBackPixmap)(const QWindow *window);
- static const QByteArray setParentRelativeBackPixmapIdentifier() { return QByteArrayLiteral("XcbSetParentRelativeBackPixmap"); }
- static void setParentRelativeBackPixmap(const QWindow *window)
- {
- return QPlatformHeaderHelper::callPlatformFunction<void, SetParentRelativeBackPixmap, const QWindow *>(setParentRelativeBackPixmapIdentifier(), window);
- }
-
- typedef bool (*RequestSystemTrayWindowDock)(const QWindow *window);
- static const QByteArray requestSystemTrayWindowDockIdentifier() { return QByteArrayLiteral("XcbRequestSystemTrayWindowDockIdentifier"); }
- static bool requestSystemTrayWindowDock(const QWindow *window)
- {
- return QPlatformHeaderHelper::callPlatformFunction<bool, RequestSystemTrayWindowDock, const QWindow *>(requestSystemTrayWindowDockIdentifier(), window);
- }
-
- typedef QRect (*SystemTrayWindowGlobalGeometry)(const QWindow *window);
- static const QByteArray systemTrayWindowGlobalGeometryIdentifier() { return QByteArrayLiteral("XcbSystemTrayWindowGlobalGeometryIdentifier"); }
- static QRect systemTrayWindowGlobalGeometry(const QWindow *window)
- {
- return QPlatformHeaderHelper::callPlatformFunction<QRect, SystemTrayWindowGlobalGeometry, const QWindow *>(systemTrayWindowGlobalGeometryIdentifier(), window);
- }
-
typedef uint (*VisualId)(QWindow *window);
static const QByteArray visualIdIdentifier() { return QByteArrayLiteral("XcbVisualId"); }
diff --git a/src/platformheaders/xcbfunctions/qxcbwindowfunctions.qdoc b/src/platformheaders/xcbfunctions/qxcbwindowfunctions.qdoc
index fab473b91b..5e2aa2cbf2 100644
--- a/src/platformheaders/xcbfunctions/qxcbwindowfunctions.qdoc
+++ b/src/platformheaders/xcbfunctions/qxcbwindowfunctions.qdoc
@@ -138,81 +138,6 @@
*/
/*!
- \typedef QXcbWindowFunctions::SetParentRelativeBackPixmap
-
- This is the typedef for the function returned by
- QGuiApplication::platformFunction when passed the
- value returned by setParentRelativeBackPixmapIdentifier().
-*/
-
-/*!
- \fn const QByteArray QXcbWindowFunctions::setParentRelativeBackPixmapIdentifier()
-
- This function returns the byte array that can be used to query
- QGuiApplication::platformFunction to retrieve the SetParentRelativeBackPixmap function.
-*/
-
-/*!
- \fn void QXcbWindowFunctions::setParentRelativeBackPixmap(const QWindow *window)
-
- This is a convenience function that can be used directly instead
- of resolving the function pointer. \a window will be
- relayed to the function retrieved by QGuiApplication.
-*/
-
-/*!
- \typedef QXcbWindowFunctions::RequestSystemTrayWindowDock
-
- This is the typedef for the function returned by
- QGuiApplication::platformFunction when passed the
- value returned by requestSystemTrayWindowDockIdentifier().
-*/
-
-/*!
- \fn const QByteArray QXcbWindowFunctions::requestSystemTrayWindowDockIdentifier()
-
- This function returns the byte array that can be used to query
- QGuiApplication::platformFunction to retrieve the RequestSystemTrayWindowDock function.
-*/
-
-/*!
- \fn bool QXcbWindowFunctions::requestSystemTrayWindowDock(const QWindow *window)
-
- This is a convenience function that can be used directly instead
- of resolving the function pointer. \a window will be
- relayed to the function retrieved by QGuiApplication.
-
- Returns the boolean result of calling the function or false if the
- function was not found.
-*/
-
-/*!
- \typedef QXcbWindowFunctions::SystemTrayWindowGlobalGeometry
-
- This is the typedef for the function returned by
- QGuiApplication::platformFunction when passed the
- value returned by systemTrayWindowGlobalGeometryIdentifier().
-*/
-
-/*!
- \fn const QByteArray QXcbWindowFunctions::systemTrayWindowGlobalGeometryIdentifier()
-
- This function returns the byte array that can be used to query
- QGuiApplication::platformFunction to retrieve the SystemTrayWindowGlobalGeometry function.
-*/
-
-/*!
- \fn QRect QXcbWindowFunctions::systemTrayWindowGlobalGeometry(const QWindow *window)
-
- This is a convenience function that can be used directly instead
- of resolving the function pointer. \a window will be
- relayed to the function retrieved by QGuiApplication.
-
- Returns the QRect result of calling the function or an empty
- QRect if the function was not found.
-*/
-
-/*!
\typedef QXcbWindowFunctions::VisualId
This is the typedef for the function returned by
diff --git a/src/platformheaders/xcbfunctions/xcbfunctions.pri b/src/platformheaders/xcbfunctions/xcbfunctions.pri
index 3f2bcb2b34..3fbee53854 100644
--- a/src/platformheaders/xcbfunctions/xcbfunctions.pri
+++ b/src/platformheaders/xcbfunctions/xcbfunctions.pri
@@ -1,4 +1,3 @@
HEADERS += \
$$PWD/qxcbwindowfunctions.h \
- $$PWD/qxcbintegrationfunctions.h \
$$PWD/qxcbscreenfunctions.h
diff --git a/src/platformsupport/clipboard/qmacmime.mm b/src/platformsupport/clipboard/qmacmime.mm
index 09901ba0a5..caa2ccc6e5 100644
--- a/src/platformsupport/clipboard/qmacmime.mm
+++ b/src/platformsupport/clipboard/qmacmime.mm
@@ -536,13 +536,13 @@ QVariant QMacPasteboardMimeRtfText::convertToMime(const QString &mimeType, QList
// Read RTF into to NSAttributedString, then convert the string to HTML
NSAttributedString *string = [[NSAttributedString alloc] initWithData:data.at(0).toNSData()
- options:[NSDictionary dictionaryWithObject:NSRTFTextDocumentType forKey:NSDocumentTypeDocumentAttribute]
+ options:@{NSDocumentTypeDocumentAttribute: NSRTFTextDocumentType}
documentAttributes:nil
error:nil];
NSError *error;
NSRange range = NSMakeRange(0, [string length]);
- NSDictionary *dict = [NSDictionary dictionaryWithObject:NSHTMLTextDocumentType forKey:NSDocumentTypeDocumentAttribute];
+ NSDictionary *dict = @{NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType};
NSData *htmlData = [string dataFromRange:range documentAttributes:dict error:&error];
return QByteArray::fromNSData(htmlData);
}
@@ -554,13 +554,13 @@ QList<QByteArray> QMacPasteboardMimeRtfText::convertFromMime(const QString &mime
return ret;
NSAttributedString *string = [[NSAttributedString alloc] initWithData:data.toByteArray().toNSData()
- options:[NSDictionary dictionaryWithObject:NSHTMLTextDocumentType forKey:NSDocumentTypeDocumentAttribute]
+ options:@{NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType}
documentAttributes:nil
error:nil];
NSError *error;
NSRange range = NSMakeRange(0, [string length]);
- NSDictionary *dict = [NSDictionary dictionaryWithObject:NSRTFTextDocumentType forKey:NSDocumentTypeDocumentAttribute];
+ NSDictionary *dict = @{NSDocumentTypeDocumentAttribute: NSRTFTextDocumentType};
NSData *rtfData = [string dataFromRange:range documentAttributes:dict error:&error];
ret << QByteArray::fromNSData(rtfData);
return ret;
@@ -853,8 +853,8 @@ QList<QByteArray> QMacPasteboardMimeTiff::convertFromMime(const QString &mime, Q
QImage img = qvariant_cast<QImage>(variant);
NSDictionary *props = @{
- static_cast<NSString *>(kCGImagePropertyPixelWidth) : [NSNumber numberWithInt:img.width()],
- static_cast<NSString *>(kCGImagePropertyPixelHeight) : [NSNumber numberWithInt:img.height()]
+ static_cast<NSString *>(kCGImagePropertyPixelWidth): @(img.width()),
+ static_cast<NSString *>(kCGImagePropertyPixelHeight): @(img.height())
};
CGImageDestinationAddImage(imageDestination, qt_mac_toCGImage(img), static_cast<CFDictionaryRef>(props));
diff --git a/src/platformsupport/eventdispatchers/qwindowsguieventdispatcher.cpp b/src/platformsupport/eventdispatchers/qwindowsguieventdispatcher.cpp
index aa7bb102c6..3583ead788 100644
--- a/src/platformsupport/eventdispatchers/qwindowsguieventdispatcher.cpp
+++ b/src/platformsupport/eventdispatchers/qwindowsguieventdispatcher.cpp
@@ -184,7 +184,29 @@ messageDebugEntries[] = {
{WM_DRAWCLIPBOARD, "WM_DRAWCLIPBOARD", true},
{WM_THEMECHANGED, "WM_THEMECHANGED", true},
{0x90, "WM_UAHDESTROYWINDOW", true},
- {0x272, "WM_UNREGISTER_WINDOW_SERVICES", true}
+ {0x272, "WM_UNREGISTER_WINDOW_SERVICES", true},
+#ifdef WM_POINTERUPDATE
+ {WM_POINTERDEVICECHANGE, "WM_POINTERDEVICECHANGE", true},
+ {WM_POINTERDEVICEINRANGE, "WM_POINTERDEVICEINRANGE", true},
+ {WM_POINTERDEVICEOUTOFRANGE, "WM_POINTERDEVICEOUTOFRANGE", true},
+ {WM_NCPOINTERUPDATE, "WM_NCPOINTERUPDATE", true},
+ {WM_NCPOINTERDOWN, "WM_NCPOINTERDOWN", true},
+ {WM_NCPOINTERUP, "WM_NCPOINTERUP", true},
+ {WM_POINTERUPDATE, "WM_POINTERUPDATE", true},
+ {WM_POINTERDOWN, "WM_POINTERDOWN", true},
+ {WM_POINTERUP, "WM_POINTERUP", true},
+ {WM_POINTERENTER, "WM_POINTERENTER", true},
+ {WM_POINTERLEAVE, "WM_POINTERLEAVE", true},
+ {WM_POINTERACTIVATE, "WM_POINTERACTIVATE", true},
+ {WM_POINTERCAPTURECHANGED, "WM_POINTERCAPTURECHANGED", true},
+ {WM_TOUCHHITTESTING, "WM_TOUCHHITTESTING", true},
+ {WM_POINTERWHEEL, "WM_POINTERWHEEL", true},
+ {WM_POINTERHWHEEL, "WM_POINTERHWHEEL", true},
+ {DM_POINTERHITTEST, "DM_POINTERHITTEST", true},
+ {WM_POINTERROUTEDTO, "WM_POINTERROUTEDTO", true},
+ {WM_POINTERROUTEDAWAY, "WM_POINTERROUTEDAWAY", true},
+ {WM_POINTERROUTEDRELEASED, "WM_POINTERROUTEDRELEASED", true}
+#endif // WM_POINTERUPDATE
};
static inline const MessageDebugEntry *messageDebugEntry(UINT msg)
diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
index 91c2dc8cf0..5faeca0618 100644
--- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
+++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
@@ -101,14 +101,14 @@ enum { LanguageCount = sizeof(languageForWritingSystem) / sizeof(const char *) }
#ifdef Q_OS_OSX
static NSInteger languageMapSort(id obj1, id obj2, void *context)
{
- NSArray *map1 = (NSArray *) obj1;
- NSArray *map2 = (NSArray *) obj2;
- NSArray *languages = (NSArray *) context;
+ NSArray<NSString *> *map1 = reinterpret_cast<NSArray<NSString *> *>(obj1);
+ NSArray<NSString *> *map2 = reinterpret_cast<NSArray<NSString *> *>(obj2);
+ NSArray<NSString *> *languages = reinterpret_cast<NSArray<NSString *> *>(context);
- NSString *lang1 = [map1 objectAtIndex: 0];
- NSString *lang2 = [map2 objectAtIndex: 0];
+ NSString *lang1 = [map1 objectAtIndex:0];
+ NSString *lang2 = [map2 objectAtIndex:0];
- return [languages indexOfObject: lang1] - [languages indexOfObject: lang2];
+ return [languages indexOfObject:lang1] - [languages indexOfObject:lang2];
}
#endif
@@ -184,23 +184,9 @@ QCoreTextFontDatabase::~QCoreTextFontDatabase()
CFRelease(ref);
}
-static CFArrayRef availableFamilyNames()
-{
-#if QT_DARWIN_PLATFORM_SDK_EQUAL_OR_ABOVE(1060, 100000, 100000, 30000)
- if (&CTFontManagerCopyAvailableFontFamilyNames)
- return CTFontManagerCopyAvailableFontFamilyNames();
-#endif
-#if defined(QT_PLATFORM_UIKIT)
- CFMutableArrayRef familyNames = CFArrayCreateMutableCopy(kCFAllocatorDefault, 0, (CFArrayRef)[UIFont familyNames]);
- CFArrayAppendValue(familyNames, CFSTR(".PhoneFallback"));
- return familyNames;
-#endif
- Q_UNREACHABLE();
-}
-
void QCoreTextFontDatabase::populateFontDatabase()
{
- QCFType<CFArrayRef> familyNames = availableFamilyNames();
+ QCFType<CFArrayRef> familyNames = CTFontManagerCopyAvailableFontFamilyNames();
for (NSString *familyName in familyNames.as<const NSArray *>())
QPlatformFontDatabase::registerFontFamily(QString::fromNSString(familyName));
@@ -220,7 +206,7 @@ bool QCoreTextFontDatabase::populateFamilyAliases()
if (m_hasPopulatedAliases)
return false;
- QCFType<CFArrayRef> familyNames = availableFamilyNames();
+ QCFType<CFArrayRef> familyNames = CTFontManagerCopyAvailableFontFamilyNames();
for (NSString *familyName in familyNames.as<const NSArray *>()) {
NSFontManager *fontManager = [NSFontManager sharedFontManager];
NSString *localizedFamilyName = [fontManager localizedNameForFamily:familyName face:nil];
@@ -571,21 +557,21 @@ QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFo
if (!didPopulateStyleFallbacks) {
#if defined(Q_OS_MACX)
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
- NSArray *languages = [defaults stringArrayForKey: @"AppleLanguages"];
+ NSArray<NSString *> *languages = [defaults stringArrayForKey:@"AppleLanguages"];
- NSDictionary *fallbackDict = [NSDictionary dictionaryWithContentsOfFile: @"/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreText.framework/Resources/DefaultFontFallbacks.plist"];
+ NSDictionary<NSString *, id> *fallbackDict = [NSDictionary<NSString *, id> dictionaryWithContentsOfFile:@"/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreText.framework/Resources/DefaultFontFallbacks.plist"];
for (NSString *style in [fallbackDict allKeys]) {
- NSArray *list = [fallbackDict valueForKey: style];
+ NSArray *list = [fallbackDict valueForKey:style];
QFont::StyleHint fallbackStyleHint = styleHintFromNSString(style);
QStringList fallbackList;
for (id item in list) {
// sort the array based on system language preferences
- if ([item isKindOfClass: [NSArray class]]) {
- NSArray *langs = [(NSArray *) item sortedArrayUsingFunction: languageMapSort
- context: languages];
- for (NSArray *map in langs)
- fallbackList.append(familyNameFromPostScriptName([map objectAtIndex: 1]));
+ if ([item isKindOfClass:[NSArray class]]) {
+ NSArray *langs = [reinterpret_cast<NSArray *>(item)
+ sortedArrayUsingFunction:languageMapSort context:languages];
+ for (NSArray<NSString *> *map in langs)
+ fallbackList.append(familyNameFromPostScriptName([map objectAtIndex:1]));
}
else if ([item isKindOfClass: [NSString class]])
fallbackList.append(familyNameFromPostScriptName(item));
diff --git a/src/platformsupport/kmsconvenience/qkmsdevice.cpp b/src/platformsupport/kmsconvenience/qkmsdevice.cpp
index a5895559e6..ef81f6162d 100644
--- a/src/platformsupport/kmsconvenience/qkmsdevice.cpp
+++ b/src/platformsupport/kmsconvenience/qkmsdevice.cpp
@@ -366,6 +366,25 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources,
if (!cloneSource.isEmpty())
qCDebug(qLcKmsDebug) << "Output" << connectorName << " clones output " << cloneSource;
+ const QByteArray fbsize = userConnectorConfig.value(QStringLiteral("size")).toByteArray().toLower();
+ QSize framebufferSize;
+ framebufferSize.setWidth(modes[selected_mode].hdisplay);
+ framebufferSize.setHeight(modes[selected_mode].vdisplay);
+
+#if QT_CONFIG(drm_atomic)
+ if (hasAtomicSupport()) {
+ if (sscanf(fbsize.constData(), "%dx%d", &framebufferSize.rwidth(), &framebufferSize.rheight()) != 2) {
+ qWarning("Framebuffer size format is invalid.");
+ }
+ } else {
+ qWarning("Setting framebuffer size is only available with DRM atomic API");
+ }
+#else
+ if (fbsize.size())
+ qWarning("Setting framebuffer size is only available with DRM atomic API");
+#endif
+ qCDebug(qLcKmsDebug) << "Output" << connectorName << "framebuffer size is " << framebufferSize;
+
QKmsOutput output;
output.name = QString::fromUtf8(connectorName);
output.connector_id = connector->connector_id;
@@ -385,6 +404,17 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources,
output.forced_plane_set = false;
output.drm_format = drmFormat;
output.clone_source = cloneSource;
+ output.size = framebufferSize;
+
+#if QT_CONFIG(drm_atomic)
+ if (drmModeCreatePropertyBlob(m_dri_fd, &modes[selected_mode], sizeof(drmModeModeInfo),
+ &output.mode_blob_id) != 0) {
+ qCDebug(qLcKmsDebug) << "Failed to create mode blob for mode" << selected_mode;
+ }
+
+ parseConnectorProperties(output.connector_id, &output);
+ parseCrtcProperties(output.crtc_id, &output);
+#endif
QString planeListStr;
for (const QKmsPlane &plane : qAsConst(m_planes)) {
@@ -392,6 +422,8 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources,
output.available_planes.append(plane);
planeListStr.append(QString::number(plane.id));
planeListStr.append(QLatin1Char(' '));
+ if (plane.type == QKmsPlane::PrimaryPlane)
+ output.eglfs_plane = (QKmsPlane*)&plane;
}
}
qCDebug(qLcKmsDebug, "Output %s can use %d planes: %s",
@@ -412,6 +444,12 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources,
output.forced_plane_id = plane->plane_id;
qCDebug(qLcKmsDebug, "Forcing plane index %d, plane id %u (belongs to crtc id %u)",
idx, plane->plane_id, plane->crtc_id);
+
+ for (const QKmsPlane &kmsplane : qAsConst(m_planes)) {
+ if (kmsplane.id == output.forced_plane_id)
+ output.eglfs_plane = (QKmsPlane*)&kmsplane;
+ }
+
drmModeFreePlane(plane);
}
} else {
@@ -420,6 +458,9 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources,
}
}
+ if (output.eglfs_plane)
+ qCDebug(qLcKmsDebug, "Output eglfs plane is: %d", output.eglfs_plane->id);
+
m_crtc_allocator |= (1 << output.crtc_index);
vinfo->output = output;
@@ -464,6 +505,11 @@ QKmsDevice::QKmsDevice(QKmsScreenConfig *screenConfig, const QString &path)
: m_screenConfig(screenConfig)
, m_path(path)
, m_dri_fd(-1)
+ , m_has_atomic_support(false)
+#if QT_CONFIG(drm_atomic)
+ , m_atomic_request(nullptr)
+ , m_previous_request(nullptr)
+#endif
, m_crtc_allocator(0)
{
if (m_path.isEmpty()) {
@@ -478,6 +524,9 @@ QKmsDevice::QKmsDevice(QKmsScreenConfig *screenConfig, const QString &path)
QKmsDevice::~QKmsDevice()
{
+#if QT_CONFIG(drm_atomic)
+ atomicReset();
+#endif
}
struct OrderedScreen
@@ -522,6 +571,14 @@ void QKmsDevice::createScreens()
drmSetClientCap(m_dri_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1);
+#if QT_CONFIG(drm_atomic)
+ // check atomic support
+ m_has_atomic_support = !drmSetClientCap(m_dri_fd, DRM_CLIENT_CAP_ATOMIC, 1)
+ && qEnvironmentVariableIntValue("QT_QPA_EGLFS_KMS_ATOMIC");
+ if (m_has_atomic_support)
+ qCDebug(qLcKmsDebug) << "Atomic Support found";
+#endif
+
drmModeResPtr resources = drmModeGetResources(m_dri_fd);
if (!resources) {
qErrnoWarning(errno, "drmModeGetResources failed");
@@ -747,6 +804,28 @@ void QKmsDevice::discoverPlanes()
plane.availableRotations |= QKmsPlane::Rotation(1 << prop->enums[i].value);
}
plane.rotationPropertyId = prop->prop_id;
+ } else if (!strcasecmp(prop->name, "crtc_id")) {
+ plane.crtcPropertyId = prop->prop_id;
+ } else if (!strcasecmp(prop->name, "fb_id")) {
+ plane.framebufferPropertyId = prop->prop_id;
+ } else if (!strcasecmp(prop->name, "src_w")) {
+ plane.srcwidthPropertyId = prop->prop_id;
+ } else if (!strcasecmp(prop->name, "src_h")) {
+ plane.srcheightPropertyId = prop->prop_id;
+ } else if (!strcasecmp(prop->name, "crtc_w")) {
+ plane.crtcwidthPropertyId = prop->prop_id;
+ } else if (!strcasecmp(prop->name, "crtc_h")) {
+ plane.crtcheightPropertyId = prop->prop_id;
+ } else if (!strcasecmp(prop->name, "src_x")) {
+ plane.srcXPropertyId = prop->prop_id;
+ } else if (!strcasecmp(prop->name, "src_y")) {
+ plane.srcYPropertyId = prop->prop_id;
+ } else if (!strcasecmp(prop->name, "crtc_x")) {
+ plane.crtcXPropertyId = prop->prop_id;
+ } else if (!strcasecmp(prop->name, "crtc_y")) {
+ plane.crtcYPropertyId = prop->prop_id;
+ } else if (!strcasecmp(prop->name, "zpos")) {
+ plane.zposPropertyId = prop->prop_id;
}
});
@@ -773,6 +852,86 @@ void QKmsDevice::setFd(int fd)
m_dri_fd = fd;
}
+
+bool QKmsDevice::hasAtomicSupport()
+{
+ return m_has_atomic_support;
+}
+
+#if QT_CONFIG(drm_atomic)
+drmModeAtomicReq * QKmsDevice::atomic_request()
+{
+ if (!m_atomic_request && m_has_atomic_support)
+ m_atomic_request = drmModeAtomicAlloc();
+
+ return m_atomic_request;
+}
+
+bool QKmsDevice::atomicCommit(void *user_data)
+{
+ if (m_atomic_request) {
+ int ret = drmModeAtomicCommit(m_dri_fd, m_atomic_request,
+ DRM_MODE_ATOMIC_NONBLOCK | DRM_MODE_PAGE_FLIP_EVENT | DRM_MODE_ATOMIC_ALLOW_MODESET, user_data);
+
+ if (ret) {
+ qWarning("Failed to commit atomic request (code=%d)", ret);
+ return false;
+ }
+
+ m_previous_request = m_atomic_request;
+ m_atomic_request = nullptr;
+
+ return true;
+ }
+
+ return false;
+}
+
+void QKmsDevice::atomicReset()
+{
+ if (m_previous_request) {
+ drmModeAtomicFree(m_previous_request);
+ m_previous_request = nullptr;
+ }
+}
+#endif
+
+void QKmsDevice::parseConnectorProperties(uint32_t connectorId, QKmsOutput *output)
+{
+ drmModeObjectPropertiesPtr objProps = drmModeObjectGetProperties(m_dri_fd, connectorId, DRM_MODE_OBJECT_CONNECTOR);
+ if (!objProps) {
+ qCDebug(qLcKmsDebug, "Failed to query connector %d object properties", connectorId);
+ return;
+ }
+
+ enumerateProperties(objProps, [output](drmModePropertyPtr prop, quint64 value) {
+ Q_UNUSED(value);
+ if (!strcasecmp(prop->name, "crtc_id"))
+ output->crtcIdPropertyId = prop->prop_id;
+ });
+
+ drmModeFreeObjectProperties(objProps);
+}
+
+void QKmsDevice::parseCrtcProperties(uint32_t crtcId, QKmsOutput *output)
+{
+ drmModeObjectPropertiesPtr objProps = drmModeObjectGetProperties(m_dri_fd, crtcId, DRM_MODE_OBJECT_CRTC);
+ if (!objProps) {
+ qCDebug(qLcKmsDebug, "Failed to query crtc %d object properties", crtcId);
+ return;
+ }
+
+ enumerateProperties(objProps, [output](drmModePropertyPtr prop, quint64 value) {
+ Q_UNUSED(value)
+ if (!strcasecmp(prop->name, "mode_id"))
+ output->modeIdPropertyId = prop->prop_id;
+ else if (!strcasecmp(prop->name, "active"))
+ output->activePropertyId = prop->prop_id;
+ });
+
+ drmModeFreeObjectProperties(objProps);
+}
+
QKmsScreenConfig *QKmsDevice::screenConfig() const
{
return m_screenConfig;
diff --git a/src/platformsupport/kmsconvenience/qkmsdevice_p.h b/src/platformsupport/kmsconvenience/qkmsdevice_p.h
index 5eecedec39..403972fbb8 100644
--- a/src/platformsupport/kmsconvenience/qkmsdevice_p.h
+++ b/src/platformsupport/kmsconvenience/qkmsdevice_p.h
@@ -53,6 +53,7 @@
// We mean it.
//
+#include <QtGui/private/qtguiglobal_p.h>
#include <qpa/qplatformscreen.h>
#include <QtCore/QMap>
#include <QtCore/QVariant>
@@ -166,6 +167,17 @@ struct QKmsPlane
Rotations initialRotation = Rotation0;
Rotations availableRotations = Rotation0;
uint32_t rotationPropertyId = 0;
+ uint32_t crtcPropertyId = 0;
+ uint32_t framebufferPropertyId = 0;
+ uint32_t srcXPropertyId = 0;
+ uint32_t srcYPropertyId = 0;
+ uint32_t crtcXPropertyId = 0;
+ uint32_t crtcYPropertyId = 0;
+ uint32_t srcwidthPropertyId = 0;
+ uint32_t srcheightPropertyId = 0;
+ uint32_t crtcwidthPropertyId = 0;
+ uint32_t crtcheightPropertyId = 0;
+ uint32_t zposPropertyId = 0;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QKmsPlane::Rotations)
@@ -191,6 +203,13 @@ struct QKmsOutput
uint32_t drm_format = DRM_FORMAT_XRGB8888;
QString clone_source;
QVector<QKmsPlane> available_planes;
+ struct QKmsPlane *eglfs_plane = nullptr;
+ QSize size;
+ uint32_t crtcIdPropertyId = 0;
+ uint32_t modeIdPropertyId = 0;
+ uint32_t activePropertyId = 0;
+
+ uint32_t mode_blob_id = 0;
void restoreMode(QKmsDevice *device);
void cleanup(QKmsDevice *device);
@@ -215,6 +234,14 @@ public:
virtual void close() = 0;
virtual void *nativeDisplay() const = 0;
+ bool hasAtomicSupport();
+
+#if QT_CONFIG(drm_atomic)
+ bool atomicCommit(void *user_data);
+ void atomicReset();
+
+ drmModeAtomicReq *atomic_request();
+#endif
void createScreens();
int fd() const;
@@ -243,11 +270,19 @@ protected:
typedef std::function<void(drmModePropertyPtr, quint64)> PropCallback;
void enumerateProperties(drmModeObjectPropertiesPtr objProps, PropCallback callback);
void discoverPlanes();
+ void parseConnectorProperties(uint32_t connectorId, QKmsOutput *output);
+ void parseCrtcProperties(uint32_t crtcId, QKmsOutput *output);
QKmsScreenConfig *m_screenConfig;
QString m_path;
int m_dri_fd;
+ bool m_has_atomic_support;
+
+#if QT_CONFIG(drm_atomic)
+ drmModeAtomicReq *m_atomic_request;
+ drmModeAtomicReq *m_previous_request;
+#endif
quint32 m_crtc_allocator;
QVector<QKmsPlane> m_planes;
diff --git a/src/platformsupport/services/genericunix/qgenericunixservices.cpp b/src/platformsupport/services/genericunix/qgenericunixservices.cpp
index cb1e367b9f..5b15cccaf1 100644
--- a/src/platformsupport/services/genericunix/qgenericunixservices.cpp
+++ b/src/platformsupport/services/genericunix/qgenericunixservices.cpp
@@ -177,6 +177,41 @@ static inline bool checkRunningUnderFlatpak()
return !QStandardPaths::locate(QStandardPaths::RuntimeLocation, QLatin1String("flatpak-info")).isEmpty();
}
+static inline bool flatpakOpenFile(const QUrl &url)
+{
+ // DBus signature:
+ // OpenFile (IN s parent_window,
+ // IN h fd,
+ // IN a{sv} options,
+ // OUT o handle)
+ // Options:
+ // handle_token (s) - A string that will be used as the last element of the @handle.
+ // writable (b) - Whether to allow the chosen application to write to the file.
+
+#ifdef O_PATH
+ const int fd = qt_safe_open(QFile::encodeName(url.toLocalFile()), O_PATH);
+ if (fd != -1) {
+ QDBusMessage message = QDBusMessage::createMethodCall(QLatin1String("org.freedesktop.portal.Desktop"),
+ QLatin1String("/org/freedesktop/portal/desktop"),
+ QLatin1String("org.freedesktop.portal.OpenURI"),
+ QLatin1String("OpenFile"));
+
+ QDBusUnixFileDescriptor descriptor(fd);
+ qt_safe_close(fd);
+
+ // FIXME parent_window_id and handle writable option
+ message << QString() << QVariant::fromValue(descriptor) << QVariantMap();
+
+ QDBusPendingReply<QDBusObjectPath> reply = QDBusConnection::sessionBus().call(message);
+ return !reply.isError();
+ }
+#else
+ Q_UNUSED(url)
+#endif
+
+ return false;
+}
+
static inline bool flatpakOpenUrl(const QUrl &url)
{
// DBus signature:
@@ -185,6 +220,7 @@ static inline bool flatpakOpenUrl(const QUrl &url)
// IN a{sv} options,
// OUT o handle)
// Options:
+ // handle_token (s) - A string that will be used as the last element of the @handle.
// writable (b) - Whether to allow the chosen application to write to the file.
// This key only takes effect the uri points to a local file that is exported in the document portal,
// and the chosen application is sandboxed itself.
@@ -278,6 +314,11 @@ bool QGenericUnixServices::openUrl(const QUrl &url)
bool QGenericUnixServices::openDocument(const QUrl &url)
{
+#if QT_CONFIG(dbus)
+ if (checkRunningUnderFlatpak())
+ return flatpakOpenFile(url);
+#endif
+
if (m_documentLauncher.isEmpty() && !detectWebBrowser(desktopEnvironment(), false, &m_documentLauncher)) {
qWarning("Unable to detect a launcher for '%s'", qPrintable(url.toString()));
return false;
diff --git a/src/platformsupport/vkconvenience/qbasicvulkanplatforminstance.cpp b/src/platformsupport/vkconvenience/qbasicvulkanplatforminstance.cpp
index 382d142334..b9c5669b3f 100644
--- a/src/platformsupport/vkconvenience/qbasicvulkanplatforminstance.cpp
+++ b/src/platformsupport/vkconvenience/qbasicvulkanplatforminstance.cpp
@@ -82,6 +82,21 @@ QBasicPlatformVulkanInstance::~QBasicPlatformVulkanInstance()
m_vkDestroyInstance(m_vkInst, nullptr);
}
+void QBasicPlatformVulkanInstance::loadVulkanLibrary(const QString &defaultLibraryName)
+{
+ if (qEnvironmentVariableIsSet("QT_VULKAN_LIB"))
+ m_vulkanLib.setFileName(QString::fromUtf8(qgetenv("QT_VULKAN_LIB")));
+ else
+ m_vulkanLib.setFileName(defaultLibraryName);
+
+ if (!m_vulkanLib.load()) {
+ qWarning("Failed to load %s: %s", qPrintable(m_vulkanLib.fileName()), qPrintable(m_vulkanLib.errorString()));
+ return;
+ }
+
+ init(&m_vulkanLib);
+}
+
void QBasicPlatformVulkanInstance::init(QLibrary *lib)
{
if (m_vkGetInstanceProcAddr)
@@ -256,6 +271,11 @@ void QBasicPlatformVulkanInstance::initInstance(QVulkanInstance *instance, const
if (!m_getPhysDevSurfaceSupport)
qWarning("Failed to find vkGetPhysicalDeviceSurfaceSupportKHR");
+ m_destroySurface = reinterpret_cast<PFN_vkDestroySurfaceKHR>(
+ m_vkGetInstanceProcAddr(m_vkInst, "vkDestroySurfaceKHR"));
+ if (!m_destroySurface)
+ qWarning("Failed to find vkDestroySurfaceKHR");
+
if (!flags.testFlag(QVulkanInstance::NoDebugOutputRedirect))
setupDebugOutput();
}
@@ -310,6 +330,12 @@ bool QBasicPlatformVulkanInstance::supportsPresent(VkPhysicalDevice physicalDevi
return supported;
}
+void QBasicPlatformVulkanInstance::destroySurface(VkSurfaceKHR surface) const
+{
+ if (m_destroySurface && surface)
+ m_destroySurface(m_vkInst, surface, nullptr);
+}
+
static VKAPI_ATTR VkBool32 VKAPI_CALL defaultDebugCallbackFunc(VkDebugReportFlagsEXT flags,
VkDebugReportObjectTypeEXT objectType,
uint64_t object,
diff --git a/src/platformsupport/vkconvenience/qbasicvulkanplatforminstance_p.h b/src/platformsupport/vkconvenience/qbasicvulkanplatforminstance_p.h
index 748b138f01..566140b032 100644
--- a/src/platformsupport/vkconvenience/qbasicvulkanplatforminstance_p.h
+++ b/src/platformsupport/vkconvenience/qbasicvulkanplatforminstance_p.h
@@ -51,6 +51,7 @@
// We mean it.
//
+#include <QtCore/QLibrary>
#include <qpa/qplatformvulkaninstance.h>
QT_BEGIN_NAMESPACE
@@ -72,18 +73,23 @@ public:
QByteArrayList enabledExtensions() const override;
PFN_vkVoidFunction getInstanceProcAddr(const char *name) override;
bool supportsPresent(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, QWindow *window) override;
+ void destroySurface(VkSurfaceKHR surface) const;
protected:
+ void loadVulkanLibrary(const QString &defaultLibraryName);
void init(QLibrary *lib);
void initInstance(QVulkanInstance *instance, const QByteArrayList &extraExts);
VkInstance m_vkInst;
PFN_vkGetInstanceProcAddr m_vkGetInstanceProcAddr;
PFN_vkGetPhysicalDeviceSurfaceSupportKHR m_getPhysDevSurfaceSupport;
+ PFN_vkDestroySurfaceKHR m_destroySurface;
private:
void setupDebugOutput();
+ QLibrary m_vulkanLib;
+
bool m_ownsVkInst;
VkResult m_errorCode;
QVulkanInfoVector<QVulkanLayer> m_supportedLayers;
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
index 341d3bccf2..c3dd49ff3e 100644
--- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
@@ -62,33 +62,29 @@ extern "C" { // Otherwise it won't find CWKeychain* symbols at link time
#include <ifaddrs.h>
@interface QT_MANGLE_NAMESPACE(QNSListener) : NSObject <CWEventDelegate>
-{
- NSNotificationCenter *notificationCenter;
- CWWiFiClient *client;
- QCoreWlanEngine *engine;
- NSLock *locker;
-}
-- (void)powerStateDidChangeForWiFiInterfaceWithName:(NSString *)interfaceName;
-- (void)remove;
-- (void)setEngine:(QCoreWlanEngine *)coreEngine;
-- (QCoreWlanEngine *)engine;
-- (void)dealloc;
@property (assign) QCoreWlanEngine* engine;
@end
-@implementation QT_MANGLE_NAMESPACE(QNSListener)
+@implementation QT_MANGLE_NAMESPACE(QNSListener) {
+ NSNotificationCenter *notificationCenter;
+ CWWiFiClient *client;
+ QCoreWlanEngine *engine;
+ NSLock *locker;
+}
-- (id) init
+- (instancetype)init
{
- [locker lock];
- QMacAutoReleasePool pool;
- notificationCenter = [NSNotificationCenter defaultCenter];
- client = [CWWiFiClient sharedWiFiClient];
- client.delegate = self;
- [client startMonitoringEventWithType:CWEventTypePowerDidChange error:nil];
- [locker unlock];
+ if ((self = [super init])) {
+ [locker lock];
+ QMacAutoReleasePool pool;
+ notificationCenter = [NSNotificationCenter defaultCenter];
+ client = [CWWiFiClient sharedWiFiClient];
+ client.delegate = self;
+ [client startMonitoringEventWithType:CWEventTypePowerDidChange error:nil];
+ [locker unlock];
+ }
return self;
}
@@ -300,7 +296,7 @@ void QScanThread::getUserConfigurations()
if(airportPlist != nil) {
NSDictionary *prefNetDict = [airportPlist objectForKey:@"PreferredNetworks"];
- NSArray *thisSsidarray = [prefNetDict valueForKey:@"SSID_STR"];
+ NSArray<NSString *> *thisSsidarray = [prefNetDict valueForKey:@"SSID_STR"];
for (NSString *ssidkey in thisSsidarray) {
QString thisSsid = QString::fromNSString(ssidkey);
if(!userProfiles.contains(thisSsid)) {
diff --git a/src/plugins/imageformats/jpeg/qjpeghandler.cpp b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
index 1cdc28c077..e52a19703c 100644
--- a/src/plugins/imageformats/jpeg/qjpeghandler.cpp
+++ b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
@@ -493,10 +493,10 @@ static inline void set_text(const QImage &image, j_compress_ptr cinfo, const QSt
{
const QMap<QString, QString> text = qt_getImageText(image, description);
for (auto it = text.begin(), end = text.end(); it != end; ++it) {
- QByteArray comment = it.key().toLatin1();
+ QByteArray comment = it.key().toUtf8();
if (!comment.isEmpty())
comment += ": ";
- comment += it.value().toLatin1();
+ comment += it.value().toUtf8();
if (comment.length() > 65530)
comment.truncate(65530);
jpeg_write_marker(cinfo, JPEG_COM, (const JOCTET *)comment.constData(), comment.size());
@@ -904,7 +904,7 @@ bool QJpegHandlerPrivate::readJpegHeader(QIODevice *device)
for (jpeg_saved_marker_ptr marker = info.marker_list; marker != NULL; marker = marker->next) {
if (marker->marker == JPEG_COM) {
QString key, value;
- QString s = QString::fromLatin1((const char *)marker->data, marker->data_length);
+ QString s = QString::fromUtf8((const char *)marker->data, marker->data_length);
int index = s.indexOf(QLatin1String(": "));
if (index == -1 || s.indexOf(QLatin1Char(' ')) < index) {
key = QLatin1String("Description");
diff --git a/src/plugins/platforms/android/androidjniinput.cpp b/src/plugins/platforms/android/androidjniinput.cpp
index dabab553c2..9cdc5de0e1 100644
--- a/src/plugins/platforms/android/androidjniinput.cpp
+++ b/src/plugins/platforms/android/androidjniinput.cpp
@@ -58,7 +58,6 @@ using namespace QtAndroid;
namespace QtAndroidInput
{
-
static bool m_ignoreMouseEvents = false;
static bool m_softwareKeyboardVisible = false;
static QRect m_softwareKeyboardRect;
@@ -124,11 +123,12 @@ namespace QtAndroidInput
return m_softwareKeyboardRect;
}
- void updateHandles(int mode, QPoint cursor, QPoint anchor, bool rtl)
+ void updateHandles(int mode, QPoint editMenuPos, uint32_t editButtons, QPoint cursor, QPoint anchor, bool rtl)
{
- QJNIObjectPrivate::callStaticMethod<void>(applicationClass(), "updateHandles", "(IIIIIZ)V",
- mode, cursor.x(), cursor.y(), anchor.x(),
- anchor.y(), rtl);
+ QJNIObjectPrivate::callStaticMethod<void>(applicationClass(), "updateHandles", "(IIIIIIIIZ)V",
+ mode, editMenuPos.x(), editMenuPos.y(), editButtons,
+ cursor.x(), cursor.y(),
+ anchor.x(), anchor.y(), rtl);
}
static void mouseDown(JNIEnv */*env*/, jobject /*thiz*/, jint /*winId*/, jint x, jint y)
@@ -173,7 +173,7 @@ namespace QtAndroidInput
QWindowSystemInterface::handleMouseEvent(tlw,
localPos,
globalPos,
- Qt::MouseButtons(Qt::LeftButton));
+ Qt::MouseButtons(m_mouseGrabber ? Qt::LeftButton : Qt::NoButton));
}
static void mouseWheel(JNIEnv */*env*/, jobject /*thiz*/, jint /*winId*/, jint x, jint y, jfloat hdelta, jfloat vdelta)
@@ -195,6 +195,20 @@ namespace QtAndroidInput
angleDelta);
}
+ void releaseMouse(int x, int y)
+ {
+ m_ignoreMouseEvents = true;
+ QPoint globalPos(x,y);
+ QWindow *tlw = topLevelWindowAt(globalPos);
+ QPoint localPos = tlw ? (globalPos-tlw->position()) : globalPos;
+
+ // Release left button
+ QWindowSystemInterface::handleMouseEvent(tlw,
+ localPos,
+ globalPos,
+ Qt::MouseButtons(Qt::NoButton));
+ }
+
static void longPress(JNIEnv */*env*/, jobject /*thiz*/, jint /*winId*/, jint x, jint y)
{
QAndroidInputContext *inputContext = QAndroidInputContext::androidInputContext();
@@ -805,8 +819,10 @@ namespace QtAndroidInput
QAndroidInputContext *inputContext = QAndroidInputContext::androidInputContext();
if (inputContext && qGuiApp) {
inputContext->emitInputPanelVisibleChanged();
- if (!visibility)
+ if (!visibility) {
inputContext->emitKeyboardRectChanged();
+ QMetaObject::invokeMethod(inputContext, "hideSelectionHandles", Qt::QueuedConnection);
+ }
}
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug() << "@@@ KEYBOARDVISIBILITYCHANGED" << inputContext;
diff --git a/src/plugins/platforms/android/androidjniinput.h b/src/plugins/platforms/android/androidjniinput.h
index c09b426f49..2e2470ae8f 100644
--- a/src/plugins/platforms/android/androidjniinput.h
+++ b/src/plugins/platforms/android/androidjniinput.h
@@ -58,9 +58,11 @@ namespace QtAndroidInput
// Software keyboard support
// cursor/selection handles
- void updateHandles(int handleCount, QPoint cursor = QPoint(), QPoint anchor = QPoint(), bool rtl = false);
+ void updateHandles(int handleCount, QPoint editMenuPos = QPoint(), uint32_t editButtons = 0, QPoint cursor = QPoint(), QPoint anchor = QPoint(), bool rtl = false);
bool registerNatives(JNIEnv *env);
+
+ void releaseMouse(int x, int y);
}
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/android/qandroidinputcontext.cpp b/src/plugins/platforms/android/qandroidinputcontext.cpp
index f548a1fa96..ea3e9c1441 100644
--- a/src/plugins/platforms/android/qandroidinputcontext.cpp
+++ b/src/plugins/platforms/android/qandroidinputcontext.cpp
@@ -63,6 +63,29 @@
QT_BEGIN_NAMESPACE
+template <typename T>
+class ScopedValueChangeBack
+{
+public:
+ ScopedValueChangeBack(T &variable, T newValue)
+ : m_oldValue(variable),
+ m_variable(variable)
+ {
+ m_variable = newValue;
+ }
+ inline void setOldValue()
+ {
+ m_variable = m_oldValue;
+ }
+ ~ScopedValueChangeBack()
+ {
+ setOldValue();
+ }
+private:
+ T m_oldValue;
+ T &m_variable;
+};
+
static QAndroidInputContext *m_androidInputContext = 0;
static char const *const QtNativeInputConnectionClassName = "org/qtproject/qt5/android/QtNativeInputConnection";
static char const *const QtExtractedTextClassName = "org/qtproject/qt5/android/QtExtractedText";
@@ -75,6 +98,11 @@ static jfieldID m_selectionStartFieldID = 0;
static jfieldID m_startOffsetFieldID = 0;
static jfieldID m_textFieldID = 0;
+static void runOnQtThread(const std::function<void()> &func)
+{
+ QMetaObject::invokeMethod(m_androidInputContext, "safeCall", Qt::BlockingQueuedConnection, Q_ARG(std::function<void()>, func));
+}
+
static jboolean beginBatchEdit(JNIEnv */*env*/, jobject /*thiz*/)
{
if (!m_androidInputContext)
@@ -83,10 +111,9 @@ static jboolean beginBatchEdit(JNIEnv */*env*/, jobject /*thiz*/)
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug("@@@ BEGINBATCH");
#endif
-
- return m_androidInputContext->beginBatchEdit();
-
- return JNI_TRUE;
+ jboolean res;
+ runOnQtThread([&res]{res = m_androidInputContext->beginBatchEdit();});
+ return res;
}
static jboolean endBatchEdit(JNIEnv */*env*/, jobject /*thiz*/)
@@ -98,9 +125,9 @@ static jboolean endBatchEdit(JNIEnv */*env*/, jobject /*thiz*/)
qDebug("@@@ ENDBATCH");
#endif
- return m_androidInputContext->endBatchEdit();
-
- return JNI_TRUE;
+ jboolean res;
+ runOnQtThread([&res]{res = m_androidInputContext->endBatchEdit();});
+ return res;
}
@@ -117,7 +144,9 @@ static jboolean commitText(JNIEnv *env, jobject /*thiz*/, jstring text, jint new
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug() << "@@@ COMMIT" << str << newCursorPosition;
#endif
- return m_androidInputContext->commitText(str, newCursorPosition);
+ jboolean res;
+ runOnQtThread([&]{res = m_androidInputContext->commitText(str, newCursorPosition);});
+ return res;
}
static jboolean deleteSurroundingText(JNIEnv */*env*/, jobject /*thiz*/, jint leftLength, jint rightLength)
@@ -128,7 +157,9 @@ static jboolean deleteSurroundingText(JNIEnv */*env*/, jobject /*thiz*/, jint le
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug() << "@@@ DELETE" << leftLength << rightLength;
#endif
- return m_androidInputContext->deleteSurroundingText(leftLength, rightLength);
+ jboolean res;
+ runOnQtThread([&]{res = m_androidInputContext->deleteSurroundingText(leftLength, rightLength);});
+ return res;
}
static jboolean finishComposingText(JNIEnv */*env*/, jobject /*thiz*/)
@@ -139,7 +170,9 @@ static jboolean finishComposingText(JNIEnv */*env*/, jobject /*thiz*/)
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug("@@@ FINISH");
#endif
- return m_androidInputContext->finishComposingText();
+ jboolean res;
+ runOnQtThread([&]{res = m_androidInputContext->finishComposingText();});
+ return res;
}
static jint getCursorCapsMode(JNIEnv */*env*/, jobject /*thiz*/, jint reqModes)
@@ -147,7 +180,9 @@ static jint getCursorCapsMode(JNIEnv */*env*/, jobject /*thiz*/, jint reqModes)
if (!m_androidInputContext)
return 0;
- return m_androidInputContext->getCursorCapsMode(reqModes);
+ jboolean res;
+ runOnQtThread([&]{res = m_androidInputContext->getCursorCapsMode(reqModes);});
+ return res;
}
static jobject getExtractedText(JNIEnv *env, jobject /*thiz*/, int hintMaxChars, int hintMaxLines, jint flags)
@@ -155,8 +190,8 @@ static jobject getExtractedText(JNIEnv *env, jobject /*thiz*/, int hintMaxChars,
if (!m_androidInputContext)
return 0;
- const QAndroidInputContext::ExtractedText &extractedText =
- m_androidInputContext->getExtractedText(hintMaxChars, hintMaxLines, flags);
+ QAndroidInputContext::ExtractedText extractedText;
+ runOnQtThread([&]{extractedText = m_androidInputContext->getExtractedText(hintMaxChars, hintMaxLines, flags);});
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug() << "@@@ GETEX" << hintMaxChars << hintMaxLines << QString::fromLatin1("0x") + QString::number(flags,16) << extractedText.text << "partOff:" << extractedText.partialStartOffset << extractedText.partialEndOffset << "sel:" << extractedText.selectionStart << extractedText.selectionEnd << "offset:" << extractedText.startOffset;
@@ -181,7 +216,8 @@ static jstring getSelectedText(JNIEnv *env, jobject /*thiz*/, jint flags)
if (!m_androidInputContext)
return 0;
- const QString &text = m_androidInputContext->getSelectedText(flags);
+ QString text;
+ runOnQtThread([&]{text = m_androidInputContext->getSelectedText(flags);});
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug() << "@@@ GETSEL" << text;
#endif
@@ -195,7 +231,8 @@ static jstring getTextAfterCursor(JNIEnv *env, jobject /*thiz*/, jint length, ji
if (!m_androidInputContext)
return 0;
- const QString &text = m_androidInputContext->getTextAfterCursor(length, flags);
+ QString text;
+ runOnQtThread([&]{text = m_androidInputContext->getTextAfterCursor(length, flags);});
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug() << "@@@ GETA" << length << text;
#endif
@@ -207,7 +244,8 @@ static jstring getTextBeforeCursor(JNIEnv *env, jobject /*thiz*/, jint length, j
if (!m_androidInputContext)
return 0;
- const QString &text = m_androidInputContext->getTextBeforeCursor(length, flags);
+ QString text;
+ runOnQtThread([&]{text = m_androidInputContext->getTextBeforeCursor(length, flags);});
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug() << "@@@ GETB" << length << text;
#endif
@@ -227,7 +265,9 @@ static jboolean setComposingText(JNIEnv *env, jobject /*thiz*/, jstring text, ji
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug() << "@@@ SET" << str << newCursorPosition;
#endif
- return m_androidInputContext->setComposingText(str, newCursorPosition);
+ jboolean res;
+ runOnQtThread([&]{res = m_androidInputContext->setComposingText(str, newCursorPosition);});
+ return res;
}
static jboolean setComposingRegion(JNIEnv */*env*/, jobject /*thiz*/, jint start, jint end)
@@ -238,7 +278,9 @@ static jboolean setComposingRegion(JNIEnv */*env*/, jobject /*thiz*/, jint start
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug() << "@@@ SETR" << start << end;
#endif
- return m_androidInputContext->setComposingRegion(start, end);
+ jboolean res;
+ runOnQtThread([&]{res = m_androidInputContext->setComposingRegion(start, end);});
+ return res;
}
@@ -250,7 +292,10 @@ static jboolean setSelection(JNIEnv */*env*/, jobject /*thiz*/, jint start, jint
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug() << "@@@ SETSEL" << start << end;
#endif
- return m_androidInputContext->setSelection(start, end);
+ jboolean res;
+ runOnQtThread([&]{res = m_androidInputContext->setSelection(start, end);});
+ return res;
+
}
static jboolean selectAll(JNIEnv */*env*/, jobject /*thiz*/)
@@ -261,7 +306,9 @@ static jboolean selectAll(JNIEnv */*env*/, jobject /*thiz*/)
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug("@@@ SELALL");
#endif
- return m_androidInputContext->selectAll();
+ jboolean res;
+ runOnQtThread([&]{res = m_androidInputContext->selectAll();});
+ return res;
}
static jboolean cut(JNIEnv */*env*/, jobject /*thiz*/)
@@ -272,7 +319,9 @@ static jboolean cut(JNIEnv */*env*/, jobject /*thiz*/)
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug("@@@");
#endif
- return m_androidInputContext->cut();
+ jboolean res;
+ runOnQtThread([&]{res = m_androidInputContext->cut();});
+ return res;
}
static jboolean copy(JNIEnv */*env*/, jobject /*thiz*/)
@@ -283,7 +332,9 @@ static jboolean copy(JNIEnv */*env*/, jobject /*thiz*/)
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug("@@@");
#endif
- return m_androidInputContext->copy();
+ jboolean res;
+ runOnQtThread([&]{res = m_androidInputContext->copy();});
+ return res;
}
static jboolean copyURL(JNIEnv */*env*/, jobject /*thiz*/)
@@ -294,7 +345,9 @@ static jboolean copyURL(JNIEnv */*env*/, jobject /*thiz*/)
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug("@@@");
#endif
- return m_androidInputContext->copyURL();
+ jboolean res;
+ runOnQtThread([&]{res = m_androidInputContext->copyURL();});
+ return res;
}
static jboolean paste(JNIEnv */*env*/, jobject /*thiz*/)
@@ -305,7 +358,9 @@ static jboolean paste(JNIEnv */*env*/, jobject /*thiz*/)
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug("@@@ PASTE");
#endif
- return m_androidInputContext->paste();
+ jboolean res;
+ runOnQtThread([&]{res = m_androidInputContext->paste();});
+ return res;
}
static jboolean updateCursorPosition(JNIEnv */*env*/, jobject /*thiz*/)
@@ -316,7 +371,8 @@ static jboolean updateCursorPosition(JNIEnv */*env*/, jobject /*thiz*/)
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug("@@@ UPDATECURSORPOS");
#endif
- m_androidInputContext->updateCursorPosition();
+
+ runOnQtThread([&]{m_androidInputContext->updateCursorPosition();});
return true;
}
@@ -364,7 +420,7 @@ static QRect inputItemRectangle()
QAndroidInputContext::QAndroidInputContext()
: QPlatformInputContext(), m_composingTextStart(-1), m_blockUpdateSelection(false),
- m_cursorHandleShown(CursorHandleNotShown), m_batchEditNestingLevel(0), m_focusObject(0)
+ m_handleMode(Hidden), m_batchEditNestingLevel(0), m_focusObject(0)
{
jclass clazz = QJNIEnvironmentPrivate::findClass(QtNativeInputConnectionClassName);
if (Q_UNLIKELY(!clazz)) {
@@ -444,10 +500,17 @@ QAndroidInputContext::QAndroidInputContext()
auto im = qGuiApp->inputMethod();
if (!im->inputItemClipRectangle().contains(im->anchorRectangle()) ||
!im->inputItemClipRectangle().contains(im->cursorRectangle())) {
- m_cursorHandleShown = CursorHandleNotShown;
+ m_handleMode = Hidden;
updateSelectionHandles();
}
});
+ m_hideCursorHandleTimer.setInterval(4000);
+ m_hideCursorHandleTimer.setSingleShot(true);
+ m_hideCursorHandleTimer.setTimerType(Qt::VeryCoarseTimer);
+ connect(&m_hideCursorHandleTimer, &QTimer::timeout, this, [this]{
+ m_handleMode = Hidden;
+ updateSelectionHandles();
+ });
}
QAndroidInputContext::~QAndroidInputContext()
@@ -485,9 +548,9 @@ void QAndroidInputContext::reset()
{
clear();
m_batchEditNestingLevel = 0;
- m_cursorHandleShown = QAndroidInputContext::CursorHandleNotShown;
+ m_handleMode = Hidden;
if (qGuiApp->focusObject()) {
- QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQueryThreadSafe(Qt::ImEnabled);
+ QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQuery(Qt::ImEnabled);
if (!query.isNull() && query->value(Qt::ImEnabled).toBool()) {
QtAndroidInput::resetSoftwareKeyboard();
return;
@@ -503,7 +566,7 @@ void QAndroidInputContext::commit()
void QAndroidInputContext::updateCursorPosition()
{
- QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQueryThreadSafe();
+ QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQuery();
if (!query.isNull() && !m_blockUpdateSelection && !m_batchEditNestingLevel) {
const int cursorPos = getAbsoluteCursorPosition(query);
const int composeLength = m_composingText.length();
@@ -541,9 +604,9 @@ void QAndroidInputContext::updateSelectionHandles()
return;
auto im = qGuiApp->inputMethod();
- if (!m_focusObject || (m_cursorHandleShown == CursorHandleNotShown)) {
+ if (!m_focusObject || ((m_handleMode & 0xff) == Hidden)) {
// Hide the handles
- QtAndroidInput::updateHandles(0);
+ QtAndroidInput::updateHandles(Hidden);
return;
}
QWindow *window = qGuiApp->focusWindow();
@@ -551,25 +614,34 @@ void QAndroidInputContext::updateSelectionHandles()
? QHighDpiScaling::factor(window)
: QHighDpiScaling::factor(QtAndroid::androidPlatformIntegration()->screen());
- QInputMethodQueryEvent query(Qt::ImCursorPosition | Qt::ImAnchorPosition | Qt::ImEnabled | Qt::ImCurrentSelection);
+ QInputMethodQueryEvent query(Qt::ImCursorPosition | Qt::ImAnchorPosition | Qt::ImEnabled | Qt::ImCurrentSelection | Qt::ImHints | Qt::ImSurroundingText);
QCoreApplication::sendEvent(m_focusObject, &query);
+
int cpos = query.value(Qt::ImCursorPosition).toInt();
int anchor = query.value(Qt::ImAnchorPosition).toInt();
if (cpos == anchor || im->anchorRectangle().isNull()) {
if (!query.value(Qt::ImEnabled).toBool()) {
- QtAndroidInput::updateHandles(0);
+ QtAndroidInput::updateHandles(Hidden);
return;
}
auto curRect = im->cursorRectangle();
QPoint cursorPoint(curRect.center().x(), curRect.bottom());
- QPoint editMenuPoint(curRect.center().x(), curRect.top());
- QtAndroidInput::updateHandles(m_cursorHandleShown, cursorPoint * pixelDensity,
- editMenuPoint * pixelDensity);
+ QPoint editMenuPoint(curRect.x(), curRect.y());
+ m_handleMode &= ShowEditPopup;
+ m_handleMode |= ShowCursor;
+ uint32_t buttons = EditContext::PasteButton;
+ if (!query.value(Qt::ImSurroundingText).toString().isEmpty())
+ buttons |= EditContext::SelectAllButton;
+ QtAndroidInput::updateHandles(m_handleMode, editMenuPoint * pixelDensity, buttons, cursorPoint * pixelDensity);
+ // The VK is hidden, reset the timer
+ if (m_hideCursorHandleTimer.isActive())
+ m_hideCursorHandleTimer.start();
return;
}
+ m_handleMode = ShowSelection | ShowEditPopup ;
auto leftRect = im->cursorRectangle();
auto rightRect = im->anchorRectangle();
if (cpos > anchor)
@@ -577,13 +649,10 @@ void QAndroidInputContext::updateSelectionHandles()
QPoint leftPoint(leftRect.bottomLeft().toPoint() * pixelDensity);
QPoint righPoint(rightRect.bottomRight().toPoint() * pixelDensity);
- QtAndroidInput::updateHandles(CursorHandleShowSelection, leftPoint, righPoint,
+ QPoint editPoint(leftRect.united(rightRect).topLeft().toPoint() * pixelDensity);
+ QtAndroidInput::updateHandles(m_handleMode, editPoint, EditContext::AllButtons, leftPoint, righPoint,
query.value(Qt::ImCurrentSelection).toString().isRightToLeft());
-
- if (m_cursorHandleShown == CursorHandleShowPopup) {
- // make sure the popup does not reappear when the selection menu closes
- m_cursorHandleShown = QAndroidInputContext::CursorHandleNotShown;
- }
+ m_hideCursorHandleTimer.stop();
}
/*
@@ -593,8 +662,10 @@ void QAndroidInputContext::updateSelectionHandles()
*/
void QAndroidInputContext::handleLocationChanged(int handleId, int x, int y)
{
- if (m_batchEditNestingLevel.load() || m_blockUpdateSelection)
+ if (m_batchEditNestingLevel.load() || m_blockUpdateSelection) {
+ qWarning() << "QAndroidInputContext::handleLocationChanged returned";
return;
+ }
finishComposingText();
@@ -668,34 +739,86 @@ void QAndroidInputContext::handleLocationChanged(int handleId, int x, int y)
void QAndroidInputContext::touchDown(int x, int y)
{
- if (m_focusObject && inputItemRectangle().contains(x, y) && !m_cursorHandleShown) {
+ if (m_focusObject && inputItemRectangle().contains(x, y)) {
// If the user touch the input rectangle, we can show the cursor handle
- m_cursorHandleShown = QAndroidInputContext::CursorHandleShowNormal;
+ m_handleMode = ShowCursor;
+ // The VK will appear in a moment, stop the timer
+ m_hideCursorHandleTimer.stop();
+ finishComposingText();
updateSelectionHandles();
}
}
void QAndroidInputContext::longPress(int x, int y)
{
+ static bool noHandles = qEnvironmentVariableIntValue("QT_QPA_NO_TEXT_HANDLES");
+ if (noHandles)
+ return;
+
if (m_focusObject && inputItemRectangle().contains(x, y)) {
- // Show the paste menu if there is something to paste.
- m_cursorHandleShown = QAndroidInputContext::CursorHandleShowPopup;
+ finishComposingText();
+
+ // Release left button, otherwise the following events will cancel the menu popup
+ QtAndroidInput::releaseMouse(x, y);
+
+ handleLocationChanged(1, x, y);
+ ScopedValueChangeBack<bool> svcb(m_blockUpdateSelection, true);
+
+ QInputMethodQueryEvent query(Qt::ImCursorPosition | Qt::ImAnchorPosition | Qt::ImTextBeforeCursor | Qt::ImTextAfterCursor);
+ QCoreApplication::sendEvent(m_focusObject, &query);
+ int cursor = query.value(Qt::ImCursorPosition).toInt();
+ int anchor = cursor;
+ QString before = query.value(Qt::ImTextBeforeCursor).toString();
+ QString after = query.value(Qt::ImTextAfterCursor).toString();
+ for (const auto &ch : after) {
+ if (!ch.isLetterOrNumber())
+ break;
+ ++anchor;
+ }
+
+ for (auto itch = before.rbegin(); itch != after.rend(); ++itch) {
+ if (!itch->isLetterOrNumber())
+ break;
+ --cursor;
+ }
+ if (cursor == anchor || cursor < 0 || cursor - anchor > 500) {
+ m_handleMode = ShowCursor | ShowEditPopup;
+ updateSelectionHandles();
+ return;
+ }
+ QList<QInputMethodEvent::Attribute> imAttributes;
+ imAttributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, cursor, 0, QVariant()));
+ imAttributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Selection, anchor, cursor - anchor, QVariant()));
+ QInputMethodEvent event(QString(), imAttributes);
+ QGuiApplication::sendEvent(m_focusObject, &event);
+
+ m_handleMode = ShowSelection | ShowEditPopup;
updateSelectionHandles();
}
}
void QAndroidInputContext::keyDown()
{
- if (m_cursorHandleShown) {
+ if (m_handleMode) {
// When the user enter text on the keyboard, we hide the cursor handle
- m_cursorHandleShown = QAndroidInputContext::CursorHandleNotShown;
+ m_handleMode = Hidden;
+ updateSelectionHandles();
+ }
+}
+
+void QAndroidInputContext::hideSelectionHandles()
+{
+ if (m_handleMode & ShowSelection) {
+ m_handleMode = Hidden;
updateSelectionHandles();
+ } else {
+ m_hideCursorHandleTimer.start();
}
}
void QAndroidInputContext::update(Qt::InputMethodQueries queries)
{
- QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQueryThreadSafe(queries);
+ QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQuery(queries);
if (query.isNull())
return;
#warning TODO extract the needed data from query
@@ -727,7 +850,7 @@ void QAndroidInputContext::showInputPanel()
connect(qGuiApp, SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SLOT(showInputPanelLater(Qt::ApplicationState)));
return;
}
- QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQueryThreadSafe();
+ QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQuery();
if (query.isNull())
return;
@@ -751,6 +874,14 @@ void QAndroidInputContext::showInputPanelLater(Qt::ApplicationState state)
showInputPanel();
}
+void QAndroidInputContext::safeCall(const std::function<void()> &func, Qt::ConnectionType conType)
+{
+ if (qGuiApp->thread() == QThread::currentThread())
+ func();
+ else
+ QMetaObject::invokeMethod(this, "safeCall", conType, Q_ARG(std::function<void()>, func));
+}
+
void QAndroidInputContext::hideInputPanel()
{
QtAndroidInput::hideSoftwareKeyboard();
@@ -809,17 +940,15 @@ jboolean QAndroidInputContext::endBatchEdit()
*/
jboolean QAndroidInputContext::commitText(const QString &text, jint newCursorPosition)
{
- bool updateSelectionWasBlocked = m_blockUpdateSelection;
- m_blockUpdateSelection = true;
-
+ ScopedValueChangeBack<bool> svcb(m_blockUpdateSelection, true);
QInputMethodEvent event;
event.setCommitString(text);
- sendInputMethodEventThreadSafe(&event);
+ sendInputMethodEvent(&event);
clear();
// Qt has now put the cursor at the end of the text, corresponding to newCursorPosition == 1
if (newCursorPosition != 1) {
- QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQueryThreadSafe();
+ QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQuery();
if (!query.isNull()) {
QList<QInputMethodEvent::Attribute> attributes;
const int localPos = query->value(Qt::ImCursorPosition).toInt();
@@ -831,15 +960,14 @@ jboolean QAndroidInputContext::commitText(const QString &text, jint newCursorPos
newLocalPos, 0));
}
}
- m_blockUpdateSelection = updateSelectionWasBlocked;
-
+ svcb.setOldValue();
updateCursorPosition();
return JNI_TRUE;
}
jboolean QAndroidInputContext::deleteSurroundingText(jint leftLength, jint rightLength)
{
- QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQueryThreadSafe();
+ QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQuery();
if (query.isNull())
return JNI_TRUE;
@@ -853,7 +981,7 @@ jboolean QAndroidInputContext::deleteSurroundingText(jint leftLength, jint right
QInputMethodEvent event;
event.setCommitString(QString(), -leftLength, leftLength+rightLength);
- sendInputMethodEventThreadSafe(&event);
+ sendInputMethodEvent(&event);
clear();
return JNI_TRUE;
@@ -865,7 +993,7 @@ jboolean QAndroidInputContext::finishComposingText()
if (m_composingText.isEmpty())
return JNI_TRUE; // not composing
- QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQueryThreadSafe();
+ QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQuery();
if (query.isNull())
return JNI_FALSE;
@@ -878,7 +1006,7 @@ jboolean QAndroidInputContext::finishComposingText()
QInputMethodEvent event(QString(), attributes);
event.setCommitString(m_composingText);
- sendInputMethodEventThreadSafe(&event);
+ sendInputMethodEvent(&event);
clear();
return JNI_TRUE;
@@ -887,7 +1015,7 @@ jboolean QAndroidInputContext::finishComposingText()
jint QAndroidInputContext::getCursorCapsMode(jint /*reqModes*/)
{
jint res = 0;
- QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQueryThreadSafe();
+ QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQuery();
if (query.isNull())
return res;
@@ -910,7 +1038,7 @@ const QAndroidInputContext::ExtractedText &QAndroidInputContext::getExtractedTex
// updateExtractedText(View, int, ExtractedText) whenever you call
// updateSelection(View, int, int, int, int)." QTBUG-37980
- QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQueryThreadSafe();
+ QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQuery();
if (query.isNull())
return m_extractedText;
@@ -955,7 +1083,7 @@ const QAndroidInputContext::ExtractedText &QAndroidInputContext::getExtractedTex
QString QAndroidInputContext::getSelectedText(jint /*flags*/)
{
- QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQueryThreadSafe();
+ QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQuery();
if (query.isNull())
return QString();
@@ -965,13 +1093,13 @@ QString QAndroidInputContext::getSelectedText(jint /*flags*/)
QString QAndroidInputContext::getTextAfterCursor(jint length, jint /*flags*/)
{
//### the preedit text could theoretically be after the cursor
- QVariant textAfter = queryFocusObjectThreadSafe(Qt::ImTextAfterCursor, QVariant(length));
+ QVariant textAfter = QInputMethod::queryFocusObject(Qt::ImTextAfterCursor, QVariant(length));
if (textAfter.isValid()) {
return textAfter.toString().left(length);
}
//compatibility code for old controls that do not implement the new API
- QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQueryThreadSafe();
+ QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQuery();
if (query.isNull())
return QString();
@@ -985,12 +1113,12 @@ QString QAndroidInputContext::getTextAfterCursor(jint length, jint /*flags*/)
QString QAndroidInputContext::getTextBeforeCursor(jint length, jint /*flags*/)
{
- QVariant textBefore = queryFocusObjectThreadSafe(Qt::ImTextBeforeCursor, QVariant(length));
+ QVariant textBefore = QInputMethod::queryFocusObject(Qt::ImTextBeforeCursor, QVariant(length));
if (textBefore.isValid())
return textBefore.toString().rightRef(length) + m_composingText;
//compatibility code for old controls that do not implement the new API
- QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQueryThreadSafe();
+ QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQuery();
if (query.isNull())
return QString();
@@ -1016,7 +1144,7 @@ QString QAndroidInputContext::getTextBeforeCursor(jint length, jint /*flags*/)
jboolean QAndroidInputContext::setComposingText(const QString &text, jint newCursorPosition)
{
- QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQueryThreadSafe();
+ QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQuery();
if (query.isNull())
return JNI_FALSE;
@@ -1038,7 +1166,7 @@ jboolean QAndroidInputContext::setComposingText(const QString &text, jint newCur
QVariant(underlined)));
QInputMethodEvent event(m_composingText, attributes);
- sendInputMethodEventThreadSafe(&event);
+ sendInputMethodEvent(&event);
QMetaObject::invokeMethod(this, "keyDown");
@@ -1062,7 +1190,7 @@ jboolean QAndroidInputContext::setComposingRegion(jint start, jint end)
if (wasComposing)
finishComposingText();
- QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQueryThreadSafe();
+ QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQuery();
if (query.isNull())
return JNI_FALSE;
@@ -1083,8 +1211,7 @@ jboolean QAndroidInputContext::setComposingRegion(jint start, jint end)
int localStart = start - blockPosition; // Qt uses position inside block
int currentCursor = wasComposing ? m_composingCursor : blockPosition + localPos;
- bool updateSelectionWasBlocked = m_blockUpdateSelection;
- m_blockUpdateSelection = true;
+ ScopedValueChangeBack<bool> svcb(m_blockUpdateSelection, true);
QString text = query->value(Qt::ImSurroundingText).toString();
@@ -1108,12 +1235,10 @@ jboolean QAndroidInputContext::setComposingRegion(jint start, jint end)
QInputMethodEvent event(m_composingText, attributes);
event.setCommitString(QString(), relativeStart, length);
- sendInputMethodEventThreadSafe(&event);
-
- m_blockUpdateSelection = updateSelectionWasBlocked;
+ sendInputMethodEvent(&event);
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
- QSharedPointer<QInputMethodQueryEvent> query2 = focusObjectInputMethodQueryThreadSafe();
+ QSharedPointer<QInputMethodQueryEvent> query2 = focusObjectInputMethodQuery();
if (!query2.isNull()) {
qDebug() << "Setting. Prev local cpos:" << localPos << "block pos:" <<blockPosition << "comp.start:" << m_composingTextStart << "rel.start:" << relativeStart << "len:" << length << "cpos attr:" << localPos - localStart;
qDebug() << "New cursor pos" << getAbsoluteCursorPosition(query2);
@@ -1125,7 +1250,7 @@ jboolean QAndroidInputContext::setComposingRegion(jint start, jint end)
jboolean QAndroidInputContext::setSelection(jint start, jint end)
{
- QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQueryThreadSafe();
+ QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQuery();
if (query.isNull())
return JNI_FALSE;
@@ -1156,26 +1281,31 @@ jboolean QAndroidInputContext::setSelection(jint start, jint end)
end - start));
}
QInputMethodEvent event(m_composingText, attributes);
- sendInputMethodEventThreadSafe(&event);
+ sendInputMethodEvent(&event);
updateCursorPosition();
return JNI_TRUE;
}
jboolean QAndroidInputContext::selectAll()
{
+ finishComposingText();
+ m_handleMode = ShowCursor;
sendShortcut(QKeySequence::SelectAll);
return JNI_TRUE;
}
jboolean QAndroidInputContext::cut()
{
- m_cursorHandleShown = CursorHandleNotShown;
+ finishComposingText();
+ m_handleMode = ShowCursor;
sendShortcut(QKeySequence::Cut);
return JNI_TRUE;
}
jboolean QAndroidInputContext::copy()
{
+ finishComposingText();
+ m_handleMode = ShowCursor;
sendShortcut(QKeySequence::Copy);
return JNI_TRUE;
}
@@ -1189,7 +1319,7 @@ jboolean QAndroidInputContext::copyURL()
jboolean QAndroidInputContext::paste()
{
finishComposingText();
- m_cursorHandleShown = CursorHandleNotShown;
+ m_handleMode = ShowCursor;
sendShortcut(QKeySequence::Paste);
return JNI_TRUE;
}
@@ -1205,65 +1335,24 @@ void QAndroidInputContext::sendShortcut(const QKeySequence &sequence)
}
}
-Q_INVOKABLE QVariant QAndroidInputContext::queryFocusObjectUnsafe(Qt::InputMethodQuery query, QVariant argument)
-{
- return QInputMethod::queryFocusObject(query, argument);
-}
-
-QVariant QAndroidInputContext::queryFocusObjectThreadSafe(Qt::InputMethodQuery query, QVariant argument)
-{
- QVariant retval;
+QSharedPointer<QInputMethodQueryEvent> QAndroidInputContext::focusObjectInputMethodQuery(Qt::InputMethodQueries queries) {
if (!qGuiApp)
- return retval;
- const bool inMainThread = qGuiApp->thread() == QThread::currentThread();
- if (QAndroidEventDispatcherStopper::stopped() && !inMainThread)
- return retval;
- AndroidDeadlockProtector protector;
- if (!inMainThread && !protector.acquire())
- return retval;
-
- QMetaObject::invokeMethod(this, "queryFocusObjectUnsafe",
- inMainThread ? Qt::DirectConnection : Qt::BlockingQueuedConnection,
- Q_RETURN_ARG(QVariant, retval),
- Q_ARG(Qt::InputMethodQuery, query),
- Q_ARG(QVariant, argument));
+ return {};
- return retval;
-}
-
-QSharedPointer<QInputMethodQueryEvent> QAndroidInputContext::focusObjectInputMethodQueryThreadSafe(Qt::InputMethodQueries queries) {
- QSharedPointer<QInputMethodQueryEvent> retval;
- if (!qGuiApp)
- return QSharedPointer<QInputMethodQueryEvent>();
- const bool inMainThread = qGuiApp->thread() == QThread::currentThread();
- if (QAndroidEventDispatcherStopper::stopped() && !inMainThread)
- return QSharedPointer<QInputMethodQueryEvent>();
- AndroidDeadlockProtector protector;
- if (!inMainThread && !protector.acquire())
- return QSharedPointer<QInputMethodQueryEvent>();
-
- QInputMethodQueryEvent *queryEvent = 0;
- QMetaObject::invokeMethod(this, "focusObjectInputMethodQueryUnsafe",
- inMainThread ? Qt::DirectConnection : Qt::BlockingQueuedConnection,
- Q_RETURN_ARG(QInputMethodQueryEvent*, queryEvent),
- Q_ARG(Qt::InputMethodQueries, queries));
-
- return QSharedPointer<QInputMethodQueryEvent>(queryEvent);
-}
-
-QInputMethodQueryEvent *QAndroidInputContext::focusObjectInputMethodQueryUnsafe(Qt::InputMethodQueries queries)
-{
QObject *focusObject = qGuiApp->focusObject();
if (!focusObject)
- return 0;
+ return {};
QInputMethodQueryEvent *ret = new QInputMethodQueryEvent(queries);
QCoreApplication::sendEvent(focusObject, ret);
- return ret;
+ return QSharedPointer<QInputMethodQueryEvent>(ret);
}
-void QAndroidInputContext::sendInputMethodEventUnsafe(QInputMethodEvent *event)
+void QAndroidInputContext::sendInputMethodEvent(QInputMethodEvent *event)
{
+ if (!qGuiApp)
+ return;
+
QObject *focusObject = qGuiApp->focusObject();
if (!focusObject)
return;
@@ -1271,19 +1360,4 @@ void QAndroidInputContext::sendInputMethodEventUnsafe(QInputMethodEvent *event)
QCoreApplication::sendEvent(focusObject, event);
}
-void QAndroidInputContext::sendInputMethodEventThreadSafe(QInputMethodEvent *event)
-{
- if (!qGuiApp)
- return;
- const bool inMainThread = qGuiApp->thread() == QThread::currentThread();
- if (QAndroidEventDispatcherStopper::stopped() && !inMainThread)
- return;
- AndroidDeadlockProtector protector;
- if (!inMainThread && !protector.acquire())
- return;
- QMetaObject::invokeMethod(this, "sendInputMethodEventUnsafe",
- inMainThread ? Qt::DirectConnection : Qt::BlockingQueuedConnection,
- Q_ARG(QInputMethodEvent*, event));
-}
-
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/android/qandroidinputcontext.h b/src/plugins/platforms/android/qandroidinputcontext.h
index e7692bf720..bd3edb30f0 100644
--- a/src/plugins/platforms/android/qandroidinputcontext.h
+++ b/src/plugins/platforms/android/qandroidinputcontext.h
@@ -42,8 +42,10 @@
#define ANDROIDINPUTCONTEXT_H
#include <qpa/qplatforminputcontext.h>
+#include <functional>
#include <jni.h>
#include <qevent.h>
+#include <QTimer>
QT_BEGIN_NAMESPACE
@@ -58,6 +60,22 @@ class QAndroidInputContext: public QPlatformInputContext
};
public:
+ enum EditContext : uint32_t {
+ CutButton = 1 << 0,
+ CopyButton = 1 << 1,
+ PasteButton = 1 << 2,
+ SelectAllButton = 1 << 3,
+ AllButtons = CutButton | CopyButton | PasteButton | SelectAllButton
+ };
+
+ enum HandleMode {
+ Hidden = 0,
+ ShowCursor = 1,
+ ShowSelection = 2,
+ ShowEditPopup = 0x100
+ };
+ Q_DECLARE_FLAGS(HandleModes, HandleMode)
+
struct ExtractedText
{
ExtractedText() { clear(); }
@@ -118,25 +136,21 @@ public:
jboolean paste();
public slots:
+ void safeCall(const std::function<void()> &func, Qt::ConnectionType conType = Qt::BlockingQueuedConnection);
void updateCursorPosition();
void updateSelectionHandles();
void handleLocationChanged(int handleId, int x, int y);
void touchDown(int x, int y);
void longPress(int x, int y);
void keyDown();
+ void hideSelectionHandles();
private slots:
void showInputPanelLater(Qt::ApplicationState);
private:
- void sendInputMethodEventThreadSafe(QInputMethodEvent *event);
- Q_INVOKABLE void sendInputMethodEventUnsafe(QInputMethodEvent *event);
-
- QSharedPointer<QInputMethodQueryEvent> focusObjectInputMethodQueryThreadSafe(Qt::InputMethodQueries queries = Qt::ImQueryAll);
- Q_INVOKABLE QInputMethodQueryEvent *focusObjectInputMethodQueryUnsafe(Qt::InputMethodQueries queries);
-
- Q_INVOKABLE QVariant queryFocusObjectUnsafe(Qt::InputMethodQuery query, QVariant argument);
- QVariant queryFocusObjectThreadSafe(Qt::InputMethodQuery query, QVariant argument);
+ void sendInputMethodEvent(QInputMethodEvent *event);
+ QSharedPointer<QInputMethodQueryEvent> focusObjectInputMethodQuery(Qt::InputMethodQueries queries = Qt::ImQueryAll);
private:
ExtractedText m_extractedText;
@@ -145,17 +159,12 @@ private:
int m_composingCursor;
QMetaObject::Connection m_updateCursorPosConnection;
bool m_blockUpdateSelection;
- enum CursorHandleShowMode {
- CursorHandleNotShown,
- CursorHandleShowNormal = 1,
- CursorHandleShowSelection = 2,
- CursorHandleShowPopup = 3
- };
- CursorHandleShowMode m_cursorHandleShown;
+ HandleModes m_handleMode;
QAtomicInt m_batchEditNestingLevel;
QObject *m_focusObject;
+ QTimer m_hideCursorHandleTimer;
};
-
+Q_DECLARE_OPERATORS_FOR_FLAGS(QAndroidInputContext::HandleModes)
QT_END_NAMESPACE
#endif // ANDROIDINPUTCONTEXT_H
diff --git a/src/plugins/platforms/android/qandroidplatformmenubar.h b/src/plugins/platforms/android/qandroidplatformmenubar.h
index 0316ea9362..f5935b8177 100644
--- a/src/plugins/platforms/android/qandroidplatformmenubar.h
+++ b/src/plugins/platforms/android/qandroidplatformmenubar.h
@@ -61,7 +61,7 @@ public:
void handleReparent(QWindow *newParentWindow) override;
QPlatformMenu *menuForTag(quintptr tag) const override;
- QWindow *parentWindow() const;
+ QWindow *parentWindow() const override;
PlatformMenusType menus() const;
QMutex *menusListMutex();
diff --git a/src/plugins/platforms/cocoa/cocoa.pro b/src/plugins/platforms/cocoa/cocoa.pro
index 2694cb3607..8d65cf328f 100644
--- a/src/plugins/platforms/cocoa/cocoa.pro
+++ b/src/plugins/platforms/cocoa/cocoa.pro
@@ -8,7 +8,6 @@ SOURCES += main.mm \
qcocoawindow.mm \
qnsview.mm \
qnswindow.mm \
- qnsviewaccessibility.mm \
qnswindowdelegate.mm \
qcocoanativeinterface.mm \
qcocoaeventdispatcher.mm \
@@ -72,19 +71,25 @@ HEADERS += qcocoaintegration.h \
qtConfig(opengl.*) {
SOURCES += qcocoaglcontext.mm
-
HEADERS += qcocoaglcontext.h
}
+qtConfig(vulkan) {
+ SOURCES += qcocoavulkaninstance.mm
+ HEADERS += qcocoavulkaninstance.h
+}
+
RESOURCES += qcocoaresources.qrc
-LIBS += -framework AppKit -framework Carbon -framework IOKit -framework QuartzCore -lcups
+LIBS += -framework AppKit -framework CoreServices -framework Carbon -framework IOKit -framework QuartzCore -framework CoreVideo -framework Metal -lcups
QT += \
core-private gui-private \
accessibility_support-private clipboard_support-private theme_support-private \
fontdatabase_support-private graphics_support-private
+qtConfig(vulkan): QT += vulkan_support-private
+
CONFIG += no_app_extension_api_only
qtHaveModule(widgets) {
@@ -122,11 +127,6 @@ qtHaveModule(widgets) {
OTHER_FILES += cocoa.json
-# Acccessibility debug support
-# DEFINES += QT_COCOA_ENABLE_ACCESSIBILITY_INSPECTOR
-# include ($$PWD/../../../../util/accessibilityinspector/accessibilityinspector.pri)
-
-
PLUGIN_TYPE = platforms
PLUGIN_CLASS_NAME = QCocoaIntegrationPlugin
!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = -
diff --git a/src/plugins/platforms/cocoa/main.mm b/src/plugins/platforms/cocoa/main.mm
index f9bfdc7dc7..89ecdf46f9 100644
--- a/src/plugins/platforms/cocoa/main.mm
+++ b/src/plugins/platforms/cocoa/main.mm
@@ -60,7 +60,7 @@ QPlatformIntegration * QCocoaIntegrationPlugin::create(const QString& system, co
if (system.compare(QLatin1String("cocoa"), Qt::CaseInsensitive) == 0)
return new QCocoaIntegration(paramList);
- return 0;
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/cocoa/messages.cpp b/src/plugins/platforms/cocoa/messages.cpp
index 8eea1e654e..06e3dd454e 100644
--- a/src/plugins/platforms/cocoa/messages.cpp
+++ b/src/plugins/platforms/cocoa/messages.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
@@ -39,7 +39,8 @@
#include "messages.h"
-#include <QCoreApplication>
+#include <QtCore/qcoreapplication.h>
+#include <QtCore/qregularexpression.h>
// Translatable messages should go into this .cpp file for them to be picked up by lupdate.
@@ -52,13 +53,13 @@ QString msgAboutQt()
static const char *application_menu_strings[] =
{
+ QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","About %1"),
+ QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Preferences..."),
QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Services"),
QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Hide %1"),
QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Hide Others"),
QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Show All"),
- QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Preferences..."),
- QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Quit %1"),
- QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","About %1")
+ QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Quit %1")
};
QString qt_mac_applicationmenu_string(int type)
@@ -77,8 +78,13 @@ QPlatformMenuItem::MenuRole detectMenuRole(const QString &caption)
QString captionNoAmpersand(caption);
captionNoAmpersand.remove(QLatin1Char('&'));
const QString aboutString = QCoreApplication::translate("QCocoaMenuItem", "About");
- if (captionNoAmpersand.startsWith(aboutString, Qt::CaseInsensitive) || caption.endsWith(aboutString, Qt::CaseInsensitive))
+ if (captionNoAmpersand.startsWith(aboutString, Qt::CaseInsensitive)
+ || captionNoAmpersand.endsWith(aboutString, Qt::CaseInsensitive)) {
+ static const QRegularExpression qtRegExp(QLatin1String("qt$"), QRegularExpression::CaseInsensitiveOption);
+ if (captionNoAmpersand.contains(qtRegExp))
+ return QPlatformMenuItem::AboutQtRole;
return QPlatformMenuItem::AboutRole;
+ }
if (captionNoAmpersand.startsWith(QCoreApplication::translate("QCocoaMenuItem", "Config"), Qt::CaseInsensitive)
|| captionNoAmpersand.startsWith(QCoreApplication::translate("QCocoaMenuItem", "Preference"), Qt::CaseInsensitive)
|| captionNoAmpersand.startsWith(QCoreApplication::translate("QCocoaMenuItem", "Options"), Qt::CaseInsensitive)
diff --git a/src/plugins/platforms/cocoa/messages.h b/src/plugins/platforms/cocoa/messages.h
index e41898fe59..3a9eaf604e 100644
--- a/src/plugins/platforms/cocoa/messages.h
+++ b/src/plugins/platforms/cocoa/messages.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
@@ -46,13 +46,13 @@
QT_BEGIN_NAMESPACE
enum {
- ServicesAppMenuItem = 0,
+ AboutAppMenuItem = 0,
+ PreferencesAppMenuItem,
+ ServicesAppMenuItem,
HideAppMenuItem,
HideOthersAppMenuItem,
ShowAllAppMenuItem,
- PreferencesAppMenuItem,
- QuitAppMenuItem,
- AboutAppMenuItem
+ QuitAppMenuItem
};
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibility.h b/src/plugins/platforms/cocoa/qcocoaaccessibility.h
index e456364555..457c158ddc 100644
--- a/src/plugins/platforms/cocoa/qcocoaaccessibility.h
+++ b/src/plugins/platforms/cocoa/qcocoaaccessibility.h
@@ -46,6 +46,8 @@
#ifndef QT_NO_ACCESSIBILITY
+@class QT_MANGLE_NAMESPACE(QMacAccessibilityElement);
+
QT_BEGIN_NAMESPACE
class QCocoaAccessibility : public QPlatformAccessibility
@@ -82,9 +84,8 @@ namespace QCocoaAccessible {
NSString *macRole(QAccessibleInterface *interface);
NSString *macSubrole(QAccessibleInterface *interface);
bool shouldBeIgnored(QAccessibleInterface *interface);
-NSArray *unignoredChildren(QAccessibleInterface *interface);
+NSArray<QT_MANGLE_NAMESPACE(QMacAccessibilityElement) *> *unignoredChildren(QAccessibleInterface *interface);
NSString *getTranslatedAction(const QString &qtAction);
-NSMutableArray *createTranslatedActionsList(const QStringList &qtActions);
QString translateAction(NSString *nsAction, QAccessibleInterface *interface);
bool hasValueAttribute(QAccessibleInterface *interface);
id getValueAttribute(QAccessibleInterface *interface);
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm
index 654e6210c8..368cf56c80 100644
--- a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm
+++ b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm
@@ -256,12 +256,12 @@ bool shouldBeIgnored(QAccessibleInterface *interface)
return false;
}
-NSArray *unignoredChildren(QAccessibleInterface *interface)
+NSArray<QMacAccessibilityElement *> *unignoredChildren(QAccessibleInterface *interface)
{
int numKids = interface->childCount();
// qDebug() << "Children for: " << axid << iface << " are: " << numKids;
- NSMutableArray *kids = [NSMutableArray arrayWithCapacity:numKids];
+ NSMutableArray<QMacAccessibilityElement *> *kids = [NSMutableArray<QMacAccessibilityElement *> arrayWithCapacity:numKids];
for (int i = 0; i < numKids; ++i) {
QAccessibleInterface *child = interface->child(i);
if (!child || !child->isValid() || child->state().invalid || child->state().invisible)
@@ -310,7 +310,7 @@ NSString *getTranslatedAction(const QString &qtAction)
// NSAccessibilityCancelAction;
// NSAccessibilityDeleteAction;
- return 0;
+ return nil;
}
@@ -386,7 +386,7 @@ id getValueAttribute(QAccessibleInterface *interface)
}
if (interface->state().checkable) {
- return [NSNumber numberWithInt: (interface->state().checked ? 1 : 0)];
+ return interface->state().checked ? @(1) : @(0);
}
return nil;
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h
index 07f3f3a99e..914aaa2b1b 100644
--- a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h
+++ b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h
@@ -52,13 +52,10 @@
@class QT_MANGLE_NAMESPACE(QMacAccessibilityElement);
-@interface QT_MANGLE_NAMESPACE(QMacAccessibilityElement) : NSObject {
- NSString *role;
- QAccessible::Id axid;
-}
+@interface QT_MANGLE_NAMESPACE(QMacAccessibilityElement) : NSObject
-- (id)initWithId:(QAccessible::Id)anId;
-+ (QT_MANGLE_NAMESPACE(QMacAccessibilityElement) *)elementWithId:(QAccessible::Id)anId;
+- (instancetype)initWithId:(QAccessible::Id)anId;
++ (instancetype)elementWithId:(QAccessible::Id)anId;
@end
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm
index df2336d08b..03dc895ffb 100644
--- a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm
+++ b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm
@@ -99,9 +99,12 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
*end = curEnd;
}
-@implementation QMacAccessibilityElement
+@implementation QMacAccessibilityElement {
+ NSString *role;
+ QAccessible::Id axid;
+}
-- (id)initWithId:(QAccessible::Id)anId
+- (instancetype)initWithId:(QAccessible::Id)anId
{
Q_ASSERT((int)anId < 0);
self = [super init];
@@ -115,7 +118,7 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
return self;
}
-+ (id)elementWithId:(QAccessible::Id)anId
++ (instancetype)elementWithId:(QAccessible::Id)anId
{
Q_ASSERT(anId);
if (!anId)
@@ -168,22 +171,15 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
{
QStringRef textBefore = QStringRef(&text, 0, index);
int newlines = textBefore.count(QLatin1Char('\n'));
- return [NSNumber numberWithInt: newlines];
+ return @(newlines);
}
- (BOOL) accessibilityNotifiesWhenDestroyed {
return YES;
}
-- (NSArray *)accessibilityAttributeNames {
- static NSArray *defaultAttributes = nil;
-
- QAccessibleInterface *iface = QAccessible::accessibleInterface(axid);
- if (!iface || !iface->isValid())
- return defaultAttributes;
-
- if (defaultAttributes == nil) {
- defaultAttributes = [[NSArray alloc] initWithObjects:
+- (NSArray<NSString *> *)accessibilityAttributeNames {
+ static NSArray<NSString *> *defaultAttributes = [@[
NSAccessibilityRoleAttribute,
NSAccessibilityRoleDescriptionAttribute,
NSAccessibilitySubroleAttribute,
@@ -196,35 +192,36 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
NSAccessibilitySizeAttribute,
NSAccessibilityTitleAttribute,
NSAccessibilityDescriptionAttribute,
- NSAccessibilityEnabledAttribute,
- nil];
- }
+ NSAccessibilityEnabledAttribute
+ ] retain];
+
+ QAccessibleInterface *iface = QAccessible::accessibleInterface(axid);
+ if (!iface || !iface->isValid())
+ return defaultAttributes;
- NSMutableArray *attributes = [[NSMutableArray alloc] initWithCapacity : [defaultAttributes count]];
- [attributes addObjectsFromArray : defaultAttributes];
+ NSMutableArray<NSString *> *attributes = [[NSMutableArray<NSString *> alloc] initWithCapacity:defaultAttributes.count];
+ [attributes addObjectsFromArray:defaultAttributes];
if (QCocoaAccessible::hasValueAttribute(iface)) {
- [attributes addObject : NSAccessibilityValueAttribute];
+ [attributes addObject:NSAccessibilityValueAttribute];
}
if (iface->textInterface()) {
- [attributes addObjectsFromArray: [[NSArray alloc] initWithObjects:
+ [attributes addObjectsFromArray:@[
NSAccessibilityNumberOfCharactersAttribute,
NSAccessibilitySelectedTextAttribute,
NSAccessibilitySelectedTextRangeAttribute,
NSAccessibilityVisibleCharacterRangeAttribute,
- NSAccessibilityInsertionPointLineNumberAttribute,
- nil
+ NSAccessibilityInsertionPointLineNumberAttribute
]];
// TODO: multi-selection: NSAccessibilitySelectedTextRangesAttribute,
}
if (iface->valueInterface()) {
- [attributes addObjectsFromArray: [[NSArray alloc] initWithObjects:
+ [attributes addObjectsFromArray:@[
NSAccessibilityMinValueAttribute,
- NSAccessibilityMaxValueAttribute,
- nil
+ NSAccessibilityMaxValueAttribute
]];
}
@@ -261,13 +258,13 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
- (id) minValueAttribute:(QAccessibleInterface*)iface {
if (QAccessibleValueInterface *val = iface->valueInterface())
- return [NSNumber numberWithDouble: val->minimumValue().toDouble()];
+ return @(val->minimumValue().toDouble());
return nil;
}
- (id) maxValueAttribute:(QAccessibleInterface*)iface {
if (QAccessibleValueInterface *val = iface->valueInterface())
- return [NSNumber numberWithDouble: val->maximumValue().toDouble()];
+ return @(val->maximumValue().toDouble());
return nil;
}
@@ -289,7 +286,7 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
} else if ([attribute isEqualToString:NSAccessibilityFocusedAttribute]) {
// Just check if the app thinks we're focused.
id focusedElement = [NSApp accessibilityAttributeValue:NSAccessibilityFocusedUIElementAttribute];
- return [NSNumber numberWithBool:[focusedElement isEqual:self]];
+ return @([focusedElement isEqual:self]);
} else if ([attribute isEqualToString:NSAccessibilityParentAttribute]) {
return NSAccessibilityUnignoredAncestor([self parentElement]);
} else if ([attribute isEqualToString:NSAccessibilityWindowAttribute]) {
@@ -312,7 +309,7 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
} else if ([attribute isEqualToString:NSAccessibilityDescriptionAttribute]) {
return iface->text(QAccessible::Description).toNSString();
} else if ([attribute isEqualToString:NSAccessibilityEnabledAttribute]) {
- return [NSNumber numberWithBool:!iface->state().disabled];
+ return @(!iface->state().disabled);
} else if ([attribute isEqualToString:NSAccessibilityValueAttribute]) {
// VoiceOver asks for the value attribute for all elements. Return nil
// if we don't want the element to have a value attribute.
@@ -323,7 +320,7 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
} else if ([attribute isEqualToString:NSAccessibilityNumberOfCharactersAttribute]) {
if (QAccessibleTextInterface *text = iface->textInterface())
- return [NSNumber numberWithInt: text->characterCount()];
+ return @(text->characterCount());
return nil;
} else if ([attribute isEqualToString:NSAccessibilitySelectedTextAttribute]) {
if (QAccessibleTextInterface *text = iface->textInterface()) {
@@ -357,7 +354,7 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
int position = text->cursorPosition();
convertLineOffset(text, &line, &position);
}
- return [NSNumber numberWithInt: line];
+ return @(line);
}
return nil;
} else if ([attribute isEqualToString:NSAccessibilityMinValueAttribute]) {
@@ -378,18 +375,17 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
}
if (iface->textInterface()) {
- return [[NSArray alloc] initWithObjects:
- NSAccessibilityStringForRangeParameterizedAttribute,
- NSAccessibilityLineForIndexParameterizedAttribute,
- NSAccessibilityRangeForLineParameterizedAttribute,
- NSAccessibilityRangeForPositionParameterizedAttribute,
-// NSAccessibilityRangeForIndexParameterizedAttribute,
- NSAccessibilityBoundsForRangeParameterizedAttribute,
-// NSAccessibilityRTFForRangeParameterizedAttribute,
- NSAccessibilityStyleRangeForIndexParameterizedAttribute,
- NSAccessibilityAttributedStringForRangeParameterizedAttribute,
- nil
- ];
+ return @[
+ NSAccessibilityStringForRangeParameterizedAttribute,
+ NSAccessibilityLineForIndexParameterizedAttribute,
+ NSAccessibilityRangeForLineParameterizedAttribute,
+ NSAccessibilityRangeForPositionParameterizedAttribute,
+// NSAccessibilityRangeForIndexParameterizedAttribute,
+ NSAccessibilityBoundsForRangeParameterizedAttribute,
+// NSAccessibilityRTFForRangeParameterizedAttribute,
+ NSAccessibilityStyleRangeForIndexParameterizedAttribute,
+ NSAccessibilityAttributedStringForRangeParameterizedAttribute
+ ];
}
return nil;
@@ -416,7 +412,7 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
return nil;
int line = -1;
convertLineOffset(iface->textInterface(), &line, &index);
- return [NSNumber numberWithInt:line];
+ return @(line);
}
if ([attribute isEqualToString: NSAccessibilityRangeForLineParameterizedAttribute]) {
int line = [parameter intValue];
@@ -573,7 +569,7 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
return NSAccessibilityUnignoredAncestor(self);
// find the deepest child at the point
- QAccessibleInterface *childOfChildInterface = 0;
+ QAccessibleInterface *childOfChildInterface = nullptr;
do {
childOfChildInterface = childInterface->childAt(screenPoint.x(), screenPoint.y());
if (childOfChildInterface && childOfChildInterface->isValid())
diff --git a/src/plugins/platforms/cocoa/qcocoaapplication.h b/src/plugins/platforms/cocoa/qcocoaapplication.h
index 66a92686bc..15530d8281 100644
--- a/src/plugins/platforms/cocoa/qcocoaapplication.h
+++ b/src/plugins/platforms/cocoa/qcocoaapplication.h
@@ -89,8 +89,7 @@
#import <AppKit/AppKit.h>
-@interface QT_MANGLE_NAMESPACE(QNSApplication) : NSApplication {
-}
+@interface QT_MANGLE_NAMESPACE(QNSApplication) : NSApplication
@end
QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSApplication);
diff --git a/src/plugins/platforms/cocoa/qcocoaapplication.mm b/src/plugins/platforms/cocoa/qcocoaapplication.mm
index d0f27795b6..11f3bd0384 100644
--- a/src/plugins/platforms/cocoa/qcocoaapplication.mm
+++ b/src/plugins/platforms/cocoa/qcocoaapplication.mm
@@ -113,7 +113,7 @@ static const QByteArray q_macLocalEventType = QByteArrayLiteral("mac_generic_NSE
static bool qt_filterEvent(NSEvent *event)
{
if (qApp && qApp->eventDispatcher()->
- filterNativeEvent(q_macLocalEventType, static_cast<void*>(event), 0))
+ filterNativeEvent(q_macLocalEventType, static_cast<void*>(event), nullptr))
return true;
if ([event type] == NSApplicationDefined) {
diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.h b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.h
index 59c71017e3..0816730c54 100644
--- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.h
+++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
@@ -90,20 +90,18 @@
#include <qglobal.h>
#include <private/qcore_mac_p.h>
-@class QT_MANGLE_NAMESPACE(QCocoaMenuLoader);
+Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QCocoaNSMenuItem));
-@interface QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) : NSObject <NSApplicationDelegate> {
- bool startedQuit;
- NSMenu *dockMenu;
- NSObject <NSApplicationDelegate> *reflectionDelegate;
- bool inLaunch;
-}
-+ (QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate)*)sharedDelegate;
-- (void)setDockMenu:(NSMenu *)newMenu;
-- (void)setReflectionDelegate:(NSObject <NSApplicationDelegate> *)oldDelegate;
-- (void)getUrl:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent;
-- (void) removeAppleEventHandlers;
-- (bool) inLaunch;
+@interface QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) : NSObject <NSApplicationDelegate>
+@property (nonatomic, retain) NSMenu *dockMenu;
++ (instancetype)sharedDelegate;
+- (void)setReflectionDelegate:(NSObject<NSApplicationDelegate> *)oldDelegate;
+- (void)removeAppleEventHandlers;
+- (bool)inLaunch;
+@end
+
+@interface QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) (MenuAPI)
+- (void)qt_itemFired:(QT_MANGLE_NAMESPACE(QCocoaNSMenuItem) *)item;
@end
QT_NAMESPACE_ALIAS_OBJC_CLASS(QCocoaApplicationDelegate);
diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
index a94e0dc517..7601fb7e17 100644
--- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
+++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
@@ -73,9 +73,12 @@
#import "qcocoaapplicationdelegate.h"
-#import "qnswindowdelegate.h"
-#import "qcocoamenuloader.h"
#include "qcocoaintegration.h"
+#include "qcocoamenu.h"
+#include "qcocoamenuloader.h"
+#include "qcocoamenuitem.h"
+#include "qcocoansmenu.h"
+
#include <qevent.h>
#include <qurl.h>
#include <qdebug.h>
@@ -86,7 +89,11 @@
QT_USE_NAMESPACE
-@implementation QCocoaApplicationDelegate
+@implementation QCocoaApplicationDelegate {
+ bool startedQuit;
+ NSObject <NSApplicationDelegate> *reflectionDelegate;
+ bool inLaunch;
+}
+ (instancetype)sharedDelegate
{
@@ -102,7 +109,7 @@ QT_USE_NAMESPACE
return shared;
}
-- (id)init
+- (instancetype)init
{
self = [super init];
if (self) {
@@ -125,7 +132,7 @@ QT_USE_NAMESPACE
- (void)dealloc
{
- [dockMenu release];
+ [_dockMenu release];
if (reflectionDelegate) {
[[NSApplication sharedApplication] setDelegate:reflectionDelegate];
[reflectionDelegate release];
@@ -135,23 +142,16 @@ QT_USE_NAMESPACE
[super dealloc];
}
-- (void)setDockMenu:(NSMenu*)newMenu
-{
- [newMenu retain];
- [dockMenu release];
- dockMenu = newMenu;
-}
-
- (NSMenu *)applicationDockMenu:(NSApplication *)sender
{
Q_UNUSED(sender);
// Manually invoke the delegate's -menuWillOpen: method.
// See QTBUG-39604 (and its fix) for details.
- [[dockMenu delegate] menuWillOpen:dockMenu];
- return [[dockMenu retain] autorelease];
+ [self.dockMenu.delegate menuWillOpen:self.dockMenu];
+ return [[self.dockMenu retain] autorelease];
}
-- (BOOL) canQuit
+- (BOOL)canQuit
{
[[NSApp mainMenu] cancelTracking];
@@ -219,7 +219,7 @@ QT_USE_NAMESPACE
return NSTerminateCancel;
}
-- (void) applicationWillFinishLaunching:(NSNotification *)notification
+- (void)applicationWillFinishLaunching:(NSNotification *)notification
{
Q_UNUSED(notification);
@@ -249,14 +249,14 @@ QT_USE_NAMESPACE
}
// called by QCocoaIntegration's destructor before resetting the application delegate to nil
-- (void) removeAppleEventHandlers
+- (void)removeAppleEventHandlers
{
NSAppleEventManager *eventManager = [NSAppleEventManager sharedAppleEventManager];
[eventManager removeEventHandlerForEventClass:kCoreEventClass andEventID:kAEQuitApplication];
[eventManager removeEventHandlerForEventClass:kInternetEventClass andEventID:kAEGetURL];
}
-- (bool) inLaunch
+- (bool)inLaunch
{
return inLaunch;
}
@@ -440,3 +440,48 @@ QT_USE_NAMESPACE
}
@end
+
+@implementation QCocoaApplicationDelegate (Menus)
+
+- (BOOL)validateMenuItem:(NSMenuItem*)item
+{
+ auto *nativeItem = qt_objc_cast<QCocoaNSMenuItem *>(item);
+ if (!nativeItem)
+ return item.enabled; // FIXME Test with with Qt as plugin or embedded QWindow.
+
+ auto *platformItem = nativeItem.platformMenuItem;
+ if (!platformItem) // Try a bit harder with orphan menu itens
+ return item.hasSubmenu || (item.enabled && (item.action != @selector(qt_itemFired:)));
+
+ // Menu-holding items are always enabled, as it's conventional in Cocoa
+ if (platformItem->menu())
+ return YES;
+
+ return platformItem->isEnabled();
+}
+
+@end
+
+@implementation QCocoaApplicationDelegate (MenuAPI)
+
+- (void)qt_itemFired:(QCocoaNSMenuItem *)item
+{
+ if (item.hasSubmenu)
+ return;
+
+ auto *nativeItem = qt_objc_cast<QCocoaNSMenuItem *>(item);
+ Q_ASSERT_X(nativeItem, qPrintable(__FUNCTION__), "Triggered menu item is not a QCocoaNSMenuItem.");
+ auto *platformItem = nativeItem.platformMenuItem;
+ // Menu-holding items also get a target to play nicely
+ // with NSMenuValidation but should not trigger.
+ if (!platformItem || platformItem->menu())
+ return;
+
+ QScopedScopeLevelCounter scopeLevelCounter(QGuiApplicationPrivate::instance()->threadData);
+ QGuiApplicationPrivate::modifier_buttons = [QNSView convertKeyModifiers:[NSEvent modifierFlags]];
+
+ static QMetaMethod activatedSignal = QMetaMethod::fromSignal(&QCocoaMenuItem::activated);
+ activatedSignal.invoke(platformItem, Qt::QueuedConnection);
+}
+
+@end
diff --git a/src/plugins/platforms/cocoa/qcocoabackingstore.mm b/src/plugins/platforms/cocoa/qcocoabackingstore.mm
index 091453785e..5eb45be04a 100644
--- a/src/plugins/platforms/cocoa/qcocoabackingstore.mm
+++ b/src/plugins/platforms/cocoa/qcocoabackingstore.mm
@@ -44,7 +44,7 @@
QT_BEGIN_NAMESPACE
-Q_LOGGING_CATEGORY(lcCocoaBackingStore, "qt.qpa.cocoa.backingstore");
+Q_LOGGING_CATEGORY(lcQpaBackingStore, "qt.qpa.backingstore");
QCocoaBackingStore::QCocoaBackingStore(QWindow *window)
: QRasterBackingStore(window)
@@ -101,13 +101,13 @@ void QCocoaBackingStore::flush(QWindow *window, const QRegion &region, const QPo
QNSView *topLevelView = qnsview_cast(static_cast<QCocoaWindow *>(topLevelWindow->handle())->view());
QNSView *view = qnsview_cast(static_cast<QCocoaWindow *>(window->handle())->view());
- if (lcCocoaBackingStore().isDebugEnabled()) {
+ if (lcQpaBackingStore().isDebugEnabled()) {
QString targetViewDescription;
if (view != topLevelView) {
QDebug targetDebug(&targetViewDescription);
targetDebug << "onto" << topLevelView << "at" << offset;
}
- qCDebug(lcCocoaBackingStore) << "Flushing" << region << "of" << view << qPrintable(targetViewDescription);
+ qCDebug(lcQpaBackingStore) << "Flushing" << region << "of" << view << qPrintable(targetViewDescription);
}
// Prevent potentially costly color conversion by assigning the display color space
diff --git a/src/plugins/platforms/cocoa/qcocoaclipboard.mm b/src/plugins/platforms/cocoa/qcocoaclipboard.mm
index b4745900dc..a35c153084 100644
--- a/src/plugins/platforms/cocoa/qcocoaclipboard.mm
+++ b/src/plugins/platforms/cocoa/qcocoaclipboard.mm
@@ -56,13 +56,13 @@ QMimeData *QCocoaClipboard::mimeData(QClipboard::Mode mode)
pasteBoard->sync();
return pasteBoard->mimeData();
}
- return 0;
+ return nullptr;
}
void QCocoaClipboard::setMimeData(QMimeData *data, QClipboard::Mode mode)
{
if (QMacPasteboard *pasteBoard = pasteboardForMode(mode)) {
- if (data == 0) {
+ if (!data) {
pasteBoard->clear();
}
@@ -90,7 +90,7 @@ QMacPasteboard *QCocoaClipboard::pasteboardForMode(QClipboard::Mode mode) const
else if (mode == QClipboard::FindBuffer)
return m_find.data();
else
- return 0;
+ return nullptr;
}
void QCocoaClipboard::handleApplicationStateChanged(Qt::ApplicationState state)
diff --git a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
index aa6124507d..d7850b1481 100644
--- a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
+++ b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
@@ -50,7 +50,14 @@
QT_USE_NAMESPACE
@interface QT_MANGLE_NAMESPACE(QNSColorPanelDelegate) : NSObject<NSWindowDelegate, QNSPanelDelegate>
-{
+- (void)restoreOriginalContentView;
+- (void)updateQtColor;
+- (void)finishOffWithCode:(NSInteger)code;
+@end
+
+QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSColorPanelDelegate);
+
+@implementation QNSColorPanelDelegate {
@public
NSColorPanel *mColorPanel;
QCocoaColorDialogHelper *mHelper;
@@ -61,22 +68,14 @@ QT_USE_NAMESPACE
BOOL mDialogIsExecuting;
BOOL mResultSet;
BOOL mClosingDueToKnownButton;
-};
-- (void)restoreOriginalContentView;
-- (void)updateQtColor;
-- (void)finishOffWithCode:(NSInteger)code;
-@end
-
-QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSColorPanelDelegate);
-
-@implementation QNSColorPanelDelegate
+}
-- (id)init
+- (instancetype)init
{
self = [super init];
mColorPanel = [NSColorPanel sharedColorPanel];
- mHelper = 0;
- mStolenContentView = 0;
+ mHelper = nullptr;
+ mStolenContentView = nil;
mPanelButtons = nil;
mResultCode = NSModalResponseCancel;
mDialogIsExecuting = false;
@@ -116,9 +115,9 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSColorPanelDelegate);
[self restoreOriginalContentView];
} else if (!mStolenContentView) {
// steal the color panel's contents view
- mStolenContentView = [mColorPanel contentView];
+ mStolenContentView = mColorPanel.contentView;
[mStolenContentView retain];
- [mColorPanel setContentView:0];
+ mColorPanel.contentView = nil;
// create a new content view and add the stolen one as a subview
mPanelButtons = [[QNSPanelContentsWrapper alloc] initWithPanelDelegate:self];
@@ -310,7 +309,7 @@ public:
void cleanup(QCocoaColorDialogHelper *helper)
{
if (mDelegate->mHelper == helper)
- mDelegate->mHelper = 0;
+ mDelegate->mHelper = nullptr;
}
bool exec()
diff --git a/src/plugins/platforms/cocoa/qcocoacursor.mm b/src/plugins/platforms/cocoa/qcocoacursor.mm
index 8c98dc69f7..87a57c78c8 100644
--- a/src/plugins/platforms/cocoa/qcocoacursor.mm
+++ b/src/plugins/platforms/cocoa/qcocoacursor.mm
@@ -80,15 +80,15 @@ void QCocoaCursor::setPos(const QPoint &position)
pos.x = position.x();
pos.y = position.y();
- CGEventRef e = CGEventCreateMouseEvent(0, kCGEventMouseMoved, pos, kCGMouseButtonLeft);
+ CGEventRef e = CGEventCreateMouseEvent(nullptr, kCGEventMouseMoved, pos, kCGMouseButtonLeft);
CGEventPost(kCGHIDEventTap, e);
CFRelease(e);
}
NSCursor *QCocoaCursor::convertCursor(QCursor *cursor)
{
- if (cursor == nullptr)
- return 0;
+ if (!cursor)
+ return nil;
const Qt::CursorShape newShape = cursor->shape();
NSCursor *cocoaCursor;
@@ -138,11 +138,11 @@ NSCursor *QCocoaCursor::convertCursor(QCursor *cursor)
cocoaCursor = m_cursors.value(newShape);
if (cocoaCursor && cursor->shape() == Qt::BitmapCursor) {
[cocoaCursor release];
- cocoaCursor = 0;
+ cocoaCursor = nil;
}
- if (cocoaCursor == 0) {
+ if (!cocoaCursor) {
cocoaCursor = createCursorData(cursor);
- if (cocoaCursor == 0)
+ if (!cocoaCursor)
return [NSCursor arrowCursor];
m_cursors.insert(newShape, cocoaCursor);
@@ -211,8 +211,8 @@ NSCursor *QCocoaCursor::createCursorData(QCursor *cursor)
0x07, 0xf0, 0x0f, 0xf8, 0x0f, 0xf8, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0,
0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0 };
#endif
- const uchar *cursorData = 0;
- const uchar *cursorMaskData = 0;
+ const uchar *cursorData = nullptr;
+ const uchar *cursorMaskData = nullptr;
QPoint hotspot = cursor->hotSpot();
switch (cursor->shape()) {
@@ -269,7 +269,7 @@ NSCursor *QCocoaCursor::createCursorData(QCursor *cursor)
#endif
default:
qWarning("Qt: QCursor::update: Invalid cursor shape %d", cursor->shape());
- return 0;
+ return nil;
}
// Create an NSCursor from image data if this a self-provided cursor.
@@ -279,7 +279,7 @@ NSCursor *QCocoaCursor::createCursorData(QCursor *cursor)
return (createCursorFromBitmap(&bitmap, &mask, hotspot));
}
- return 0; // should not happen, all cases covered above
+ return nil; // should not happen, all cases covered above
}
NSCursor *QCocoaCursor::createCursorFromBitmap(const QBitmap *bitmap, const QBitmap *mask, const QPoint hotspot)
diff --git a/src/plugins/platforms/cocoa/qcocoadrag.mm b/src/plugins/platforms/cocoa/qcocoadrag.mm
index e1f36b47a1..09433194a6 100644
--- a/src/plugins/platforms/cocoa/qcocoadrag.mm
+++ b/src/plugins/platforms/cocoa/qcocoadrag.mm
@@ -50,10 +50,10 @@ QT_BEGIN_NAMESPACE
static const int dragImageMaxChars = 26;
QCocoaDrag::QCocoaDrag() :
- m_drag(0)
+ m_drag(nullptr)
{
- m_lastEvent = 0;
- m_lastView = 0;
+ m_lastEvent = nil;
+ m_lastView = nil;
}
QCocoaDrag::~QCocoaDrag()
@@ -73,7 +73,7 @@ QMimeData *QCocoaDrag::dragMimeData()
if (m_drag)
return m_drag->mimeData();
- return 0;
+ return nullptr;
}
Qt::DropAction QCocoaDrag::defaultAction(Qt::DropActions possibleActions,
@@ -140,7 +140,7 @@ Qt::DropAction QCocoaDrag::drag(QDrag *o)
NSPoint event_location = [m_lastEvent locationInWindow];
NSWindow *theWindow = [m_lastEvent window];
- Q_ASSERT(theWindow != nil);
+ Q_ASSERT(theWindow);
event_location.x -= hotSpot.x();
CGFloat flippedY = pmDeviceIndependentSize.height() - hotSpot.y();
event_location.y -= flippedY;
@@ -157,7 +157,7 @@ Qt::DropAction QCocoaDrag::drag(QDrag *o)
[nsimage release];
- m_drag = 0;
+ m_drag = nullptr;
return m_executed_drop_action;
}
diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h
index 2ffc1395ba..6d62447f33 100644
--- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h
+++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h
@@ -110,8 +110,8 @@ class QCocoaEventDispatcher : public QAbstractEventDispatcher
Q_DECLARE_PRIVATE(QCocoaEventDispatcher)
public:
- QCocoaEventDispatcher(QAbstractEventDispatcherPrivate &priv, QObject *parent = 0);
- explicit QCocoaEventDispatcher(QObject *parent = 0);
+ QCocoaEventDispatcher(QAbstractEventDispatcherPrivate &priv, QObject *parent = nullptr);
+ explicit QCocoaEventDispatcher(QObject *parent = nullptr);
~QCocoaEventDispatcher();
bool processEvents(QEventLoop::ProcessEventsFlags flags);
diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm
index bf9ba4eccf..611853642a 100644
--- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm
+++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm
@@ -129,11 +129,11 @@ void QCocoaEventDispatcherPrivate::maybeStartCFRunLoopTimer()
{
if (timerInfoList.isEmpty()) {
// no active timers, so the CFRunLoopTimerRef should not be active either
- Q_ASSERT(runLoopTimerRef == 0);
+ Q_ASSERT(!runLoopTimerRef);
return;
}
- if (runLoopTimerRef == 0) {
+ if (!runLoopTimerRef) {
// start the CFRunLoopTimer
CFAbsoluteTime ttf = CFAbsoluteTimeGetCurrent();
CFTimeInterval interval;
@@ -150,11 +150,11 @@ void QCocoaEventDispatcherPrivate::maybeStartCFRunLoopTimer()
}
ttf += interval;
- CFRunLoopTimerContext info = { 0, this, 0, 0, 0 };
+ CFRunLoopTimerContext info = { 0, this, nullptr, nullptr, nullptr };
// create the timer with a large interval, as recommended by the CFRunLoopTimerSetNextFireDate()
// documentation, since we will adjust the timer's time-to-fire as needed to keep Qt timers working
- runLoopTimerRef = CFRunLoopTimerCreate(0, ttf, oneyear, 0, 0, QCocoaEventDispatcherPrivate::runLoopTimerCallback, &info);
- Q_ASSERT(runLoopTimerRef != 0);
+ runLoopTimerRef = CFRunLoopTimerCreate(nullptr, ttf, oneyear, 0, 0, QCocoaEventDispatcherPrivate::runLoopTimerCallback, &info);
+ Q_ASSERT(runLoopTimerRef);
CFRunLoopAddTimer(mainRunLoop(), runLoopTimerRef, kCFRunLoopCommonModes);
} else {
@@ -180,12 +180,12 @@ void QCocoaEventDispatcherPrivate::maybeStartCFRunLoopTimer()
void QCocoaEventDispatcherPrivate::maybeStopCFRunLoopTimer()
{
- if (runLoopTimerRef == 0)
+ if (!runLoopTimerRef)
return;
CFRunLoopTimerInvalidate(runLoopTimerRef);
CFRelease(runLoopTimerRef);
- runLoopTimerRef = 0;
+ runLoopTimerRef = nullptr;
}
void QCocoaEventDispatcher::registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *obj)
@@ -368,13 +368,13 @@ bool QCocoaEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags)
break;
QMacAutoReleasePool pool;
- NSEvent* event = 0;
+ NSEvent* event = nil;
// First, send all previously excluded input events, if any:
if (!excludeUserEvents) {
while (!d->queuedUserInputEvents.isEmpty()) {
event = static_cast<NSEvent *>(d->queuedUserInputEvents.takeFirst());
- if (!filterNativeEvent("NSEvent", event, 0)) {
+ if (!filterNativeEvent("NSEvent", event, nullptr)) {
[NSApp sendEvent:event];
retVal = true;
}
@@ -432,7 +432,7 @@ bool QCocoaEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags)
retVal = true;
} else {
int lastSerialCopy = d->lastSerial;
- bool hadModalSession = d->currentModalSessionCached != 0;
+ const bool hadModalSession = d->currentModalSessionCached;
// We cannot block the thread (and run in a tight loop).
// Instead we will process all current pending events and return.
d->ensureNSAppInitialized();
@@ -471,12 +471,12 @@ bool QCocoaEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags)
d->queuedUserInputEvents.append(event);
continue;
}
- if (!filterNativeEvent("NSEvent", event, 0)) {
+ if (!filterNativeEvent("NSEvent", event, nullptr)) {
[NSApp sendEvent:event];
retVal = true;
}
}
- } while (!d->interrupt && event != nil);
+ } while (!d->interrupt && event);
} else do {
// INVARIANT: No modal window is executing.
event = [NSApp nextEventMatchingMask:NSAnyEventMask
@@ -492,12 +492,12 @@ bool QCocoaEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags)
continue;
}
}
- if (!filterNativeEvent("NSEvent", event, 0)) {
+ if (!filterNativeEvent("NSEvent", event, nullptr)) {
[NSApp sendEvent:event];
retVal = true;
}
}
- } while (!d->interrupt && event != nil);
+ } while (!d->interrupt && event);
if ((d->processEventsFlags & QEventLoop::EventLoopExec) == 0) {
// when called "manually", always send posted events and timers
@@ -514,7 +514,7 @@ bool QCocoaEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags)
// event recursion to ensure that we spin the correct modal session.
// We do the interruptLater at the end of the function to ensure that we don't
// disturb the 'wait for more events' below (as deleteLater will post an event):
- if (hadModalSession && d->currentModalSessionCached == 0)
+ if (hadModalSession && !d->currentModalSessionCached)
interruptLater = true;
}
bool canWait = (d->threadData->canWait
@@ -611,11 +611,11 @@ void QCocoaEventDispatcherPrivate::temporarilyStopAllModalSessions()
QCocoaModalSessionInfo &info = cocoaModalSessionStack[i];
if (info.session) {
[NSApp endModalSession:info.session];
- info.session = 0;
+ info.session = nullptr;
[(NSWindow*) info.nswindow release];
}
}
- currentModalSessionCached = 0;
+ currentModalSessionCached = nullptr;
}
NSModalSession QCocoaEventDispatcherPrivate::currentModalSession()
@@ -626,7 +626,7 @@ NSModalSession QCocoaEventDispatcherPrivate::currentModalSession()
return currentModalSessionCached;
if (cocoaModalSessionStack.isEmpty())
- return 0;
+ return nullptr;
int sessionCount = cocoaModalSessionStack.size();
for (int i=0; i<sessionCount; ++i) {
@@ -637,6 +637,8 @@ NSModalSession QCocoaEventDispatcherPrivate::currentModalSession()
if (!info.session) {
QMacAutoReleasePool pool;
QCocoaWindow *cocoaWindow = static_cast<QCocoaWindow *>(info.window->handle());
+ if (!cocoaWindow)
+ continue;
NSWindow *nswindow = cocoaWindow->nativeWindow();
if (!nswindow)
continue;
@@ -647,6 +649,15 @@ NSModalSession QCocoaEventDispatcherPrivate::currentModalSession()
[(NSWindow*) info.nswindow retain];
QRect rect = cocoaWindow->geometry();
info.session = [NSApp beginModalSessionForWindow:nswindow];
+
+ // The call to beginModalSessionForWindow above processes events and may
+ // have deleted or destroyed the window. Check if it's still valid.
+ if (!info.window)
+ continue;
+ cocoaWindow = static_cast<QCocoaWindow *>(info.window->handle());
+ if (!cocoaWindow)
+ continue;
+
if (rect != cocoaWindow->geometry())
cocoaWindow->setGeometry(rect);
}
@@ -717,9 +728,9 @@ void QCocoaEventDispatcherPrivate::cleanupModalSessions()
currentModalSessionCached = info.session;
break;
}
- currentModalSessionCached = 0;
+ currentModalSessionCached = nullptr;
if (info.session) {
- Q_ASSERT(info.nswindow != 0);
+ Q_ASSERT(info.nswindow);
[NSApp endModalSession:info.session];
[(NSWindow *)info.nswindow release];
}
@@ -746,10 +757,10 @@ void QCocoaEventDispatcherPrivate::beginModalSession(QWindow *window)
// currentModalSession). A QCocoaModalSessionInfo is considered pending to be stopped if
// the window pointer is zero, and the session pointer is non-zero (it will be fully
// stopped in cleanupModalSessions()).
- QCocoaModalSessionInfo info = {window, 0, 0};
+ QCocoaModalSessionInfo info = {window, nullptr, nullptr};
cocoaModalSessionStack.push(info);
updateChildrenWorksWhenModal();
- currentModalSessionCached = 0;
+ currentModalSessionCached = nullptr;
}
void QCocoaEventDispatcherPrivate::endModalSession(QWindow *window)
@@ -768,12 +779,12 @@ void QCocoaEventDispatcherPrivate::endModalSession(QWindow *window)
if (!info.window)
endedSessions++;
if (info.window == window) {
- info.window = 0;
+ info.window = nullptr;
if (i + endedSessions == stackSize-1) {
// The top sessions ended. Interrupt the event dispatcher to
// start spinning the correct session immediately.
q->interrupt();
- currentModalSessionCached = 0;
+ currentModalSessionCached = nullptr;
cleanupModalSessionsNeeded = true;
}
}
@@ -782,13 +793,13 @@ void QCocoaEventDispatcherPrivate::endModalSession(QWindow *window)
QCocoaEventDispatcherPrivate::QCocoaEventDispatcherPrivate()
: processEventsFlags(0),
- runLoopTimerRef(0),
+ runLoopTimerRef(nullptr),
blockSendPostedEvents(false),
currentExecIsNSAppRun(false),
nsAppRunCalledByQt(false),
cleanupModalSessionsNeeded(false),
processEventsCalled(0),
- currentModalSessionCached(0),
+ currentModalSessionCached(nullptr),
lastSerial(-1),
interrupt(false)
{
@@ -926,7 +937,7 @@ void QCocoaEventDispatcherPrivate::cancelWaitForMoreEvents()
// events somewhere, we post a dummy event to wake it up:
QMacAutoReleasePool pool;
[NSApp postEvent:[NSEvent otherEventWithType:NSApplicationDefined location:NSZeroPoint
- modifierFlags:0 timestamp:0. windowNumber:0 context:0
+ modifierFlags:0 timestamp:0. windowNumber:0 context:nil
subtype:QtCocoaEventSubTypeWakeup data1:0 data2:0] atStart:NO];
}
@@ -1008,7 +1019,7 @@ QCocoaEventDispatcher::~QCocoaEventDispatcher()
CFRelease(d->firstTimeObserver);
}
-QtCocoaInterruptDispatcher* QtCocoaInterruptDispatcher::instance = 0;
+QtCocoaInterruptDispatcher* QtCocoaInterruptDispatcher::instance = nullptr;
QtCocoaInterruptDispatcher::QtCocoaInterruptDispatcher() : cancelled(false)
{
@@ -1025,7 +1036,7 @@ QtCocoaInterruptDispatcher::~QtCocoaInterruptDispatcher()
{
if (cancelled)
return;
- instance = 0;
+ instance = nullptr;
QCocoaEventDispatcher::instance()->interrupt();
}
@@ -1035,7 +1046,7 @@ void QtCocoaInterruptDispatcher::cancelInterruptLater()
return;
instance->cancelled = true;
delete instance;
- instance = 0;
+ instance = nullptr;
}
void QtCocoaInterruptDispatcher::interruptLater()
diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
index 94f2125bad..dcc57daf11 100644
--- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
+++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
@@ -50,7 +50,6 @@
#include <private/qguiapplication_p.h>
#include "qt_mac_p.h"
#include "qcocoahelpers.h"
-#include "qcocoamenubar.h"
#include "qcocoaeventdispatcher.h"
#include <qregexp.h>
#include <qbuffer.h>
@@ -81,23 +80,6 @@ typedef QSharedPointer<QFileDialogOptions> SharedPointerFileDialogOptions;
@interface QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate)
: NSObject<NSOpenSavePanelDelegate>
-{
- @public
- NSOpenPanel *mOpenPanel;
- NSSavePanel *mSavePanel;
- NSView *mAccessoryView;
- NSPopUpButton *mPopUpButton;
- NSTextField *mTextField;
- QCocoaFileDialogHelper *mHelper;
- NSString *mCurrentDir;
-
- int mReturnCode;
-
- SharedPointerFileDialogOptions mOptions;
- QString *mCurrentSelection;
- QStringList *mNameFilterDropDownList;
- QStringList *mSelectedNameFilter;
-}
- (NSString *)strip:(const QString &)label;
- (BOOL)panel:(id)sender shouldEnableURL:(NSURL *)url;
@@ -117,12 +99,27 @@ typedef QSharedPointer<QFileDialogOptions> SharedPointerFileDialogOptions;
QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSOpenSavePanelDelegate);
-@implementation QNSOpenSavePanelDelegate
+@implementation QNSOpenSavePanelDelegate {
+ @public
+ NSOpenPanel *mOpenPanel;
+ NSSavePanel *mSavePanel;
+ NSView *mAccessoryView;
+ NSPopUpButton *mPopUpButton;
+ NSTextField *mTextField;
+ QCocoaFileDialogHelper *mHelper;
+ NSString *mCurrentDir;
+
+ int mReturnCode;
+
+ SharedPointerFileDialogOptions mOptions;
+ QString *mCurrentSelection;
+ QStringList *mNameFilterDropDownList;
+ QStringList *mSelectedNameFilter;
+}
-- (id)initWithAcceptMode:
- (const QString &)selectFile
- options:(SharedPointerFileDialogOptions)options
- helper:(QCocoaFileDialogHelper *)helper
+- (instancetype)initWithAcceptMode:(const QString &)selectFile
+ options:(SharedPointerFileDialogOptions)options
+ helper:(QCocoaFileDialogHelper *)helper
{
self = [super init];
mOptions = options;
@@ -132,7 +129,7 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSOpenSavePanelDelegate);
} else {
mSavePanel = [NSSavePanel savePanel];
[mSavePanel setCanSelectHiddenExtension:YES];
- mOpenPanel = 0;
+ mOpenPanel = nil;
}
if ([mSavePanel respondsToSelector:@selector(setLevel:)])
@@ -222,7 +219,6 @@ static QString strippedText(QString s)
|| [self panel:nil shouldEnableURL:url];
[self updateProperties];
- QCocoaMenuBar::redirectKnownMenuItemsToFirstResponder();
[mSavePanel setNameFieldStringValue:selectable ? info.fileName().toNSString() : @""];
[mOpenPanel beginWithCompletionHandler:^(NSInteger result){
@@ -252,9 +248,7 @@ static QString strippedText(QString s)
// Make sure we don't interrupt the runModal call below.
QCocoaEventDispatcher::clearCurrentThreadCocoaEventDispatcherInterruptFlag();
- QCocoaMenuBar::redirectKnownMenuItemsToFirstResponder();
mReturnCode = [mSavePanel runModal];
- QCocoaMenuBar::resetKnownMenuItemsToQt();
QAbstractEventDispatcher::instance()->interrupt();
return (mReturnCode == NSModalResponseOK);
@@ -274,7 +268,6 @@ static QString strippedText(QString s)
|| [self panel:nil shouldEnableURL:url];
[self updateProperties];
- QCocoaMenuBar::redirectKnownMenuItemsToFirstResponder();
[mSavePanel setDirectoryURL: [NSURL fileURLWithPath:mCurrentDir]];
[mSavePanel setNameFieldStringValue:selectable ? info.fileName().toNSString() : @""];
@@ -292,7 +285,7 @@ static QString strippedText(QString s)
BOOL hidden = NO;
if (url) {
CFBooleanRef isHiddenProperty;
- if (CFURLCopyResourcePropertyForKey((__bridge CFURLRef)url, kCFURLIsHiddenKey, &isHiddenProperty, NULL)) {
+ if (CFURLCopyResourcePropertyForKey((__bridge CFURLRef)url, kCFURLIsHiddenKey, &isHiddenProperty, nullptr)) {
hidden = CFBooleanGetValue(isHiddenProperty);
CFRelease(isHiddenProperty);
}
@@ -406,9 +399,9 @@ static QString strippedText(QString s)
{
if (mOpenPanel) {
QList<QUrl> result;
- NSArray* array = [mOpenPanel URLs];
- for (NSUInteger i=0; i<[array count]; ++i) {
- QString path = QString::fromNSString([[array objectAtIndex:i] path]).normalized(QString::NormalizationForm_C);
+ NSArray<NSURL *> *array = [mOpenPanel URLs];
+ for (NSURL *url in array) {
+ QString path = QString::fromNSString(url.path).normalized(QString::NormalizationForm_C);
result << QUrl::fromLocalFile(path);
}
return result;
@@ -576,7 +569,7 @@ static QString strippedText(QString s)
QT_BEGIN_NAMESPACE
QCocoaFileDialogHelper::QCocoaFileDialogHelper()
- :mDelegate(0)
+ : mDelegate(nil)
{
}
@@ -586,7 +579,7 @@ QCocoaFileDialogHelper::~QCocoaFileDialogHelper()
return;
QMacAutoReleasePool pool;
[mDelegate release];
- mDelegate = 0;
+ mDelegate = nil;
}
void QCocoaFileDialogHelper::QNSOpenSavePanelDelegate_selectionChanged(const QString &newPath)
@@ -596,7 +589,6 @@ void QCocoaFileDialogHelper::QNSOpenSavePanelDelegate_selectionChanged(const QSt
void QCocoaFileDialogHelper::QNSOpenSavePanelDelegate_panelClosed(bool accepted)
{
- QCocoaMenuBar::resetKnownMenuItemsToQt();
if (accepted) {
emit accept();
} else {
diff --git a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm
index 815882ab06..33b102f3eb 100644
--- a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm
+++ b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm
@@ -74,7 +74,15 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont)
}
@interface QT_MANGLE_NAMESPACE(QNSFontPanelDelegate) : NSObject<NSWindowDelegate, QNSPanelDelegate>
-{
+- (void)restoreOriginalContentView;
+- (void)updateQtFont;
+- (void)changeFont:(id)sender;
+- (void)finishOffWithCode:(NSInteger)code;
+@end
+
+QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSFontPanelDelegate);
+
+@implementation QNSFontPanelDelegate {
@public
NSFontPanel *mFontPanel;
QCocoaFontDialogHelper *mHelper;
@@ -84,34 +92,26 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont)
NSInteger mResultCode;
BOOL mDialogIsExecuting;
BOOL mResultSet;
-};
-- (void)restoreOriginalContentView;
-- (void)updateQtFont;
-- (void)changeFont:(id)sender;
-- (void)finishOffWithCode:(NSInteger)code;
-@end
-
-QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSFontPanelDelegate);
-
-@implementation QNSFontPanelDelegate
+}
-- (id)init
+- (instancetype)init
{
- self = [super init];
- mFontPanel = [NSFontPanel sharedFontPanel];
- mHelper = 0;
- mStolenContentView = 0;
- mPanelButtons = 0;
- mResultCode = NSModalResponseCancel;
- mDialogIsExecuting = false;
- mResultSet = false;
+ if ((self = [super init])) {
+ mFontPanel = [NSFontPanel sharedFontPanel];
+ mHelper = nullptr;
+ mStolenContentView = nil;
+ mPanelButtons = nil;
+ mResultCode = NSModalResponseCancel;
+ mDialogIsExecuting = false;
+ mResultSet = false;
- [mFontPanel setRestorable:NO];
- [mFontPanel setDelegate:self];
+ [mFontPanel setRestorable:NO];
+ [mFontPanel setDelegate:self];
- [NSFontManager sharedFontManager].target = self; // Action is changeFont:
+ [NSFontManager sharedFontManager].target = self; // Action is changeFont:
- [mFontPanel retain];
+ [mFontPanel retain];
+ }
return self;
}
@@ -135,9 +135,9 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSFontPanelDelegate);
[self restoreOriginalContentView];
} else if (!mStolenContentView) {
// steal the font panel's contents view
- mStolenContentView = [mFontPanel contentView];
+ mStolenContentView = mFontPanel.contentView;
[mStolenContentView retain];
- [mFontPanel setContentView:0];
+ mFontPanel.contentView = nil;
// create a new content view and add the stolen one as a subview
mPanelButtons = [[QNSPanelContentsWrapper alloc] initWithPanelDelegate:self];
@@ -159,7 +159,7 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSFontPanelDelegate);
// return stolen stuff to its rightful owner
[mStolenContentView removeFromSuperview];
[mFontPanel setContentView:mStolenContentView];
- mStolenContentView = 0;
+ mStolenContentView = nil;
[mPanelButtons release];
mPanelButtons = nil;
}
@@ -191,7 +191,7 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSFontPanelDelegate);
// Get selected font
NSFontManager *fontManager = [NSFontManager sharedFontManager];
NSFont *selectedFont = [fontManager selectedFont];
- if (selectedFont == nil) {
+ if (!selectedFont) {
selectedFont = [NSFont systemFontOfSize:[NSFont systemFontSize]];
}
NSFont *panelFont = [fontManager convertFont:selectedFont];
@@ -295,7 +295,7 @@ public:
void cleanup(QCocoaFontDialogHelper *helper)
{
if (mDelegate->mHelper == helper)
- mDelegate->mHelper = 0;
+ mDelegate->mHelper = nullptr;
}
bool exec()
@@ -329,7 +329,7 @@ public:
void setCurrentFont(const QFont &font)
{
NSFontManager *mgr = [NSFontManager sharedFontManager];
- const NSFont *nsFont = 0;
+ NSFont *nsFont = nil;
int weight = 5;
NSFontTraitMask mask = 0;
@@ -347,7 +347,7 @@ public:
weight:weight
size:fontInfo.pointSize()];
- [mgr setSelectedFont:const_cast<NSFont *>(nsFont) isMultiple:NO];
+ [mgr setSelectedFont:nsFont isMultiple:NO];
mDelegate->mQtFont = font;
}
diff --git a/src/plugins/platforms/cocoa/qcocoaglcontext.mm b/src/plugins/platforms/cocoa/qcocoaglcontext.mm
index 7ffe0003d3..348a9b0c24 100644
--- a/src/plugins/platforms/cocoa/qcocoaglcontext.mm
+++ b/src/plugins/platforms/cocoa/qcocoaglcontext.mm
@@ -390,7 +390,7 @@ void QCocoaGLContext::updateSurfaceFormat()
void QCocoaGLContext::doneCurrent()
{
if (m_currentWindow && m_currentWindow.data()->handle())
- static_cast<QCocoaWindow *>(m_currentWindow.data()->handle())->setCurrentContext(0);
+ static_cast<QCocoaWindow *>(m_currentWindow.data()->handle())->setCurrentContext(nullptr);
m_currentWindow.clear();
diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.h b/src/plugins/platforms/cocoa/qcocoahelpers.h
index 84632c1487..cf8a241db5 100644
--- a/src/plugins/platforms/cocoa/qcocoahelpers.h
+++ b/src/plugins/platforms/cocoa/qcocoahelpers.h
@@ -62,25 +62,32 @@ Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QNSView));
QT_BEGIN_NAMESPACE
-Q_DECLARE_LOGGING_CATEGORY(lcQpaCocoaWindow)
-Q_DECLARE_LOGGING_CATEGORY(lcQpaCocoaDrawing)
-Q_DECLARE_LOGGING_CATEGORY(lcQpaCocoaMouse)
+Q_DECLARE_LOGGING_CATEGORY(lcQpaWindow)
+Q_DECLARE_LOGGING_CATEGORY(lcQpaDrawing)
+Q_DECLARE_LOGGING_CATEGORY(lcQpaMouse)
class QPixmap;
class QString;
// Conversion functions
-QStringList qt_mac_NSArrayToQStringList(void *nsarray);
-void *qt_mac_QStringListToNSMutableArrayVoid(const QStringList &list);
-
-inline NSMutableArray *qt_mac_QStringListToNSMutableArray(const QStringList &qstrlist)
-{ return reinterpret_cast<NSMutableArray *>(qt_mac_QStringListToNSMutableArrayVoid(qstrlist)); }
+QStringList qt_mac_NSArrayToQStringList(NSArray<NSString *> *nsarray);
+NSMutableArray<NSString *> *qt_mac_QStringListToNSMutableArray(const QStringList &list);
NSDragOperation qt_mac_mapDropAction(Qt::DropAction action);
NSDragOperation qt_mac_mapDropActions(Qt::DropActions actions);
Qt::DropAction qt_mac_mapNSDragOperation(NSDragOperation nsActions);
Qt::DropActions qt_mac_mapNSDragOperations(NSDragOperation nsActions);
+template <typename T>
+typename std::enable_if<std::is_pointer<T>::value, T>::type
+qt_objc_cast(id object)
+{
+ if ([object isKindOfClass:[typename std::remove_pointer<T>::type class]])
+ return static_cast<T>(object);
+
+ return nil;
+}
+
QT_MANGLE_NAMESPACE(QNSView) *qnsview_cast(NSView *view);
// Misc
@@ -91,6 +98,12 @@ QPointF qt_mac_flip(const QPointF &pos, const QRectF &reference);
QRectF qt_mac_flip(const QRectF &rect, const QRectF &reference);
Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum);
+Qt::MouseButton cocoaButton2QtButton(NSEvent *event);
+
+QEvent::Type cocoaEvent2QtMouseEvent(NSEvent *event);
+
+Qt::MouseButtons cocoaMouseButtons2QtMouseButtons(NSInteger pressedMouseButtons);
+Qt::MouseButtons currentlyPressedMouseButtons();
// strip out '&' characters, and convert "&&" to a single '&', in menu
// text - since menu text is sometimes decorated with these for Windows
@@ -170,12 +183,7 @@ QT_END_NAMESPACE
- (void)onCancelClicked;
@end
-@interface QT_MANGLE_NAMESPACE(QNSPanelContentsWrapper) : NSView {
- NSButton *_okButton;
- NSButton *_cancelButton;
- NSView *_panelContents;
- NSEdgeInsets _panelContentsMargins;
-}
+@interface QT_MANGLE_NAMESPACE(QNSPanelContentsWrapper) : NSView
@property (nonatomic, readonly) NSButton *okButton;
@property (nonatomic, readonly) NSButton *cancelButton;
@@ -187,6 +195,7 @@ QT_END_NAMESPACE
- (NSButton *)createButtonWithTitle:(const char *)title;
- (void)layout;
+
@end
QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSPanelContentsWrapper);
diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.mm b/src/plugins/platforms/cocoa/qcocoahelpers.mm
index e5954f277c..7ba7908d27 100644
--- a/src/plugins/platforms/cocoa/qcocoahelpers.mm
+++ b/src/plugins/platforms/cocoa/qcocoahelpers.mm
@@ -57,29 +57,27 @@
QT_BEGIN_NAMESPACE
-Q_LOGGING_CATEGORY(lcQpaCocoaWindow, "qt.qpa.cocoa.window");
-Q_LOGGING_CATEGORY(lcQpaCocoaDrawing, "qt.qpa.cocoa.drawing");
-Q_LOGGING_CATEGORY(lcQpaCocoaMouse, "qt.qpa.cocoa.mouse");
+Q_LOGGING_CATEGORY(lcQpaWindow, "qt.qpa.window");
+Q_LOGGING_CATEGORY(lcQpaDrawing, "qt.qpa.drawing");
+Q_LOGGING_CATEGORY(lcQpaMouse, "qt.qpa.input.mouse");
//
// Conversion Functions
//
-QStringList qt_mac_NSArrayToQStringList(void *nsarray)
+QStringList qt_mac_NSArrayToQStringList(NSArray<NSString *> *array)
{
QStringList result;
- NSArray *array = static_cast<NSArray *>(nsarray);
- for (NSUInteger i=0; i<[array count]; ++i)
- result << QString::fromNSString([array objectAtIndex:i]);
+ for (NSString *string in array)
+ result << QString::fromNSString(string);
return result;
}
-void *qt_mac_QStringListToNSMutableArrayVoid(const QStringList &list)
+NSMutableArray<NSString *> *qt_mac_QStringListToNSMutableArray(const QStringList &list)
{
- NSMutableArray *result = [NSMutableArray arrayWithCapacity:list.size()];
- for (int i=0; i<list.size(); ++i){
- [result addObject:list[i].toNSString()];
- }
+ NSMutableArray<NSString *> *result = [NSMutableArray<NSString *> arrayWithCapacity:list.size()];
+ for (const QString &string : list)
+ [result addObject:string.toNSString()];
return result;
}
@@ -93,6 +91,7 @@ struct dndenum_mapper
static dndenum_mapper dnd_enums[] = {
{ NSDragOperationLink, Qt::LinkAction, true },
{ NSDragOperationMove, Qt::MoveAction, true },
+ { NSDragOperationDelete, Qt::MoveAction, true },
{ NSDragOperationCopy, Qt::CopyAction, true },
{ NSDragOperationGeneric, Qt::CopyAction, false },
{ NSDragOperationEvery, Qt::ActionMask, false },
@@ -161,10 +160,7 @@ Qt::DropActions qt_mac_mapNSDragOperations(NSDragOperation nsActions)
*/
QNSView *qnsview_cast(NSView *view)
{
- if (![view isKindOfClass:[QNSView class]])
- return nil;
-
- return static_cast<QNSView *>(view);
+ return qt_objc_cast<QNSView *>(view);
}
//
@@ -282,6 +278,90 @@ Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum)
return Qt::NoButton;
}
+/*!
+ \fn Qt::MouseButton cocoaButton2QtButton(NSEvent *event)
+
+ Returns the Qt::Button that corresponds to an NSEvent.buttonNumber.
+
+ \note AppKit will use buttonNumber 0 to indicate both "left button"
+ and "no button". Only NSEvents that describes mouse press/release/dragging
+ events (e.g NSEventTypeOtherMouseDown) will contain a valid
+ button number.
+
+ \note Wacom tablet might not return the correct button number for NSEvent buttonNumber
+ on right clicks. Decide here that the button is the "right" button.
+*/
+Qt::MouseButton cocoaButton2QtButton(NSEvent *event)
+{
+ switch (event.type) {
+ case NSMouseMoved:
+ return Qt::NoButton;
+
+ case NSRightMouseUp:
+ case NSRightMouseDown:
+ case NSRightMouseDragged:
+ return Qt::RightButton;
+
+ default:
+ break;
+ }
+
+ return cocoaButton2QtButton(event.buttonNumber);
+}
+
+/*!
+ \fn QEvent::Type cocoaEvent2QtMouseEvent(NSEvent *event)
+
+ Returns the QEvent::Type that corresponds to an NSEvent.type.
+*/
+QEvent::Type cocoaEvent2QtMouseEvent(NSEvent *event)
+{
+ switch (event.type) {
+ case NSLeftMouseDown:
+ case NSRightMouseDown:
+ case NSOtherMouseDown:
+ return QEvent::MouseButtonPress;
+
+ case NSLeftMouseUp:
+ case NSRightMouseUp:
+ case NSOtherMouseUp:
+ return QEvent::MouseButtonRelease;
+
+ case NSLeftMouseDragged:
+ case NSRightMouseDragged:
+ case NSOtherMouseDragged:
+ return QEvent::MouseMove;
+
+ case NSMouseMoved:
+ return QEvent::MouseMove;
+
+ default:
+ break;
+ }
+
+ return QEvent::None;
+}
+
+/*!
+ \fn Qt::MouseButtons cocoaMouseButtons2QtMouseButtons(NSInteger pressedMouseButtons)
+
+ Returns the Qt::MouseButtons that corresponds to an NSEvent.pressedMouseButtons.
+*/
+Qt::MouseButtons cocoaMouseButtons2QtMouseButtons(NSInteger pressedMouseButtons)
+{
+ return static_cast<Qt::MouseButton>(pressedMouseButtons & Qt::MouseButtonMask);
+}
+
+/*!
+ \fn Qt::MouseButtons currentlyPressedMouseButtons()
+
+ Returns the Qt::MouseButtons that corresponds to an NSEvent.pressedMouseButtons.
+*/
+Qt::MouseButtons currentlyPressedMouseButtons()
+{
+ return cocoaMouseButtons2QtMouseButtons(NSEvent.pressedMouseButtons);
+}
+
QString qt_mac_removeAmpersandEscapes(QString s)
{
return QPlatformTheme::removeMnemonics(s).trimmed();
@@ -298,7 +378,12 @@ QT_END_NAMESPACE
the target-action for the OK/Cancel buttons and making
sure the layout is consistent.
*/
-@implementation QNSPanelContentsWrapper
+@implementation QNSPanelContentsWrapper {
+ NSButton *_okButton;
+ NSButton *_cancelButton;
+ NSView *_panelContents;
+ NSEdgeInsets _panelContentsMargins;
+}
@synthesize okButton = _okButton;
@synthesize cancelButton = _cancelButton;
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.h b/src/plugins/platforms/cocoa/qcocoaintegration.h
index 301771fd53..7de7e073de 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.h
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.h
@@ -51,6 +51,9 @@
#include "qcocoadrag.h"
#include "qcocoaservices.h"
#include "qcocoakeymapper.h"
+#if QT_CONFIG(vulkan)
+#include "qcocoavulkaninstance.h"
+#endif
#include <QtCore/QScopedPointer>
#include <qpa/qplatformintegration.h>
@@ -86,6 +89,11 @@ public:
QAbstractEventDispatcher *createEventDispatcher() const override;
+#if QT_CONFIG(vulkan)
+ QPlatformVulkanInstance *createPlatformVulkanInstance(QVulkanInstance *instance) const override;
+ QCocoaVulkanInstance *getCocoaVulkanInstance() const;
+#endif
+
QCoreTextFontDatabase *fontDatabase() const override;
QCocoaNativeInterface *nativeInterface() const override;
QPlatformInputContext *inputContext() const override;
@@ -144,6 +152,9 @@ private:
QScopedPointer<QCocoaServices> mServices;
QScopedPointer<QCocoaKeyMapper> mKeyboardMapper;
+#if QT_CONFIG(vulkan)
+ mutable QCocoaVulkanInstance *mCocoaVulkanInstance = nullptr;
+#endif
QHash<QWindow *, NSToolbar *> mToolbars;
QList<QCocoaWindow *> m_popupWindowStack;
};
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm
index 55b3805df3..ce3a1304b2 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.mm
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm
@@ -94,11 +94,11 @@ static QCocoaIntegration::Options parseOptions(const QStringList &paramList)
return options;
}
-QCocoaIntegration *QCocoaIntegration::mInstance = 0;
+QCocoaIntegration *QCocoaIntegration::mInstance = nullptr;
QCocoaIntegration::QCocoaIntegration(const QStringList &paramList)
: mOptions(parseOptions(paramList))
- , mFontDb(0)
+ , mFontDb(nullptr)
#ifndef QT_NO_ACCESSIBILITY
, mAccessibility(new QCocoaAccessibility)
#endif
@@ -110,7 +110,7 @@ QCocoaIntegration::QCocoaIntegration(const QStringList &paramList)
, mServices(new QCocoaServices)
, mKeyboardMapper(new QCocoaKeyMapper)
{
- if (mInstance != 0)
+ if (mInstance)
qWarning("Creating multiple Cocoa platform integrations is not supported");
mInstance = this;
@@ -186,7 +186,7 @@ QCocoaIntegration::QCocoaIntegration(const QStringList &paramList)
QCocoaIntegration::~QCocoaIntegration()
{
- mInstance = 0;
+ mInstance = nullptr;
qt_resetNSApplicationSendEvent();
@@ -196,7 +196,7 @@ QCocoaIntegration::~QCocoaIntegration()
QCocoaApplicationDelegate *delegate = [QCocoaApplicationDelegate sharedDelegate];
[delegate removeAppleEventHandlers];
// reset the application delegate
- [[NSApplication sharedApplication] setDelegate: 0];
+ [[NSApplication sharedApplication] setDelegate:nil];
}
#ifndef QT_NO_CLIPBOARD
@@ -225,15 +225,15 @@ QCocoaIntegration::Options QCocoaIntegration::options() const
return mOptions;
}
-Q_LOGGING_CATEGORY(lcCocoaScreen, "qt.qpa.cocoa.screens");
+Q_LOGGING_CATEGORY(lcQpaScreen, "qt.qpa.screen");
/*!
\brief Synchronizes the screen list, adds new screens, removes deleted ones
*/
void QCocoaIntegration::updateScreens()
{
- NSArray *scrs = [NSScreen screens];
- NSMutableArray *screens = [NSMutableArray arrayWithArray:scrs];
+ NSArray<NSScreen *> *scrs = [NSScreen screens];
+ NSMutableArray<NSScreen *> *screens = [NSMutableArray<NSScreen *> arrayWithArray:scrs];
if ([screens count] == 0)
if ([NSScreen mainScreen])
[screens addObject:[NSScreen mainScreen]];
@@ -244,7 +244,7 @@ void QCocoaIntegration::updateScreens()
uint screenCount = [screens count];
for (uint i = 0; i < screenCount; i++) {
NSScreen* scr = [screens objectAtIndex:i];
- CGDirectDisplayID dpy = [[[scr deviceDescription] objectForKey:@"NSScreenNumber"] unsignedIntValue];
+ CGDirectDisplayID dpy = scr.qt_displayId;
// If this screen is a mirror and is not the primary one of the mirror set, ignore it.
// Exception: The NSScreen API has been observed to a return a screen list with one
// mirrored, non-primary screen when Qt is running as a startup item. Always use the
@@ -254,7 +254,7 @@ void QCocoaIntegration::updateScreens()
if (primary != kCGNullDirectDisplay && primary != dpy)
continue;
}
- QCocoaScreen* screen = NULL;
+ QCocoaScreen* screen = nullptr;
foreach (QCocoaScreen* existingScr, mScreens)
// NSScreen documentation says do not cache the array returned from [NSScreen screens].
// However in practice, we can identify a screen by its pointer: if resolution changes,
@@ -266,11 +266,11 @@ void QCocoaIntegration::updateScreens()
if (screen) {
remainingScreens.remove(screen);
screen->updateGeometry();
- qCDebug(lcCocoaScreen) << "Updated properties of" << screen;
+ qCDebug(lcQpaScreen) << "Updated properties of" << screen;
} else {
screen = new QCocoaScreen(i);
mScreens.append(screen);
- qCDebug(lcCocoaScreen) << "Adding" << screen;
+ qCDebug(lcQpaScreen) << "Adding" << screen;
screenAdded(screen);
}
siblings << screen;
@@ -287,7 +287,7 @@ void QCocoaIntegration::updateScreens()
mScreens.removeOne(screen);
// Prevent stale references to NSScreen during destroy
screen->m_screenIndex = -1;
- qCDebug(lcCocoaScreen) << "Removing" << screen;
+ qCDebug(lcQpaScreen) << "Removing" << screen;
destroyScreen(screen);
}
}
@@ -296,7 +296,7 @@ QCocoaScreen *QCocoaIntegration::screenForNSScreen(NSScreen *nsScreen)
{
NSUInteger index = [[NSScreen screens] indexOfObject:nsScreen];
if (index == NSNotFound)
- return 0;
+ return nullptr;
if (index >= unsigned(mScreens.count()))
updateScreens();
@@ -306,7 +306,7 @@ QCocoaScreen *QCocoaIntegration::screenForNSScreen(NSScreen *nsScreen)
return screen;
}
- return 0;
+ return nullptr;
}
bool QCocoaIntegration::hasCapability(QPlatformIntegration::Capability cap) const
@@ -379,6 +379,19 @@ QAbstractEventDispatcher *QCocoaIntegration::createEventDispatcher() const
return new QCocoaEventDispatcher;
}
+#if QT_CONFIG(vulkan)
+QPlatformVulkanInstance *QCocoaIntegration::createPlatformVulkanInstance(QVulkanInstance *instance) const
+{
+ mCocoaVulkanInstance = new QCocoaVulkanInstance(instance);
+ return mCocoaVulkanInstance;
+}
+
+QCocoaVulkanInstance *QCocoaIntegration::getCocoaVulkanInstance() const
+{
+ return mCocoaVulkanInstance;
+}
+#endif
+
QCoreTextFontDatabase *QCocoaIntegration::fontDatabase() const
{
return mFontDb.data();
@@ -480,14 +493,14 @@ void QCocoaIntegration::pushPopupWindow(QCocoaWindow *window)
QCocoaWindow *QCocoaIntegration::popPopupWindow()
{
if (m_popupWindowStack.isEmpty())
- return 0;
+ return nullptr;
return m_popupWindowStack.takeLast();
}
QCocoaWindow *QCocoaIntegration::activePopupWindow() const
{
if (m_popupWindowStack.isEmpty())
- return 0;
+ return nullptr;
return m_popupWindowStack.front();
}
diff --git a/src/plugins/platforms/cocoa/qcocoaintrospection.h b/src/plugins/platforms/cocoa/qcocoaintrospection.h
index 1d984b9857..20001ac71d 100644
--- a/src/plugins/platforms/cocoa/qcocoaintrospection.h
+++ b/src/plugins/platforms/cocoa/qcocoaintrospection.h
@@ -76,7 +76,7 @@
QT_BEGIN_NAMESPACE
-void qt_cocoa_change_implementation(Class baseClass, SEL originalSel, Class proxyClass, SEL replacementSel = 0, SEL backupSel = 0);
+void qt_cocoa_change_implementation(Class baseClass, SEL originalSel, Class proxyClass, SEL replacementSel = nil, SEL backupSel = nil);
void qt_cocoa_change_back_implementation(Class baseClass, SEL originalSel, SEL backupSel);
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/cocoa/qcocoakeymapper.mm b/src/plugins/platforms/cocoa/qcocoakeymapper.mm
index 80140505d1..5408178824 100644
--- a/src/plugins/platforms/cocoa/qcocoakeymapper.mm
+++ b/src/plugins/platforms/cocoa/qcocoakeymapper.mm
@@ -357,17 +357,17 @@ Qt::KeyboardModifiers QCocoaKeyMapper::queryKeyboardModifiers()
bool QCocoaKeyMapper::updateKeyboard()
{
- const UCKeyboardLayout *uchrData = 0;
+ const UCKeyboardLayout *uchrData = nullptr;
QCFType<TISInputSourceRef> source = TISCopyInputMethodKeyboardLayoutOverride();
if (!source)
source = TISCopyCurrentKeyboardInputSource();
if (keyboard_mode != NullMode && source == currentInputSource) {
return false;
}
- Q_ASSERT(source != 0);
+ Q_ASSERT(source);
CFDataRef data = static_cast<CFDataRef>(TISGetInputSourceProperty(source,
kTISPropertyUnicodeKeyLayoutData));
- uchrData = data ? reinterpret_cast<const UCKeyboardLayout *>(CFDataGetBytePtr(data)) : 0;
+ uchrData = data ? reinterpret_cast<const UCKeyboardLayout *>(CFDataGetBytePtr(data)) : nullptr;
keyboard_kind = LMGetKbdType();
if (uchrData) {
@@ -386,7 +386,7 @@ void QCocoaKeyMapper::deleteLayouts()
for (int i = 0; i < 255; ++i) {
if (keyLayout[i]) {
delete keyLayout[i];
- keyLayout[i] = 0;
+ keyLayout[i] = nullptr;
}
}
}
diff --git a/src/plugins/platforms/cocoa/qcocoamenu.h b/src/plugins/platforms/cocoa/qcocoamenu.h
index 6db4e04c61..34d8428188 100644
--- a/src/plugins/platforms/cocoa/qcocoamenu.h
+++ b/src/plugins/platforms/cocoa/qcocoamenu.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author James Turner <james.turner@kdab.com>
** Contact: https://www.qt.io/licensing/
**
diff --git a/src/plugins/platforms/cocoa/qcocoamenu.mm b/src/plugins/platforms/cocoa/qcocoamenu.mm
index a788ac7d45..90e90b32b6 100644
--- a/src/plugins/platforms/cocoa/qcocoamenu.mm
+++ b/src/plugins/platforms/cocoa/qcocoamenu.mm
@@ -1,5 +1,6 @@
/****************************************************************************
**
+** Copyright (C) 2018 The Qt Company Ltd.
** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author James Turner <james.turner@kdab.com>
** Contact: https://www.qt.io/licensing/
**
@@ -53,7 +54,7 @@
QT_BEGIN_NAMESPACE
QCocoaMenu::QCocoaMenu() :
- m_attachedItem(0),
+ m_attachedItem(nil),
m_updateTimer(0),
m_enabled(true),
m_parentEnabled(true),
@@ -62,14 +63,14 @@ QCocoaMenu::QCocoaMenu() :
{
QMacAutoReleasePool pool;
- m_nativeMenu = [[QCocoaNSMenu alloc] initWithQPAMenu:this];
+ m_nativeMenu = [[QCocoaNSMenu alloc] initWithPlatformMenu:this];
}
QCocoaMenu::~QCocoaMenu()
{
- foreach (QCocoaMenuItem *item, m_menuItems) {
+ for (auto *item : qAsConst(m_menuItems)) {
if (item->menuParent() == this)
- item->setMenuParent(0);
+ item->setMenuParent(nullptr);
}
[m_nativeMenu release];
@@ -79,7 +80,7 @@ void QCocoaMenu::setText(const QString &text)
{
QMacAutoReleasePool pool;
QString stripped = qt_mac_removeAmpersandEscapes(text);
- [m_nativeMenu setTitle:stripped.toNSString()];
+ m_nativeMenu.title = stripped.toNSString();
}
void QCocoaMenu::setMinimumWidth(int width)
@@ -132,7 +133,7 @@ void QCocoaMenu::insertMenuItem(QPlatformMenuItem *menuItem, QPlatformMenuItem *
void QCocoaMenu::insertNative(QCocoaMenuItem *item, QCocoaMenuItem *beforeItem)
{
- setItemTargetAction(item);
+ item->resolveTargetAction();
NSMenuItem *nativeItem = item->nsItem();
// Someone's adding new items after aboutToShow() was emitted
if (isOpen() && nativeItem && item->menu())
@@ -187,25 +188,25 @@ void QCocoaMenu::removeMenuItem(QPlatformMenuItem *menuItem)
}
if (cocoaItem->menuParent() == this)
- cocoaItem->setMenuParent(0);
+ cocoaItem->setMenuParent(nullptr);
// Ignore any parent enabled state
cocoaItem->setParentEnabled(true);
m_menuItems.removeOne(cocoaItem);
if (!cocoaItem->isMerged()) {
- if (m_nativeMenu != [cocoaItem->nsItem() menu]) {
+ if (m_nativeMenu != cocoaItem->nsItem().menu) {
qWarning("Item to remove does not belong to this menu");
return;
}
- [m_nativeMenu removeItem: cocoaItem->nsItem()];
+ [m_nativeMenu removeItem:cocoaItem->nsItem()];
}
}
QCocoaMenuItem *QCocoaMenu::itemOrNull(int index) const
{
if ((index < 0) || (index >= m_menuItems.size()))
- return 0;
+ return nullptr;
return m_menuItems.at(index);
}
@@ -247,8 +248,8 @@ void QCocoaMenu::syncMenuItem_helper(QPlatformMenuItem *menuItem, bool menubarUp
// native item was changed for some reason
if (oldItem) {
if (wasMerged) {
- [oldItem setEnabled:NO];
- [oldItem setHidden:YES];
+ oldItem.enabled = NO;
+ oldItem.hidden = YES;
} else {
[m_nativeMenu removeItem:oldItem];
}
@@ -278,31 +279,27 @@ void QCocoaMenu::syncSeparatorsCollapsible(bool enable)
bool previousIsSeparator = true; // setting to true kills all the separators placed at the top.
NSMenuItem *previousItem = nil;
- NSArray *itemArray = [m_nativeMenu itemArray];
- for (unsigned int i = 0; i < [itemArray count]; ++i) {
- NSMenuItem *item = reinterpret_cast<NSMenuItem *>([itemArray objectAtIndex:i]);
- if ([item isSeparatorItem]) {
- QCocoaMenuItem *cocoaItem = reinterpret_cast<QCocoaMenuItem *>([item tag]);
- if (cocoaItem)
+ for (NSMenuItem *item in m_nativeMenu.itemArray) {
+ if (item.separatorItem) {
+ if (auto *cocoaItem = qt_objc_cast<QCocoaNSMenuItem *>(item).platformMenuItem)
cocoaItem->setVisible(!previousIsSeparator);
- [item setHidden:previousIsSeparator];
+ item.hidden = previousIsSeparator;
}
- if (![item isHidden]) {
+ if (!item.hidden) {
previousItem = item;
- previousIsSeparator = ([previousItem isSeparatorItem]);
+ previousIsSeparator = previousItem.separatorItem;
}
}
// We now need to check the final item since we don't want any separators at the end of the list.
if (previousItem && previousIsSeparator) {
- QCocoaMenuItem *cocoaItem = reinterpret_cast<QCocoaMenuItem *>([previousItem tag]);
- if (cocoaItem)
+ if (auto *cocoaItem = qt_objc_cast<QCocoaNSMenuItem *>(previousItem).platformMenuItem)
cocoaItem->setVisible(false);
- [previousItem setHidden:YES];
+ previousItem.hidden = YES;
}
} else {
- foreach (QCocoaMenuItem *item, m_menuItems) {
+ for (auto *item : qAsConst(m_menuItems)) {
if (!item->isSeparator())
continue;
@@ -324,7 +321,7 @@ void QCocoaMenu::setEnabled(bool enabled)
bool QCocoaMenu::isEnabled() const
{
- return m_attachedItem ? [m_attachedItem isEnabled] : m_enabled && m_parentEnabled;
+ return m_attachedItem ? m_attachedItem.enabled : m_enabled && m_parentEnabled;
}
void QCocoaMenu::setVisible(bool visible)
@@ -337,11 +334,11 @@ void QCocoaMenu::showPopup(const QWindow *parentWindow, const QRect &targetRect,
QMacAutoReleasePool pool;
QPoint pos = QPoint(targetRect.left(), targetRect.top() + targetRect.height());
- QCocoaWindow *cocoaWindow = parentWindow ? static_cast<QCocoaWindow *>(parentWindow->handle()) : 0;
+ QCocoaWindow *cocoaWindow = parentWindow ? static_cast<QCocoaWindow *>(parentWindow->handle()) : nullptr;
NSView *view = cocoaWindow ? cocoaWindow->view() : nil;
NSMenuItem *nsItem = item ? ((QCocoaMenuItem *)item)->nsItem() : nil;
- QScreen *screen = 0;
+ QScreen *screen = nullptr;
if (parentWindow)
screen = parentWindow->screen();
if (!screen && !QGuiApplication::screens().isEmpty())
@@ -360,9 +357,9 @@ void QCocoaMenu::showPopup(const QWindow *parentWindow, const QRect &targetRect,
// respect the menu's minimum width.
NSPopUpButtonCell *popupCell = [[[NSPopUpButtonCell alloc] initTextCell:@"" pullsDown:NO]
autorelease];
- [popupCell setAltersStateOfSelectedItem:NO];
- [popupCell setTransparent:YES];
- [popupCell setMenu:m_nativeMenu];
+ popupCell.altersStateOfSelectedItem = NO;
+ popupCell.transparent = YES;
+ popupCell.menu = m_nativeMenu;
[popupCell selectItem:nsItem];
QCocoaScreen *cocoaScreen = static_cast<QCocoaScreen *>(screen->handle());
@@ -405,7 +402,7 @@ void QCocoaMenu::showPopup(const QWindow *parentWindow, const QRect &targetRect,
pressure:1.0];
[NSMenu popUpContextMenu:m_nativeMenu withEvent:menuEvent forView:view];
} else {
- [m_nativeMenu popUpMenuPositioningItem:nsItem atLocation:nsPos inView:0];
+ [m_nativeMenu popUpMenuPositioningItem:nsItem atLocation:nsPos inView:nil];
}
}
@@ -425,17 +422,17 @@ QPlatformMenuItem *QCocoaMenu::menuItemAt(int position) const
if (0 <= position && position < m_menuItems.count())
return m_menuItems.at(position);
- return 0;
+ return nullptr;
}
QPlatformMenuItem *QCocoaMenu::menuItemForTag(quintptr tag) const
{
- foreach (QCocoaMenuItem *item, m_menuItems) {
+ for (auto *item : qAsConst(m_menuItems)) {
if (item->tag() == tag)
return item;
}
- return 0;
+ return nullptr;
}
QList<QCocoaMenuItem *> QCocoaMenu::items() const
@@ -446,7 +443,7 @@ QList<QCocoaMenuItem *> QCocoaMenu::items() const
QList<QCocoaMenuItem *> QCocoaMenu::merged() const
{
QList<QCocoaMenuItem *> result;
- foreach (QCocoaMenuItem *item, m_menuItems) {
+ for (auto *item : qAsConst(m_menuItems)) {
if (item->menu()) { // recurse into submenus
result.append(item->menu()->merged());
continue;
@@ -467,7 +464,7 @@ void QCocoaMenu::propagateEnabledState(bool enabled)
if (!m_enabled && enabled) // Some ancestor was enabled, but this menu is not
return;
- foreach (QCocoaMenuItem *item, m_menuItems) {
+ for (auto *item : qAsConst(m_menuItems)) {
if (QCocoaMenu *menu = item->menu())
menu->propagateEnabledState(enabled);
else
@@ -495,11 +492,4 @@ NSMenuItem *QCocoaMenu::attachedItem() const
return m_attachedItem;
}
-void QCocoaMenu::setItemTargetAction(QCocoaMenuItem *item) const
-{
- auto *nsItem = item->nsItem();
- nsItem.target = m_nativeMenu;
- nsItem.action = @selector(qt_itemFired:);
-}
-
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/cocoa/qcocoamenubar.h b/src/plugins/platforms/cocoa/qcocoamenubar.h
index 6f3aca3a51..50b6e69720 100644
--- a/src/plugins/platforms/cocoa/qcocoamenubar.h
+++ b/src/plugins/platforms/cocoa/qcocoamenubar.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author James Turner <james.turner@kdab.com>
** Contact: https://www.qt.io/licensing/
**
@@ -60,17 +60,16 @@ public:
void removeMenu(QPlatformMenu *menu) override;
void syncMenu(QPlatformMenu *menuItem) override;
void handleReparent(QWindow *newParentWindow) override;
+ QWindow *parentWindow() const override;
QPlatformMenu *menuForTag(quintptr tag) const override;
inline NSMenu *nsMenu() const
{ return m_nativeMenu; }
- static void redirectKnownMenuItemsToFirstResponder();
- static void resetKnownMenuItemsToQt();
static void updateMenuBarImmediately();
QList<QCocoaMenuItem*> merged() const;
- NSMenuItem *itemForRole(QPlatformMenuItem::MenuRole r);
+ NSMenuItem *itemForRole(QPlatformMenuItem::MenuRole role);
QCocoaWindow *cocoaWindow() const;
void syncMenu_helper(QPlatformMenu *menu, bool menubarUpdate);
diff --git a/src/plugins/platforms/cocoa/qcocoamenubar.mm b/src/plugins/platforms/cocoa/qcocoamenubar.mm
index 61ac5eb7f0..30bff78a36 100644
--- a/src/plugins/platforms/cocoa/qcocoamenubar.mm
+++ b/src/plugins/platforms/cocoa/qcocoamenubar.mm
@@ -1,5 +1,6 @@
/****************************************************************************
**
+** Copyright (C) 2018 The Qt Company Ltd.
** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author James Turner <james.turner@kdab.com>
** Contact: https://www.qt.io/licensing/
**
@@ -67,7 +68,7 @@ QCocoaMenuBar::~QCocoaMenuBar()
#ifdef QT_COCOA_ENABLE_MENU_DEBUG
qDebug() << "~QCocoaMenuBar" << this;
#endif
- foreach (QCocoaMenu *menu, m_menus) {
+ for (auto menu : qAsConst(m_menus)) {
if (!menu)
continue;
NSMenuItem *item = nativeItemForMenu(menu);
@@ -79,14 +80,13 @@ QCocoaMenuBar::~QCocoaMenuBar()
static_menubars.removeOne(this);
if (!m_window.isNull() && m_window->menubar() == this) {
- m_window->setMenubar(0);
+ m_window->setMenubar(nullptr);
// Delete the children first so they do not cause
// the native menu items to be hidden after
// the menu bar was updated
qDeleteAll(children());
updateMenuBarImmediately();
- resetKnownMenuItemsToQt();
}
}
@@ -199,8 +199,8 @@ void QCocoaMenuBar::syncMenu_helper(QPlatformMenu *menu, bool menubarUpdate)
// If the NSMenu has no visble items, or only separators, we should hide it
// on the menubar. This can happen after syncing the menu items since they
// can be moved to other menus.
- for (NSMenuItem *item in [cocoaMenu->nsMenu() itemArray])
- if (![item isSeparatorItem] && ![item isHidden]) {
+ for (NSMenuItem *item in cocoaMenu->nsMenu().itemArray)
+ if (!item.separatorItem && !item.hidden) {
shouldHide = NO;
break;
}
@@ -230,7 +230,7 @@ void QCocoaMenuBar::handleReparent(QWindow *newParentWindow)
if (!m_window.isNull())
m_window->setMenubar(nullptr);
- if (newParentWindow == nullptr) {
+ if (!newParentWindow) {
m_window.clear();
} else {
newParentWindow->create();
@@ -241,82 +241,28 @@ void QCocoaMenuBar::handleReparent(QWindow *newParentWindow)
updateMenuBarImmediately();
}
+QWindow *QCocoaMenuBar::parentWindow() const
+{
+ return m_window ? m_window->window() : nullptr;
+}
+
+
QCocoaWindow *QCocoaMenuBar::findWindowForMenubar()
{
if (qApp->focusWindow())
return static_cast<QCocoaWindow*>(qApp->focusWindow()->handle());
- return NULL;
+ return nullptr;
}
QCocoaMenuBar *QCocoaMenuBar::findGlobalMenubar()
{
- foreach (QCocoaMenuBar *mb, static_menubars) {
- if (mb->m_window.isNull())
- return mb;
+ for (auto *menubar : qAsConst(static_menubars)) {
+ if (menubar->m_window.isNull())
+ return menubar;
}
- return NULL;
-}
-
-void QCocoaMenuBar::redirectKnownMenuItemsToFirstResponder()
-{
- // QTBUG-17291: http://forums.macrumors.com/showthread.php?t=1249452
- // When a dialog is opened, shortcuts for actions inside the dialog (cut, paste, ...)
- // continue to go through the same menu items which claimed those shortcuts.
- // They are not keystrokes which we can intercept in any other way; the OS intercepts them.
- // The menu items had to be created by the application. That's why we need roles
- // to identify those "special" menu items which can be useful even when non-Qt
- // native widgets are in focus. When the native widget is focused it will be the
- // first responder, so the menu item needs to have its target be the first responder;
- // this is done by setting it to nil.
-
- // This function will find all menu items on all menus which have
- // "special" roles, set the target and also set the standard actions which
- // apply to those roles. But afterwards it is necessary to call
- // resetKnownMenuItemsToQt() to put back the target and action so that
- // those menu items will go back to invoking their associated QActions.
- foreach (QCocoaMenuBar *mb, static_menubars)
- foreach (QCocoaMenu *m, mb->m_menus)
- foreach (QCocoaMenuItem *i, m->items()) {
- bool known = true;
- switch (i->effectiveRole()) {
- case QPlatformMenuItem::CutRole:
- [i->nsItem() setAction:@selector(cut:)];
- break;
- case QPlatformMenuItem::CopyRole:
- [i->nsItem() setAction:@selector(copy:)];
- break;
- case QPlatformMenuItem::PasteRole:
- [i->nsItem() setAction:@selector(paste:)];
- break;
- case QPlatformMenuItem::SelectAllRole:
- [i->nsItem() setAction:@selector(selectAll:)];
- break;
- // We may discover later that there are other roles/actions which
- // are meaningful to standard native widgets; they can be added.
- default:
- known = false;
- break;
- }
- if (known)
- [i->nsItem() setTarget:nil];
- }
-}
-
-void QCocoaMenuBar::resetKnownMenuItemsToQt()
-{
- // Undo the effect of redirectKnownMenuItemsToFirstResponder():
- // reset the menu items' target/action.
- foreach (QCocoaMenuBar *mb, static_menubars) {
- foreach (QCocoaMenu *m, mb->m_menus) {
- foreach (QCocoaMenuItem *i, m->items()) {
- if (i->effectiveRole() >= QPlatformMenuItem::ApplicationSpecificRole) {
- m->setItemTargetAction(i);
- }
- }
- }
- }
+ return nullptr;
}
void QCocoaMenuBar::updateMenuBarImmediately()
@@ -325,7 +271,7 @@ void QCocoaMenuBar::updateMenuBarImmediately()
QCocoaMenuBar *mb = findGlobalMenubar();
QCocoaWindow *cw = findWindowForMenubar();
- QWindow *win = cw ? cw->window() : 0;
+ QWindow *win = cw ? cw->window() : nullptr;
if (win && (win->flags() & Qt::Popup) == Qt::Popup) {
// context menus, comboboxes, etc. don't need to update the menubar,
// but if an application has only Qt::Tool window(s) on start,
@@ -353,7 +299,7 @@ void QCocoaMenuBar::updateMenuBarImmediately()
#endif
bool disableForModal = mb->shouldDisable(cw);
- foreach (QCocoaMenu *menu, mb->m_menus) {
+ for (auto menu : qAsConst(mb->m_menus)) {
if (!menu)
continue;
NSMenuItem *item = mb->nativeItemForMenu(menu);
@@ -368,16 +314,16 @@ void QCocoaMenuBar::updateMenuBarImmediately()
[loader ensureAppMenuInMenu:mb->nsMenu()];
NSMutableSet *mergedItems = [[NSMutableSet setWithCapacity:mb->merged().count()] retain];
- foreach (QCocoaMenuItem *m, mb->merged()) {
- [mergedItems addObject:m->nsItem()];
- m->syncMerged();
+ for (auto mergedItem : mb->merged()) {
+ [mergedItems addObject:mergedItem->nsItem()];
+ mergedItem->syncMerged();
}
// hide+disable all mergeable items we're not currently using
for (NSMenuItem *mergeable in [loader mergeable]) {
if (![mergedItems containsObject:mergeable]) {
- [mergeable setHidden:YES];
- [mergeable setEnabled:NO];
+ mergeable.hidden = YES;
+ mergeable.enabled = NO;
}
}
@@ -389,7 +335,7 @@ void QCocoaMenuBar::updateMenuBarImmediately()
QList<QCocoaMenuItem*> QCocoaMenuBar::merged() const
{
QList<QCocoaMenuItem*> r;
- foreach (QCocoaMenu* menu, m_menus)
+ for (auto menu : qAsConst(m_menus))
r.append(menu->merged());
return r;
@@ -409,11 +355,11 @@ bool QCocoaMenuBar::shouldDisable(QCocoaWindow *active) const
// When there is an application modal window on screen, the entries of
// the menubar should be disabled. The exception in Qt is that if the
// modal window is the only window on screen, then we enable the menu bar.
- foreach (QWindow *w, topWindows) {
- if (w->isVisible() && w->modality() == Qt::ApplicationModal) {
+ for (auto *window : qAsConst(topWindows)) {
+ if (window->isVisible() && window->modality() == Qt::ApplicationModal) {
// check for other visible windows
- foreach (QWindow *other, topWindows) {
- if ((w != other) && (other->isVisible())) {
+ for (auto *other : qAsConst(topWindows)) {
+ if ((window != other) && (other->isVisible())) {
// INVARIANT: we found another visible window
// on screen other than our modalWidget. We therefore
// disable the menu bar to follow normal modality logic:
@@ -433,21 +379,21 @@ bool QCocoaMenuBar::shouldDisable(QCocoaWindow *active) const
QPlatformMenu *QCocoaMenuBar::menuForTag(quintptr tag) const
{
- foreach (QCocoaMenu *menu, m_menus) {
+ for (auto menu : qAsConst(m_menus))
if (menu->tag() == tag)
return menu;
- }
- return 0;
+ return nullptr;
}
-NSMenuItem *QCocoaMenuBar::itemForRole(QPlatformMenuItem::MenuRole r)
+NSMenuItem *QCocoaMenuBar::itemForRole(QPlatformMenuItem::MenuRole role)
{
- foreach (QCocoaMenu *m, m_menus)
- foreach (QCocoaMenuItem *i, m->items())
- if (i->effectiveRole() == r)
- return i->nsItem();
- return nullptr;
+ for (auto menu : qAsConst(m_menus))
+ for (auto *item : menu->items())
+ if (item->effectiveRole() == role)
+ return item->nsItem();
+
+ return nil;
}
QCocoaWindow *QCocoaMenuBar::cocoaWindow() const
diff --git a/src/plugins/platforms/cocoa/qcocoamenuitem.h b/src/plugins/platforms/cocoa/qcocoamenuitem.h
index 2b598ee3a0..20fc741fb8 100644
--- a/src/plugins/platforms/cocoa/qcocoamenuitem.h
+++ b/src/plugins/platforms/cocoa/qcocoamenuitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author James Turner <james.turner@kdab.com>
** Contact: https://www.qt.io/licensing/
**
@@ -108,6 +108,7 @@ public:
QCocoaMenu *menu() const { return m_menu; }
MenuRole effectiveRole() const;
+ void resolveTargetAction();
private:
QString mergeText();
diff --git a/src/plugins/platforms/cocoa/qcocoamenuitem.mm b/src/plugins/platforms/cocoa/qcocoamenuitem.mm
index f8f9648822..e1572e1800 100644
--- a/src/plugins/platforms/cocoa/qcocoamenuitem.mm
+++ b/src/plugins/platforms/cocoa/qcocoamenuitem.mm
@@ -1,5 +1,6 @@
/****************************************************************************
**
+** Copyright (C) 2018 The Qt Company Ltd.
** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author James Turner <james.turner@kdab.com>
** Contact: https://www.qt.io/licensing/
**
@@ -41,6 +42,7 @@
#include "qcocoamenuitem.h"
+#include "qcocoansmenu.h"
#include "qcocoamenu.h"
#include "qcocoamenubar.h"
#include "messages.h"
@@ -49,7 +51,6 @@
#include "qcocoaapplication.h" // for custom application category
#include "qcocoamenuloader.h"
#include <QtGui/private/qcoregraphics_p.h>
-#include <QtCore/qregularexpression.h>
#include <QtCore/QDebug>
@@ -92,9 +93,9 @@ NSUInteger keySequenceModifierMask(const QKeySequence &accel)
#endif
QCocoaMenuItem::QCocoaMenuItem() :
- m_native(NULL),
+ m_native(nil),
m_itemView(nil),
- m_menu(NULL),
+ m_menu(nullptr),
m_role(NoRole),
m_iconSize(16),
m_textSynced(false),
@@ -112,9 +113,9 @@ QCocoaMenuItem::~QCocoaMenuItem()
QMacAutoReleasePool pool;
if (m_menu && m_menu->menuParent() == this)
- m_menu->setMenuParent(0);
+ m_menu->setMenuParent(nullptr);
if (m_merged) {
- [m_native setHidden:YES];
+ m_native.hidden = YES;
} else {
if (m_menu && m_menu->attachedItem() == m_native)
m_menu->setAttachedItem(nil);
@@ -140,7 +141,7 @@ void QCocoaMenuItem::setMenu(QPlatformMenu *menu)
return;
if (m_menu && m_menu->menuParent() == this) {
- m_menu->setMenuParent(0);
+ m_menu->setMenuParent(nullptr);
// Free the menu from its parent's influence
m_menu->propagateEnabledState(true);
if (m_native && m_menu->attachedItem() == m_native)
@@ -210,82 +211,75 @@ void QCocoaMenuItem::setNativeContents(WId item)
return;
[m_itemView release];
m_itemView = [itemView retain];
- [m_itemView setAutoresizesSubviews:YES];
- [m_itemView setAutoresizingMask:NSViewWidthSizable];
- [m_itemView setHidden:NO];
- [m_itemView setNeedsDisplay:YES];
+ m_itemView.autoresizesSubviews = YES;
+ m_itemView.autoresizingMask = NSViewWidthSizable;
+ m_itemView.hidden = NO;
+ m_itemView.needsDisplay = YES;
}
NSMenuItem *QCocoaMenuItem::sync()
{
- if (m_isSeparator != [m_native isSeparatorItem]) {
+ if (m_isSeparator != m_native.separatorItem) {
[m_native release];
- if (m_isSeparator) {
- m_native = [[NSMenuItem separatorItem] retain];
- [m_native setTag:reinterpret_cast<NSInteger>(this)];
- } else
+ if (m_isSeparator)
+ m_native = [[QCocoaNSMenuItem separatorItemWithPlatformMenuItem:this] retain];
+ else
m_native = nil;
}
if ((m_role != NoRole && !m_textSynced) || m_merged) {
- NSMenuItem *mergeItem = nil;
+ QCocoaMenuBar *menubar = nullptr;
+ if (m_role == TextHeuristicRole) {
+ // Recognized menu roles are only found in the first menus below the menubar
+ QObject *p = menuParent();
+ int depth = 1;
+ while (depth < 3 && p && !(menubar = qobject_cast<QCocoaMenuBar *>(p))) {
+ ++depth;
+ QCocoaMenuObject *menuObject = dynamic_cast<QCocoaMenuObject *>(p);
+ Q_ASSERT(menuObject);
+ p = menuObject->menuParent();
+ }
+
+ if (menubar && depth < 3)
+ m_detectedRole = detectMenuRole(m_text);
+ else
+ m_detectedRole = NoRole;
+ }
+
QCocoaMenuLoader *loader = [QCocoaMenuLoader sharedMenuLoader];
- switch (m_role) {
- case ApplicationSpecificRole:
- mergeItem = [loader appSpecificMenuItem:reinterpret_cast<NSInteger>(this)];
- break;
+ NSMenuItem *mergeItem = nil;
+ const auto role = effectiveRole();
+ switch (role) {
case AboutRole:
mergeItem = [loader aboutMenuItem];
break;
case AboutQtRole:
mergeItem = [loader aboutQtMenuItem];
break;
+ case PreferencesRole:
+ mergeItem = [loader preferencesMenuItem];
+ break;
+ case ApplicationSpecificRole:
+ mergeItem = [loader appSpecificMenuItem:this];
+ break;
case QuitRole:
mergeItem = [loader quitMenuItem];
break;
- case PreferencesRole:
- mergeItem = [loader preferencesMenuItem];
+ case CutRole:
+ case CopyRole:
+ case PasteRole:
+ case SelectAllRole:
+ if (menubar)
+ mergeItem = menubar->itemForRole(role);
break;
- case TextHeuristicRole: {
- QObject *p = menuParent();
- int depth = 1;
- QCocoaMenuBar *menubar = 0;
- while (depth < 3 && p && !(menubar = qobject_cast<QCocoaMenuBar *>(p))) {
- ++depth;
- QCocoaMenuObject *menuObject = dynamic_cast<QCocoaMenuObject *>(p);
- Q_ASSERT(menuObject);
- p = menuObject->menuParent();
- }
- if (depth == 3 || !menubar)
- break; // Menu item too deep in the hierarchy, or not connected to any menubar
-
- m_detectedRole = detectMenuRole(m_text);
- switch (m_detectedRole) {
- case QPlatformMenuItem::AboutRole:
- if (m_text.indexOf(QRegularExpression(QString::fromLatin1("qt$"),
- QRegularExpression::CaseInsensitiveOption)) == -1)
- mergeItem = [loader aboutMenuItem];
- else
- mergeItem = [loader aboutQtMenuItem];
- break;
- case QPlatformMenuItem::PreferencesRole:
- mergeItem = [loader preferencesMenuItem];
- break;
- case QPlatformMenuItem::QuitRole:
- mergeItem = [loader quitMenuItem];
- break;
- default:
- if (m_detectedRole >= CutRole && m_detectedRole < RoleCount && menubar)
- mergeItem = menubar->itemForRole(m_detectedRole);
- if (!m_text.isEmpty())
- m_textSynced = true;
- break;
- }
+ case NoRole:
+ // The heuristic couldn't resolve the menu role
+ m_textSynced = false;
break;
- }
-
default:
- qWarning() << "Menu item" << m_text << "has unsupported role" << m_role;
+ if (!m_text.isEmpty())
+ m_textSynced = true;
+ break;
}
if (mergeItem) {
@@ -294,7 +288,8 @@ NSMenuItem *QCocoaMenuItem::sync()
[mergeItem retain];
[m_native release];
m_native = mergeItem;
- [m_native setTag:reinterpret_cast<NSInteger>(this)];
+ if (auto *nativeItem = qt_objc_cast<QCocoaNSMenuItem *>(m_native))
+ nativeItem.platformMenuItem = this;
} else if (m_merged) {
// was previously merged, but no longer
[m_native release];
@@ -306,14 +301,14 @@ NSMenuItem *QCocoaMenuItem::sync()
}
if (!m_native) {
- m_native = [[NSMenuItem alloc] initWithTitle:m_text.toNSString()
- action:nil
- keyEquivalent:@""];
- [m_native setTag:reinterpret_cast<NSInteger>(this)];
+ m_native = [[QCocoaNSMenuItem alloc] initWithPlatformMenuItem:this];
+ m_native.title = m_text.toNSString();
}
- [m_native setHidden: !m_isVisible];
- [m_native setView:m_itemView];
+ resolveTargetAction();
+
+ m_native.hidden = !m_isVisible;
+ m_native.view = m_itemView;
QString text = mergeText();
#ifndef QT_NO_SHORTCUT
@@ -331,39 +326,35 @@ NSMenuItem *QCocoaMenuItem::sync()
NSFont *customMenuFont = [NSFont fontWithName:m_font.family().toNSString()
size:m_font.pointSize()];
if (customMenuFont) {
- NSArray *keys = [NSArray arrayWithObjects:NSFontAttributeName, nil];
- NSArray *objects = [NSArray arrayWithObjects:customMenuFont, nil];
- NSDictionary *attributes = [NSDictionary dictionaryWithObjects:objects forKeys:keys];
NSAttributedString *str = [[[NSAttributedString alloc] initWithString:finalString.toNSString()
- attributes:attributes] autorelease];
- [m_native setAttributedTitle: str];
+ attributes:@{NSFontAttributeName: customMenuFont}] autorelease];
+ m_native.attributedTitle = str;
useAttributedTitle = true;
}
}
- if (!useAttributedTitle) {
- [m_native setTitle:finalString.toNSString()];
- }
+ if (!useAttributedTitle)
+ m_native.title = finalString.toNSString();
#ifndef QT_NO_SHORTCUT
if (accel.count() == 1) {
- [m_native setKeyEquivalent:keySequenceToKeyEqivalent(accel)];
- [m_native setKeyEquivalentModifierMask:keySequenceModifierMask(accel)];
+ m_native.keyEquivalent = keySequenceToKeyEqivalent(accel);
+ m_native.keyEquivalentModifierMask = keySequenceModifierMask(accel);
} else
#endif
{
- [m_native setKeyEquivalent:@""];
- [m_native setKeyEquivalentModifierMask:NSCommandKeyMask];
+ m_native.keyEquivalent = @"";
+ m_native.keyEquivalentModifierMask = NSCommandKeyMask;
}
NSImage *img = nil;
if (!m_icon.isNull()) {
img = qt_mac_create_nsimage(m_icon, m_iconSize);
- [img setSize:NSMakeSize(m_iconSize, m_iconSize)];
+ img.size = CGSizeMake(m_iconSize, m_iconSize);
}
- [m_native setImage:img];
+ m_native.image = img;
[img release];
- [m_native setState:m_checked ? NSOnState : NSOffState];
+ m_native.state = m_checked ? NSOnState : NSOffState;
return m_native;
}
@@ -408,8 +399,8 @@ void QCocoaMenuItem::syncMerged()
qWarning("Trying to sync a non-merged item");
return;
}
- [m_native setTag:reinterpret_cast<NSInteger>(this)];
- [m_native setHidden: !m_isVisible];
+
+ m_native.hidden = !m_isVisible;
}
void QCocoaMenuItem::setParentEnabled(bool enabled)
@@ -434,4 +425,39 @@ void QCocoaMenuItem::setIconSize(int size)
m_iconSize = size;
}
+void QCocoaMenuItem::resolveTargetAction()
+{
+ if (m_native.separatorItem)
+ return;
+
+ // Some items created by QCocoaMenuLoader are not
+ // instances of QCocoaNSMenuItem and have their
+ // target/action set as Interface Builder would.
+ if (![m_native isMemberOfClass:[QCocoaNSMenuItem class]])
+ return;
+
+ // Use the responder chain and ensure native modal dialogs
+ // continue receiving cut/copy/paste/etc. key equivalents.
+ SEL roleAction;
+ switch (effectiveRole()) {
+ case CutRole:
+ roleAction = @selector(cut:);
+ break;
+ case CopyRole:
+ roleAction = @selector(copy:);
+ break;
+ case PasteRole:
+ roleAction = @selector(paste:);
+ break;
+ case SelectAllRole:
+ roleAction = @selector(selectAll:);
+ break;
+ default:
+ roleAction = @selector(qt_itemFired:);
+ }
+
+ m_native.action = roleAction;
+ m_native.target = nil;
+}
+
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/cocoa/qcocoamenuloader.h b/src/plugins/platforms/cocoa/qcocoamenuloader.h
index 95f347646c..5e83327854 100644
--- a/src/plugins/platforms/cocoa/qcocoamenuloader.h
+++ b/src/plugins/platforms/cocoa/qcocoamenuloader.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
@@ -54,42 +54,20 @@
#import <AppKit/AppKit.h>
#include <QtCore/private/qcore_mac_p.h>
-@interface QT_MANGLE_NAMESPACE(QCocoaMenuLoader) : NSResponder
-{
- IBOutlet NSMenu *theMenu;
- IBOutlet NSMenu *appMenu;
- IBOutlet NSMenuItem *quitItem;
- IBOutlet NSMenuItem *preferencesItem;
- IBOutlet NSMenuItem *aboutItem;
- IBOutlet NSMenuItem *aboutQtItem;
- IBOutlet NSMenuItem *hideItem;
- NSMenuItem *lastAppSpecificItem;
- NSMenuItem *servicesItem;
- NSMenuItem *hideAllOthersItem;
- NSMenuItem *showAllItem;
-}
+QT_FORWARD_DECLARE_CLASS(QCocoaMenuItem);
+
+@interface QT_MANGLE_NAMESPACE(QCocoaMenuLoader) : NSObject
+ (instancetype)sharedMenuLoader;
-- (instancetype)init;
-- (void)ensureAppMenuInMenu:(NSMenu *)menu;
-- (void)removeActionsFromAppMenu;
-- (NSMenu *)applicationMenu;
- (NSMenu *)menu;
+- (void)ensureAppMenuInMenu:(NSMenu *)menu;
- (NSMenuItem *)quitMenuItem;
- (NSMenuItem *)preferencesMenuItem;
- (NSMenuItem *)aboutMenuItem;
- (NSMenuItem *)aboutQtMenuItem;
- (NSMenuItem *)hideMenuItem;
-- (NSMenuItem *)appSpecificMenuItem:(NSInteger)tag;
-- (IBAction)terminate:(id)sender;
-- (IBAction)orderFrontStandardAboutPanel:(id)sender;
-- (IBAction)hideOtherApplications:(id)sender;
-- (IBAction)unhideAllApplications:(id)sender;
-- (IBAction)hide:(id)sender;
-- (IBAction)qtDispatcherToQPAMenuItem:(id)sender;
-- (void)orderFrontCharacterPalette:(id)sender;
-- (BOOL)validateMenuItem:(NSMenuItem*)menuItem;
+- (NSMenuItem *)appSpecificMenuItem:(QCocoaMenuItem *)platformItem;
- (void)qtTranslateApplicationMenu;
-- (NSArray *)mergeable;
+- (NSArray<NSMenuItem *> *)mergeable;
@end
QT_NAMESPACE_ALIAS_OBJC_CLASS(QCocoaMenuLoader);
diff --git a/src/plugins/platforms/cocoa/qcocoamenuloader.mm b/src/plugins/platforms/cocoa/qcocoamenuloader.mm
index cd597da71c..345b370826 100644
--- a/src/plugins/platforms/cocoa/qcocoamenuloader.mm
+++ b/src/plugins/platforms/cocoa/qcocoamenuloader.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
@@ -41,6 +41,7 @@
#include "messages.h"
#include "qcocoahelpers.h"
+#include "qcocoansmenu.h"
#include "qcocoamenubar.h"
#include "qcocoamenuitem.h"
#include "qcocoaintegration.h"
@@ -50,7 +51,19 @@
#include <QtCore/qcoreapplication.h>
#include <QtGui/private/qguiapplication_p.h>
-@implementation QCocoaMenuLoader
+@implementation QCocoaMenuLoader {
+ NSMenu *theMenu;
+ NSMenu *appMenu;
+ NSMenuItem *quitItem;
+ NSMenuItem *preferencesItem;
+ NSMenuItem *aboutItem;
+ NSMenuItem *aboutQtItem;
+ NSMenuItem *hideItem;
+ NSMenuItem *lastAppSpecificItem;
+ NSMenuItem *servicesItem;
+ NSMenuItem *hideAllOthersItem;
+ NSMenuItem *showAllItem;
+}
+ (instancetype)sharedMenuLoader
{
@@ -83,17 +96,19 @@
appItem.submenu = appMenu;
// About Application
- aboutItem = [[NSMenuItem alloc] initWithTitle:[@"About " stringByAppendingString:appName]
- action:@selector(orderFrontStandardAboutPanel:)
- keyEquivalent:@""];
+ aboutItem = [[QCocoaNSMenuItem alloc] init];
+ aboutItem.title = [@"About " stringByAppendingString:appName];
+ // FIXME This seems useless since barely adding a QAction
+ // with AboutRole role will reset the target/action
aboutItem.target = self;
+ aboutItem.action = @selector(orderFrontStandardAboutPanel:);
// Disable until a QAction is associated
aboutItem.enabled = NO;
aboutItem.hidden = YES;
[appMenu addItem:aboutItem];
// About Qt (shameless self-promotion)
- aboutQtItem = [[NSMenuItem alloc] init];
+ aboutQtItem = [[QCocoaNSMenuItem alloc] init];
aboutQtItem.title = @"About Qt";
// Disable until a QAction is associated
aboutQtItem.enabled = NO;
@@ -103,15 +118,19 @@
[appMenu addItem:[NSMenuItem separatorItem]];
// Preferences
- preferencesItem = [[NSMenuItem alloc] initWithTitle:@"Preferences…"
- action:@selector(qtDispatcherToQPAMenuItem:)
- keyEquivalent:@","];
- preferencesItem.target = self;
+ preferencesItem = [[QCocoaNSMenuItem alloc] init];
+ preferencesItem.title = @"Preferences…";
+ preferencesItem.keyEquivalent = @",";
// Disable until a QAction is associated
preferencesItem.enabled = NO;
preferencesItem.hidden = YES;
[appMenu addItem:preferencesItem];
+ // We'll be adding app specific items after this. The macOS HIG state that,
+ // "In general, a Preferences menu item should be the first app-specific menu item."
+ // https://developer.apple.com/macos/human-interface-guidelines/menus/menu-bar-menus/
+ lastAppSpecificItem = preferencesItem;
+
[appMenu addItem:[NSMenuItem separatorItem]];
// Services item and menu
@@ -149,10 +168,13 @@
[appMenu addItem:[NSMenuItem separatorItem]];
// Quit Application
- quitItem = [[NSMenuItem alloc] initWithTitle:[@"Quit " stringByAppendingString:appName]
- action:@selector(terminate:)
- keyEquivalent:@"q"];
- quitItem.target = self;
+ quitItem = [[QCocoaNSMenuItem alloc] init];
+ quitItem.title = [@"Quit " stringByAppendingString:appName];
+ quitItem.keyEquivalent = @"q";
+ // This will remain true until synced with a QCocoaMenuItem.
+ // This way, we will always have a functional Quit menu item
+ // even if no QAction is added.
+ quitItem.action = @selector(terminate:);
[appMenu addItem:quitItem];
}
@@ -184,18 +206,18 @@
// windows with different menu bars), we never recreate this menu, but
// instead pull it out the current menu bar and place into the new one:
NSMenu *mainMenu = [NSApp mainMenu];
- if ([NSApp mainMenu] == menu)
+ if (mainMenu == menu)
return; // nothing to do (menu is the current menu bar)!
#ifndef QT_NAMESPACE
Q_ASSERT(mainMenu);
#endif
// Grab the app menu out of the current menu.
- int numItems = [mainMenu numberOfItems];
- NSMenuItem *oldAppMenuItem = 0;
+ const int numItems = mainMenu.numberOfItems;
+ NSMenuItem *oldAppMenuItem = nil;
for (int i = 0; i < numItems; ++i) {
NSMenuItem *item = [mainMenu itemAtIndex:i];
- if ([item submenu] == appMenu) {
+ if (item.submenu == appMenu) {
oldAppMenuItem = item;
[oldAppMenuItem retain];
[mainMenu removeItemAtIndex:i];
@@ -204,21 +226,15 @@
}
if (oldAppMenuItem) {
- [oldAppMenuItem setSubmenu:nil];
+ oldAppMenuItem.submenu = nil;
[oldAppMenuItem release];
NSMenuItem *appMenuItem = [[NSMenuItem alloc] initWithTitle:@"Apple"
- action:nil keyEquivalent:@""];
- [appMenuItem setSubmenu:appMenu];
+ action:nil keyEquivalent:@""];
+ appMenuItem.submenu = appMenu;
[menu insertItem:appMenuItem atIndex:0];
}
}
-- (void)removeActionsFromAppMenu
-{
- for (NSMenuItem *item in [appMenu itemArray])
- [item setTag:0];
-}
-
- (NSMenu *)menu
{
return [[theMenu retain] autorelease];
@@ -254,41 +270,32 @@
return [[hideItem retain] autorelease];
}
-- (NSMenuItem *)appSpecificMenuItem:(NSInteger)tag
+- (NSMenuItem *)appSpecificMenuItem:(QCocoaMenuItem *)platformItem
{
- NSMenuItem *item = [appMenu itemWithTag:tag];
-
- // No reason to create the item if it already exists. See QTBUG-27202.
- if (item)
- return [[item retain] autorelease];
+ // No reason to create the item if it already exists.
+ for (NSMenuItem *item in appMenu.itemArray)
+ if (qt_objc_cast<QCocoaNSMenuItem *>(item).platformMenuItem == platformItem)
+ return [[item retain] autorelease];
// Create an App-Specific menu item, insert it into the menu and return
// it as an autorelease item.
- item = [[NSMenuItem alloc] init];
+ QCocoaNSMenuItem *item;
+ if (platformItem->isSeparator())
+ item = [[QCocoaNSMenuItem separatorItemWithPlatformMenuItem:platformItem] retain];
+ else
+ item = [[QCocoaNSMenuItem alloc] initWithPlatformMenuItem:platformItem];
+
+ const auto location = [appMenu indexOfItem:lastAppSpecificItem];
- NSInteger location;
- if (lastAppSpecificItem == nil) {
- location = [appMenu indexOfItem:aboutQtItem];
- } else {
- location = [appMenu indexOfItem:lastAppSpecificItem];
+ if (!lastAppSpecificItem.separatorItem)
[lastAppSpecificItem release];
- }
lastAppSpecificItem = item; // Keep track of this for later (i.e., don't release it)
+
[appMenu insertItem:item atIndex:location + 1];
return [[item retain] autorelease];
}
-- (BOOL) acceptsFirstResponder
-{
- return YES;
-}
-
-- (void)terminate:(id)sender
-{
- [NSApp terminate:sender];
-}
-
- (void)orderFrontStandardAboutPanel:(id)sender
{
[NSApp orderFrontStandardAboutPanel:sender];
@@ -311,61 +318,36 @@
- (void)qtTranslateApplicationMenu
{
-
#ifndef QT_NO_TRANSLATION
- [servicesItem setTitle:qt_mac_applicationmenu_string(ServicesAppMenuItem).toNSString()];
- [hideItem setTitle:qt_mac_applicationmenu_string(HideAppMenuItem).arg(qt_mac_applicationName()).toNSString()];
- [hideAllOthersItem setTitle:qt_mac_applicationmenu_string(HideOthersAppMenuItem).toNSString()];
- [showAllItem setTitle:qt_mac_applicationmenu_string(ShowAllAppMenuItem).toNSString()];
- [preferencesItem setTitle:qt_mac_applicationmenu_string(PreferencesAppMenuItem).toNSString()];
- [quitItem setTitle:qt_mac_applicationmenu_string(QuitAppMenuItem).arg(qt_mac_applicationName()).toNSString()];
- [aboutItem setTitle:qt_mac_applicationmenu_string(AboutAppMenuItem).arg(qt_mac_applicationName()).toNSString()];
+ aboutItem.title = qt_mac_applicationmenu_string(AboutAppMenuItem).arg(qt_mac_applicationName()).toNSString();
+ preferencesItem.title = qt_mac_applicationmenu_string(PreferencesAppMenuItem).toNSString();
+ servicesItem.title = qt_mac_applicationmenu_string(ServicesAppMenuItem).toNSString();
+ hideItem.title = qt_mac_applicationmenu_string(HideAppMenuItem).arg(qt_mac_applicationName()).toNSString();
+ hideAllOthersItem.title = qt_mac_applicationmenu_string(HideOthersAppMenuItem).toNSString();
+ showAllItem.title = qt_mac_applicationmenu_string(ShowAllAppMenuItem).toNSString();
+ quitItem.title = qt_mac_applicationmenu_string(QuitAppMenuItem).arg(qt_mac_applicationName()).toNSString();
#endif
}
-- (IBAction)qtDispatcherToQPAMenuItem:(id)sender
-{
- NSMenuItem *item = static_cast<NSMenuItem *>(sender);
- if (item == quitItem) {
- // We got here because someone was once the quitItem, but it has been
- // abandoned (e.g., the menubar was deleted). In the meantime, just do
- // normal QApplication::quit().
- qApp->quit();
- return;
- }
-
- if ([item tag]) {
- QCocoaMenuItem *cocoaItem = reinterpret_cast<QCocoaMenuItem *>([item tag]);
- QScopedScopeLevelCounter scopeLevelCounter(QGuiApplicationPrivate::instance()->threadData);
- cocoaItem->activated();
- }
-}
-
-- (void)orderFrontCharacterPalette:(id)sender
-{
- [NSApp orderFrontCharacterPalette:sender];
-}
-
- (BOOL)validateMenuItem:(NSMenuItem*)menuItem
{
- if ([menuItem action] == @selector(hideOtherApplications:)
- || [menuItem action] == @selector(unhideAllApplications:)) {
+ if (menuItem.action == @selector(hideOtherApplications:)
+ || menuItem.action == @selector(unhideAllApplications:))
return [NSApp validateMenuItem:menuItem];
- } else if ([menuItem action] == @selector(hide:)) {
+
+ if (menuItem.action == @selector(hide:)) {
if (QCocoaIntegration::instance()->activePopupWindow())
return NO;
return [NSApp validateMenuItem:menuItem];
- } else if ([menuItem tag]) {
- QCocoaMenuItem *cocoaItem = reinterpret_cast<QCocoaMenuItem *>([menuItem tag]);
- return cocoaItem->isEnabled();
- } else {
- return [menuItem isEnabled];
}
+
+ return menuItem.enabled;
}
-- (NSArray*) mergeable
+- (NSArray<NSMenuItem *> *)mergeable
{
- // don't include the quitItem here, since we want it always visible and enabled regardless
+ // Don't include the quitItem here, since we want it always visible and enabled regardless
+ // Note that lastAppSpecificItem may be nil, so we can't use @[] here.
return [NSArray arrayWithObjects:preferencesItem, aboutItem, aboutQtItem, lastAppSpecificItem, nil];
}
diff --git a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm
index 955b147bfd..3c5f4e68db 100644
--- a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm
+++ b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm
@@ -71,6 +71,10 @@
#include <AppKit/AppKit.h>
+#if QT_CONFIG(vulkan)
+#include <MoltenVK/mvk_vulkan.h>
+#endif
+
QT_BEGIN_NAMESPACE
QCocoaNativeInterface::QCocoaNativeInterface()
@@ -81,20 +85,20 @@ QCocoaNativeInterface::QCocoaNativeInterface()
void *QCocoaNativeInterface::nativeResourceForContext(const QByteArray &resourceString, QOpenGLContext *context)
{
if (!context)
- return 0;
+ return nullptr;
if (resourceString.toLower() == "nsopenglcontext")
return nsOpenGLContextForContext(context);
if (resourceString.toLower() == "cglcontextobj")
return cglContextForContext(context);
- return 0;
+ return nullptr;
}
#endif
void *QCocoaNativeInterface::nativeResourceForWindow(const QByteArray &resourceString, QWindow *window)
{
if (!window->handle())
- return 0;
+ return nullptr;
if (resourceString == "nsview") {
return static_cast<QCocoaWindow *>(window->handle())->m_view;
@@ -104,8 +108,13 @@ void *QCocoaNativeInterface::nativeResourceForWindow(const QByteArray &resourceS
#endif
} else if (resourceString == "nswindow") {
return static_cast<QCocoaWindow *>(window->handle())->nativeWindow();
+#if QT_CONFIG(vulkan)
+ } else if (resourceString == "vkSurface") {
+ if (QVulkanInstance *instance = window->vulkanInstance())
+ return static_cast<QCocoaVulkanInstance *>(instance->handle())->createSurface(window);
+#endif
}
- return 0;
+ return nullptr;
}
QPlatformNativeInterface::NativeResourceForIntegrationFunction QCocoaNativeInterface::nativeResourceFunctionForIntegration(const QByteArray &resource)
@@ -143,7 +152,7 @@ QPlatformNativeInterface::NativeResourceForIntegrationFunction QCocoaNativeInter
if (resource.toLower() == "testcontentborderposition")
return NativeResourceForIntegrationFunction(QCocoaNativeInterface::testContentBorderPosition);
- return 0;
+ return nullptr;
}
QPlatformPrinterSupport *QCocoaNativeInterface::createPlatformPrinterSupport()
@@ -152,7 +161,7 @@ QPlatformPrinterSupport *QCocoaNativeInterface::createPlatformPrinterSupport()
return new QCocoaPrinterSupport();
#else
qFatal("Printing is not supported when Qt is configured with -no-widgets");
- return 0;
+ return nullptr;
#endif
}
@@ -166,7 +175,7 @@ void *QCocoaNativeInterface::NSPrintInfoForPrintEngine(QPrintEngine *printEngine
#else
Q_UNUSED(printEngine);
qFatal("Printing is not supported when Qt is configured with -no-widgets");
- return 0;
+ return nullptr;
#endif
}
@@ -180,10 +189,10 @@ QPixmap QCocoaNativeInterface::defaultBackgroundPixmapForQWizard()
CFURLRef url = (CFURLRef)CFArrayGetValueAtIndex(urls, 0);
QCFType<CFBundleRef> bundle = CFBundleCreate(kCFAllocatorDefault, url);
if (bundle) {
- url = CFBundleCopyResourceURL(bundle, CFSTR("Background"), CFSTR("png"), 0);
+ url = CFBundleCopyResourceURL(bundle, CFSTR("Background"), CFSTR("png"), nullptr);
if (url) {
- QCFType<CGImageSourceRef> imageSource = CGImageSourceCreateWithURL(url, 0);
- QCFType<CGImageRef> image = CGImageSourceCreateImageAtIndex(imageSource, 0, 0);
+ QCFType<CGImageSourceRef> imageSource = CGImageSourceCreateWithURL(url, nullptr);
+ QCFType<CGImageRef> image = CGImageSourceCreateImageAtIndex(imageSource, 0, nullptr);
if (image) {
int width = CGImageGetWidth(image);
int height = CGImageGetHeight(image);
@@ -213,7 +222,7 @@ void *QCocoaNativeInterface::cglContextForContext(QOpenGLContext* context)
NSOpenGLContext *nsOpenGLContext = static_cast<NSOpenGLContext*>(nsOpenGLContextForContext(context));
if (nsOpenGLContext)
return [nsOpenGLContext CGLContextObj];
- return 0;
+ return nullptr;
}
void *QCocoaNativeInterface::nsOpenGLContextForContext(QOpenGLContext* context)
@@ -224,7 +233,7 @@ void *QCocoaNativeInterface::nsOpenGLContextForContext(QOpenGLContext* context)
return cocoaGLContext->nsOpenGLContext();
}
}
- return 0;
+ return nullptr;
}
#endif
@@ -256,7 +265,7 @@ void QCocoaNativeInterface::setDockMenu(QPlatformMenu *platformMenu)
QMacAutoReleasePool pool;
QCocoaMenu *cocoaPlatformMenu = static_cast<QCocoaMenu *>(platformMenu);
NSMenu *menu = cocoaPlatformMenu->nsMenu();
- [[QCocoaApplicationDelegate sharedDelegate] setDockMenu:menu];
+ [QCocoaApplicationDelegate sharedDelegate].dockMenu = menu;
}
void *QCocoaNativeInterface::qMenuToNSMenu(QPlatformMenu *platformMenu)
@@ -285,8 +294,9 @@ QImage QCocoaNativeInterface::cgImageToQImage(CGImageRef image)
void QCocoaNativeInterface::setEmbeddedInForeignView(QPlatformWindow *window, bool embedded)
{
+ Q_UNUSED(embedded); // "embedded" state is now automatically detected
QCocoaWindow *cocoaPlatformWindow = static_cast<QCocoaWindow *>(window);
- cocoaPlatformWindow->setEmbeddedInForeignView(embedded);
+ cocoaPlatformWindow->setEmbeddedInForeignView();
}
void QCocoaNativeInterface::registerTouchWindow(QWindow *window, bool enable)
diff --git a/src/plugins/platforms/cocoa/qcocoansmenu.h b/src/plugins/platforms/cocoa/qcocoansmenu.h
index a9c3e4fff9..6cbb6e4a01 100644
--- a/src/plugins/platforms/cocoa/qcocoansmenu.h
+++ b/src/plugins/platforms/cocoa/qcocoansmenu.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
@@ -53,12 +53,10 @@
#import <AppKit/AppKit.h>
-#include <QtCore/qpointer.h>
#include <qcocoahelpers.h>
QT_FORWARD_DECLARE_CLASS(QCocoaMenu);
-typedef QPointer<QCocoaMenu> QCocoaMenuPointer;
-
+QT_FORWARD_DECLARE_CLASS(QCocoaMenuItem);
@interface QT_MANGLE_NAMESPACE(QCocoaNSMenuDelegate) : NSObject <NSMenuDelegate>
@@ -72,18 +70,24 @@ typedef QPointer<QCocoaMenu> QCocoaMenuPointer;
@interface QT_MANGLE_NAMESPACE(QCocoaNSMenu) : NSMenu
-@property (readonly, nonatomic) QCocoaMenuPointer qpaMenu;
+@property (readonly, nonatomic) QCocoaMenu *platformMenu;
+
+- (instancetype)initWithPlatformMenu:(QCocoaMenu *)menu;
+
+@end
-- (instancetype)initWithQPAMenu:(QCocoaMenu *)menu;
+@interface QT_MANGLE_NAMESPACE(QCocoaNSMenuItem) : NSMenuItem
-- (void)qt_itemFired:(NSMenuItem *)item;
+@property (nonatomic) QCocoaMenuItem *platformMenuItem;
-- (BOOL)worksWhenModal;
-- (BOOL)validateMenuItem:(NSMenuItem*)item; // NSMenuValidation
++ (instancetype)separatorItemWithPlatformMenuItem:(QCocoaMenuItem *)menuItem;
+- (instancetype)initWithPlatformMenuItem:(QCocoaMenuItem *)menuItem;
+- (instancetype)init;
@end
QT_NAMESPACE_ALIAS_OBJC_CLASS(QCocoaNSMenu);
+QT_NAMESPACE_ALIAS_OBJC_CLASS(QCocoaNSMenuItem);
QT_NAMESPACE_ALIAS_OBJC_CLASS(QCocoaNSMenuDelegate);
#endif // QCOCOANSMENU_H
diff --git a/src/plugins/platforms/cocoa/qcocoansmenu.mm b/src/plugins/platforms/cocoa/qcocoansmenu.mm
index 19a0f950e4..752f38d68d 100644
--- a/src/plugins/platforms/cocoa/qcocoansmenu.mm
+++ b/src/plugins/platforms/cocoa/qcocoansmenu.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
@@ -44,17 +44,15 @@
#include "qcocoawindow.h"
#import "qnsview.h"
-#include <QtCore/qmetaobject.h>
-#include <QtCore/private/qthread_p.h>
-#include <QtGui/private/qguiapplication_p.h>
+#include <QtCore/qcoreapplication.h>
+#include <QtCore/qcoreevent.h>
-static NSString *qt_mac_removePrivateUnicode(NSString* string)
+static NSString *qt_mac_removePrivateUnicode(NSString *string)
{
- int len = [string length];
- if (len) {
- QVarLengthArray <unichar, 10> characters(len);
+ if (const int len = string.length) {
+ QVarLengthArray<unichar, 10> characters(len);
bool changed = false;
- for (int i = 0; i<len; i++) {
+ for (int i = 0; i < len; i++) {
characters[i] = [string characterAtIndex:i];
// check if they belong to key codes in private unicode range
// currently we need to handle only the NSDeleteFunctionKey
@@ -70,11 +68,14 @@ static NSString *qt_mac_removePrivateUnicode(NSString* string)
}
@implementation QCocoaNSMenu
+{
+ QPointer<QCocoaMenu> _platformMenu;
+}
-- (instancetype)initWithQPAMenu:(QCocoaMenu *)menu
+- (instancetype)initWithPlatformMenu:(QCocoaMenu *)menu
{
if ((self = [super initWithTitle:@"Untitled"])) {
- _qpaMenu = menu;
+ _platformMenu = menu;
self.autoenablesItems = YES;
self.delegate = [QCocoaNSMenuDelegate sharedMenuDelegate];
}
@@ -82,46 +83,58 @@ static NSString *qt_mac_removePrivateUnicode(NSString* string)
return self;
}
-// Cocoa will query the menu item's target for the worksWhenModal selector.
-// So we need to implement this to allow the items to be handled correctly
-// when a modal dialog is visible. See documentation for NSMenuItem.target.
-- (BOOL)worksWhenModal
+- (QCocoaMenu *)platformMenu
{
- if (!QGuiApplication::modalWindow())
- return YES;
- if (const auto *mb = qobject_cast<QCocoaMenuBar *>(self.qpaMenu->menuParent()))
- return QGuiApplication::modalWindow()->handle() == mb->cocoaWindow() ? YES : NO;
- return YES;
+ return _platformMenu.data();
}
-- (void)qt_itemFired:(NSMenuItem *)item
+@end
+
+@implementation QCocoaNSMenuItem
{
- auto *qpaItem = reinterpret_cast<QCocoaMenuItem *>(item.tag);
- // Menu-holding items also get a target to play nicely
- // with NSMenuValidation but should not trigger.
- if (!qpaItem || qpaItem->menu())
- return;
+ QPointer<QCocoaMenuItem> _platformMenuItem;
+}
- QScopedScopeLevelCounter scopeLevelCounter(QGuiApplicationPrivate::instance()->threadData);
- QGuiApplicationPrivate::modifier_buttons = [QNSView convertKeyModifiers:[NSEvent modifierFlags]];
++ (instancetype)separatorItemWithPlatformMenuItem:(QCocoaMenuItem *)menuItem
+{
+ // Safe because +[NSMenuItem separatorItem] invokes [[self alloc] init]
+ auto *item = qt_objc_cast<QCocoaNSMenuItem *>([self separatorItem]);
+ Q_ASSERT_X(item, qPrintable(__FUNCTION__),
+ "Did +[NSMenuItem separatorItem] not invoke [[self alloc] init]?");
+ if (item)
+ item.platformMenuItem = menuItem;
+
+ return item;
+}
- static QMetaMethod activatedSignal = QMetaMethod::fromSignal(&QCocoaMenuItem::activated);
- activatedSignal.invoke(qpaItem, Qt::QueuedConnection);
+- (instancetype)initWithPlatformMenuItem:(QCocoaMenuItem *)menuItem
+{
+ if ((self = [super initWithTitle:@"" action:nil keyEquivalent:@""])) {
+ _platformMenuItem = menuItem;
+ }
+
+ return self;
}
-- (BOOL)validateMenuItem:(NSMenuItem*)item
+- (instancetype)init
{
- auto *qpaItem = reinterpret_cast<QCocoaMenuItem *>(item.tag);
- // Menu-holding items are always enabled, as it's conventional in Cocoa
- if (!qpaItem || qpaItem->menu())
- return YES;
+ return [self initWithPlatformMenuItem:nullptr];
+}
- return qpaItem->isEnabled();
+- (QCocoaMenuItem *)platformMenuItem
+{
+ return _platformMenuItem.data();
+}
+
+- (void)setPlatformMenuItem:(QCocoaMenuItem *)menuItem
+{
+ _platformMenuItem = menuItem;
}
@end
-#define CHECK_MENU_CLASS(menu) Q_ASSERT([menu isMemberOfClass:[QCocoaNSMenu class]])
+#define CHECK_MENU_CLASS(menu) Q_ASSERT_X([menu isMemberOfClass:[QCocoaNSMenu class]], \
+ __FUNCTION__, "Menu is not a QCocoaNSMenu")
@implementation QCocoaNSMenuDelegate
@@ -153,14 +166,15 @@ static NSString *qt_mac_removePrivateUnicode(NSString* string)
if (shouldCancel)
return NO;
- const auto &qpaMenu = static_cast<QCocoaNSMenu *>(menu).qpaMenu;
- if (qpaMenu.isNull())
+ const auto &platformMenu = static_cast<QCocoaNSMenu *>(menu).platformMenu;
+ if (!platformMenu)
return YES;
- auto *menuItem = reinterpret_cast<QCocoaMenuItem *>(item.tag);
- if (qpaMenu->items().contains(menuItem)) {
- if (QCocoaMenu *itemSubmenu = menuItem->menu())
- itemSubmenu->setAttachedItem(item);
+ if (auto *platformItem = qt_objc_cast<QCocoaNSMenuItem *>(item).platformMenuItem) {
+ if (platformMenu->items().contains(platformItem)) {
+ if (auto *itemSubmenu = platformItem->menu())
+ itemSubmenu->setAttachedItem(item);
+ }
}
return YES;
@@ -169,32 +183,31 @@ static NSString *qt_mac_removePrivateUnicode(NSString* string)
- (void)menu:(NSMenu *)menu willHighlightItem:(NSMenuItem *)item
{
CHECK_MENU_CLASS(menu);
- auto *qpaItem = reinterpret_cast<QCocoaMenuItem *>(item.tag);
- if (qpaItem)
- qpaItem->hovered();
+ if (auto *platformItem = qt_objc_cast<QCocoaNSMenuItem *>(item).platformMenuItem)
+ emit platformItem->hovered();
}
- (void)menuWillOpen:(NSMenu *)menu
{
CHECK_MENU_CLASS(menu);
- const auto &qpaMenu = static_cast<QCocoaNSMenu *>(menu).qpaMenu;
- if (qpaMenu.isNull())
+ auto *platformMenu = static_cast<QCocoaNSMenu *>(menu).platformMenu;
+ if (!platformMenu)
return;
- qpaMenu->setIsOpen(true);
- emit qpaMenu->aboutToShow();
+ platformMenu->setIsOpen(true);
+ emit platformMenu->aboutToShow();
}
- (void)menuDidClose:(NSMenu *)menu
{
CHECK_MENU_CLASS(menu);
- const auto &qpaMenu = static_cast<QCocoaNSMenu *>(menu).qpaMenu;
- if (qpaMenu.isNull())
+ auto *platformMenu = static_cast<QCocoaNSMenu *>(menu).platformMenu;
+ if (!platformMenu)
return;
- qpaMenu->setIsOpen(false);
+ platformMenu->setIsOpen(false);
// wrong, but it's the best we can do
- emit qpaMenu->aboutToHide();
+ emit platformMenu->aboutToHide();
}
- (BOOL)menuHasKeyEquivalent:(NSMenu *)menu forEvent:(NSEvent *)event target:(id *)target action:(SEL *)action
@@ -229,30 +242,17 @@ static NSString *qt_mac_removePrivateUnicode(NSString* string)
}
if (keyEquivalentItem) {
- if (!keyEquivalentItem.target) {
- // This item was modified by QCocoaMenuBar::redirectKnownMenuItemsToFirstResponder
- // and it looks like we're running a modal session for NSOpenPanel/NSSavePanel.
- // QCocoaFileDialogHelper is actually the only place we use this and we run NSOpenPanel modal
- // (modal sheet, window modal, application modal).
- // Whatever the current first responder is, let's give it a chance
- // and do not touch the Qt's focusObject (which is different from some native view
- // having a focus inside NSSave/OpenPanel.
- *target = nil;
- *action = keyEquivalentItem.action;
- return YES;
- }
-
QObject *object = qApp->focusObject();
if (object) {
QChar ch;
int keyCode;
- ulong nativeModifiers = [event modifierFlags];
- Qt::KeyboardModifiers modifiers = [QNSView convertKeyModifiers: nativeModifiers];
- NSString *charactersIgnoringModifiers = [event charactersIgnoringModifiers];
- NSString *characters = [event characters];
+ ulong nativeModifiers = event.modifierFlags;
+ Qt::KeyboardModifiers modifiers = [QNSView convertKeyModifiers:nativeModifiers];
+ NSString *charactersIgnoringModifiers = event.charactersIgnoringModifiers;
+ NSString *characters = event.characters;
- if ([charactersIgnoringModifiers length] > 0) { // convert the first character into a key code
- if ((modifiers & Qt::ControlModifier) && ([characters length] != 0)) {
+ if (charactersIgnoringModifiers.length > 0) { // convert the first character into a key code
+ if ((modifiers & Qt::ControlModifier) && characters.length > 0) {
ch = QChar([characters characterAtIndex:0]);
} else {
ch = QChar([charactersIgnoringModifiers characterAtIndex:0]);
@@ -269,7 +269,7 @@ static NSString *qt_mac_removePrivateUnicode(NSString* string)
accel_ev.ignore();
QCoreApplication::sendEvent(object, &accel_ev);
if (accel_ev.isAccepted()) {
- [[NSApp keyWindow] sendEvent: event];
+ [[NSApp keyWindow] sendEvent:event];
*target = nil;
*action = nil;
return YES;
diff --git a/src/plugins/platforms/cocoa/qcocoaprintdevice.mm b/src/plugins/platforms/cocoa/qcocoaprintdevice.mm
index bfe6cd09b6..24ec7ca9a4 100644
--- a/src/plugins/platforms/cocoa/qcocoaprintdevice.mm
+++ b/src/plugins/platforms/cocoa/qcocoaprintdevice.mm
@@ -67,17 +67,17 @@ static QPrint::DuplexMode macToDuplexMode(const PMDuplexMode &mode)
QCocoaPrintDevice::QCocoaPrintDevice()
: QPlatformPrintDevice(),
- m_printer(0),
- m_session(0),
- m_ppd(0)
+ m_printer(nullptr),
+ m_session(nullptr),
+ m_ppd(nullptr)
{
}
QCocoaPrintDevice::QCocoaPrintDevice(const QString &id)
: QPlatformPrintDevice(id),
- m_printer(0),
- m_session(0),
- m_ppd(0)
+ m_printer(nullptr),
+ m_session(nullptr),
+ m_ppd(nullptr)
{
if (!id.isEmpty()) {
m_printer = PMPrinterCreateFromPrinterID(id.toCFString());
@@ -411,7 +411,7 @@ QPrint::ColorMode QCocoaPrintDevice::defaultColorMode() const
ppd_option_t *colorModel = ppdFindOption(m_ppd, "DefaultColorModel");
if (!colorModel)
colorModel = ppdFindOption(m_ppd, "ColorModel");
- if (!colorModel || (colorModel && !qstrcmp(colorModel->defchoice, "Gray")))
+ if (!colorModel || qstrcmp(colorModel->defchoice, "Gray") != 0)
return QPrint::Color;
}
return QPrint::GrayScale;
@@ -443,11 +443,11 @@ bool QCocoaPrintDevice::openPpdFile()
{
if (m_ppd)
ppdClose(m_ppd);
- m_ppd = 0;
- CFURLRef ppdURL = NULL;
+ m_ppd = nullptr;
+ CFURLRef ppdURL = nullptr;
char ppdPath[MAXPATHLEN];
if (PMPrinterCopyDescriptionURL(m_printer, kPMPPDDescriptionType, &ppdURL) == noErr
- && ppdURL != NULL) {
+ && ppdURL) {
if (CFURLGetFileSystemRepresentation(ppdURL, true, (UInt8*)ppdPath, sizeof(ppdPath)))
m_ppd = ppdOpenFile(ppdPath);
CFRelease(ppdURL);
@@ -470,7 +470,7 @@ PMPaper QCocoaPrintDevice::macPaper(const QPageSize &pageSize) const
if (m_macPapers.contains(pageSize.key()))
return m_macPapers.value(pageSize.key());
// For any other page size, whether custom or just unsupported, needs to be a custom PMPaper
- PMPaper paper = 0;
+ PMPaper paper = nullptr;
PMPaperMargins paperMargins;
paperMargins.left = m_customMargins.left();
paperMargins.right = m_customMargins.right();
diff --git a/src/plugins/platforms/cocoa/qcocoascreen.h b/src/plugins/platforms/cocoa/qcocoascreen.h
index 3d59c3de79..afb294240e 100644
--- a/src/plugins/platforms/cocoa/qcocoascreen.h
+++ b/src/plugins/platforms/cocoa/qcocoascreen.h
@@ -77,6 +77,10 @@ public:
NSScreen *nativeScreen() const;
void updateGeometry();
+ void requestUpdate();
+ void deliverUpdateRequests();
+ bool isRunningDisplayLink() const;
+
static QCocoaScreen *primaryScreen();
static CGPoint mapToNative(const QPointF &pos, QCocoaScreen *screen = QCocoaScreen::primaryScreen());
@@ -96,6 +100,10 @@ public:
QSizeF m_physicalSize;
QCocoaCursor *m_cursor;
QList<QPlatformScreen *> m_siblings;
+
+ CVDisplayLinkRef m_displayLink = nullptr;
+ dispatch_source_t m_displayLinkSource = nullptr;
+ QAtomicInt m_pendingUpdates;
};
#ifndef QT_NO_DEBUG_STREAM
@@ -104,5 +112,9 @@ QDebug operator<<(QDebug debug, const QCocoaScreen *screen);
QT_END_NAMESPACE
+@interface NSScreen (QtExtras)
+@property(readonly) CGDirectDisplayID qt_displayId;
+@end
+
#endif
diff --git a/src/plugins/platforms/cocoa/qcocoascreen.mm b/src/plugins/platforms/cocoa/qcocoascreen.mm
index a17a02b629..80fe83cc5b 100644
--- a/src/plugins/platforms/cocoa/qcocoascreen.mm
+++ b/src/plugins/platforms/cocoa/qcocoascreen.mm
@@ -47,6 +47,10 @@
#include <IOKit/graphics/IOGraphicsLib.h>
+#include <QtGui/private/qwindow_p.h>
+
+#include <QtCore/private/qeventdispatcher_cf_p.h>
+
QT_BEGIN_NAMESPACE
class QCoreTextFontEngine;
@@ -62,11 +66,15 @@ QCocoaScreen::QCocoaScreen(int screenIndex)
QCocoaScreen::~QCocoaScreen()
{
delete m_cursor;
+
+ CVDisplayLinkRelease(m_displayLink);
+ if (m_displayLinkSource)
+ dispatch_release(m_displayLinkSource);
}
NSScreen *QCocoaScreen::nativeScreen() const
{
- NSArray *screens = [NSScreen screens];
+ NSArray<NSScreen *> *screens = [NSScreen screens];
// Stale reference, screen configuration has changed
if (m_screenIndex < 0 || (NSUInteger)m_screenIndex >= [screens count])
@@ -121,8 +129,7 @@ void QCocoaScreen::updateGeometry()
m_format = QImage::Format_RGB32;
m_depth = NSBitsPerPixelFromDepth([nsScreen depth]);
- NSDictionary *devDesc = [nsScreen deviceDescription];
- CGDirectDisplayID dpy = [[devDesc objectForKey:@"NSScreenNumber"] unsignedIntValue];
+ CGDirectDisplayID dpy = nsScreen.qt_displayId;
CGSize size = CGDisplayScreenSize(dpy);
m_physicalSize = QSizeF(size.width, size.height);
m_logicalDpi.first = 72;
@@ -140,6 +147,202 @@ void QCocoaScreen::updateGeometry()
QWindowSystemInterface::handleScreenRefreshRateChange(screen(), m_refreshRate);
}
+// ----------------------- Display link -----------------------
+
+Q_LOGGING_CATEGORY(lcQpaScreenUpdates, "qt.qpa.screen.updates", QtCriticalMsg);
+
+void QCocoaScreen::requestUpdate()
+{
+ if (!m_displayLink) {
+ CVDisplayLinkCreateWithCGDisplay(nativeScreen().qt_displayId, &m_displayLink);
+ CVDisplayLinkSetOutputCallback(m_displayLink, [](CVDisplayLinkRef, const CVTimeStamp*,
+ const CVTimeStamp*, CVOptionFlags, CVOptionFlags*, void* displayLinkContext) -> int {
+ // FIXME: It would be nice if update requests would include timing info
+ static_cast<QCocoaScreen*>(displayLinkContext)->deliverUpdateRequests();
+ return kCVReturnSuccess;
+ }, this);
+ qCDebug(lcQpaScreenUpdates) << "Display link created for" << this;
+
+ // During live window resizing -[NSWindow _resizeWithEvent:] will spin a local event loop
+ // in event-tracking mode, dequeuing only the mouse drag events needed to update the window's
+ // frame. It will repeatedly spin this loop until no longer receiving any mouse drag events,
+ // and will then update the frame (effectively coalescing/compressing the events). Unfortunately
+ // the events are pulled out using -[NSApplication nextEventMatchingEventMask:untilDate:inMode:dequeue:]
+ // which internally uses CFRunLoopRunSpecific, so the event loop will also process GCD queues and other
+ // runloop sources that have been added to the tracking mode. This includes the GCD display-link
+ // source that we use to marshal the display-link callback over to the main thread. If the
+ // subsequent delivery of the update-request on the main thread stalls due to inefficient
+ // user code, the NSEventThread will have had time to deliver additional mouse drag events,
+ // and the logic in -[NSWindow _resizeWithEvent:] will keep on compressing events and never
+ // get to the point of actually updating the window frame, making it seem like the window
+ // is stuck in its original size. Only when the user stops moving their mouse, and the event
+ // queue is completely drained of drag events, will the window frame be updated.
+
+ // By keeping an event tap listening for drag events, registered as a version 1 runloop source,
+ // we prevent the GCD source from being prioritized, giving the resize logic enough time
+ // to finish coalescing the events. This is incidental, but conveniently gives us the behavior
+ // we are looking for, interleaving display-link updates and resize events.
+ static CFMachPortRef eventTap = []() {
+ CFMachPortRef eventTap = CGEventTapCreateForPid(getpid(), kCGTailAppendEventTap,
+ kCGEventTapOptionListenOnly, NSEventMaskLeftMouseDragged,
+ [](CGEventTapProxy, CGEventType type, CGEventRef event, void *) -> CGEventRef {
+ if (type == kCGEventTapDisabledByTimeout)
+ qCWarning(lcQpaScreenUpdates) << "Event tap disabled due to timeout!";
+ return event; // Listen only tap, so what we return doesn't really matter
+ }, nullptr);
+ CGEventTapEnable(eventTap, false); // Event taps are normally enabled when created
+ static CFRunLoopSourceRef runLoopSource = CFMachPortCreateRunLoopSource(kCFAllocatorDefault, eventTap, 0);
+ CFRunLoopAddSource(CFRunLoopGetCurrent(), runLoopSource, kCFRunLoopCommonModes);
+
+ NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
+ [center addObserverForName:NSWindowWillStartLiveResizeNotification object:nil queue:nil
+ usingBlock:^(NSNotification *notification) {
+ qCDebug(lcQpaScreenUpdates) << "Live resize of" << notification.object
+ << "started. Enabling event tap";
+ CGEventTapEnable(eventTap, true);
+ }];
+ [center addObserverForName:NSWindowDidEndLiveResizeNotification object:nil queue:nil
+ usingBlock:^(NSNotification *notification) {
+ qCDebug(lcQpaScreenUpdates) << "Live resize of" << notification.object
+ << "ended. Disabling event tap";
+ CGEventTapEnable(eventTap, false);
+ }];
+ return eventTap;
+ }();
+ Q_UNUSED(eventTap);
+ }
+
+ if (!CVDisplayLinkIsRunning(m_displayLink)) {
+ qCDebug(lcQpaScreenUpdates) << "Starting display link for" << this;
+ CVDisplayLinkStart(m_displayLink);
+ }
+}
+
+// Helper to allow building up debug output in multiple steps
+struct DeferredDebugHelper
+{
+ DeferredDebugHelper(const QLoggingCategory &cat) {
+ if (cat.isDebugEnabled())
+ debug = new QDebug(QMessageLogger().debug(cat).nospace());
+ }
+ ~DeferredDebugHelper() {
+ flushOutput();
+ }
+ void flushOutput() {
+ if (debug) {
+ delete debug;
+ debug = nullptr;
+ }
+ }
+ QDebug *debug = nullptr;
+};
+
+#define qDeferredDebug(helper) if (Q_UNLIKELY(helper.debug)) *helper.debug
+
+void QCocoaScreen::deliverUpdateRequests()
+{
+ if (!QGuiApplication::instance())
+ return;
+
+ // The CVDisplayLink callback is a notification that it's a good time to produce a new frame.
+ // Since the callback is delivered on a separate thread we have to marshal it over to the
+ // main thread, as Qt requires update requests to be delivered there. This needs to happen
+ // asynchronously, as otherwise we may end up deadlocking if the main thread calls back
+ // into any of the CVDisplayLink APIs.
+ if (QThread::currentThread() != QGuiApplication::instance()->thread()) {
+ // We're explicitly not using the data of the GCD source to track the pending updates,
+ // as the data isn't reset to 0 until after the event handler, and also doesn't update
+ // during the event handler, both of which we need to track late frames.
+ const int pendingUpdates = ++m_pendingUpdates;
+
+ DeferredDebugHelper screenUpdates(lcQpaScreenUpdates());
+ qDeferredDebug(screenUpdates) << "display link callback for screen " << m_screenIndex;
+
+ if (const int framesAheadOfDelivery = pendingUpdates - 1) {
+ // If we have more than one update pending it means that a previous display link callback
+ // has not been fully processed on the main thread, either because GCD hasn't delivered
+ // it on the main thread yet, because the processing of the update request is taking
+ // too long, or because the update request was deferred due to window live resizing.
+ qDeferredDebug(screenUpdates) << ", " << framesAheadOfDelivery << " frame(s) ahead";
+
+ // We skip the frame completely if we're live-resizing, to not put any extra
+ // strain on the main thread runloop. Otherwise we assume we should push frames
+ // as fast as possible, and hopefully the callback will be delivered on the
+ // main thread just when the previous finished.
+ if (qt_apple_sharedApplication().keyWindow.inLiveResize) {
+ qDeferredDebug(screenUpdates) << "; waiting for main thread to catch up";
+ return;
+ }
+ }
+
+ qDeferredDebug(screenUpdates) << "; signaling dispatch source";
+
+ if (!m_displayLinkSource) {
+ m_displayLinkSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_DATA_ADD, 0, 0, dispatch_get_main_queue());
+ dispatch_source_set_event_handler(m_displayLinkSource, ^{
+ deliverUpdateRequests();
+ });
+ dispatch_resume(m_displayLinkSource);
+ }
+
+ dispatch_source_merge_data(m_displayLinkSource, 1);
+
+ } else {
+ DeferredDebugHelper screenUpdates(lcQpaScreenUpdates());
+ qDeferredDebug(screenUpdates) << "gcd event handler on main thread";
+
+ const int pendingUpdates = m_pendingUpdates;
+ if (pendingUpdates > 1)
+ qDeferredDebug(screenUpdates) << ", " << (pendingUpdates - 1) << " frame(s) behind display link";
+
+ screenUpdates.flushOutput();
+
+ bool pauseUpdates = true;
+
+ auto windows = QGuiApplication::allWindows();
+ for (int i = 0; i < windows.size(); ++i) {
+ QWindow *window = windows.at(i);
+ QPlatformWindow *platformWindow = window->handle();
+ if (!platformWindow)
+ continue;
+
+ if (!platformWindow->hasPendingUpdateRequest())
+ continue;
+
+ if (window->screen() != screen())
+ continue;
+
+ // Skip windows that are not doing update requests via display link
+ if (!(window->format().swapInterval() > 0))
+ continue;
+
+ platformWindow->deliverUpdateRequest();
+
+ // Another update request was triggered, keep the display link running
+ if (platformWindow->hasPendingUpdateRequest())
+ pauseUpdates = false;
+ }
+
+ if (pauseUpdates) {
+ // Pause the display link if there are no pending update requests
+ qCDebug(lcQpaScreenUpdates) << "Stopping display link for" << this;
+ CVDisplayLinkStop(m_displayLink);
+ }
+
+ if (const int missedUpdates = m_pendingUpdates.fetchAndStoreRelaxed(0) - pendingUpdates) {
+ qCWarning(lcQpaScreenUpdates) << "main thread missed" << missedUpdates
+ << "update(s) from display link during update request delivery";
+ }
+ }
+}
+
+bool QCocoaScreen::isRunningDisplayLink() const
+{
+ return m_displayLink && CVDisplayLinkIsRunning(m_displayLink);
+}
+
+// -----------------------------------------------------------
+
qreal QCocoaScreen::devicePixelRatio() const
{
QMacAutoReleasePool pool;
@@ -165,7 +368,7 @@ QWindow *QCocoaScreen::topLevelAt(const QPoint &point) const
// belowWindowWithWindowNumber] may return windows that are not interesting
// to Qt. The search iterates until a suitable window or no window is found.
NSInteger topWindowNumber = 0;
- QWindow *window = 0;
+ QWindow *window = nullptr;
do {
// Get the top-most window, below any previously rejected window.
topWindowNumber = [NSWindow windowNumberAtPoint:screenPoint
@@ -173,7 +376,7 @@ QWindow *QCocoaScreen::topLevelAt(const QPoint &point) const
// Continue the search if the window does not belong to this process.
NSWindow *nsWindow = [NSApp windowWithWindowNumber:topWindowNumber];
- if (nsWindow == 0)
+ if (!nsWindow)
continue;
// Continue the search if the window does not belong to Qt.
@@ -310,3 +513,12 @@ QDebug operator<<(QDebug debug, const QCocoaScreen *screen)
#endif // !QT_NO_DEBUG_STREAM
QT_END_NAMESPACE
+
+@implementation NSScreen (QtExtras)
+
+- (CGDirectDisplayID)qt_displayId
+{
+ return [self.deviceDescription[@"NSScreenNumber"] unsignedIntValue];
+}
+
+@end
diff --git a/src/plugins/platforms/cocoa/qcocoasystemsettings.mm b/src/plugins/platforms/cocoa/qcocoasystemsettings.mm
index bad91a2d5d..06c0f1adf0 100644
--- a/src/plugins/platforms/cocoa/qcocoasystemsettings.mm
+++ b/src/plugins/platforms/cocoa/qcocoasystemsettings.mm
@@ -45,6 +45,9 @@
#include <QtGui/qfont.h>
#include <QtGui/private/qcoregraphics_p.h>
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_CLANG("-Wobjc-method-access")
+
QT_BEGIN_NAMESPACE
QPalette * qt_mac_createSystemPalette()
@@ -65,18 +68,25 @@ QPalette * qt_mac_createSystemPalette()
palette->setBrush(QPalette::Disabled, QPalette::Text, dark);
palette->setBrush(QPalette::Disabled, QPalette::ButtonText, dark);
palette->setBrush(QPalette::Disabled, QPalette::Base, backgroundBrush);
+ palette->setBrush(QPalette::Active, QPalette::Base, backgroundBrush);
+ palette->setBrush(QPalette::Inactive, QPalette::Base, backgroundBrush);
palette->setColor(QPalette::Disabled, QPalette::Dark, QColor(191, 191, 191));
palette->setColor(QPalette::Active, QPalette::Dark, QColor(191, 191, 191));
palette->setColor(QPalette::Inactive, QPalette::Dark, QColor(191, 191, 191));
// System palette initialization:
- palette->setBrush(QPalette::Active, QPalette::Highlight,
- qt_mac_toQBrush([NSColor selectedControlColor]));
- QBrush br = qt_mac_toQBrush([NSColor secondarySelectedControlColor]);
- palette->setBrush(QPalette::Inactive, QPalette::Highlight, br);
- palette->setBrush(QPalette::Disabled, QPalette::Highlight, br);
+ QBrush br = qt_mac_toQBrush([NSColor selectedControlColor]);
+ palette->setBrush(QPalette::Active, QPalette::Highlight, br);
+ if (__builtin_available(macOS 10.14, *)) {
+ const auto inactiveHighlight = qt_mac_toQBrush([NSColor unemphasizedSelectedContentBackgroundColor]);
+ palette->setBrush(QPalette::Inactive, QPalette::Highlight, inactiveHighlight);
+ palette->setBrush(QPalette::Disabled, QPalette::Highlight, inactiveHighlight);
+ } else {
+ palette->setBrush(QPalette::Inactive, QPalette::Highlight, br);
+ palette->setBrush(QPalette::Disabled, QPalette::Highlight, br);
+ }
- palette->setBrush(QPalette::Shadow, background.darker(170));
+ palette->setBrush(QPalette::Shadow, qt_mac_toQColor([NSColor shadowColor]));
qc = qt_mac_toQColor([NSColor controlTextColor]);
palette->setColor(QPalette::Active, QPalette::Text, qc);
@@ -98,10 +108,11 @@ QPalette * qt_mac_createSystemPalette()
struct QMacPaletteMap {
inline QMacPaletteMap(QPlatformTheme::Palette p, NSColor *a, NSColor *i) :
- paletteRole(p), active(a), inactive(i) { }
+ active(a), inactive(i), paletteRole(p) { }
+ NSColor *active;
+ NSColor *inactive;
QPlatformTheme::Palette paletteRole;
- NSColor *active, *inactive;
};
#define MAC_PALETTE_ENTRY(pal, active, inactive) \
@@ -131,7 +142,7 @@ QHash<QPlatformTheme::Palette, QPalette*> qt_mac_createRolePalettes()
QColor qc;
for (int i = 0; i < mac_widget_colors_count; i++) {
QPalette &pal = *qt_mac_createSystemPalette();
- if (mac_widget_colors[i].active != 0) {
+ if (mac_widget_colors[i].active) {
qc = qt_mac_toQColor(mac_widget_colors[i].active);
pal.setColor(QPalette::Active, QPalette::Text, qc);
pal.setColor(QPalette::Inactive, QPalette::Text, qc);
@@ -146,7 +157,14 @@ QHash<QPlatformTheme::Palette, QPalette*> qt_mac_createRolePalettes()
}
if (mac_widget_colors[i].paletteRole == QPlatformTheme::MenuPalette
|| mac_widget_colors[i].paletteRole == QPlatformTheme::MenuBarPalette) {
- pal.setBrush(QPalette::Highlight, qt_mac_toQColor([NSColor selectedMenuItemColor]));
+ NSColor *selectedMenuItemColor = nil;
+ if (__builtin_available(macOS 10.14, *)) {
+ // Cheap approximation for NSVisualEffectView (see deprecation note for selectedMenuItemTextColor)
+ selectedMenuItemColor = [[NSColor selectedContentBackgroundColor] highlightWithLevel:0.4];
+ } else {
+ selectedMenuItemColor = [NSColor selectedMenuItemTextColor];
+ }
+ pal.setBrush(QPalette::Highlight, qt_mac_toQColor(selectedMenuItemColor));
qc = qt_mac_toQColor([NSColor labelColor]);
pal.setBrush(QPalette::ButtonText, qc);
pal.setBrush(QPalette::Text, qc);
@@ -164,20 +182,36 @@ QHash<QPlatformTheme::Palette, QPalette*> qt_mac_createRolePalettes()
pal.setColor(QPalette::Active, QPalette::ButtonText,
pal.color(QPalette::Active, QPalette::Text));
} else if (mac_widget_colors[i].paletteRole == QPlatformTheme::ItemViewPalette) {
+ NSArray<NSColor *> *baseColors = nil;
+ NSColor *activeHighlightColor = nil;
+ if (__builtin_available(macOS 10.14, *)) {
+ baseColors = [NSColor alternatingContentBackgroundColors];
+ activeHighlightColor = [NSColor selectedContentBackgroundColor];
+ pal.setBrush(QPalette::Inactive, QPalette::HighlightedText,
+ qt_mac_toQBrush([NSColor unemphasizedSelectedTextColor]));
+ } else {
+ baseColors = [NSColor controlAlternatingRowBackgroundColors];
+ activeHighlightColor = [NSColor selectedControlColor];
+ pal.setBrush(QPalette::Inactive, QPalette::HighlightedText,
+ pal.brush(QPalette::Active, QPalette::Text));
+ }
+ pal.setBrush(QPalette::Base, qt_mac_toQBrush(baseColors[0]));
+ pal.setBrush(QPalette::AlternateBase, qt_mac_toQBrush(baseColors[1]));
pal.setBrush(QPalette::Active, QPalette::Highlight,
- qt_mac_toQBrush([NSColor alternateSelectedControlColor]));
+ qt_mac_toQBrush(activeHighlightColor));
pal.setBrush(QPalette::Active, QPalette::HighlightedText,
qt_mac_toQBrush([NSColor alternateSelectedControlTextColor]));
pal.setBrush(QPalette::Inactive, QPalette::Text,
- pal.brush(QPalette::Active, QPalette::Text));
- pal.setBrush(QPalette::Inactive, QPalette::HighlightedText,
- pal.brush(QPalette::Active, QPalette::Text));
+ pal.brush(QPalette::Active, QPalette::Text));
} else if (mac_widget_colors[i].paletteRole == QPlatformTheme::TextEditPalette) {
+ pal.setBrush(QPalette::Active, QPalette::Base, qt_mac_toQColor([NSColor textBackgroundColor]));
pal.setBrush(QPalette::Inactive, QPalette::Text,
pal.brush(QPalette::Active, QPalette::Text));
pal.setBrush(QPalette::Inactive, QPalette::HighlightedText,
pal.brush(QPalette::Active, QPalette::Text));
- } else if (mac_widget_colors[i].paletteRole == QPlatformTheme::TextLineEditPalette) {
+ } else if (mac_widget_colors[i].paletteRole == QPlatformTheme::TextLineEditPalette
+ || mac_widget_colors[i].paletteRole == QPlatformTheme::ComboBoxPalette) {
+ pal.setBrush(QPalette::Active, QPalette::Base, qt_mac_toQColor([NSColor textBackgroundColor]));
pal.setBrush(QPalette::Disabled, QPalette::Base,
pal.brush(QPalette::Active, QPalette::Base));
}
@@ -187,3 +221,5 @@ QHash<QPlatformTheme::Palette, QPalette*> qt_mac_createRolePalettes()
}
QT_END_NAMESPACE
+
+QT_WARNING_POP
diff --git a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.h b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.h
index 2f1a1e42a9..d831612c22 100644
--- a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.h
+++ b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.h
@@ -55,7 +55,7 @@ class QSystemTrayIconSys;
class Q_GUI_EXPORT QCocoaSystemTrayIcon : public QPlatformSystemTrayIcon
{
public:
- QCocoaSystemTrayIcon() : m_sys(0) {}
+ QCocoaSystemTrayIcon() : m_sys(nullptr) {}
void init() override;
void cleanup() override;
diff --git a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
index 5e6913a89a..0158895441 100644
--- a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
+++ b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
@@ -95,31 +95,16 @@ QT_USE_NAMESPACE
@class QT_MANGLE_NAMESPACE(QNSImageView);
@interface QT_MANGLE_NAMESPACE(QNSStatusItem) : NSObject <NSUserNotificationCenterDelegate>
-{
-@public
- QCocoaSystemTrayIcon *systray;
- NSStatusItem *item;
- QCocoaMenu *menu;
- QIcon icon;
- QT_MANGLE_NAMESPACE(QNSImageView) *imageCell;
-}
--(id)initWithSysTray:(QCocoaSystemTrayIcon *)systray;
--(void)dealloc;
--(NSStatusItem*)item;
--(QRectF)geometry;
+@property (nonatomic, assign) QCocoaMenu *menu;
+@property (nonatomic, assign) QIcon icon;
+@property (nonatomic, readonly) NSStatusItem *item;
+@property (nonatomic, readonly) QRectF geometry;
+- (instancetype)initWithSysTray:(QCocoaSystemTrayIcon *)systray;
- (void)triggerSelector:(id)sender button:(Qt::MouseButton)mouseButton;
- (void)doubleClickSelector:(id)sender;
-- (BOOL)userNotificationCenter:(NSUserNotificationCenter *)center shouldPresentNotification:(NSUserNotification *)notification;
-- (void)userNotificationCenter:(NSUserNotificationCenter *)center didActivateNotification:(NSUserNotification *)notification;
@end
-@interface QT_MANGLE_NAMESPACE(QNSImageView) : NSImageView {
- BOOL down;
- QT_MANGLE_NAMESPACE(QNSStatusItem) *parent;
-}
--(id)initWithParent:(QT_MANGLE_NAMESPACE(QNSStatusItem)*)myParent;
--(void)menuTrackingDone:(NSNotification*)notification;
--(void)mousePressed:(NSEvent *)mouseEvent button:(Qt::MouseButton)mouseButton;
+@interface QT_MANGLE_NAMESPACE(QNSImageView) : NSImageView
@end
QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSStatusItem);
@@ -162,7 +147,7 @@ QRect QCocoaSystemTrayIcon::geometry() const
void QCocoaSystemTrayIcon::cleanup()
{
delete m_sys;
- m_sys = 0;
+ m_sys = nullptr;
}
static bool heightCompareFunction (QSize a, QSize b) { return (a.height() < b.height()); }
@@ -178,7 +163,7 @@ void QCocoaSystemTrayIcon::updateIcon(const QIcon &icon)
if (!m_sys)
return;
- m_sys->item->icon = icon;
+ m_sys->item.icon = icon;
// The reccomended maximum title bar icon height is 18 points
// (device independent pixels). The menu height on past and
@@ -249,8 +234,8 @@ void QCocoaSystemTrayIcon::updateMenu(QPlatformMenu *menu)
if (!m_sys)
return;
- m_sys->item->menu = static_cast<QCocoaMenu *>(menu);
- if (menu && [m_sys->item->menu->nsMenu() numberOfItems] > 0) {
+ m_sys->item.menu = static_cast<QCocoaMenu *>(menu);
+ if (menu && [m_sys->item.menu->nsMenu() numberOfItems] > 0) {
[[m_sys->item item] setHighlightMode:YES];
} else {
[[m_sys->item item] setHighlightMode:NO];
@@ -289,23 +274,29 @@ void QCocoaSystemTrayIcon::showMessage(const QString &title, const QString &mess
}
QT_END_NAMESPACE
-@implementation QNSImageView
--(id)initWithParent:(QNSStatusItem*)myParent {
+@implementation NSStatusItem (Qt)
+@end
+
+@implementation QNSImageView {
+ BOOL down;
+ QT_MANGLE_NAMESPACE(QNSStatusItem) *parent;
+}
+
+- (instancetype)initWithParent:(QNSStatusItem *)myParent {
self = [super init];
parent = myParent;
down = NO;
return self;
}
--(void)menuTrackingDone:(NSNotification*)notification
+- (void)menuTrackingDone:(NSNotification *)__unused notification
{
- Q_UNUSED(notification);
down = NO;
[self setNeedsDisplay:YES];
}
--(void)mousePressed:(NSEvent *)mouseEvent button:(Qt::MouseButton)mouseButton
+- (void)mousePressed:(NSEvent *)mouseEvent
{
down = YES;
int clickCount = [mouseEvent clickCount];
@@ -315,16 +306,16 @@ QT_END_NAMESPACE
[self menuTrackingDone:nil];
[parent doubleClickSelector:self];
} else {
- [parent triggerSelector:self button:mouseButton];
+ [parent triggerSelector:self button:cocoaButton2QtButton(mouseEvent)];
}
}
--(void)mouseDown:(NSEvent *)mouseEvent
+- (void)mouseDown:(NSEvent *)mouseEvent
{
- [self mousePressed:mouseEvent button:Qt::LeftButton];
+ [self mousePressed:mouseEvent];
}
--(void)mouseUp:(NSEvent *)mouseEvent
+- (void)mouseUp:(NSEvent *)mouseEvent
{
Q_UNUSED(mouseEvent);
[self menuTrackingDone:nil];
@@ -332,10 +323,10 @@ QT_END_NAMESPACE
- (void)rightMouseDown:(NSEvent *)mouseEvent
{
- [self mousePressed:mouseEvent button:Qt::RightButton];
+ [self mousePressed:mouseEvent];
}
--(void)rightMouseUp:(NSEvent *)mouseEvent
+- (void)rightMouseUp:(NSEvent *)mouseEvent
{
Q_UNUSED(mouseEvent);
[self menuTrackingDone:nil];
@@ -343,29 +334,36 @@ QT_END_NAMESPACE
- (void)otherMouseDown:(NSEvent *)mouseEvent
{
- [self mousePressed:mouseEvent button:cocoaButton2QtButton([mouseEvent buttonNumber])];
+ [self mousePressed:mouseEvent];
}
--(void)otherMouseUp:(NSEvent *)mouseEvent
+- (void)otherMouseUp:(NSEvent *)mouseEvent
{
Q_UNUSED(mouseEvent);
[self menuTrackingDone:nil];
}
--(void)drawRect:(NSRect)rect {
+- (void)drawRect:(NSRect)rect {
[[parent item] drawStatusBarBackgroundInRect:rect withHighlight:down];
[super drawRect:rect];
}
@end
-@implementation QNSStatusItem
+@implementation QNSStatusItem {
+ QCocoaSystemTrayIcon *systray;
+ NSStatusItem *item;
+ QT_MANGLE_NAMESPACE(QNSImageView) *imageCell;
+}
+
+@synthesize menu = menu;
+@synthesize icon = icon;
--(id)initWithSysTray:(QCocoaSystemTrayIcon *)sys
+- (instancetype)initWithSysTray:(QCocoaSystemTrayIcon *)sys
{
self = [super init];
if (self) {
item = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength] retain];
- menu = 0;
+ menu = nullptr;
systray = sys;
imageCell = [[QNSImageView alloc] initWithParent:self];
[item setView: imageCell];
@@ -373,19 +371,19 @@ QT_END_NAMESPACE
return self;
}
--(void)dealloc {
+- (void)dealloc {
[[NSStatusBar systemStatusBar] removeStatusItem:item];
[[NSNotificationCenter defaultCenter] removeObserver:imageCell];
[imageCell release];
[item release];
[super dealloc];
-
}
--(NSStatusItem*)item {
+- (NSStatusItem *)item {
return item;
}
--(QRectF)geometry {
+
+- (QRectF)geometry {
if (NSWindow *window = [[item view] window]) {
if (QCocoaScreen *screen = QCocoaIntegration::instance()->screenForNSScreen([window screen]))
return screen->mapFromNative([window frame]);
diff --git a/src/plugins/platforms/cocoa/qcocoatheme.mm b/src/plugins/platforms/cocoa/qcocoatheme.mm
index 93f0400916..0f1bfea7b5 100644
--- a/src/plugins/platforms/cocoa/qcocoatheme.mm
+++ b/src/plugins/platforms/cocoa/qcocoatheme.mm
@@ -75,28 +75,26 @@
#endif
#endif
-#include <Carbon/Carbon.h>
+#include <CoreServices/CoreServices.h>
-@interface QT_MANGLE_NAMESPACE(QCocoaThemeNotificationReceiver) : NSObject {
-QCocoaTheme *mPrivate;
-}
-- (id)initWithPrivate:(QCocoaTheme *)priv;
-- (void)systemColorsDidChange:(NSNotification *)notification;
+@interface QT_MANGLE_NAMESPACE(QCocoaThemeNotificationReceiver) : NSObject
@end
QT_NAMESPACE_ALIAS_OBJC_CLASS(QCocoaThemeNotificationReceiver);
-@implementation QCocoaThemeNotificationReceiver
-- (id)initWithPrivate:(QCocoaTheme *)priv
+@implementation QCocoaThemeNotificationReceiver {
+ QCocoaTheme *mPrivate;
+}
+
+- (instancetype)initWithPrivate:(QCocoaTheme *)priv
{
- self = [super init];
- mPrivate = priv;
+ if ((self = [self init]))
+ mPrivate = priv;
return self;
}
-- (void)systemColorsDidChange:(NSNotification *)notification
+- (void)systemColorsDidChange:(NSNotification *)__unused notification
{
- Q_UNUSED(notification);
mPrivate->reset();
QWindowSystemInterface::handleThemeChange(nullptr);
}
@@ -107,7 +105,7 @@ QT_BEGIN_NAMESPACE
const char *QCocoaTheme::name = "cocoa";
QCocoaTheme::QCocoaTheme()
- :m_systemPalette(0)
+ : m_systemPalette(nullptr)
{
m_notificationReceiver = [[QT_MANGLE_NAMESPACE(QCocoaThemeNotificationReceiver) alloc] initWithPrivate:this];
[[NSNotificationCenter defaultCenter] addObserver:m_notificationReceiver
@@ -147,7 +145,7 @@ bool QCocoaTheme::usePlatformNativeDialog(DialogType dialogType) const
return false;
}
-QPlatformDialogHelper * QCocoaTheme::createPlatformDialogHelper(DialogType dialogType) const
+QPlatformDialogHelper *QCocoaTheme::createPlatformDialogHelper(DialogType dialogType) const
{
switch (dialogType) {
#if defined(QT_WIDGETS_LIB) && QT_CONFIG(filedialog)
@@ -163,7 +161,7 @@ QPlatformDialogHelper * QCocoaTheme::createPlatformDialogHelper(DialogType dialo
return new QCocoaFontDialogHelper();
#endif
default:
- return 0;
+ return nullptr;
}
}
@@ -183,9 +181,9 @@ const QPalette *QCocoaTheme::palette(Palette type) const
} else {
if (m_palettes.isEmpty())
m_palettes = qt_mac_createRolePalettes();
- return m_palettes.value(type, 0);
+ return m_palettes.value(type, nullptr);
}
- return 0;
+ return nullptr;
}
QHash<QPlatformTheme::Font, QFont *> qt_mac_createRoleFonts()
@@ -199,7 +197,7 @@ const QFont *QCocoaTheme::font(Font type) const
if (m_fonts.isEmpty()) {
m_fonts = qt_mac_createRoleFonts();
}
- return m_fonts.value(type, 0);
+ return m_fonts.value(type, nullptr);
}
//! \internal
diff --git a/src/plugins/platforms/cocoa/qcocoavulkaninstance.h b/src/plugins/platforms/cocoa/qcocoavulkaninstance.h
new file mode 100644
index 0000000000..018488a0a1
--- /dev/null
+++ b/src/plugins/platforms/cocoa/qcocoavulkaninstance.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QCOCOAVULKANINSTANCE_H
+#define QCOCOAVULKANINSTANCE_H
+
+#include <QtCore/QHash>
+#include <QtVulkanSupport/private/qbasicvulkanplatforminstance_p.h>
+
+#include <AppKit/AppKit.h>
+
+#include <MoltenVK/mvk_vulkan.h>
+
+QT_BEGIN_NAMESPACE
+
+class QCocoaVulkanInstance : public QBasicPlatformVulkanInstance
+{
+public:
+ QCocoaVulkanInstance(QVulkanInstance *instance);
+ ~QCocoaVulkanInstance();
+
+ void createOrAdoptInstance() override;
+
+ VkSurfaceKHR *createSurface(QWindow *window);
+ VkSurfaceKHR createSurface(NSView *view);
+private:
+ QVulkanInstance *m_instance = nullptr;
+ QLibrary m_lib;
+ VkSurfaceKHR m_nullSurface = nullptr;
+ PFN_vkCreateMacOSSurfaceMVK m_createSurface = nullptr;
+};
+
+QT_END_NAMESPACE
+
+#endif // QXCBVULKANINSTANCE_H
diff --git a/src/plugins/platforms/cocoa/qcocoavulkaninstance.mm b/src/plugins/platforms/cocoa/qcocoavulkaninstance.mm
new file mode 100644
index 0000000000..b00fde6c6f
--- /dev/null
+++ b/src/plugins/platforms/cocoa/qcocoavulkaninstance.mm
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qcocoavulkaninstance.h"
+#include "qcocoawindow.h"
+
+QT_BEGIN_NAMESPACE
+
+QCocoaVulkanInstance::QCocoaVulkanInstance(QVulkanInstance *instance)
+ : m_instance(instance)
+{
+ loadVulkanLibrary(QStringLiteral("vulkan"));
+}
+
+QCocoaVulkanInstance::~QCocoaVulkanInstance()
+{
+}
+
+void QCocoaVulkanInstance::createOrAdoptInstance()
+{
+ initInstance(m_instance, QByteArrayList());
+}
+
+VkSurfaceKHR *QCocoaVulkanInstance::createSurface(QWindow *window)
+{
+ QCocoaWindow *cocoaWindow = static_cast<QCocoaWindow *>(window->handle());
+ if (cocoaWindow->m_vulkanSurface)
+ destroySurface(cocoaWindow->m_vulkanSurface);
+ cocoaWindow->m_vulkanSurface = createSurface(cocoaWindow->m_view);
+ return &cocoaWindow->m_vulkanSurface;
+}
+
+VkSurfaceKHR QCocoaVulkanInstance::createSurface(NSView *view)
+{
+ if (!m_createSurface) {
+ m_createSurface = reinterpret_cast<PFN_vkCreateMacOSSurfaceMVK>(
+ m_vkGetInstanceProcAddr(m_vkInst, "vkCreateMacOSSurfaceMVK"));
+ }
+ if (!m_createSurface) {
+ qWarning("Failed to find vkCreateMacOSSurfaceMVK");
+ return m_nullSurface;
+ }
+
+ VkMacOSSurfaceCreateInfoMVK surfaceInfo;
+ surfaceInfo.sType = VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK;
+ surfaceInfo.pNext = nullptr;
+ surfaceInfo.flags = 0;
+ surfaceInfo.pView = view;
+
+ VkSurfaceKHR surface = nullptr;
+ VkResult err = m_createSurface(m_vkInst, &surfaceInfo, nullptr, &surface);
+ if (err != VK_SUCCESS)
+ qWarning("Failed to create Vulkan surface: %d", err);
+
+ return surface;
+}
+
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.h b/src/plugins/platforms/cocoa/qcocoawindow.h
index fb91c53a7a..225c7eda84 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.h
+++ b/src/plugins/platforms/cocoa/qcocoawindow.h
@@ -53,6 +53,10 @@
#include "qnswindow.h"
#include "qt_mac_p.h"
+#if QT_CONFIG(vulkan)
+#include <MoltenVK/mvk_vulkan.h>
+#endif
+
QT_BEGIN_NAMESPACE
#ifndef QT_NO_DEBUG_STREAM
@@ -112,6 +116,7 @@ public:
void raise() override;
void lower() override;
bool isExposed() const override;
+ bool isEmbedded() const override;
bool isOpaque() const;
void propagateSizeHints() override;
void setOpacity(qreal level) override;
@@ -124,6 +129,8 @@ public:
bool isForeignWindow() const override;
void requestUpdate() override;
+ void deliverUpdateRequest() override;
+
void requestActivateWindow() override;
WId winId() const override;
@@ -132,7 +139,7 @@ public:
NSView *view() const;
NSWindow *nativeWindow() const;
- void setEmbeddedInForeignView(bool subwindow);
+ void setEmbeddedInForeignView();
Q_NOTIFICATION_HANDLER(NSViewFrameDidChangeNotification) void viewDidChangeFrame();
Q_NOTIFICATION_HANDLER(NSViewGlobalFrameDidChangeNotification) void viewDidChangeGlobalFrame();
@@ -237,11 +244,6 @@ public: // for QNSView
NSView *m_view;
QCocoaNSWindow *m_nsWindow;
- // TODO merge to one variable if possible
- bool m_viewIsEmbedded; // true if the m_view is actually embedded in a "foreign" NSView hiearchy
- bool m_viewIsToBeEmbedded; // true if the m_view is intended to be embedded in a "foreign" NSView hiearchy
-
- Qt::WindowFlags m_windowFlags;
Qt::WindowStates m_lastReportedWindowState;
Qt::WindowModality m_windowModality;
QPointer<QWindow> m_enterLeaveTargetWindow;
@@ -283,6 +285,10 @@ public: // for QNSView
};
QHash<quintptr, BorderRange> m_contentBorderAreas; // identifer -> uppper/lower
QHash<quintptr, bool> m_enabledContentBorderAreas; // identifer -> enabled state (true/false)
+
+#if QT_CONFIG(vulkan)
+ VkSurfaceKHR m_vulkanSurface = nullptr;
+#endif
};
#ifndef QT_NO_DEBUG_STREAM
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 9b10c8b053..c916ae41de 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -117,24 +117,19 @@ static void qRegisterNotificationCallbacks()
return;
}
- if (lcCocoaNotifications().isDebugEnabled()) {
- if (cocoaWindows.isEmpty()) {
- qCDebug(lcCocoaNotifications) << "Could not find forwarding target for" <<
- qPrintable(notificationName) << "from" << notification.object;
- } else {
- QVector<QCocoaWindow *> debugWindows;
- for (QCocoaWindow *cocoaWindow : cocoaWindows)
- debugWindows += cocoaWindow;
- qCDebug(lcCocoaNotifications) << "Forwarding" << qPrintable(notificationName) <<
- "to" << debugWindows;
- }
+ if (lcCocoaNotifications().isDebugEnabled() && !cocoaWindows.isEmpty()) {
+ QVector<QCocoaWindow *> debugWindows;
+ for (QCocoaWindow *cocoaWindow : cocoaWindows)
+ debugWindows += cocoaWindow;
+ qCDebug(lcCocoaNotifications) << "Forwarding" << qPrintable(notificationName) <<
+ "to" << debugWindows;
}
// FIXME: Could be a foreign window, look up by iterating top level QWindows
for (QCocoaWindow *cocoaWindow : cocoaWindows) {
if (!method.invoke(cocoaWindow, Qt::DirectConnection)) {
- qCWarning(lcQpaCocoaWindow) << "Failed to invoke NSNotification callback for"
+ qCWarning(lcQpaWindow) << "Failed to invoke NSNotification callback for"
<< notification.name << "on" << cocoaWindow;
}
}
@@ -148,9 +143,7 @@ const int QCocoaWindow::NoAlertRequest = -1;
QCocoaWindow::QCocoaWindow(QWindow *win, WId nativeHandle)
: QPlatformWindow(win)
, m_view(nil)
- , m_nsWindow(0)
- , m_viewIsEmbedded(false)
- , m_viewIsToBeEmbedded(false)
+ , m_nsWindow(nil)
, m_lastReportedWindowState(Qt::WindowNoState)
, m_windowModality(Qt::NonModal)
, m_windowUnderMouse(false)
@@ -159,9 +152,9 @@ QCocoaWindow::QCocoaWindow(QWindow *win, WId nativeHandle)
, m_inSetGeometry(false)
, m_inSetStyleMask(false)
#ifndef QT_NO_OPENGL
- , m_glContext(0)
+ , m_glContext(nullptr)
#endif
- , m_menubar(0)
+ , m_menubar(nullptr)
, m_needsInvalidateShadow(false)
, m_hasModalSession(false)
, m_frameStrutEventsEnabled(false)
@@ -173,7 +166,7 @@ QCocoaWindow::QCocoaWindow(QWindow *win, WId nativeHandle)
, m_topContentBorderThickness(0)
, m_bottomContentBorderThickness(0)
{
- qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::QCocoaWindow" << window();
+ qCDebug(lcQpaWindow) << "QCocoaWindow::QCocoaWindow" << window();
if (nativeHandle) {
m_view = reinterpret_cast<NSView *>(nativeHandle);
@@ -183,41 +176,24 @@ QCocoaWindow::QCocoaWindow(QWindow *win, WId nativeHandle)
void QCocoaWindow::initialize()
{
- qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::initialize" << window();
+ qCDebug(lcQpaWindow) << "QCocoaWindow::initialize" << window();
QMacAutoReleasePool pool;
- if (!m_view) {
+ if (!m_view)
m_view = [[QNSView alloc] initWithCocoaWindow:this];
- // Enable high-dpi OpenGL for retina displays. Enabling has the side
- // effect that Cocoa will start calling glViewport(0, 0, width, height),
- // overriding any glViewport calls in application code. This is usually not a
- // problem, except if the appilcation wants to have a "custom" viewport.
- // (like the hellogl example)
- if (window()->supportsOpenGL()) {
- BOOL enable = qt_mac_resolveOption(YES, window(), "_q_mac_wantsBestResolutionOpenGLSurface",
- "QT_MAC_WANTS_BEST_RESOLUTION_OPENGL_SURFACE");
- [m_view setWantsBestResolutionOpenGLSurface:enable];
- // See also QCocoaGLContext::makeCurrent for software renderer workarounds.
- }
- BOOL enable = qt_mac_resolveOption(NO, window(), "_q_mac_wantsLayer",
- "QT_MAC_WANTS_LAYER");
- [m_view setWantsLayer:enable];
- }
setGeometry(initialGeometry(window(), windowGeometry(), defaultWindowWidth, defaultWindowHeight));
recreateWindowIfNeeded();
window()->setGeometry(geometry());
- if (window()->isTopLevel())
- setWindowIcon(window()->icon());
m_initialized = true;
}
QCocoaWindow::~QCocoaWindow()
{
- qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::~QCocoaWindow" << window();
+ qCDebug(lcQpaWindow) << "QCocoaWindow::~QCocoaWindow" << window();
QMacAutoReleasePool pool;
[m_nsWindow makeFirstResponder:nil];
@@ -232,10 +208,16 @@ QCocoaWindow::~QCocoaWindow()
if (!isForeignWindow())
[[NSNotificationCenter defaultCenter] removeObserver:m_view];
- // While it is unlikely that this window will be in the popup stack
- // during deletetion we clear any pointers here to make sure.
- if (QCocoaIntegration::instance()) {
- QCocoaIntegration::instance()->popupWindowStack()->removeAll(this);
+ if (QCocoaIntegration *cocoaIntegration = QCocoaIntegration::instance()) {
+ // While it is unlikely that this window will be in the popup stack
+ // during deletetion we clear any pointers here to make sure.
+ cocoaIntegration->popupWindowStack()->removeAll(this);
+
+#if QT_CONFIG(vulkan)
+ auto vulcanInstance = cocoaIntegration->getCocoaVulkanInstance();
+ if (vulcanInstance)
+ vulcanInstance->destroySurface(m_vulkanSurface);
+#endif
}
[m_view release];
@@ -255,7 +237,7 @@ QSurfaceFormat QCocoaWindow::format() const
void QCocoaWindow::setGeometry(const QRect &rectIn)
{
- qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::setGeometry" << window() << rectIn;
+ qCDebug(lcQpaWindow) << "QCocoaWindow::setGeometry" << window() << rectIn;
QBoolBlocker inSetGeometry(m_inSetGeometry, true);
@@ -283,7 +265,7 @@ QRect QCocoaWindow::geometry() const
// QWindows that are embedded in a NSView hiearchy may be considered
// top-level from Qt's point of view but are not from Cocoa's point
// of view. Embedded QWindows get global (screen) geometry.
- if (m_viewIsEmbedded) {
+ if (isEmbedded()) {
NSPoint windowPoint = [m_view convertPoint:NSMakePoint(0, 0) toView:nil];
NSRect screenRect = [[m_view window] convertRectToScreen:NSMakeRect(windowPoint.x, windowPoint.y, 1, 1)];
NSPoint screenPoint = screenRect.origin;
@@ -297,12 +279,12 @@ QRect QCocoaWindow::geometry() const
void QCocoaWindow::setCocoaGeometry(const QRect &rect)
{
- qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::setCocoaGeometry" << window() << rect;
+ qCDebug(lcQpaWindow) << "QCocoaWindow::setCocoaGeometry" << window() << rect;
QMacAutoReleasePool pool;
QPlatformWindow::setGeometry(rect);
- if (m_viewIsEmbedded) {
+ if (isEmbedded()) {
if (!isForeignWindow()) {
[m_view setFrame:NSMakeRect(0, 0, rect.width(), rect.height())];
}
@@ -321,12 +303,12 @@ void QCocoaWindow::setCocoaGeometry(const QRect &rect)
void QCocoaWindow::setVisible(bool visible)
{
- qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::setVisible" << window() << visible;
+ qCDebug(lcQpaWindow) << "QCocoaWindow::setVisible" << window() << visible;
m_inSetVisible = true;
QMacAutoReleasePool pool;
- QCocoaWindow *parentCocoaWindow = 0;
+ QCocoaWindow *parentCocoaWindow = nullptr;
if (window()->transientParent())
parentCocoaWindow = static_cast<QCocoaWindow *>(window()->transientParent()->handle());
@@ -378,13 +360,13 @@ void QCocoaWindow::setVisible(bool visible)
} else if (window()->modality() != Qt::NonModal) {
// show the window as application modal
QCocoaEventDispatcher *cocoaEventDispatcher = qobject_cast<QCocoaEventDispatcher *>(QGuiApplication::instance()->eventDispatcher());
- Q_ASSERT(cocoaEventDispatcher != 0);
+ Q_ASSERT(cocoaEventDispatcher);
QCocoaEventDispatcherPrivate *cocoaEventDispatcherPrivate = static_cast<QCocoaEventDispatcherPrivate *>(QObjectPrivate::get(cocoaEventDispatcher));
cocoaEventDispatcherPrivate->beginModalSession(window());
m_hasModalSession = true;
} else if ([m_view.window canBecomeKeyWindow]) {
QCocoaEventDispatcher *cocoaEventDispatcher = qobject_cast<QCocoaEventDispatcher *>(QGuiApplication::instance()->eventDispatcher());
- QCocoaEventDispatcherPrivate *cocoaEventDispatcherPrivate = 0;
+ QCocoaEventDispatcherPrivate *cocoaEventDispatcherPrivate = nullptr;
if (cocoaEventDispatcher)
cocoaEventDispatcherPrivate = static_cast<QCocoaEventDispatcherPrivate *>(QObjectPrivate::get(cocoaEventDispatcher));
@@ -403,11 +385,12 @@ void QCocoaWindow::setVisible(bool visible)
if (!(parentCocoaWindow && window()->transientParent()->isActive()) && window()->type() == Qt::Popup) {
removeMonitor();
monitor = [NSEvent addGlobalMonitorForEventsMatchingMask:NSLeftMouseDownMask|NSRightMouseDownMask|NSOtherMouseDownMask|NSMouseMovedMask handler:^(NSEvent *e) {
- QPointF localPoint = QCocoaScreen::mapFromNative([NSEvent mouseLocation]);
- const auto button = e.type == NSEventTypeMouseMoved ? Qt::NoButton : cocoaButton2QtButton([e buttonNumber]);
- const auto eventType = e.type == NSEventTypeMouseMoved ? QEvent::MouseMove : QEvent::MouseButtonPress;
- QWindowSystemInterface::handleMouseEvent(window(), window()->mapFromGlobal(localPoint.toPoint()), localPoint,
- Qt::MouseButtons(uint(NSEvent.pressedMouseButtons & 0xFFFF)), button, eventType);
+ const auto button = cocoaButton2QtButton(e);
+ const auto buttons = currentlyPressedMouseButtons();
+ const auto eventType = cocoaEvent2QtMouseEvent(e);
+ const auto globalPoint = QCocoaScreen::mapFromNative(NSEvent.mouseLocation);
+ const auto localPoint = window()->mapFromGlobal(globalPoint.toPoint());
+ QWindowSystemInterface::handleMouseEvent(window(), localPoint, globalPoint, buttons, button, eventType);
}];
}
}
@@ -425,7 +408,7 @@ void QCocoaWindow::setVisible(bool visible)
m_glContext->windowWasHidden();
#endif
QCocoaEventDispatcher *cocoaEventDispatcher = qobject_cast<QCocoaEventDispatcher *>(QGuiApplication::instance()->eventDispatcher());
- QCocoaEventDispatcherPrivate *cocoaEventDispatcherPrivate = 0;
+ QCocoaEventDispatcherPrivate *cocoaEventDispatcherPrivate = nullptr;
if (cocoaEventDispatcher)
cocoaEventDispatcherPrivate = static_cast<QCocoaEventDispatcherPrivate *>(QObjectPrivate::get(cocoaEventDispatcher));
if (isContentView()) {
@@ -493,7 +476,8 @@ NSInteger QCocoaWindow::windowLevel(Qt::WindowFlags flags)
// Any "special" window should be in at least the same level as its parent.
if (type != Qt::Window) {
const QWindow * const transientParent = window()->transientParent();
- const QCocoaWindow * const transientParentWindow = transientParent ? static_cast<QCocoaWindow *>(transientParent->handle()) : 0;
+ const QCocoaWindow * const transientParentWindow = transientParent ?
+ static_cast<QCocoaWindow *>(transientParent->handle()) : nullptr;
if (transientParentWindow)
windowLevel = qMax([transientParentWindow->nativeWindow() level], windowLevel);
}
@@ -562,54 +546,283 @@ void QCocoaWindow::setWindowZoomButton(Qt::WindowFlags flags)
void QCocoaWindow::setWindowFlags(Qt::WindowFlags flags)
{
- if (isContentView()) {
- // While setting style mask we can have handleGeometryChange calls on a content
- // view with null geometry, reporting an invalid coordinates as a result.
- m_inSetStyleMask = true;
- m_view.window.styleMask = windowStyleMask(flags);
- m_inSetStyleMask = false;
- m_view.window.level = this->windowLevel(flags);
-
- m_view.window.hasShadow = !(flags & Qt::NoDropShadowWindowHint);
-
- if (!(flags & Qt::FramelessWindowHint))
- setWindowTitle(window()->title());
-
- Qt::WindowType type = window()->type();
- if ((type & Qt::Popup) != Qt::Popup && (type & Qt::Dialog) != Qt::Dialog) {
- NSWindowCollectionBehavior behavior = m_view.window.collectionBehavior;
- if ((flags & Qt::WindowFullscreenButtonHint) || m_view.window.qt_fullScreen) {
- behavior |= NSWindowCollectionBehaviorFullScreenPrimary;
- behavior &= ~NSWindowCollectionBehaviorFullScreenAuxiliary;
- } else {
- behavior |= NSWindowCollectionBehaviorFullScreenAuxiliary;
- behavior &= ~NSWindowCollectionBehaviorFullScreenPrimary;
- }
- m_view.window.collectionBehavior = behavior;
+ if (!isContentView())
+ return;
+
+ // While setting style mask we can have handleGeometryChange calls on a content
+ // view with null geometry, reporting an invalid coordinates as a result.
+ m_inSetStyleMask = true;
+ m_view.window.styleMask = windowStyleMask(flags);
+ m_inSetStyleMask = false;
+
+ Qt::WindowType type = static_cast<Qt::WindowType>(int(flags & Qt::WindowType_Mask));
+ if ((type & Qt::Popup) != Qt::Popup && (type & Qt::Dialog) != Qt::Dialog) {
+ NSWindowCollectionBehavior behavior = m_view.window.collectionBehavior;
+ if ((flags & Qt::WindowFullscreenButtonHint) || m_view.window.qt_fullScreen) {
+ behavior |= NSWindowCollectionBehaviorFullScreenPrimary;
+ behavior &= ~NSWindowCollectionBehaviorFullScreenAuxiliary;
+ } else {
+ behavior |= NSWindowCollectionBehaviorFullScreenAuxiliary;
+ behavior &= ~NSWindowCollectionBehaviorFullScreenPrimary;
}
- setWindowZoomButton(flags);
-
- // Make window ignore mouse events if WindowTransparentForInput is set.
- // Note that ignoresMouseEvents has a special initial state where events
- // are ignored (passed through) based on window transparency, and that
- // setting the property to false does not return us to that state. Instead,
- // this makes the window capture all mouse events. Take care to only
- // set the property if needed. FIXME: recreate window if needed or find
- // some other way to implement WindowTransparentForInput.
- bool ignoreMouse = flags & Qt::WindowTransparentForInput;
- if (m_view.window.ignoresMouseEvents != ignoreMouse)
- m_view.window.ignoresMouseEvents = ignoreMouse;
+ m_view.window.collectionBehavior = behavior;
}
- m_windowFlags = flags;
+ // Set styleMask and collectionBehavior before applying window level, as
+ // the window level change will trigger verification of the two properties.
+ m_view.window.level = this->windowLevel(flags);
+
+ m_view.window.hasShadow = !(flags & Qt::NoDropShadowWindowHint);
+
+ if (!(flags & Qt::FramelessWindowHint))
+ setWindowTitle(window()->title());
+
+ setWindowZoomButton(flags);
+
+ // Make window ignore mouse events if WindowTransparentForInput is set.
+ // Note that ignoresMouseEvents has a special initial state where events
+ // are ignored (passed through) based on window transparency, and that
+ // setting the property to false does not return us to that state. Instead,
+ // this makes the window capture all mouse events. Take care to only
+ // set the property if needed. FIXME: recreate window if needed or find
+ // some other way to implement WindowTransparentForInput.
+ bool ignoreMouse = flags & Qt::WindowTransparentForInput;
+ if (m_view.window.ignoresMouseEvents != ignoreMouse)
+ m_view.window.ignoresMouseEvents = ignoreMouse;
}
+// ----------------------- Window state -----------------------
+
+/*!
+ Changes the state of the NSWindow, going in/out of minimize/zoomed/fullscreen
+
+ When this is called from QWindow::setWindowState(), the QWindow state has not been
+ updated yet, so window()->windowState() will reflect the previous state that was
+ reported to QtGui.
+*/
void QCocoaWindow::setWindowState(Qt::WindowStates state)
{
if (window()->isVisible())
applyWindowState(state); // Window state set for hidden windows take effect when show() is called
}
+void QCocoaWindow::applyWindowState(Qt::WindowStates requestedState)
+{
+ if (!isContentView())
+ return;
+
+ const Qt::WindowState currentState = windowState();
+ const Qt::WindowState newState = QWindowPrivate::effectiveState(requestedState);
+
+ if (newState == currentState)
+ return;
+
+ qCDebug(lcQpaWindow) << "Applying" << newState << "to" << window() << "in" << currentState;
+
+ const NSSize contentSize = m_view.frame.size;
+ if (contentSize.width <= 0 || contentSize.height <= 0) {
+ // If content view width or height is 0 then the window animations will crash so
+ // do nothing. We report the current state back to reflect the failed operation.
+ qWarning("invalid window content view size, check your window geometry");
+ handleWindowStateChanged(HandleUnconditionally);
+ return;
+ }
+
+ const NSWindow *nsWindow = m_view.window;
+
+ if (nsWindow.styleMask & NSUtilityWindowMask
+ && newState & (Qt::WindowMinimized | Qt::WindowFullScreen)) {
+ qWarning() << window()->type() << "windows can not be made" << newState;
+ handleWindowStateChanged(HandleUnconditionally);
+ return;
+ }
+
+ const id sender = nsWindow;
+
+ // First we need to exit states that can't transition directly to other states
+ switch (currentState) {
+ case Qt::WindowMinimized:
+ [nsWindow deminiaturize:sender];
+ Q_ASSERT_X(windowState() != Qt::WindowMinimized, "QCocoaWindow",
+ "[NSWindow deminiaturize:] is synchronous");
+ break;
+ case Qt::WindowFullScreen: {
+ toggleFullScreen();
+ // Exiting fullscreen is not synchronous, so we need to wait for the
+ // NSWindowDidExitFullScreenNotification before continuing to apply
+ // the new state.
+ return;
+ }
+ default:;
+ }
+
+ // Then we apply the new state if needed
+ if (newState == windowState())
+ return;
+
+ switch (newState) {
+ case Qt::WindowFullScreen:
+ toggleFullScreen();
+ break;
+ case Qt::WindowMaximized:
+ toggleMaximized();
+ break;
+ case Qt::WindowMinimized:
+ [nsWindow miniaturize:sender];
+ break;
+ case Qt::WindowNoState:
+ if (windowState() == Qt::WindowMaximized)
+ toggleMaximized();
+ break;
+ default:
+ Q_UNREACHABLE();
+ }
+}
+
+Qt::WindowState QCocoaWindow::windowState() const
+{
+ // FIXME: Support compound states (Qt::WindowStates)
+
+ NSWindow *window = m_view.window;
+ if (window.miniaturized)
+ return Qt::WindowMinimized;
+ if (window.qt_fullScreen)
+ return Qt::WindowFullScreen;
+ if ((window.zoomed && !isTransitioningToFullScreen())
+ || (m_lastReportedWindowState == Qt::WindowMaximized && isTransitioningToFullScreen()))
+ return Qt::WindowMaximized;
+
+ // Note: We do not report Qt::WindowActive, even if isActive()
+ // is true, as QtGui does not expect this window state to be set.
+
+ return Qt::WindowNoState;
+}
+
+void QCocoaWindow::toggleMaximized()
+{
+ const NSWindow *window = m_view.window;
+
+ // The NSWindow needs to be resizable, otherwise the window will
+ // not be possible to zoom back to non-zoomed state.
+ const bool wasResizable = window.styleMask & NSResizableWindowMask;
+ window.styleMask |= NSResizableWindowMask;
+
+ const id sender = window;
+ [window zoom:sender];
+
+ if (!wasResizable)
+ window.styleMask &= ~NSResizableWindowMask;
+}
+
+void QCocoaWindow::toggleFullScreen()
+{
+ const NSWindow *window = m_view.window;
+
+ // The window needs to have the correct collection behavior for the
+ // toggleFullScreen call to have an effect. The collection behavior
+ // will be reset in windowDidEnterFullScreen/windowDidLeaveFullScreen.
+ window.collectionBehavior |= NSWindowCollectionBehaviorFullScreenPrimary;
+
+ const id sender = window;
+ [window toggleFullScreen:sender];
+}
+
+void QCocoaWindow::windowWillEnterFullScreen()
+{
+ if (!isContentView())
+ return;
+
+ // The NSWindow needs to be resizable, otherwise we'll end up with
+ // the normal window geometry, centered in the middle of the screen
+ // on a black background. The styleMask will be reset below.
+ m_view.window.styleMask |= NSResizableWindowMask;
+}
+
+bool QCocoaWindow::isTransitioningToFullScreen() const
+{
+ NSWindow *window = m_view.window;
+ return window.styleMask & NSFullScreenWindowMask && !window.qt_fullScreen;
+}
+
+void QCocoaWindow::windowDidEnterFullScreen()
+{
+ if (!isContentView())
+ return;
+
+ Q_ASSERT_X(m_view.window.qt_fullScreen, "QCocoaWindow",
+ "FullScreen category processes window notifications first");
+
+ // Reset to original styleMask
+ setWindowFlags(window()->flags());
+
+ handleWindowStateChanged();
+}
+
+void QCocoaWindow::windowWillExitFullScreen()
+{
+ if (!isContentView())
+ return;
+
+ // The NSWindow needs to be resizable, otherwise we'll end up with
+ // a weird zoom animation. The styleMask will be reset below.
+ m_view.window.styleMask |= NSResizableWindowMask;
+}
+
+void QCocoaWindow::windowDidExitFullScreen()
+{
+ if (!isContentView())
+ return;
+
+ Q_ASSERT_X(!m_view.window.qt_fullScreen, "QCocoaWindow",
+ "FullScreen category processes window notifications first");
+
+ // Reset to original styleMask
+ setWindowFlags(window()->flags());
+
+ Qt::WindowState requestedState = window()->windowState();
+
+ // Deliver update of QWindow state
+ handleWindowStateChanged();
+
+ if (requestedState != windowState() && requestedState != Qt::WindowFullScreen) {
+ // We were only going out of full screen as an intermediate step before
+ // progressing into the final step, so re-sync the desired state.
+ applyWindowState(requestedState);
+ }
+}
+
+void QCocoaWindow::windowDidMiniaturize()
+{
+ if (!isContentView())
+ return;
+
+ handleWindowStateChanged();
+}
+
+void QCocoaWindow::windowDidDeminiaturize()
+{
+ if (!isContentView())
+ return;
+
+ handleWindowStateChanged();
+}
+
+void QCocoaWindow::handleWindowStateChanged(HandleFlags flags)
+{
+ Qt::WindowState currentState = windowState();
+ if (!(flags & HandleUnconditionally) && currentState == m_lastReportedWindowState)
+ return;
+
+ qCDebug(lcQpaWindow) << "QCocoaWindow::handleWindowStateChanged" <<
+ m_lastReportedWindowState << "-->" << currentState;
+
+ QWindowSystemInterface::handleWindowStateChanged<QWindowSystemInterface::SynchronousDelivery>(
+ window(), currentState, m_lastReportedWindowState);
+ m_lastReportedWindowState = currentState;
+}
+
+// ------------------------------------------------------------
+
void QCocoaWindow::setWindowTitle(const QString &title)
{
if (!isContentView())
@@ -680,7 +893,7 @@ bool QCocoaWindow::isAlertState() const
void QCocoaWindow::raise()
{
- qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::raise" << window();
+ qCDebug(lcQpaWindow) << "QCocoaWindow::raise" << window();
// ### handle spaces (see Qt 4 raise_sys in qwidget_mac.mm)
if (!isContentView())
@@ -705,7 +918,7 @@ void QCocoaWindow::raise()
void QCocoaWindow::lower()
{
- qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::lower" << window();
+ qCDebug(lcQpaWindow) << "QCocoaWindow::lower" << window();
if (!isContentView())
return;
@@ -718,6 +931,22 @@ bool QCocoaWindow::isExposed() const
return !m_exposedRect.isEmpty();
}
+bool QCocoaWindow::isEmbedded() const
+{
+ // Child QWindows are not embedded
+ if (window()->parent())
+ return false;
+
+ // Top-level QWindows with non-Qt NSWindows are embedded
+ if (m_view.window)
+ return !([m_view.window isKindOfClass:[QNSWindow class]] ||
+ [m_view.window isKindOfClass:[QNSPanel class]]);
+
+ // The window has no QWindow parent but also no NSWindow,
+ // conservatively reuturn false.
+ return false;
+}
+
bool QCocoaWindow::isOpaque() const
{
// OpenGL surfaces can be ordered either above(default) or below the NSWindow.
@@ -737,7 +966,7 @@ void QCocoaWindow::propagateSizeHints()
if (!isContentView())
return;
- qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::propagateSizeHints" << window()
+ qCDebug(lcQpaWindow) << "QCocoaWindow::propagateSizeHints" << window()
<< "min:" << windowMinimumSize() << "max:" << windowMaximumSize()
<< "increment:" << windowSizeIncrement()
<< "base:" << windowBaseSize();
@@ -754,7 +983,7 @@ void QCocoaWindow::propagateSizeHints()
window.contentMaxSize = NSSizeFromCGSize(windowMaximumSize().toCGSize());
// The window may end up with a fixed size; in this case the zoom button should be disabled.
- setWindowZoomButton(m_windowFlags);
+ setWindowZoomButton(this->window()->flags());
// sizeIncrement is observed to take values of (-1, -1) and (0, 0) for windows that should be
// resizable and that have no specific size increment set. Cocoa expects (1.0, 1.0) in this case.
@@ -771,7 +1000,7 @@ void QCocoaWindow::propagateSizeHints()
void QCocoaWindow::setOpacity(qreal level)
{
- qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::setOpacity" << level;
+ qCDebug(lcQpaWindow) << "QCocoaWindow::setOpacity" << level;
if (!isContentView())
return;
@@ -780,7 +1009,7 @@ void QCocoaWindow::setOpacity(qreal level)
void QCocoaWindow::setMask(const QRegion &region)
{
- qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::setMask" << window() << region;
+ qCDebug(lcQpaWindow) << "QCocoaWindow::setMask" << window() << region;
if (m_view.layer) {
if (!region.isEmpty()) {
@@ -814,7 +1043,7 @@ void QCocoaWindow::setMask(const QRegion &region)
bool QCocoaWindow::setKeyboardGrabEnabled(bool grab)
{
- qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::setKeyboardGrabEnabled" << window() << grab;
+ qCDebug(lcQpaWindow) << "QCocoaWindow::setKeyboardGrabEnabled" << window() << grab;
if (!isContentView())
return false;
@@ -826,7 +1055,7 @@ bool QCocoaWindow::setKeyboardGrabEnabled(bool grab)
bool QCocoaWindow::setMouseGrabEnabled(bool grab)
{
- qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::setMouseGrabEnabled" << window() << grab;
+ qCDebug(lcQpaWindow) << "QCocoaWindow::setMouseGrabEnabled" << window() << grab;
if (!isContentView())
return false;
@@ -843,10 +1072,10 @@ WId QCocoaWindow::winId() const
void QCocoaWindow::setParent(const QPlatformWindow *parentWindow)
{
- qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::setParent" << window() << (parentWindow ? parentWindow->window() : 0);
+ qCDebug(lcQpaWindow) << "QCocoaWindow::setParent" << window() << (parentWindow ? parentWindow->window() : 0);
// recreate the window for compatibility
- bool unhideAfterRecreate = parentWindow && !m_viewIsToBeEmbedded && ![m_view isHidden];
+ bool unhideAfterRecreate = parentWindow && !isEmbedded() && ![m_view isHidden];
recreateWindowIfNeeded();
if (unhideAfterRecreate)
[m_view setHidden:NO];
@@ -863,9 +1092,8 @@ NSWindow *QCocoaWindow::nativeWindow() const
return m_view.window;
}
-void QCocoaWindow::setEmbeddedInForeignView(bool embedded)
+void QCocoaWindow::setEmbeddedInForeignView()
{
- m_viewIsToBeEmbedded = embedded;
// Release any previosly created NSWindow.
[m_nsWindow closeAndRelease];
m_nsWindow = 0;
@@ -948,8 +1176,8 @@ void QCocoaWindow::windowDidBecomeKey()
QWindowSystemInterface::handleEnterEvent(m_enterLeaveTargetWindow, windowPoint, screenPoint);
}
- if (!windowIsPopupType() && !qnsview_cast(m_view).isMenuView)
- QWindowSystemInterface::handleWindowActivated(window());
+ if (!windowIsPopupType())
+ QWindowSystemInterface::handleWindowActivated<QWindowSystemInterface::SynchronousDelivery>(window());
}
void QCocoaWindow::windowDidResignKey()
@@ -966,82 +1194,8 @@ void QCocoaWindow::windowDidResignKey()
NSWindow *keyWindow = [NSApp keyWindow];
if (!keyWindow || keyWindow == m_view.window) {
// No new key window, go ahead and set the active window to zero
- if (!windowIsPopupType() && !qnsview_cast(m_view).isMenuView)
- QWindowSystemInterface::handleWindowActivated(0);
- }
-}
-
-void QCocoaWindow::windowDidMiniaturize()
-{
- if (!isContentView())
- return;
-
- handleWindowStateChanged();
-}
-
-void QCocoaWindow::windowDidDeminiaturize()
-{
- if (!isContentView())
- return;
-
- handleWindowStateChanged();
-}
-
-void QCocoaWindow::windowWillEnterFullScreen()
-{
- if (!isContentView())
- return;
-
- // The NSWindow needs to be resizable, otherwise we'll end up with
- // the normal window geometry, centered in the middle of the screen
- // on a black background. The styleMask will be reset below.
- m_view.window.styleMask |= NSResizableWindowMask;
-}
-
-void QCocoaWindow::windowDidEnterFullScreen()
-{
- if (!isContentView())
- return;
-
- Q_ASSERT_X(m_view.window.qt_fullScreen, "QCocoaWindow",
- "FullScreen category processes window notifications first");
-
- // Reset to original styleMask
- setWindowFlags(m_windowFlags);
-
- handleWindowStateChanged();
-}
-
-void QCocoaWindow::windowWillExitFullScreen()
-{
- if (!isContentView())
- return;
-
- // The NSWindow needs to be resizable, otherwise we'll end up with
- // a weird zoom animation. The styleMask will be reset below.
- m_view.window.styleMask |= NSResizableWindowMask;
-}
-
-void QCocoaWindow::windowDidExitFullScreen()
-{
- if (!isContentView())
- return;
-
- Q_ASSERT_X(!m_view.window.qt_fullScreen, "QCocoaWindow",
- "FullScreen category processes window notifications first");
-
- // Reset to original styleMask
- setWindowFlags(m_windowFlags);
-
- Qt::WindowState requestedState = window()->windowState();
-
- // Deliver update of QWindow state
- handleWindowStateChanged();
-
- if (requestedState != windowState() && requestedState != Qt::WindowFullScreen) {
- // We were only going out of full screen as an intermediate step before
- // progressing into the final step, so re-sync the desired state.
- applyWindowState(requestedState);
+ if (!windowIsPopupType())
+ QWindowSystemInterface::handleWindowActivated<QWindowSystemInterface::SynchronousDelivery>(0);
}
}
@@ -1068,8 +1222,14 @@ void QCocoaWindow::windowDidChangeScreen()
if (!window())
return;
- if (QCocoaScreen *cocoaScreen = QCocoaIntegration::instance()->screenForNSScreen(m_view.window.screen))
- QWindowSystemInterface::handleWindowScreenChanged(window(), cocoaScreen->screen());
+ const bool wasRunningDisplayLink = static_cast<QCocoaScreen *>(screen())->isRunningDisplayLink();
+
+ if (QCocoaScreen *cocoaScreen = QCocoaIntegration::instance()->screenForNSScreen(m_view.window.screen)) {
+ QWindowSystemInterface::handleWindowScreenChanged<QWindowSystemInterface::SynchronousDelivery>(window(), cocoaScreen->screen());
+
+ if (hasPendingUpdateRequest() && wasRunningDisplayLink)
+ requestUpdate(); // Restart display-link on new screen
+ }
}
void QCocoaWindow::windowWillClose()
@@ -1083,7 +1243,7 @@ void QCocoaWindow::windowWillClose()
bool QCocoaWindow::windowShouldClose()
{
- qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::windowShouldClose" << window();
+ qCDebug(lcQpaWindow) << "QCocoaWindow::windowShouldClose" << window();
// This callback should technically only determine if the window
// should (be allowed to) close, but since our QPA API to determine
// that also involves actually closing the window we do both at the
@@ -1104,22 +1264,14 @@ void QCocoaWindow::handleGeometryChange()
if (!m_initialized)
return;
- // Don't send the geometry change if the QWindow is designated to be
- // embedded in a foreign view hierarchy but has not actually been
- // embedded yet - it's too early.
- if (m_viewIsToBeEmbedded && !m_viewIsEmbedded)
- return;
-
// It can happen that the current NSWindow is nil (if we are changing styleMask
// from/to borderless, and the content view is being re-parented), which results
// in invalid coordinates.
if (m_inSetStyleMask && !m_view.window)
return;
- const bool isEmbedded = m_viewIsToBeEmbedded || m_viewIsEmbedded;
-
QRect newGeometry;
- if (isContentView() && !isEmbedded) {
+ if (isContentView() && !isEmbedded()) {
// Content views are positioned at (0, 0) in the window, so we resolve via the window
CGRect contentRect = [m_view.window contentRectForFrameRect:m_view.window.frame];
@@ -1130,7 +1282,7 @@ void QCocoaWindow::handleGeometryChange()
newGeometry = QRectF::fromCGRect(m_view.frame).toRect();
}
- qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::handleGeometryChange" << window()
+ qCDebug(lcQpaWindow) << "QCocoaWindow::handleGeometryChange" << window()
<< "current" << geometry() << "new" << newGeometry;
QWindowSystemInterface::handleGeometryChange(window(), newGeometry);
@@ -1162,24 +1314,10 @@ void QCocoaWindow::handleExposeEvent(const QRegion &region)
m_exposedRect = QRect();
}
- qCDebug(lcQpaCocoaDrawing) << "QCocoaWindow::handleExposeEvent" << window() << region << "isExposed" << isExposed();
+ qCDebug(lcQpaDrawing) << "QCocoaWindow::handleExposeEvent" << window() << region << "isExposed" << isExposed();
QWindowSystemInterface::handleExposeEvent<QWindowSystemInterface::SynchronousDelivery>(window(), region);
}
-void QCocoaWindow::handleWindowStateChanged(HandleFlags flags)
-{
- Qt::WindowState currentState = windowState();
- if (!(flags & HandleUnconditionally) && currentState == m_lastReportedWindowState)
- return;
-
- qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::handleWindowStateChanged" <<
- m_lastReportedWindowState << "-->" << currentState;
-
- QWindowSystemInterface::handleWindowStateChanged<QWindowSystemInterface::SynchronousDelivery>(
- window(), currentState, m_lastReportedWindowState);
- m_lastReportedWindowState = currentState;
-}
-
// --------------------------------------------------------------------------
bool QCocoaWindow::windowIsPopupType(Qt::WindowType type) const
@@ -1230,6 +1368,7 @@ void QCocoaWindow::recreateWindowIfNeeded()
QPlatformWindow *parentWindow = QPlatformWindow::parent();
+ const bool isEmbeddedView = isEmbedded();
RecreationReasons recreateReason = RecreationNotNeeded;
QCocoaWindow *oldParentCocoaWindow = nullptr;
@@ -1246,7 +1385,7 @@ void QCocoaWindow::recreateWindowIfNeeded()
if (m_windowModality != window()->modality())
recreateReason |= WindowModalityChanged;
- const bool shouldBeContentView = !parentWindow && !(m_viewIsToBeEmbedded || m_viewIsEmbedded);
+ const bool shouldBeContentView = !parentWindow && !isEmbeddedView;
if (isContentView() != shouldBeContentView)
recreateReason |= ContentViewChanged;
@@ -1258,7 +1397,7 @@ void QCocoaWindow::recreateWindowIfNeeded()
if (isPanel != shouldBePanel)
recreateReason |= PanelChanged;
- qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::recreateWindowIfNeeded" << window() << recreateReason;
+ qCDebug(lcQpaWindow) << "QCocoaWindow::recreateWindowIfNeeded" << window() << recreateReason;
if (recreateReason == RecreationNotNeeded)
return;
@@ -1268,33 +1407,28 @@ void QCocoaWindow::recreateWindowIfNeeded()
// Remove current window (if any)
if ((isContentView() && !shouldBeContentView) || (recreateReason & PanelChanged)) {
if (m_nsWindow) {
- qCDebug(lcQpaCocoaWindow) << "Getting rid of existing window" << m_nsWindow;
+ qCDebug(lcQpaWindow) << "Getting rid of existing window" << m_nsWindow;
if (m_nsWindow.observationInfo) {
- qCCritical(lcQpaCocoaWindow) << m_nsWindow << "has active key-value observers (KVO)!"
+ qCCritical(lcQpaWindow) << m_nsWindow << "has active key-value observers (KVO)!"
<< "These will stop working now that the window is recreated, and will result in exceptions"
<< "when the observers are removed. Break in QCocoaWindow::recreateWindowIfNeeded to debug.";
}
[m_nsWindow closeAndRelease];
- if (isContentView()) {
+ if (isContentView() && !isEmbeddedView) {
// We explicitly disassociate m_view from the window's contentView,
// as AppKit does not automatically do this in response to removing
// the view from the NSThemeFrame subview list, so we might end up
// with a NSWindow contentView pointing to a deallocated NSView.
m_view.window.contentView = nil;
}
- m_nsWindow = 0;
+ m_nsWindow = nil;
}
}
- if (shouldBeContentView) {
- bool noPreviousWindow = m_nsWindow == 0;
- QCocoaNSWindow *newWindow = nullptr;
- if (noPreviousWindow)
- newWindow = createNSWindow(shouldBePanel);
-
+ if (shouldBeContentView && !m_nsWindow) {
// Move view to new NSWindow if needed
- if (newWindow) {
- qCDebug(lcQpaCocoaWindow) << "Ensuring that" << m_view << "is content view for" << newWindow;
+ if (auto *newWindow = createNSWindow(shouldBePanel)) {
+ qCDebug(lcQpaWindow) << "Ensuring that" << m_view << "is content view for" << newWindow;
[m_view setPostsFrameChangedNotifications:NO];
[newWindow setContentView:m_view];
[m_view setPostsFrameChangedNotifications:YES];
@@ -1304,14 +1438,14 @@ void QCocoaWindow::recreateWindowIfNeeded()
}
}
- if (m_viewIsToBeEmbedded) {
+ if (isEmbeddedView) {
// An embedded window doesn't have its own NSWindow.
} else if (!parentWindow) {
// QPlatformWindow subclasses must sync up with QWindow on creation:
propagateSizeHints();
setWindowFlags(window()->flags());
setWindowTitle(window()->title());
- setWindowFilePath(window()->filePath());
+ setWindowFilePath(window()->filePath()); // Also sets window icon
setWindowState(window()->windowState());
} else {
// Child windows have no NSWindow, link the NSViews instead.
@@ -1334,14 +1468,28 @@ void QCocoaWindow::recreateWindowIfNeeded()
// top-level QWindows may have an attached NSToolBar, call
// update function which will attach to the NSWindow.
- if (!parentWindow)
+ if (!parentWindow && !isEmbeddedView)
updateNSToolbar();
}
void QCocoaWindow::requestUpdate()
{
- qCDebug(lcQpaCocoaDrawing) << "QCocoaWindow::requestUpdate" << window();
- QPlatformWindow::requestUpdate();
+ const int swapInterval = format().swapInterval();
+ qCDebug(lcQpaDrawing) << "QCocoaWindow::requestUpdate" << window() << "swapInterval" << swapInterval;
+
+ if (swapInterval > 0) {
+ // Vsync is enabled, deliver via CVDisplayLink
+ static_cast<QCocoaScreen *>(screen())->requestUpdate();
+ } else {
+ // Fall back to the un-throttled timer-based callback
+ QPlatformWindow::requestUpdate();
+ }
+}
+
+void QCocoaWindow::deliverUpdateRequest()
+{
+ qCDebug(lcQpaDrawing) << "Delivering update request to" << window();
+ QPlatformWindow::deliverUpdateRequest();
}
void QCocoaWindow::requestActivateWindow()
@@ -1375,7 +1523,7 @@ QCocoaNSWindow *QCocoaWindow::createNSWindow(bool shouldBePanel)
}
if (!targetScreen) {
- qCWarning(lcQpaCocoaWindow) << "Window position" << rect << "outside any known screen, using primary screen";
+ qCWarning(lcQpaWindow) << "Window position" << rect << "outside any known screen, using primary screen";
targetScreen = QGuiApplication::primaryScreen();
// AppKit will only reposition a window that's outside the target screen area if
// the window has a title bar. If left out, the window ends up with no screen.
@@ -1399,8 +1547,10 @@ QCocoaNSWindow *QCocoaWindow::createNSWindow(bool shouldBePanel)
Q_ASSERT_X(nsWindow.screen == cocoaScreen->nativeScreen(), "QCocoaWindow",
"Resulting NSScreen should match the requested NSScreen");
- if (targetScreen != window()->screen())
- QWindowSystemInterface::handleWindowScreenChanged(window(), targetScreen);
+ if (targetScreen != window()->screen()) {
+ QWindowSystemInterface::handleWindowScreenChanged<
+ QWindowSystemInterface::SynchronousDelivery>(window(), targetScreen);
+ }
nsWindow.delegate = [[QNSWindowDelegate alloc] initWithQCocoaWindow:this];
@@ -1473,138 +1623,6 @@ void QCocoaWindow::removeMonitor()
monitor = nil;
}
-/*!
- Applies the given state to the NSWindow, going in/out of minimize/zoomed/fullscreen
-
- When this is called from QWindow::setWindowState(), the QWindow state has not been
- updated yet, so window()->windowState() will reflect the previous state that was
- reported to QtGui.
-*/
-void QCocoaWindow::applyWindowState(Qt::WindowStates requestedState)
-{
- if (!isContentView())
- return;
-
- const Qt::WindowState currentState = windowState();
- const Qt::WindowState newState = QWindowPrivate::effectiveState(requestedState);
-
- if (newState == currentState)
- return;
-
- const NSSize contentSize = m_view.frame.size;
- if (contentSize.width <= 0 || contentSize.height <= 0) {
- // If content view width or height is 0 then the window animations will crash so
- // do nothing. We report the current state back to reflect the failed operation.
- qWarning("invalid window content view size, check your window geometry");
- handleWindowStateChanged(HandleUnconditionally);
- return;
- }
-
- const NSWindow *nsWindow = m_view.window;
-
- if (nsWindow.styleMask & NSUtilityWindowMask
- && newState & (Qt::WindowMinimized | Qt::WindowFullScreen)) {
- qWarning() << window()->type() << "windows can not be made" << newState;
- handleWindowStateChanged(HandleUnconditionally);
- return;
- }
-
- const id sender = nsWindow;
-
- // First we need to exit states that can't transition directly to other states
- switch (currentState) {
- case Qt::WindowMinimized:
- [nsWindow deminiaturize:sender];
- Q_ASSERT_X(windowState() != Qt::WindowMinimized, "QCocoaWindow",
- "[NSWindow deminiaturize:] is synchronous");
- break;
- case Qt::WindowFullScreen: {
- toggleFullScreen();
- // Exiting fullscreen is not synchronous, so we need to wait for the
- // NSWindowDidExitFullScreenNotification before continuing to apply
- // the new state.
- return;
- }
- default:;
- }
-
- // Then we apply the new state if needed
- if (newState == windowState())
- return;
-
- switch (newState) {
- case Qt::WindowFullScreen:
- toggleFullScreen();
- break;
- case Qt::WindowMaximized:
- toggleMaximized();
- break;
- case Qt::WindowMinimized:
- [nsWindow miniaturize:sender];
- break;
- case Qt::WindowNoState:
- if (windowState() == Qt::WindowMaximized)
- toggleMaximized();
- break;
- default:
- Q_UNREACHABLE();
- }
-}
-
-void QCocoaWindow::toggleMaximized()
-{
- const NSWindow *window = m_view.window;
-
- // The NSWindow needs to be resizable, otherwise the window will
- // not be possible to zoom back to non-zoomed state.
- const bool wasResizable = window.styleMask & NSResizableWindowMask;
- window.styleMask |= NSResizableWindowMask;
-
- const id sender = window;
- [window zoom:sender];
-
- if (!wasResizable)
- window.styleMask &= ~NSResizableWindowMask;
-}
-
-void QCocoaWindow::toggleFullScreen()
-{
- const NSWindow *window = m_view.window;
-
- // The window needs to have the correct collection behavior for the
- // toggleFullScreen call to have an effect. The collection behavior
- // will be reset in windowDidEnterFullScreen/windowDidLeaveFullScreen.
- window.collectionBehavior |= NSWindowCollectionBehaviorFullScreenPrimary;
-
- const id sender = window;
- [window toggleFullScreen:sender];
-}
-
-bool QCocoaWindow::isTransitioningToFullScreen() const
-{
- NSWindow *window = m_view.window;
- return window.styleMask & NSFullScreenWindowMask && !window.qt_fullScreen;
-}
-
-Qt::WindowState QCocoaWindow::windowState() const
-{
- // FIXME: Support compound states (Qt::WindowStates)
-
- NSWindow *window = m_view.window;
- if (window.miniaturized)
- return Qt::WindowMinimized;
- if (window.qt_fullScreen)
- return Qt::WindowFullScreen;
- if ((window.zoomed && !isTransitioningToFullScreen())
- || (m_lastReportedWindowState == Qt::WindowMaximized && isTransitioningToFullScreen()))
- return Qt::WindowMaximized;
-
- // Note: We do not report Qt::WindowActive, even if isActive()
- // is true, as QtGui does not expect this window state to be set.
-
- return Qt::WindowNoState;
-}
-
bool QCocoaWindow::setWindowModified(bool modified)
{
if (!isContentView())
diff --git a/src/plugins/platforms/cocoa/qmacclipboard.h b/src/plugins/platforms/cocoa/qmacclipboard.h
index 1d229a55d2..f2f460c048 100644
--- a/src/plugins/platforms/cocoa/qmacclipboard.h
+++ b/src/plugins/platforms/cocoa/qmacclipboard.h
@@ -54,7 +54,7 @@ public:
enum DataRequestType { EagerRequest, LazyRequest };
private:
struct Promise {
- Promise() : itemId(0), convertor(0) { }
+ Promise() : itemId(0), convertor(nullptr) { }
static Promise eagerPromise(int itemId, QMacInternalPasteboardMime *c, QString m, QMacMimeData *d, int o = 0);
static Promise lazyPromise(int itemId, QMacInternalPasteboardMime *c, QString m, QMacMimeData *d, int o = 0);
@@ -79,7 +79,7 @@ private:
public:
QMacPasteboard(PasteboardRef p, uchar mime_type=0);
QMacPasteboard(uchar mime_type);
- QMacPasteboard(CFStringRef name=0, uchar mime_type=0);
+ QMacPasteboard(CFStringRef name=nullptr, uchar mime_type=0);
~QMacPasteboard();
bool hasFlavor(QString flavor) const;
diff --git a/src/plugins/platforms/cocoa/qmacclipboard.mm b/src/plugins/platforms/cocoa/qmacclipboard.mm
index f3467fdc73..5939003c64 100644
--- a/src/plugins/platforms/cocoa/qmacclipboard.mm
+++ b/src/plugins/platforms/cocoa/qmacclipboard.mm
@@ -75,7 +75,7 @@ QMacPasteboard::Promise::Promise(int itemId, QMacInternalPasteboardMime *c, QStr
// Request the data from the application immediately for eager requests.
if (dataRequestType == QMacPasteboard::EagerRequest) {
variantData = md->variantData(m);
- mimeData = 0;
+ mimeData = nullptr;
} else {
mimeData = md;
}
@@ -94,8 +94,8 @@ QMacPasteboard::QMacPasteboard(uchar mt)
{
mac_mime_source = false;
mime_type = mt ? mt : uchar(QMacInternalPasteboardMime::MIME_ALL);
- paste = 0;
- OSStatus err = PasteboardCreate(0, &paste);
+ paste = nullptr;
+ OSStatus err = PasteboardCreate(nullptr, &paste);
if (err == noErr) {
PasteboardSetPromiseKeeper(paste, promiseKeeper, this);
} else {
@@ -108,7 +108,7 @@ QMacPasteboard::QMacPasteboard(CFStringRef name, uchar mt)
{
mac_mime_source = false;
mime_type = mt ? mt : uchar(QMacInternalPasteboardMime::MIME_ALL);
- paste = 0;
+ paste = nullptr;
OSStatus err = PasteboardCreate(name, &paste);
if (err == noErr) {
PasteboardSetPromiseKeeper(paste, promiseKeeper, this);
@@ -165,7 +165,7 @@ OSStatus QMacPasteboard::promiseKeeper(PasteboardRef paste, PasteboardItemID id,
// we have promised this data, but won't be able to convert, so return null data.
// This helps in making the application/x-qt-mime-type-name hidden from normal use.
QByteArray ba;
- QCFType<CFDataRef> data = CFDataCreate(0, (UInt8*)ba.constData(), ba.size());
+ QCFType<CFDataRef> data = CFDataCreate(nullptr, (UInt8*)ba.constData(), ba.size());
PasteboardPutItemFlavor(paste, id, flavor, data, kPasteboardFlavorNoFlags);
return noErr;
}
@@ -196,7 +196,7 @@ OSStatus QMacPasteboard::promiseKeeper(PasteboardRef paste, PasteboardItemID id,
if (md.size() <= promise.offset)
return cantGetFlavorErr;
const QByteArray &ba = md[promise.offset];
- QCFType<CFDataRef> data = CFDataCreate(0, (UInt8*)ba.constData(), ba.size());
+ QCFType<CFDataRef> data = CFDataCreate(nullptr, (UInt8*)ba.constData(), ba.size());
PasteboardPutItemFlavor(paste, id, flavor, data, kPasteboardFlavorNoFlags);
return noErr;
}
@@ -553,7 +553,7 @@ QMacPasteboard::sync() const
const bool fromGlobal = PasteboardSynchronize(paste) & kPasteboardModified;
if (fromGlobal)
- const_cast<QMacPasteboard *>(this)->setMimeData(0);
+ const_cast<QMacPasteboard *>(this)->setMimeData(nullptr);
#ifdef DEBUG_PASTEBOARD
if (fromGlobal)
diff --git a/src/plugins/platforms/cocoa/qmultitouch_mac.mm b/src/plugins/platforms/cocoa/qmultitouch_mac.mm
index 9eca4d2d43..10652dc6a1 100644
--- a/src/plugins/platforms/cocoa/qmultitouch_mac.mm
+++ b/src/plugins/platforms/cocoa/qmultitouch_mac.mm
@@ -107,7 +107,7 @@ QCocoaTouch *QCocoaTouch::findQCocoaTouch(NSTouch *nstouch)
qint64 identity = qint64([nstouch identity]);
if (_currentTouches.contains(identity))
return _currentTouches.value(identity);
- return 0;
+ return nullptr;
}
Qt::TouchPointState QCocoaTouch::toTouchPointState(NSTouchPhase nsState)
diff --git a/src/plugins/platforms/cocoa/qnsview.h b/src/plugins/platforms/cocoa/qnsview.h
index e2ea862cd5..67debef7b8 100644
--- a/src/plugins/platforms/cocoa/qnsview.h
+++ b/src/plugins/platforms/cocoa/qnsview.h
@@ -41,111 +41,51 @@
#define QNSVIEW_H
#include <AppKit/AppKit.h>
-
-#include <QtCore/QPointer>
-#include <QtCore/QSet>
-#include <QtGui/QImage>
-#include <QtGui/QAccessible>
+#include <MetalKit/MetalKit.h>
#include "private/qcore_mac_p.h"
QT_BEGIN_NAMESPACE
class QCocoaWindow;
class QCocoaGLContext;
+class QPointF;
QT_END_NAMESPACE
Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QNSViewMouseMoveHelper));
+Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QCocoaNSMenuItem));
-@interface QT_MANGLE_NAMESPACE(QNSView) : NSView <NSTextInputClient> {
- QPointer<QCocoaWindow> m_platformWindow;
- NSTrackingArea *m_trackingArea;
- Qt::MouseButtons m_buttons;
- Qt::MouseButtons m_acceptedMouseDowns;
- Qt::MouseButtons m_frameStrutButtons;
- QString m_composingText;
- QPointer<QObject> m_composingFocusObject;
- bool m_sendKeyEvent;
- QStringList *currentCustomDragTypes;
- bool m_dontOverrideCtrlLMB;
- bool m_sendUpAsRightButton;
- Qt::KeyboardModifiers currentWheelModifiers;
-#ifndef QT_NO_OPENGL
- QCocoaGLContext *m_glContext;
- bool m_shouldSetGLContextinDrawRect;
-#endif
- NSString *m_inputSource;
- QT_MANGLE_NAMESPACE(QNSViewMouseMoveHelper) *m_mouseMoveHelper;
- bool m_resendKeyEvent;
- bool m_scrolling;
- bool m_updatingDrag;
- NSEvent *m_currentlyInterpretedKeyEvent;
- bool m_isMenuView;
- QSet<quint32> m_acceptedKeyDowns;
- bool m_updateRequested;
-}
+@interface QT_MANGLE_NAMESPACE(QNSView) : NSView
@property (nonatomic, retain) NSCursor *cursor;
-- (id)init;
-- (id)initWithCocoaWindow:(QCocoaWindow *)platformWindow;
-#ifndef QT_NO_OPENGL
-- (void)setQCocoaGLContext:(QCocoaGLContext *)context;
-#endif
-- (void)drawRect:(NSRect)dirtyRect;
-- (void)textInputContextKeyboardSelectionDidChangeNotification : (NSNotification *) textInputContextKeyboardSelectionDidChangeNotification;
-- (void)viewDidHide;
-- (void)removeFromSuperview;
-- (void)cancelComposingText;
-
-- (BOOL)isFlipped;
-- (BOOL)acceptsFirstResponder;
-- (BOOL)becomeFirstResponder;
-- (BOOL)isOpaque;
+- (instancetype)initWithCocoaWindow:(QCocoaWindow *)platformWindow;
- (void)convertFromScreen:(NSPoint)mouseLocation toWindowPoint:(QPointF *)qtWindowPoint andScreenPoint:(QPointF *)qtScreenPoint;
-- (void)resetMouseButtons;
-
-- (void)requestUpdate;
-
-- (void)handleMouseEvent:(NSEvent *)theEvent;
-- (bool)handleMouseDownEvent:(NSEvent *)theEvent withButton:(int)buttonNumber;
-- (bool)handleMouseDraggedEvent:(NSEvent *)theEvent withButton:(int)buttonNumber;
-- (bool)handleMouseUpEvent:(NSEvent *)theEvent withButton:(int)buttonNumber;
-- (void)mouseDown:(NSEvent *)theEvent;
-- (void)mouseDragged:(NSEvent *)theEvent;
-- (void)mouseUp:(NSEvent *)theEvent;
-- (void)mouseMovedImpl:(NSEvent *)theEvent;
-- (void)mouseEnteredImpl:(NSEvent *)theEvent;
-- (void)mouseExitedImpl:(NSEvent *)theEvent;
-- (void)rightMouseDown:(NSEvent *)theEvent;
-- (void)rightMouseDragged:(NSEvent *)theEvent;
-- (void)rightMouseUp:(NSEvent *)theEvent;
-- (void)otherMouseDown:(NSEvent *)theEvent;
-- (void)otherMouseDragged:(NSEvent *)theEvent;
-- (void)otherMouseUp:(NSEvent *)theEvent;
-- (void)handleFrameStrutMouseEvent:(NSEvent *)theEvent;
+@end
-#ifndef QT_NO_TABLETEVENT
-- (bool)handleTabletEvent: (NSEvent *)theEvent;
-- (void)tabletPoint: (NSEvent *)theEvent;
-- (void)tabletProximity: (NSEvent *)theEvent;
+@interface QT_MANGLE_NAMESPACE(QNSView) (DrawingAPI)
+#ifndef QT_NO_OPENGL
+- (void)setQCocoaGLContext:(QCocoaGLContext *)context;
#endif
+@end
-- (int) convertKeyCode : (QChar)keyCode;
-+ (Qt::KeyboardModifiers) convertKeyModifiers : (ulong)modifierFlags;
-- (bool)handleKeyEvent:(NSEvent *)theEvent eventType:(int)eventType;
-- (void)keyDown:(NSEvent *)theEvent;
-- (void)keyUp:(NSEvent *)theEvent;
+@interface QT_MANGLE_NAMESPACE(QNSView) (MouseAPI)
+- (void)handleFrameStrutMouseEvent:(NSEvent *)theEvent;
+- (void)resetMouseButtons;
+@end
-- (void)registerDragTypes;
-- (NSDragOperation)handleDrag:(id <NSDraggingInfo>)sender;
+@interface QT_MANGLE_NAMESPACE(QNSView) (KeysAPI)
++ (Qt::KeyboardModifiers)convertKeyModifiers:(ulong)modifierFlags;
+@end
+@interface QT_MANGLE_NAMESPACE(QNSView) (ComplexTextAPI)
+- (void)unmarkText;
+- (void)cancelComposingText;
@end
@interface QT_MANGLE_NAMESPACE(QNSView) (QtExtras)
@property (nonatomic, readonly) QCocoaWindow *platformWindow;
-@property (nonatomic, readonly) BOOL isMenuView;
@end
QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSView);
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index 1c400a1ec9..dd9af3668a 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -51,7 +51,11 @@
#include <qpa/qwindowsysteminterface.h>
#include <QtGui/QTextFormat>
#include <QtCore/QDebug>
+#include <QtCore/QPointer>
+#include <QtCore/QSet>
#include <QtCore/qsysinfo.h>
+#include <QtGui/QAccessible>
+#include <QtGui/QImage>
#include <private/qguiapplication_p.h>
#include <private/qcoregraphics_p.h>
#include <private/qwindow_p.h>
@@ -61,94 +65,120 @@
#endif
#include "qcocoaintegration.h"
-#ifdef QT_COCOA_ENABLE_ACCESSIBILITY_INSPECTOR
-#include <accessibilityinspector.h>
-#endif
+// Private interface
+@interface QT_MANGLE_NAMESPACE(QNSView) ()
+- (BOOL)isTransparentForUserInput;
+@end
-Q_LOGGING_CATEGORY(lcQpaTouch, "qt.qpa.input.touch")
-#ifndef QT_NO_GESTURES
-Q_LOGGING_CATEGORY(lcQpaGestures, "qt.qpa.input.gestures")
-#endif
-Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
+@interface QT_MANGLE_NAMESPACE(QNSView) (Drawing) <CALayerDelegate>
+- (BOOL)wantsLayerHelper;
+@end
@interface QT_MANGLE_NAMESPACE(QNSViewMouseMoveHelper) : NSObject
-{
- QNSView *view;
-}
-
-- (id)initWithView:(QNSView *)theView;
-
+- (instancetype)initWithView:(QNSView *)theView;
- (void)mouseMoved:(NSEvent *)theEvent;
- (void)mouseEntered:(NSEvent *)theEvent;
- (void)mouseExited:(NSEvent *)theEvent;
- (void)cursorUpdate:(NSEvent *)theEvent;
-
@end
-@implementation QT_MANGLE_NAMESPACE(QNSViewMouseMoveHelper)
-
-- (id)initWithView:(QNSView *)theView
-{
- self = [super init];
- if (self) {
- view = theView;
- }
- return self;
-}
+@interface QT_MANGLE_NAMESPACE(QNSView) (Mouse)
+- (NSPoint)screenMousePoint:(NSEvent *)theEvent;
+- (void)mouseMovedImpl:(NSEvent *)theEvent;
+- (void)mouseEnteredImpl:(NSEvent *)theEvent;
+- (void)mouseExitedImpl:(NSEvent *)theEvent;
+@end
-- (void)mouseMoved:(NSEvent *)theEvent
-{
- [view mouseMovedImpl:theEvent];
-}
+@interface QT_MANGLE_NAMESPACE(QNSView) (Touch)
+@end
-- (void)mouseEntered:(NSEvent *)theEvent
-{
- [view mouseEnteredImpl:theEvent];
-}
+@interface QT_MANGLE_NAMESPACE(QNSView) (Tablet)
+- (bool)handleTabletEvent:(NSEvent *)theEvent;
+@end
-- (void)mouseExited:(NSEvent *)theEvent
-{
- [view mouseExitedImpl:theEvent];
-}
+@interface QT_MANGLE_NAMESPACE(QNSView) (Gestures)
+@end
-- (void)cursorUpdate:(NSEvent *)theEvent
-{
- [view cursorUpdate:theEvent];
-}
+@interface QT_MANGLE_NAMESPACE(QNSView) (Dragging)
+-(void)registerDragTypes;
+@end
+@interface QT_MANGLE_NAMESPACE(QNSView) (Keys)
@end
-// Private interface
-@interface QT_MANGLE_NAMESPACE(QNSView) ()
-- (BOOL)isTransparentForUserInput;
+@interface QT_MANGLE_NAMESPACE(QNSView) (ComplexText) <NSTextInputClient>
+- (void)textInputContextKeyboardSelectionDidChangeNotification:(NSNotification *)textInputContextKeyboardSelectionDidChangeNotification;
@end
-@implementation QT_MANGLE_NAMESPACE(QNSView)
+@implementation QT_MANGLE_NAMESPACE(QNSView) {
+ QPointer<QCocoaWindow> m_platformWindow;
+ NSTrackingArea *m_trackingArea;
+ Qt::MouseButtons m_buttons;
+ Qt::MouseButtons m_acceptedMouseDowns;
+ Qt::MouseButtons m_frameStrutButtons;
+ QString m_composingText;
+ QPointer<QObject> m_composingFocusObject;
+ bool m_sendKeyEvent;
+ bool m_dontOverrideCtrlLMB;
+ bool m_sendUpAsRightButton;
+ Qt::KeyboardModifiers m_currentWheelModifiers;
+#ifndef QT_NO_OPENGL
+ QCocoaGLContext *m_glContext;
+ bool m_shouldSetGLContextinDrawRect;
+#endif
+ NSString *m_inputSource;
+ QT_MANGLE_NAMESPACE(QNSViewMouseMoveHelper) *m_mouseMoveHelper;
+ bool m_resendKeyEvent;
+ bool m_scrolling;
+ bool m_updatingDrag;
+ NSEvent *m_currentlyInterpretedKeyEvent;
+ QSet<quint32> m_acceptedKeyDowns;
+}
-- (id) init
+- (instancetype)initWithCocoaWindow:(QCocoaWindow *)platformWindow
{
- if (self = [super initWithFrame:NSZeroRect]) {
+ if ((self = [super initWithFrame:NSZeroRect])) {
+ m_platformWindow = platformWindow;
m_buttons = Qt::NoButton;
m_acceptedMouseDowns = Qt::NoButton;
m_frameStrutButtons = Qt::NoButton;
m_sendKeyEvent = false;
#ifndef QT_NO_OPENGL
- m_glContext = 0;
+ m_glContext = nullptr;
m_shouldSetGLContextinDrawRect = false;
#endif
- currentCustomDragTypes = 0;
- m_dontOverrideCtrlLMB = false;
m_sendUpAsRightButton = false;
- m_inputSource = 0;
+ m_inputSource = nil;
m_mouseMoveHelper = [[QT_MANGLE_NAMESPACE(QNSViewMouseMoveHelper) alloc] initWithView:self];
m_resendKeyEvent = false;
m_scrolling = false;
m_updatingDrag = false;
- m_currentlyInterpretedKeyEvent = 0;
- m_isMenuView = false;
+ m_currentlyInterpretedKeyEvent = nil;
+ m_dontOverrideCtrlLMB = qt_mac_resolveOption(false, platformWindow->window(),
+ "_q_platform_MacDontOverrideCtrlLMB", "QT_MAC_DONT_OVERRIDE_CTRL_LMB");
+ m_trackingArea = nil;
+
self.focusRingType = NSFocusRingTypeNone;
self.cursor = nil;
- m_updateRequested = false;
+ self.wantsLayer = [self wantsLayerHelper];
+
+ // Enable high-DPI OpenGL for retina displays. Enabling has the side
+ // effect that Cocoa will start calling glViewport(0, 0, width, height),
+ // overriding any glViewport calls in application code. This is usually not a
+ // problem, except if the application wants to have a "custom" viewport.
+ // (like the hellogl example)
+ if (m_platformWindow->window()->supportsOpenGL()) {
+ self.wantsBestResolutionOpenGLSurface = qt_mac_resolveOption(YES, m_platformWindow->window(),
+ "_q_mac_wantsBestResolutionOpenGLSurface", "QT_MAC_WANTS_BEST_RESOLUTION_OPENGL_SURFACE");
+ // See also QCocoaGLContext::makeCurrent for software renderer workarounds.
+ }
+
+ [self registerDragTypes];
+
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(textInputContextKeyboardSelectionDidChangeNotification:)
+ name:NSTextInputContextKeyboardSelectionDidChangeNotification
+ object:nil];
}
return self;
}
@@ -163,47 +193,9 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
[[NSNotificationCenter defaultCenter] removeObserver:self];
[m_mouseMoveHelper release];
- delete currentCustomDragTypes;
-
[super dealloc];
}
-- (id)initWithCocoaWindow:(QCocoaWindow *)platformWindow
-{
- self = [self init];
- if (!self)
- return 0;
-
- m_platformWindow = platformWindow;
- m_sendKeyEvent = false;
- m_dontOverrideCtrlLMB = qt_mac_resolveOption(false, platformWindow->window(), "_q_platform_MacDontOverrideCtrlLMB", "QT_MAC_DONT_OVERRIDE_CTRL_LMB");
- m_trackingArea = nil;
-
-#ifdef QT_COCOA_ENABLE_ACCESSIBILITY_INSPECTOR
- // prevent rift in space-time continuum, disable
- // accessibility for the accessibility inspector's windows.
- static bool skipAccessibilityForInspectorWindows = false;
- if (!skipAccessibilityForInspectorWindows) {
-
- // m_accessibleRoot = window->accessibleRoot();
-
- AccessibilityInspector *inspector = new AccessibilityInspector(window);
- skipAccessibilityForInspectorWindows = true;
- inspector->inspectWindow(window);
- skipAccessibilityForInspectorWindows = false;
- }
-#endif
-
- [self registerDragTypes];
-
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(textInputContextKeyboardSelectionDidChangeNotification:)
- name:NSTextInputContextKeyboardSelectionDidChangeNotification
- object:nil];
-
- return self;
-}
-
- (NSString *)description
{
NSMutableString *description = [NSMutableString stringWithString:[super description]];
@@ -220,33 +212,18 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
return description;
}
-#ifndef QT_NO_OPENGL
-- (void) setQCocoaGLContext:(QCocoaGLContext *)context
-{
- m_glContext = context;
- [m_glContext->nsOpenGLContext() setView:self];
- if (![m_glContext->nsOpenGLContext() view]) {
- //was unable to set view
- m_shouldSetGLContextinDrawRect = true;
- }
-}
-#endif
-
- (void)viewDidMoveToSuperview
{
if (!m_platformWindow)
return;
- if (!(m_platformWindow->m_viewIsToBeEmbedded))
+ if (!m_platformWindow->isEmbedded())
return;
if ([self superview]) {
- m_platformWindow->m_viewIsEmbedded = true;
QWindowSystemInterface::handleGeometryChange(m_platformWindow->window(), m_platformWindow->geometry());
[self setNeedsDisplay:YES];
QWindowSystemInterface::flushWindowSystemEvents();
- } else {
- m_platformWindow->m_viewIsEmbedded = false;
}
}
@@ -268,15 +245,6 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
return focusWindow;
}
-- (void)textInputContextKeyboardSelectionDidChangeNotification : (NSNotification *) textInputContextKeyboardSelectionDidChangeNotification
-{
- Q_UNUSED(textInputContextKeyboardSelectionDidChangeNotification)
- if (([NSApp keyWindow] == [self window]) && [[self window] firstResponder] == self) {
- QCocoaInputContext *ic = qobject_cast<QCocoaInputContext *>(QCocoaIntegration::instance()->inputContext());
- ic->updateLocale();
- }
-}
-
- (void)viewDidHide
{
if (!m_platformWindow->isExposed())
@@ -294,107 +262,6 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
[super removeFromSuperview];
}
-- (BOOL) isOpaque
-{
- if (!m_platformWindow)
- return true;
- return m_platformWindow->isOpaque();
-}
-
-- (void)requestUpdate
-{
- if (self.needsDisplay) {
- // If the view already has needsDisplay set it means that there may be code waiting for
- // a real expose event, so we can't issue setNeedsDisplay now as a way to trigger an
- // update request. We will re-trigger requestUpdate from drawRect.
- return;
- }
-
- [self setNeedsDisplay:YES];
- m_updateRequested = true;
-}
-
-- (void)setNeedsDisplayInRect:(NSRect)rect
-{
- [super setNeedsDisplayInRect:rect];
- m_updateRequested = false;
-}
-
-- (void)drawRect:(NSRect)dirtyRect
-{
- Q_UNUSED(dirtyRect);
-
- if (!m_platformWindow)
- return;
-
- QRegion exposedRegion;
- const NSRect *dirtyRects;
- NSInteger numDirtyRects;
- [self getRectsBeingDrawn:&dirtyRects count:&numDirtyRects];
- for (int i = 0; i < numDirtyRects; ++i)
- exposedRegion += QRectF::fromCGRect(dirtyRects[i]).toRect();
-
- qCDebug(lcQpaCocoaDrawing) << "[QNSView drawRect:]" << m_platformWindow->window() << exposedRegion;
- [self updateRegion:exposedRegion];
-}
-
-- (void)updateRegion:(QRegion)dirtyRegion
-{
-#ifndef QT_NO_OPENGL
- if (m_glContext && m_shouldSetGLContextinDrawRect) {
- [m_glContext->nsOpenGLContext() setView:self];
- m_shouldSetGLContextinDrawRect = false;
- }
-#endif
-
- QWindowPrivate *windowPrivate = qt_window_private(m_platformWindow->window());
-
- if (m_updateRequested) {
- Q_ASSERT(windowPrivate->updateRequestPending);
- qCDebug(lcQpaCocoaWindow) << "Delivering update request to" << m_platformWindow->window();
- windowPrivate->deliverUpdateRequest();
- m_updateRequested = false;
- } else {
- m_platformWindow->handleExposeEvent(dirtyRegion);
- }
-
- if (m_updateRequested && windowPrivate->updateRequestPending) {
- // A call to QWindow::requestUpdate was issued during event delivery above,
- // but AppKit will reset the needsDisplay state of the view after completing
- // the current display cycle, so we need to defer the request to redisplay.
- // FIXME: Perhaps this should be a trigger to enable CADisplayLink?
- qCDebug(lcQpaCocoaDrawing) << "[QNSView drawRect:] issuing deferred setNeedsDisplay due to pending update request";
- dispatch_async(dispatch_get_main_queue (), ^{ [self requestUpdate]; });
- }
-}
-
-- (BOOL)wantsUpdateLayer
-{
- return YES;
-}
-
-- (void)updateLayer
-{
- if (!m_platformWindow)
- return;
-
- qCDebug(lcQpaCocoaDrawing) << "[QNSView updateLayer]" << m_platformWindow->window();
-
- // FIXME: Find out if there's a way to resolve the dirty rect like in drawRect:
- [self updateRegion:QRectF::fromCGRect(self.bounds).toRect()];
-}
-
-- (void)viewDidChangeBackingProperties
-{
- if (self.layer)
- self.layer.contentsScale = self.window.backingScaleFactor;
-}
-
-- (BOOL)isFlipped
-{
- return YES;
-}
-
- (BOOL)isTransparentForUserInput
{
return m_platformWindow->window() &&
@@ -407,7 +274,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
return NO;
if ([self isTransparentForUserInput])
return NO;
- if (!m_platformWindow->windowIsPopupType() && !m_isMenuView)
+ if (!m_platformWindow->windowIsPopupType())
QWindowSystemInterface::handleWindowActivated([self topLevelWindow]);
return YES;
}
@@ -416,8 +283,6 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
{
if (!m_platformWindow)
return NO;
- if (m_isMenuView)
- return NO;
if (m_platformWindow->shouldRefuseKeyWindowAndFirstResponder())
return NO;
if ([self isTransparentForUserInput])
@@ -427,16 +292,6 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
return YES;
}
-- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
-{
- Q_UNUSED(theEvent)
- if (!m_platformWindow)
- return NO;
- if ([self isTransparentForUserInput])
- return NO;
- return YES;
-}
-
- (NSView *)hitTest:(NSPoint)aPoint
{
NSView *candidate = [super hitTest:aPoint];
@@ -476,1611 +331,22 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
*qtScreenPoint = QCocoaScreen::mapFromNative(mouseLocation);
}
-- (void)resetMouseButtons
-{
- m_buttons = Qt::NoButton;
- m_frameStrutButtons = Qt::NoButton;
-}
-
-- (NSPoint) screenMousePoint:(NSEvent *)theEvent
-{
- NSPoint screenPoint;
- if (theEvent) {
- NSPoint windowPoint = [theEvent locationInWindow];
- if (qIsNaN(windowPoint.x) || qIsNaN(windowPoint.y)) {
- screenPoint = [NSEvent mouseLocation];
- } else {
- NSRect screenRect = [[theEvent window] convertRectToScreen:NSMakeRect(windowPoint.x, windowPoint.y, 1, 1)];
- screenPoint = screenRect.origin;
- }
- } else {
- screenPoint = [NSEvent mouseLocation];
- }
- return screenPoint;
-}
-
-- (void)handleMouseEvent:(NSEvent *)theEvent
-{
- if (!m_platformWindow)
- return;
-
-#ifndef QT_NO_TABLETEVENT
- // Tablet events may come in via the mouse event handlers,
- // check if this is a valid tablet event first.
- if ([self handleTabletEvent: theEvent])
- return;
-#endif
-
- QPointF qtWindowPoint;
- QPointF qtScreenPoint;
- QNSView *targetView = self;
- if (!targetView.platformWindow)
- return;
-
- // Popups implicitly grap mouse events; forward to the active popup if there is one
- if (QCocoaWindow *popup = QCocoaIntegration::instance()->activePopupWindow()) {
- // Tooltips must be transparent for mouse events
- // The bug reference is QTBUG-46379
- if (!popup->m_windowFlags.testFlag(Qt::ToolTip)) {
- if (QNSView *popupView = qnsview_cast(popup->view()))
- targetView = popupView;
- }
- }
-
- [targetView convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint:&qtWindowPoint andScreenPoint:&qtScreenPoint];
- ulong timestamp = [theEvent timestamp] * 1000;
-
- QCocoaDrag* nativeDrag = QCocoaIntegration::instance()->drag();
- nativeDrag->setLastMouseEvent(theEvent, self);
-
- Qt::KeyboardModifiers keyboardModifiers = [QNSView convertKeyModifiers:[theEvent modifierFlags]];
- QWindowSystemInterface::handleMouseEvent(targetView->m_platformWindow->window(), timestamp, qtWindowPoint, qtScreenPoint,
- m_buttons, keyboardModifiers, Qt::MouseEventNotSynthesized);
-}
-
-- (void)handleFrameStrutMouseEvent:(NSEvent *)theEvent
-{
- if (!m_platformWindow)
- return;
-
- // get m_buttons in sync
- // Don't send frme strut events if we are in the middle of a mouse drag.
- if (m_buttons != Qt::NoButton)
- return;
-
- NSEventType ty = [theEvent type];
- switch (ty) {
- case NSLeftMouseDown:
- m_frameStrutButtons |= Qt::LeftButton;
- break;
- case NSLeftMouseUp:
- m_frameStrutButtons &= ~Qt::LeftButton;
- break;
- case NSRightMouseDown:
- m_frameStrutButtons |= Qt::RightButton;
- break;
- case NSLeftMouseDragged:
- m_frameStrutButtons |= Qt::LeftButton;
- break;
- case NSRightMouseDragged:
- m_frameStrutButtons |= Qt::RightButton;
- break;
- case NSRightMouseUp:
- m_frameStrutButtons &= ~Qt::RightButton;
- break;
- case NSOtherMouseDown:
- m_frameStrutButtons |= cocoaButton2QtButton([theEvent buttonNumber]);
- break;
- case NSOtherMouseUp:
- m_frameStrutButtons &= ~cocoaButton2QtButton([theEvent buttonNumber]);
- default:
- break;
- }
-
- NSWindow *window = [self window];
- NSPoint windowPoint = [theEvent locationInWindow];
-
- int windowScreenY = [window frame].origin.y + [window frame].size.height;
- NSPoint windowCoord = [self convertPoint:[self frame].origin toView:nil];
- int viewScreenY = [window convertRectToScreen:NSMakeRect(windowCoord.x, windowCoord.y, 0, 0)].origin.y;
- int titleBarHeight = windowScreenY - viewScreenY;
-
- NSPoint nsViewPoint = [self convertPoint: windowPoint fromView: nil];
- QPoint qtWindowPoint = QPoint(nsViewPoint.x, titleBarHeight + nsViewPoint.y);
- NSPoint screenPoint = [window convertRectToScreen:NSMakeRect(windowPoint.x, windowPoint.y, 0, 0)].origin;
- QPoint qtScreenPoint = QCocoaScreen::mapFromNative(screenPoint).toPoint();
-
- ulong timestamp = [theEvent timestamp] * 1000;
- QWindowSystemInterface::handleFrameStrutMouseEvent(m_platformWindow->window(), timestamp, qtWindowPoint, qtScreenPoint, m_frameStrutButtons);
-}
-
-- (bool)handleMouseDownEvent:(NSEvent *)theEvent withButton:(int)buttonNumber
-{
- if ([self isTransparentForUserInput])
- return false;
-
- Qt::MouseButton button = cocoaButton2QtButton(buttonNumber);
-
- QPointF qtWindowPoint;
- QPointF qtScreenPoint;
- [self convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint:&qtWindowPoint andScreenPoint:&qtScreenPoint];
- Q_UNUSED(qtScreenPoint);
-
- // Maintain masked state for the button for use by MouseDragged and MouseUp.
- QRegion mask = m_platformWindow->window()->mask();
- const bool masked = !mask.isEmpty() && !mask.contains(qtWindowPoint.toPoint());
- if (masked)
- m_acceptedMouseDowns &= ~button;
- else
- m_acceptedMouseDowns |= button;
-
- // Forward masked out events to the next responder
- if (masked)
- return false;
-
- m_buttons |= button;
-
- [self handleMouseEvent:theEvent];
- return true;
-}
-
-- (bool)handleMouseDraggedEvent:(NSEvent *)theEvent withButton:(int)buttonNumber
-{
- if ([self isTransparentForUserInput])
- return false;
-
- Qt::MouseButton button = cocoaButton2QtButton(buttonNumber);
-
- // Forward the event to the next responder if Qt did not accept the
- // corresponding mouse down for this button
- if (!(m_acceptedMouseDowns & button) == button)
- return false;
-
- [self handleMouseEvent:theEvent];
- return true;
-}
-
-- (bool)handleMouseUpEvent:(NSEvent *)theEvent withButton:(int)buttonNumber
-{
- if ([self isTransparentForUserInput])
- return false;
-
- Qt::MouseButton button = cocoaButton2QtButton(buttonNumber);
-
- // Forward the event to the next responder if Qt did not accept the
- // corresponding mouse down for this button
- if (!(m_acceptedMouseDowns & button) == button)
- return false;
-
- if (m_sendUpAsRightButton && button == Qt::LeftButton)
- button = Qt::RightButton;
- if (button == Qt::RightButton)
- m_sendUpAsRightButton = false;
-
- m_buttons &= ~button;
-
- [self handleMouseEvent:theEvent];
- return true;
-}
-
-- (void)mouseDown:(NSEvent *)theEvent
-{
- if ([self isTransparentForUserInput])
- return [super mouseDown:theEvent];
- m_sendUpAsRightButton = false;
-
- // Handle any active poup windows; clicking outisde them should close them
- // all. Don't do anything or clicks inside one of the menus, let Cocoa
- // handle that case. Note that in practice many windows of the Qt::Popup type
- // will actually close themselves in this case using logic implemented in
- // that particular poup type (for example context menus). However, Qt expects
- // that plain popup QWindows will also be closed, so we implement the logic
- // here as well.
- QList<QCocoaWindow *> *popups = QCocoaIntegration::instance()->popupWindowStack();
- if (!popups->isEmpty()) {
- // Check if the click is outside all popups.
- bool inside = false;
- QPointF qtScreenPoint = QCocoaScreen::mapFromNative([self screenMousePoint:theEvent]);
- for (QList<QCocoaWindow *>::const_iterator it = popups->begin(); it != popups->end(); ++it) {
- if ((*it)->geometry().contains(qtScreenPoint.toPoint())) {
- inside = true;
- break;
- }
- }
- // Close the popups if the click was outside.
- if (!inside) {
- Qt::WindowType type = QCocoaIntegration::instance()->activePopupWindow()->window()->type();
- while (QCocoaWindow *popup = QCocoaIntegration::instance()->popPopupWindow()) {
- QWindowSystemInterface::handleCloseEvent(popup->window());
- QWindowSystemInterface::flushWindowSystemEvents();
- }
- // Consume the mouse event when closing the popup, except for tool tips
- // were it's expected that the event is processed normally.
- if (type != Qt::ToolTip)
- return;
- }
- }
-
- QPointF qtWindowPoint;
- QPointF qtScreenPoint;
- [self convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint:&qtWindowPoint andScreenPoint:&qtScreenPoint];
- Q_UNUSED(qtScreenPoint);
-
- QRegion mask = m_platformWindow->window()->mask();
- const bool masked = !mask.isEmpty() && !mask.contains(qtWindowPoint.toPoint());
- // Maintain masked state for the button for use by MouseDragged and Up.
- if (masked)
- m_acceptedMouseDowns &= ~Qt::LeftButton;
- else
- m_acceptedMouseDowns |= Qt::LeftButton;
-
- // Forward masked out events to the next responder
- if (masked) {
- [super mouseDown:theEvent];
- return;
- }
-
- if ([self hasMarkedText]) {
- [[NSTextInputContext currentInputContext] handleEvent:theEvent];
- } else {
- auto ctrlOrMetaModifier = qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta) ? Qt::ControlModifier : Qt::MetaModifier;
- if (!m_dontOverrideCtrlLMB && [QNSView convertKeyModifiers:[theEvent modifierFlags]] & ctrlOrMetaModifier) {
- m_buttons |= Qt::RightButton;
- m_sendUpAsRightButton = true;
- } else {
- m_buttons |= Qt::LeftButton;
- }
- [self handleMouseEvent:theEvent];
- }
-}
-
-- (void)mouseDragged:(NSEvent *)theEvent
-{
- const bool accepted = [self handleMouseDraggedEvent:theEvent withButton:[theEvent buttonNumber]];
- if (!accepted)
- [super mouseDragged:theEvent];
-}
-
-- (void)mouseUp:(NSEvent *)theEvent
-{
- const bool accepted = [self handleMouseUpEvent:theEvent withButton:[theEvent buttonNumber]];
- if (!accepted)
- [super mouseUp:theEvent];
-}
-
-- (void)rightMouseDown:(NSEvent *)theEvent
-{
- // Wacom tablet might not return the correct button number for NSEvent buttonNumber
- // on right clicks. Decide here that the button is the "right" button and forward
- // the button number to the mouse (and tablet) handler.
- const bool accepted = [self handleMouseDownEvent:theEvent withButton:1];
- if (!accepted)
- [super rightMouseDown:theEvent];
-}
-
-- (void)rightMouseDragged:(NSEvent *)theEvent
-{
- const bool accepted = [self handleMouseDraggedEvent:theEvent withButton:1];
- if (!accepted)
- [super rightMouseDragged:theEvent];
-}
-
-- (void)rightMouseUp:(NSEvent *)theEvent
-{
- const bool accepted = [self handleMouseUpEvent:theEvent withButton:1];
- if (!accepted)
- [super rightMouseUp:theEvent];
-}
-
-- (void)otherMouseDown:(NSEvent *)theEvent
-{
- const bool accepted = [self handleMouseDownEvent:theEvent withButton:[theEvent buttonNumber]];
- if (!accepted)
- [super otherMouseDown:theEvent];
-}
-
-- (void)otherMouseDragged:(NSEvent *)theEvent
-{
- const bool accepted = [self handleMouseDraggedEvent:theEvent withButton:[theEvent buttonNumber]];
- if (!accepted)
- [super otherMouseDragged:theEvent];
-}
-
-- (void)otherMouseUp:(NSEvent *)theEvent
-{
- const bool accepted = [self handleMouseUpEvent:theEvent withButton:[theEvent buttonNumber]];
- if (!accepted)
- [super otherMouseUp:theEvent];
-}
-
-- (void)updateTrackingAreas
-{
- [super updateTrackingAreas];
-
- QMacAutoReleasePool pool;
-
- // NSTrackingInVisibleRect keeps care of updating once the tracking is set up, so bail out early
- if (m_trackingArea && [[self trackingAreas] containsObject:m_trackingArea])
- return;
-
- // Ideally, we shouldn't have NSTrackingMouseMoved events included below, it should
- // only be turned on if mouseTracking, hover is on or a tool tip is set.
- // Unfortunately, Qt will send "tooltip" events on mouse moves, so we need to
- // turn it on in ALL case. That means EVERY QWindow gets to pay the cost of
- // mouse moves delivered to it (Apple recommends keeping it OFF because there
- // is a performance hit). So it goes.
- NSUInteger trackingOptions = NSTrackingMouseEnteredAndExited | NSTrackingActiveInActiveApp
- | NSTrackingInVisibleRect | NSTrackingMouseMoved | NSTrackingCursorUpdate;
- [m_trackingArea release];
- m_trackingArea = [[NSTrackingArea alloc] initWithRect:[self frame]
- options:trackingOptions
- owner:m_mouseMoveHelper
- userInfo:nil];
- [self addTrackingArea:m_trackingArea];
-}
-
-- (void)cursorUpdate:(NSEvent *)theEvent
-{
- qCDebug(lcQpaCocoaMouse) << "[QNSView cursorUpdate:]" << self.cursor;
-
- // Note: We do not get this callback when moving from a subview that
- // uses the legacy cursorRect API, so the cursor is reset to the arrow
- // cursor. See rdar://34183708
-
- if (self.cursor)
- [self.cursor set];
- else
- [super cursorUpdate:theEvent];
-}
-
-- (void)mouseMovedImpl:(NSEvent *)theEvent
-{
- if (!m_platformWindow)
- return;
-
- if ([self isTransparentForUserInput])
- return;
-
- QPointF windowPoint;
- QPointF screenPoint;
- [self convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
- QWindow *childWindow = m_platformWindow->childWindowAt(windowPoint.toPoint());
-
- // Top-level windows generate enter-leave events for sub-windows.
- // Qt wants to know which window (if any) will be entered at the
- // the time of the leave. This is dificult to accomplish by
- // handling mouseEnter and mouseLeave envents, since they are sent
- // individually to different views.
- if (m_platformWindow->isContentView() && childWindow) {
- if (childWindow != m_platformWindow->m_enterLeaveTargetWindow) {
- QWindowSystemInterface::handleEnterLeaveEvent(childWindow, m_platformWindow->m_enterLeaveTargetWindow, windowPoint, screenPoint);
- m_platformWindow->m_enterLeaveTargetWindow = childWindow;
- }
- }
-
- // Cocoa keeps firing mouse move events for obscured parent views. Qt should not
- // send those events so filter them out here.
- if (childWindow != m_platformWindow->window())
- return;
-
- [self handleMouseEvent: theEvent];
-}
-
-- (void)mouseEnteredImpl:(NSEvent *)theEvent
-{
- Q_UNUSED(theEvent)
- if (!m_platformWindow)
- return;
-
- m_platformWindow->m_windowUnderMouse = true;
-
- if ([self isTransparentForUserInput])
- return;
-
- // Top-level windows generate enter events for sub-windows.
- if (!m_platformWindow->isContentView())
- return;
-
- QPointF windowPoint;
- QPointF screenPoint;
- [self convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
- m_platformWindow->m_enterLeaveTargetWindow = m_platformWindow->childWindowAt(windowPoint.toPoint());
- QWindowSystemInterface::handleEnterEvent(m_platformWindow->m_enterLeaveTargetWindow, windowPoint, screenPoint);
-}
-
-- (void)mouseExitedImpl:(NSEvent *)theEvent
-{
- Q_UNUSED(theEvent);
- if (!m_platformWindow)
- return;
-
- m_platformWindow->m_windowUnderMouse = false;
-
- if ([self isTransparentForUserInput])
- return;
-
- // Top-level windows generate leave events for sub-windows.
- if (!m_platformWindow->isContentView())
- return;
-
- QWindowSystemInterface::handleLeaveEvent(m_platformWindow->m_enterLeaveTargetWindow);
- m_platformWindow->m_enterLeaveTargetWindow = 0;
-}
-
-#ifndef QT_NO_TABLETEVENT
-struct QCocoaTabletDeviceData
-{
- QTabletEvent::TabletDevice device;
- QTabletEvent::PointerType pointerType;
- uint capabilityMask;
- qint64 uid;
-};
-
-typedef QHash<uint, QCocoaTabletDeviceData> QCocoaTabletDeviceDataHash;
-Q_GLOBAL_STATIC(QCocoaTabletDeviceDataHash, tabletDeviceDataHash)
-
-- (bool)handleTabletEvent: (NSEvent *)theEvent
-{
- static bool ignoreButtonMapping = qEnvironmentVariableIsSet("QT_MAC_TABLET_IGNORE_BUTTON_MAPPING");
-
- if (!m_platformWindow)
- return false;
-
- NSEventType eventType = [theEvent type];
- if (eventType != NSTabletPoint && [theEvent subtype] != NSTabletPointEventSubtype)
- return false; // Not a tablet event.
-
- ulong timestamp = [theEvent timestamp] * 1000;
-
- QPointF windowPoint;
- QPointF screenPoint;
- [self convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint: &windowPoint andScreenPoint: &screenPoint];
-
- uint deviceId = [theEvent deviceID];
- if (!tabletDeviceDataHash->contains(deviceId)) {
- // Error: Unknown tablet device. Qt also gets into this state
- // when running on a VM. This appears to be harmless; don't
- // print a warning.
- return false;
- }
- const QCocoaTabletDeviceData &deviceData = tabletDeviceDataHash->value(deviceId);
-
- bool down = (eventType != NSMouseMoved);
-
- qreal pressure;
- if (down) {
- pressure = [theEvent pressure];
- } else {
- pressure = 0.0;
- }
-
- NSPoint tilt = [theEvent tilt];
- int xTilt = qRound(tilt.x * 60.0);
- int yTilt = qRound(tilt.y * -60.0);
- qreal tangentialPressure = 0;
- qreal rotation = 0;
- int z = 0;
- if (deviceData.capabilityMask & 0x0200)
- z = [theEvent absoluteZ];
-
- if (deviceData.capabilityMask & 0x0800)
- tangentialPressure = ([theEvent tangentialPressure] * 2.0) - 1.0;
-
- rotation = 360.0 - [theEvent rotation];
- if (rotation > 180.0)
- rotation -= 360.0;
-
- Qt::KeyboardModifiers keyboardModifiers = [QNSView convertKeyModifiers:[theEvent modifierFlags]];
- Qt::MouseButtons buttons = ignoreButtonMapping ? static_cast<Qt::MouseButtons>(static_cast<uint>([theEvent buttonMask])) : m_buttons;
-
- qCDebug(lcQpaTablet, "event on tablet %d with tool %d type %d unique ID %lld pos %6.1f, %6.1f root pos %6.1f, %6.1f buttons 0x%x pressure %4.2lf tilt %d, %d rotation %6.2lf",
- deviceId, deviceData.device, deviceData.pointerType, deviceData.uid,
- windowPoint.x(), windowPoint.y(), screenPoint.x(), screenPoint.y(),
- static_cast<uint>(buttons), pressure, xTilt, yTilt, rotation);
-
- QWindowSystemInterface::handleTabletEvent(m_platformWindow->window(), timestamp, windowPoint, screenPoint,
- deviceData.device, deviceData.pointerType, buttons, pressure, xTilt, yTilt,
- tangentialPressure, rotation, z, deviceData.uid,
- keyboardModifiers);
- return true;
-}
-
-- (void)tabletPoint:(NSEvent *)theEvent
-{
- if ([self isTransparentForUserInput])
- return [super tabletPoint:theEvent];
-
- [self handleTabletEvent: theEvent];
-}
-
-static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
-{
- qint64 uid = [theEvent uniqueID];
- uint bits = [theEvent vendorPointingDeviceType];
- if (bits == 0 && uid != 0) {
- // Fallback. It seems that the driver doesn't always include all the information.
- // High-End Wacom devices store their "type" in the uper bits of the Unique ID.
- // I'm not sure how to handle it for consumer devices, but I'll test that in a bit.
- bits = uid >> 32;
- }
-
- QTabletEvent::TabletDevice device;
- // Defined in the "EN0056-NxtGenImpGuideX"
- // on Wacom's Developer Website (www.wacomeng.com)
- if (((bits & 0x0006) == 0x0002) && ((bits & 0x0F06) != 0x0902)) {
- device = QTabletEvent::Stylus;
- } else {
- switch (bits & 0x0F06) {
- case 0x0802:
- device = QTabletEvent::Stylus;
- break;
- case 0x0902:
- device = QTabletEvent::Airbrush;
- break;
- case 0x0004:
- device = QTabletEvent::FourDMouse;
- break;
- case 0x0006:
- device = QTabletEvent::Puck;
- break;
- case 0x0804:
- device = QTabletEvent::RotationStylus;
- break;
- default:
- device = QTabletEvent::NoDevice;
- }
- }
- return device;
-}
-
-- (void)tabletProximity:(NSEvent *)theEvent
-{
- if ([self isTransparentForUserInput])
- return [super tabletProximity:theEvent];
-
- ulong timestamp = [theEvent timestamp] * 1000;
-
- QCocoaTabletDeviceData deviceData;
- deviceData.uid = [theEvent uniqueID];
- deviceData.capabilityMask = [theEvent capabilityMask];
-
- switch ([theEvent pointingDeviceType]) {
- case NSUnknownPointingDevice:
- default:
- deviceData.pointerType = QTabletEvent::UnknownPointer;
- break;
- case NSPenPointingDevice:
- deviceData.pointerType = QTabletEvent::Pen;
- break;
- case NSCursorPointingDevice:
- deviceData.pointerType = QTabletEvent::Cursor;
- break;
- case NSEraserPointingDevice:
- deviceData.pointerType = QTabletEvent::Eraser;
- break;
- }
-
- deviceData.device = wacomTabletDevice(theEvent);
-
- // The deviceID is "unique" while in the proximity, it's a key that we can use for
- // linking up QCocoaTabletDeviceData to an event (especially if there are two devices in action).
- bool entering = [theEvent isEnteringProximity];
- uint deviceId = [theEvent deviceID];
- if (entering) {
- tabletDeviceDataHash->insert(deviceId, deviceData);
- } else {
- tabletDeviceDataHash->remove(deviceId);
- }
-
- qCDebug(lcQpaTablet, "proximity change on tablet %d: current tool %d type %d unique ID %lld",
- deviceId, deviceData.device, deviceData.pointerType, deviceData.uid);
+@end
- if (entering) {
- QWindowSystemInterface::handleTabletEnterProximityEvent(timestamp, deviceData.device, deviceData.pointerType, deviceData.uid);
- } else {
- QWindowSystemInterface::handleTabletLeaveProximityEvent(timestamp, deviceData.device, deviceData.pointerType, deviceData.uid);
- }
-}
+#include "qnsview_drawing.mm"
+#include "qnsview_mouse.mm"
+#include "qnsview_touch.mm"
+#include "qnsview_gestures.mm"
+#include "qnsview_tablet.mm"
+#include "qnsview_dragging.mm"
+#include "qnsview_keys.mm"
+#include "qnsview_complextext.mm"
+#include "qnsview_menus.mm"
+#ifndef QT_NO_ACCESSIBILITY
+#include "qnsview_accessibility.mm"
#endif
-- (bool)shouldSendSingleTouch
-{
- if (!m_platformWindow)
- return true;
-
- // QtWidgets expects single-point touch events, QtDeclarative does not.
- // Until there is an API we solve this by looking at the window class type.
- return m_platformWindow->window()->inherits("QWidgetWindow");
-}
-
-- (void)touchesBeganWithEvent:(NSEvent *)event
-{
- if (!m_platformWindow)
- return;
-
- const NSTimeInterval timestamp = [event timestamp];
- const QList<QWindowSystemInterface::TouchPoint> points = QCocoaTouch::getCurrentTouchPointList(event, [self shouldSendSingleTouch]);
- qCDebug(lcQpaTouch) << "touchesBeganWithEvent" << points << "from device" << hex << [event deviceID];
- QWindowSystemInterface::handleTouchEvent(m_platformWindow->window(), timestamp * 1000, QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), points);
-}
-
-- (void)touchesMovedWithEvent:(NSEvent *)event
-{
- if (!m_platformWindow)
- return;
-
- const NSTimeInterval timestamp = [event timestamp];
- const QList<QWindowSystemInterface::TouchPoint> points = QCocoaTouch::getCurrentTouchPointList(event, [self shouldSendSingleTouch]);
- qCDebug(lcQpaTouch) << "touchesMovedWithEvent" << points << "from device" << hex << [event deviceID];
- QWindowSystemInterface::handleTouchEvent(m_platformWindow->window(), timestamp * 1000, QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), points);
-}
-
-- (void)touchesEndedWithEvent:(NSEvent *)event
-{
- if (!m_platformWindow)
- return;
-
- const NSTimeInterval timestamp = [event timestamp];
- const QList<QWindowSystemInterface::TouchPoint> points = QCocoaTouch::getCurrentTouchPointList(event, [self shouldSendSingleTouch]);
- qCDebug(lcQpaTouch) << "touchesEndedWithEvent" << points << "from device" << hex << [event deviceID];
- QWindowSystemInterface::handleTouchEvent(m_platformWindow->window(), timestamp * 1000, QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), points);
-}
-
-- (void)touchesCancelledWithEvent:(NSEvent *)event
-{
- if (!m_platformWindow)
- return;
-
- const NSTimeInterval timestamp = [event timestamp];
- const QList<QWindowSystemInterface::TouchPoint> points = QCocoaTouch::getCurrentTouchPointList(event, [self shouldSendSingleTouch]);
- qCDebug(lcQpaTouch) << "touchesCancelledWithEvent" << points << "from device" << hex << [event deviceID];
- QWindowSystemInterface::handleTouchEvent(m_platformWindow->window(), timestamp * 1000, QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), points);
-}
-
-#ifndef QT_NO_GESTURES
-
-- (bool)handleGestureAsBeginEnd:(NSEvent *)event
-{
- if (QOperatingSystemVersion::current() < QOperatingSystemVersion::OSXElCapitan)
- return false;
-
- if ([event phase] == NSEventPhaseBegan) {
- [self beginGestureWithEvent:event];
- return true;
- }
-
- if ([event phase] == NSEventPhaseEnded) {
- [self endGestureWithEvent:event];
- return true;
- }
-
- return false;
-}
-- (void)magnifyWithEvent:(NSEvent *)event
-{
- if (!m_platformWindow)
- return;
-
- if ([self handleGestureAsBeginEnd:event])
- return;
-
- qCDebug(lcQpaGestures) << "magnifyWithEvent" << [event magnification] << "from device" << hex << [event deviceID];
- const NSTimeInterval timestamp = [event timestamp];
- QPointF windowPoint;
- QPointF screenPoint;
- [self convertFromScreen:[self screenMousePoint:event] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
- QWindowSystemInterface::handleGestureEventWithRealValue(m_platformWindow->window(), QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), timestamp, Qt::ZoomNativeGesture,
- [event magnification], windowPoint, screenPoint);
-}
-
-- (void)smartMagnifyWithEvent:(NSEvent *)event
-{
- if (!m_platformWindow)
- return;
-
- static bool zoomIn = true;
- qCDebug(lcQpaGestures) << "smartMagnifyWithEvent" << zoomIn << "from device" << hex << [event deviceID];
- const NSTimeInterval timestamp = [event timestamp];
- QPointF windowPoint;
- QPointF screenPoint;
- [self convertFromScreen:[self screenMousePoint:event] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
- QWindowSystemInterface::handleGestureEventWithRealValue(m_platformWindow->window(), QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), timestamp, Qt::SmartZoomNativeGesture,
- zoomIn ? 1.0f : 0.0f, windowPoint, screenPoint);
- zoomIn = !zoomIn;
-}
-
-- (void)rotateWithEvent:(NSEvent *)event
-{
- if (!m_platformWindow)
- return;
-
- if ([self handleGestureAsBeginEnd:event])
- return;
-
- const NSTimeInterval timestamp = [event timestamp];
- QPointF windowPoint;
- QPointF screenPoint;
- [self convertFromScreen:[self screenMousePoint:event] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
- QWindowSystemInterface::handleGestureEventWithRealValue(m_platformWindow->window(), QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), timestamp, Qt::RotateNativeGesture,
- -[event rotation], windowPoint, screenPoint);
-}
-
-- (void)swipeWithEvent:(NSEvent *)event
-{
- if (!m_platformWindow)
- return;
-
- qCDebug(lcQpaGestures) << "swipeWithEvent" << [event deltaX] << [event deltaY] << "from device" << hex << [event deviceID];
- const NSTimeInterval timestamp = [event timestamp];
- QPointF windowPoint;
- QPointF screenPoint;
- [self convertFromScreen:[self screenMousePoint:event] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
-
- qreal angle = 0.0f;
- if ([event deltaX] == 1)
- angle = 180.0f;
- else if ([event deltaX] == -1)
- angle = 0.0f;
- else if ([event deltaY] == 1)
- angle = 90.0f;
- else if ([event deltaY] == -1)
- angle = 270.0f;
-
- QWindowSystemInterface::handleGestureEventWithRealValue(m_platformWindow->window(), QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), timestamp, Qt::SwipeNativeGesture,
- angle, windowPoint, screenPoint);
-}
-
-- (void)beginGestureWithEvent:(NSEvent *)event
-{
- if (!m_platformWindow)
- return;
-
- const NSTimeInterval timestamp = [event timestamp];
- QPointF windowPoint;
- QPointF screenPoint;
- [self convertFromScreen:[self screenMousePoint:event] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
- qCDebug(lcQpaGestures) << "beginGestureWithEvent @" << windowPoint << "from device" << hex << [event deviceID];
- QWindowSystemInterface::handleGestureEvent(m_platformWindow->window(), QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), timestamp, Qt::BeginNativeGesture,
- windowPoint, screenPoint);
-}
-
-- (void)endGestureWithEvent:(NSEvent *)event
-{
- if (!m_platformWindow)
- return;
-
- qCDebug(lcQpaGestures) << "endGestureWithEvent" << "from device" << hex << [event deviceID];
- const NSTimeInterval timestamp = [event timestamp];
- QPointF windowPoint;
- QPointF screenPoint;
- [self convertFromScreen:[self screenMousePoint:event] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
- QWindowSystemInterface::handleGestureEvent(m_platformWindow->window(), QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), timestamp, Qt::EndNativeGesture,
- windowPoint, screenPoint);
-}
-#endif // QT_NO_GESTURES
-
-#if QT_CONFIG(wheelevent)
-- (void)scrollWheel:(NSEvent *)theEvent
-{
- if (!m_platformWindow)
- return;
-
- if ([self isTransparentForUserInput])
- return [super scrollWheel:theEvent];
-
- QPoint angleDelta;
- Qt::MouseEventSource source = Qt::MouseEventNotSynthesized;
- if ([theEvent hasPreciseScrollingDeltas]) {
- // The mouse device contains pixel scroll wheel support (Mighty Mouse, Trackpad).
- // Since deviceDelta is delivered as pixels rather than degrees, we need to
- // convert from pixels to degrees in a sensible manner.
- // It looks like 1/4 degrees per pixel behaves most native.
- // (NB: Qt expects the unit for delta to be 8 per degree):
- const int pixelsToDegrees = 2; // 8 * 1/4
- angleDelta.setX([theEvent scrollingDeltaX] * pixelsToDegrees);
- angleDelta.setY([theEvent scrollingDeltaY] * pixelsToDegrees);
- source = Qt::MouseEventSynthesizedBySystem;
- } else {
- // Remove acceleration, and use either -120 or 120 as delta:
- angleDelta.setX(qBound(-120, int([theEvent deltaX] * 10000), 120));
- angleDelta.setY(qBound(-120, int([theEvent deltaY] * 10000), 120));
- }
-
- QPoint pixelDelta;
- if ([theEvent hasPreciseScrollingDeltas]) {
- pixelDelta.setX([theEvent scrollingDeltaX]);
- pixelDelta.setY([theEvent scrollingDeltaY]);
- } else {
- // docs: "In the case of !hasPreciseScrollingDeltas, multiply the delta with the line width."
- // scrollingDeltaX seems to return a minimum value of 0.1 in this case, map that to two pixels.
- const CGFloat lineWithEstimate = 20.0;
- pixelDelta.setX([theEvent scrollingDeltaX] * lineWithEstimate);
- pixelDelta.setY([theEvent scrollingDeltaY] * lineWithEstimate);
- }
-
- QPointF qt_windowPoint;
- QPointF qt_screenPoint;
- [self convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint:&qt_windowPoint andScreenPoint:&qt_screenPoint];
- NSTimeInterval timestamp = [theEvent timestamp];
- ulong qt_timestamp = timestamp * 1000;
-
- // Prevent keyboard modifier state from changing during scroll event streams.
- // A two-finger trackpad flick generates a stream of scroll events. We want
- // the keyboard modifier state to be the state at the beginning of the
- // flick in order to avoid changing the interpretation of the events
- // mid-stream. One example of this happening would be when pressing cmd
- // after scrolling in Qt Creator: not taking the phase into account causes
- // the end of the event stream to be interpreted as font size changes.
- NSEventPhase momentumPhase = [theEvent momentumPhase];
- if (momentumPhase == NSEventPhaseNone) {
- currentWheelModifiers = [QNSView convertKeyModifiers:[theEvent modifierFlags]];
- }
-
- NSEventPhase phase = [theEvent phase];
- Qt::ScrollPhase ph = Qt::ScrollUpdate;
-
- // MayBegin is likely to happen. We treat it the same as an actual begin.
- if (phase == NSEventPhaseMayBegin) {
- m_scrolling = true;
- ph = Qt::ScrollBegin;
- } else if (phase == NSEventPhaseBegan) {
- // If MayBegin did not happen, Began is the actual beginning.
- if (!m_scrolling)
- ph = Qt::ScrollBegin;
- m_scrolling = true;
- } else if (phase == NSEventPhaseEnded || phase == NSEventPhaseCancelled ||
- momentumPhase == NSEventPhaseEnded || momentumPhase == NSEventPhaseCancelled) {
- ph = Qt::ScrollEnd;
- m_scrolling = false;
- } else if (phase == NSEventPhaseNone && momentumPhase == NSEventPhaseNone) {
- ph = Qt::NoScrollPhase;
- }
- // "isInverted": natural OS X scrolling, inverted from the Qt/other platform/Jens perspective.
- bool isInverted = [theEvent isDirectionInvertedFromDevice];
-
- qCDebug(lcQpaCocoaMouse) << "scroll wheel @ window pos" << qt_windowPoint << "delta px" << pixelDelta << "angle" << angleDelta << "phase" << ph << (isInverted ? "inverted" : "");
- QWindowSystemInterface::handleWheelEvent(m_platformWindow->window(), qt_timestamp, qt_windowPoint, qt_screenPoint, pixelDelta, angleDelta, currentWheelModifiers, ph, source, isInverted);
-}
-#endif // QT_CONFIG(wheelevent)
-
-- (int) convertKeyCode : (QChar)keyChar
-{
- return qt_mac_cocoaKey2QtKey(keyChar);
-}
-
-+ (Qt::KeyboardModifiers) convertKeyModifiers : (ulong)modifierFlags
-{
- const bool dontSwapCtrlAndMeta = qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta);
- Qt::KeyboardModifiers qtMods =Qt::NoModifier;
- if (modifierFlags & NSShiftKeyMask)
- qtMods |= Qt::ShiftModifier;
- if (modifierFlags & NSControlKeyMask)
- qtMods |= dontSwapCtrlAndMeta ? Qt::ControlModifier : Qt::MetaModifier;
- if (modifierFlags & NSAlternateKeyMask)
- qtMods |= Qt::AltModifier;
- if (modifierFlags & NSCommandKeyMask)
- qtMods |= dontSwapCtrlAndMeta ? Qt::MetaModifier : Qt::ControlModifier;
- if (modifierFlags & NSNumericPadKeyMask)
- qtMods |= Qt::KeypadModifier;
- return qtMods;
-}
-
-- (bool)handleKeyEvent:(NSEvent *)nsevent eventType:(int)eventType
-{
- ulong timestamp = [nsevent timestamp] * 1000;
- ulong nativeModifiers = [nsevent modifierFlags];
- Qt::KeyboardModifiers modifiers = [QNSView convertKeyModifiers: nativeModifiers];
- NSString *charactersIgnoringModifiers = [nsevent charactersIgnoringModifiers];
- NSString *characters = [nsevent characters];
- if (m_inputSource != characters) {
- [m_inputSource release];
- m_inputSource = [characters retain];
- }
-
- // There is no way to get the scan code from carbon/cocoa. But we cannot
- // use the value 0, since it indicates that the event originates from somewhere
- // else than the keyboard.
- quint32 nativeScanCode = 1;
- quint32 nativeVirtualKey = [nsevent keyCode];
-
- QChar ch = QChar::ReplacementCharacter;
- int keyCode = Qt::Key_unknown;
-
- // If a dead key occurs as a result of pressing a key combination then
- // characters will have 0 length, but charactersIgnoringModifiers will
- // have a valid character in it. This enables key combinations such as
- // ALT+E to be used as a shortcut with an English keyboard even though
- // pressing ALT+E will give a dead key while doing normal text input.
- if ([characters length] != 0 || [charactersIgnoringModifiers length] != 0) {
- auto ctrlOrMetaModifier = qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta) ? Qt::ControlModifier : Qt::MetaModifier;
- if (((modifiers & ctrlOrMetaModifier) || (modifiers & Qt::AltModifier)) && ([charactersIgnoringModifiers length] != 0))
- ch = QChar([charactersIgnoringModifiers characterAtIndex:0]);
- else if ([characters length] != 0)
- ch = QChar([characters characterAtIndex:0]);
- keyCode = [self convertKeyCode:ch];
- }
-
- // we will send a key event unless the input method sets m_sendKeyEvent to false
- m_sendKeyEvent = true;
- QString text;
- // ignore text for the U+F700-U+F8FF range. This is used by Cocoa when
- // delivering function keys (e.g. arrow keys, backspace, F1-F35, etc.)
- if (!(modifiers & (Qt::ControlModifier | Qt::MetaModifier)) && (ch.unicode() < 0xf700 || ch.unicode() > 0xf8ff))
- text = QString::fromNSString(characters);
-
- QWindow *window = [self topLevelWindow];
-
- // Popups implicitly grab key events; forward to the active popup if there is one.
- // This allows popups to e.g. intercept shortcuts and close the popup in response.
- if (QCocoaWindow *popup = QCocoaIntegration::instance()->activePopupWindow()) {
- if (!popup->m_windowFlags.testFlag(Qt::ToolTip))
- window = popup->window();
- }
-
- if (eventType == QEvent::KeyPress) {
-
- if (m_composingText.isEmpty()) {
- m_sendKeyEvent = !QWindowSystemInterface::handleShortcutEvent(window, timestamp, keyCode,
- modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers, text, [nsevent isARepeat], 1);
-
- // Handling a shortcut may result in closing the window
- if (!m_platformWindow)
- return true;
- }
-
- QObject *fo = m_platformWindow->window()->focusObject();
- if (m_sendKeyEvent && fo) {
- QInputMethodQueryEvent queryEvent(Qt::ImEnabled | Qt::ImHints);
- if (QCoreApplication::sendEvent(fo, &queryEvent)) {
- bool imEnabled = queryEvent.value(Qt::ImEnabled).toBool();
- Qt::InputMethodHints hints = static_cast<Qt::InputMethodHints>(queryEvent.value(Qt::ImHints).toUInt());
- if (imEnabled && !(hints & Qt::ImhDigitsOnly || hints & Qt::ImhFormattedNumbersOnly || hints & Qt::ImhHiddenText)) {
- // pass the key event to the input method. note that m_sendKeyEvent may be set to false during this call
- m_currentlyInterpretedKeyEvent = nsevent;
- [self interpretKeyEvents:[NSArray arrayWithObject:nsevent]];
- m_currentlyInterpretedKeyEvent = 0;
- }
- }
- }
- if (m_resendKeyEvent)
- m_sendKeyEvent = true;
- }
-
- bool accepted = true;
- if (m_sendKeyEvent && m_composingText.isEmpty()) {
- QWindowSystemInterface::handleExtendedKeyEvent(window, timestamp, QEvent::Type(eventType), keyCode, modifiers,
- nativeScanCode, nativeVirtualKey, nativeModifiers, text, [nsevent isARepeat], 1, false);
- accepted = QWindowSystemInterface::flushWindowSystemEvents();
- }
- m_sendKeyEvent = false;
- m_resendKeyEvent = false;
- return accepted;
-}
-
-- (void)keyDown:(NSEvent *)nsevent
-{
- if ([self isTransparentForUserInput])
- return [super keyDown:nsevent];
-
- const bool accepted = [self handleKeyEvent:nsevent eventType:int(QEvent::KeyPress)];
-
- // When Qt is used to implement a plugin for a native application we
- // want to propagate unhandled events to other native views. However,
- // Qt does not always set the accepted state correctly (in particular
- // for return key events), so do this for plugin applications only
- // to prevent incorrect forwarding in the general case.
- const bool shouldPropagate = QCoreApplication::testAttribute(Qt::AA_PluginApplication) && !accepted;
-
- // Track keyDown acceptance/forward state for later acceptance of the keyUp.
- if (!shouldPropagate)
- m_acceptedKeyDowns.insert([nsevent keyCode]);
-
- if (shouldPropagate)
- [super keyDown:nsevent];
-}
-
-- (void)keyUp:(NSEvent *)nsevent
-{
- if ([self isTransparentForUserInput])
- return [super keyUp:nsevent];
-
- const bool keyUpAccepted = [self handleKeyEvent:nsevent eventType:int(QEvent::KeyRelease)];
-
- // Propagate the keyUp if neither Qt accepted it nor the corresponding KeyDown was
- // accepted. Qt text controls wil often not use and ignore keyUp events, but we
- // want to avoid propagating unmatched keyUps.
- const bool keyDownAccepted = m_acceptedKeyDowns.remove([nsevent keyCode]);
- if (!keyUpAccepted && !keyDownAccepted)
- [super keyUp:nsevent];
-}
-
-- (void)cancelOperation:(id)sender
-{
- Q_UNUSED(sender);
-
- NSEvent *currentEvent = [NSApp currentEvent];
- if (!currentEvent || currentEvent.type != NSKeyDown)
- return;
-
- // Handling the key event may recurse back here through interpretKeyEvents
- // (when IM is enabled), so we need to guard against that.
- if (currentEvent == m_currentlyInterpretedKeyEvent)
- return;
-
- // Send Command+Key_Period and Escape as normal keypresses so that
- // the key sequence is delivered through Qt. That way clients can
- // intercept the shortcut and override its effect.
- [self handleKeyEvent:currentEvent eventType:int(QEvent::KeyPress)];
-}
-
-- (void)flagsChanged:(NSEvent *)nsevent
-{
- ulong timestamp = [nsevent timestamp] * 1000;
- ulong modifiers = [nsevent modifierFlags];
- Qt::KeyboardModifiers qmodifiers = [QNSView convertKeyModifiers:modifiers];
-
- // calculate the delta and remember the current modifiers for next time
- static ulong m_lastKnownModifiers;
- ulong lastKnownModifiers = m_lastKnownModifiers;
- ulong delta = lastKnownModifiers ^ modifiers;
- m_lastKnownModifiers = modifiers;
-
- struct qt_mac_enum_mapper
- {
- ulong mac_mask;
- Qt::Key qt_code;
- };
- static qt_mac_enum_mapper modifier_key_symbols[] = {
- { NSShiftKeyMask, Qt::Key_Shift },
- { NSControlKeyMask, Qt::Key_Meta },
- { NSCommandKeyMask, Qt::Key_Control },
- { NSAlternateKeyMask, Qt::Key_Alt },
- { NSAlphaShiftKeyMask, Qt::Key_CapsLock },
- { 0ul, Qt::Key_unknown } };
- for (int i = 0; modifier_key_symbols[i].mac_mask != 0u; ++i) {
- uint mac_mask = modifier_key_symbols[i].mac_mask;
- if ((delta & mac_mask) == 0u)
- continue;
-
- Qt::Key qtCode = modifier_key_symbols[i].qt_code;
- if (qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta)) {
- if (qtCode == Qt::Key_Meta)
- qtCode = Qt::Key_Control;
- else if (qtCode == Qt::Key_Control)
- qtCode = Qt::Key_Meta;
- }
- QWindowSystemInterface::handleKeyEvent(m_platformWindow->window(),
- timestamp,
- (lastKnownModifiers & mac_mask) ? QEvent::KeyRelease : QEvent::KeyPress,
- qtCode,
- qmodifiers ^ [QNSView convertKeyModifiers:mac_mask]);
- }
-}
-
-- (void) insertNewline:(id)sender
-{
- Q_UNUSED(sender);
- m_resendKeyEvent = true;
-}
-
-- (void) doCommandBySelector:(SEL)aSelector
-{
- [self tryToPerform:aSelector with:self];
-}
-
-- (void) insertText:(id)aString replacementRange:(NSRange)replacementRange
-{
- Q_UNUSED(replacementRange)
-
- if (m_sendKeyEvent && m_composingText.isEmpty() && [aString isEqualToString:m_inputSource]) {
- // don't send input method events for simple text input (let handleKeyEvent send key events instead)
- return;
- }
-
- QString commitString;
- if ([aString length]) {
- if ([aString isKindOfClass:[NSAttributedString class]]) {
- commitString = QString::fromCFString(reinterpret_cast<CFStringRef>([aString string]));
- } else {
- commitString = QString::fromCFString(reinterpret_cast<CFStringRef>(aString));
- };
- }
- if (QObject *fo = m_platformWindow->window()->focusObject()) {
- QInputMethodQueryEvent queryEvent(Qt::ImEnabled);
- if (QCoreApplication::sendEvent(fo, &queryEvent)) {
- if (queryEvent.value(Qt::ImEnabled).toBool()) {
- QInputMethodEvent e;
- e.setCommitString(commitString);
- QCoreApplication::sendEvent(fo, &e);
- // prevent handleKeyEvent from sending a key event
- m_sendKeyEvent = false;
- }
- }
- }
-
- m_composingText.clear();
- m_composingFocusObject = nullptr;
-}
-
-- (void) setMarkedText:(id)aString selectedRange:(NSRange)selectedRange replacementRange:(NSRange)replacementRange
-{
- Q_UNUSED(replacementRange)
- QString preeditString;
-
- QList<QInputMethodEvent::Attribute> attrs;
- attrs<<QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, selectedRange.location + selectedRange.length, 1, QVariant());
-
- if ([aString isKindOfClass:[NSAttributedString class]]) {
- // Preedit string has attribution
- preeditString = QString::fromCFString(reinterpret_cast<CFStringRef>([aString string]));
- int composingLength = preeditString.length();
- int index = 0;
- // Create attributes for individual sections of preedit text
- while (index < composingLength) {
- NSRange effectiveRange;
- NSRange range = NSMakeRange(index, composingLength-index);
- NSDictionary *attributes = [aString attributesAtIndex:index
- longestEffectiveRange:&effectiveRange
- inRange:range];
- NSNumber *underlineStyle = [attributes objectForKey:NSUnderlineStyleAttributeName];
- if (underlineStyle) {
- QColor clr (Qt::black);
- NSColor *color = [attributes objectForKey:NSUnderlineColorAttributeName];
- if (color) {
- clr = qt_mac_toQColor(color);
- }
- QTextCharFormat format;
- format.setFontUnderline(true);
- format.setUnderlineColor(clr);
- attrs<<QInputMethodEvent::Attribute(QInputMethodEvent::TextFormat,
- effectiveRange.location,
- effectiveRange.length,
- format);
- }
- index = effectiveRange.location + effectiveRange.length;
- }
- } else {
- // No attributes specified, take only the preedit text.
- preeditString = QString::fromCFString(reinterpret_cast<CFStringRef>(aString));
- }
-
- if (attrs.isEmpty()) {
- QTextCharFormat format;
- format.setFontUnderline(true);
- attrs<<QInputMethodEvent::Attribute(QInputMethodEvent::TextFormat,
- 0, preeditString.length(), format);
- }
-
- m_composingText = preeditString;
-
- if (QObject *fo = m_platformWindow->window()->focusObject()) {
- m_composingFocusObject = fo;
- QInputMethodQueryEvent queryEvent(Qt::ImEnabled);
- if (QCoreApplication::sendEvent(fo, &queryEvent)) {
- if (queryEvent.value(Qt::ImEnabled).toBool()) {
- QInputMethodEvent e(preeditString, attrs);
- QCoreApplication::sendEvent(fo, &e);
- // prevent handleKeyEvent from sending a key event
- m_sendKeyEvent = false;
- }
- }
- }
-}
-
-- (void)cancelComposingText
-{
- if (m_composingText.isEmpty())
- return;
-
- if (m_composingFocusObject) {
- QInputMethodQueryEvent queryEvent(Qt::ImEnabled);
- if (QCoreApplication::sendEvent(m_composingFocusObject, &queryEvent)) {
- if (queryEvent.value(Qt::ImEnabled).toBool()) {
- QInputMethodEvent e;
- QCoreApplication::sendEvent(m_composingFocusObject, &e);
- }
- }
- }
-
- m_composingText.clear();
- m_composingFocusObject = nullptr;
-}
-
-- (void) unmarkText
-{
- if (!m_composingText.isEmpty()) {
- if (QObject *fo = m_platformWindow->window()->focusObject()) {
- QInputMethodQueryEvent queryEvent(Qt::ImEnabled);
- if (QCoreApplication::sendEvent(fo, &queryEvent)) {
- if (queryEvent.value(Qt::ImEnabled).toBool()) {
- QInputMethodEvent e;
- e.setCommitString(m_composingText);
- QCoreApplication::sendEvent(fo, &e);
- }
- }
- }
- }
- m_composingText.clear();
- m_composingFocusObject = nullptr;
-}
-
-- (BOOL) hasMarkedText
-{
- return (m_composingText.isEmpty() ? NO: YES);
-}
-
-- (NSAttributedString *) attributedSubstringForProposedRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange
-{
- Q_UNUSED(actualRange)
- QObject *fo = m_platformWindow->window()->focusObject();
- if (!fo)
- return nil;
- QInputMethodQueryEvent queryEvent(Qt::ImEnabled | Qt::ImCurrentSelection);
- if (!QCoreApplication::sendEvent(fo, &queryEvent))
- return nil;
- if (!queryEvent.value(Qt::ImEnabled).toBool())
- return nil;
-
- QString selectedText = queryEvent.value(Qt::ImCurrentSelection).toString();
- if (selectedText.isEmpty())
- return nil;
-
- QCFString string(selectedText.mid(aRange.location, aRange.length));
- const NSString *tmpString = reinterpret_cast<const NSString *>((CFStringRef)string);
- return [[[NSAttributedString alloc] initWithString:const_cast<NSString *>(tmpString)] autorelease];
-}
-
-- (NSRange) markedRange
-{
- NSRange range;
- if (!m_composingText.isEmpty()) {
- range.location = 0;
- range.length = m_composingText.length();
- } else {
- range.location = NSNotFound;
- range.length = 0;
- }
- return range;
-}
-
-- (NSRange) selectedRange
-{
- NSRange selectedRange = {0, 0};
-
- QObject *fo = m_platformWindow->window()->focusObject();
- if (!fo)
- return selectedRange;
- QInputMethodQueryEvent queryEvent(Qt::ImEnabled | Qt::ImCurrentSelection);
- if (!QCoreApplication::sendEvent(fo, &queryEvent))
- return selectedRange;
- if (!queryEvent.value(Qt::ImEnabled).toBool())
- return selectedRange;
-
- QString selectedText = queryEvent.value(Qt::ImCurrentSelection).toString();
-
- if (!selectedText.isEmpty()) {
- selectedRange.location = 0;
- selectedRange.length = selectedText.length();
- }
- return selectedRange;
-}
-
-- (NSRect) firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange
-{
- Q_UNUSED(aRange)
- Q_UNUSED(actualRange)
- QObject *fo = m_platformWindow->window()->focusObject();
- if (!fo)
- return NSZeroRect;
-
- QInputMethodQueryEvent queryEvent(Qt::ImEnabled);
- if (!QCoreApplication::sendEvent(fo, &queryEvent))
- return NSZeroRect;
- if (!queryEvent.value(Qt::ImEnabled).toBool())
- return NSZeroRect;
-
- if (!m_platformWindow->window())
- return NSZeroRect;
-
- // The returned rect is always based on the internal cursor.
- QRect mr = qApp->inputMethod()->cursorRectangle().toRect();
- mr.moveBottomLeft(m_platformWindow->window()->mapToGlobal(mr.bottomLeft()));
- return QCocoaScreen::mapToNative(mr);
-}
-
-- (NSUInteger)characterIndexForPoint:(NSPoint)aPoint
-{
- // We don't support cursor movements using mouse while composing.
- Q_UNUSED(aPoint);
- return NSNotFound;
-}
-
-- (NSArray*)validAttributesForMarkedText
-{
- if (!m_platformWindow)
- return nil;
-
- if (m_platformWindow->window() != QGuiApplication::focusWindow())
- return nil;
-
- QObject *fo = m_platformWindow->window()->focusObject();
- if (!fo)
- return nil;
-
- QInputMethodQueryEvent queryEvent(Qt::ImEnabled);
- if (!QCoreApplication::sendEvent(fo, &queryEvent))
- return nil;
- if (!queryEvent.value(Qt::ImEnabled).toBool())
- return nil;
-
- // Support only underline color/style.
- return [NSArray arrayWithObjects:NSUnderlineColorAttributeName,
- NSUnderlineStyleAttributeName, nil];
-}
-
--(void)registerDragTypes
-{
- QMacAutoReleasePool pool;
- QStringList customTypes = qt_mac_enabledDraggedTypes();
- if (currentCustomDragTypes == 0 || *currentCustomDragTypes != customTypes) {
- if (currentCustomDragTypes == 0)
- currentCustomDragTypes = new QStringList();
- *currentCustomDragTypes = customTypes;
- const NSString* mimeTypeGeneric = @"com.trolltech.qt.MimeTypeName";
- NSMutableArray *supportedTypes = [NSMutableArray arrayWithObjects:NSColorPboardType,
- NSFilenamesPboardType, NSStringPboardType,
- NSFilenamesPboardType, NSPostScriptPboardType, NSTIFFPboardType,
- NSRTFPboardType, NSTabularTextPboardType, NSFontPboardType,
- NSRulerPboardType, NSFileContentsPboardType, NSColorPboardType,
- NSRTFDPboardType, NSHTMLPboardType,
- NSURLPboardType, NSPDFPboardType, NSVCardPboardType,
- NSFilesPromisePboardType, NSInkTextPboardType,
- NSMultipleTextSelectionPboardType, mimeTypeGeneric, nil];
- // Add custom types supported by the application.
- for (int i = 0; i < customTypes.size(); i++) {
- [supportedTypes addObject:customTypes[i].toNSString()];
- }
- [self registerForDraggedTypes:supportedTypes];
- }
-}
-
-static QWindow *findEventTargetWindow(QWindow *candidate)
-{
- while (candidate) {
- if (!(candidate->flags() & Qt::WindowTransparentForInput))
- return candidate;
- candidate = candidate->parent();
- }
- return candidate;
-}
-
-static QPoint mapWindowCoordinates(QWindow *source, QWindow *target, QPoint point)
-{
- return target->mapFromGlobal(source->mapToGlobal(point));
-}
-
-- (NSDragOperation)draggingSession:(NSDraggingSession *)session
- sourceOperationMaskForDraggingContext:(NSDraggingContext)context
-{
- Q_UNUSED(session);
- Q_UNUSED(context);
- QCocoaDrag* nativeDrag = QCocoaIntegration::instance()->drag();
- return qt_mac_mapDropActions(nativeDrag->currentDrag()->supportedActions());
-}
-
-- (BOOL)ignoreModifierKeysForDraggingSession:(NSDraggingSession *)session
-{
- Q_UNUSED(session);
- // According to the "Dragging Sources" chapter on Cocoa DnD Programming
- // (https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/DragandDrop/Concepts/dragsource.html),
- // if the control, option, or command key is pressed, the source’s
- // operation mask is filtered to only contain a reduced set of operations.
- //
- // Since Qt already takes care of tracking the keyboard modifiers, we
- // don't need (or want) Cocoa to filter anything. Instead, we'll let
- // the application do the actual filtering.
- return YES;
-}
-
-- (BOOL)wantsPeriodicDraggingUpdates
-{
- // From the documentation:
- //
- // "If the destination returns NO, these messages are sent only when the mouse moves
- // or a modifier flag changes. Otherwise the destination gets the default behavior,
- // where it receives periodic dragging-updated messages even if nothing changes."
- //
- // We do not want these constant drag update events while mouse is stationary,
- // since we do all animations (autoscroll) with timers.
- return NO;
-}
-
-
-- (BOOL)wantsPeriodicDraggingUpdates:(void *)dummy
-{
- // This method never gets called. It's a workaround for Apple's
- // bug: they first respondsToSelector : @selector(wantsPeriodicDraggingUpdates:)
- // (note ':') and then call -wantsPeriodicDraggingUpdate (without colon).
- // So, let's make them happy.
- Q_UNUSED(dummy);
-
- return NO;
-}
-
-- (void)updateCursorFromDragResponse:(QPlatformDragQtResponse)response drag:(QCocoaDrag *)drag
-{
- const QPixmap pixmapCursor = drag->currentDrag()->dragCursor(response.acceptedAction());
- NSCursor *nativeCursor = nil;
-
- if (pixmapCursor.isNull()) {
- switch (response.acceptedAction()) {
- case Qt::CopyAction:
- nativeCursor = [NSCursor dragCopyCursor];
- break;
- case Qt::LinkAction:
- nativeCursor = [NSCursor dragLinkCursor];
- break;
- case Qt::IgnoreAction:
- // Uncomment the next lines if forbiden cursor wanted on non droppable targets.
- /*nativeCursor = [NSCursor operationNotAllowedCursor];
- break;*/
- case Qt::MoveAction:
- default:
- nativeCursor = [NSCursor arrowCursor];
- break;
- }
- }
- else {
- NSImage *nsimage = qt_mac_create_nsimage(pixmapCursor);
- nsimage.size = NSSizeFromCGSize((pixmapCursor.size() / pixmapCursor.devicePixelRatioF()).toCGSize());
- nativeCursor = [[NSCursor alloc] initWithImage:nsimage hotSpot:NSZeroPoint];
- [nsimage release];
- }
-
- // change the cursor
- [nativeCursor set];
-
- // Make sure the cursor is updated correctly if the mouse does not move and window is under cursor
- // by creating a fake move event, unless on 10.14 and later where doing so will trigger a security
- // warning dialog. FIXME: Find a way to update the cursor without fake mouse events.
- if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::MacOSMojave)
- return;
-
- if (m_updatingDrag)
- return;
-
- const QPoint mousePos(QCursor::pos());
- CGEventRef moveEvent(CGEventCreateMouseEvent(
- NULL, kCGEventMouseMoved,
- CGPointMake(mousePos.x(), mousePos.y()),
- kCGMouseButtonLeft // ignored
- ));
- CGEventPost(kCGHIDEventTap, moveEvent);
- CFRelease(moveEvent);
-}
-
-- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
-{
- return [self handleDrag : sender];
-}
-
-- (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender
-{
- m_updatingDrag = true;
- const NSDragOperation ret([self handleDrag : sender]);
- m_updatingDrag = false;
-
- return ret;
-}
-
-// Sends drag update to Qt, return the action
-- (NSDragOperation)handleDrag:(id <NSDraggingInfo>)sender
-{
- if (!m_platformWindow)
- return NSDragOperationNone;
-
- NSPoint windowPoint = [self convertPoint: [sender draggingLocation] fromView: nil];
- QPoint qt_windowPoint(windowPoint.x, windowPoint.y);
- Qt::DropActions qtAllowed = qt_mac_mapNSDragOperations([sender draggingSourceOperationMask]);
-
- QWindow *target = findEventTargetWindow(m_platformWindow->window());
- if (!target)
- return NSDragOperationNone;
-
- // update these so selecting move/copy/link works
- QGuiApplicationPrivate::modifier_buttons = [QNSView convertKeyModifiers: [[NSApp currentEvent] modifierFlags]];
-
- QPlatformDragQtResponse response(false, Qt::IgnoreAction, QRect());
- QCocoaDrag* nativeDrag = QCocoaIntegration::instance()->drag();
- if (nativeDrag->currentDrag()) {
- // The drag was started from within the application
- response = QWindowSystemInterface::handleDrag(target, nativeDrag->dragMimeData(), mapWindowCoordinates(m_platformWindow->window(), target, qt_windowPoint), qtAllowed);
- [self updateCursorFromDragResponse:response drag:nativeDrag];
- } else {
- QCocoaDropData mimeData([sender draggingPasteboard]);
- response = QWindowSystemInterface::handleDrag(target, &mimeData, mapWindowCoordinates(m_platformWindow->window(), target, qt_windowPoint), qtAllowed);
- }
-
- return qt_mac_mapDropAction(response.acceptedAction());
-}
-
-- (void)draggingExited:(id <NSDraggingInfo>)sender
-{
- if (!m_platformWindow)
- return;
-
- QWindow *target = findEventTargetWindow(m_platformWindow->window());
- if (!target)
- return;
-
- NSPoint windowPoint = [self convertPoint: [sender draggingLocation] fromView: nil];
- QPoint qt_windowPoint(windowPoint.x, windowPoint.y);
-
- // Send 0 mime data to indicate drag exit
- QWindowSystemInterface::handleDrag(target, 0, mapWindowCoordinates(m_platformWindow->window(), target, qt_windowPoint), Qt::IgnoreAction);
-}
-
-// called on drop, send the drop to Qt and return if it was accepted.
-- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
-{
- if (!m_platformWindow)
- return false;
-
- QWindow *target = findEventTargetWindow(m_platformWindow->window());
- if (!target)
- return false;
-
- NSPoint windowPoint = [self convertPoint: [sender draggingLocation] fromView: nil];
- QPoint qt_windowPoint(windowPoint.x, windowPoint.y);
- Qt::DropActions qtAllowed = qt_mac_mapNSDragOperations([sender draggingSourceOperationMask]);
-
- QPlatformDropQtResponse response(false, Qt::IgnoreAction);
- QCocoaDrag* nativeDrag = QCocoaIntegration::instance()->drag();
- if (nativeDrag->currentDrag()) {
- // The drag was started from within the application
- response = QWindowSystemInterface::handleDrop(target, nativeDrag->dragMimeData(), mapWindowCoordinates(m_platformWindow->window(), target, qt_windowPoint), qtAllowed);
- } else {
- QCocoaDropData mimeData([sender draggingPasteboard]);
- response = QWindowSystemInterface::handleDrop(target, &mimeData, mapWindowCoordinates(m_platformWindow->window(), target, qt_windowPoint), qtAllowed);
- }
- if (response.isAccepted()) {
- QCocoaDrag* nativeDrag = QCocoaIntegration::instance()->drag();
- nativeDrag->setAcceptedAction(response.acceptedAction());
- }
- return response.isAccepted();
-}
-
-- (void)draggingSession:(NSDraggingSession *)session
- endedAtPoint:(NSPoint)screenPoint
- operation:(NSDragOperation)operation
-{
- Q_UNUSED(session);
- Q_UNUSED(operation);
-
- if (!m_platformWindow)
- return;
-
- QWindow *target = findEventTargetWindow(m_platformWindow->window());
- if (!target)
- return;
-
- // keep our state, and QGuiApplication state (buttons member) in-sync,
- // or future mouse events will be processed incorrectly
- NSUInteger pmb = [NSEvent pressedMouseButtons];
- for (int buttonNumber = 0; buttonNumber < 32; buttonNumber++) { // see cocoaButton2QtButton() for the 32 value
- if (!(pmb & (1 << buttonNumber)))
- m_buttons &= ~cocoaButton2QtButton(buttonNumber);
- }
-
- NSPoint windowPoint = [self.window convertRectFromScreen:NSMakeRect(screenPoint.x, screenPoint.y, 1, 1)].origin;
- NSPoint nsViewPoint = [self convertPoint: windowPoint fromView: nil]; // NSView/QWindow coordinates
- QPoint qtWindowPoint(nsViewPoint.x, nsViewPoint.y);
- QPoint qtScreenPoint = QCocoaScreen::mapFromNative(screenPoint).toPoint();
-
- QWindowSystemInterface::handleMouseEvent(target, mapWindowCoordinates(m_platformWindow->window(), target, qtWindowPoint), qtScreenPoint, m_buttons);
-}
-
-@end
+// -----------------------------------------------------
@implementation QT_MANGLE_NAMESPACE(QNSView) (QtExtras)
@@ -2089,9 +355,4 @@ static QPoint mapWindowCoordinates(QWindow *source, QWindow *target, QPoint poin
return m_platformWindow.data();;
}
-- (BOOL)isMenuView
-{
- return m_isMenuView;
-}
-
@end
diff --git a/src/plugins/platforms/cocoa/qnsviewaccessibility.mm b/src/plugins/platforms/cocoa/qnsview_accessibility.mm
index 645a93edf7..32ec0b74d4 100644
--- a/src/plugins/platforms/cocoa/qnsviewaccessibility.mm
+++ b/src/plugins/platforms/cocoa/qnsview_accessibility.mm
@@ -37,57 +37,54 @@
**
****************************************************************************/
-#include "qnsview.h"
-#include "qcocoahelpers.h"
+// This file is included from qnsview.mm, and only used to organize the code
+
#include "qcocoaaccessibility.h"
#include "qcocoaaccessibilityelement.h"
#include "qcocoaintegration.h"
#include <QtGui/qaccessible.h>
-#include <QtCore/QDebug>
#import <AppKit/NSAccessibility.h>
-#ifndef QT_NO_ACCESSIBILITY
-
-@implementation QNSView (QNSViewAccessibility)
+@implementation QT_MANGLE_NAMESPACE(QNSView) (Accessibility)
-- (id)childAccessibleElement {
- if (m_platformWindow.isNull())
+- (id)childAccessibleElement
+{
+ QCocoaWindow *platformWindow = self.platformWindow;
+ if (!platformWindow || !platformWindow->window()->accessibleRoot())
return nil;
- if (!m_platformWindow->window()->accessibleRoot())
- return nil;
-
- QAccessible::Id childId = QAccessible::uniqueId(m_platformWindow->window()->accessibleRoot());
- return [QMacAccessibilityElement elementWithId: childId];
+ QAccessible::Id childId = QAccessible::uniqueId(platformWindow->window()->accessibleRoot());
+ return [QMacAccessibilityElement elementWithId:childId];
}
// The QNSView is a container that the user does not interact directly with:
// Remove it from the user-visible accessibility tree.
-- (BOOL)accessibilityIsIgnored {
+- (BOOL)accessibilityIsIgnored
+{
return YES;
}
-- (id)accessibilityAttributeValue:(NSString *)attribute {
+- (id)accessibilityAttributeValue:(NSString *)attribute
+{
// activate accessibility updates
QCocoaIntegration::instance()->accessibility()->setActive(true);
- if ([attribute isEqualToString:NSAccessibilityChildrenAttribute]) {
+ if ([attribute isEqualToString:NSAccessibilityChildrenAttribute])
return NSAccessibilityUnignoredChildrenForOnlyChild([self childAccessibleElement]);
- } else {
+ else
return [super accessibilityAttributeValue:attribute];
- }
}
-- (id)accessibilityHitTest:(NSPoint)point {
- return [[self childAccessibleElement] accessibilityHitTest: point];
+- (id)accessibilityHitTest:(NSPoint)point
+{
+ return [[self childAccessibleElement] accessibilityHitTest:point];
}
-- (id)accessibilityFocusedUIElement {
+- (id)accessibilityFocusedUIElement
+{
return [[self childAccessibleElement] accessibilityFocusedUIElement];
}
@end
-
-#endif // QT_NO_ACCESSIBILITY
diff --git a/src/plugins/platforms/cocoa/qnsview_complextext.mm b/src/plugins/platforms/cocoa/qnsview_complextext.mm
new file mode 100644
index 0000000000..d357082d33
--- /dev/null
+++ b/src/plugins/platforms/cocoa/qnsview_complextext.mm
@@ -0,0 +1,315 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// This file is included from qnsview.mm, and only used to organize the code
+
+@implementation QT_MANGLE_NAMESPACE(QNSView) (ComplexTextAPI)
+
+- (void)cancelComposingText
+{
+ if (m_composingText.isEmpty())
+ return;
+
+ if (m_composingFocusObject) {
+ QInputMethodQueryEvent queryEvent(Qt::ImEnabled);
+ if (QCoreApplication::sendEvent(m_composingFocusObject, &queryEvent)) {
+ if (queryEvent.value(Qt::ImEnabled).toBool()) {
+ QInputMethodEvent e;
+ QCoreApplication::sendEvent(m_composingFocusObject, &e);
+ }
+ }
+ }
+
+ m_composingText.clear();
+ m_composingFocusObject = nullptr;
+}
+
+- (void)unmarkText
+{
+ if (!m_composingText.isEmpty()) {
+ if (QObject *fo = m_platformWindow->window()->focusObject()) {
+ QInputMethodQueryEvent queryEvent(Qt::ImEnabled);
+ if (QCoreApplication::sendEvent(fo, &queryEvent)) {
+ if (queryEvent.value(Qt::ImEnabled).toBool()) {
+ QInputMethodEvent e;
+ e.setCommitString(m_composingText);
+ QCoreApplication::sendEvent(fo, &e);
+ }
+ }
+ }
+ }
+ m_composingText.clear();
+ m_composingFocusObject = nullptr;
+}
+
+@end
+
+@implementation QT_MANGLE_NAMESPACE(QNSView) (ComplexText)
+
+- (void)insertNewline:(id)sender
+{
+ Q_UNUSED(sender);
+ m_resendKeyEvent = true;
+}
+
+- (void)doCommandBySelector:(SEL)aSelector
+{
+ [self tryToPerform:aSelector with:self];
+}
+
+- (void)insertText:(id)aString replacementRange:(NSRange)replacementRange
+{
+ Q_UNUSED(replacementRange)
+
+ if (m_sendKeyEvent && m_composingText.isEmpty() && [aString isEqualToString:m_inputSource]) {
+ // don't send input method events for simple text input (let handleKeyEvent send key events instead)
+ return;
+ }
+
+ QString commitString;
+ if ([aString length]) {
+ if ([aString isKindOfClass:[NSAttributedString class]]) {
+ commitString = QString::fromCFString(reinterpret_cast<CFStringRef>([aString string]));
+ } else {
+ commitString = QString::fromCFString(reinterpret_cast<CFStringRef>(aString));
+ };
+ }
+ if (QObject *fo = m_platformWindow->window()->focusObject()) {
+ QInputMethodQueryEvent queryEvent(Qt::ImEnabled);
+ if (QCoreApplication::sendEvent(fo, &queryEvent)) {
+ if (queryEvent.value(Qt::ImEnabled).toBool()) {
+ QInputMethodEvent e;
+ e.setCommitString(commitString);
+ QCoreApplication::sendEvent(fo, &e);
+ // prevent handleKeyEvent from sending a key event
+ m_sendKeyEvent = false;
+ }
+ }
+ }
+
+ m_composingText.clear();
+ m_composingFocusObject = nullptr;
+}
+
+- (void)setMarkedText:(id)aString selectedRange:(NSRange)selectedRange replacementRange:(NSRange)replacementRange
+{
+ Q_UNUSED(replacementRange)
+ QString preeditString;
+
+ QList<QInputMethodEvent::Attribute> attrs;
+ attrs<<QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, selectedRange.location + selectedRange.length, 1, QVariant());
+
+ if ([aString isKindOfClass:[NSAttributedString class]]) {
+ // Preedit string has attribution
+ preeditString = QString::fromCFString(reinterpret_cast<CFStringRef>([aString string]));
+ int composingLength = preeditString.length();
+ int index = 0;
+ // Create attributes for individual sections of preedit text
+ while (index < composingLength) {
+ NSRange effectiveRange;
+ NSRange range = NSMakeRange(index, composingLength-index);
+ NSDictionary *attributes = [aString attributesAtIndex:index
+ longestEffectiveRange:&effectiveRange
+ inRange:range];
+ NSNumber *underlineStyle = [attributes objectForKey:NSUnderlineStyleAttributeName];
+ if (underlineStyle) {
+ QColor clr (Qt::black);
+ NSColor *color = [attributes objectForKey:NSUnderlineColorAttributeName];
+ if (color) {
+ clr = qt_mac_toQColor(color);
+ }
+ QTextCharFormat format;
+ format.setFontUnderline(true);
+ format.setUnderlineColor(clr);
+ attrs<<QInputMethodEvent::Attribute(QInputMethodEvent::TextFormat,
+ effectiveRange.location,
+ effectiveRange.length,
+ format);
+ }
+ index = effectiveRange.location + effectiveRange.length;
+ }
+ } else {
+ // No attributes specified, take only the preedit text.
+ preeditString = QString::fromCFString(reinterpret_cast<CFStringRef>(aString));
+ }
+
+ if (attrs.isEmpty()) {
+ QTextCharFormat format;
+ format.setFontUnderline(true);
+ attrs<<QInputMethodEvent::Attribute(QInputMethodEvent::TextFormat,
+ 0, preeditString.length(), format);
+ }
+
+ m_composingText = preeditString;
+
+ if (QObject *fo = m_platformWindow->window()->focusObject()) {
+ m_composingFocusObject = fo;
+ QInputMethodQueryEvent queryEvent(Qt::ImEnabled);
+ if (QCoreApplication::sendEvent(fo, &queryEvent)) {
+ if (queryEvent.value(Qt::ImEnabled).toBool()) {
+ QInputMethodEvent e(preeditString, attrs);
+ QCoreApplication::sendEvent(fo, &e);
+ // prevent handleKeyEvent from sending a key event
+ m_sendKeyEvent = false;
+ }
+ }
+ }
+}
+
+- (BOOL)hasMarkedText
+{
+ return (m_composingText.isEmpty() ? NO: YES);
+}
+
+- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange
+{
+ Q_UNUSED(actualRange)
+ QObject *fo = m_platformWindow->window()->focusObject();
+ if (!fo)
+ return nil;
+ QInputMethodQueryEvent queryEvent(Qt::ImEnabled | Qt::ImCurrentSelection);
+ if (!QCoreApplication::sendEvent(fo, &queryEvent))
+ return nil;
+ if (!queryEvent.value(Qt::ImEnabled).toBool())
+ return nil;
+
+ QString selectedText = queryEvent.value(Qt::ImCurrentSelection).toString();
+ if (selectedText.isEmpty())
+ return nil;
+
+ QCFString string(selectedText.mid(aRange.location, aRange.length));
+ const NSString *tmpString = reinterpret_cast<const NSString *>((CFStringRef)string);
+ return [[[NSAttributedString alloc] initWithString:const_cast<NSString *>(tmpString)] autorelease];
+}
+
+- (NSRange)markedRange
+{
+ NSRange range;
+ if (!m_composingText.isEmpty()) {
+ range.location = 0;
+ range.length = m_composingText.length();
+ } else {
+ range.location = NSNotFound;
+ range.length = 0;
+ }
+ return range;
+}
+
+- (NSRange)selectedRange
+{
+ NSRange selectedRange = {0, 0};
+
+ QObject *fo = m_platformWindow->window()->focusObject();
+ if (!fo)
+ return selectedRange;
+ QInputMethodQueryEvent queryEvent(Qt::ImEnabled | Qt::ImCurrentSelection);
+ if (!QCoreApplication::sendEvent(fo, &queryEvent))
+ return selectedRange;
+ if (!queryEvent.value(Qt::ImEnabled).toBool())
+ return selectedRange;
+
+ QString selectedText = queryEvent.value(Qt::ImCurrentSelection).toString();
+
+ if (!selectedText.isEmpty()) {
+ selectedRange.location = 0;
+ selectedRange.length = selectedText.length();
+ }
+ return selectedRange;
+}
+
+- (NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange
+{
+ Q_UNUSED(aRange)
+ Q_UNUSED(actualRange)
+
+ QObject *fo = m_platformWindow->window()->focusObject();
+ if (!fo)
+ return NSZeroRect;
+
+ QInputMethodQueryEvent queryEvent(Qt::ImEnabled);
+ if (!QCoreApplication::sendEvent(fo, &queryEvent))
+ return NSZeroRect;
+ if (!queryEvent.value(Qt::ImEnabled).toBool())
+ return NSZeroRect;
+
+ // The returned rect is always based on the internal cursor.
+ QRect mr = qApp->inputMethod()->cursorRectangle().toRect();
+ mr.moveBottomLeft(m_platformWindow->window()->mapToGlobal(mr.bottomLeft()));
+ return QCocoaScreen::mapToNative(mr);
+}
+
+- (NSUInteger)characterIndexForPoint:(NSPoint)aPoint
+{
+ // We don't support cursor movements using mouse while composing.
+ Q_UNUSED(aPoint);
+ return NSNotFound;
+}
+
+- (NSArray<NSString *> *)validAttributesForMarkedText
+{
+ if (!m_platformWindow)
+ return nil;
+
+ if (m_platformWindow->window() != QGuiApplication::focusWindow())
+ return nil;
+
+ QObject *fo = m_platformWindow->window()->focusObject();
+ if (!fo)
+ return nil;
+
+ QInputMethodQueryEvent queryEvent(Qt::ImEnabled);
+ if (!QCoreApplication::sendEvent(fo, &queryEvent))
+ return nil;
+ if (!queryEvent.value(Qt::ImEnabled).toBool())
+ return nil;
+
+ // Support only underline color/style.
+ return @[NSUnderlineColorAttributeName, NSUnderlineStyleAttributeName];
+}
+
+- (void)textInputContextKeyboardSelectionDidChangeNotification:(NSNotification *)textInputContextKeyboardSelectionDidChangeNotification
+{
+ Q_UNUSED(textInputContextKeyboardSelectionDidChangeNotification)
+ if (([NSApp keyWindow] == self.window) && self.window.firstResponder == self) {
+ QCocoaInputContext *ic = qobject_cast<QCocoaInputContext *>(QCocoaIntegration::instance()->inputContext());
+ ic->updateLocale();
+ }
+}
+
+@end
diff --git a/src/plugins/platforms/cocoa/qnsview_dragging.mm b/src/plugins/platforms/cocoa/qnsview_dragging.mm
new file mode 100644
index 0000000000..1c38c5326c
--- /dev/null
+++ b/src/plugins/platforms/cocoa/qnsview_dragging.mm
@@ -0,0 +1,300 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// This file is included from qnsview.mm, and only used to organize the code
+
+@implementation QT_MANGLE_NAMESPACE(QNSView) (Dragging)
+
+-(void)registerDragTypes
+{
+ QMacAutoReleasePool pool;
+
+ NSString * const mimeTypeGeneric = @"com.trolltech.qt.MimeTypeName";
+ NSMutableArray<NSString *> *supportedTypes = [NSMutableArray<NSString *> arrayWithArray:@[
+ NSColorPboardType,
+ NSFilenamesPboardType, NSStringPboardType,
+ NSFilenamesPboardType, NSPostScriptPboardType, NSTIFFPboardType,
+ NSRTFPboardType, NSTabularTextPboardType, NSFontPboardType,
+ NSRulerPboardType, NSFileContentsPboardType, NSColorPboardType,
+ NSRTFDPboardType, NSHTMLPboardType,
+ NSURLPboardType, NSPDFPboardType, NSVCardPboardType,
+ NSFilesPromisePboardType, NSInkTextPboardType,
+ NSMultipleTextSelectionPboardType, mimeTypeGeneric]];
+
+ // Add custom types supported by the application.
+ for (const QString &customType : qt_mac_enabledDraggedTypes())
+ [supportedTypes addObject:customType.toNSString()];
+
+ [self registerForDraggedTypes:supportedTypes];
+}
+
+static QWindow *findEventTargetWindow(QWindow *candidate)
+{
+ while (candidate) {
+ if (!(candidate->flags() & Qt::WindowTransparentForInput))
+ return candidate;
+ candidate = candidate->parent();
+ }
+ return candidate;
+}
+
+static QPoint mapWindowCoordinates(QWindow *source, QWindow *target, QPoint point)
+{
+ return target->mapFromGlobal(source->mapToGlobal(point));
+}
+
+- (NSDragOperation)draggingSession:(NSDraggingSession *)session
+ sourceOperationMaskForDraggingContext:(NSDraggingContext)context
+{
+ Q_UNUSED(session);
+ Q_UNUSED(context);
+ QCocoaDrag* nativeDrag = QCocoaIntegration::instance()->drag();
+ return qt_mac_mapDropActions(nativeDrag->currentDrag()->supportedActions());
+}
+
+- (BOOL)ignoreModifierKeysForDraggingSession:(NSDraggingSession *)session
+{
+ Q_UNUSED(session);
+ // According to the "Dragging Sources" chapter on Cocoa DnD Programming
+ // (https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/DragandDrop/Concepts/dragsource.html),
+ // if the control, option, or command key is pressed, the source’s
+ // operation mask is filtered to only contain a reduced set of operations.
+ //
+ // Since Qt already takes care of tracking the keyboard modifiers, we
+ // don't need (or want) Cocoa to filter anything. Instead, we'll let
+ // the application do the actual filtering.
+ return YES;
+}
+
+- (BOOL)wantsPeriodicDraggingUpdates
+{
+ // From the documentation:
+ //
+ // "If the destination returns NO, these messages are sent only when the mouse moves
+ // or a modifier flag changes. Otherwise the destination gets the default behavior,
+ // where it receives periodic dragging-updated messages even if nothing changes."
+ //
+ // We do not want these constant drag update events while mouse is stationary,
+ // since we do all animations (autoscroll) with timers.
+ return NO;
+}
+
+
+- (BOOL)wantsPeriodicDraggingUpdates:(void *)dummy
+{
+ // This method never gets called. It's a workaround for Apple's
+ // bug: they first respondsToSelector : @selector(wantsPeriodicDraggingUpdates:)
+ // (note ':') and then call -wantsPeriodicDraggingUpdate (without colon).
+ // So, let's make them happy.
+ Q_UNUSED(dummy);
+
+ return NO;
+}
+
+- (void)updateCursorFromDragResponse:(QPlatformDragQtResponse)response drag:(QCocoaDrag *)drag
+{
+ const QPixmap pixmapCursor = drag->currentDrag()->dragCursor(response.acceptedAction());
+ NSCursor *nativeCursor = nil;
+
+ if (pixmapCursor.isNull()) {
+ switch (response.acceptedAction()) {
+ case Qt::CopyAction:
+ nativeCursor = [NSCursor dragCopyCursor];
+ break;
+ case Qt::LinkAction:
+ nativeCursor = [NSCursor dragLinkCursor];
+ break;
+ case Qt::IgnoreAction:
+ // Uncomment the next lines if forbiden cursor wanted on non droppable targets.
+ /*nativeCursor = [NSCursor operationNotAllowedCursor];
+ break;*/
+ case Qt::MoveAction:
+ default:
+ nativeCursor = [NSCursor arrowCursor];
+ break;
+ }
+ }
+ else {
+ NSImage *nsimage = qt_mac_create_nsimage(pixmapCursor);
+ nsimage.size = NSSizeFromCGSize((pixmapCursor.size() / pixmapCursor.devicePixelRatioF()).toCGSize());
+ nativeCursor = [[NSCursor alloc] initWithImage:nsimage hotSpot:NSZeroPoint];
+ [nsimage release];
+ }
+
+ // change the cursor
+ [nativeCursor set];
+
+ // Make sure the cursor is updated correctly if the mouse does not move and window is under cursor
+ // by creating a fake move event, unless on 10.14 and later where doing so will trigger a security
+ // warning dialog. FIXME: Find a way to update the cursor without fake mouse events.
+ if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::MacOSMojave)
+ return;
+
+ if (m_updatingDrag)
+ return;
+
+ const QPoint mousePos(QCursor::pos());
+ CGEventRef moveEvent(CGEventCreateMouseEvent(
+ NULL, kCGEventMouseMoved,
+ CGPointMake(mousePos.x(), mousePos.y()),
+ kCGMouseButtonLeft // ignored
+ ));
+ CGEventPost(kCGHIDEventTap, moveEvent);
+ CFRelease(moveEvent);
+}
+
+- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
+{
+ return [self handleDrag : sender];
+}
+
+- (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender
+{
+ m_updatingDrag = true;
+ const NSDragOperation ret([self handleDrag : sender]);
+ m_updatingDrag = false;
+
+ return ret;
+}
+
+// Sends drag update to Qt, return the action
+- (NSDragOperation)handleDrag:(id <NSDraggingInfo>)sender
+{
+ if (!m_platformWindow)
+ return NSDragOperationNone;
+
+ NSPoint windowPoint = [self convertPoint: [sender draggingLocation] fromView: nil];
+ QPoint qt_windowPoint(windowPoint.x, windowPoint.y);
+ Qt::DropActions qtAllowed = qt_mac_mapNSDragOperations([sender draggingSourceOperationMask]);
+
+ QWindow *target = findEventTargetWindow(m_platformWindow->window());
+ if (!target)
+ return NSDragOperationNone;
+
+ const auto modifiers = [QNSView convertKeyModifiers:NSApp.currentEvent.modifierFlags];
+ const auto buttons = currentlyPressedMouseButtons();
+ const auto point = mapWindowCoordinates(m_platformWindow->window(), target, qt_windowPoint);
+
+ QPlatformDragQtResponse response(false, Qt::IgnoreAction, QRect());
+ QCocoaDrag* nativeDrag = QCocoaIntegration::instance()->drag();
+ if (nativeDrag->currentDrag()) {
+ // The drag was started from within the application
+ response = QWindowSystemInterface::handleDrag(target, nativeDrag->dragMimeData(),
+ point, qtAllowed, buttons, modifiers);
+ [self updateCursorFromDragResponse:response drag:nativeDrag];
+ } else {
+ QCocoaDropData mimeData([sender draggingPasteboard]);
+ response = QWindowSystemInterface::handleDrag(target, &mimeData,
+ point, qtAllowed, buttons, modifiers);
+ }
+
+ return qt_mac_mapDropAction(response.acceptedAction());
+}
+
+- (void)draggingExited:(id <NSDraggingInfo>)sender
+{
+ if (!m_platformWindow)
+ return;
+
+ QWindow *target = findEventTargetWindow(m_platformWindow->window());
+ if (!target)
+ return;
+
+ NSPoint windowPoint = [self convertPoint: [sender draggingLocation] fromView: nil];
+ QPoint qt_windowPoint(windowPoint.x, windowPoint.y);
+
+ // Send 0 mime data to indicate drag exit
+ QWindowSystemInterface::handleDrag(target, nullptr,
+ mapWindowCoordinates(m_platformWindow->window(), target, qt_windowPoint),
+ Qt::IgnoreAction, Qt::NoButton, Qt::NoModifier);
+}
+
+// called on drop, send the drop to Qt and return if it was accepted.
+- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
+{
+ if (!m_platformWindow)
+ return false;
+
+ QWindow *target = findEventTargetWindow(m_platformWindow->window());
+ if (!target)
+ return false;
+
+ NSPoint windowPoint = [self convertPoint: [sender draggingLocation] fromView: nil];
+ QPoint qt_windowPoint(windowPoint.x, windowPoint.y);
+ Qt::DropActions qtAllowed = qt_mac_mapNSDragOperations([sender draggingSourceOperationMask]);
+
+ QPlatformDropQtResponse response(false, Qt::IgnoreAction);
+ QCocoaDrag* nativeDrag = QCocoaIntegration::instance()->drag();
+ const auto modifiers = [QNSView convertKeyModifiers:NSApp.currentEvent.modifierFlags];
+ const auto buttons = currentlyPressedMouseButtons();
+ const auto point = mapWindowCoordinates(m_platformWindow->window(), target, qt_windowPoint);
+
+ if (nativeDrag->currentDrag()) {
+ // The drag was started from within the application
+ response = QWindowSystemInterface::handleDrop(target, nativeDrag->dragMimeData(),
+ point, qtAllowed, buttons, modifiers);
+ } else {
+ QCocoaDropData mimeData([sender draggingPasteboard]);
+ response = QWindowSystemInterface::handleDrop(target, &mimeData,
+ point, qtAllowed, buttons, modifiers);
+ }
+ return response.isAccepted();
+}
+
+- (void)draggingSession:(NSDraggingSession *)session
+ endedAtPoint:(NSPoint)screenPoint
+ operation:(NSDragOperation)operation
+{
+ Q_UNUSED(session);
+ Q_UNUSED(screenPoint);
+
+ if (!m_platformWindow)
+ return;
+
+ QWindow *target = findEventTargetWindow(m_platformWindow->window());
+ if (!target)
+ return;
+
+ QCocoaDrag* nativeDrag = QCocoaIntegration::instance()->drag();
+ nativeDrag->setAcceptedAction(qt_mac_mapNSDragOperation(operation));
+
+ m_buttons = currentlyPressedMouseButtons();
+}
+
+@end
diff --git a/src/plugins/platforms/cocoa/qnsview_drawing.mm b/src/plugins/platforms/cocoa/qnsview_drawing.mm
new file mode 100644
index 0000000000..8ebe27f0c2
--- /dev/null
+++ b/src/plugins/platforms/cocoa/qnsview_drawing.mm
@@ -0,0 +1,195 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// This file is included from qnsview.mm, and only used to organize the code
+
+@implementation QT_MANGLE_NAMESPACE(QNSView) (DrawingAPI)
+
+#ifndef QT_NO_OPENGL
+- (void)setQCocoaGLContext:(QCocoaGLContext *)context
+{
+ m_glContext = context;
+ [m_glContext->nsOpenGLContext() setView:self];
+ if (![m_glContext->nsOpenGLContext() view]) {
+ //was unable to set view
+ m_shouldSetGLContextinDrawRect = true;
+ }
+}
+#endif
+
+@end
+
+@implementation QT_MANGLE_NAMESPACE(QNSView) (Drawing)
+
+- (BOOL)isOpaque
+{
+ if (!m_platformWindow)
+ return true;
+ return m_platformWindow->isOpaque();
+}
+
+- (BOOL)isFlipped
+{
+ return YES;
+}
+
+- (void)drawRect:(NSRect)dirtyRect
+{
+ Q_UNUSED(dirtyRect);
+
+ if (!m_platformWindow)
+ return;
+
+ QRegion exposedRegion;
+ const NSRect *dirtyRects;
+ NSInteger numDirtyRects;
+ [self getRectsBeingDrawn:&dirtyRects count:&numDirtyRects];
+ for (int i = 0; i < numDirtyRects; ++i)
+ exposedRegion += QRectF::fromCGRect(dirtyRects[i]).toRect();
+
+ qCDebug(lcQpaDrawing) << "[QNSView drawRect:]" << m_platformWindow->window() << exposedRegion;
+ [self updateRegion:exposedRegion];
+}
+
+- (void)updateRegion:(QRegion)dirtyRegion
+{
+#ifndef QT_NO_OPENGL
+ if (m_glContext && m_shouldSetGLContextinDrawRect) {
+ [m_glContext->nsOpenGLContext() setView:self];
+ m_shouldSetGLContextinDrawRect = false;
+ }
+#endif
+
+ m_platformWindow->handleExposeEvent(dirtyRegion);
+}
+
+- (BOOL)shouldUseMetalLayer
+{
+ // MetalSurface needs a layer, and so does VulkanSurface (via MoltenVK)
+ QSurface::SurfaceType surfaceType = m_platformWindow->window()->surfaceType();
+ return surfaceType == QWindow::MetalSurface || surfaceType == QWindow::VulkanSurface;
+}
+
+- (BOOL)wantsLayerHelper
+{
+ Q_ASSERT(m_platformWindow);
+
+ bool wantsLayer = qt_mac_resolveOption(true, m_platformWindow->window(),
+ "_q_mac_wantsLayer", "QT_MAC_WANTS_LAYER");
+
+ bool layerForSurfaceType = [self shouldUseMetalLayer];
+
+ return wantsLayer || layerForSurfaceType;
+}
+
+- (CALayer *)makeBackingLayer
+{
+ if ([self shouldUseMetalLayer]) {
+ // Check if Metal is supported. If it isn't then it's most likely
+ // too late at this point and the QWindow will be non-functional,
+ // but we can at least print a warning.
+ if (![MTLCreateSystemDefaultDevice() autorelease]) {
+ qWarning() << "QWindow initialization error: Metal is not supported";
+ return [super makeBackingLayer];
+ }
+
+ CAMetalLayer *layer = [CAMetalLayer layer];
+
+ // Set the contentsScale for the layer. This is normally done in
+ // viewDidChangeBackingProperties, however on startup that function
+ // is called before the layer is created here. The layer's drawableSize
+ // is updated from layoutSublayersOfLayer as usual.
+ layer.contentsScale = self.window.backingScaleFactor;
+
+ return layer;
+ }
+
+ return [super makeBackingLayer];
+}
+
+- (NSViewLayerContentsRedrawPolicy)layerContentsRedrawPolicy
+{
+ // We need to set this explicitly since the super implementation
+ // returns LayerContentsRedrawNever for custom layers like CAMetalLayer.
+ return NSViewLayerContentsRedrawDuringViewResize;
+}
+
+- (void)updateMetalLayerDrawableSize:(CAMetalLayer *)layer
+{
+ CGSize drawableSize = layer.bounds.size;
+ drawableSize.width *= layer.contentsScale;
+ drawableSize.height *= layer.contentsScale;
+ layer.drawableSize = drawableSize;
+}
+
+- (void)layoutSublayersOfLayer:(CALayer *)layer
+{
+ if ([layer isKindOfClass:CAMetalLayer.class])
+ [self updateMetalLayerDrawableSize:static_cast<CAMetalLayer* >(layer)];
+}
+
+- (void)displayLayer:(CALayer *)layer
+{
+ Q_ASSERT(layer == self.layer);
+
+ if (!m_platformWindow)
+ return;
+
+ qCDebug(lcQpaDrawing) << "[QNSView displayLayer]" << m_platformWindow->window();
+
+ // FIXME: Find out if there's a way to resolve the dirty rect like in drawRect:
+ [self updateRegion:QRectF::fromCGRect(self.bounds).toRect()];
+}
+
+- (void)viewDidChangeBackingProperties
+{
+ CALayer *layer = self.layer;
+ if (!layer)
+ return;
+
+ layer.contentsScale = self.window.backingScaleFactor;
+
+ // Metal layers must be manually updated on e.g. screen change
+ if ([layer isKindOfClass:CAMetalLayer.class]) {
+ [self updateMetalLayerDrawableSize:static_cast<CAMetalLayer* >(layer)];
+ [self setNeedsDisplay:YES];
+ }
+}
+
+@end
diff --git a/src/plugins/platforms/cocoa/qnsview_gestures.mm b/src/plugins/platforms/cocoa/qnsview_gestures.mm
new file mode 100644
index 0000000000..61d551ee0e
--- /dev/null
+++ b/src/plugins/platforms/cocoa/qnsview_gestures.mm
@@ -0,0 +1,169 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// This file is included from qnsview.mm, and only used to organize the code
+
+#ifndef QT_NO_GESTURES
+
+Q_LOGGING_CATEGORY(lcQpaGestures, "qt.qpa.input.gestures")
+
+@implementation QT_MANGLE_NAMESPACE(QNSView) (Gestures)
+
+- (bool)handleGestureAsBeginEnd:(NSEvent *)event
+{
+ if (QOperatingSystemVersion::current() < QOperatingSystemVersion::OSXElCapitan)
+ return false;
+
+ if ([event phase] == NSEventPhaseBegan) {
+ [self beginGestureWithEvent:event];
+ return true;
+ }
+
+ if ([event phase] == NSEventPhaseEnded) {
+ [self endGestureWithEvent:event];
+ return true;
+ }
+
+ return false;
+}
+- (void)magnifyWithEvent:(NSEvent *)event
+{
+ if (!m_platformWindow)
+ return;
+
+ if ([self handleGestureAsBeginEnd:event])
+ return;
+
+ qCDebug(lcQpaGestures) << "magnifyWithEvent" << [event magnification] << "from device" << hex << [event deviceID];
+ const NSTimeInterval timestamp = [event timestamp];
+ QPointF windowPoint;
+ QPointF screenPoint;
+ [self convertFromScreen:[self screenMousePoint:event] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
+ QWindowSystemInterface::handleGestureEventWithRealValue(m_platformWindow->window(), QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), timestamp, Qt::ZoomNativeGesture,
+ [event magnification], windowPoint, screenPoint);
+}
+
+- (void)smartMagnifyWithEvent:(NSEvent *)event
+{
+ if (!m_platformWindow)
+ return;
+
+ static bool zoomIn = true;
+ qCDebug(lcQpaGestures) << "smartMagnifyWithEvent" << zoomIn << "from device" << hex << [event deviceID];
+ const NSTimeInterval timestamp = [event timestamp];
+ QPointF windowPoint;
+ QPointF screenPoint;
+ [self convertFromScreen:[self screenMousePoint:event] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
+ QWindowSystemInterface::handleGestureEventWithRealValue(m_platformWindow->window(), QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), timestamp, Qt::SmartZoomNativeGesture,
+ zoomIn ? 1.0f : 0.0f, windowPoint, screenPoint);
+ zoomIn = !zoomIn;
+}
+
+- (void)rotateWithEvent:(NSEvent *)event
+{
+ if (!m_platformWindow)
+ return;
+
+ if ([self handleGestureAsBeginEnd:event])
+ return;
+
+ const NSTimeInterval timestamp = [event timestamp];
+ QPointF windowPoint;
+ QPointF screenPoint;
+ [self convertFromScreen:[self screenMousePoint:event] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
+ QWindowSystemInterface::handleGestureEventWithRealValue(m_platformWindow->window(), QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), timestamp, Qt::RotateNativeGesture,
+ -[event rotation], windowPoint, screenPoint);
+}
+
+- (void)swipeWithEvent:(NSEvent *)event
+{
+ if (!m_platformWindow)
+ return;
+
+ qCDebug(lcQpaGestures) << "swipeWithEvent" << [event deltaX] << [event deltaY] << "from device" << hex << [event deviceID];
+ const NSTimeInterval timestamp = [event timestamp];
+ QPointF windowPoint;
+ QPointF screenPoint;
+ [self convertFromScreen:[self screenMousePoint:event] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
+
+ qreal angle = 0.0f;
+ if ([event deltaX] == 1)
+ angle = 180.0f;
+ else if ([event deltaX] == -1)
+ angle = 0.0f;
+ else if ([event deltaY] == 1)
+ angle = 90.0f;
+ else if ([event deltaY] == -1)
+ angle = 270.0f;
+
+ QWindowSystemInterface::handleGestureEventWithRealValue(m_platformWindow->window(), QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), timestamp, Qt::SwipeNativeGesture,
+ angle, windowPoint, screenPoint);
+}
+
+- (void)beginGestureWithEvent:(NSEvent *)event
+{
+ if (!m_platformWindow)
+ return;
+
+ const NSTimeInterval timestamp = [event timestamp];
+ QPointF windowPoint;
+ QPointF screenPoint;
+ [self convertFromScreen:[self screenMousePoint:event] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
+ qCDebug(lcQpaGestures) << "beginGestureWithEvent @" << windowPoint << "from device" << hex << [event deviceID];
+ QWindowSystemInterface::handleGestureEvent(m_platformWindow->window(), QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), timestamp, Qt::BeginNativeGesture,
+ windowPoint, screenPoint);
+}
+
+- (void)endGestureWithEvent:(NSEvent *)event
+{
+ if (!m_platformWindow)
+ return;
+
+ qCDebug(lcQpaGestures) << "endGestureWithEvent" << "from device" << hex << [event deviceID];
+ const NSTimeInterval timestamp = [event timestamp];
+ QPointF windowPoint;
+ QPointF screenPoint;
+ [self convertFromScreen:[self screenMousePoint:event] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
+ QWindowSystemInterface::handleGestureEvent(m_platformWindow->window(), QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), timestamp, Qt::EndNativeGesture,
+ windowPoint, screenPoint);
+}
+
+@end
+
+#endif // QT_NO_GESTURES
diff --git a/src/plugins/platforms/cocoa/qnsview_keys.mm b/src/plugins/platforms/cocoa/qnsview_keys.mm
new file mode 100644
index 0000000000..57ce6a009f
--- /dev/null
+++ b/src/plugins/platforms/cocoa/qnsview_keys.mm
@@ -0,0 +1,262 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// This file is included from qnsview.mm, and only used to organize the code
+
+@implementation QT_MANGLE_NAMESPACE(QNSView) (KeysAPI)
+
++ (Qt::KeyboardModifiers)convertKeyModifiers:(ulong)modifierFlags
+{
+ const bool dontSwapCtrlAndMeta = qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta);
+ Qt::KeyboardModifiers qtMods =Qt::NoModifier;
+ if (modifierFlags & NSShiftKeyMask)
+ qtMods |= Qt::ShiftModifier;
+ if (modifierFlags & NSControlKeyMask)
+ qtMods |= dontSwapCtrlAndMeta ? Qt::ControlModifier : Qt::MetaModifier;
+ if (modifierFlags & NSAlternateKeyMask)
+ qtMods |= Qt::AltModifier;
+ if (modifierFlags & NSCommandKeyMask)
+ qtMods |= dontSwapCtrlAndMeta ? Qt::MetaModifier : Qt::ControlModifier;
+ if (modifierFlags & NSNumericPadKeyMask)
+ qtMods |= Qt::KeypadModifier;
+ return qtMods;
+}
+
+@end
+
+@implementation QT_MANGLE_NAMESPACE(QNSView) (Keys)
+
+- (int)convertKeyCode:(QChar)keyChar
+{
+ return qt_mac_cocoaKey2QtKey(keyChar);
+}
+
+- (bool)handleKeyEvent:(NSEvent *)nsevent eventType:(int)eventType
+{
+ ulong timestamp = [nsevent timestamp] * 1000;
+ ulong nativeModifiers = [nsevent modifierFlags];
+ Qt::KeyboardModifiers modifiers = [QNSView convertKeyModifiers: nativeModifiers];
+ NSString *charactersIgnoringModifiers = [nsevent charactersIgnoringModifiers];
+ NSString *characters = [nsevent characters];
+ if (m_inputSource != characters) {
+ [m_inputSource release];
+ m_inputSource = [characters retain];
+ }
+
+ // There is no way to get the scan code from carbon/cocoa. But we cannot
+ // use the value 0, since it indicates that the event originates from somewhere
+ // else than the keyboard.
+ quint32 nativeScanCode = 1;
+ quint32 nativeVirtualKey = [nsevent keyCode];
+
+ QChar ch = QChar::ReplacementCharacter;
+ int keyCode = Qt::Key_unknown;
+
+ // If a dead key occurs as a result of pressing a key combination then
+ // characters will have 0 length, but charactersIgnoringModifiers will
+ // have a valid character in it. This enables key combinations such as
+ // ALT+E to be used as a shortcut with an English keyboard even though
+ // pressing ALT+E will give a dead key while doing normal text input.
+ if ([characters length] != 0 || [charactersIgnoringModifiers length] != 0) {
+ auto ctrlOrMetaModifier = qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta) ? Qt::ControlModifier : Qt::MetaModifier;
+ if (((modifiers & ctrlOrMetaModifier) || (modifiers & Qt::AltModifier)) && ([charactersIgnoringModifiers length] != 0))
+ ch = QChar([charactersIgnoringModifiers characterAtIndex:0]);
+ else if ([characters length] != 0)
+ ch = QChar([characters characterAtIndex:0]);
+ keyCode = [self convertKeyCode:ch];
+ }
+
+ // we will send a key event unless the input method sets m_sendKeyEvent to false
+ m_sendKeyEvent = true;
+ QString text;
+ // ignore text for the U+F700-U+F8FF range. This is used by Cocoa when
+ // delivering function keys (e.g. arrow keys, backspace, F1-F35, etc.)
+ if (!(modifiers & (Qt::ControlModifier | Qt::MetaModifier)) && (ch.unicode() < 0xf700 || ch.unicode() > 0xf8ff))
+ text = QString::fromNSString(characters);
+
+ QWindow *window = [self topLevelWindow];
+
+ // Popups implicitly grab key events; forward to the active popup if there is one.
+ // This allows popups to e.g. intercept shortcuts and close the popup in response.
+ if (QCocoaWindow *popup = QCocoaIntegration::instance()->activePopupWindow()) {
+ if (!popup->window()->flags().testFlag(Qt::ToolTip))
+ window = popup->window();
+ }
+
+ if (eventType == QEvent::KeyPress) {
+
+ if (m_composingText.isEmpty()) {
+ m_sendKeyEvent = !QWindowSystemInterface::handleShortcutEvent(window, timestamp, keyCode,
+ modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers, text, [nsevent isARepeat], 1);
+
+ // Handling a shortcut may result in closing the window
+ if (!m_platformWindow)
+ return true;
+ }
+
+ QObject *fo = m_platformWindow->window()->focusObject();
+ if (m_sendKeyEvent && fo) {
+ QInputMethodQueryEvent queryEvent(Qt::ImEnabled | Qt::ImHints);
+ if (QCoreApplication::sendEvent(fo, &queryEvent)) {
+ bool imEnabled = queryEvent.value(Qt::ImEnabled).toBool();
+ Qt::InputMethodHints hints = static_cast<Qt::InputMethodHints>(queryEvent.value(Qt::ImHints).toUInt());
+ if (imEnabled && !(hints & Qt::ImhDigitsOnly || hints & Qt::ImhFormattedNumbersOnly || hints & Qt::ImhHiddenText)) {
+ // pass the key event to the input method. note that m_sendKeyEvent may be set to false during this call
+ m_currentlyInterpretedKeyEvent = nsevent;
+ [self interpretKeyEvents:@[nsevent]];
+ m_currentlyInterpretedKeyEvent = 0;
+ }
+ }
+ }
+ if (m_resendKeyEvent)
+ m_sendKeyEvent = true;
+ }
+
+ bool accepted = true;
+ if (m_sendKeyEvent && m_composingText.isEmpty()) {
+ QWindowSystemInterface::handleExtendedKeyEvent(window, timestamp, QEvent::Type(eventType), keyCode, modifiers,
+ nativeScanCode, nativeVirtualKey, nativeModifiers, text, [nsevent isARepeat], 1, false);
+ accepted = QWindowSystemInterface::flushWindowSystemEvents();
+ }
+ m_sendKeyEvent = false;
+ m_resendKeyEvent = false;
+ return accepted;
+}
+
+- (void)keyDown:(NSEvent *)nsevent
+{
+ if ([self isTransparentForUserInput])
+ return [super keyDown:nsevent];
+
+ const bool accepted = [self handleKeyEvent:nsevent eventType:int(QEvent::KeyPress)];
+
+ // When Qt is used to implement a plugin for a native application we
+ // want to propagate unhandled events to other native views. However,
+ // Qt does not always set the accepted state correctly (in particular
+ // for return key events), so do this for plugin applications only
+ // to prevent incorrect forwarding in the general case.
+ const bool shouldPropagate = QCoreApplication::testAttribute(Qt::AA_PluginApplication) && !accepted;
+
+ // Track keyDown acceptance/forward state for later acceptance of the keyUp.
+ if (!shouldPropagate)
+ m_acceptedKeyDowns.insert([nsevent keyCode]);
+
+ if (shouldPropagate)
+ [super keyDown:nsevent];
+}
+
+- (void)keyUp:(NSEvent *)nsevent
+{
+ if ([self isTransparentForUserInput])
+ return [super keyUp:nsevent];
+
+ const bool keyUpAccepted = [self handleKeyEvent:nsevent eventType:int(QEvent::KeyRelease)];
+
+ // Propagate the keyUp if neither Qt accepted it nor the corresponding KeyDown was
+ // accepted. Qt text controls wil often not use and ignore keyUp events, but we
+ // want to avoid propagating unmatched keyUps.
+ const bool keyDownAccepted = m_acceptedKeyDowns.remove([nsevent keyCode]);
+ if (!keyUpAccepted && !keyDownAccepted)
+ [super keyUp:nsevent];
+}
+
+- (void)cancelOperation:(id)sender
+{
+ Q_UNUSED(sender);
+
+ NSEvent *currentEvent = [NSApp currentEvent];
+ if (!currentEvent || currentEvent.type != NSKeyDown)
+ return;
+
+ // Handling the key event may recurse back here through interpretKeyEvents
+ // (when IM is enabled), so we need to guard against that.
+ if (currentEvent == m_currentlyInterpretedKeyEvent)
+ return;
+
+ // Send Command+Key_Period and Escape as normal keypresses so that
+ // the key sequence is delivered through Qt. That way clients can
+ // intercept the shortcut and override its effect.
+ [self handleKeyEvent:currentEvent eventType:int(QEvent::KeyPress)];
+}
+
+- (void)flagsChanged:(NSEvent *)nsevent
+{
+ ulong timestamp = [nsevent timestamp] * 1000;
+ ulong modifiers = [nsevent modifierFlags];
+ Qt::KeyboardModifiers qmodifiers = [QNSView convertKeyModifiers:modifiers];
+
+ // calculate the delta and remember the current modifiers for next time
+ static ulong m_lastKnownModifiers;
+ ulong lastKnownModifiers = m_lastKnownModifiers;
+ ulong delta = lastKnownModifiers ^ modifiers;
+ m_lastKnownModifiers = modifiers;
+
+ struct qt_mac_enum_mapper
+ {
+ ulong mac_mask;
+ Qt::Key qt_code;
+ };
+ static qt_mac_enum_mapper modifier_key_symbols[] = {
+ { NSShiftKeyMask, Qt::Key_Shift },
+ { NSControlKeyMask, Qt::Key_Meta },
+ { NSCommandKeyMask, Qt::Key_Control },
+ { NSAlternateKeyMask, Qt::Key_Alt },
+ { NSAlphaShiftKeyMask, Qt::Key_CapsLock },
+ { 0ul, Qt::Key_unknown } };
+ for (int i = 0; modifier_key_symbols[i].mac_mask != 0u; ++i) {
+ uint mac_mask = modifier_key_symbols[i].mac_mask;
+ if ((delta & mac_mask) == 0u)
+ continue;
+
+ Qt::Key qtCode = modifier_key_symbols[i].qt_code;
+ if (qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta)) {
+ if (qtCode == Qt::Key_Meta)
+ qtCode = Qt::Key_Control;
+ else if (qtCode == Qt::Key_Control)
+ qtCode = Qt::Key_Meta;
+ }
+ QWindowSystemInterface::handleKeyEvent(m_platformWindow->window(),
+ timestamp,
+ (lastKnownModifiers & mac_mask) ? QEvent::KeyRelease : QEvent::KeyPress,
+ qtCode,
+ qmodifiers ^ [QNSView convertKeyModifiers:mac_mask]);
+ }
+}
+
+@end
diff --git a/src/plugins/platforms/cocoa/qnsview_menus.mm b/src/plugins/platforms/cocoa/qnsview_menus.mm
new file mode 100644
index 0000000000..f0489552aa
--- /dev/null
+++ b/src/plugins/platforms/cocoa/qnsview_menus.mm
@@ -0,0 +1,133 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// This file is included from qnsview.mm, and only used to organize the code
+
+#include <qcocoaapplicationdelegate.h>
+#include <qcocoansmenu.h>
+#include <qcocoamenuitem.h>
+#include <qcocoamenu.h>
+#include <qcocoamenubar.h>
+
+static bool selectorIsCutCopyPaste(SEL selector)
+{
+ return (selector == @selector(cut:)
+ || selector == @selector(copy:)
+ || selector == @selector(paste:)
+ || selector == @selector(selectAll:));
+}
+
+@interface QT_MANGLE_NAMESPACE(QNSView) (Menus)
+- (void)qt_itemFired:(QCocoaNSMenuItem *)item;
+@end
+
+@implementation QT_MANGLE_NAMESPACE(QNSView) (Menus)
+
+- (BOOL)validateMenuItem:(NSMenuItem*)item
+{
+ auto *nativeItem = qt_objc_cast<QCocoaNSMenuItem *>(item);
+ if (!nativeItem)
+ return item.enabled; // FIXME Test with with Qt as plugin or embedded QWindow.
+
+ auto *platformItem = nativeItem.platformMenuItem;
+ if (!platformItem)
+ return NO;
+
+ // Menu-holding items are always enabled, as it's conventional in Cocoa
+ if (platformItem->menu())
+ return YES;
+
+ // Check if a modal dialog is active. Validate only menu
+ // items belonging to this view's window own menu bar.
+ if (QGuiApplication::modalWindow()) {
+ QCocoaMenuBar *menubar = nullptr;
+
+ QObject *menuParent = platformItem->menuParent();
+ while (menuParent && !(menubar = qobject_cast<QCocoaMenuBar *>(menuParent))) {
+ auto *menuObject = dynamic_cast<QCocoaMenuObject *>(menuParent);
+ menuParent = menuObject->menuParent();
+ }
+
+ if (menubar && menubar->cocoaWindow() != self.platformWindow)
+ return NO;
+ }
+
+ return platformItem->isEnabled();
+}
+
+- (BOOL)respondsToSelector:(SEL)selector
+{
+ // Not exactly true. Both copy: and selectAll: can work on non key views.
+ if (selectorIsCutCopyPaste(selector))
+ return ([NSApp keyWindow] == self.window) && (self.window.firstResponder == self);
+
+ return [super respondsToSelector:selector];
+}
+
+- (void)qt_itemFired:(QCocoaNSMenuItem *)item
+{
+ auto *appDelegate = [QCocoaApplicationDelegate sharedDelegate];
+ [appDelegate qt_itemFired:item];
+}
+
+- (NSMethodSignature *)methodSignatureForSelector:(SEL)selector
+{
+ if (selectorIsCutCopyPaste(selector)) {
+ NSMethodSignature *itemFiredSign = [super methodSignatureForSelector:@selector(qt_itemFired:)];
+ return itemFiredSign;
+ }
+
+ return [super methodSignatureForSelector:selector];
+}
+
+- (void)forwardInvocation:(NSInvocation *)invocation
+{
+ if (selectorIsCutCopyPaste(invocation.selector)) {
+ NSObject *sender;
+ [invocation getArgument:&sender atIndex:2];
+ if (auto *nativeItem = qt_objc_cast<QCocoaNSMenuItem *>(sender)) {
+ [self qt_itemFired:nativeItem];
+ return;
+ }
+ }
+
+ [super forwardInvocation:invocation];
+}
+
+@end
diff --git a/src/plugins/platforms/cocoa/qnsview_mouse.mm b/src/plugins/platforms/cocoa/qnsview_mouse.mm
new file mode 100644
index 0000000000..1de256825a
--- /dev/null
+++ b/src/plugins/platforms/cocoa/qnsview_mouse.mm
@@ -0,0 +1,607 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// This file is included from qnsview.mm, and only used to organize the code
+
+@implementation QT_MANGLE_NAMESPACE(QNSViewMouseMoveHelper) {
+ QNSView *view;
+}
+
+- (instancetype)initWithView:(QNSView *)theView
+{
+ if ((self = [super init]))
+ view = theView;
+
+ return self;
+}
+
+- (void)mouseMoved:(NSEvent *)theEvent
+{
+ [view mouseMovedImpl:theEvent];
+}
+
+- (void)mouseEntered:(NSEvent *)theEvent
+{
+ [view mouseEnteredImpl:theEvent];
+}
+
+- (void)mouseExited:(NSEvent *)theEvent
+{
+ [view mouseExitedImpl:theEvent];
+}
+
+- (void)cursorUpdate:(NSEvent *)theEvent
+{
+ [view cursorUpdate:theEvent];
+}
+
+@end
+
+@implementation QT_MANGLE_NAMESPACE(QNSView) (MouseAPI)
+
+- (void)resetMouseButtons
+{
+ m_buttons = Qt::NoButton;
+ m_frameStrutButtons = Qt::NoButton;
+}
+
+- (void)handleFrameStrutMouseEvent:(NSEvent *)theEvent
+{
+ if (!m_platformWindow)
+ return;
+
+ // get m_buttons in sync
+ // Don't send frme strut events if we are in the middle of a mouse drag.
+ if (m_buttons != Qt::NoButton)
+ return;
+
+ NSEventType ty = [theEvent type];
+ switch (ty) {
+ case NSLeftMouseDown:
+ m_frameStrutButtons |= Qt::LeftButton;
+ break;
+ case NSLeftMouseUp:
+ m_frameStrutButtons &= ~Qt::LeftButton;
+ break;
+ case NSRightMouseDown:
+ m_frameStrutButtons |= Qt::RightButton;
+ break;
+ case NSLeftMouseDragged:
+ m_frameStrutButtons |= Qt::LeftButton;
+ break;
+ case NSRightMouseDragged:
+ m_frameStrutButtons |= Qt::RightButton;
+ break;
+ case NSRightMouseUp:
+ m_frameStrutButtons &= ~Qt::RightButton;
+ break;
+ case NSOtherMouseDown:
+ m_frameStrutButtons |= cocoaButton2QtButton([theEvent buttonNumber]);
+ break;
+ case NSOtherMouseUp:
+ m_frameStrutButtons &= ~cocoaButton2QtButton([theEvent buttonNumber]);
+ default:
+ break;
+ }
+
+ NSWindow *window = [self window];
+ NSPoint windowPoint = [theEvent locationInWindow];
+
+ int windowScreenY = [window frame].origin.y + [window frame].size.height;
+ NSPoint windowCoord = [self convertPoint:[self frame].origin toView:nil];
+ int viewScreenY = [window convertRectToScreen:NSMakeRect(windowCoord.x, windowCoord.y, 0, 0)].origin.y;
+ int titleBarHeight = windowScreenY - viewScreenY;
+
+ NSPoint nsViewPoint = [self convertPoint: windowPoint fromView: nil];
+ QPoint qtWindowPoint = QPoint(nsViewPoint.x, titleBarHeight + nsViewPoint.y);
+ NSPoint screenPoint = [window convertRectToScreen:NSMakeRect(windowPoint.x, windowPoint.y, 0, 0)].origin;
+ QPoint qtScreenPoint = QCocoaScreen::mapFromNative(screenPoint).toPoint();
+
+ ulong timestamp = [theEvent timestamp] * 1000;
+ QWindowSystemInterface::handleFrameStrutMouseEvent(m_platformWindow->window(), timestamp, qtWindowPoint, qtScreenPoint, m_frameStrutButtons);
+}
+@end
+
+@implementation QT_MANGLE_NAMESPACE(QNSView) (Mouse)
+
+- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
+{
+ Q_UNUSED(theEvent)
+ if (!m_platformWindow)
+ return NO;
+ if ([self isTransparentForUserInput])
+ return NO;
+ return YES;
+}
+
+- (NSPoint)screenMousePoint:(NSEvent *)theEvent
+{
+ NSPoint screenPoint;
+ if (theEvent) {
+ NSPoint windowPoint = [theEvent locationInWindow];
+ if (qIsNaN(windowPoint.x) || qIsNaN(windowPoint.y)) {
+ screenPoint = [NSEvent mouseLocation];
+ } else {
+ NSRect screenRect = [[theEvent window] convertRectToScreen:NSMakeRect(windowPoint.x, windowPoint.y, 1, 1)];
+ screenPoint = screenRect.origin;
+ }
+ } else {
+ screenPoint = [NSEvent mouseLocation];
+ }
+ return screenPoint;
+}
+
+- (void)handleMouseEvent:(NSEvent *)theEvent
+{
+ if (!m_platformWindow)
+ return;
+
+#ifndef QT_NO_TABLETEVENT
+ // Tablet events may come in via the mouse event handlers,
+ // check if this is a valid tablet event first.
+ if ([self handleTabletEvent: theEvent])
+ return;
+#endif
+
+ QPointF qtWindowPoint;
+ QPointF qtScreenPoint;
+ QNSView *targetView = self;
+ if (!targetView.platformWindow)
+ return;
+
+ // Popups implicitly grap mouse events; forward to the active popup if there is one
+ if (QCocoaWindow *popup = QCocoaIntegration::instance()->activePopupWindow()) {
+ // Tooltips must be transparent for mouse events
+ // The bug reference is QTBUG-46379
+ if (!popup->window()->flags().testFlag(Qt::ToolTip)) {
+ if (QNSView *popupView = qnsview_cast(popup->view()))
+ targetView = popupView;
+ }
+ }
+
+ [targetView convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint:&qtWindowPoint andScreenPoint:&qtScreenPoint];
+ ulong timestamp = [theEvent timestamp] * 1000;
+
+ QCocoaDrag* nativeDrag = QCocoaIntegration::instance()->drag();
+ nativeDrag->setLastMouseEvent(theEvent, self);
+
+ const auto modifiers = [QNSView convertKeyModifiers:theEvent.modifierFlags];
+ const auto buttons = currentlyPressedMouseButtons();
+ const auto button = cocoaButton2QtButton(theEvent);
+ const auto eventType = cocoaEvent2QtMouseEvent(theEvent);
+
+ QWindowSystemInterface::handleMouseEvent(targetView->m_platformWindow->window(),
+ timestamp, qtWindowPoint, qtScreenPoint,
+ buttons, button, eventType, modifiers);
+}
+
+- (bool)handleMouseDownEvent:(NSEvent *)theEvent
+{
+ if ([self isTransparentForUserInput])
+ return false;
+
+ const auto button = cocoaButton2QtButton(theEvent);
+
+ QPointF qtWindowPoint;
+ QPointF qtScreenPoint;
+ [self convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint:&qtWindowPoint andScreenPoint:&qtScreenPoint];
+ Q_UNUSED(qtScreenPoint);
+
+ // Maintain masked state for the button for use by MouseDragged and MouseUp.
+ QRegion mask = m_platformWindow->window()->mask();
+ const bool masked = !mask.isEmpty() && !mask.contains(qtWindowPoint.toPoint());
+ if (masked)
+ m_acceptedMouseDowns &= ~button;
+ else
+ m_acceptedMouseDowns |= button;
+
+ // Forward masked out events to the next responder
+ if (masked)
+ return false;
+
+ m_buttons |= button;
+
+ [self handleMouseEvent:theEvent];
+ return true;
+}
+
+- (bool)handleMouseDraggedEvent:(NSEvent *)theEvent
+{
+ if ([self isTransparentForUserInput])
+ return false;
+
+ const auto button = cocoaButton2QtButton(theEvent);
+
+ // Forward the event to the next responder if Qt did not accept the
+ // corresponding mouse down for this button
+ if (!(m_acceptedMouseDowns & button) == button)
+ return false;
+
+ [self handleMouseEvent:theEvent];
+ return true;
+}
+
+- (bool)handleMouseUpEvent:(NSEvent *)theEvent
+{
+ if ([self isTransparentForUserInput])
+ return false;
+
+ auto button = cocoaButton2QtButton(theEvent);
+
+ // Forward the event to the next responder if Qt did not accept the
+ // corresponding mouse down for this button
+ if (!(m_acceptedMouseDowns & button) == button)
+ return false;
+
+ if (m_sendUpAsRightButton && button == Qt::LeftButton)
+ button = Qt::RightButton;
+ if (button == Qt::RightButton)
+ m_sendUpAsRightButton = false;
+
+ m_buttons &= ~button;
+
+ [self handleMouseEvent:theEvent];
+ return true;
+}
+
+- (void)mouseDown:(NSEvent *)theEvent
+{
+ if ([self isTransparentForUserInput])
+ return [super mouseDown:theEvent];
+ m_sendUpAsRightButton = false;
+
+ // Handle any active poup windows; clicking outisde them should close them
+ // all. Don't do anything or clicks inside one of the menus, let Cocoa
+ // handle that case. Note that in practice many windows of the Qt::Popup type
+ // will actually close themselves in this case using logic implemented in
+ // that particular poup type (for example context menus). However, Qt expects
+ // that plain popup QWindows will also be closed, so we implement the logic
+ // here as well.
+ QList<QCocoaWindow *> *popups = QCocoaIntegration::instance()->popupWindowStack();
+ if (!popups->isEmpty()) {
+ // Check if the click is outside all popups.
+ bool inside = false;
+ QPointF qtScreenPoint = QCocoaScreen::mapFromNative([self screenMousePoint:theEvent]);
+ for (QList<QCocoaWindow *>::const_iterator it = popups->begin(); it != popups->end(); ++it) {
+ if ((*it)->geometry().contains(qtScreenPoint.toPoint())) {
+ inside = true;
+ break;
+ }
+ }
+ // Close the popups if the click was outside.
+ if (!inside) {
+ Qt::WindowType type = QCocoaIntegration::instance()->activePopupWindow()->window()->type();
+ while (QCocoaWindow *popup = QCocoaIntegration::instance()->popPopupWindow()) {
+ QWindowSystemInterface::handleCloseEvent(popup->window());
+ QWindowSystemInterface::flushWindowSystemEvents();
+ }
+ // Consume the mouse event when closing the popup, except for tool tips
+ // were it's expected that the event is processed normally.
+ if (type != Qt::ToolTip)
+ return;
+ }
+ }
+
+ QPointF qtWindowPoint;
+ QPointF qtScreenPoint;
+ [self convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint:&qtWindowPoint andScreenPoint:&qtScreenPoint];
+ Q_UNUSED(qtScreenPoint);
+
+ QRegion mask = m_platformWindow->window()->mask();
+ const bool masked = !mask.isEmpty() && !mask.contains(qtWindowPoint.toPoint());
+ // Maintain masked state for the button for use by MouseDragged and Up.
+ if (masked)
+ m_acceptedMouseDowns &= ~Qt::LeftButton;
+ else
+ m_acceptedMouseDowns |= Qt::LeftButton;
+
+ // Forward masked out events to the next responder
+ if (masked) {
+ [super mouseDown:theEvent];
+ return;
+ }
+
+ if ([self hasMarkedText]) {
+ [[NSTextInputContext currentInputContext] handleEvent:theEvent];
+ } else {
+ auto ctrlOrMetaModifier = qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta) ? Qt::ControlModifier : Qt::MetaModifier;
+ if (!m_dontOverrideCtrlLMB && [QNSView convertKeyModifiers:[theEvent modifierFlags]] & ctrlOrMetaModifier) {
+ m_buttons |= Qt::RightButton;
+ m_sendUpAsRightButton = true;
+ } else {
+ m_buttons |= Qt::LeftButton;
+ }
+ [self handleMouseEvent:theEvent];
+ }
+}
+
+- (void)mouseDragged:(NSEvent *)theEvent
+{
+ const bool accepted = [self handleMouseDraggedEvent:theEvent];
+ if (!accepted)
+ [super mouseDragged:theEvent];
+}
+
+- (void)mouseUp:(NSEvent *)theEvent
+{
+ const bool accepted = [self handleMouseUpEvent:theEvent];
+ if (!accepted)
+ [super mouseUp:theEvent];
+}
+
+- (void)rightMouseDown:(NSEvent *)theEvent
+{
+ const bool accepted = [self handleMouseDownEvent:theEvent];
+ if (!accepted)
+ [super rightMouseDown:theEvent];
+}
+
+- (void)rightMouseDragged:(NSEvent *)theEvent
+{
+ const bool accepted = [self handleMouseDraggedEvent:theEvent];
+ if (!accepted)
+ [super rightMouseDragged:theEvent];
+}
+
+- (void)rightMouseUp:(NSEvent *)theEvent
+{
+ const bool accepted = [self handleMouseUpEvent:theEvent];
+ if (!accepted)
+ [super rightMouseUp:theEvent];
+}
+
+- (void)otherMouseDown:(NSEvent *)theEvent
+{
+ const bool accepted = [self handleMouseDownEvent:theEvent];
+ if (!accepted)
+ [super otherMouseDown:theEvent];
+}
+
+- (void)otherMouseDragged:(NSEvent *)theEvent
+{
+ const bool accepted = [self handleMouseDraggedEvent:theEvent];
+ if (!accepted)
+ [super otherMouseDragged:theEvent];
+}
+
+- (void)otherMouseUp:(NSEvent *)theEvent
+{
+ const bool accepted = [self handleMouseUpEvent:theEvent];
+ if (!accepted)
+ [super otherMouseUp:theEvent];
+}
+
+- (void)updateTrackingAreas
+{
+ [super updateTrackingAreas];
+
+ QMacAutoReleasePool pool;
+
+ // NSTrackingInVisibleRect keeps care of updating once the tracking is set up, so bail out early
+ if (m_trackingArea && [[self trackingAreas] containsObject:m_trackingArea])
+ return;
+
+ // Ideally, we shouldn't have NSTrackingMouseMoved events included below, it should
+ // only be turned on if mouseTracking, hover is on or a tool tip is set.
+ // Unfortunately, Qt will send "tooltip" events on mouse moves, so we need to
+ // turn it on in ALL case. That means EVERY QWindow gets to pay the cost of
+ // mouse moves delivered to it (Apple recommends keeping it OFF because there
+ // is a performance hit). So it goes.
+ NSUInteger trackingOptions = NSTrackingMouseEnteredAndExited | NSTrackingActiveInActiveApp
+ | NSTrackingInVisibleRect | NSTrackingMouseMoved | NSTrackingCursorUpdate;
+ [m_trackingArea release];
+ m_trackingArea = [[NSTrackingArea alloc] initWithRect:[self frame]
+ options:trackingOptions
+ owner:m_mouseMoveHelper
+ userInfo:nil];
+ [self addTrackingArea:m_trackingArea];
+}
+
+- (void)cursorUpdate:(NSEvent *)theEvent
+{
+ qCDebug(lcQpaMouse) << "[QNSView cursorUpdate:]" << self.cursor;
+
+ // Note: We do not get this callback when moving from a subview that
+ // uses the legacy cursorRect API, so the cursor is reset to the arrow
+ // cursor. See rdar://34183708
+
+ if (self.cursor)
+ [self.cursor set];
+ else
+ [super cursorUpdate:theEvent];
+}
+
+- (void)mouseMovedImpl:(NSEvent *)theEvent
+{
+ if (!m_platformWindow)
+ return;
+
+ if ([self isTransparentForUserInput])
+ return;
+
+ QPointF windowPoint;
+ QPointF screenPoint;
+ [self convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
+ QWindow *childWindow = m_platformWindow->childWindowAt(windowPoint.toPoint());
+
+ // Top-level windows generate enter-leave events for sub-windows.
+ // Qt wants to know which window (if any) will be entered at the
+ // the time of the leave. This is dificult to accomplish by
+ // handling mouseEnter and mouseLeave envents, since they are sent
+ // individually to different views.
+ if (m_platformWindow->isContentView() && childWindow) {
+ if (childWindow != m_platformWindow->m_enterLeaveTargetWindow) {
+ QWindowSystemInterface::handleEnterLeaveEvent(childWindow, m_platformWindow->m_enterLeaveTargetWindow, windowPoint, screenPoint);
+ m_platformWindow->m_enterLeaveTargetWindow = childWindow;
+ }
+ }
+
+ // Cocoa keeps firing mouse move events for obscured parent views. Qt should not
+ // send those events so filter them out here.
+ if (childWindow != m_platformWindow->window())
+ return;
+
+ [self handleMouseEvent: theEvent];
+}
+
+- (void)mouseEnteredImpl:(NSEvent *)theEvent
+{
+ Q_UNUSED(theEvent)
+ if (!m_platformWindow)
+ return;
+
+ m_platformWindow->m_windowUnderMouse = true;
+
+ if ([self isTransparentForUserInput])
+ return;
+
+ // Top-level windows generate enter events for sub-windows.
+ if (!m_platformWindow->isContentView())
+ return;
+
+ QPointF windowPoint;
+ QPointF screenPoint;
+ [self convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
+ m_platformWindow->m_enterLeaveTargetWindow = m_platformWindow->childWindowAt(windowPoint.toPoint());
+ QWindowSystemInterface::handleEnterEvent(m_platformWindow->m_enterLeaveTargetWindow, windowPoint, screenPoint);
+}
+
+- (void)mouseExitedImpl:(NSEvent *)theEvent
+{
+ Q_UNUSED(theEvent);
+ if (!m_platformWindow)
+ return;
+
+ m_platformWindow->m_windowUnderMouse = false;
+
+ if ([self isTransparentForUserInput])
+ return;
+
+ // Top-level windows generate leave events for sub-windows.
+ if (!m_platformWindow->isContentView())
+ return;
+
+ QWindowSystemInterface::handleLeaveEvent(m_platformWindow->m_enterLeaveTargetWindow);
+ m_platformWindow->m_enterLeaveTargetWindow = 0;
+}
+
+#if QT_CONFIG(wheelevent)
+- (void)scrollWheel:(NSEvent *)theEvent
+{
+ if (!m_platformWindow)
+ return;
+
+ if ([self isTransparentForUserInput])
+ return [super scrollWheel:theEvent];
+
+ QPoint angleDelta;
+ Qt::MouseEventSource source = Qt::MouseEventNotSynthesized;
+ if ([theEvent hasPreciseScrollingDeltas]) {
+ // The mouse device contains pixel scroll wheel support (Mighty Mouse, Trackpad).
+ // Since deviceDelta is delivered as pixels rather than degrees, we need to
+ // convert from pixels to degrees in a sensible manner.
+ // It looks like 1/4 degrees per pixel behaves most native.
+ // (NB: Qt expects the unit for delta to be 8 per degree):
+ const int pixelsToDegrees = 2; // 8 * 1/4
+ angleDelta.setX([theEvent scrollingDeltaX] * pixelsToDegrees);
+ angleDelta.setY([theEvent scrollingDeltaY] * pixelsToDegrees);
+ source = Qt::MouseEventSynthesizedBySystem;
+ } else {
+ // Remove acceleration, and use either -120 or 120 as delta:
+ angleDelta.setX(qBound(-120, int([theEvent deltaX] * 10000), 120));
+ angleDelta.setY(qBound(-120, int([theEvent deltaY] * 10000), 120));
+ }
+
+ QPoint pixelDelta;
+ if ([theEvent hasPreciseScrollingDeltas]) {
+ pixelDelta.setX([theEvent scrollingDeltaX]);
+ pixelDelta.setY([theEvent scrollingDeltaY]);
+ } else {
+ // docs: "In the case of !hasPreciseScrollingDeltas, multiply the delta with the line width."
+ // scrollingDeltaX seems to return a minimum value of 0.1 in this case, map that to two pixels.
+ const CGFloat lineWithEstimate = 20.0;
+ pixelDelta.setX([theEvent scrollingDeltaX] * lineWithEstimate);
+ pixelDelta.setY([theEvent scrollingDeltaY] * lineWithEstimate);
+ }
+
+ QPointF qt_windowPoint;
+ QPointF qt_screenPoint;
+ [self convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint:&qt_windowPoint andScreenPoint:&qt_screenPoint];
+ NSTimeInterval timestamp = [theEvent timestamp];
+ ulong qt_timestamp = timestamp * 1000;
+
+ // Prevent keyboard modifier state from changing during scroll event streams.
+ // A two-finger trackpad flick generates a stream of scroll events. We want
+ // the keyboard modifier state to be the state at the beginning of the
+ // flick in order to avoid changing the interpretation of the events
+ // mid-stream. One example of this happening would be when pressing cmd
+ // after scrolling in Qt Creator: not taking the phase into account causes
+ // the end of the event stream to be interpreted as font size changes.
+ NSEventPhase momentumPhase = [theEvent momentumPhase];
+ if (momentumPhase == NSEventPhaseNone)
+ m_currentWheelModifiers = [QNSView convertKeyModifiers:[theEvent modifierFlags]];
+
+ NSEventPhase phase = [theEvent phase];
+ Qt::ScrollPhase ph = Qt::ScrollUpdate;
+
+ // MayBegin is likely to happen. We treat it the same as an actual begin.
+ if (phase == NSEventPhaseMayBegin) {
+ m_scrolling = true;
+ ph = Qt::ScrollBegin;
+ } else if (phase == NSEventPhaseBegan) {
+ // If MayBegin did not happen, Began is the actual beginning.
+ if (!m_scrolling)
+ ph = Qt::ScrollBegin;
+ m_scrolling = true;
+ } else if (phase == NSEventPhaseEnded || phase == NSEventPhaseCancelled ||
+ momentumPhase == NSEventPhaseEnded || momentumPhase == NSEventPhaseCancelled) {
+ ph = Qt::ScrollEnd;
+ m_scrolling = false;
+ } else if (phase == NSEventPhaseNone && momentumPhase == NSEventPhaseNone) {
+ ph = Qt::NoScrollPhase;
+ }
+ // "isInverted": natural OS X scrolling, inverted from the Qt/other platform/Jens perspective.
+ bool isInverted = [theEvent isDirectionInvertedFromDevice];
+
+ qCDebug(lcQpaMouse) << "scroll wheel @ window pos" << qt_windowPoint << "delta px" << pixelDelta << "angle" << angleDelta << "phase" << ph << (isInverted ? "inverted" : "");
+ QWindowSystemInterface::handleWheelEvent(m_platformWindow->window(), qt_timestamp, qt_windowPoint, qt_screenPoint, pixelDelta, angleDelta, m_currentWheelModifiers, ph, source, isInverted);
+}
+#endif // QT_CONFIG(wheelevent)
+
+@end
diff --git a/src/plugins/platforms/cocoa/qnsview_tablet.mm b/src/plugins/platforms/cocoa/qnsview_tablet.mm
new file mode 100644
index 0000000000..0b56123955
--- /dev/null
+++ b/src/plugins/platforms/cocoa/qnsview_tablet.mm
@@ -0,0 +1,223 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// This file is included from qnsview.mm, and only used to organize the code
+
+#ifndef QT_NO_TABLETEVENT
+
+Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
+
+struct QCocoaTabletDeviceData
+{
+ QTabletEvent::TabletDevice device;
+ QTabletEvent::PointerType pointerType;
+ uint capabilityMask;
+ qint64 uid;
+};
+
+typedef QHash<uint, QCocoaTabletDeviceData> QCocoaTabletDeviceDataHash;
+Q_GLOBAL_STATIC(QCocoaTabletDeviceDataHash, tabletDeviceDataHash)
+
+@implementation QT_MANGLE_NAMESPACE(QNSView) (Tablet)
+
+- (bool)handleTabletEvent:(NSEvent *)theEvent
+{
+ static bool ignoreButtonMapping = qEnvironmentVariableIsSet("QT_MAC_TABLET_IGNORE_BUTTON_MAPPING");
+
+ if (!m_platformWindow)
+ return false;
+
+ NSEventType eventType = [theEvent type];
+ if (eventType != NSTabletPoint && [theEvent subtype] != NSTabletPointEventSubtype)
+ return false; // Not a tablet event.
+
+ ulong timestamp = [theEvent timestamp] * 1000;
+
+ QPointF windowPoint;
+ QPointF screenPoint;
+ [self convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint: &windowPoint andScreenPoint: &screenPoint];
+
+ uint deviceId = [theEvent deviceID];
+ if (!tabletDeviceDataHash->contains(deviceId)) {
+ // Error: Unknown tablet device. Qt also gets into this state
+ // when running on a VM. This appears to be harmless; don't
+ // print a warning.
+ return false;
+ }
+ const QCocoaTabletDeviceData &deviceData = tabletDeviceDataHash->value(deviceId);
+
+ bool down = (eventType != NSMouseMoved);
+
+ qreal pressure;
+ if (down) {
+ pressure = [theEvent pressure];
+ } else {
+ pressure = 0.0;
+ }
+
+ NSPoint tilt = [theEvent tilt];
+ int xTilt = qRound(tilt.x * 60.0);
+ int yTilt = qRound(tilt.y * -60.0);
+ qreal tangentialPressure = 0;
+ qreal rotation = 0;
+ int z = 0;
+ if (deviceData.capabilityMask & 0x0200)
+ z = [theEvent absoluteZ];
+
+ if (deviceData.capabilityMask & 0x0800)
+ tangentialPressure = ([theEvent tangentialPressure] * 2.0) - 1.0;
+
+ rotation = 360.0 - [theEvent rotation];
+ if (rotation > 180.0)
+ rotation -= 360.0;
+
+ Qt::KeyboardModifiers keyboardModifiers = [QNSView convertKeyModifiers:[theEvent modifierFlags]];
+ Qt::MouseButtons buttons = ignoreButtonMapping ? static_cast<Qt::MouseButtons>(static_cast<uint>([theEvent buttonMask])) : m_buttons;
+
+ qCDebug(lcQpaTablet, "event on tablet %d with tool %d type %d unique ID %lld pos %6.1f, %6.1f root pos %6.1f, %6.1f buttons 0x%x pressure %4.2lf tilt %d, %d rotation %6.2lf",
+ deviceId, deviceData.device, deviceData.pointerType, deviceData.uid,
+ windowPoint.x(), windowPoint.y(), screenPoint.x(), screenPoint.y(),
+ static_cast<uint>(buttons), pressure, xTilt, yTilt, rotation);
+
+ QWindowSystemInterface::handleTabletEvent(m_platformWindow->window(), timestamp, windowPoint, screenPoint,
+ deviceData.device, deviceData.pointerType, buttons, pressure, xTilt, yTilt,
+ tangentialPressure, rotation, z, deviceData.uid,
+ keyboardModifiers);
+ return true;
+}
+
+- (void)tabletPoint:(NSEvent *)theEvent
+{
+ if ([self isTransparentForUserInput])
+ return [super tabletPoint:theEvent];
+
+ [self handleTabletEvent: theEvent];
+}
+
+static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
+{
+ qint64 uid = [theEvent uniqueID];
+ uint bits = [theEvent vendorPointingDeviceType];
+ if (bits == 0 && uid != 0) {
+ // Fallback. It seems that the driver doesn't always include all the information.
+ // High-End Wacom devices store their "type" in the uper bits of the Unique ID.
+ // I'm not sure how to handle it for consumer devices, but I'll test that in a bit.
+ bits = uid >> 32;
+ }
+
+ QTabletEvent::TabletDevice device;
+ // Defined in the "EN0056-NxtGenImpGuideX"
+ // on Wacom's Developer Website (www.wacomeng.com)
+ if (((bits & 0x0006) == 0x0002) && ((bits & 0x0F06) != 0x0902)) {
+ device = QTabletEvent::Stylus;
+ } else {
+ switch (bits & 0x0F06) {
+ case 0x0802:
+ device = QTabletEvent::Stylus;
+ break;
+ case 0x0902:
+ device = QTabletEvent::Airbrush;
+ break;
+ case 0x0004:
+ device = QTabletEvent::FourDMouse;
+ break;
+ case 0x0006:
+ device = QTabletEvent::Puck;
+ break;
+ case 0x0804:
+ device = QTabletEvent::RotationStylus;
+ break;
+ default:
+ device = QTabletEvent::NoDevice;
+ }
+ }
+ return device;
+}
+
+- (void)tabletProximity:(NSEvent *)theEvent
+{
+ if ([self isTransparentForUserInput])
+ return [super tabletProximity:theEvent];
+
+ ulong timestamp = [theEvent timestamp] * 1000;
+
+ QCocoaTabletDeviceData deviceData;
+ deviceData.uid = [theEvent uniqueID];
+ deviceData.capabilityMask = [theEvent capabilityMask];
+
+ switch ([theEvent pointingDeviceType]) {
+ case NSUnknownPointingDevice:
+ default:
+ deviceData.pointerType = QTabletEvent::UnknownPointer;
+ break;
+ case NSPenPointingDevice:
+ deviceData.pointerType = QTabletEvent::Pen;
+ break;
+ case NSCursorPointingDevice:
+ deviceData.pointerType = QTabletEvent::Cursor;
+ break;
+ case NSEraserPointingDevice:
+ deviceData.pointerType = QTabletEvent::Eraser;
+ break;
+ }
+
+ deviceData.device = wacomTabletDevice(theEvent);
+
+ // The deviceID is "unique" while in the proximity, it's a key that we can use for
+ // linking up QCocoaTabletDeviceData to an event (especially if there are two devices in action).
+ bool entering = [theEvent isEnteringProximity];
+ uint deviceId = [theEvent deviceID];
+ if (entering) {
+ tabletDeviceDataHash->insert(deviceId, deviceData);
+ } else {
+ tabletDeviceDataHash->remove(deviceId);
+ }
+
+ qCDebug(lcQpaTablet, "proximity change on tablet %d: current tool %d type %d unique ID %lld",
+ deviceId, deviceData.device, deviceData.pointerType, deviceData.uid);
+
+ if (entering) {
+ QWindowSystemInterface::handleTabletEnterProximityEvent(timestamp, deviceData.device, deviceData.pointerType, deviceData.uid);
+ } else {
+ QWindowSystemInterface::handleTabletLeaveProximityEvent(timestamp, deviceData.device, deviceData.pointerType, deviceData.uid);
+ }
+}
+@end
+
+#endif
diff --git a/src/plugins/platforms/cocoa/qnsview_touch.mm b/src/plugins/platforms/cocoa/qnsview_touch.mm
new file mode 100644
index 0000000000..e789213f70
--- /dev/null
+++ b/src/plugins/platforms/cocoa/qnsview_touch.mm
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// This file is included from qnsview.mm, and only used to organize the code
+
+Q_LOGGING_CATEGORY(lcQpaTouch, "qt.qpa.input.touch")
+
+@implementation QT_MANGLE_NAMESPACE(QNSView) (Touch)
+
+- (bool)shouldSendSingleTouch
+{
+ if (!m_platformWindow)
+ return true;
+
+ // QtWidgets expects single-point touch events, QtDeclarative does not.
+ // Until there is an API we solve this by looking at the window class type.
+ return m_platformWindow->window()->inherits("QWidgetWindow");
+}
+
+- (void)touchesBeganWithEvent:(NSEvent *)event
+{
+ if (!m_platformWindow)
+ return;
+
+ const NSTimeInterval timestamp = [event timestamp];
+ const QList<QWindowSystemInterface::TouchPoint> points = QCocoaTouch::getCurrentTouchPointList(event, [self shouldSendSingleTouch]);
+ qCDebug(lcQpaTouch) << "touchesBeganWithEvent" << points << "from device" << hex << [event deviceID];
+ QWindowSystemInterface::handleTouchEvent(m_platformWindow->window(), timestamp * 1000, QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), points);
+}
+
+- (void)touchesMovedWithEvent:(NSEvent *)event
+{
+ if (!m_platformWindow)
+ return;
+
+ const NSTimeInterval timestamp = [event timestamp];
+ const QList<QWindowSystemInterface::TouchPoint> points = QCocoaTouch::getCurrentTouchPointList(event, [self shouldSendSingleTouch]);
+ qCDebug(lcQpaTouch) << "touchesMovedWithEvent" << points << "from device" << hex << [event deviceID];
+ QWindowSystemInterface::handleTouchEvent(m_platformWindow->window(), timestamp * 1000, QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), points);
+}
+
+- (void)touchesEndedWithEvent:(NSEvent *)event
+{
+ if (!m_platformWindow)
+ return;
+
+ const NSTimeInterval timestamp = [event timestamp];
+ const QList<QWindowSystemInterface::TouchPoint> points = QCocoaTouch::getCurrentTouchPointList(event, [self shouldSendSingleTouch]);
+ qCDebug(lcQpaTouch) << "touchesEndedWithEvent" << points << "from device" << hex << [event deviceID];
+ QWindowSystemInterface::handleTouchEvent(m_platformWindow->window(), timestamp * 1000, QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), points);
+}
+
+- (void)touchesCancelledWithEvent:(NSEvent *)event
+{
+ if (!m_platformWindow)
+ return;
+
+ const NSTimeInterval timestamp = [event timestamp];
+ const QList<QWindowSystemInterface::TouchPoint> points = QCocoaTouch::getCurrentTouchPointList(event, [self shouldSendSingleTouch]);
+ qCDebug(lcQpaTouch) << "touchesCancelledWithEvent" << points << "from device" << hex << [event deviceID];
+ QWindowSystemInterface::handleTouchEvent(m_platformWindow->window(), timestamp * 1000, QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), points);
+}
+
+@end
diff --git a/src/plugins/platforms/cocoa/qnswindow.h b/src/plugins/platforms/cocoa/qnswindow.h
index ea690b69e3..64f1ed0802 100644
--- a/src/plugins/platforms/cocoa/qnswindow.h
+++ b/src/plugins/platforms/cocoa/qnswindow.h
@@ -67,6 +67,7 @@ QT_FORWARD_DECLARE_CLASS(QCocoaWindow)
- (void)dealloc;
- (BOOL)isOpaque;
- (NSColor *)backgroundColor;
+- (NSString *)description;
@property (nonatomic, readonly) QCocoaWindow *platformWindow;
@end
diff --git a/src/plugins/platforms/cocoa/qnswindow.mm b/src/plugins/platforms/cocoa/qnswindow.mm
index cb13b7d184..c959fdd917 100644
--- a/src/plugins/platforms/cocoa/qnswindow.mm
+++ b/src/plugins/platforms/cocoa/qnswindow.mm
@@ -38,7 +38,6 @@
****************************************************************************/
#include "qnswindow.h"
-#include "qnswindowdelegate.h"
#include "qcocoawindow.h"
#include "qcocoahelpers.h"
#include "qcocoaeventdispatcher.h"
@@ -46,7 +45,7 @@
#include <qpa/qwindowsysteminterface.h>
#include <qoperatingsystemversion.h>
-Q_LOGGING_CATEGORY(lcCocoaEvents, "qt.qpa.cocoa.events");
+Q_LOGGING_CATEGORY(lcQpaEvents, "qt.qpa.events");
static bool isMouseEvent(NSEvent *ev)
{
@@ -72,7 +71,7 @@ static bool isMouseEvent(NSEvent *ev)
[center addObserverForName:NSWindowDidEnterFullScreenNotification object:nil queue:nil
usingBlock:^(NSNotification *notification) {
objc_setAssociatedObject(notification.object, @selector(qt_fullScreen),
- [NSNumber numberWithBool:YES], OBJC_ASSOCIATION_RETAIN);
+ @(YES), OBJC_ASSOCIATION_RETAIN);
}
];
[center addObserverForName:NSWindowDidExitFullScreenNotification object:nil queue:nil
@@ -202,7 +201,7 @@ static bool isMouseEvent(NSEvent *ev)
- (void)sendEvent:(NSEvent*)theEvent
{
- qCDebug(lcCocoaEvents) << "Sending" << theEvent << "to" << self;
+ qCDebug(lcQpaEvents) << "Sending" << theEvent << "to" << self;
// We might get events for a NSWindow after the corresponding platform
// window has been deleted, as the NSWindow can outlive the QCocoaWindow
@@ -239,7 +238,7 @@ static bool isMouseEvent(NSEvent *ev)
- (void)closeAndRelease
{
- qCDebug(lcQpaCocoaWindow) << "closeAndRelease" << self;
+ qCDebug(lcQpaWindow) << "closeAndRelease" << self;
[self.delegate release];
self.delegate = nil;
@@ -252,7 +251,7 @@ static bool isMouseEvent(NSEvent *ev)
#pragma clang diagnostic ignored "-Wobjc-missing-super-calls"
- (void)dealloc
{
- qCDebug(lcQpaCocoaWindow) << "dealloc" << self;
+ qCDebug(lcQpaWindow) << "dealloc" << self;
qt_objcDynamicSuper();
}
#pragma clang diagnostic pop
@@ -267,14 +266,14 @@ static bool isMouseEvent(NSEvent *ev)
if (__builtin_available(macOS 10.12, *)) {
// Unfortunately there's no NSWindowListOrderedBackToFront,
// so we have to manually reverse the order using an array.
- NSMutableArray *windows = [[[NSMutableArray alloc] init] autorelease];
+ NSMutableArray<NSWindow *> *windows = [NSMutableArray<NSWindow *> new];
[application enumerateWindowsWithOptions:NSWindowListOrderedFrontToBack
usingBlock:^(NSWindow *window, BOOL *) {
// For some reason AppKit will give us nil-windows, skip those
if (!window)
return;
- [(NSMutableArray*)windows addObject:window];
+ [windows addObject:window];
}
];
diff --git a/src/plugins/platforms/cocoa/qnswindowdelegate.h b/src/plugins/platforms/cocoa/qnswindowdelegate.h
index d2078b5786..e71afcbb2a 100644
--- a/src/plugins/platforms/cocoa/qnswindowdelegate.h
+++ b/src/plugins/platforms/cocoa/qnswindowdelegate.h
@@ -41,20 +41,16 @@
#define QNSWINDOWDELEGATE_H
#include <AppKit/AppKit.h>
+#include <QtCore/private/qcore_mac_p.h>
-#include "qcocoawindow.h"
+QT_BEGIN_NAMESPACE
+class QCocoaWindow;
+QT_END_NAMESPACE
@interface QT_MANGLE_NAMESPACE(QNSWindowDelegate) : NSObject <NSWindowDelegate>
-{
- QCocoaWindow *m_cocoaWindow;
-}
-- (id)initWithQCocoaWindow:(QCocoaWindow *)cocoaWindow;
+- (instancetype)initWithQCocoaWindow:(QT_PREPEND_NAMESPACE(QCocoaWindow) *)cocoaWindow;
-- (BOOL)windowShouldClose:(NSNotification *)notification;
-
-- (BOOL)window:(NSWindow *)window shouldPopUpDocumentPathMenu:(NSMenu *)menu;
-- (BOOL)window:(NSWindow *)window shouldDragDocumentWithEvent:(NSEvent *)event from:(NSPoint)dragImageLocation withPasteboard:(NSPasteboard *)pasteboard;
@end
QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSWindowDelegate);
diff --git a/src/plugins/platforms/cocoa/qnswindowdelegate.mm b/src/plugins/platforms/cocoa/qnswindowdelegate.mm
index 057a4c2943..1c21879a89 100644
--- a/src/plugins/platforms/cocoa/qnswindowdelegate.mm
+++ b/src/plugins/platforms/cocoa/qnswindowdelegate.mm
@@ -39,21 +39,24 @@
#include "qnswindowdelegate.h"
#include "qcocoahelpers.h"
+#include "qcocoawindow.h"
#include "qcocoascreen.h"
#include <QDebug>
+#include <QtCore/private/qcore_mac_p.h>
#include <qpa/qplatformscreen.h>
#include <qpa/qwindowsysteminterface.h>
static QRegExp whitespaceRegex = QRegExp(QStringLiteral("\\s*"));
-@implementation QNSWindowDelegate
+@implementation QNSWindowDelegate {
+ QCocoaWindow *m_cocoaWindow;
+}
-- (id)initWithQCocoaWindow:(QCocoaWindow *)cocoaWindow
+- (instancetype)initWithQCocoaWindow:(QCocoaWindow *)cocoaWindow
{
- if (self = [super init])
+ if ((self = [self init]))
m_cocoaWindow = cocoaWindow;
-
return self;
}
diff --git a/src/plugins/platforms/cocoa/qpaintengine_mac.mm b/src/plugins/platforms/cocoa/qpaintengine_mac.mm
index 3f363b62d5..96506c67fa 100644
--- a/src/plugins/platforms/cocoa/qpaintengine_mac.mm
+++ b/src/plugins/platforms/cocoa/qpaintengine_mac.mm
@@ -98,8 +98,8 @@ CGImageRef qt_mac_create_imagemask(const QPixmap &pixmap, const QRectF &sr)
for (int x = sx; x < sw; ++x)
*(dptr+(offset++)) = (*(srow+x) & mask) ? 255 : 0;
}
- QCFType<CGDataProviderRef> provider = CGDataProviderCreateWithData(0, dptr, nbytes, qt_mac_cgimage_data_free);
- return CGImageMaskCreate(sw, sh, 8, 8, nbytes / sh, provider, 0, 0);
+ QCFType<CGDataProviderRef> provider = CGDataProviderCreateWithData(nullptr, dptr, nbytes, qt_mac_cgimage_data_free);
+ return CGImageMaskCreate(sw, sh, 8, 8, nbytes / sh, provider, nullptr, false);
}
//conversion
@@ -287,16 +287,16 @@ static void qt_mac_draw_pattern(void *info, CGContextRef c)
Q_ASSERT(pat->data.bytes);
w = h = 8;
#if (QMACPATTERN_MASK_MULTIPLIER == 1)
- CGDataProviderRef provider = CGDataProviderCreateWithData(0, pat->data.bytes, w*h, 0);
- pat->image = CGImageMaskCreate(w, h, 1, 1, 1, provider, 0, false);
+ CGDataProviderRef provider = CGDataProviderCreateWithData(nullptr, pat->data.bytes, w*h, nullptr);
+ pat->image = CGImageMaskCreate(w, h, 1, 1, 1, provider, nullptr, false);
CGDataProviderRelease(provider);
#else
const int numBytes = (w*h)/sizeof(uchar);
uchar xor_bytes[numBytes];
for (int i = 0; i < numBytes; ++i)
xor_bytes[i] = pat->data.bytes[i] ^ 0xFF;
- CGDataProviderRef provider = CGDataProviderCreateWithData(0, xor_bytes, w*h, 0);
- CGImageRef swatch = CGImageMaskCreate(w, h, 1, 1, 1, provider, 0, false);
+ CGDataProviderRef provider = CGDataProviderCreateWithData(nullptr, xor_bytes, w*h, nullptr);
+ CGImageRef swatch = CGImageMaskCreate(w, h, 1, 1, 1, provider, nullptr, false);
CGDataProviderRelease(provider);
const QColor c0(0, 0, 0, 0), c1(255, 255, 255, 255);
@@ -399,9 +399,9 @@ QCoreGraphicsPaintEngine::begin(QPaintDevice *pdev)
d->orig_xform = CGContextGetCTM(d->hd);
if (d->shading) {
CGShadingRelease(d->shading);
- d->shading = 0;
+ d->shading = nullptr;
}
- d->setClip(0); //clear the context's clipping
+ d->setClip(nullptr); //clear the context's clipping
}
setActive(true);
@@ -445,12 +445,12 @@ QCoreGraphicsPaintEngine::end()
CGShadingRelease(d->shading);
d->shading = 0;
}
- d->pdev = 0;
+ d->pdev = nullptr;
if (d->hd) {
d->restoreGraphicsState();
CGContextSynchronize(d->hd);
CGContextRelease(d->hd);
- d->hd = 0;
+ d->hd = nullptr;
}
return true;
}
@@ -545,7 +545,7 @@ QCoreGraphicsPaintEngine::updateBrush(const QBrush &brush, const QPointF &brushO
if (d->shading) {
CGShadingRelease(d->shading);
- d->shading = 0;
+ d->shading = nullptr;
}
d->setFillBrush(brushOrigin);
}
@@ -592,7 +592,7 @@ QCoreGraphicsPaintEngine::updateClipPath(const QPainterPath &p, Qt::ClipOperatio
if (d->current.clipEnabled) {
d->current.clipEnabled = false;
d->current.clip = QRegion();
- d->setClip(0);
+ d->setClip(nullptr);
}
} else {
if (!d->current.clipEnabled)
@@ -601,7 +601,7 @@ QCoreGraphicsPaintEngine::updateClipPath(const QPainterPath &p, Qt::ClipOperatio
QRegion clipRegion(p.toFillPolygon().toPolygon(), p.fillRule());
if (op == Qt::ReplaceClip) {
d->current.clip = clipRegion;
- d->setClip(0);
+ d->setClip(nullptr);
if (p.isEmpty()) {
CGRect rect = CGRectMake(0, 0, 0, 0);
CGContextClipToRect(d->hd, rect);
@@ -630,7 +630,7 @@ QCoreGraphicsPaintEngine::updateClipRegion(const QRegion &clipRegion, Qt::ClipOp
if (op == Qt::NoClip) {
d->current.clipEnabled = false;
d->current.clip = QRegion();
- d->setClip(0);
+ d->setClip(nullptr);
} else {
if (!d->current.clipEnabled)
op = Qt::ReplaceClip;
@@ -676,7 +676,7 @@ QCoreGraphicsPaintEngine::drawRects(const QRectF *rects, int rectCount)
QRectF r = rects[i];
CGMutablePathRef path = CGPathCreateMutable();
- CGPathAddRect(path, 0, qt_mac_compose_rect(r));
+ CGPathAddRect(path, nullptr, qt_mac_compose_rect(r));
d->drawPath(QCoreGraphicsPaintEnginePrivate::CGFill|QCoreGraphicsPaintEnginePrivate::CGStroke,
path);
CGPathRelease(path);
@@ -698,8 +698,8 @@ QCoreGraphicsPaintEngine::drawPoints(const QPointF *points, int pointCount)
CGMutablePathRef path = CGPathCreateMutable();
for (int i=0; i < pointCount; i++) {
float x = points[i].x(), y = points[i].y();
- CGPathMoveToPoint(path, 0, x, y);
- CGPathAddLineToPoint(path, 0, x+0.001, y);
+ CGPathMoveToPoint(path, nullptr, x, y);
+ CGPathAddLineToPoint(path, nullptr, x+0.001, y);
}
bool doRestore = false;
@@ -745,11 +745,11 @@ QCoreGraphicsPaintEngine::drawPolygon(const QPointF *points, int pointCount, Pol
return;
CGMutablePathRef path = CGPathCreateMutable();
- CGPathMoveToPoint(path, 0, points[0].x(), points[0].y());
+ CGPathMoveToPoint(path, nullptr, points[0].x(), points[0].y());
for (int x = 1; x < pointCount; ++x)
- CGPathAddLineToPoint(path, 0, points[x].x(), points[x].y());
+ CGPathAddLineToPoint(path, nullptr, points[x].x(), points[x].y());
if (mode != PolylineMode && points[0] != points[pointCount-1])
- CGPathAddLineToPoint(path, 0, points[0].x(), points[0].y());
+ CGPathAddLineToPoint(path, nullptr, points[0].x(), points[0].y());
uint op = QCoreGraphicsPaintEnginePrivate::CGStroke;
if (mode != PolylineMode)
op |= mode == OddEvenMode ? QCoreGraphicsPaintEnginePrivate::CGEOFill
@@ -770,8 +770,8 @@ QCoreGraphicsPaintEngine::drawLines(const QLineF *lines, int lineCount)
CGMutablePathRef path = CGPathCreateMutable();
for (int i = 0; i < lineCount; i++) {
const QPointF start = lines[i].p1(), end = lines[i].p2();
- CGPathMoveToPoint(path, 0, start.x(), start.y());
- CGPathAddLineToPoint(path, 0, end.x(), end.y());
+ CGPathMoveToPoint(path, nullptr, start.x(), start.y());
+ CGPathAddLineToPoint(path, nullptr, end.x(), end.y());
}
d->drawPath(QCoreGraphicsPaintEnginePrivate::CGStroke, path);
CGPathRelease(path);
@@ -870,7 +870,7 @@ QCoreGraphicsPaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap
CGPatternRef pat = CGPatternCreate(qpattern, CGRectMake(0, 0, width, height),
trans, width, height,
kCGPatternTilingNoDistortion, true, &callbks);
- CGColorSpaceRef cs = CGColorSpaceCreatePattern(0);
+ CGColorSpaceRef cs = CGColorSpaceCreatePattern(nullptr);
CGContextSetFillColorSpace(d->hd, cs);
CGFloat component = 1.0; //just one
CGContextSetFillPattern(d->hd, pat, &component);
@@ -1198,9 +1198,9 @@ void QCoreGraphicsPaintEnginePrivate::setFillBrush(const QPointF &offset)
Q_ASSERT(grad->spread() == QGradient::PadSpread);
static const CGFloat domain[] = { 0.0f, +1.0f };
- static const CGFunctionCallbacks callbacks = { 0, qt_mac_color_gradient_function, 0 };
+ static const CGFunctionCallbacks callbacks = { 0, qt_mac_color_gradient_function, nullptr };
CGFunctionRef fill_func = CGFunctionCreate(reinterpret_cast<void *>(&current.brush),
- 1, domain, 4, 0, &callbacks);
+ 1, domain, 4, nullptr, &callbacks);
CGColorSpaceRef colorspace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB)
if (bs == Qt::LinearGradientPattern) {
@@ -1233,7 +1233,7 @@ void QCoreGraphicsPaintEnginePrivate::setFillBrush(const QPointF &offset)
QMacPattern *qpattern = new QMacPattern;
qpattern->pdev = pdev;
CGFloat components[4] = { 1.0, 1.0, 1.0, 1.0 };
- CGColorSpaceRef base_colorspace = 0;
+ CGColorSpaceRef base_colorspace = nullptr;
if (bs == Qt::TexturePattern) {
qpattern->data.pixmap = current.brush.texture();
if (qpattern->data.pixmap.isQBitmap()) {
@@ -1291,7 +1291,7 @@ QCoreGraphicsPaintEnginePrivate::setClip(const QRegion *rgn)
if (!sysClip.isEmpty())
qt_mac_clip_cg(hd, sysClip, &orig_xform);
if (rgn)
- qt_mac_clip_cg(hd, *rgn, 0);
+ qt_mac_clip_cg(hd, *rgn, nullptr);
}
}
@@ -1404,7 +1404,7 @@ void QCoreGraphicsPaintEnginePrivate::drawPath(uchar ops, CGMutablePathRef path)
t.transform = qt_mac_convert_transform_to_cg(current.transform);
t.path = CGPathCreateMutable();
CGPathApply(path, &t, qt_mac_cg_transform_path_apply); //transform the path
- setTransform(0); //unset the context transform
+ setTransform(nullptr); //unset the context transform
CGContextSetLineWidth(hd, cosmeticPenSize);
CGContextAddPath(hd, t.path);
CGPathRelease(t.path);
diff --git a/src/plugins/platforms/cocoa/qpaintengine_mac_p.h b/src/plugins/platforms/cocoa/qpaintengine_mac_p.h
index c9519ac827..1416386745 100644
--- a/src/plugins/platforms/cocoa/qpaintengine_mac_p.h
+++ b/src/plugins/platforms/cocoa/qpaintengine_mac_p.h
@@ -135,7 +135,7 @@ class QCoreGraphicsPaintEnginePrivate : public QPaintEnginePrivate
Q_DECLARE_PUBLIC(QCoreGraphicsPaintEngine)
public:
QCoreGraphicsPaintEnginePrivate()
- : hd(0), shading(0), stackCount(0), complexXForm(false), disabledSmoothFonts(false)
+ : hd(nullptr), shading(nullptr), stackCount(0), complexXForm(false), disabledSmoothFonts(false)
{
}
@@ -164,8 +164,8 @@ public:
//internal functions
enum { CGStroke=0x01, CGEOFill=0x02, CGFill=0x04 };
- void drawPath(uchar ops, CGMutablePathRef path = 0);
- void setClip(const QRegion *rgn=0);
+ void drawPath(uchar ops, CGMutablePathRef path = nullptr);
+ void setClip(const QRegion *rgn = nullptr);
void resetClip();
void setFillBrush(const QPointF &origin=QPoint());
void setStrokePen(const QPen &pen);
@@ -174,7 +174,7 @@ public:
float penOffset();
QPointF devicePixelSize(CGContextRef context);
float adjustPenWidth(float penWidth);
- inline void setTransform(const QTransform *matrix=0)
+ inline void setTransform(const QTransform *matrix = nullptr)
{
CGContextConcatCTM(hd, CGAffineTransformInvert(CGContextGetCTM(hd)));
CGAffineTransform xform = orig_xform;
diff --git a/src/plugins/platforms/cocoa/qprintengine_mac.mm b/src/plugins/platforms/cocoa/qprintengine_mac.mm
index eade407500..f2f29b26ee 100644
--- a/src/plugins/platforms/cocoa/qprintengine_mac.mm
+++ b/src/plugins/platforms/cocoa/qprintengine_mac.mm
@@ -117,7 +117,7 @@ bool QMacPrintEngine::end()
if (d->paintEngine->type() == QPaintEngine::CoreGraphics) {
// We don't need the paint engine to call restoreGraphicsState()
static_cast<QCoreGraphicsPaintEngine*>(d->paintEngine)->d_func()->stackCount = 0;
- static_cast<QCoreGraphicsPaintEngine*>(d->paintEngine)->d_func()->hd = 0;
+ static_cast<QCoreGraphicsPaintEngine*>(d->paintEngine)->d_func()->hd = nullptr;
}
d->paintEngine->end();
if (d->state != QPrinter::Idle)
@@ -271,7 +271,7 @@ void QMacPrintEnginePrivate::releaseSession()
PMSessionEndPageNoDialog(session());
PMSessionEndDocumentNoDialog(session());
[printInfo release];
- printInfo = 0;
+ printInfo = nil;
}
bool QMacPrintEnginePrivate::newPage_helper()
@@ -291,7 +291,7 @@ bool QMacPrintEnginePrivate::newPage_helper()
while (cgEngine->d_func()->stackCount > 0)
cgEngine->d_func()->restoreGraphicsState();
- OSStatus status = PMSessionBeginPageNoDialog(session(), format(), 0);
+ OSStatus status = PMSessionBeginPageNoDialog(session(), format(), nullptr);
if (status != noErr) {
state = QPrinter::Error;
return false;
@@ -318,7 +318,7 @@ bool QMacPrintEnginePrivate::newPage_helper()
if (m_pageLayout.mode() != QPageLayout::FullPageMode)
CGContextTranslateCTM(cgContext, page.x() - paper.x(), page.y() - paper.y());
cgEngine->d_func()->orig_xform = CGContextGetCTM(cgContext);
- cgEngine->d_func()->setClip(0);
+ cgEngine->d_func()->setClip(nullptr);
cgEngine->state->dirtyFlags = QPaintEngine::DirtyFlag(QPaintEngine::AllDirty
& ~(QPaintEngine::DirtyClipEnabled
| QPaintEngine::DirtyClipRegion
@@ -340,7 +340,7 @@ void QMacPrintEnginePrivate::setPageSize(const QPageSize &pageSize)
// Get the PMPaper and check it is valid
PMPaper macPaper = m_printDevice->macPaper(usePageSize);
- if (macPaper == 0) {
+ if (!macPaper) {
qWarning() << "QMacPrintEngine: Invalid PMPaper returned for " << pageSize;
return;
}
diff --git a/src/plugins/platforms/cocoa/qprintengine_mac_p.h b/src/plugins/platforms/cocoa/qprintengine_mac_p.h
index 9514f3e691..3d94227ae4 100644
--- a/src/plugins/platforms/cocoa/qprintengine_mac_p.h
+++ b/src/plugins/platforms/cocoa/qprintengine_mac_p.h
@@ -134,7 +134,7 @@ public:
QMacPrintEnginePrivate() : mode(QPrinter::ScreenResolution), state(QPrinter::Idle),
m_pageLayout(QPageLayout(QPageSize(QPageSize::A4), QPageLayout::Portrait, QMarginsF(0, 0, 0, 0))),
- printInfo(0), paintEngine(0), embedFonts(true) {}
+ printInfo(nullptr), paintEngine(nullptr), embedFonts(true) {}
~QMacPrintEnginePrivate();
void initialize();
diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dbackingstore.cpp b/src/plugins/platforms/direct2d/qwindowsdirect2dbackingstore.cpp
index 38f2352934..9689d6a89b 100644
--- a/src/plugins/platforms/direct2d/qwindowsdirect2dbackingstore.cpp
+++ b/src/plugins/platforms/direct2d/qwindowsdirect2dbackingstore.cpp
@@ -48,9 +48,9 @@
#include "qwindowscontext.h"
-#include <QtGui/QPainter>
-#include <QtGui/QWindow>
-#include <QtCore/QDebug>
+#include <QtGui/qpainter.h>
+#include <QtGui/qwindow.h>
+#include <QtCore/qdebug.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.cpp b/src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.cpp
index 38425f8fa1..2151f3ae95 100644
--- a/src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.cpp
+++ b/src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.cpp
@@ -42,8 +42,8 @@
#include "qwindowsdirect2dhelpers.h"
#include "qwindowsdirect2ddevicecontext.h"
-#include <QtGui/QImage>
-#include <QtGui/QColor>
+#include <QtGui/qimage.h>
+#include <QtGui/qcolor.h>
#include <wrl.h>
diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.h b/src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.h
index ef39b6a661..d8a8a49aec 100644
--- a/src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.h
+++ b/src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.h
@@ -41,8 +41,8 @@
#define QWINDOWSDIRECT2DBITMAP_H
#include <QtCore/qnamespace.h>
-#include <QtCore/QRect>
-#include <QtCore/QScopedPointer>
+#include <QtCore/qrect.h>
+#include <QtCore/qscopedpointer.h>
struct ID2D1DeviceContext;
struct ID2D1Bitmap1;
diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dcontext.h b/src/plugins/platforms/direct2d/qwindowsdirect2dcontext.h
index 0d42c65964..5bce056ad1 100644
--- a/src/plugins/platforms/direct2d/qwindowsdirect2dcontext.h
+++ b/src/plugins/platforms/direct2d/qwindowsdirect2dcontext.h
@@ -40,7 +40,7 @@
#ifndef QWINDOWSDIRECT2DCONTEXT_H
#define QWINDOWSDIRECT2DCONTEXT_H
-#include <QtCore/QScopedPointer>
+#include <QtCore/qscopedpointer.h>
struct ID3D11Device;
struct ID2D1Device;
diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.h b/src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.h
index 8544f9448b..aee0eb867d 100644
--- a/src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.h
+++ b/src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.h
@@ -40,7 +40,7 @@
#ifndef QWINDOWSDIRECT2DDEVICECONTEXT_H
#define QWINDOWSDIRECT2DDEVICECONTEXT_H
-#include <QtCore/QScopedPointer>
+#include <QtCore/qscopedpointer.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dhelpers.h b/src/plugins/platforms/direct2d/qwindowsdirect2dhelpers.h
index 34225bba9a..babe646fd8 100644
--- a/src/plugins/platforms/direct2d/qwindowsdirect2dhelpers.h
+++ b/src/plugins/platforms/direct2d/qwindowsdirect2dhelpers.h
@@ -40,11 +40,11 @@
#ifndef QWINDOWSDIRECT2DHELPERS_H
#define QWINDOWSDIRECT2DHELPERS_H
-#include <QtCore/QRectF>
-#include <QtCore/QSizeF>
-#include <QtCore/QPointF>
-#include <QtGui/QColor>
-#include <QtGui/QTransform>
+#include <QtCore/qrect.h>
+#include <QtCore/qsize.h>
+#include <QtCore/qpoint.h>
+#include <QtGui/qcolor.h>
+#include <QtGui/qtransform.h>
#ifdef Q_CC_MINGW
# include <qt_windows.h>
diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dintegration.cpp b/src/plugins/platforms/direct2d/qwindowsdirect2dintegration.cpp
index 6d98da5be5..173d79cf2b 100644
--- a/src/plugins/platforms/direct2d/qwindowsdirect2dintegration.cpp
+++ b/src/plugins/platforms/direct2d/qwindowsdirect2dintegration.cpp
@@ -47,8 +47,8 @@
#include "qwindowscontext.h"
#include <qplatformdefs.h>
-#include <QtCore/QCoreApplication>
-#include <QtCore/QVersionNumber>
+#include <QtCore/qcoreapplication.h>
+#include <QtCore/qversionnumber.h>
#include <QtGui/private/qpixmap_raster_p.h>
#include <QtGui/qpa/qwindowsysteminterface.h>
#include <QtEventDispatcherSupport/private/qwindowsguieventdispatcher_p.h>
diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dintegration.h b/src/plugins/platforms/direct2d/qwindowsdirect2dintegration.h
index 39ca1d0dbf..19c7521eb7 100644
--- a/src/plugins/platforms/direct2d/qwindowsdirect2dintegration.h
+++ b/src/plugins/platforms/direct2d/qwindowsdirect2dintegration.h
@@ -42,7 +42,7 @@
#include "qwindowsintegration.h"
-#include <QtCore/QScopedPointer>
+#include <QtCore/qscopedpointer.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dnativeinterface.cpp b/src/plugins/platforms/direct2d/qwindowsdirect2dnativeinterface.cpp
index 711366a0b5..f763c4f7ab 100644
--- a/src/plugins/platforms/direct2d/qwindowsdirect2dnativeinterface.cpp
+++ b/src/plugins/platforms/direct2d/qwindowsdirect2dnativeinterface.cpp
@@ -39,7 +39,7 @@
#include "qwindowsdirect2dnativeinterface.h"
-#include <QtGui/QBackingStore>
+#include <QtGui/qbackingstore.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dpaintdevice.h b/src/plugins/platforms/direct2d/qwindowsdirect2dpaintdevice.h
index 1f23d604f5..013d7a9b79 100644
--- a/src/plugins/platforms/direct2d/qwindowsdirect2dpaintdevice.h
+++ b/src/plugins/platforms/direct2d/qwindowsdirect2dpaintdevice.h
@@ -40,8 +40,8 @@
#ifndef QWINDOWSDIRECT2DPAINTDEVICE_H
#define QWINDOWSDIRECT2DPAINTDEVICE_H
-#include <QtCore/QScopedPointer>
-#include <QtGui/QPaintDevice>
+#include <QtCore/qscopedpointer.h>
+#include <QtGui/qpaintdevice.h>
#include "qwindowsdirect2dpaintengine.h"
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.cpp b/src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.cpp
index 95fbd37247..d3e1d4dd12 100644
--- a/src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.cpp
+++ b/src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.cpp
@@ -49,9 +49,9 @@
#include <QtFontDatabaseSupport/private/qwindowsfontengine_p.h>
#include "qwindowsintegration.h"
-#include <QtCore/QtMath>
-#include <QtCore/QStack>
-#include <QtCore/QSettings>
+#include <QtCore/qmath.h>
+#include <QtCore/qstack.h>
+#include <QtCore/qsettings.h>
#include <QtGui/private/qpaintengine_p.h>
#include <QtGui/private/qtextengine_p.h>
#include <QtGui/private/qfontengine_p.h>
diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.h b/src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.h
index b9616acd6a..6404c60b13 100644
--- a/src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.h
+++ b/src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.h
@@ -40,7 +40,7 @@
#ifndef QWINDOWSDIRECT2DPAINTENGINE_H
#define QWINDOWSDIRECT2DPAINTENGINE_H
-#include <QtCore/QScopedPointer>
+#include <QtCore/qscopedpointer.h>
#include <QtGui/private/qpaintengineex_p.h>
struct ID2D1Geometry;
diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dplatformpixmap.cpp b/src/plugins/platforms/direct2d/qwindowsdirect2dplatformpixmap.cpp
index 65e056d312..fb50e05b3f 100644
--- a/src/plugins/platforms/direct2d/qwindowsdirect2dplatformpixmap.cpp
+++ b/src/plugins/platforms/direct2d/qwindowsdirect2dplatformpixmap.cpp
@@ -43,10 +43,10 @@
#include "qwindowsdirect2dbitmap.h"
#include "qwindowsdirect2dhelpers.h"
-#include <QtGui/QPainter>
-#include <QtGui/QImage>
-#include <QtGui/QPaintDevice>
-#include <QtGui/QPaintEngine>
+#include <QtGui/qpainter.h>
+#include <QtGui/qimage.h>
+#include <QtGui/qpaintdevice.h>
+#include <QtGui/qpaintengine.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dplatformpixmap.h b/src/plugins/platforms/direct2d/qwindowsdirect2dplatformpixmap.h
index 0448613a95..6bd7852ae0 100644
--- a/src/plugins/platforms/direct2d/qwindowsdirect2dplatformpixmap.h
+++ b/src/plugins/platforms/direct2d/qwindowsdirect2dplatformpixmap.h
@@ -42,7 +42,7 @@
#include "qwindowsdirect2dpaintengine.h"
#include <QtGui/qpa/qplatformpixmap.h>
-#include <QtCore/QScopedPointer>
+#include <QtCore/qscopedpointer.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dplatformplugin.cpp b/src/plugins/platforms/direct2d/qwindowsdirect2dplatformplugin.cpp
index 7393c11dda..6c56d356b7 100644
--- a/src/plugins/platforms/direct2d/qwindowsdirect2dplatformplugin.cpp
+++ b/src/plugins/platforms/direct2d/qwindowsdirect2dplatformplugin.cpp
@@ -40,7 +40,7 @@
#include "qwindowsdirect2dintegration.h"
#include <QtGui/qpa/qplatformintegrationplugin.h>
-#include <QtCore/QStringList>
+#include <QtCore/qstringlist.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp
index 33878a5f50..43f2e31a49 100644
--- a/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp
+++ b/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp
@@ -415,8 +415,7 @@ static void *eglContextForContext(QOpenGLContext *context)
QPlatformNativeInterface::NativeResourceForContextFunction QEglFSIntegration::nativeResourceFunctionForContext(const QByteArray &resource)
{
#ifndef QT_NO_OPENGL
- QByteArray lowerCaseResource = resource.toLower();
- if (lowerCaseResource == "get_egl_context")
+ if (resource.compare("get_egl_context", Qt::CaseInsensitive) == 0)
return NativeResourceForContextFunction(eglContextForContext);
#else
Q_UNUSED(resource);
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
index 4742143121..0cbb494c2f 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
@@ -47,6 +47,7 @@
#include <QtCore/QLoggingCategory>
#include <QtGui/private/qguiapplication_p.h>
+#include <QtGui/private/qtguiglobal_p.h>
#include <QtFbSupport/private/qfbvthandler_p.h>
#include <errno.h>
@@ -210,17 +211,29 @@ void QEglFSKmsGbmScreen::ensureModeSet(uint32_t fb)
if (doModeSet) {
qCDebug(qLcEglfsKmsDebug, "Setting mode for screen %s", qPrintable(name()));
- int ret = drmModeSetCrtc(fd,
- op.crtc_id,
- fb,
- 0, 0,
- &op.connector_id, 1,
- &op.modes[op.mode]);
-
- if (ret == 0)
- setPowerState(PowerStateOn);
- else
- qErrnoWarning(errno, "Could not set DRM mode for screen %s", qPrintable(name()));
+
+ if (device()->hasAtomicSupport()) {
+#if QT_CONFIG(drm_atomic)
+ drmModeAtomicReq *request = device()->atomic_request();
+ if (request) {
+ drmModeAtomicAddProperty(request, op.connector_id, op.crtcIdPropertyId, op.crtc_id);
+ drmModeAtomicAddProperty(request, op.crtc_id, op.modeIdPropertyId, op.mode_blob_id);
+ drmModeAtomicAddProperty(request, op.crtc_id, op.activePropertyId, 1);
+ }
+#endif
+ } else {
+ int ret = drmModeSetCrtc(fd,
+ op.crtc_id,
+ fb,
+ 0, 0,
+ &op.connector_id, 1,
+ &op.modes[op.mode]);
+
+ if (ret == 0)
+ setPowerState(PowerStateOn);
+ else
+ qErrnoWarning(errno, "Could not set DRM mode for screen %s", qPrintable(name()));
+ }
}
}
}
@@ -243,6 +256,11 @@ void QEglFSKmsGbmScreen::waitForFlip()
drmEvent.page_flip_handler = pageFlipHandler;
drmHandleEvent(device()->fd(), &drmEvent);
}
+
+#if QT_CONFIG(drm_atomic)
+ if (device()->hasAtomicSupport())
+ device()->atomicReset();
+#endif
}
void QEglFSKmsGbmScreen::flip()
@@ -274,34 +292,79 @@ void QEglFSKmsGbmScreen::flip()
QKmsOutput &op(output());
const int fd = device()->fd();
m_flipPending = true;
- int ret = drmModePageFlip(fd,
+
+ if (device()->hasAtomicSupport()) {
+#if QT_CONFIG(drm_atomic)
+ drmModeAtomicReq *request = device()->atomic_request();
+ if (request) {
+ drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->framebufferPropertyId, fb->fb);
+ drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->crtcPropertyId, op.crtc_id);
+ drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->srcwidthPropertyId,
+ output().size.width() << 16);
+ drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->srcXPropertyId, 0);
+ drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->srcYPropertyId, 0);
+ drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->srcheightPropertyId,
+ output().size.height() << 16);
+ drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->crtcXPropertyId, 0);
+ drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->crtcYPropertyId, 0);
+ drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->crtcwidthPropertyId,
+ m_output.modes[m_output.mode].hdisplay);
+ drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->crtcheightPropertyId,
+ m_output.modes[m_output.mode].vdisplay);
+
+ static int zpos = qEnvironmentVariableIntValue("QT_QPA_EGLFS_KMS_ZPOS");
+ if (zpos)
+ drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->zposPropertyId, zpos);
+ }
+#endif
+ } else {
+ int ret = drmModePageFlip(fd,
op.crtc_id,
fb->fb,
DRM_MODE_PAGE_FLIP_EVENT,
this);
- if (ret) {
- qErrnoWarning("Could not queue DRM page flip on screen %s", qPrintable(name()));
- m_flipPending = false;
- gbm_surface_release_buffer(m_gbm_surface, m_gbm_bo_next);
- m_gbm_bo_next = nullptr;
- return;
+ if (ret) {
+ qErrnoWarning("Could not queue DRM page flip on screen %s", qPrintable(name()));
+ m_flipPending = false;
+ gbm_surface_release_buffer(m_gbm_surface, m_gbm_bo_next);
+ m_gbm_bo_next = nullptr;
+ return;
+ }
}
for (CloneDestination &d : m_cloneDests) {
if (d.screen != this) {
d.screen->ensureModeSet(fb->fb);
d.cloneFlipPending = true;
- int ret = drmModePageFlip(fd,
- d.screen->output().crtc_id,
- fb->fb,
- DRM_MODE_PAGE_FLIP_EVENT,
- d.screen);
- if (ret) {
- qErrnoWarning("Could not queue DRM page flip for clone screen %s", qPrintable(name()));
- d.cloneFlipPending = false;
+
+ if (device()->hasAtomicSupport()) {
+#if QT_CONFIG(drm_atomic)
+ drmModeAtomicReq *request = device()->atomic_request();
+ if (request) {
+ drmModeAtomicAddProperty(request, d.screen->output().eglfs_plane->id,
+ d.screen->output().eglfs_plane->framebufferPropertyId, fb->fb);
+ drmModeAtomicAddProperty(request, d.screen->output().eglfs_plane->id,
+ d.screen->output().eglfs_plane->crtcPropertyId, op.crtc_id);
+ }
+#endif
+ } else {
+ int ret = drmModePageFlip(fd,
+ d.screen->output().crtc_id,
+ fb->fb,
+ DRM_MODE_PAGE_FLIP_EVENT,
+ d.screen);
+ if (ret) {
+ qErrnoWarning("Could not queue DRM page flip for clone screen %s", qPrintable(name()));
+ d.cloneFlipPending = false;
+ }
}
}
}
+
+#if QT_CONFIG(drm_atomic)
+ if (device()->hasAtomicSupport())
+ device()->atomicCommit(this);
+#endif
}
void QEglFSKmsGbmScreen::pageFlipHandler(int fd, unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec, void *user_data)
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp
index 531b73d1dc..1626c86239 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp
@@ -112,7 +112,7 @@ void QEglFSKmsEglDeviceScreen::waitForFlip()
qCDebug(qLcEglfsKmsDebug, "Setting plane %u", op.forced_plane_id);
int ret = drmModeSetPlane(fd, op.forced_plane_id, op.crtc_id, uint32_t(-1), 0,
0, 0, w, h,
- 0 << 16, 0 << 16, w << 16, h << 16);
+ 0 << 16, 0 << 16, op.size.width() << 16, op.size.height() << 16);
if (ret == -1)
qErrnoWarning(errno, "drmModeSetPlane failed");
}
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp
index 06bc272050..a6aac61506 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp
@@ -138,6 +138,10 @@ void *QEglFSKmsIntegration::nativeResourceForIntegration(const QByteArray &name)
if (name == QByteArrayLiteral("dri_fd") && m_device)
return (void *) (qintptr) m_device->fd();
+#if QT_CONFIG(drm_atomic)
+ if (name == QByteArrayLiteral("dri_atomic_request") && m_device)
+ return (void *) (qintptr) m_device->atomic_request();
+#endif
return nullptr;
}
@@ -147,6 +151,8 @@ void *QEglFSKmsIntegration::nativeResourceForScreen(const QByteArray &resource,
if (s) {
if (resource == QByteArrayLiteral("dri_crtcid"))
return (void *) (qintptr) s->output().crtc_id;
+ if (resource == QByteArrayLiteral("dri_connectorid"))
+ return (void *) (qintptr) s->output().connector_id;
}
return nullptr;
}
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.cpp
index 5e45b42abe..e5354d97bd 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.cpp
@@ -113,10 +113,9 @@ QRect QEglFSKmsScreen::rawGeometry() const
if (m_headless)
return QRect(QPoint(0, 0), m_device->screenConfig()->headlessSize());
- const int mode = m_output.mode;
return QRect(m_pos.x(), m_pos.y(),
- m_output.modes[mode].hdisplay,
- m_output.modes[mode].vdisplay);
+ m_output.size.width(),
+ m_output.size.height());
}
int QEglFSKmsScreen::depth() const
diff --git a/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosimagepickercontroller.h b/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosimagepickercontroller.h
index c52d498cd4..201b277494 100644
--- a/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosimagepickercontroller.h
+++ b/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosimagepickercontroller.h
@@ -41,8 +41,6 @@
#include "../../qiosfiledialog.h"
-@interface QIOSImagePickerController : UIImagePickerController <UIImagePickerControllerDelegate, UINavigationControllerDelegate> {
- QIOSFileDialog *m_fileDialog;
-}
-- (id)initWithQIOSFileDialog:(QIOSFileDialog *)fileDialog;
+@interface QIOSImagePickerController : UIImagePickerController <UIImagePickerControllerDelegate, UINavigationControllerDelegate>
+- (instancetype)initWithQIOSFileDialog:(QIOSFileDialog *)fileDialog;
@end
diff --git a/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosimagepickercontroller.mm b/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosimagepickercontroller.mm
index 78e0f00ab4..79d4ecf83f 100644
--- a/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosimagepickercontroller.mm
+++ b/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosimagepickercontroller.mm
@@ -41,15 +41,17 @@
#include "qiosimagepickercontroller.h"
-@implementation QIOSImagePickerController
+@implementation QIOSImagePickerController {
+ QIOSFileDialog *m_fileDialog;
+}
-- (id)initWithQIOSFileDialog:(QIOSFileDialog *)fileDialog
+- (instancetype)initWithQIOSFileDialog:(QIOSFileDialog *)fileDialog
{
self = [super init];
if (self) {
m_fileDialog = fileDialog;
- [self setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
- [self setDelegate:self];
+ self.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
+ self.delegate = self;
}
return self;
}
@@ -57,8 +59,8 @@
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
Q_UNUSED(picker);
- NSURL *url = [info objectForKey:UIImagePickerControllerReferenceURL];
- QUrl fileUrl = QUrl::fromLocalFile(QString::fromNSString([url description]));
+ NSURL *url = info[UIImagePickerControllerReferenceURL];
+ QUrl fileUrl = QUrl::fromLocalFile(QString::fromNSString(url.description));
m_fileDialog->selectedFilesChanged(QList<QUrl>() << fileUrl);
emit m_fileDialog->accept();
}
diff --git a/src/plugins/platforms/ios/qiosclipboard.mm b/src/plugins/platforms/ios/qiosclipboard.mm
index 9a975eadc9..6bdbf94d3f 100644
--- a/src/plugins/platforms/ios/qiosclipboard.mm
+++ b/src/plugins/platforms/ios/qiosclipboard.mm
@@ -46,11 +46,11 @@
#include <QtGui/QGuiApplication>
@interface UIPasteboard (QUIPasteboard)
- + (UIPasteboard *)pasteboardWithQClipboardMode:(QClipboard::Mode)mode;
++ (instancetype)pasteboardWithQClipboardMode:(QClipboard::Mode)mode;
@end
@implementation UIPasteboard (QUIPasteboard)
-+ (UIPasteboard *)pasteboardWithQClipboardMode:(QClipboard::Mode)mode
++ (instancetype)pasteboardWithQClipboardMode:(QClipboard::Mode)mode
{
NSString *name = (mode == QClipboard::Clipboard) ? UIPasteboardNameGeneral : UIPasteboardNameFind;
return [UIPasteboard pasteboardWithName:name create:NO];
@@ -60,17 +60,15 @@
// --------------------------------------------------------------------
@interface QUIClipboard : NSObject
-{
-@public
+@end
+
+@implementation QUIClipboard {
QIOSClipboard *m_qiosClipboard;
NSInteger m_changeCountClipboard;
NSInteger m_changeCountFindBuffer;
}
-@end
-
-@implementation QUIClipboard
-- (id)initWithQIOSClipboard:(QIOSClipboard *)qiosClipboard
+- (instancetype)initWithQIOSClipboard:(QIOSClipboard *)qiosClipboard
{
self = [super init];
if (self) {
@@ -149,7 +147,7 @@ QStringList QIOSMimeData::formats() const
{
QStringList foundMimeTypes;
UIPasteboard *pb = [UIPasteboard pasteboardWithQClipboardMode:m_mode];
- NSArray *pasteboardTypes = [pb pasteboardTypes];
+ NSArray<NSString *> *pasteboardTypes = [pb pasteboardTypes];
for (NSUInteger i = 0; i < [pasteboardTypes count]; ++i) {
QString uti = QString::fromNSString([pasteboardTypes objectAtIndex:i]);
@@ -164,7 +162,7 @@ QStringList QIOSMimeData::formats() const
QVariant QIOSMimeData::retrieveData(const QString &mimeType, QVariant::Type) const
{
UIPasteboard *pb = [UIPasteboard pasteboardWithQClipboardMode:m_mode];
- NSArray *pasteboardTypes = [pb pasteboardTypes];
+ NSArray<NSString *> *pasteboardTypes = [pb pasteboardTypes];
foreach (QMacInternalPasteboardMime *converter,
QMacInternalPasteboardMime::all(QMacInternalPasteboardMime::MIME_ALL)) {
@@ -213,12 +211,12 @@ void QIOSClipboard::setMimeData(QMimeData *mimeData, QClipboard::Mode mode)
UIPasteboard *pb = [UIPasteboard pasteboardWithQClipboardMode:mode];
if (!mimeData) {
- pb.items = [NSArray array];
+ pb.items = [NSArray<NSDictionary<NSString *, id> *> array];
return;
}
mimeData->deleteLater();
- NSMutableDictionary *pbItem = [NSMutableDictionary dictionaryWithCapacity:mimeData->formats().size()];
+ NSMutableDictionary<NSString *, id> *pbItem = [NSMutableDictionary<NSString *, id> dictionaryWithCapacity:mimeData->formats().size()];
foreach (const QString &mimeType, mimeData->formats()) {
foreach (QMacInternalPasteboardMime *converter,
@@ -246,7 +244,7 @@ void QIOSClipboard::setMimeData(QMimeData *mimeData, QClipboard::Mode mode)
}
}
- pb.items = [NSArray arrayWithObject:pbItem];
+ pb.items = @[pbItem];
}
bool QIOSClipboard::supportsMode(QClipboard::Mode mode) const
diff --git a/src/plugins/platforms/ios/qioseventdispatcher.mm b/src/plugins/platforms/ios/qioseventdispatcher.mm
index 06e5e6cb80..6a6e1bd618 100644
--- a/src/plugins/platforms/ios/qioseventdispatcher.mm
+++ b/src/plugins/platforms/ios/qioseventdispatcher.mm
@@ -204,6 +204,11 @@ namespace
jmp_buf applicationWillTerminateJumpPoint;
bool debugStackUsage = false;
+
+ struct {
+ QAppleLogActivity UIApplicationMain;
+ QAppleLogActivity applicationDidFinishLaunching;
+ } logActivity;
}
extern "C" int qt_main_wrapper(int argc, char *argv[])
@@ -228,6 +233,9 @@ extern "C" int qt_main_wrapper(int argc, char *argv[])
}
}
+ logActivity.UIApplicationMain = QT_APPLE_LOG_ACTIVITY(
+ lcEventDispatcher().isDebugEnabled(), "UIApplicationMain").enter();
+
qCDebug(lcEventDispatcher) << "Running UIApplicationMain";
return UIApplicationMain(argc, argv, nil, NSStringFromClass([QIOSApplicationDelegate class]));
}
@@ -245,7 +253,7 @@ extern "C" int main(int argc, char *argv[]);
static void __attribute__((noinline, noreturn)) user_main_trampoline()
{
- NSArray *arguments = [[NSProcessInfo processInfo] arguments];
+ NSArray<NSString *> *arguments = [[NSProcessInfo processInfo] arguments];
int argc = arguments.count;
char **argv = new char*[argc];
@@ -263,11 +271,14 @@ static void __attribute__((noinline, noreturn)) user_main_trampoline()
int exitCode = main(argc, argv);
delete[] argv;
+ logActivity.applicationDidFinishLaunching.enter();
qCDebug(lcEventDispatcher) << "Returned from main with exit code " << exitCode;
if (Q_UNLIKELY(debugStackUsage))
userMainStack.printUsage();
+ logActivity.applicationDidFinishLaunching.leave();
+
if (applicationAboutToTerminate)
longjmp(applicationWillTerminateJumpPoint, kJumpedFromUserMainTrampoline);
@@ -322,6 +333,9 @@ static bool rootLevelRunLoopIntegration()
+ (void)applicationDidFinishLaunching:(NSNotification *)notification
{
+ logActivity.applicationDidFinishLaunching = QT_APPLE_LOG_ACTIVITY_WITH_PARENT(
+ lcEventDispatcher().isDebugEnabled(), "applicationDidFinishLaunching", logActivity.UIApplicationMain).enter();
+
qCDebug(lcEventDispatcher) << "Application launched with options" << notification.userInfo;
if (!isQtApplication())
@@ -339,10 +353,11 @@ static bool rootLevelRunLoopIntegration()
return;
}
-
switch (setjmp(processEventEnterJumpPoint)) {
- case kJumpPointSetSuccessfully:
+ case kJumpPointSetSuccessfully: {
qCDebug(lcEventDispatcher) << "Running main() on separate stack";
+ QT_APPLE_SCOPED_LOG_ACTIVITY(lcEventDispatcher().isDebugEnabled(), "main()");
+
// Redirect the stack pointer to the start of the reserved stack. This ensures
// that when we longjmp out of the event dispatcher and continue execution, the
// 'Qt main' call-stack will not be smashed, as it lives in a part of the stack
@@ -357,9 +372,11 @@ static bool rootLevelRunLoopIntegration()
Q_UNREACHABLE();
break;
+ }
case kJumpedFromEventDispatcherProcessEvents:
// We've returned from the longjmp in the event dispatcher,
// and the stack has been restored to its old self.
+ logActivity.UIApplicationMain.enter();
qCDebug(lcEventDispatcher) << "↳ Jumped from processEvents due to exec";
if (Q_UNLIKELY(debugStackUsage))
@@ -378,6 +395,10 @@ static const char kApplicationWillTerminateExitCode = char(SIGTERM | 0x80);
+ (void)applicationWillTerminate
{
+ QAppleLogActivity applicationWillTerminateActivity = QT_APPLE_LOG_ACTIVITY_WITH_PARENT(
+ lcEventDispatcher().isDebugEnabled(), "applicationWillTerminate", logActivity.UIApplicationMain).enter();
+ qCDebug(lcEventDispatcher) << "Application about to be terminated by iOS";
+
if (!isQtApplication())
return;
@@ -403,11 +424,14 @@ static const char kApplicationWillTerminateExitCode = char(SIGTERM | 0x80);
// so we'll never see the exit activity and have a chance to return from
// QEventLoop::exec(). We initiate the return manually as a workaround.
qCDebug(lcEventDispatcher) << "Manually triggering return from event loop exec";
+ applicationWillTerminateActivity.leave();
static_cast<QIOSJumpingEventDispatcher *>(qApp->eventDispatcher())->interruptEventLoopExec();
break;
case kJumpedFromUserMainTrampoline:
+ applicationWillTerminateActivity.enter();
// The user's main has returned, so we're ready to let iOS terminate the application
qCDebug(lcEventDispatcher) << "kJumpedFromUserMainTrampoline, allowing iOS to terminate";
+ applicationWillTerminateActivity.leave();
break;
default:
qFatal("Unexpected jump result in event loop integration");
@@ -446,6 +470,7 @@ bool QIOSEventDispatcher::processPostedEvents()
if (!QEventDispatcherCoreFoundation::processPostedEvents())
return false;
+ QT_APPLE_SCOPED_LOG_ACTIVITY(lcEventDispatcher().isDebugEnabled(), "sendWindowSystemEvents");
qCDebug(lcEventDispatcher) << "Sending window system events for" << m_processEvents.flags;
QWindowSystemInterface::sendWindowSystemEvents(m_processEvents.flags);
@@ -469,6 +494,7 @@ bool __attribute__((returns_twice)) QIOSJumpingEventDispatcher::processEvents(QE
}
if (!m_processEventLevel && (flags & QEventLoop::EventLoopExec)) {
+ QT_APPLE_SCOPED_LOG_ACTIVITY(lcEventDispatcher().isDebugEnabled(), "processEvents");
qCDebug(lcEventDispatcher) << "Processing events with flags" << flags;
++m_processEventLevel;
@@ -526,10 +552,12 @@ void QIOSJumpingEventDispatcher::interruptEventLoopExec()
switch (setjmp(processEventEnterJumpPoint)) {
case kJumpPointSetSuccessfully:
qCDebug(lcEventDispatcher) << "Jumping into processEvents due to system runloop exit ⇢";
+ logActivity.UIApplicationMain.leave();
longjmp(processEventExitJumpPoint, kJumpedFromEventLoopExecInterrupt);
break;
case kJumpedFromEventDispatcherProcessEvents:
// QEventLoop was re-executed
+ logActivity.UIApplicationMain.enter();
qCDebug(lcEventDispatcher) << "↳ Jumped from processEvents due to re-exec";
break;
default:
diff --git a/src/plugins/platforms/ios/qiosinputcontext.mm b/src/plugins/platforms/ios/qiosinputcontext.mm
index 493c283ec1..d2229df133 100644
--- a/src/plugins/platforms/ios/qiosinputcontext.mm
+++ b/src/plugins/platforms/ios/qiosinputcontext.mm
@@ -69,7 +69,7 @@ static QUIView *focusView()
@implementation QIOSLocaleListener
-- (id)init
+- (instancetype)init
{
if (self = [super init]) {
NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];
@@ -97,16 +97,15 @@ static QUIView *focusView()
// -------------------------------------------------------------------------
-@interface QIOSKeyboardListener : UIGestureRecognizer <UIGestureRecognizerDelegate> {
- @private
- QT_PREPEND_NAMESPACE(QIOSInputContext) *m_context;
-}
+@interface QIOSKeyboardListener : UIGestureRecognizer <UIGestureRecognizerDelegate>
@property BOOL hasDeferredScrollToCursor;
@end
-@implementation QIOSKeyboardListener
+@implementation QIOSKeyboardListener {
+ QT_PREPEND_NAMESPACE(QIOSInputContext) *m_context;
+}
-- (id)initWithQIOSInputContext:(QT_PREPEND_NAMESPACE(QIOSInputContext) *)context
+- (instancetype)initWithQIOSInputContext:(QT_PREPEND_NAMESPACE(QIOSInputContext) *)context
{
if (self = [super initWithTarget:self action:@selector(gestureStateChanged:)]) {
@@ -581,7 +580,7 @@ void QIOSInputContext::scroll(int y)
// Raise all known windows to above the status-bar if we're scrolling the screen,
// while keeping the relative window level between the windows the same.
- NSArray *applicationWindows = [qt_apple_sharedApplication() windows];
+ NSArray<UIWindow *> *applicationWindows = [qt_apple_sharedApplication() windows];
static QHash<UIWindow *, UIWindowLevel> originalWindowLevels;
for (UIWindow *window in applicationWindows) {
if (keyboardScrollIsActive && !originalWindowLevels.contains(window))
diff --git a/src/plugins/platforms/ios/qiosintegration.mm b/src/plugins/platforms/ios/qiosintegration.mm
index ed2bfbc0d8..9a5a0ab499 100644
--- a/src/plugins/platforms/ios/qiosintegration.mm
+++ b/src/plugins/platforms/ios/qiosintegration.mm
@@ -100,7 +100,7 @@ QIOSIntegration::QIOSIntegration()
void QIOSIntegration::initialize()
{
UIScreen *mainScreen = [UIScreen mainScreen];
- NSMutableArray *screens = [[[UIScreen screens] mutableCopy] autorelease];
+ NSMutableArray<UIScreen *> *screens = [[[UIScreen screens] mutableCopy] autorelease];
if (![screens containsObject:mainScreen]) {
// Fallback for iOS 7.1 (QTBUG-42345)
[screens insertObject:mainScreen atIndex:0];
diff --git a/src/plugins/platforms/ios/qiosmenu.mm b/src/plugins/platforms/ios/qiosmenu.mm
index 6c70676a31..74a77de757 100644
--- a/src/plugins/platforms/ios/qiosmenu.mm
+++ b/src/plugins/platforms/ios/qiosmenu.mm
@@ -60,14 +60,14 @@ QIOSMenu *QIOSMenu::m_currentMenu = 0;
static NSString *const kSelectorPrefix = @"_qtMenuItem_";
-@interface QUIMenuController : UIResponder {
- QIOSMenuItemList m_visibleMenuItems;
-}
+@interface QUIMenuController : UIResponder
@end
-@implementation QUIMenuController
+@implementation QUIMenuController {
+ QIOSMenuItemList m_visibleMenuItems;
+}
-- (id)initWithVisibleMenuItems:(const QIOSMenuItemList &)visibleMenuItems
+- (instancetype)initWithVisibleMenuItems:(const QIOSMenuItemList &)visibleMenuItems
{
if (self = [super init]) {
[self setVisibleMenuItems:visibleMenuItems];
@@ -80,7 +80,7 @@ static NSString *const kSelectorPrefix = @"_qtMenuItem_";
return self;
}
--(void)dealloc
+- (void)dealloc
{
[[NSNotificationCenter defaultCenter]
removeObserver:self
@@ -91,7 +91,7 @@ static NSString *const kSelectorPrefix = @"_qtMenuItem_";
- (void)setVisibleMenuItems:(const QIOSMenuItemList &)visibleMenuItems
{
m_visibleMenuItems = visibleMenuItems;
- NSMutableArray *menuItemArray = [NSMutableArray arrayWithCapacity:m_visibleMenuItems.size()];
+ NSMutableArray<UIMenuItem *> *menuItemArray = [NSMutableArray<UIMenuItem *> arrayWithCapacity:m_visibleMenuItems.size()];
// Create an array of UIMenuItems, one for each visible QIOSMenuItem. Each
// UIMenuItem needs a callback assigned, so we assign one of the placeholder methods
// added to UIWindow (QIOSMenuActionTargets) below. Each method knows its own index, which
@@ -107,7 +107,7 @@ static NSString *const kSelectorPrefix = @"_qtMenuItem_";
[[UIMenuController sharedMenuController] setMenuVisible:YES animated:NO];
}
--(void)menuClosed
+- (void)menuClosed
{
QIOSMenu::currentMenu()->dismiss();
}
@@ -141,19 +141,19 @@ static NSString *const kSelectorPrefix = @"_qtMenuItem_";
// -------------------------------------------------------------------------
-@interface QUIPickerView : UIPickerView <UIPickerViewDelegate, UIPickerViewDataSource> {
- QIOSMenuItemList m_visibleMenuItems;
- QPointer<QObject> m_focusObjectWithPickerView;
- NSInteger m_selectedRow;
-}
+@interface QUIPickerView : UIPickerView <UIPickerViewDelegate, UIPickerViewDataSource>
@property(retain) UIToolbar *toolbar;
@end
-@implementation QUIPickerView
+@implementation QUIPickerView {
+ QIOSMenuItemList m_visibleMenuItems;
+ QPointer<QObject> m_focusObjectWithPickerView;
+ NSInteger m_selectedRow;
+}
-- (id)initWithVisibleMenuItems:(const QIOSMenuItemList &)visibleMenuItems selectItem:(const QIOSMenuItem *)selectItem
+- (instancetype)initWithVisibleMenuItems:(const QIOSMenuItemList &)visibleMenuItems selectItem:(const QIOSMenuItem *)selectItem
{
if (self = [super init]) {
[self setVisibleMenuItems:visibleMenuItems selectItem:selectItem];
@@ -172,7 +172,7 @@ static NSString *const kSelectorPrefix = @"_qtMenuItem_";
UIBarButtonItem *doneButton = [[[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemDone
target:self action:@selector(closeMenu)] autorelease];
- [self.toolbar setItems:[NSArray arrayWithObjects:cancelButton, spaceButton, doneButton, nil]];
+ [self.toolbar setItems:@[cancelButton, spaceButton, doneButton]];
[self setDelegate:self];
[self setDataSource:self];
diff --git a/src/plugins/platforms/ios/qiosoptionalplugininterface.h b/src/plugins/platforms/ios/qiosoptionalplugininterface.h
index 660c74e856..bae9e5a0d8 100644
--- a/src/plugins/platforms/ios/qiosoptionalplugininterface.h
+++ b/src/plugins/platforms/ios/qiosoptionalplugininterface.h
@@ -44,10 +44,10 @@
#include "qiosfiledialog.h"
-QT_BEGIN_NAMESPACE
-
Q_FORWARD_DECLARE_OBJC_CLASS(UIViewController);
+QT_BEGIN_NAMESPACE
+
#define QIosOptionalPluginInterface_iid "org.qt-project.Qt.QPA.ios.optional"
class QIosOptionalPluginInterface
diff --git a/src/plugins/platforms/ios/qiosscreen.mm b/src/plugins/platforms/ios/qiosscreen.mm
index f367d1e75e..f1121a102b 100644
--- a/src/plugins/platforms/ios/qiosscreen.mm
+++ b/src/plugins/platforms/ios/qiosscreen.mm
@@ -132,16 +132,14 @@ static QIOSScreen* qtPlatformScreenFor(UIScreen *uiScreen)
// -------------------------------------------------------------------------
-@interface QIOSOrientationListener : NSObject {
- @public
- QIOSScreen *m_screen;
-}
-- (id)initWithQIOSScreen:(QIOSScreen *)screen;
+@interface QIOSOrientationListener : NSObject
@end
-@implementation QIOSOrientationListener
+@implementation QIOSOrientationListener {
+ QIOSScreen *m_screen;
+}
-- (id)initWithQIOSScreen:(QIOSScreen *)screen
+- (instancetype)initWithQIOSScreen:(QIOSScreen *)screen
{
self = [super init];
if (self) {
@@ -195,7 +193,7 @@ static QIOSScreen* qtPlatformScreenFor(UIScreen *uiScreen)
@implementation QUIWindow
-- (id)initWithFrame:(CGRect)frame
+- (instancetype)initWithFrame:(CGRect)frame
{
if ((self = [super initWithFrame:frame]))
self->_sendingEvent = NO;
@@ -399,17 +397,21 @@ void QIOSScreen::deliverUpdateRequests() const
QList<QWindow*> windows = QGuiApplication::allWindows();
for (int i = 0; i < windows.size(); ++i) {
- if (platformScreenForWindow(windows.at(i)) != this)
+ QWindow *window = windows.at(i);
+ if (platformScreenForWindow(window) != this)
+ continue;
+
+ QPlatformWindow *platformWindow = window->handle();
+ if (!platformWindow)
continue;
- QWindowPrivate *wp = static_cast<QWindowPrivate *>(QObjectPrivate::get(windows.at(i)));
- if (!wp->updateRequestPending)
+ if (!platformWindow->hasPendingUpdateRequest())
continue;
- wp->deliverUpdateRequest();
+ platformWindow->deliverUpdateRequest();
// Another update request was triggered, keep the display link running
- if (wp->updateRequestPending)
+ if (platformWindow->hasPendingUpdateRequest())
pauseUpdates = false;
}
diff --git a/src/plugins/platforms/ios/qiostextinputoverlay.mm b/src/plugins/platforms/ios/qiostextinputoverlay.mm
index 87c282e24a..e5419b1766 100644
--- a/src/plugins/platforms/ios/qiostextinputoverlay.mm
+++ b/src/plugins/platforms/ios/qiostextinputoverlay.mm
@@ -97,7 +97,7 @@ static void executeBlockWithoutAnimation(Block block)
@implementation QIOSEditMenu
-- (id)init
+- (instancetype)init
{
if (self = [super init]) {
NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
@@ -161,7 +161,13 @@ static void executeBlockWithoutAnimation(Block block)
// -------------------------------------------------------------------------
-@interface QIOSLoupeLayer : CALayer {
+@interface QIOSLoupeLayer : CALayer
+@property (nonatomic, retain) UIView *targetView;
+@property (nonatomic, assign) CGPoint focalPoint;
+@property (nonatomic, assign) BOOL visible;
+@end
+
+@implementation QIOSLoupeLayer {
UIView *_snapshotView;
BOOL _pendingSnapshotUpdate;
UIView *_loupeImageView;
@@ -169,14 +175,8 @@ static void executeBlockWithoutAnimation(Block block)
CGFloat _loupeOffset;
QTimer _updateTimer;
}
-@property (nonatomic, retain) UIView *targetView;
-@property (nonatomic, assign) CGPoint focalPoint;
-@property (nonatomic, assign) BOOL visible;
-@end
-@implementation QIOSLoupeLayer
-
-- (id)initWithSize:(CGSize)size cornerRadius:(CGFloat)cornerRadius bottomOffset:(CGFloat)bottomOffset
+- (instancetype)initWithSize:(CGSize)size cornerRadius:(CGFloat)cornerRadius bottomOffset:(CGFloat)bottomOffset
{
if (self = [super init]) {
_loupeOffset = bottomOffset + (size.height / 2);
@@ -302,26 +302,22 @@ static void executeBlockWithoutAnimation(Block block)
// -------------------------------------------------------------------------
-#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_10_0)
-@interface QIOSHandleLayer : CALayer <CAAnimationDelegate> {
-#else
-@interface QIOSHandleLayer : CALayer {
-#endif
- CALayer *_handleCursorLayer;
- CALayer *_handleKnobLayer;
- Qt::Edge _selectionEdge;
-}
+@interface QIOSHandleLayer : CALayer <CAAnimationDelegate>
@property (nonatomic, assign) CGRect cursorRectangle;
@property (nonatomic, assign) CGFloat handleScale;
@property (nonatomic, assign) BOOL visible;
@property (nonatomic, copy) Block onAnimationDidStop;
@end
-@implementation QIOSHandleLayer
+@implementation QIOSHandleLayer {
+ CALayer *_handleCursorLayer;
+ CALayer *_handleKnobLayer;
+ Qt::Edge _selectionEdge;
+}
@dynamic handleScale;
-- (id)initWithKnobAtEdge:(Qt::Edge)selectionEdge
+- (instancetype)initWithKnobAtEdge:(Qt::Edge)selectionEdge
{
if (self = [super init]) {
CGColorRef bgColor = [UIColor colorWithRed:0.1 green:0.4 blue:0.9 alpha:1].CGColor;
@@ -356,16 +352,8 @@ static void executeBlockWithoutAnimation(Block block)
// The handle should "bounce" in when becoming visible
CAKeyframeAnimation * animation = [CAKeyframeAnimation animationWithKeyPath:key];
[animation setDuration:0.5];
- animation.values = [NSArray arrayWithObjects:
- [NSNumber numberWithFloat:0],
- [NSNumber numberWithFloat:1.3],
- [NSNumber numberWithFloat:1.3],
- [NSNumber numberWithFloat:1], nil];
- animation.keyTimes = [NSArray arrayWithObjects:
- [NSNumber numberWithFloat:0],
- [NSNumber numberWithFloat:0.3],
- [NSNumber numberWithFloat:0.9],
- [NSNumber numberWithFloat:1], nil];
+ animation.values = @[@(0.0f), @(1.3f), @(1.3f), @(1.0f)];
+ animation.keyTimes = @[@(0.0f), @(0.3f), @(0.9f), @(1.0f)];
return animation;
} else {
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:key];
@@ -437,8 +425,13 @@ static void executeBlockWithoutAnimation(Block block)
below will inherit. It takes care of creating and showing a magnifier
glass depending on the current gesture state.
*/
-@interface QIOSLoupeRecognizer : UIGestureRecognizer <UIGestureRecognizerDelegate> {
-@public
+@interface QIOSLoupeRecognizer : UIGestureRecognizer <UIGestureRecognizerDelegate>
+@property (nonatomic, assign) QPointF focalPoint;
+@property (nonatomic, assign) BOOL dragTriggersGesture;
+@property (nonatomic, readonly) UIView *focusView;
+@end
+
+@implementation QIOSLoupeRecognizer {
QIOSLoupeLayer *_loupeLayer;
UIView *_desktopView;
CGPoint _firstTouchPoint;
@@ -446,14 +439,8 @@ static void executeBlockWithoutAnimation(Block block)
QTimer _triggerStateBeganTimer;
int _originalCursorFlashTime;
}
-@property (nonatomic, assign) QPointF focalPoint;
-@property (nonatomic, assign) BOOL dragTriggersGesture;
-@property (nonatomic, readonly) UIView *focusView;
-@end
-@implementation QIOSLoupeRecognizer
-
-- (id)init
+- (instancetype)init
{
if (self = [super initWithTarget:self action:@selector(gestureStateChanged)]) {
self.enabled = NO;
@@ -658,7 +645,10 @@ static void executeBlockWithoutAnimation(Block block)
on the sides. If the user starts dragging on a handle (or do a press and
hold), it will show a magnifier glass that follows the handle as it moves.
*/
-@interface QIOSSelectionRecognizer : QIOSLoupeRecognizer {
+@interface QIOSSelectionRecognizer : QIOSLoupeRecognizer
+@end
+
+@implementation QIOSSelectionRecognizer {
CALayer *_clipRectLayer;
QIOSHandleLayer *_cursorLayer;
QIOSHandleLayer *_anchorLayer;
@@ -670,11 +660,8 @@ static void executeBlockWithoutAnimation(Block block)
QMetaObject::Connection _anchorConnection;
QMetaObject::Connection _clipRectConnection;
}
-@end
-
-@implementation QIOSSelectionRecognizer
-- (id)init
+- (instancetype)init
{
if (self = [super init]) {
self.delaysTouchesBegan = YES;
@@ -890,15 +877,15 @@ static void executeBlockWithoutAnimation(Block block)
visibility of the edit menu will be toggled. Otherwise, if there's a selection, a
first tap will close the edit menu (if any), and a second tap will remove the selection.
*/
-@interface QIOSTapRecognizer : UITapGestureRecognizer {
+@interface QIOSTapRecognizer : UITapGestureRecognizer
+@end
+
+@implementation QIOSTapRecognizer {
int _cursorPosOnPress;
UIView *_focusView;
}
-@end
-
-@implementation QIOSTapRecognizer
-- (id)init
+- (instancetype)init
{
if (self = [super initWithTarget:self action:@selector(gestureStateChanged)]) {
self.enabled = NO;
diff --git a/src/plugins/platforms/ios/qiostextresponder.h b/src/plugins/platforms/ios/qiostextresponder.h
index 77be2cf2fe..074598c1c3 100644
--- a/src/plugins/platforms/ios/qiostextresponder.h
+++ b/src/plugins/platforms/ios/qiostextresponder.h
@@ -49,16 +49,8 @@ class QIOSInputContext;
QT_END_NAMESPACE
@interface QIOSTextInputResponder : UIResponder <UITextInputTraits, UIKeyInput, UITextInput>
-{
- @private
- QT_PREPEND_NAMESPACE(QIOSInputContext) *m_inputContext;
- QT_PREPEND_NAMESPACE(QInputMethodQueryEvent) *m_configuredImeState;
- QString m_markedText;
- BOOL m_inSendEventToFocusObject;
- BOOL m_inSelectionChange;
-}
-- (id)initWithInputContext:(QT_PREPEND_NAMESPACE(QIOSInputContext) *)context;
+- (instancetype)initWithInputContext:(QT_PREPEND_NAMESPACE(QIOSInputContext) *)context;
- (BOOL)needsKeyboardReconfigure:(Qt::InputMethodQueries)updatedProperties;
- (void)notifyInputDelegate:(Qt::InputMethodQueries)updatedProperties;
diff --git a/src/plugins/platforms/ios/qiostextresponder.mm b/src/plugins/platforms/ios/qiostextresponder.mm
index b029c49a67..91a088ede1 100644
--- a/src/plugins/platforms/ios/qiostextresponder.mm
+++ b/src/plugins/platforms/ios/qiostextresponder.mm
@@ -55,13 +55,13 @@
@interface QUITextPosition : UITextPosition
@property (nonatomic) NSUInteger index;
-+ (QUITextPosition *)positionWithIndex:(NSUInteger)index;
++ (instancetype)positionWithIndex:(NSUInteger)index;
@end
@implementation QUITextPosition
-+ (QUITextPosition *)positionWithIndex:(NSUInteger)index
++ (instancetype)positionWithIndex:(NSUInteger)index
{
QUITextPosition *pos = [[QUITextPosition alloc] init];
pos.index = index;
@@ -75,15 +75,15 @@
@interface QUITextRange : UITextRange
@property (nonatomic) NSRange range;
-+ (QUITextRange *)rangeWithNSRange:(NSRange)range;
++ (instancetype)rangeWithNSRange:(NSRange)range;
@end
@implementation QUITextRange
-+ (QUITextRange *)rangeWithNSRange:(NSRange)nsrange
++ (instancetype)rangeWithNSRange:(NSRange)nsrange
{
- QUITextRange *range = [[QUITextRange alloc] init];
+ QUITextRange *range = [[self alloc] init];
range.range = nsrange;
return [range autorelease];
}
@@ -117,7 +117,7 @@
@implementation WrapperView
-- (id)initWithView:(UIView *)view
+- (instancetype)initWithView:(UIView *)view
{
if (self = [self init]) {
[self addSubview:view];
@@ -132,7 +132,7 @@
- (void)layoutSubviews
{
- UIView* view = [self.subviews firstObject];
+ UIView *view = [self.subviews firstObject];
view.frame = self.bounds;
// FIXME: During orientation changes the size and position
@@ -161,9 +161,15 @@
// -------------------------------------------------------------------------
-@implementation QIOSTextInputResponder
+@implementation QIOSTextInputResponder {
+ QT_PREPEND_NAMESPACE(QIOSInputContext) *m_inputContext;
+ QT_PREPEND_NAMESPACE(QInputMethodQueryEvent) *m_configuredImeState;
+ QString m_markedText;
+ BOOL m_inSendEventToFocusObject;
+ BOOL m_inSelectionChange;
+}
-- (id)initWithInputContext:(QT_PREPEND_NAMESPACE(QIOSInputContext) *)inputContext
+- (instancetype)initWithInputContext:(QT_PREPEND_NAMESPACE(QIOSInputContext) *)inputContext
{
if (!(self = [self init]))
return self;
@@ -548,7 +554,7 @@
[self sendKeyPressRelease:key modifiers:modifiers];
}
-- (void)addKeyCommandsToArray:(NSMutableArray *)array key:(NSString *)key
+- (void)addKeyCommandsToArray:(NSMutableArray<UIKeyCommand *> *)array key:(NSString *)key
{
SEL s = @selector(keyCommandTriggered:);
[array addObject:[UIKeyCommand keyCommandWithInput:key modifierFlags:0 action:s]];
@@ -559,19 +565,19 @@
[array addObject:[UIKeyCommand keyCommandWithInput:key modifierFlags:UIKeyModifierCommand|UIKeyModifierShift action:s]];
}
-- (NSArray *)keyCommands
+- (NSArray<UIKeyCommand *> *)keyCommands
{
// Since keyCommands is called for every key
// press/release, we cache the result
static dispatch_once_t once;
- static NSMutableArray *array;
+ static NSMutableArray<UIKeyCommand *> *array;
dispatch_once(&once, ^{
// We let Qt move the cursor around when the arrow keys are being used. This
// is normally implemented through UITextInput, but since IM in Qt have poor
// support for moving the cursor vertically, and even less support for selecting
// text across multiple paragraphs, we do this through key events.
- array = [NSMutableArray new];
+ array = [NSMutableArray<UIKeyCommand *> new];
[self addKeyCommandsToArray:array key:UIKeyInputUpArrow];
[self addKeyCommandsToArray:array key:UIKeyInputDownArrow];
[self addKeyCommandsToArray:array key:UIKeyInputLeftArrow];
@@ -825,13 +831,13 @@
return startRect.united(endRect).toCGRect();
}
-- (NSArray *)selectionRectsForRange:(UITextRange *)range
+- (NSArray<UITextSelectionRect *> *)selectionRectsForRange:(UITextRange *)range
{
Q_UNUSED(range);
// This method is supposed to return a rectangle for each line with selection. Since we don't
// expose an API in Qt/IM for getting this information, and since we never seems to be getting
// a call from UIKit for this, we return an empty array until a need arise.
- return [[NSArray new] autorelease];
+ return [[NSArray<UITextSelectionRect *> new] autorelease];
}
- (CGRect)caretRectForPosition:(UITextPosition *)position
@@ -916,7 +922,7 @@
QObject *focusObject = QGuiApplication::focusObject();
if (!focusObject)
- return [NSDictionary dictionary];
+ return @{};
// Assume position is the same as the cursor for now. QInputMethodQueryEvent with Qt::ImFont
// needs to be extended to take an extra position argument before this can be fully correct.
@@ -925,8 +931,8 @@
QFont qfont = qvariant_cast<QFont>(e.value(Qt::ImFont));
UIFont *uifont = [UIFont fontWithName:qfont.family().toNSString() size:qfont.pointSize()];
if (!uifont)
- return [NSDictionary dictionary];
- return [NSDictionary dictionaryWithObject:uifont forKey:NSFontAttributeName];
+ return @{};
+ return @{NSFontAttributeName: uifont};
}
#endif
diff --git a/src/plugins/platforms/ios/qiosviewcontroller.h b/src/plugins/platforms/ios/qiosviewcontroller.h
index 07d5535e1a..7af4c83b48 100644
--- a/src/plugins/platforms/ios/qiosviewcontroller.h
+++ b/src/plugins/platforms/ios/qiosviewcontroller.h
@@ -48,7 +48,7 @@ QT_END_NAMESPACE
@interface QIOSViewController : UIViewController
-- (id)initWithQIOSScreen:(QT_PREPEND_NAMESPACE(QIOSScreen) *)screen;
+- (instancetype)initWithQIOSScreen:(QT_PREPEND_NAMESPACE(QIOSScreen) *)screen;
- (void)updateProperties;
#ifndef Q_OS_TVOS
diff --git a/src/plugins/platforms/ios/qiosviewcontroller.mm b/src/plugins/platforms/ios/qiosviewcontroller.mm
index aa909d6f63..ce2aa96ca5 100644
--- a/src/plugins/platforms/ios/qiosviewcontroller.mm
+++ b/src/plugins/platforms/ios/qiosviewcontroller.mm
@@ -57,12 +57,8 @@
// -------------------------------------------------------------------------
-@interface QIOSViewController () {
- @public
- QPointer<QT_PREPEND_NAMESPACE(QIOSScreen)> m_screen;
- BOOL m_updatingProperties;
- QMetaObject::Connection m_focusWindowChangeConnection;
-}
+@interface QIOSViewController ()
+@property (nonatomic, assign) QPointer<QT_PREPEND_NAMESPACE(QIOSScreen)> platformScreen;
@property (nonatomic, assign) BOOL changingOrientation;
@end
@@ -73,7 +69,7 @@
@implementation QIOSDesktopManagerView
-- (id)init
+- (instancetype)init
{
if (!(self = [super init]))
return nil;
@@ -126,7 +122,7 @@
{
Q_UNUSED(subview);
- QT_PREPEND_NAMESPACE(QIOSScreen) *screen = self.qtViewController->m_screen;
+ QT_PREPEND_NAMESPACE(QIOSScreen) *screen = self.qtViewController.platformScreen;
// The 'window' property of our view is not valid until the window
// has been shown, so we have to access it through the QIOSScreen.
@@ -171,7 +167,7 @@
// here. iOS will still use the latest rendered frame to create the
// application switcher thumbnail, but it will be based on the last
// active orientation of the application.
- QIOSScreen *screen = self.qtViewController->m_screen;
+ QIOSScreen *screen = self.qtViewController.platformScreen;
qCDebug(lcQpaWindow) << "ignoring layout of subviews while suspended,"
<< "likely system snapshot of" << screen->screen()->primaryOrientation();
return;
@@ -247,7 +243,10 @@
// -------------------------------------------------------------------------
-@implementation QIOSViewController
+@implementation QIOSViewController {
+ BOOL m_updatingProperties;
+ QMetaObject::Connection m_focusWindowChangeConnection;
+}
#ifndef Q_OS_TVOS
@synthesize prefersStatusBarHidden;
@@ -255,11 +254,10 @@
@synthesize preferredStatusBarStyle;
#endif
-- (id)initWithQIOSScreen:(QT_PREPEND_NAMESPACE(QIOSScreen) *)screen
+- (instancetype)initWithQIOSScreen:(QT_PREPEND_NAMESPACE(QIOSScreen) *)screen
{
if (self = [self init]) {
- m_screen = screen;
-
+ self.platformScreen = screen;
self.changingOrientation = NO;
#ifndef Q_OS_TVOS
@@ -333,7 +331,7 @@
- (BOOL)shouldAutorotate
{
#ifndef Q_OS_TVOS
- return m_screen && m_screen->uiScreen() == [UIScreen mainScreen] && !self.lockedOrientation;
+ return self.platformScreen && self.platformScreen->uiScreen() == [UIScreen mainScreen] && !self.lockedOrientation;
#else
return NO;
#endif
@@ -413,8 +411,8 @@
if (!QCoreApplication::instance())
return;
- if (m_screen)
- m_screen->updateProperties();
+ if (self.platformScreen)
+ self.platformScreen->updateProperties();
}
// -------------------------------------------------------------------------
@@ -424,12 +422,12 @@
if (!isQtApplication())
return;
- if (!m_screen || !m_screen->screen())
+ if (!self.platformScreen || !self.platformScreen->screen())
return;
// For now we only care about the main screen, as both the statusbar
// visibility and orientation is only appropriate for the main screen.
- if (m_screen->uiScreen() != [UIScreen mainScreen])
+ if (self.platformScreen->uiScreen() != [UIScreen mainScreen])
return;
// Prevent recursion caused by updating the status bar appearance (position
@@ -451,7 +449,7 @@
return;
// We only care about changes to focusWindow that involves our screen
- if (!focusWindow->screen() || focusWindow->screen()->handle() != m_screen)
+ if (!focusWindow->screen() || focusWindow->screen()->handle() != self.platformScreen)
return;
// All decisions are based on the the top level window
diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm
index 6ee258e363..cdec57de71 100644
--- a/src/plugins/platforms/ios/qioswindow.mm
+++ b/src/plugins/platforms/ios/qioswindow.mm
@@ -96,7 +96,7 @@ QIOSWindow::~QIOSWindow()
[m_view touchesCancelled:[NSSet set] withEvent:0];
clearAccessibleCache();
- m_view->m_qioswindow = 0;
+ m_view.platformWindow = 0;
[m_view removeFromSuperview];
[m_view release];
}
@@ -139,7 +139,7 @@ void QIOSWindow::setVisible(bool visible)
} else if (!visible && [m_view isActiveWindow]) {
// Our window was active/focus window but now hidden, so relinquish
// focus to the next possible window in the stack.
- NSArray *subviews = m_view.viewController.view.subviews;
+ NSArray<UIView *> *subviews = m_view.viewController.view.subviews;
for (int i = int(subviews.count) - 1; i >= 0; --i) {
UIView *view = [subviews objectAtIndex:i];
if (view.hidden)
@@ -301,7 +301,7 @@ void QIOSWindow::raiseOrLower(bool raise)
if (!isQtApplication())
return;
- NSArray *subviews = m_view.superview.subviews;
+ NSArray<UIView *> *subviews = m_view.superview.subviews;
if (subviews.count == 1)
return;
diff --git a/src/plugins/platforms/ios/quiaccessibilityelement.h b/src/plugins/platforms/ios/quiaccessibilityelement.h
index 03abf5407e..6b8efdcede 100644
--- a/src/plugins/platforms/ios/quiaccessibilityelement.h
+++ b/src/plugins/platforms/ios/quiaccessibilityelement.h
@@ -45,13 +45,12 @@
#ifndef QT_NO_ACCESSIBILITY
-@interface QMacAccessibilityElement : UIAccessibilityElement
-{}
+@interface QT_MANGLE_NAMESPACE(QMacAccessibilityElement) : UIAccessibilityElement
@property (readonly) QAccessible::Id axid;
-- (id)initWithId:(QAccessible::Id)anId withAccessibilityContainer:(id)view;
-+ (QMacAccessibilityElement *)elementWithId:(QAccessible::Id)anId withAccessibilityContainer:(id)view;
+- (instancetype)initWithId:(QAccessible::Id)anId withAccessibilityContainer:(id)view;
++ (instancetype)elementWithId:(QAccessible::Id)anId withAccessibilityContainer:(id)view;
@end
diff --git a/src/plugins/platforms/ios/quiaccessibilityelement.mm b/src/plugins/platforms/ios/quiaccessibilityelement.mm
index a26ba61b3c..3154536aad 100644
--- a/src/plugins/platforms/ios/quiaccessibilityelement.mm
+++ b/src/plugins/platforms/ios/quiaccessibilityelement.mm
@@ -42,20 +42,23 @@
#ifndef QT_NO_ACCESSIBILITY
#include "private/qaccessiblecache_p.h"
+#include "private/qcore_mac_p.h"
+
+QT_NAMESPACE_ALIAS_OBJC_CLASS(QMacAccessibilityElement);
@implementation QMacAccessibilityElement
-- (id)initWithId:(QAccessible::Id)anId withAccessibilityContainer:(id)view
+- (instancetype)initWithId:(QAccessible::Id)anId withAccessibilityContainer:(id)view
{
Q_ASSERT((int)anId < 0);
- self = [super initWithAccessibilityContainer: view];
+ self = [super initWithAccessibilityContainer:view];
if (self)
_axid = anId;
return self;
}
-+ (id)elementWithId:(QAccessible::Id)anId withAccessibilityContainer:(id)view
++ (instancetype)elementWithId:(QAccessible::Id)anId withAccessibilityContainer:(id)view
{
Q_ASSERT(anId);
if (!anId)
@@ -63,10 +66,10 @@
QAccessibleCache *cache = QAccessibleCache::instance();
- QT_MANGLE_NAMESPACE(QMacAccessibilityElement) *element = cache->elementForId(anId);
+ QMacAccessibilityElement *element = cache->elementForId(anId);
if (!element) {
Q_ASSERT(QAccessible::accessibleInterface(anId));
- element = [[self alloc] initWithId:anId withAccessibilityContainer: view];
+ element = [[self alloc] initWithId:anId withAccessibilityContainer:view];
cache->insertElement(anId, element);
}
return element;
diff --git a/src/plugins/platforms/ios/quiview.h b/src/plugins/platforms/ios/quiview.h
index 3e3c579075..e1d5d5af0c 100644
--- a/src/plugins/platforms/ios/quiview.h
+++ b/src/plugins/platforms/ios/quiview.h
@@ -53,21 +53,10 @@ QT_END_NAMESPACE
@class QIOSViewController;
@interface QUIView : UIView
-{
- @public
- QT_PREPEND_NAMESPACE(QIOSWindow) *m_qioswindow;
- @private
- QHash<UITouch *, QWindowSystemInterface::TouchPoint> m_activeTouches;
- UITouch *m_activePencilTouch;
- int m_nextTouchId;
-
- @private
- NSMutableArray *m_accessibleElements;
-};
-
-- (id)initWithQIOSWindow:(QT_PREPEND_NAMESPACE(QIOSWindow) *)window;
+- (instancetype)initWithQIOSWindow:(QT_PREPEND_NAMESPACE(QIOSWindow) *)window;
- (void)sendUpdatedExposeEvent;
- (BOOL)isActiveWindow;
+@property (nonatomic, assign) QT_PREPEND_NAMESPACE(QIOSWindow) *platformWindow;
@end
@interface QUIView (Accessibility)
diff --git a/src/plugins/platforms/ios/quiview.mm b/src/plugins/platforms/ios/quiview.mm
index 8db36705c0..de60bd7c36 100644
--- a/src/plugins/platforms/ios/quiview.mm
+++ b/src/plugins/platforms/ios/quiview.mm
@@ -55,7 +55,12 @@
Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
-@implementation QUIView
+@implementation QUIView {
+ QHash<UITouch *, QWindowSystemInterface::TouchPoint> m_activeTouches;
+ UITouch *m_activePencilTouch;
+ int m_nextTouchId;
+ NSMutableArray<UIAccessibilityElement *> *m_accessibleElements;
+}
+ (void)load
{
@@ -82,25 +87,26 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
return [CAEAGLLayer class];
}
-- (id)initWithQIOSWindow:(QT_PREPEND_NAMESPACE(QIOSWindow) *)window
+- (instancetype)initWithQIOSWindow:(QT_PREPEND_NAMESPACE(QIOSWindow) *)window
{
if (self = [self initWithFrame:window->geometry().toCGRect()]) {
- m_qioswindow = window;
- m_accessibleElements = [[NSMutableArray alloc] init];
+ self.platformWindow = window;
+ m_accessibleElements = [[NSMutableArray<UIAccessibilityElement *> alloc] init];
}
return self;
}
-- (id)initWithFrame:(CGRect)frame
+- (instancetype)initWithFrame:(CGRect)frame
{
if ((self = [super initWithFrame:frame])) {
// Set up EAGL layer
CAEAGLLayer *eaglLayer = static_cast<CAEAGLLayer *>(self.layer);
eaglLayer.opaque = TRUE;
- eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:
- [NSNumber numberWithBool:YES], kEAGLDrawablePropertyRetainedBacking,
- kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, nil];
+ eaglLayer.drawableProperties = @{
+ kEAGLDrawablePropertyRetainedBacking: @(YES),
+ kEAGLDrawablePropertyColorFormat: kEAGLColorFormatRGBA8
+ };
if (isQtApplication())
self.hidden = YES;
@@ -156,7 +162,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
#ifndef QT_NO_DEBUG_STREAM
QString platformWindowDescription;
QDebug debug(&platformWindowDescription);
- debug.nospace() << "; " << m_qioswindow << ">";
+ debug.nospace() << "; " << self.platformWindow << ">";
NSRange lastCharacter = [description rangeOfComposedCharacterSequenceAtIndex:description.length - 1];
[description replaceCharactersInRange:lastCharacter withString:platformWindowDescription.toNSString()];
#endif
@@ -210,10 +216,10 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
if (!CGAffineTransformIsIdentity(self.transform))
qWarning() << self << "has a transform set. This is not supported.";
- QWindow *window = m_qioswindow->window();
+ QWindow *window = self.platformWindow->window();
QRect lastReportedGeometry = qt_window_private(window)->geometry;
QRect currentGeometry = QRectF::fromCGRect(self.frame).toRect();
- qCDebug(lcQpaWindow) << m_qioswindow << "new geometry is" << currentGeometry;
+ qCDebug(lcQpaWindow) << self.platformWindow << "new geometry is" << currentGeometry;
QWindowSystemInterface::handleGeometryChange(window, currentGeometry);
if (currentGeometry.size() != lastReportedGeometry.size()) {
@@ -237,29 +243,29 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
{
QRegion region;
- if (m_qioswindow->isExposed()) {
+ if (self.platformWindow->isExposed()) {
QSize bounds = QRectF::fromCGRect(self.layer.bounds).toRect().size();
- Q_ASSERT(m_qioswindow->geometry().size() == bounds);
- Q_ASSERT(self.hidden == !m_qioswindow->window()->isVisible());
+ Q_ASSERT(self.platformWindow->geometry().size() == bounds);
+ Q_ASSERT(self.hidden == !self.platformWindow->window()->isVisible());
region = QRect(QPoint(), bounds);
}
- qCDebug(lcQpaWindow) << m_qioswindow << region << "isExposed" << m_qioswindow->isExposed();
- QWindowSystemInterface::handleExposeEvent(m_qioswindow->window(), region);
+ qCDebug(lcQpaWindow) << self.platformWindow << region << "isExposed" << self.platformWindow->isExposed();
+ QWindowSystemInterface::handleExposeEvent(self.platformWindow->window(), region);
}
- (void)safeAreaInsetsDidChange
{
- QWindowSystemInterface::handleSafeAreaMarginsChanged(m_qioswindow->window());
+ QWindowSystemInterface::handleSafeAreaMarginsChanged(self.platformWindow->window());
}
// -------------------------------------------------------------------------
- (BOOL)canBecomeFirstResponder
{
- return !(m_qioswindow->window()->flags() & Qt::WindowDoesNotAcceptFocus);
+ return !(self.platformWindow->window()->flags() & Qt::WindowDoesNotAcceptFocus);
}
- (BOOL)becomeFirstResponder
@@ -280,10 +286,10 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
qImDebug() << self << "became first responder";
}
- if (qGuiApp->focusWindow() != m_qioswindow->window())
- QWindowSystemInterface::handleWindowActivated(m_qioswindow->window());
+ if (qGuiApp->focusWindow() != self.platformWindow->window())
+ QWindowSystemInterface::handleWindowActivated(self.platformWindow->window());
else
- qImDebug() << m_qioswindow->window() << "already active, not sending window activation";
+ qImDebug() << self.platformWindow->window() << "already active, not sending window activation";
return YES;
}
@@ -361,7 +367,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
-(BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event
{
- if (m_qioswindow->window()->flags() & Qt::WindowTransparentForInput)
+ if (self.platformWindow->window()->flags() & Qt::WindowTransparentForInput)
return NO;
return [super pointInside:point withEvent:event];
}
@@ -378,7 +384,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
for (UITouch *cTouch in cTouches) {
QPointF localViewPosition = QPointF::fromCGPoint([cTouch preciseLocationInView:self]);
QPoint localViewPositionI = localViewPosition.toPoint();
- QPointF globalScreenPosition = m_qioswindow->mapToGlobal(localViewPositionI) +
+ QPointF globalScreenPosition = self.platformWindow->mapToGlobal(localViewPositionI) +
(localViewPosition - localViewPositionI);
qreal pressure = cTouch.force / cTouch.maximumPossibleForce;
// azimuth unit vector: +x to the right, +y going downwards
@@ -391,7 +397,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
qCDebug(lcQpaTablet) << i << ":" << timeStamp << localViewPosition << pressure << state << "azimuth" << azimuth.dx << azimuth.dy
<< "angle" << azimuthAngle << "altitude" << cTouch.altitudeAngle
<< "xTilt" << qBound(-60.0, altitudeAngle * azimuth.dx, 60.0) << "yTilt" << qBound(-60.0, altitudeAngle * azimuth.dy, 60.0);
- QWindowSystemInterface::handleTabletEvent(m_qioswindow->window(), timeStamp, localViewPosition, globalScreenPosition,
+ QWindowSystemInterface::handleTabletEvent(self.platformWindow->window(), timeStamp, localViewPosition, globalScreenPosition,
// device, pointerType, buttons
QTabletEvent::RotationStylus, QTabletEvent::Pen, state == Qt::TouchPointReleased ? Qt::NoButton : Qt::LeftButton,
// pressure, xTilt, yTilt
@@ -415,12 +421,12 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
// just map from the local view position to global coordinates.
// tvOS: all touches start at the center of the screen and move from there.
QPoint localViewPosition = QPointF::fromCGPoint([uiTouch locationInView:self]).toPoint();
- QPoint globalScreenPosition = m_qioswindow->mapToGlobal(localViewPosition);
+ QPoint globalScreenPosition = self.platformWindow->mapToGlobal(localViewPosition);
touchPoint.area = QRectF(globalScreenPosition, QSize(0, 0));
// FIXME: Do we really need to support QTouchDevice::NormalizedPosition?
- QSize screenSize = m_qioswindow->screen()->geometry().size();
+ QSize screenSize = self.platformWindow->screen()->geometry().size();
touchPoint.normalPosition = QPointF(globalScreenPosition.x() / screenSize.width(),
globalScreenPosition.y() / screenSize.height());
@@ -451,10 +457,10 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
// alert dialog, will fail to recognize. To be on the safe side, we deliver
// the event asynchronously.
QWindowSystemInterface::handleTouchEvent<QWindowSystemInterface::AsynchronousDelivery>(
- m_qioswindow->window(), timeStamp, iosIntegration->touchDevice(), m_activeTouches.values());
+ self.platformWindow->window(), timeStamp, iosIntegration->touchDevice(), m_activeTouches.values());
} else {
QWindowSystemInterface::handleTouchEvent<QWindowSystemInterface::SynchronousDelivery>(
- m_qioswindow->window(), timeStamp, iosIntegration->touchDevice(), m_activeTouches.values());
+ self.platformWindow->window(), timeStamp, iosIntegration->touchDevice(), m_activeTouches.values());
}
}
@@ -482,8 +488,8 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
#endif
}
- if (m_qioswindow->shouldAutoActivateWindow() && m_activeTouches.size() == 1) {
- QPlatformWindow *topLevel = m_qioswindow;
+ if (self.platformWindow->shouldAutoActivateWindow() && m_activeTouches.size() == 1) {
+ QPlatformWindow *topLevel = self.platformWindow;
while (QPlatformWindow *p = topLevel->parent())
topLevel = p;
if (topLevel->window() != QGuiApplication::focusWindow())
@@ -553,7 +559,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
NSTimeInterval timestamp = event ? event.timestamp : [[NSProcessInfo processInfo] systemUptime];
QIOSIntegration *iosIntegration = static_cast<QIOSIntegration *>(QGuiApplicationPrivate::platformIntegration());
- QWindowSystemInterface::handleTouchCancelEvent(m_qioswindow->window(), ulong(timestamp * 1000), iosIntegration->touchDevice());
+ QWindowSystemInterface::handleTouchCancelEvent(self.platformWindow->window(), ulong(timestamp * 1000), iosIntegration->touchDevice());
}
- (int)mapPressTypeToKey:(UIPress*)press
@@ -581,7 +587,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
int key = [self mapPressTypeToKey:press];
if (key == Qt::Key_unknown)
continue;
- if (QWindowSystemInterface::handleKeyEvent(m_qioswindow->window(), type, key, Qt::NoModifier))
+ if (QWindowSystemInterface::handleKeyEvent(self.platformWindow->window(), type, key, Qt::NoModifier))
handled = true;
}
@@ -635,7 +641,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
- (QWindow *)qwindow
{
if ([self isKindOfClass:[QUIView class]]) {
- if (QT_PREPEND_NAMESPACE(QIOSWindow) *w = static_cast<QUIView *>(self)->m_qioswindow)
+ if (QT_PREPEND_NAMESPACE(QIOSWindow) *w = static_cast<QUIView *>(self).platformWindow)
return w->window();
}
return nil;
diff --git a/src/plugins/platforms/ios/quiview_accessibility.mm b/src/plugins/platforms/ios/quiview_accessibility.mm
index 69a4d375bd..a3f4156a59 100644
--- a/src/plugins/platforms/ios/quiview_accessibility.mm
+++ b/src/plugins/platforms/ios/quiview_accessibility.mm
@@ -49,8 +49,9 @@
if (!iface || iface->state().invisible || (iface->text(QAccessible::Name).isEmpty() && iface->text(QAccessible::Value).isEmpty() && iface->text(QAccessible::Description).isEmpty()))
return;
QAccessible::Id accessibleId = QAccessible::uniqueId(iface);
- UIAccessibilityElement *elem = [[QMacAccessibilityElement alloc] initWithId: accessibleId withAccessibilityContainer: self];
- [m_accessibleElements addObject:[elem autorelease]];
+ UIAccessibilityElement *elem = [[QT_MANGLE_NAMESPACE(QMacAccessibilityElement) alloc] initWithId:accessibleId withAccessibilityContainer:self];
+ [m_accessibleElements addObject:elem];
+ [elem release];
}
- (void)createAccessibleContainer:(QAccessibleInterface *)iface
@@ -73,7 +74,7 @@
if ([m_accessibleElements count])
return;
- QWindow *win = m_qioswindow->window();
+ QWindow *win = self.platformWindow->window();
QAccessibleInterface *iface = win->accessibleRoot();
if (iface)
[self createAccessibleContainer: iface];
diff --git a/src/plugins/platforms/qnx/qqnxglcontext.cpp b/src/plugins/platforms/qnx/qqnxglcontext.cpp
index 2031de308c..1d030ba1aa 100644
--- a/src/plugins/platforms/qnx/qqnxglcontext.cpp
+++ b/src/plugins/platforms/qnx/qqnxglcontext.cpp
@@ -64,7 +64,7 @@ static QEGLPlatformContext::Flags makeFlags()
{
QEGLPlatformContext::Flags result = 0;
- if (!QQnxIntegration::options().testFlag(QQnxIntegration::SurfacelessEGLContext))
+ if (!QQnxIntegration::instance()->options().testFlag(QQnxIntegration::SurfacelessEGLContext))
result |= QEGLPlatformContext::NoSurfaceless;
return result;
diff --git a/src/plugins/platforms/qnx/qqnxglobal.cpp b/src/plugins/platforms/qnx/qqnxglobal.cpp
index 6b3cc6bebf..c17f6a7546 100644
--- a/src/plugins/platforms/qnx/qqnxglobal.cpp
+++ b/src/plugins/platforms/qnx/qqnxglobal.cpp
@@ -45,9 +45,9 @@ QT_BEGIN_NAMESPACE
void qScreenCheckError(int rc, const char *funcInfo, const char *message, bool critical)
{
- if (!rc && (QQnxIntegration::options() & QQnxIntegration::AlwaysFlushScreenContext)
- && QQnxIntegration::screenContext() != 0) {
- rc = screen_flush_context(QQnxIntegration::screenContext(), 0);
+ if (!rc && (QQnxIntegration::instance()->options() & QQnxIntegration::AlwaysFlushScreenContext)
+ && QQnxIntegration::instance()->screenContext() != 0) {
+ rc = screen_flush_context(QQnxIntegration::instance()->screenContext(), 0);
}
if (Q_UNLIKELY(rc)) {
diff --git a/src/plugins/platforms/qnx/qqnxintegration.cpp b/src/plugins/platforms/qnx/qqnxintegration.cpp
index dc4ebdf699..8c8521325c 100644
--- a/src/plugins/platforms/qnx/qqnxintegration.cpp
+++ b/src/plugins/platforms/qnx/qqnxintegration.cpp
@@ -99,8 +99,7 @@
QT_BEGIN_NAMESPACE
-QQnxWindowMapper QQnxIntegration::ms_windowMapper;
-QMutex QQnxIntegration::ms_windowMapperMutex;
+QQnxIntegration *QQnxIntegration::ms_instance;
static inline QQnxIntegration::Options parseOptions(const QStringList &paramList)
{
@@ -124,6 +123,22 @@ static inline QQnxIntegration::Options parseOptions(const QStringList &paramList
return options;
}
+static inline int getContextCapabilities(const QStringList &paramList)
+{
+ QString contextCapabilitiesPrefix = QStringLiteral("screen-context-capabilities=");
+ int contextCapabilities = SCREEN_APPLICATION_CONTEXT;
+ for (const QString &param : paramList) {
+ if (param.startsWith(contextCapabilitiesPrefix)) {
+ QStringRef value = param.midRef(contextCapabilitiesPrefix.length());
+ bool ok = false;
+ contextCapabilities = value.toInt(&ok, 0);
+ if (!ok)
+ contextCapabilities = SCREEN_APPLICATION_CONTEXT;
+ }
+ }
+ return contextCapabilities;
+}
+
QQnxIntegration::QQnxIntegration(const QStringList &paramList)
: QPlatformIntegration()
, m_screenEventThread(0)
@@ -147,11 +162,15 @@ QQnxIntegration::QQnxIntegration(const QStringList &paramList)
, m_drag(new QSimpleDrag())
#endif
{
- ms_options = parseOptions(paramList);
+ ms_instance = this;
+ m_options = parseOptions(paramList);
qIntegrationDebug();
+
// Open connection to QNX composition manager
- Q_SCREEN_CRITICALERROR(screen_create_context(&ms_screenContext, SCREEN_APPLICATION_CONTEXT),
- "Failed to create screen context");
+ if (screen_create_context(&m_screenContext, getContextCapabilities(paramList))) {
+ qFatal("%s - Screen: Failed to create screen context - Error: %s (%i)",
+ Q_FUNC_INFO, strerror(errno), errno);
+ }
#if QT_CONFIG(qqnx_pps)
// Create/start navigator event notifier
@@ -168,7 +187,8 @@ QQnxIntegration::QQnxIntegration(const QStringList &paramList)
#endif
// Create/start event thread
- m_screenEventThread = new QQnxScreenEventThread(ms_screenContext, m_screenEventHandler);
+ m_screenEventThread = new QQnxScreenEventThread(m_screenContext);
+ m_screenEventHandler->setScreenEventThread(m_screenEventThread);
m_screenEventThread->start();
#if QT_CONFIG(qqnx_pps)
@@ -244,7 +264,7 @@ QQnxIntegration::~QQnxIntegration()
destroyDisplays();
// Close connection to QNX composition manager
- screen_destroy_context(ms_screenContext);
+ screen_destroy_context(m_screenContext);
#if !defined(QT_NO_OPENGL)
// Cleanup global OpenGL resources
@@ -268,6 +288,8 @@ QQnxIntegration::~QQnxIntegration()
// Destroy navigator interface
delete m_navigator;
+ ms_instance = nullptr;
+
qIntegrationDebug("platform plugin shutdown end");
}
@@ -296,10 +318,10 @@ QPlatformWindow *QQnxIntegration::createPlatformWindow(QWindow *window) const
const bool needRootWindow = options() & RootWindow;
switch (surfaceType) {
case QSurface::RasterSurface:
- return new QQnxRasterWindow(window, ms_screenContext, needRootWindow);
+ return new QQnxRasterWindow(window, m_screenContext, needRootWindow);
#if !defined(QT_NO_OPENGL)
case QSurface::OpenGLSurface:
- return new QQnxEglWindow(window, ms_screenContext, needRootWindow);
+ return new QQnxEglWindow(window, m_screenContext, needRootWindow);
#endif
default:
qFatal("QQnxWindow: unsupported window API");
@@ -433,7 +455,7 @@ QPlatformDrag *QQnxIntegration::drag() const
QVariant QQnxIntegration::styleHint(QPlatformIntegration::StyleHint hint) const
{
qIntegrationDebug();
- if ((hint == ShowIsFullScreen) && (ms_options & FullScreenApplication))
+ if ((hint == ShowIsFullScreen) && (m_options & FullScreenApplication))
return true;
return QPlatformIntegration::styleHint(hint);
@@ -447,25 +469,25 @@ QPlatformServices * QQnxIntegration::services() const
QWindow *QQnxIntegration::window(screen_window_t qnxWindow)
{
qIntegrationDebug();
- QMutexLocker locker(&ms_windowMapperMutex);
+ QMutexLocker locker(&m_windowMapperMutex);
Q_UNUSED(locker);
- return ms_windowMapper.value(qnxWindow, 0);
+ return m_windowMapper.value(qnxWindow, 0);
}
void QQnxIntegration::addWindow(screen_window_t qnxWindow, QWindow *window)
{
qIntegrationDebug();
- QMutexLocker locker(&ms_windowMapperMutex);
+ QMutexLocker locker(&m_windowMapperMutex);
Q_UNUSED(locker);
- ms_windowMapper.insert(qnxWindow, window);
+ m_windowMapper.insert(qnxWindow, window);
}
void QQnxIntegration::removeWindow(screen_window_t qnxWindow)
{
qIntegrationDebug();
- QMutexLocker locker(&ms_windowMapperMutex);
+ QMutexLocker locker(&m_windowMapperMutex);
Q_UNUSED(locker);
- ms_windowMapper.remove(qnxWindow);
+ m_windowMapper.remove(qnxWindow);
}
void QQnxIntegration::createDisplays()
@@ -473,7 +495,7 @@ void QQnxIntegration::createDisplays()
qIntegrationDebug();
// Query number of displays
int displayCount = 0;
- int result = screen_get_context_property_iv(ms_screenContext, SCREEN_PROPERTY_DISPLAY_COUNT,
+ int result = screen_get_context_property_iv(m_screenContext, SCREEN_PROPERTY_DISPLAY_COUNT,
&displayCount);
Q_SCREEN_CRITICALERROR(result, "Failed to query display count");
@@ -484,7 +506,7 @@ void QQnxIntegration::createDisplays()
// Get all displays
screen_display_t *displays = (screen_display_t *)alloca(sizeof(screen_display_t) * displayCount);
- result = screen_get_context_property_pv(ms_screenContext, SCREEN_PROPERTY_DISPLAYS,
+ result = screen_get_context_property_pv(m_screenContext, SCREEN_PROPERTY_DISPLAYS,
(void **)displays);
Q_SCREEN_CRITICALERROR(result, "Failed to query displays");
@@ -510,7 +532,7 @@ void QQnxIntegration::createDisplays()
void QQnxIntegration::createDisplay(screen_display_t display, bool isPrimary)
{
- QQnxScreen *screen = new QQnxScreen(ms_screenContext, display, isPrimary);
+ QQnxScreen *screen = new QQnxScreen(m_screenContext, display, isPrimary);
m_screens.append(screen);
screenAdded(screen);
screen->adjustOrientation();
@@ -559,14 +581,14 @@ QQnxScreen *QQnxIntegration::primaryDisplay() const
return m_screens.first();
}
-QQnxIntegration::Options QQnxIntegration::options()
+QQnxIntegration::Options QQnxIntegration::options() const
{
- return ms_options;
+ return m_options;
}
screen_context_t QQnxIntegration::screenContext()
{
- return ms_screenContext;
+ return m_screenContext;
}
QQnxNavigatorEventHandler *QQnxIntegration::navigatorEventHandler()
@@ -574,10 +596,6 @@ QQnxNavigatorEventHandler *QQnxIntegration::navigatorEventHandler()
return m_navigatorEventHandler;
}
-screen_context_t QQnxIntegration::ms_screenContext = 0;
-
-QQnxIntegration::Options QQnxIntegration::ms_options = 0;
-
bool QQnxIntegration::supportsNavigatorEvents() const
{
// If QQNX_PPS is defined then we have navigator
diff --git a/src/plugins/platforms/qnx/qqnxintegration.h b/src/plugins/platforms/qnx/qqnxintegration.h
index f844a7508c..2993607489 100644
--- a/src/plugins/platforms/qnx/qqnxintegration.h
+++ b/src/plugins/platforms/qnx/qqnxintegration.h
@@ -88,6 +88,8 @@ public:
explicit QQnxIntegration(const QStringList &paramList);
~QQnxIntegration();
+ static QQnxIntegration *instance() { return ms_instance; }
+
bool hasCapability(QPlatformIntegration::Capability cap) const override;
QPlatformWindow *createPlatformWindow(QWindow *window) const override;
@@ -121,15 +123,15 @@ public:
QPlatformServices *services() const override;
- static QWindow *window(screen_window_t qnxWindow);
+ QWindow *window(screen_window_t qnxWindow);
QQnxScreen *screenForNative(screen_display_t qnxScreen) const;
void createDisplay(screen_display_t display, bool isPrimary);
void removeDisplay(QQnxScreen *screen);
QQnxScreen *primaryDisplay() const;
- static Options options();
- static screen_context_t screenContext();
+ Options options() const;
+ screen_context_t screenContext();
QQnxNavigatorEventHandler *navigatorEventHandler();
@@ -137,10 +139,10 @@ private:
void createDisplays();
void destroyDisplays();
- static void addWindow(screen_window_t qnxWindow, QWindow *window);
- static void removeWindow(screen_window_t qnxWindow);
+ void addWindow(screen_window_t qnxWindow, QWindow *window);
+ void removeWindow(screen_window_t qnxWindow);
- static screen_context_t ms_screenContext;
+ screen_context_t m_screenContext;
QQnxScreenEventThread *m_screenEventThread;
QQnxNavigatorEventHandler *m_navigatorEventHandler;
QQnxAbstractVirtualKeyboard *m_virtualKeyboard;
@@ -162,10 +164,12 @@ private:
#if QT_CONFIG(draganddrop)
QSimpleDrag *m_drag;
#endif
- static QQnxWindowMapper ms_windowMapper;
- static QMutex ms_windowMapperMutex;
+ QQnxWindowMapper m_windowMapper;
+ QMutex m_windowMapperMutex;
+
+ Options m_options;
- static Options ms_options;
+ static QQnxIntegration *ms_instance;
friend class QQnxWindow;
};
diff --git a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
index ff1133aaa7..e4843cb438 100644
--- a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
+++ b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
@@ -218,36 +218,39 @@ void QQnxScreenEventHandler::injectKeyboardEvent(int flags, int sym, int modifie
void QQnxScreenEventHandler::setScreenEventThread(QQnxScreenEventThread *eventThread)
{
m_eventThread = eventThread;
+ connect(m_eventThread, &QQnxScreenEventThread::eventsPending,
+ this, &QQnxScreenEventHandler::processEvents);
}
-void QQnxScreenEventHandler::processEventsFromScreenThread()
+void QQnxScreenEventHandler::processEvents()
{
if (!m_eventThread)
return;
- QQnxScreenEventArray *events = m_eventThread->lock();
+ screen_event_t event = nullptr;
+ if (screen_create_event(&event) != 0)
+ return;
- for (int i = 0; i < events->size(); ++i) {
- screen_event_t event = events->at(i);
- if (!event)
- continue;
- (*events)[i] = 0;
+ int count = 0;
+ for (;;) {
+ if (screen_get_event(m_eventThread->context(), event, 0) != 0)
+ break;
- m_eventThread->unlock();
+ int type = SCREEN_EVENT_NONE;
+ screen_get_event_property_iv(event, SCREEN_PROPERTY_TYPE, &type);
+ if (type == SCREEN_EVENT_NONE)
+ break;
+ ++count;
long result = 0;
QAbstractEventDispatcher* dispatcher = QAbstractEventDispatcher::instance();
bool handled = dispatcher && dispatcher->filterNativeEvent(QByteArrayLiteral("screen_event_t"), event, &result);
if (!handled)
handleEvent(event);
- screen_destroy_event(event);
-
- m_eventThread->lock();
}
- events->clear();
-
- m_eventThread->unlock();
+ m_eventThread->armEventsPending(count);
+ screen_destroy_event(event);
}
void QQnxScreenEventHandler::handleKeyboardEvent(screen_event_t event)
@@ -323,11 +326,11 @@ void QQnxScreenEventHandler::handlePointerEvent(screen_event_t event)
"Failed to query event wheel delta");
// Map window handle to top-level QWindow
- QWindow *w = QQnxIntegration::window(qnxWindow);
+ QWindow *w = QQnxIntegration::instance()->window(qnxWindow);
// Generate enter and leave events as needed.
if (qnxWindow != m_lastMouseWindow) {
- QWindow *wOld = QQnxIntegration::window(m_lastMouseWindow);
+ QWindow *wOld = QQnxIntegration::instance()->window(m_lastMouseWindow);
if (wOld) {
QWindowSystemInterface::handleLeaveEvent(wOld);
@@ -435,11 +438,11 @@ void QQnxScreenEventHandler::handleTouchEvent(screen_event_t event, int qnxType)
if (touchId < MaximumTouchPoints) {
// Map window handle to top-level QWindow
- QWindow *w = QQnxIntegration::window(qnxWindow);
+ QWindow *w = QQnxIntegration::instance()->window(qnxWindow);
// Generate enter and leave events as needed.
if (qnxWindow != m_lastMouseWindow) {
- QWindow *wOld = QQnxIntegration::window(m_lastMouseWindow);
+ QWindow *wOld = QQnxIntegration::instance()->window(m_lastMouseWindow);
if (wOld) {
QWindowSystemInterface::handleLeaveEvent(wOld);
@@ -529,7 +532,7 @@ void QQnxScreenEventHandler::handleCloseEvent(screen_event_t event)
Q_EMIT windowClosed(window);
// Map window handle to top-level QWindow
- QWindow *w = QQnxIntegration::window(window);
+ QWindow *w = QQnxIntegration::instance()->window(window);
if (w != 0)
QWindowSystemInterface::handleCloseEvent(w);
}
@@ -629,7 +632,7 @@ void QQnxScreenEventHandler::handleKeyboardFocusPropertyEvent(screen_window_t wi
if (Q_UNLIKELY(window && screen_get_window_property_iv(window, SCREEN_PROPERTY_FOCUS, &focus) != 0))
qFatal("QQnx: failed to query keyboard focus property, errno=%d", errno);
- QWindow *focusWindow = QQnxIntegration::window(window);
+ QWindow *focusWindow = QQnxIntegration::instance()->window(window);
if (m_focusLostTimer != -1) {
killTimer(m_focusLostTimer);
@@ -655,7 +658,7 @@ void QQnxScreenEventHandler::handleGeometryPropertyEvent(screen_window_t window)
}
QRect rect(pos[0], pos[1], size[0], size[1]);
- QWindow *qtWindow = QQnxIntegration::window(window);
+ QWindow *qtWindow = QQnxIntegration::instance()->window(window);
if (qtWindow) {
qtWindow->setGeometry(rect);
QWindowSystemInterface::handleGeometryChange(qtWindow, rect);
diff --git a/src/plugins/platforms/qnx/qqnxscreeneventhandler.h b/src/plugins/platforms/qnx/qqnxscreeneventhandler.h
index 40697b7a09..b35967610e 100644
--- a/src/plugins/platforms/qnx/qqnxscreeneventhandler.h
+++ b/src/plugins/platforms/qnx/qqnxscreeneventhandler.h
@@ -74,7 +74,7 @@ protected:
void timerEvent(QTimerEvent *event) override;
private Q_SLOTS:
- void processEventsFromScreenThread();
+ void processEvents();
private:
void handleKeyboardEvent(screen_event_t event);
diff --git a/src/plugins/platforms/qnx/qqnxscreeneventthread.cpp b/src/plugins/platforms/qnx/qqnxscreeneventthread.cpp
index c56d9a8da4..1b5f3b4954 100644
--- a/src/plugins/platforms/qnx/qqnxscreeneventthread.cpp
+++ b/src/plugins/platforms/qnx/qqnxscreeneventthread.cpp
@@ -1,5 +1,6 @@
/***************************************************************************
**
+** Copyright (C) 2017 QNX Software Systems. All rights reserved.
** Copyright (C) 2011 - 2012 Research In Motion
** Contact: https://www.qt.io/licensing/
**
@@ -55,116 +56,101 @@
#define qScreenEventThreadDebug QT_NO_QDEBUG_MACRO
#endif
-QQnxScreenEventThread::QQnxScreenEventThread(screen_context_t context, QQnxScreenEventHandler *screenEventHandler)
- : QThread(),
- m_screenContext(context),
- m_screenEventHandler(screenEventHandler),
- m_quit(false)
+static const int c_screenCode = _PULSE_CODE_MINAVAIL + 0;
+static const int c_armCode = _PULSE_CODE_MINAVAIL + 1;
+static const int c_quitCode = _PULSE_CODE_MINAVAIL + 2;
+
+QQnxScreenEventThread::QQnxScreenEventThread(screen_context_t context)
+ : QThread()
+ , m_screenContext(context)
{
- screenEventHandler->setScreenEventThread(this);
- connect(this, SIGNAL(eventPending()), screenEventHandler, SLOT(processEventsFromScreenThread()), Qt::QueuedConnection);
- connect(this, SIGNAL(finished()), screenEventHandler, SLOT(processEventsFromScreenThread()), Qt::QueuedConnection);
+ m_channelId = ChannelCreate(_NTO_CHF_DISCONNECT | _NTO_CHF_UNBLOCK | _NTO_CHF_PRIVATE);
+ if (m_channelId == -1) {
+ qFatal("QQnxScreenEventThread: Can't continue without a channel");
+ }
+
+ m_connectionId = ConnectAttach(0, 0, m_channelId, _NTO_SIDE_CHANNEL, 0);
+ if (m_connectionId == -1) {
+ ChannelDestroy(m_channelId);
+ qFatal("QQnxScreenEventThread: Can't continue without a channel connection");
+ }
+
+ struct sigevent screenEvent;
+ SIGEV_PULSE_INIT(&screenEvent, m_connectionId, SIGEV_PULSE_PRIO_INHERIT, c_screenCode, 0);
+
+ screen_notify(m_screenContext, SCREEN_NOTIFY_EVENT, nullptr, &screenEvent);
}
QQnxScreenEventThread::~QQnxScreenEventThread()
{
// block until thread terminates
shutdown();
-}
-void QQnxScreenEventThread::injectKeyboardEvent(int flags, int sym, int mod, int scan, int cap)
-{
- QQnxScreenEventHandler::injectKeyboardEvent(flags, sym, mod, scan, cap);
-}
-
-QQnxScreenEventArray *QQnxScreenEventThread::lock()
-{
- m_mutex.lock();
- return &m_events;
-}
-
-void QQnxScreenEventThread::unlock()
-{
- m_mutex.unlock();
+ ConnectDetach(m_connectionId);
+ ChannelDestroy(m_channelId);
}
void QQnxScreenEventThread::run()
{
qScreenEventThreadDebug("screen event thread started");
- int errorCounter = 0;
- // loop indefinitely
- while (!m_quit) {
- screen_event_t event;
-
- // create screen event
- Q_SCREEN_CHECKERROR(screen_create_event(&event), "Failed to create screen event");
-
- // block until screen event is available
- const int error = screen_get_event(m_screenContext, event, -1);
- Q_SCREEN_CRITICALERROR(error, "Failed to get screen event");
- // Only allow 50 consecutive errors before we exit the thread
- if (error) {
- errorCounter++;
- if (errorCounter > 50)
- m_quit = true;
-
- screen_destroy_event(event);
- continue;
- } else {
- errorCounter = 0;
- }
-
- // process received event
- // get the event type
- int qnxType;
- Q_SCREEN_CHECKERROR(screen_get_event_property_iv(event, SCREEN_PROPERTY_TYPE, &qnxType),
- "Failed to query screen event type");
-
- if (qnxType == SCREEN_EVENT_USER) {
- // treat all user events as shutdown requests
- qScreenEventThreadDebug("QNX user screen event");
- m_quit = true;
- } else {
- m_mutex.lock();
- m_events << event;
- m_mutex.unlock();
- emit eventPending();
- }
+ while (1) {
+ struct _pulse msg;
+ memset(&msg, 0, sizeof(msg));
+ int receiveId = MsgReceive(m_channelId, &msg, sizeof(msg), nullptr);
+ if (receiveId == 0 && msg.code == c_quitCode)
+ break;
+ else if (receiveId == 0)
+ handlePulse(msg);
+ else if (receiveId > 0)
+ qWarning() << "Unexpected message" << msg.code;
+ else
+ qWarning() << "MsgReceive error" << strerror(errno);
}
qScreenEventThreadDebug("screen event thread stopped");
-
- // cleanup
- m_mutex.lock();
- Q_FOREACH (screen_event_t event, m_events) {
- screen_destroy_event(event);
- }
- m_events.clear();
- m_mutex.unlock();
}
-void QQnxScreenEventThread::shutdown()
+void QQnxScreenEventThread::armEventsPending(int count)
{
- screen_event_t event;
+ MsgSendPulse(m_connectionId, SIGEV_PULSE_PRIO_INHERIT, c_armCode, count);
+}
- // create screen event
- Q_SCREEN_CHECKERROR(screen_create_event(&event),
- "Failed to create screen event");
+void QQnxScreenEventThread::handleScreenPulse(const struct _pulse &msg)
+{
+ Q_UNUSED(msg);
- // set the event type as user
- int type = SCREEN_EVENT_USER;
- Q_SCREEN_CHECKERROR(screen_set_event_property_iv(event, SCREEN_PROPERTY_TYPE, &type),
- "Failed to set screen type");
+ ++m_screenPulsesSinceLastArmPulse;
+ if (m_emitNeededOnNextScreenPulse) {
+ m_emitNeededOnNextScreenPulse = false;
+ Q_EMIT eventsPending();
+ }
+}
- // NOTE: ignore SCREEN_PROPERTY_USER_DATA; treat all user events as shutdown events
+void QQnxScreenEventThread::handleArmPulse(const struct _pulse &msg)
+{
+ if (msg.value.sival_int == 0 && m_screenPulsesSinceLastArmPulse == 0) {
+ m_emitNeededOnNextScreenPulse = true;
+ } else {
+ m_screenPulsesSinceLastArmPulse = 0;
+ m_emitNeededOnNextScreenPulse = false;
+ Q_EMIT eventsPending();
+ }
+}
- // post event to event loop so it will wake up and die
- Q_SCREEN_CHECKERROR(screen_send_event(m_screenContext, event, getpid()),
- "Failed to set screen event type");
+void QQnxScreenEventThread::handlePulse(const struct _pulse &msg)
+{
+ if (msg.code == c_screenCode)
+ handleScreenPulse(msg);
+ else if (msg.code == c_armCode)
+ handleArmPulse(msg);
+ else
+ qWarning() << "Unexpected pulse" << msg.code;
+}
- // cleanup
- screen_destroy_event(event);
+void QQnxScreenEventThread::shutdown()
+{
+ MsgSendPulse(m_connectionId, SIGEV_PULSE_PRIO_INHERIT, c_quitCode, 0);
qScreenEventThreadDebug("screen event thread shutdown begin");
diff --git a/src/plugins/platforms/qnx/qqnxscreeneventthread.h b/src/plugins/platforms/qnx/qqnxscreeneventthread.h
index 140f53aa50..3c8d197545 100644
--- a/src/plugins/platforms/qnx/qqnxscreeneventthread.h
+++ b/src/plugins/platforms/qnx/qqnxscreeneventthread.h
@@ -1,5 +1,6 @@
/***************************************************************************
**
+** Copyright (C) 2017 QNX Software Systems. All rights reserved.
** Copyright (C) 2011 - 2012 Research In Motion
** Contact: https://www.qt.io/licensing/
**
@@ -47,37 +48,34 @@
QT_BEGIN_NAMESPACE
-class QQnxScreenEventHandler;
-
-typedef QVarLengthArray<screen_event_t, 64> QQnxScreenEventArray;
-
class QQnxScreenEventThread : public QThread
{
Q_OBJECT
public:
- QQnxScreenEventThread(screen_context_t context, QQnxScreenEventHandler *screenEventHandler);
+ QQnxScreenEventThread(screen_context_t context);
~QQnxScreenEventThread();
- static void injectKeyboardEvent(int flags, int sym, int mod, int scan, int cap);
-
- QQnxScreenEventArray *lock();
- void unlock();
+ screen_context_t context() const { return m_screenContext; }
+ void armEventsPending(int count);
protected:
void run() override;
Q_SIGNALS:
- void eventPending();
+ void eventsPending();
private:
+ void handleScreenPulse(const struct _pulse &msg);
+ void handleArmPulse(const struct _pulse &msg);
+ void handlePulse(const struct _pulse &msg);
void shutdown();
+ int m_channelId;
+ int m_connectionId;
screen_context_t m_screenContext;
- QMutex m_mutex;
- QQnxScreenEventArray m_events;
- QQnxScreenEventHandler *m_screenEventHandler;
- bool m_quit;
+ bool m_emitNeededOnNextScreenPulse = true;
+ int m_screenPulsesSinceLastArmPulse = 0;
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp
index 4a547aa158..5d9eaaa3ea 100644
--- a/src/plugins/platforms/qnx/qqnxwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxwindow.cpp
@@ -174,7 +174,9 @@ QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context, bool needRootW
// 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");
+ QVariant windowGroup = window->property("qnxInitialWindowGroup");
+ if (!windowGroup.isValid())
+ windowGroup = window->property("_q_platform_qnxParentGroup");
if (window->type() == Qt::CoverWindow) {
// Cover windows have to be top level to be accessible to window delegate (i.e. navigator)
@@ -194,7 +196,12 @@ QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context, bool needRootW
if (window->type() == Qt::Desktop) // A desktop widget does not need a libscreen window
return;
- if (m_isTopLevel) {
+ QVariant type = window->property("_q_platform_qnxWindowType");
+ if (type.isValid() && type.canConvert<int>()) {
+ Q_SCREEN_CHECKERROR(
+ screen_create_window_type(&m_window, m_screenContext, type.value<int>()),
+ "Could not create window");
+ } else if (m_isTopLevel) {
Q_SCREEN_CRITICALERROR(screen_create_window(&m_window, m_screenContext),
"Could not create top level window"); // Creates an application window
if (window->type() != Qt::CoverWindow) {
@@ -212,7 +219,9 @@ QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context, bool needRootW
// 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");
+ QVariant windowId = window->property("qnxWindowId");
+ if (!windowId.isValid())
+ windowId = window->property("_q_platform_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,
@@ -262,7 +271,7 @@ QQnxWindow::~QQnxWindow()
Q_ASSERT(m_childWindows.size() == 0);
// Remove from plugin's window mapper
- QQnxIntegration::removeWindow(m_window);
+ QQnxIntegration::instance()->removeWindow(m_window);
// Remove from parent's Hierarchy.
removeFromParent();
@@ -471,7 +480,7 @@ void QQnxWindow::setScreen(QQnxScreen *platformScreen)
qWindowDebug("Moving window to different screen");
m_screen->removeWindow(this);
- if ((QQnxIntegration::options() & QQnxIntegration::RootWindow)) {
+ if ((QQnxIntegration::instance()->options() & QQnxIntegration::RootWindow)) {
screen_leave_window_group(m_window);
}
}
@@ -726,7 +735,7 @@ void QQnxWindow::initWindow()
m_exposed = false;
// Add window to plugin's window mapper
- QQnxIntegration::addWindow(m_window, window());
+ QQnxIntegration::instance()->addWindow(m_window, window());
// Qt never calls these setters after creating the window, so we need to do that ourselves here
setWindowState(window()->windowState());
@@ -823,7 +832,7 @@ void QQnxWindow::windowPosted()
bool QQnxWindow::shouldMakeFullScreen() const
{
return ((static_cast<QQnxScreen *>(screen())->rootWindow() == this)
- && (QQnxIntegration::options() & QQnxIntegration::FullScreenApplication));
+ && (QQnxIntegration::instance()->options() & QQnxIntegration::FullScreenApplication));
}
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/vnc/qvnc.cpp b/src/plugins/platforms/vnc/qvnc.cpp
index 44fc1c6101..ffe00de2b1 100644
--- a/src/plugins/platforms/vnc/qvnc.cpp
+++ b/src/plugins/platforms/vnc/qvnc.cpp
@@ -552,9 +552,9 @@ void QVncClientCursor::write(QVncClient *client) const
{
const quint16 tmp[6] = { htons(0),
htons(1),
- htons(hotspot.x()), htons(hotspot.y()),
- htons(cursor.width()),
- htons(cursor.height()) };
+ htons(uint16_t(hotspot.x())), htons(uint16_t(hotspot.y())),
+ htons(uint16_t(cursor.width())),
+ htons(uint16_t(cursor.height())) };
socket->write((char*)tmp, sizeof(tmp));
const qint32 encoding = qToBigEndian(-239);
diff --git a/src/plugins/platforms/windows/main.cpp b/src/plugins/platforms/windows/main.cpp
index 980de88e72..8bde87c975 100644
--- a/src/plugins/platforms/windows/main.cpp
+++ b/src/plugins/platforms/windows/main.cpp
@@ -39,7 +39,7 @@
#include <qpa/qplatformintegrationplugin.h>
-#include <QtCore/QStringList>
+#include <QtCore/qstringlist.h>
#include "qwindowsgdiintegration.h"
diff --git a/src/plugins/platforms/windows/qtwindowsglobal.h b/src/plugins/platforms/windows/qtwindowsglobal.h
index 6c44541314..ef22a4451a 100644
--- a/src/plugins/platforms/windows/qtwindowsglobal.h
+++ b/src/plugins/platforms/windows/qtwindowsglobal.h
@@ -60,6 +60,21 @@
# define WM_DPICHANGED 0x02E0
#endif
+// WM_POINTER support from Windows 8 onwards (WINVER >= 0x0602)
+#ifndef WM_POINTERUPDATE
+# define WM_NCPOINTERUPDATE 0x0241
+# define WM_NCPOINTERDOWN 0x0242
+# define WM_NCPOINTERUP 0x0243
+# define WM_POINTERUPDATE 0x0245
+# define WM_POINTERDOWN 0x0246
+# define WM_POINTERUP 0x0247
+# define WM_POINTERENTER 0x0249
+# define WM_POINTERLEAVE 0x024A
+# define WM_POINTERACTIVATE 0x024B
+# define WM_POINTERWHEEL 0x024E
+# define WM_POINTERHWHEEL 0x024F
+#endif // WM_POINTERUPDATE
+
QT_BEGIN_NAMESPACE
namespace QtWindows
@@ -78,6 +93,7 @@ enum
ApplicationEventFlag = 0x1000000,
ThemingEventFlag = 0x2000000,
GenericEventFlag = 0x4000000, // Misc
+ PointerEventFlag = 0x8000000,
};
enum WindowsEventType // Simplify event types
@@ -103,13 +119,16 @@ enum WindowsEventType // Simplify event types
DpiChangedEvent = WindowEventFlag + 21,
EnterSizeMoveEvent = WindowEventFlag + 22,
ExitSizeMoveEvent = WindowEventFlag + 23,
+ PointerActivateWindowEvent = WindowEventFlag + 24,
MouseEvent = MouseEventFlag + 1,
MouseWheelEvent = MouseEventFlag + 2,
CursorEvent = MouseEventFlag + 3,
TouchEvent = TouchEventFlag + 1,
+ PointerEvent = PointerEventFlag + 1,
NonClientMouseEvent = NonClientEventFlag + MouseEventFlag + 1,
NonClientHitTest = NonClientEventFlag + 2,
NonClientCreate = NonClientEventFlag + 3,
+ NonClientPointerEvent = NonClientEventFlag + PointerEventFlag + 4,
KeyEvent = KeyEventFlag + 1,
KeyDownEvent = KeyEventFlag + KeyDownEventFlag + 1,
KeyboardLayoutChangeEvent = KeyEventFlag + 2,
@@ -167,6 +186,8 @@ inline QtWindows::WindowsEventType windowsEventType(UINT message, WPARAM wParamI
QtWindows::ActivateApplicationEvent : QtWindows::DeactivateApplicationEvent;
case WM_MOUSEACTIVATE:
return QtWindows::MouseActivateWindowEvent;
+ case WM_POINTERACTIVATE:
+ return QtWindows::PointerActivateWindowEvent;
case WM_ACTIVATE:
return LOWORD(wParamIn) == WA_INACTIVE ?
QtWindows::DeactivateWindowEvent : QtWindows::ActivateWindowEvent;
@@ -297,6 +318,10 @@ inline QtWindows::WindowsEventType windowsEventType(UINT message, WPARAM wParamI
if ((message >= WM_MOUSEFIRST && message <= WM_MOUSELAST)
|| (message >= WM_XBUTTONDOWN && message <= WM_XBUTTONDBLCLK))
return QtWindows::MouseEvent;
+ if (message >= WM_NCPOINTERUPDATE && message <= WM_NCPOINTERUP)
+ return QtWindows::NonClientPointerEvent;
+ if (message >= WM_POINTERUPDATE && message <= WM_POINTERHWHEEL)
+ return QtWindows::PointerEvent;
return QtWindows::UnknownEvent;
}
diff --git a/src/plugins/platforms/windows/qwin10helpers.cpp b/src/plugins/platforms/windows/qwin10helpers.cpp
index 5976fd23c0..cc17d8798f 100644
--- a/src/plugins/platforms/windows/qwin10helpers.cpp
+++ b/src/plugins/platforms/windows/qwin10helpers.cpp
@@ -39,8 +39,8 @@
#include "qwin10helpers.h"
-#include <QtCore/QDebug>
-#include <QtCore/QOperatingSystemVersion>
+#include <QtCore/qdebug.h>
+#include <QtCore/qoperatingsystemversion.h>
#include <QtCore/private/qsystemlibrary_p.h>
#if defined(Q_CC_MINGW) || defined(Q_CC_CLANG)
diff --git a/src/plugins/platforms/windows/qwin10helpers.h b/src/plugins/platforms/windows/qwin10helpers.h
index e1485003dd..4f364dfc59 100644
--- a/src/plugins/platforms/windows/qwin10helpers.h
+++ b/src/plugins/platforms/windows/qwin10helpers.h
@@ -40,7 +40,7 @@
#ifndef QWIN10HELPERS_H
#define QWIN10HELPERS_H
-#include <QtCore/QtGlobal>
+#include <QtCore/qglobal.h>
#include <QtCore/qt_windows.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowsbackingstore.cpp b/src/plugins/platforms/windows/qwindowsbackingstore.cpp
index 80872c3ea3..03b44458ac 100644
--- a/src/plugins/platforms/windows/qwindowsbackingstore.cpp
+++ b/src/plugins/platforms/windows/qwindowsbackingstore.cpp
@@ -41,13 +41,13 @@
#include "qwindowswindow.h"
#include "qwindowscontext.h"
-#include <QtGui/QWindow>
-#include <QtGui/QPainter>
+#include <QtGui/qwindow.h>
+#include <QtGui/qpainter.h>
#include <QtFontDatabaseSupport/private/qwindowsnativeimage_p.h>
#include <private/qhighdpiscaling_p.h>
#include <private/qimage_p.h>
-#include <QtCore/QDebug>
+#include <QtCore/qdebug.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowsbackingstore.h b/src/plugins/platforms/windows/qwindowsbackingstore.h
index 9e62266697..5692c08b1e 100644
--- a/src/plugins/platforms/windows/qwindowsbackingstore.h
+++ b/src/plugins/platforms/windows/qwindowsbackingstore.h
@@ -43,7 +43,7 @@
#include <QtCore/qt_windows.h>
#include <qpa/qplatformbackingstore.h>
-#include <QtCore/QScopedPointer>
+#include <QtCore/qscopedpointer.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowsclipboard.cpp b/src/plugins/platforms/windows/qwindowsclipboard.cpp
index 01191a7dc1..53f329422c 100644
--- a/src/plugins/platforms/windows/qwindowsclipboard.cpp
+++ b/src/plugins/platforms/windows/qwindowsclipboard.cpp
@@ -42,16 +42,16 @@
#include "qwindowsole.h"
#include "qwindowsmime.h"
-#include <QtGui/QGuiApplication>
-#include <QtGui/QClipboard>
-#include <QtGui/QColor>
-#include <QtGui/QImage>
-
-#include <QtCore/QDebug>
-#include <QtCore/QMimeData>
-#include <QtCore/QStringList>
-#include <QtCore/QVariant>
-#include <QtCore/QUrl>
+#include <QtGui/qguiapplication.h>
+#include <QtGui/qclipboard.h>
+#include <QtGui/qcolor.h>
+#include <QtGui/qimage.h>
+
+#include <QtCore/qdebug.h>
+#include <QtCore/qmimedata.h>
+#include <QtCore/qstringlist.h>
+#include <QtCore/qvariant.h>
+#include <QtCore/qurl.h>
#include <QtEventDispatcherSupport/private/qwindowsguieventdispatcher_p.h>
diff --git a/src/plugins/platforms/windows/qwindowscombase.h b/src/plugins/platforms/windows/qwindowscombase.h
index 5e51b6b7b7..937a2e69ce 100644
--- a/src/plugins/platforms/windows/qwindowscombase.h
+++ b/src/plugins/platforms/windows/qwindowscombase.h
@@ -40,7 +40,7 @@
#ifndef QWINDOWSCOMBASE_H
#define QWINDOWSCOMBASE_H
-#include <QtCore/QtGlobal>
+#include <QtCore/qglobal.h>
#include <unknwn.h>
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp
index 1da39a0516..8d6a81036b 100644
--- a/src/plugins/platforms/windows/qwindowscontext.cpp
+++ b/src/plugins/platforms/windows/qwindowscontext.cpp
@@ -43,6 +43,7 @@
#include "qwindowswindow.h"
#include "qwindowskeymapper.h"
#include "qwindowsmousehandler.h"
+#include "qwindowspointerhandler.h"
#include "qtwindowsglobal.h"
#include "qwindowsmenu.h"
#include "qwindowsmime.h"
@@ -52,7 +53,7 @@
#endif
#include "qwindowstheme.h"
#include <private/qguiapplication_p.h>
-#ifndef QT_NO_ACCESSIBILITY
+#if QT_CONFIG(accessibility)
# include "uiautomation/qwindowsuiaaccessibility.h"
#endif
#if QT_CONFIG(sessionmanager)
@@ -62,20 +63,19 @@
#include "qwindowsscreen.h"
#include "qwindowstheme.h"
-#include <QtGui/qtguiglobal.h>
-#include <QtGui/QWindow>
+#include <QtGui/qwindow.h>
#include <qpa/qwindowsysteminterface.h>
#include <qpa/qplatformnativeinterface.h>
-#include <QtGui/QGuiApplication>
-#include <QtGui/QOpenGLContext>
-
-#include <QtCore/QSet>
-#include <QtCore/QHash>
-#include <QtCore/QStringList>
-#include <QtCore/QDebug>
-#include <QtCore/QOperatingSystemVersion>
-#include <QtCore/QSysInfo>
-#include <QtCore/QScopedArrayPointer>
+#include <QtGui/qguiapplication.h>
+#include <QtGui/qopenglcontext.h>
+
+#include <QtCore/qset.h>
+#include <QtCore/qhash.h>
+#include <QtCore/qstringlist.h>
+#include <QtCore/qdebug.h>
+#include <QtCore/qoperatingsystemversion.h>
+#include <QtCore/qsysinfo.h>
+#include <QtCore/qscopedpointer.h>
#include <QtCore/private/qsystemlibrary_p.h>
#include <QtEventDispatcherSupport/private/qwindowsguieventdispatcher_p.h>
@@ -194,6 +194,15 @@ void QWindowsUser32DLL::init()
getDisplayAutoRotationPreferences = (GetDisplayAutoRotationPreferences)library.resolve("GetDisplayAutoRotationPreferences");
setDisplayAutoRotationPreferences = (SetDisplayAutoRotationPreferences)library.resolve("SetDisplayAutoRotationPreferences");
+ if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::Windows8) {
+ enableMouseInPointer = (EnableMouseInPointer)library.resolve("EnableMouseInPointer");
+ getPointerType = (GetPointerType)library.resolve("GetPointerType");
+ getPointerInfo = (GetPointerInfo)library.resolve("GetPointerInfo");
+ getPointerTouchInfo = (GetPointerTouchInfo)library.resolve("GetPointerTouchInfo");
+ getPointerFrameTouchInfo = (GetPointerFrameTouchInfo)library.resolve("GetPointerFrameTouchInfo");
+ getPointerPenInfo = (GetPointerPenInfo)library.resolve("GetPointerPenInfo");
+ }
+
if (QOperatingSystemVersion::current()
>= QOperatingSystemVersion(QOperatingSystemVersion::Windows, 10, 0, 14393)) {
enableNonClientDpiScaling = (EnableNonClientDpiScaling)library.resolve("EnableNonClientDpiScaling");
@@ -202,6 +211,11 @@ void QWindowsUser32DLL::init()
}
}
+bool QWindowsUser32DLL::supportsPointerApi()
+{
+ return enableMouseInPointer && getPointerType && getPointerInfo && getPointerTouchInfo && getPointerFrameTouchInfo && getPointerPenInfo;
+}
+
void QWindowsShcoreDLL::init()
{
if (QOperatingSystemVersion::current() < QOperatingSystemVersion::Windows8_1)
@@ -239,6 +253,7 @@ struct QWindowsContextPrivate {
int m_defaultDPI = 96;
QWindowsKeyMapper m_keyMapper;
QWindowsMouseHandler m_mouseHandler;
+ QWindowsPointerHandler m_pointerHandler;
QWindowsMimeConverter m_mimeConverter;
QWindowsScreenManager m_screenManager;
QSharedPointer<QWindowCreationContext> m_creationContext;
@@ -256,7 +271,7 @@ QWindowsContextPrivate::QWindowsContextPrivate()
QWindowsContext::user32dll.init();
QWindowsContext::shcoredll.init();
- if (m_mouseHandler.touchDevice())
+ if (m_pointerHandler.touchDevice() || m_mouseHandler.touchDevice())
m_systemInfo |= QWindowsContext::SI_SupportsTouch;
m_displayContext = GetDC(0);
m_defaultDPI = GetDeviceCaps(m_displayContext, LOGPIXELSY);
@@ -281,10 +296,6 @@ QWindowsContext::QWindowsContext() :
const QByteArray bv = qgetenv("QT_QPA_VERBOSE");
if (!bv.isEmpty())
QLoggingCategory::setFilterRules(QString::fromLocal8Bit(bv));
-#if QT_CONFIG(tabletevent)
- d->m_tabletSupport.reset(QWindowsTabletSupport::create());
- qCDebug(lcQpaTablet) << "Tablet support: " << (d->m_tabletSupport.isNull() ? QStringLiteral("None") : d->m_tabletSupport->description());
-#endif
}
QWindowsContext::~QWindowsContext()
@@ -310,7 +321,8 @@ bool QWindowsContext::initTouch(unsigned integrationOptions)
if (d->m_systemInfo & QWindowsContext::SI_SupportsTouch)
return true;
- QTouchDevice *touchDevice = d->m_mouseHandler.ensureTouchDevice();
+ QTouchDevice *touchDevice = (d->m_systemInfo & QWindowsContext::SI_SupportsPointer) ?
+ d->m_pointerHandler.ensureTouchDevice() : d->m_mouseHandler.ensureTouchDevice();
if (!touchDevice)
return false;
@@ -330,6 +342,33 @@ bool QWindowsContext::initTouch(unsigned integrationOptions)
return true;
}
+bool QWindowsContext::initTablet(unsigned integrationOptions)
+{
+ Q_UNUSED(integrationOptions);
+#if QT_CONFIG(tabletevent)
+ d->m_tabletSupport.reset(QWindowsTabletSupport::create());
+ return true;
+#else
+ return false;
+#endif
+}
+
+bool QWindowsContext::initPointer(unsigned integrationOptions)
+{
+ if (integrationOptions & QWindowsIntegration::DontUseWMPointer)
+ return false;
+
+ if (QOperatingSystemVersion::current() < QOperatingSystemVersion::Windows8)
+ return false;
+
+ if (!QWindowsContext::user32dll.supportsPointerApi())
+ return false;
+
+ QWindowsContext::user32dll.enableMouseInPointer(TRUE);
+ d->m_systemInfo |= QWindowsContext::SI_SupportsPointer;
+ return true;
+}
+
void QWindowsContext::setTabletAbsoluteRange(int a)
{
#if QT_CONFIG(tabletevent)
@@ -548,7 +587,7 @@ void QWindowsContext::unregisterWindowClasses()
{
const HINSTANCE appInstance = static_cast<HINSTANCE>(GetModuleHandle(0));
- foreach (const QString &name, d->m_registeredWindowClassNames) {
+ for (const QString &name : qAsConst(d->m_registeredWindowClassNames)) {
if (!UnregisterClass(reinterpret_cast<LPCWSTR>(name.utf16()), appInstance) && QWindowsContext::verbose)
qErrnoWarning("UnregisterClass failed for '%s'", qPrintable(name));
}
@@ -632,12 +671,16 @@ QWindow *QWindowsContext::findWindow(HWND hwnd) const
QWindow *QWindowsContext::windowUnderMouse() const
{
- return d->m_mouseHandler.windowUnderMouse();
+ return (d->m_systemInfo & QWindowsContext::SI_SupportsPointer) ?
+ d->m_pointerHandler.windowUnderMouse() : d->m_mouseHandler.windowUnderMouse();
}
void QWindowsContext::clearWindowUnderMouse()
{
- d->m_mouseHandler.clearWindowUnderMouse();
+ if (d->m_systemInfo & QWindowsContext::SI_SupportsPointer)
+ d->m_pointerHandler.clearWindowUnderMouse();
+ else
+ d->m_mouseHandler.clearWindowUnderMouse();
}
/*!
@@ -958,7 +1001,9 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
switch (et) {
case QtWindows::GestureEvent:
- return sessionManagerInteractionBlocked() || d->m_mouseHandler.translateGestureEvent(platformWindow->window(), hwnd, et, msg, result);
+ if (!(d->m_systemInfo & QWindowsContext::SI_SupportsPointer))
+ return sessionManagerInteractionBlocked() || d->m_mouseHandler.translateGestureEvent(platformWindow->window(), hwnd, et, msg, result);
+ break;
case QtWindows::InputMethodOpenCandidateWindowEvent:
case QtWindows::InputMethodCloseCandidateWindowEvent:
// TODO: Release/regrab mouse if a popup has mouse grab.
@@ -975,7 +1020,7 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
case QtWindows::UnknownEvent:
return false;
case QtWindows::AccessibleObjectFromWindowRequest:
-#ifndef QT_NO_ACCESSIBILITY
+#if QT_CONFIG(accessibility)
return QWindowsUiaAccessibility::handleWmGetObject(hwnd, wParam, lParam, result);
#else
return false;
@@ -1084,18 +1129,25 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
case QtWindows::ExposeEvent:
return platformWindow->handleWmPaint(hwnd, message, wParam, lParam);
case QtWindows::NonClientMouseEvent:
- if (platformWindow->frameStrutEventsEnabled())
+ if (!(d->m_systemInfo & QWindowsContext::SI_SupportsPointer) && platformWindow->frameStrutEventsEnabled())
return sessionManagerInteractionBlocked() || d->m_mouseHandler.translateMouseEvent(platformWindow->window(), hwnd, et, msg, result);
break;
+ case QtWindows::NonClientPointerEvent:
+ if ((d->m_systemInfo & QWindowsContext::SI_SupportsPointer) && platformWindow->frameStrutEventsEnabled())
+ return sessionManagerInteractionBlocked() || d->m_pointerHandler.translatePointerEvent(platformWindow->window(), hwnd, et, msg, result);
+ break;
case QtWindows::EnterSizeMoveEvent:
platformWindow->setFlag(QWindowsWindow::ResizeMoveActive);
return true;
case QtWindows::ExitSizeMoveEvent:
platformWindow->clearFlag(QWindowsWindow::ResizeMoveActive);
platformWindow->checkForScreenChanged();
+ handleExitSizeMove(platformWindow->window());
return true;
case QtWindows::ScrollEvent:
- return sessionManagerInteractionBlocked() || d->m_mouseHandler.translateScrollEvent(platformWindow->window(), hwnd, msg, result);
+ if (!(d->m_systemInfo & QWindowsContext::SI_SupportsPointer))
+ return sessionManagerInteractionBlocked() || d->m_mouseHandler.translateScrollEvent(platformWindow->window(), hwnd, msg, result);
+ break;
case QtWindows::MouseWheelEvent:
case QtWindows::MouseEvent:
case QtWindows::LeaveEvent:
@@ -1105,10 +1157,20 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
window = window->parent();
if (!window)
return false;
- return sessionManagerInteractionBlocked() || d->m_mouseHandler.translateMouseEvent(window, hwnd, et, msg, result);
+ if (!(d->m_systemInfo & QWindowsContext::SI_SupportsPointer))
+ return sessionManagerInteractionBlocked() || d->m_mouseHandler.translateMouseEvent(window, hwnd, et, msg, result);
+ else
+ return sessionManagerInteractionBlocked() || d->m_pointerHandler.translateMouseEvent(window, hwnd, et, msg, result);
}
+ break;
case QtWindows::TouchEvent:
- return sessionManagerInteractionBlocked() || d->m_mouseHandler.translateTouchEvent(platformWindow->window(), hwnd, et, msg, result);
+ if (!(d->m_systemInfo & QWindowsContext::SI_SupportsPointer))
+ return sessionManagerInteractionBlocked() || d->m_mouseHandler.translateTouchEvent(platformWindow->window(), hwnd, et, msg, result);
+ break;
+ case QtWindows::PointerEvent:
+ if (d->m_systemInfo & QWindowsContext::SI_SupportsPointer)
+ return sessionManagerInteractionBlocked() || d->m_pointerHandler.translatePointerEvent(platformWindow->window(), hwnd, et, msg, result);
+ break;
case QtWindows::FocusInEvent: // see QWindowsWindow::requestActivateWindow().
case QtWindows::FocusOutEvent:
handleFocusEvent(et, platformWindow);
@@ -1151,6 +1213,7 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
}
break;
case QtWindows::MouseActivateWindowEvent:
+ case QtWindows::PointerActivateWindowEvent:
if (platformWindow->window()->flags() & Qt::WindowDoesNotAcceptFocus) {
*result = LRESULT(MA_NOACTIVATE);
return true;
@@ -1295,6 +1358,37 @@ bool QWindowsContext::handleContextMenuEvent(QWindow *window, const MSG &msg)
}
#endif
+void QWindowsContext::handleExitSizeMove(QWindow *window)
+{
+ // Windows can be moved/resized by:
+ // 1) User moving a window by dragging the title bar: Causes a sequence
+ // of WM_NCLBUTTONDOWN, WM_NCMOUSEMOVE but no WM_NCLBUTTONUP,
+ // leaving the left mouse button 'pressed'
+ // 2) User choosing Resize/Move from System menu and using mouse/cursor keys:
+ // No mouse events are received
+ // 3) Programmatically via QSizeGrip calling QPlatformWindow::startSystemResize/Move():
+ // Mouse is left in pressed state after press on size grip (inside window),
+ // no further mouse events are received
+ // For cases 1,3, intercept WM_EXITSIZEMOVE to sync the buttons.
+ const Qt::MouseButtons currentButtons = QWindowsMouseHandler::queryMouseButtons();
+ const Qt::MouseButtons appButtons = QGuiApplication::mouseButtons();
+ if (currentButtons == appButtons)
+ return;
+ const Qt::KeyboardModifiers keyboardModifiers = QWindowsKeyMapper::queryKeyboardModifiers();
+ const QPoint globalPos = QWindowsCursor::mousePosition();
+ const QPlatformWindow *platWin = window->handle();
+ const QPoint localPos = platWin->mapFromGlobal(globalPos);
+ const QEvent::Type type = platWin->geometry().contains(globalPos)
+ ? QEvent::MouseButtonRelease : QEvent::NonClientAreaMouseButtonRelease;
+ for (Qt::MouseButton button : {Qt::LeftButton, Qt::RightButton, Qt::MiddleButton}) {
+ if (appButtons.testFlag(button) && !currentButtons.testFlag(button)) {
+ QWindowSystemInterface::handleMouseEvent(window, localPos, globalPos,
+ currentButtons, button, type,
+ keyboardModifiers);
+ }
+ }
+}
+
bool QWindowsContext::asyncExpose() const
{
return d->m_asyncExpose;
@@ -1307,7 +1401,8 @@ void QWindowsContext::setAsyncExpose(bool value)
QTouchDevice *QWindowsContext::touchDevice() const
{
- return d->m_mouseHandler.touchDevice();
+ return (d->m_systemInfo & QWindowsContext::SI_SupportsPointer) ?
+ d->m_pointerHandler.touchDevice() : d->m_mouseHandler.touchDevice();
}
static DWORD readDwordRegistrySetting(const wchar_t *regKey, const wchar_t *subKey, DWORD defaultValue)
@@ -1400,7 +1495,7 @@ extern "C" LRESULT QT_WIN_CALLBACK qWindowsWndProc(HWND hwnd, UINT message, WPAR
marginsFromRects(ncCalcSizeFrame, rectFromNcCalcSize(message, wParam, lParam, 0));
if (margins.left() >= 0) {
if (platformWindow) {
- platformWindow->setFrameMargins(margins);
+ platformWindow->setFullFrameMargins(margins);
} else {
const QSharedPointer<QWindowCreationContext> ctx = QWindowsContext::instance()->windowCreationContext();
if (!ctx.isNull())
diff --git a/src/plugins/platforms/windows/qwindowscontext.h b/src/plugins/platforms/windows/qwindowscontext.h
index 0a7f20ca83..2c2313c30a 100644
--- a/src/plugins/platforms/windows/qwindowscontext.h
+++ b/src/plugins/platforms/windows/qwindowscontext.h
@@ -43,9 +43,9 @@
#include "qtwindowsglobal.h"
#include <QtCore/qt_windows.h>
-#include <QtCore/QScopedPointer>
-#include <QtCore/QSharedPointer>
-#include <QtCore/QLoggingCategory>
+#include <QtCore/qscopedpointer.h>
+#include <QtCore/qsharedpointer.h>
+#include <QtCore/qloggingcategory.h>
#define STRICT_TYPED_ITEMIDS
#include <shlobj.h>
@@ -85,7 +85,14 @@ class QTouchDevice;
struct QWindowsUser32DLL
{
inline void init();
-
+ inline bool supportsPointerApi();
+
+ typedef BOOL (WINAPI *EnableMouseInPointer)(BOOL);
+ typedef BOOL (WINAPI *GetPointerType)(UINT32, PVOID);
+ typedef BOOL (WINAPI *GetPointerInfo)(UINT32, PVOID);
+ typedef BOOL (WINAPI *GetPointerTouchInfo)(UINT32, PVOID);
+ typedef BOOL (WINAPI *GetPointerFrameTouchInfo)(UINT32, UINT32 *, PVOID);
+ typedef BOOL (WINAPI *GetPointerPenInfo)(UINT32, PVOID);
typedef BOOL (WINAPI *SetProcessDPIAware)();
typedef BOOL (WINAPI *AddClipboardFormatListener)(HWND);
typedef BOOL (WINAPI *RemoveClipboardFormatListener)(HWND);
@@ -95,6 +102,14 @@ struct QWindowsUser32DLL
typedef int (WINAPI *GetWindowDpiAwarenessContext)(HWND);
typedef int (WINAPI *GetAwarenessFromDpiAwarenessContext)(int);
+ // Windows pointer functions (Windows 8 or later).
+ EnableMouseInPointer enableMouseInPointer = nullptr;
+ GetPointerType getPointerType = nullptr;
+ GetPointerInfo getPointerInfo = nullptr;
+ GetPointerTouchInfo getPointerTouchInfo = nullptr;
+ GetPointerFrameTouchInfo getPointerFrameTouchInfo = nullptr;
+ GetPointerPenInfo getPointerPenInfo = nullptr;
+
// Windows Vista onwards
SetProcessDPIAware setProcessDPIAware = nullptr;
@@ -134,7 +149,8 @@ public:
enum SystemInfoFlags
{
SI_RTL_Extensions = 0x1,
- SI_SupportsTouch = 0x2
+ SI_SupportsTouch = 0x2,
+ SI_SupportsPointer = 0x4,
};
// Verbose flag set by environment variable QT_QPA_VERBOSE
@@ -145,6 +161,8 @@ public:
bool initTouch();
bool initTouch(unsigned integrationOptions); // For calls from QWindowsIntegration::QWindowsIntegration() only.
+ bool initTablet(unsigned integrationOptions);
+ bool initPointer(unsigned integrationOptions);
int defaultDPI() const;
@@ -220,6 +238,7 @@ private:
#ifndef QT_NO_CONTEXTMENU
bool handleContextMenuEvent(QWindow *window, const MSG &msg);
#endif
+ void handleExitSizeMove(QWindow *window);
void unregisterWindowClasses();
QScopedPointer<QWindowsContextPrivate> d;
diff --git a/src/plugins/platforms/windows/qwindowscursor.cpp b/src/plugins/platforms/windows/qwindowscursor.cpp
index e1a5837201..0924fb822e 100644
--- a/src/plugins/platforms/windows/qwindowscursor.cpp
+++ b/src/plugins/platforms/windows/qwindowscursor.cpp
@@ -43,16 +43,16 @@
#include "qwindowswindow.h"
#include "qwindowsscreen.h"
-#include <QtGui/QBitmap>
-#include <QtGui/QImage>
-#include <QtGui/QBitmap>
-#include <QtGui/QGuiApplication>
-#include <QtGui/QScreen>
+#include <QtGui/qbitmap.h>
+#include <QtGui/qimage.h>
+#include <QtGui/qbitmap.h>
+#include <QtGui/qguiapplication.h>
+#include <QtGui/qscreen.h>
#include <QtGui/private/qguiapplication_p.h> // getPixmapCursor()
#include <QtGui/private/qhighdpiscaling_p.h>
-#include <QtCore/QDebug>
-#include <QtCore/QScopedArrayPointer>
+#include <QtCore/qdebug.h>
+#include <QtCore/qscopedpointer.h>
static bool initResources()
{
diff --git a/src/plugins/platforms/windows/qwindowscursor.h b/src/plugins/platforms/windows/qwindowscursor.h
index 53f185358b..715533e0af 100644
--- a/src/plugins/platforms/windows/qwindowscursor.h
+++ b/src/plugins/platforms/windows/qwindowscursor.h
@@ -43,8 +43,8 @@
#include <QtCore/qt_windows.h>
#include <qpa/qplatformcursor.h>
-#include <QtCore/QSharedPointer>
-#include <QtCore/QHash>
+#include <QtCore/qsharedpointer.h>
+#include <QtCore/qhash.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
index 80ee7b2287..40ab2a4dd2 100644
--- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
+++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
@@ -51,24 +51,23 @@
#include "qwindowsintegration.h"
#include "qwindowstheme.h" // Color conversion helpers
-#include <QtGui/QGuiApplication>
-#include <QtGui/QColor>
-
-#include <QtCore/QDebug>
-#include <QtCore/QRegularExpression>
-#include <QtCore/QTimer>
-#include <QtCore/QDir>
-#include <QtCore/QScopedArrayPointer>
-#include <QtCore/QSharedPointer>
-#include <QtCore/QObject>
-#include <QtCore/QThread>
-#include <QtCore/QSysInfo>
-#include <QtCore/QSharedData>
-#include <QtCore/QExplicitlySharedDataPointer>
-#include <QtCore/QMutex>
-#include <QtCore/QMutexLocker>
-#include <QtCore/QUuid>
-#include <QtCore/QTemporaryFile>
+#include <QtGui/qguiapplication.h>
+#include <QtGui/qcolor.h>
+
+#include <QtCore/qdebug.h>
+#include <QtCore/qregularexpression.h>
+#include <QtCore/qtimer.h>
+#include <QtCore/qdir.h>
+#include <QtCore/qscopedpointer.h>
+#include <QtCore/qsharedpointer.h>
+#include <QtCore/qobject.h>
+#include <QtCore/qthread.h>
+#include <QtCore/qsysinfo.h>
+#include <QtCore/qshareddata.h>
+#include <QtCore/qshareddata.h>
+#include <QtCore/qmutex.h>
+#include <QtCore/quuid.h>
+#include <QtCore/qtemporaryfile.h>
#include <QtCore/private/qsystemlibrary_p.h>
#include <algorithm>
@@ -1027,7 +1026,7 @@ static QList<FilterSpec> filterSpecs(const QStringList &filters,
Q_ASSERT(filterSeparatorRE.isValid());
// Split filter specification as 'Texts (*.txt[;] *.doc)', '*.txt[;] *.doc'
// into description and filters specification as '*.txt;*.doc'
- foreach (const QString &filterString, filters) {
+ for (const QString &filterString : filters) {
const int openingParenPos = filterString.lastIndexOf(QLatin1Char('('));
const int closingParenPos = openingParenPos != -1 ?
filterString.indexOf(QLatin1Char(')'), openingParenPos + 1) : -1;
@@ -1322,7 +1321,7 @@ void QWindowsNativeSaveFileDialog::setNameFilters(const QStringList &f)
// filter only if a default suffix is set (see docs). Set the first available
// suffix unless we have a defaultSuffix.
if (!hasDefaultSuffix()) {
- foreach (const QString &filter, f) {
+ for (const QString &filter : f) {
const QString suffix = suffixFromFilter(filter);
if (!suffix.isEmpty()) {
setDefaultSuffixSys(suffix);
@@ -1781,12 +1780,12 @@ void QWindowsXpNativeFileDialog::populateOpenFileName(OPENFILENAME *ofn, HWND ow
// Create a buffer with the filter strings.
int totalStringLength = 0;
- QList<FilterSpec> specs =
+ const QList<FilterSpec> specs =
filterSpecs(m_options->nameFilters(), m_options->options() & QFileDialogOptions::HideNameFilterDetails, &totalStringLength);
const int size = specs.size();
wchar_t *ptr = new wchar_t[totalStringLength + 2 * size + 1];
ofn->lpstrFilter = ptr;
- foreach (const FilterSpec &spec, specs) {
+ for (const FilterSpec &spec : specs) {
ptr += spec.description.toWCharArray(ptr);
*ptr++ = 0;
ptr += spec.filter.toWCharArray(ptr);
diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.h b/src/plugins/platforms/windows/qwindowsdialoghelpers.h
index 55f112c57a..1cf0982bad 100644
--- a/src/plugins/platforms/windows/qwindowsdialoghelpers.h
+++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.h
@@ -43,8 +43,8 @@
#include <QtCore/qt_windows.h>
#include <qpa/qplatformdialoghelper.h>
#include <qpa/qplatformtheme.h>
-#include <QtCore/QStringList>
-#include <QtCore/QSharedPointer>
+#include <QtCore/qstringlist.h>
+#include <QtCore/qsharedpointer.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowsdrag.cpp b/src/plugins/platforms/windows/qwindowsdrag.cpp
index e427ee162a..79aef99552 100644
--- a/src/plugins/platforms/windows/qwindowsdrag.cpp
+++ b/src/plugins/platforms/windows/qwindowsdrag.cpp
@@ -50,19 +50,19 @@
#include "qwindowsmousehandler.h"
#include "qwindowscursor.h"
-#include <QtGui/QMouseEvent>
-#include <QtGui/QPixmap>
-#include <QtGui/QPainter>
-#include <QtGui/QRasterWindow>
-#include <QtGui/QGuiApplication>
+#include <QtGui/qevent.h>
+#include <QtGui/qpixmap.h>
+#include <QtGui/qpainter.h>
+#include <QtGui/qrasterwindow.h>
+#include <QtGui/qguiapplication.h>
#include <qpa/qwindowsysteminterface_p.h>
#include <QtGui/private/qdnd_p.h>
#include <QtGui/private/qguiapplication_p.h>
#include <QtGui/private/qhighdpiscaling_p.h>
-#include <QtCore/QDebug>
-#include <QtCore/QBuffer>
-#include <QtCore/QPoint>
+#include <QtCore/qdebug.h>
+#include <QtCore/qbuffer.h>
+#include <QtCore/qpoint.h>
#include <shlobj.h>
@@ -402,20 +402,16 @@ QWindowsOleDropSource::QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyState)
switch (result) {
case DRAGDROP_S_DROP:
case DRAGDROP_S_CANCEL:
- QGuiApplicationPrivate::modifier_buttons = toQtKeyboardModifiers(grfKeyState);
- if (buttons != QGuiApplicationPrivate::mouse_buttons) {
- if (m_windowUnderMouse.isNull() || m_mode == TouchDrag || fEscapePressed == TRUE) {
- QGuiApplicationPrivate::mouse_buttons = buttons;
- } else {
- // QTBUG 66447: Synthesize a mouse release to the window under mouse at
- // start of the DnD operation as Windows does not send any.
- const QPoint globalPos = QWindowsCursor::mousePosition();
- const QPoint localPos = m_windowUnderMouse->handle()->mapFromGlobal(globalPos);
- QWindowSystemInterface::handleMouseEvent(m_windowUnderMouse.data(),
- QPointF(localPos), QPointF(globalPos),
- QWindowsMouseHandler::queryMouseButtons(),
- Qt::LeftButton, QEvent::MouseButtonRelease);
- }
+ if (!m_windowUnderMouse.isNull() && m_mode != TouchDrag && fEscapePressed == FALSE
+ && buttons != QGuiApplicationPrivate::mouse_buttons) {
+ // QTBUG 66447: Synthesize a mouse release to the window under mouse at
+ // start of the DnD operation as Windows does not send any.
+ const QPoint globalPos = QWindowsCursor::mousePosition();
+ const QPoint localPos = m_windowUnderMouse->handle()->mapFromGlobal(globalPos);
+ QWindowSystemInterface::handleMouseEvent(m_windowUnderMouse.data(),
+ QPointF(localPos), QPointF(globalPos),
+ QWindowsMouseHandler::queryMouseButtons(),
+ Qt::LeftButton, QEvent::MouseButtonRelease);
}
m_currentButtons = Qt::NoButton;
break;
@@ -507,11 +503,13 @@ void QWindowsOleDropTarget::handleDrag(QWindow *window, DWORD grfKeyState,
QWindowsDrag *windowsDrag = QWindowsDrag::instance();
const Qt::DropActions actions = translateToQDragDropActions(*pdwEffect);
- QGuiApplicationPrivate::modifier_buttons = toQtKeyboardModifiers(grfKeyState);
- QGuiApplicationPrivate::mouse_buttons = toQtMouseButtons(grfKeyState);
+ const Qt::KeyboardModifiers keyboardModifiers = toQtKeyboardModifiers(grfKeyState);
+ const Qt::MouseButtons mouseButtons = toQtMouseButtons(grfKeyState);
const QPlatformDragQtResponse response =
- QWindowSystemInterface::handleDrag(window, windowsDrag->dropData(), m_lastPoint, actions);
+ QWindowSystemInterface::handleDrag(window, windowsDrag->dropData(),
+ m_lastPoint, actions,
+ mouseButtons, keyboardModifiers);
m_answerRect = response.answerRect();
const Qt::DropAction action = response.acceptedAction();
@@ -523,8 +521,7 @@ void QWindowsOleDropTarget::handleDrag(QWindow *window, DWORD grfKeyState,
*pdwEffect = m_chosenEffect;
qCDebug(lcQpaMime) << __FUNCTION__ << m_window
<< windowsDrag->dropData() << " supported actions=" << actions
- << " mods=" << QGuiApplicationPrivate::modifier_buttons
- << " mouse=" << QGuiApplicationPrivate::mouse_buttons
+ << " mods=" << keyboardModifiers << " mouse=" << mouseButtons
<< " accepted: " << response.isAccepted() << action
<< m_answerRect << " effect" << *pdwEffect;
}
@@ -575,13 +572,11 @@ QWindowsOleDropTarget::DragLeave()
qCDebug(lcQpaMime) << __FUNCTION__ << ' ' << m_window;
- QWindowSystemInterface::handleDrag(m_window, 0, QPoint(), Qt::IgnoreAction);
+ QWindowSystemInterface::handleDrag(m_window, 0, QPoint(), Qt::IgnoreAction,
+ Qt::NoButton, Qt::NoModifier);
- if (!QDragManager::self()->source()) {
- QGuiApplicationPrivate::modifier_buttons = Qt::NoModifier;
- QGuiApplicationPrivate::mouse_buttons = Qt::NoButton;
+ if (!QDragManager::self()->source())
m_lastKeyState = 0;
- }
QWindowsDrag::instance()->releaseDropDataObject();
return NOERROR;
@@ -600,18 +595,16 @@ QWindowsOleDropTarget::Drop(LPDATAOBJECT pDataObj, DWORD grfKeyState,
<< "keys=" << grfKeyState << "pt=" << pt.x << ',' << pt.y;
m_lastPoint = QWindowsGeometryHint::mapFromGlobal(m_window, QPoint(pt.x,pt.y));
- // grfKeyState does not all ways contain button state in the drop
- QGuiApplicationPrivate::mouse_buttons = toQtMouseButtons(m_lastKeyState);
- QGuiApplicationPrivate::modifier_buttons = toQtKeyboardModifiers(grfKeyState);
QWindowsDrag *windowsDrag = QWindowsDrag::instance();
const QPlatformDropQtResponse response =
QWindowSystemInterface::handleDrop(m_window, windowsDrag->dropData(),
m_lastPoint,
- translateToQDragDropActions(*pdwEffect));
+ translateToQDragDropActions(*pdwEffect),
+ toQtMouseButtons(grfKeyState),
+ toQtKeyboardModifiers(grfKeyState));
- QGuiApplicationPrivate::mouse_buttons = toQtMouseButtons(grfKeyState);
m_lastKeyState = grfKeyState;
if (response.isAccepted()) {
diff --git a/src/plugins/platforms/windows/qwindowsdrag.h b/src/plugins/platforms/windows/qwindowsdrag.h
index d934679488..94f6e682da 100644
--- a/src/plugins/platforms/windows/qwindowsdrag.h
+++ b/src/plugins/platforms/windows/qwindowsdrag.h
@@ -44,8 +44,8 @@
#include "qwindowsinternalmimedata.h"
#include <qpa/qplatformdrag.h>
+#include <QtGui/qpixmap.h>
#include <QtGui/qdrag.h>
-#include <QtGui/QPixmap>
struct IDropTargetHelper;
diff --git a/src/plugins/platforms/windows/qwindowsdropdataobject.cpp b/src/plugins/platforms/windows/qwindowsdropdataobject.cpp
index bd532ab70e..26d5c04844 100644
--- a/src/plugins/platforms/windows/qwindowsdropdataobject.cpp
+++ b/src/plugins/platforms/windows/qwindowsdropdataobject.cpp
@@ -39,8 +39,8 @@
#include "qwindowsdropdataobject.h"
-#include <QtCore/QUrl>
-#include <QtCore/QMimeData>
+#include <QtCore/qurl.h>
+#include <QtCore/qmimedata.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowseglcontext.cpp b/src/plugins/platforms/windows/qwindowseglcontext.cpp
index 4632c9c157..a8d0a42bdb 100644
--- a/src/plugins/platforms/windows/qwindowseglcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowseglcontext.cpp
@@ -41,8 +41,8 @@
#include "qwindowscontext.h"
#include "qwindowswindow.h"
-#include <QtCore/QDebug>
-#include <QtGui/QOpenGLContext>
+#include <QtCore/qdebug.h>
+#include <QtGui/qopenglcontext.h>
#if defined(QT_OPENGL_ES_2_ANGLE) || defined(QT_OPENGL_DYNAMIC)
# include <EGL/eglext.h>
diff --git a/src/plugins/platforms/windows/qwindowsgdiintegration.cpp b/src/plugins/platforms/windows/qwindowsgdiintegration.cpp
index 51f74518f7..c88f669eb5 100644
--- a/src/plugins/platforms/windows/qwindowsgdiintegration.cpp
+++ b/src/plugins/platforms/windows/qwindowsgdiintegration.cpp
@@ -42,7 +42,7 @@
#include "qwindowsbackingstore.h"
#include "qwindowsgdinativeinterface.h"
-#include <QtCore/QDebug>
+#include <QtCore/qdebug.h>
#include <QtGui/private/qpixmap_raster_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowsgdinativeinterface.cpp b/src/plugins/platforms/windows/qwindowsgdinativeinterface.cpp
index c7796d959e..4ba7108f45 100644
--- a/src/plugins/platforms/windows/qwindowsgdinativeinterface.cpp
+++ b/src/plugins/platforms/windows/qwindowsgdinativeinterface.cpp
@@ -40,7 +40,7 @@
#include "qwindowsgdinativeinterface.h"
#include "qwindowsbackingstore.h"
-#include <QtGui/QBackingStore>
+#include <QtGui/qbackingstore.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp
index cc8174051a..2409d70ec9 100644
--- a/src/plugins/platforms/windows/qwindowsglcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp
@@ -42,11 +42,11 @@
#include "qwindowswindow.h"
#include "qwindowsintegration.h"
-#include <QtCore/QDebug>
-#include <QtCore/QSysInfo>
-#include <QtGui/QGuiApplication>
+#include <QtCore/qdebug.h>
+#include <QtCore/qsysinfo.h>
+#include <QtGui/qguiapplication.h>
#include <qpa/qplatformnativeinterface.h>
-#include <QtPlatformHeaders/QWGLNativeContext>
+#include <QtPlatformHeaders/qwglnativecontext.h>
#include <algorithm>
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.h b/src/plugins/platforms/windows/qwindowsglcontext.h
index 87c3723c26..8c96a8dd0c 100644
--- a/src/plugins/platforms/windows/qwindowsglcontext.h
+++ b/src/plugins/platforms/windows/qwindowsglcontext.h
@@ -43,7 +43,7 @@
#include <QtCore/qt_windows.h>
#include "qwindowsopenglcontext.h"
-#include <QtGui/QOpenGLContext>
+#include <QtGui/qopenglcontext.h>
#include <vector>
diff --git a/src/plugins/platforms/windows/qwindowsinputcontext.cpp b/src/plugins/platforms/windows/qwindowsinputcontext.cpp
index 261c931f2b..30da0da1de 100644
--- a/src/plugins/platforms/windows/qwindowsinputcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowsinputcontext.cpp
@@ -43,16 +43,15 @@
#include "qwindowsintegration.h"
#include "qwindowsmousehandler.h"
-#include <QtCore/QDebug>
-#include <QtCore/QObject>
-#include <QtCore/QRect>
-#include <QtCore/QRectF>
-#include <QtCore/QTextBoundaryFinder>
-
-#include <QtGui/QInputMethodEvent>
-#include <QtGui/QTextCharFormat>
-#include <QtGui/QPalette>
-#include <QtGui/QGuiApplication>
+#include <QtCore/qdebug.h>
+#include <QtCore/qobject.h>
+#include <QtCore/qrect.h>
+#include <QtCore/qtextboundaryfinder.h>
+
+#include <QtGui/qevent.h>
+#include <QtGui/qtextformat.h>
+#include <QtGui/qpalette.h>
+#include <QtGui/qguiapplication.h>
#include <private/qhighdpiscaling_p.h>
diff --git a/src/plugins/platforms/windows/qwindowsinputcontext.h b/src/plugins/platforms/windows/qwindowsinputcontext.h
index d647628ff1..8668efbb15 100644
--- a/src/plugins/platforms/windows/qwindowsinputcontext.h
+++ b/src/plugins/platforms/windows/qwindowsinputcontext.h
@@ -42,8 +42,8 @@
#include <QtCore/qt_windows.h>
-#include <QtCore/QLocale>
-#include <QtCore/QPointer>
+#include <QtCore/qlocale.h>
+#include <QtCore/qpointer.h>
#include <qpa/qplatforminputcontext.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp
index 0a9e8b9d91..7194fa1d1f 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.cpp
+++ b/src/plugins/platforms/windows/qwindowsintegration.cpp
@@ -59,7 +59,7 @@
#endif
#include "qwindowsinputcontext.h"
#include "qwindowskeymapper.h"
-#ifndef QT_NO_ACCESSIBILITY
+#if QT_CONFIG(accessibility)
# include "uiautomation/qwindowsuiaaccessibility.h"
#endif
@@ -76,8 +76,8 @@
#include <QtEventDispatcherSupport/private/qwindowsguieventdispatcher_p.h>
-#include <QtCore/QDebug>
-#include <QtCore/QVariant>
+#include <QtCore/qdebug.h>
+#include <QtCore/qvariant.h>
#include <limits.h>
@@ -150,7 +150,7 @@ struct QWindowsIntegrationPrivate
QScopedPointer<QWindowsStaticOpenGLContext> m_staticOpenGLContext;
#endif // QT_NO_OPENGL
QScopedPointer<QPlatformInputContext> m_inputContext;
-#ifndef QT_NO_ACCESSIBILITY
+#if QT_CONFIG(accessibility)
QWindowsUiaAccessibility m_accessibility;
#endif
QWindowsServices m_services;
@@ -184,7 +184,7 @@ static inline unsigned parseOptions(const QStringList &paramList,
QtWindows::ProcessDpiAwareness *dpiAwareness)
{
unsigned options = 0;
- foreach (const QString &param, paramList) {
+ for (const QString &param : paramList) {
if (param.startsWith(QLatin1String("fontengine="))) {
if (param.endsWith(QLatin1String("freetype"))) {
options |= QWindowsIntegration::FontDatabaseFreeType;
@@ -212,6 +212,8 @@ static inline unsigned parseOptions(const QStringList &paramList,
options |= QWindowsIntegration::AlwaysUseNativeMenus;
} else if (param == QLatin1String("menus=none")) {
options |= QWindowsIntegration::NoNativeMenus;
+ } else if (param == QLatin1String("nowmpointer")) {
+ options |= QWindowsIntegration::DontUseWMPointer;
} else {
qWarning() << "Unknown option" << param;
}
@@ -230,8 +232,13 @@ QWindowsIntegrationPrivate::QWindowsIntegrationPrivate(const QStringList &paramL
QtWindows::ProcessDpiAwareness dpiAwareness = QtWindows::ProcessPerMonitorDpiAware;
m_options = parseOptions(paramList, &tabletAbsoluteRange, &dpiAwareness);
QWindowsFontDatabase::setFontOptions(m_options);
- if (tabletAbsoluteRange >= 0)
- m_context.setTabletAbsoluteRange(tabletAbsoluteRange);
+
+ if (!m_context.initPointer(m_options)) {
+ m_context.initTablet(m_options);
+ if (tabletAbsoluteRange >= 0)
+ m_context.setTabletAbsoluteRange(tabletAbsoluteRange);
+ }
+
if (!dpiAwarenessSet) { // Set only once in case of repeated instantiations of QGuiApplication.
if (!QCoreApplication::testAttribute(Qt::AA_PluginApplication)) {
m_context.setProcessDpiAwareness(dpiAwareness);
@@ -332,7 +339,7 @@ QPlatformWindow *QWindowsIntegration::createPlatformWindow(QWindow *window) cons
<< "\n Requested: " << requested.geometry << " frame incl.="
<< QWindowsGeometryHint::positionIncludesFrame(window)
<< ' ' << requested.flags
- << "\n Obtained : " << obtained.geometry << " margins=" << obtained.frame
+ << "\n Obtained : " << obtained.geometry << " margins=" << obtained.fullFrameMargins
<< " handle=" << obtained.hwnd << ' ' << obtained.flags << '\n';
if (Q_UNLIKELY(!obtained.hwnd))
@@ -560,7 +567,7 @@ QPlatformInputContext * QWindowsIntegration::inputContext() const
return d->m_inputContext.data();
}
-#ifndef QT_NO_ACCESSIBILITY
+#if QT_CONFIG(accessibility)
QPlatformAccessibility *QWindowsIntegration::accessibility() const
{
return &d->m_accessibility;
diff --git a/src/plugins/platforms/windows/qwindowsintegration.h b/src/plugins/platforms/windows/qwindowsintegration.h
index 23f3d9ef4e..ef074e309e 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.h
+++ b/src/plugins/platforms/windows/qwindowsintegration.h
@@ -42,7 +42,7 @@
#define QWINDOWSINTEGRATION_H
#include <qpa/qplatformintegration.h>
-#include <QtCore/QScopedPointer>
+#include <QtCore/qscopedpointer.h>
#include <QtFontDatabaseSupport/private/qwindowsfontdatabase_p.h>
QT_BEGIN_NAMESPACE
@@ -66,7 +66,8 @@ public:
DontUseDirectWriteFonts = QWindowsFontDatabase::DontUseDirectWriteFonts,
DontUseColorFonts = QWindowsFontDatabase::DontUseColorFonts,
AlwaysUseNativeMenus = 0x100,
- NoNativeMenus = 0x200
+ NoNativeMenus = 0x200,
+ DontUseWMPointer = 0x400,
};
explicit QWindowsIntegration(const QStringList &paramList);
@@ -90,7 +91,7 @@ public:
# endif
#endif // !QT_NO_CLIPBOARD
QPlatformInputContext *inputContext() const override;
-#ifndef QT_NO_ACCESSIBILITY
+#if QT_CONFIG(accessibility)
QPlatformAccessibility *accessibility() const override;
#endif
QPlatformFontDatabase *fontDatabase() const override;
diff --git a/src/plugins/platforms/windows/qwindowsinternalmimedata.cpp b/src/plugins/platforms/windows/qwindowsinternalmimedata.cpp
index 21ebee6262..8f1d8f73d9 100644
--- a/src/plugins/platforms/windows/qwindowsinternalmimedata.cpp
+++ b/src/plugins/platforms/windows/qwindowsinternalmimedata.cpp
@@ -40,7 +40,7 @@
#include "qwindowsinternalmimedata.h"
#include "qwindowscontext.h"
#include "qwindowsmime.h"
-#include <QDebug>
+#include <QtCore/qdebug.h>
/*!
\class QWindowsInternalMimeDataBase
\brief Base for implementations of QInternalMimeData using a IDataObject COM object.
diff --git a/src/plugins/platforms/windows/qwindowsinternalmimedata.h b/src/plugins/platforms/windows/qwindowsinternalmimedata.h
index a44f5b509c..dbc1ea3922 100644
--- a/src/plugins/platforms/windows/qwindowsinternalmimedata.h
+++ b/src/plugins/platforms/windows/qwindowsinternalmimedata.h
@@ -43,7 +43,7 @@
#include <QtCore/qt_windows.h>
#include <QtGui/private/qinternalmimedata_p.h>
-#include <QtCore/QVariant>
+#include <QtCore/qvariant.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowskeymapper.cpp b/src/plugins/platforms/windows/qwindowskeymapper.cpp
index 950d8ecd36..48941d78ca 100644
--- a/src/plugins/platforms/windows/qwindowskeymapper.cpp
+++ b/src/plugins/platforms/windows/qwindowskeymapper.cpp
@@ -43,13 +43,14 @@
#include "qwindowswindow.h"
#include "qwindowsinputcontext.h"
-#include <QtGui/QGuiApplication>
-#include <QtGui/QWindow>
+#include <QtGui/qguiapplication.h>
+#include <QtGui/qwindow.h>
#include <qpa/qwindowsysteminterface.h>
#include <private/qguiapplication_p.h>
#include <private/qhighdpiscaling_p.h>
-#include <QtGui/QKeyEvent>
+#include <QtGui/qevent.h>
#include <QtEventDispatcherSupport/private/qwindowsguieventdispatcher_p.h>
+#include <QtCore/private/qdebug_p.h>
#if defined(WM_APPCOMMAND)
# ifndef FAPPCOMMAND_MOUSE
@@ -544,6 +545,59 @@ static const Qt::KeyboardModifiers ModsTbl[] = {
static const size_t NumMods = sizeof ModsTbl / sizeof *ModsTbl;
Q_STATIC_ASSERT((NumMods == KeyboardLayoutItem::NumQtKeys));
+#ifndef QT_NO_DEBUG_STREAM
+QDebug operator<<(QDebug d, const KeyboardLayoutItem &k)
+{
+ QDebugStateSaver saver(d);
+ d.nospace();
+ d << "KeyboardLayoutItem(";
+ if (k.exists) {
+ for (size_t i = 0; i < NumMods; ++i) {
+ if (const quint32 qtKey = k.qtKey[i]) {
+ d << '[' << i << ' ';
+ QtDebugUtils::formatQFlags(d, ModsTbl[i]);
+ d << ' ' << hex << showbase << qtKey << dec << noshowbase << ' ';
+ QtDebugUtils::formatQEnum(d, Qt::Key(qtKey));
+ if (qtKey >= 32 && qtKey < 128)
+ d << " '" << char(qtKey) << '\'';
+ if (k.deadkeys & (1<<i))
+ d << " deadkey";
+ d << "] ";
+ }
+ }
+ }
+ d << ')';
+ return d;
+}
+
+// Helpers to format a list of int as Qt key sequence
+class formatKeys
+{
+public:
+ explicit formatKeys(const QList<int> &keys) : m_keys(keys) {}
+
+private:
+ friend QDebug operator<<(QDebug d, const formatKeys &keys);
+ const QList<int> &m_keys;
+};
+
+QDebug operator<<(QDebug d, const formatKeys &k)
+{
+ QDebugStateSaver saver(d);
+ d.nospace();
+ d << '(';
+ for (int i =0, size = k.m_keys.size(); i < size; ++i) {
+ if (i)
+ d << ", ";
+ d << QKeySequence(k.m_keys.at(i));
+ }
+ d << ')';
+ return d;
+}
+#else // !QT_NO_DEBUG_STREAM
+static int formatKeys(const QList<int> &) { return 0; }
+#endif // QT_NO_DEBUG_STREAM
+
/**
Remap return or action key to select key for windows mobile.
*/
@@ -722,21 +776,8 @@ void QWindowsKeyMapper::updatePossibleKeyCodes(unsigned char *kbdBuffer, quint32
::ToAscii(VK_SPACE, 0, emptyBuffer, reinterpret_cast<LPWORD>(&buffer), 0);
::ToAscii(vk_key, scancode, kbdBuffer, reinterpret_cast<LPWORD>(&buffer), 0);
}
- if (QWindowsContext::verbose > 1 && lcQpaEvents().isDebugEnabled()) {
- QString message;
- QDebug debug(&message);
- debug <<__FUNCTION__ << " for virtual key = 0x" << hex << vk_key << dec<< '\n';
- for (size_t i = 0; i < NumMods; ++i) {
- const quint32 qtKey = keyLayout[vk_key].qtKey[i];
- debug << " [" << i << "] (" << qtKey << ','
- << hex << showbase << qtKey << noshowbase << dec
- << ",'" << char(qtKey ? qtKey : 0x03) << "')";
- if (keyLayout[vk_key].deadkeys & (1<<i))
- debug << " deadkey";
- debug << '\n';
- }
- qCDebug(lcQpaEvents) << message;
- }
+ qCDebug(lcQpaEvents) << __FUNCTION__ << "for virtual key="
+ << hex << showbase << vk_key << dec << noshowbase << keyLayout[vk_key];
}
static inline QString messageKeyText(const MSG &msg)
@@ -1287,7 +1328,9 @@ QList<int> QWindowsKeyMapper::possibleKeys(const QKeyEvent *e) const
*it = matchedKey;
}
}
-
+ qCDebug(lcQpaEvents) << __FUNCTION__ << e << "nativeVirtualKey="
+ << showbase << hex << e->nativeVirtualKey() << dec << noshowbase
+ << e->modifiers() << kbItem << "\n returns" << formatKeys(result);
return result;
}
diff --git a/src/plugins/platforms/windows/qwindowskeymapper.h b/src/plugins/platforms/windows/qwindowskeymapper.h
index c6b46b0c30..d569c82437 100644
--- a/src/plugins/platforms/windows/qwindowskeymapper.h
+++ b/src/plugins/platforms/windows/qwindowskeymapper.h
@@ -42,7 +42,7 @@
#include <QtCore/qt_windows.h>
-#include <QtCore/QLocale>
+#include <QtCore/qlocale.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowsmenu.h b/src/plugins/platforms/windows/qwindowsmenu.h
index d51a29676e..6ed8315417 100644
--- a/src/plugins/platforms/windows/qwindowsmenu.h
+++ b/src/plugins/platforms/windows/qwindowsmenu.h
@@ -44,8 +44,8 @@
#include <qpa/qplatformmenu.h>
-#include <QtCore/QVector>
-#include <QtCore/QPair>
+#include <QtCore/qvector.h>
+#include <QtCore/qpair.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowsmime.cpp b/src/plugins/platforms/windows/qwindowsmime.cpp
index 0439797a7d..0cfd79f451 100644
--- a/src/plugins/platforms/windows/qwindowsmime.cpp
+++ b/src/plugins/platforms/windows/qwindowsmime.cpp
@@ -41,15 +41,15 @@
#include "qwindowscontext.h"
#include <QtGui/private/qinternalmimedata_p.h>
-#include <QtCore/QByteArrayMatcher>
-#include <QtCore/QTextCodec>
-#include <QtCore/QMap>
-#include <QtCore/QUrl>
-#include <QtCore/QDir>
-#include <QtCore/QDebug>
-#include <QtCore/QBuffer>
-#include <QtGui/QImageReader>
-#include <QtGui/QImageWriter>
+#include <QtCore/qbytearraymatcher.h>
+#include <QtCore/qtextcodec.h>
+#include <QtCore/qmap.h>
+#include <QtCore/qurl.h>
+#include <QtCore/qdir.h>
+#include <QtCore/qdebug.h>
+#include <QtCore/qbuffer.h>
+#include <QtGui/qimagereader.h>
+#include <QtGui/qimagewriter.h>
#include <shlobj.h>
#include <algorithm>
@@ -107,7 +107,8 @@ static inline QByteArray msgConversionError(const char *func, const char *format
msg += ": Unable to convert DIB image. The image converter plugin for '";
msg += format;
msg += "' is not available. Available formats: ";
- foreach (const QByteArray &af, QImageReader::supportedImageFormats()) {
+ const QList<QByteArray> &formats = QImageReader::supportedImageFormats();
+ for (const QByteArray &af : formats) {
msg += af;
msg += ' ';
}
@@ -1598,7 +1599,7 @@ QVariant QWindowsMimeConverter::convertToMime(const QStringList &mimeTypes,
QVariant::Type preferredType,
QString *formatIn /* = 0 */) const
{
- foreach (const QString &format, mimeTypes) {
+ for (const QString &format : mimeTypes) {
if (const QWindowsMime *converter = converterToMime(format, pDataObj)) {
if (converter->canConvertToMime(format, pDataObj)) {
const QVariant dataV = converter->convertToMime(format, pDataObj, preferredType);
diff --git a/src/plugins/platforms/windows/qwindowsmime.h b/src/plugins/platforms/windows/qwindowsmime.h
index 1ed2aa933f..6bbbae1a0e 100644
--- a/src/plugins/platforms/windows/qwindowsmime.h
+++ b/src/plugins/platforms/windows/qwindowsmime.h
@@ -42,9 +42,9 @@
#include <QtCore/qt_windows.h>
-#include <QtCore/QVector>
-#include <QtCore/QList>
-#include <QtCore/QVariant>
+#include <QtCore/qvector.h>
+#include <QtCore/qlist.h>
+#include <QtCore/qvariant.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowsmousehandler.cpp b/src/plugins/platforms/windows/qwindowsmousehandler.cpp
index 17851618b4..92aaf70e40 100644
--- a/src/plugins/platforms/windows/qwindowsmousehandler.cpp
+++ b/src/plugins/platforms/windows/qwindowsmousehandler.cpp
@@ -45,14 +45,14 @@
#include "qwindowsscreen.h"
#include <qpa/qwindowsysteminterface.h>
-#include <QtGui/QGuiApplication>
-#include <QtGui/QScreen>
-#include <QtGui/QTouchDevice>
-#include <QtGui/QWindow>
-#include <QtGui/QCursor>
+#include <QtGui/qguiapplication.h>
+#include <QtGui/qscreen.h>
+#include <QtGui/qtouchdevice.h>
+#include <QtGui/qwindow.h>
+#include <QtGui/qcursor.h>
-#include <QtCore/QDebug>
-#include <QtCore/QScopedArrayPointer>
+#include <QtCore/qdebug.h>
+#include <QtCore/qscopedpointer.h>
#include <windowsx.h>
@@ -119,20 +119,16 @@ static inline void compressMouseMove(MSG *msg)
static inline QTouchDevice *createTouchDevice()
{
- enum { QT_SM_TABLETPC = 86, QT_SM_DIGITIZER = 94, QT_SM_MAXIMUMTOUCHES = 95,
- QT_NID_INTEGRATED_TOUCH = 0x1, QT_NID_EXTERNAL_TOUCH = 0x02,
- QT_NID_MULTI_INPUT = 0x40, QT_NID_READY = 0x80 };
-
- const int digitizers = GetSystemMetrics(QT_SM_DIGITIZER);
- if (!(digitizers & (QT_NID_INTEGRATED_TOUCH | QT_NID_EXTERNAL_TOUCH)))
+ const int digitizers = GetSystemMetrics(SM_DIGITIZER);
+ if (!(digitizers & (NID_INTEGRATED_TOUCH | NID_EXTERNAL_TOUCH)))
return 0;
- const int tabletPc = GetSystemMetrics(QT_SM_TABLETPC);
- const int maxTouchPoints = GetSystemMetrics(QT_SM_MAXIMUMTOUCHES);
- qCDebug(lcQpaEvents) << "Digitizers:" << hex << showbase << (digitizers & ~QT_NID_READY)
- << "Ready:" << (digitizers & QT_NID_READY) << dec << noshowbase
+ const int tabletPc = GetSystemMetrics(SM_TABLETPC);
+ const int maxTouchPoints = GetSystemMetrics(SM_MAXIMUMTOUCHES);
+ qCDebug(lcQpaEvents) << "Digitizers:" << hex << showbase << (digitizers & ~NID_READY)
+ << "Ready:" << (digitizers & NID_READY) << dec << noshowbase
<< "Tablet PC:" << tabletPc << "Max touch points:" << maxTouchPoints;
QTouchDevice *result = new QTouchDevice;
- result->setType(digitizers & QT_NID_INTEGRATED_TOUCH
+ result->setType(digitizers & NID_INTEGRATED_TOUCH
? QTouchDevice::TouchScreen : QTouchDevice::TouchPad);
QTouchDevice::Capabilities capabilities = QTouchDevice::Position | QTouchDevice::Area | QTouchDevice::NormalizedPosition;
if (result->type() == QTouchDevice::TouchPad)
@@ -178,6 +174,85 @@ Qt::MouseButtons QWindowsMouseHandler::queryMouseButtons()
return result;
}
+static QPoint lastMouseMovePos;
+
+namespace {
+struct MouseEvent {
+ QEvent::Type type;
+ Qt::MouseButton button;
+};
+
+#ifndef QT_NO_DEBUG_STREAM
+QDebug operator<<(QDebug d, const MouseEvent &e)
+{
+ QDebugStateSaver saver(d);
+ d.nospace();
+ d << "MouseEvent(" << e.type << ", " << e.button << ')';
+ return d;
+}
+#endif // QT_NO_DEBUG_STREAM
+} // namespace
+
+static inline Qt::MouseButton extraButton(WPARAM wParam) // for WM_XBUTTON...
+{
+ return GET_XBUTTON_WPARAM(wParam) == XBUTTON1 ? Qt::BackButton : Qt::ForwardButton;
+}
+
+static inline MouseEvent eventFromMsg(const MSG &msg)
+{
+ switch (msg.message) {
+ case WM_MOUSEMOVE:
+ return {QEvent::MouseMove, Qt::NoButton};
+ case WM_LBUTTONDOWN:
+ return {QEvent::MouseButtonPress, Qt::LeftButton};
+ case WM_LBUTTONUP:
+ return {QEvent::MouseButtonRelease, Qt::LeftButton};
+ case WM_LBUTTONDBLCLK:
+ return {QEvent::MouseButtonDblClick, Qt::LeftButton};
+ case WM_MBUTTONDOWN:
+ return {QEvent::MouseButtonPress, Qt::MidButton};
+ case WM_MBUTTONUP:
+ return {QEvent::MouseButtonRelease, Qt::MidButton};
+ case WM_MBUTTONDBLCLK:
+ return {QEvent::MouseButtonDblClick, Qt::MidButton};
+ case WM_RBUTTONDOWN:
+ return {QEvent::MouseButtonPress, Qt::RightButton};
+ case WM_RBUTTONUP:
+ return {QEvent::MouseButtonRelease, Qt::RightButton};
+ case WM_RBUTTONDBLCLK:
+ return {QEvent::MouseButtonDblClick, Qt::RightButton};
+ case WM_XBUTTONDOWN:
+ return {QEvent::MouseButtonPress, extraButton(msg.wParam)};
+ case WM_XBUTTONUP:
+ return {QEvent::MouseButtonRelease, extraButton(msg.wParam)};
+ case WM_XBUTTONDBLCLK:
+ return {QEvent::MouseButtonDblClick, extraButton(msg.wParam)};
+ case WM_NCMOUSEMOVE:
+ return {QEvent::NonClientAreaMouseMove, Qt::NoButton};
+ case WM_NCLBUTTONDOWN:
+ return {QEvent::NonClientAreaMouseButtonPress, Qt::LeftButton};
+ case WM_NCLBUTTONUP:
+ return {QEvent::NonClientAreaMouseButtonRelease, Qt::LeftButton};
+ case WM_NCLBUTTONDBLCLK:
+ return {QEvent::NonClientAreaMouseButtonDblClick, Qt::LeftButton};
+ case WM_NCMBUTTONDOWN:
+ return {QEvent::NonClientAreaMouseButtonPress, Qt::MidButton};
+ case WM_NCMBUTTONUP:
+ return {QEvent::NonClientAreaMouseButtonRelease, Qt::MidButton};
+ case WM_NCMBUTTONDBLCLK:
+ return {QEvent::NonClientAreaMouseButtonDblClick, Qt::MidButton};
+ case WM_NCRBUTTONDOWN:
+ return {QEvent::NonClientAreaMouseButtonPress, Qt::RightButton};
+ case WM_NCRBUTTONUP:
+ return {QEvent::NonClientAreaMouseButtonRelease, Qt::RightButton};
+ case WM_NCRBUTTONDBLCLK:
+ return {QEvent::NonClientAreaMouseButtonDblClick, Qt::RightButton};
+ default: // WM_MOUSELEAVE
+ break;
+ }
+ return {QEvent::None, Qt::NoButton};
+}
+
bool QWindowsMouseHandler::translateMouseEvent(QWindow *window, HWND hwnd,
QtWindows::WindowsEventType et,
MSG msg, LRESULT *result)
@@ -192,8 +267,33 @@ bool QWindowsMouseHandler::translateMouseEvent(QWindow *window, HWND hwnd,
if (et == QtWindows::MouseWheelEvent)
return translateMouseWheelEvent(window, hwnd, msg, result);
+ const QPoint winEventPosition(GET_X_LPARAM(msg.lParam), GET_Y_LPARAM(msg.lParam));
+ QPoint clientPosition;
+ QPoint globalPosition;
+ if (et & QtWindows::NonClientEventFlag) {
+ globalPosition = winEventPosition;
+ clientPosition = QWindowsGeometryHint::mapFromGlobal(hwnd, globalPosition);
+ } else {
+ clientPosition = winEventPosition;
+ globalPosition = QWindowsGeometryHint::mapToGlobal(hwnd, winEventPosition);
+ }
+
+ // Windows sends a mouse move with no buttons pressed to signal "Enter"
+ // when a window is shown over the cursor. Discard the event and only use
+ // it for generating QEvent::Enter to be consistent with other platforms -
+ // X11 and macOS.
+ bool discardEvent = false;
+ if (msg.message == WM_MOUSEMOVE) {
+ const bool samePosition = globalPosition == lastMouseMovePos;
+ lastMouseMovePos = globalPosition;
+ if (msg.wParam == 0 && (m_windowUnderMouse.isNull() || samePosition))
+ discardEvent = true;
+ }
+
Qt::MouseEventSource source = Qt::MouseEventNotSynthesized;
+ const MouseEvent mouseEvent = eventFromMsg(msg);
+
// Check for events synthesized from touch. Lower byte is touch index, 0 means pen.
static const bool passSynthesizedMouseEvents =
!(QWindowsIntegration::instance()->options() & QWindowsIntegration::DontPassOsMouseEventsSynthesizedFromTouch);
@@ -210,13 +310,11 @@ bool QWindowsMouseHandler::translateMouseEvent(QWindow *window, HWND hwnd,
}
}
- const QPoint winEventPosition(GET_X_LPARAM(msg.lParam), GET_Y_LPARAM(msg.lParam));
- if (et & QtWindows::NonClientEventFlag) {
- const QPoint globalPosition = winEventPosition;
- const QPoint clientPosition = QWindowsGeometryHint::mapFromGlobal(hwnd, globalPosition);
+ if (mouseEvent.type >= QEvent::NonClientAreaMouseMove && mouseEvent.type <= QEvent::NonClientAreaMouseButtonDblClick) {
const Qt::MouseButtons buttons = QWindowsMouseHandler::queryMouseButtons();
QWindowSystemInterface::handleFrameStrutMouseEvent(window, clientPosition,
globalPosition, buttons,
+ mouseEvent.button, mouseEvent.type,
QWindowsKeyMapper::queryKeyboardModifiers(),
source);
return false; // Allow further event processing (dragging of windows).
@@ -224,7 +322,8 @@ bool QWindowsMouseHandler::translateMouseEvent(QWindow *window, HWND hwnd,
*result = 0;
if (msg.message == WM_MOUSELEAVE) {
- qCDebug(lcQpaEvents) << "WM_MOUSELEAVE for " << window << " previous window under mouse = " << m_windowUnderMouse << " tracked window =" << m_trackedWindow;
+ qCDebug(lcQpaEvents) << mouseEvent << "for" << window << "previous window under mouse="
+ << m_windowUnderMouse << "tracked window=" << m_trackedWindow;
// When moving out of a window, WM_MOUSEMOVE within the moved-to window is received first,
// so if m_trackedWindow is not the window here, it means the cursor has left the
@@ -269,7 +368,6 @@ bool QWindowsMouseHandler::translateMouseEvent(QWindow *window, HWND hwnd,
}
}
- const QPoint globalPosition = QWindowsGeometryHint::mapToGlobal(hwnd, winEventPosition);
// In this context, neither an invisible nor a transparent window (transparent regarding mouse
// events, "click-through") can be considered as the window under mouse.
QWindow *currentWindowUnderMouse = platformWindow->hasMouseCapture() ?
@@ -290,10 +388,7 @@ bool QWindowsMouseHandler::translateMouseEvent(QWindow *window, HWND hwnd,
// Qt expects the platform plugin to capture the mouse on
// any button press until release.
if (!platformWindow->hasMouseCapture()
- && (msg.message == WM_LBUTTONDOWN || msg.message == WM_MBUTTONDOWN
- || msg.message == WM_RBUTTONDOWN || msg.message == WM_XBUTTONDOWN
- || msg.message == WM_LBUTTONDBLCLK || msg.message == WM_MBUTTONDBLCLK
- || msg.message == WM_RBUTTONDBLCLK || msg.message == WM_XBUTTONDBLCLK)) {
+ && (mouseEvent.type == QEvent::MouseButtonPress || mouseEvent.type == QEvent::MouseButtonDblClick)) {
platformWindow->setMouseGrabEnabled(true);
platformWindow->setFlag(QWindowsWindow::AutoMouseCapture);
qCDebug(lcQpaEvents) << "Automatic mouse capture " << window;
@@ -302,8 +397,7 @@ bool QWindowsMouseHandler::translateMouseEvent(QWindow *window, HWND hwnd,
window->requestActivate();
} else if (platformWindow->hasMouseCapture()
&& platformWindow->testFlag(QWindowsWindow::AutoMouseCapture)
- && (msg.message == WM_LBUTTONUP || msg.message == WM_MBUTTONUP
- || msg.message == WM_RBUTTONUP || msg.message == WM_XBUTTONUP)
+ && mouseEvent.type == QEvent::MouseButtonRelease
&& !buttons) {
platformWindow->setMouseGrabEnabled(false);
qCDebug(lcQpaEvents) << "Releasing automatic mouse capture " << window;
@@ -369,9 +463,12 @@ bool QWindowsMouseHandler::translateMouseEvent(QWindow *window, HWND hwnd,
m_windowUnderMouse = currentWindowUnderMouse;
}
- QWindowSystemInterface::handleMouseEvent(window, winEventPosition, globalPosition, buttons,
- QWindowsKeyMapper::queryKeyboardModifiers(),
- source);
+ if (!discardEvent && mouseEvent.type != QEvent::None) {
+ QWindowSystemInterface::handleMouseEvent(window, winEventPosition, globalPosition, buttons,
+ mouseEvent.button, mouseEvent.type,
+ QWindowsKeyMapper::queryKeyboardModifiers(),
+ source);
+ }
m_previousCaptureWindow = hasCapture ? window : 0;
// QTBUG-48117, force synchronous handling for the extra buttons so that WM_APPCOMMAND
// is sent for unhandled WM_XBUTTONDOWN.
@@ -411,9 +508,10 @@ static void redirectWheelEvent(QWindow *window, const QPoint &globalPos, int del
}
if (handleEvent) {
+ const QPoint point = (orientation == Qt::Vertical) ? QPoint(0, delta) : QPoint(delta, 0);
QWindowSystemInterface::handleWheelEvent(receiver,
QWindowsGeometryHint::mapFromGlobal(receiver, globalPos),
- globalPos, delta, orientation, mods);
+ globalPos, QPoint(), point, mods);
}
}
diff --git a/src/plugins/platforms/windows/qwindowsmousehandler.h b/src/plugins/platforms/windows/qwindowsmousehandler.h
index 86f18a0482..480662c9bf 100644
--- a/src/plugins/platforms/windows/qwindowsmousehandler.h
+++ b/src/plugins/platforms/windows/qwindowsmousehandler.h
@@ -43,8 +43,8 @@
#include "qtwindowsglobal.h"
#include <QtCore/qt_windows.h>
-#include <QtCore/QPointer>
-#include <QtCore/QHash>
+#include <QtCore/qpointer.h>
+#include <QtCore/qhash.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowsnativeinterface.cpp b/src/plugins/platforms/windows/qwindowsnativeinterface.cpp
index ffa100f824..da6f13d01a 100644
--- a/src/plugins/platforms/windows/qwindowsnativeinterface.cpp
+++ b/src/plugins/platforms/windows/qwindowsnativeinterface.cpp
@@ -48,9 +48,9 @@
#include "qwindowsmime.h"
#include "qwin10helpers.h"
-#include <QtGui/QWindow>
-#include <QtGui/QOpenGLContext>
-#include <QtGui/QScreen>
+#include <QtGui/qwindow.h>
+#include <QtGui/qopenglcontext.h>
+#include <QtGui/qscreen.h>
#include <qpa/qplatformscreen.h>
#include <QtFontDatabaseSupport/private/qwindowsfontdatabase_p.h>
@@ -111,15 +111,14 @@ void *QWindowsNativeInterface::nativeResourceForWindow(const QByteArray &resourc
return 0;
}
break;
- case QWindow::OpenGLSurface:
- case QWindow::OpenVGSurface:
- break;
case QWindow::VulkanSurface:
#if QT_CONFIG(vulkan)
if (type == VkSurface)
return bw->surface(nullptr, nullptr); // returns the address of the VkSurfaceKHR, not the value, as expected
#endif
break;
+ default:
+ break;
}
qWarning("%s: Invalid key '%s' requested.", __FUNCTION__, resource.constData());
return 0;
diff --git a/src/plugins/platforms/windows/qwindowsole.cpp b/src/plugins/platforms/windows/qwindowsole.cpp
index 0ceb0d82fa..3e62bbdeca 100644
--- a/src/plugins/platforms/windows/qwindowsole.cpp
+++ b/src/plugins/platforms/windows/qwindowsole.cpp
@@ -41,14 +41,14 @@
#include "qwindowsmime.h"
#include "qwindowscontext.h"
\
-#include <QtGui/QMouseEvent>
-#include <QtGui/QWindow>
-#include <QtGui/QPainter>
-#include <QtGui/QCursor>
-#include <QtGui/QGuiApplication>
-
-#include <QtCore/QMimeData>
-#include <QtCore/QDebug>
+#include <QtGui/qevent.h>
+#include <QtGui/qwindow.h>
+#include <QtGui/qpainter.h>
+#include <QtGui/qcursor.h>
+#include <QtGui/qguiapplication.h>
+
+#include <QtCore/qmimedata.h>
+#include <QtCore/qdebug.h>
#include <shlobj.h>
diff --git a/src/plugins/platforms/windows/qwindowsole.h b/src/plugins/platforms/windows/qwindowsole.h
index fc58858f2c..cc971b6464 100644
--- a/src/plugins/platforms/windows/qwindowsole.h
+++ b/src/plugins/platforms/windows/qwindowsole.h
@@ -43,9 +43,9 @@
#include "qwindowscombase.h"
#include <QtCore/qt_windows.h>
-#include <QtCore/QMap>
-#include <QtCore/QPointer>
-#include <QtCore/QVector>
+#include <QtCore/qmap.h>
+#include <QtCore/qpointer.h>
+#include <QtCore/qvector.h>
#include <objidl.h>
diff --git a/src/plugins/platforms/windows/qwindowsopenglcontext.h b/src/plugins/platforms/windows/qwindowsopenglcontext.h
index 85f4f717f5..d162acdde3 100644
--- a/src/plugins/platforms/windows/qwindowsopenglcontext.h
+++ b/src/plugins/platforms/windows/qwindowsopenglcontext.h
@@ -40,7 +40,7 @@
#ifndef QWINDOWSOPENGLCONTEXT_H
#define QWINDOWSOPENGLCONTEXT_H
-#include <QtGui/QOpenGLContext>
+#include <QtGui/qopenglcontext.h>
#include <qpa/qplatformopenglcontext.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowsopengltester.cpp b/src/plugins/platforms/windows/qwindowsopengltester.cpp
index c52e4e612e..c4ee820211 100644
--- a/src/plugins/platforms/windows/qwindowsopengltester.cpp
+++ b/src/plugins/platforms/windows/qwindowsopengltester.cpp
@@ -40,15 +40,15 @@
#include "qwindowsopengltester.h"
#include "qwindowscontext.h"
-#include <QtCore/QVariantMap>
-#include <QtCore/QDebug>
-#include <QtCore/QTextStream>
-#include <QtCore/QCoreApplication>
-#include <QtCore/QFile>
-#include <QtCore/QFileInfo>
-#include <QtCore/QStandardPaths>
-#include <QtCore/QLibraryInfo>
-#include <QtCore/QHash>
+#include <QtCore/qvariant.h>
+#include <QtCore/qdebug.h>
+#include <QtCore/qtextstream.h>
+#include <QtCore/qcoreapplication.h>
+#include <QtCore/qfile.h>
+#include <QtCore/qfileinfo.h>
+#include <QtCore/qstandardpaths.h>
+#include <QtCore/qlibraryinfo.h>
+#include <QtCore/qhash.h>
#ifndef QT_NO_OPENGL
#include <private/qopengl_p.h>
diff --git a/src/plugins/platforms/windows/qwindowsopengltester.h b/src/plugins/platforms/windows/qwindowsopengltester.h
index e3fec59dd5..5ee2508462 100644
--- a/src/plugins/platforms/windows/qwindowsopengltester.h
+++ b/src/plugins/platforms/windows/qwindowsopengltester.h
@@ -40,8 +40,8 @@
#ifndef QWINDOWSOPENGLTESTER_H
#define QWINDOWSOPENGLTESTER_H
-#include <QtCore/QByteArray>
-#include <QtCore/QFlags>
+#include <QtCore/qbytearray.h>
+#include <QtCore/qflags.h>
#include <QtCore/qversionnumber.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowspointerhandler.cpp b/src/plugins/platforms/windows/qwindowspointerhandler.cpp
new file mode 100644
index 0000000000..f25e6d13d8
--- /dev/null
+++ b/src/plugins/platforms/windows/qwindowspointerhandler.cpp
@@ -0,0 +1,573 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#if defined(WINVER) && WINVER < 0x0603
+# undef WINVER
+#endif
+#if !defined(WINVER)
+# define WINVER 0x0603 // Enable pointer functions for MinGW
+#endif
+
+#include "qwindowspointerhandler.h"
+#include "qwindowskeymapper.h"
+#include "qwindowscontext.h"
+#include "qwindowswindow.h"
+#include "qwindowsintegration.h"
+#include "qwindowsscreen.h"
+
+#include <qpa/qwindowsysteminterface.h>
+#include <QtGui/qguiapplication.h>
+#include <QtGui/qscreen.h>
+#include <QtGui/qtouchdevice.h>
+#include <QtGui/qwindow.h>
+#include <QtGui/private/qguiapplication_p.h>
+#include <QtCore/qvarlengtharray.h>
+#include <QtCore/qloggingcategory.h>
+#include <QtCore/qoperatingsystemversion.h>
+
+#include <windowsx.h>
+
+QT_BEGIN_NAMESPACE
+
+enum {
+ QT_PT_POINTER = 1,
+ QT_PT_TOUCH = 2,
+ QT_PT_PEN = 3,
+ QT_PT_MOUSE = 4,
+ QT_PT_TOUCHPAD = 5, // MinGW is missing PT_TOUCHPAD
+};
+
+bool QWindowsPointerHandler::translatePointerEvent(QWindow *window, HWND hwnd, QtWindows::WindowsEventType et, MSG msg, LRESULT *result)
+{
+ *result = 0;
+ const quint32 pointerId = GET_POINTERID_WPARAM(msg.wParam);
+
+ POINTER_INPUT_TYPE pointerType;
+ if (!QWindowsContext::user32dll.getPointerType(pointerId, &pointerType)) {
+ qWarning() << "GetPointerType() failed:" << qt_error_string();
+ return false;
+ }
+
+ switch (pointerType) {
+ case QT_PT_POINTER:
+ case QT_PT_MOUSE:
+ case QT_PT_TOUCHPAD: {
+ POINTER_INFO pointerInfo;
+ if (!QWindowsContext::user32dll.getPointerInfo(pointerId, &pointerInfo)) {
+ qWarning() << "GetPointerInfo() failed:" << qt_error_string();
+ return false;
+ }
+ return translateMouseTouchPadEvent(window, hwnd, et, msg, &pointerInfo);
+ }
+ case QT_PT_TOUCH: {
+ quint32 pointerCount = 0;
+ if (!QWindowsContext::user32dll.getPointerFrameTouchInfo(pointerId, &pointerCount, nullptr)) {
+ qWarning() << "GetPointerFrameTouchInfo() failed:" << qt_error_string();
+ return false;
+ }
+ QVarLengthArray<POINTER_TOUCH_INFO, 10> touchInfo(pointerCount);
+ if (!QWindowsContext::user32dll.getPointerFrameTouchInfo(pointerId, &pointerCount, touchInfo.data())) {
+ qWarning() << "GetPointerFrameTouchInfo() failed:" << qt_error_string();
+ return false;
+ }
+ return translateTouchEvent(window, hwnd, et, msg, touchInfo.data(), pointerCount);
+ }
+ case QT_PT_PEN: {
+ POINTER_PEN_INFO penInfo;
+ if (!QWindowsContext::user32dll.getPointerPenInfo(pointerId, &penInfo)) {
+ qWarning() << "GetPointerPenInfo() failed:" << qt_error_string();
+ return false;
+ }
+ return translatePenEvent(window, hwnd, et, msg, &penInfo);
+ }
+ }
+ return false;
+}
+
+static void getMouseEventInfo(UINT message, POINTER_BUTTON_CHANGE_TYPE changeType, QPoint globalPos, QEvent::Type *eventType, Qt::MouseButton *mouseButton)
+{
+ static const QHash<POINTER_BUTTON_CHANGE_TYPE, Qt::MouseButton> buttonMapping {
+ {POINTER_CHANGE_FIRSTBUTTON_DOWN, Qt::LeftButton},
+ {POINTER_CHANGE_FIRSTBUTTON_UP, Qt::LeftButton},
+ {POINTER_CHANGE_SECONDBUTTON_DOWN, Qt::RightButton},
+ {POINTER_CHANGE_SECONDBUTTON_UP, Qt::RightButton},
+ {POINTER_CHANGE_THIRDBUTTON_DOWN, Qt::MiddleButton},
+ {POINTER_CHANGE_THIRDBUTTON_UP, Qt::MiddleButton},
+ {POINTER_CHANGE_FOURTHBUTTON_DOWN, Qt::XButton1},
+ {POINTER_CHANGE_FOURTHBUTTON_UP, Qt::XButton1},
+ {POINTER_CHANGE_FIFTHBUTTON_DOWN, Qt::XButton2},
+ {POINTER_CHANGE_FIFTHBUTTON_UP, Qt::XButton2},
+ };
+
+ static const QHash<UINT, QEvent::Type> eventMapping {
+ {WM_POINTERUPDATE, QEvent::MouseMove},
+ {WM_POINTERDOWN, QEvent::MouseButtonPress},
+ {WM_POINTERUP, QEvent::MouseButtonRelease},
+ {WM_NCPOINTERUPDATE, QEvent::NonClientAreaMouseMove},
+ {WM_NCPOINTERDOWN, QEvent::NonClientAreaMouseButtonPress},
+ {WM_NCPOINTERUP, QEvent::NonClientAreaMouseButtonRelease},
+ {WM_POINTERWHEEL, QEvent::Wheel},
+ {WM_POINTERHWHEEL, QEvent::Wheel},
+ };
+
+ if (!eventType || !mouseButton)
+ return;
+
+ if (message == WM_POINTERDOWN || message == WM_POINTERUP || message == WM_NCPOINTERDOWN || message == WM_NCPOINTERUP)
+ *mouseButton = buttonMapping.value(changeType, Qt::NoButton);
+ else
+ *mouseButton = Qt::NoButton;
+
+ *eventType = eventMapping.value(message, QEvent::None);
+
+ // Pointer messages lack a double click indicator. Check if this is the case here.
+ if (message == WM_POINTERDOWN) {
+ static LONG lastTime = 0;
+ static Qt::MouseButton lastButton = Qt::NoButton;
+ static QPoint lastPos;
+ LONG messageTime = GetMessageTime();
+ if (*mouseButton == lastButton
+ && messageTime - lastTime < (LONG)GetDoubleClickTime()
+ && qAbs(globalPos.x() - lastPos.x()) < GetSystemMetrics(SM_CXDOUBLECLK)
+ && qAbs(globalPos.y() - lastPos.y()) < GetSystemMetrics(SM_CYDOUBLECLK)) {
+ *eventType = QEvent::MouseButtonDblClick;
+ }
+ lastTime = messageTime;
+ lastButton = *mouseButton;
+ lastPos = globalPos;
+ }
+}
+
+static QWindow *getWindowUnderPointer(QWindow *window, QPoint globalPos)
+{
+ QWindow *currentWindowUnderPointer = QWindowsScreen::windowAt(globalPos, CWP_SKIPINVISIBLE | CWP_SKIPTRANSPARENT);
+
+ while (currentWindowUnderPointer && currentWindowUnderPointer->flags() & Qt::WindowTransparentForInput)
+ currentWindowUnderPointer = currentWindowUnderPointer->parent();
+
+ // QTBUG-44332: When Qt is running at low integrity level and
+ // a Qt Window is parented on a Window of a higher integrity process
+ // using QWindow::fromWinId() (for example, Qt running in a browser plugin)
+ // ChildWindowFromPointEx() may not find the Qt window (failing with ERROR_ACCESS_DENIED)
+ if (!currentWindowUnderPointer) {
+ const QRect clientRect(QPoint(0, 0), window->size());
+ if (clientRect.contains(globalPos))
+ currentWindowUnderPointer = window;
+ }
+ return currentWindowUnderPointer;
+}
+
+static bool trackLeave(HWND hwnd)
+{
+ TRACKMOUSEEVENT tme;
+ tme.cbSize = sizeof(TRACKMOUSEEVENT);
+ tme.dwFlags = TME_LEAVE;
+ tme.hwndTrack = hwnd;
+ tme.dwHoverTime = HOVER_DEFAULT;
+ return TrackMouseEvent(&tme);
+}
+
+static bool isValidWheelReceiver(QWindow *candidate)
+{
+ if (candidate) {
+ const QWindow *toplevel = QWindowsWindow::topLevelOf(candidate);
+ if (toplevel->handle() && toplevel->handle()->isForeignWindow())
+ return true;
+ if (const QWindowsWindow *ww = QWindowsWindow::windowsWindowOf(toplevel))
+ return !ww->testFlag(QWindowsWindow::BlockedByModal);
+ }
+ return false;
+}
+
+static QTouchDevice *createTouchDevice()
+{
+ const int digitizers = GetSystemMetrics(SM_DIGITIZER);
+ if (!(digitizers & (NID_INTEGRATED_TOUCH | NID_EXTERNAL_TOUCH)))
+ return nullptr;
+ const int tabletPc = GetSystemMetrics(SM_TABLETPC);
+ const int maxTouchPoints = GetSystemMetrics(SM_MAXIMUMTOUCHES);
+ qCDebug(lcQpaEvents) << "Digitizers:" << hex << showbase << (digitizers & ~NID_READY)
+ << "Ready:" << (digitizers & NID_READY) << dec << noshowbase
+ << "Tablet PC:" << tabletPc << "Max touch points:" << maxTouchPoints;
+ QTouchDevice *result = new QTouchDevice;
+ result->setType(digitizers & NID_INTEGRATED_TOUCH
+ ? QTouchDevice::TouchScreen : QTouchDevice::TouchPad);
+ QTouchDevice::Capabilities capabilities = QTouchDevice::Position | QTouchDevice::Area | QTouchDevice::NormalizedPosition;
+ if (result->type() == QTouchDevice::TouchPad)
+ capabilities |= QTouchDevice::MouseEmulation;
+ result->setCapabilities(capabilities);
+ result->setMaximumTouchPoints(maxTouchPoints);
+ return result;
+}
+
+QTouchDevice *QWindowsPointerHandler::ensureTouchDevice()
+{
+ if (!m_touchDevice)
+ m_touchDevice.reset(createTouchDevice());
+ return m_touchDevice.data();
+}
+
+Qt::MouseButtons QWindowsPointerHandler::queryMouseButtons()
+{
+ Qt::MouseButtons result = 0;
+ const bool mouseSwapped = GetSystemMetrics(SM_SWAPBUTTON);
+ if (GetAsyncKeyState(VK_LBUTTON) < 0)
+ result |= mouseSwapped ? Qt::RightButton: Qt::LeftButton;
+ if (GetAsyncKeyState(VK_RBUTTON) < 0)
+ result |= mouseSwapped ? Qt::LeftButton : Qt::RightButton;
+ if (GetAsyncKeyState(VK_MBUTTON) < 0)
+ result |= Qt::MidButton;
+ if (GetAsyncKeyState(VK_XBUTTON1) < 0)
+ result |= Qt::XButton1;
+ if (GetAsyncKeyState(VK_XBUTTON2) < 0)
+ result |= Qt::XButton2;
+ return result;
+}
+
+bool QWindowsPointerHandler::translateMouseTouchPadEvent(QWindow *window, HWND hwnd,
+ QtWindows::WindowsEventType et,
+ MSG msg, PVOID vPointerInfo)
+{
+ POINTER_INFO *pointerInfo = static_cast<POINTER_INFO *>(vPointerInfo);
+ const QPoint globalPos = QPoint(pointerInfo->ptPixelLocation.x, pointerInfo->ptPixelLocation.y);
+ const QPoint localPos = QWindowsGeometryHint::mapFromGlobal(hwnd, globalPos);
+ const Qt::KeyboardModifiers keyModifiers = QWindowsKeyMapper::queryKeyboardModifiers();
+ const Qt::MouseButtons mouseButtons = queryMouseButtons();
+
+ QWindow *currentWindowUnderPointer = getWindowUnderPointer(window, globalPos);
+ QWindowsWindow *platformWindow = static_cast<QWindowsWindow *>(window->handle());
+
+ switch (msg.message) {
+ case WM_NCPOINTERDOWN:
+ case WM_NCPOINTERUP:
+ case WM_NCPOINTERUPDATE:
+ case WM_POINTERDOWN:
+ case WM_POINTERUP:
+ case WM_POINTERUPDATE: {
+
+ QEvent::Type eventType;
+ Qt::MouseButton button;
+ getMouseEventInfo(msg.message, pointerInfo->ButtonChangeType, globalPos, &eventType, &button);
+
+ if (et & QtWindows::NonClientEventFlag) {
+ QWindowSystemInterface::handleFrameStrutMouseEvent(window, localPos, globalPos, mouseButtons, button, eventType,
+ keyModifiers, Qt::MouseEventNotSynthesized);
+ return false; // To allow window dragging, etc.
+ } else {
+ if (currentWindowUnderPointer != m_windowUnderPointer) {
+ if (m_windowUnderPointer && m_windowUnderPointer == m_currentWindow) {
+ QWindowSystemInterface::handleLeaveEvent(m_windowUnderPointer);
+ m_currentWindow = nullptr;
+ }
+
+ if (currentWindowUnderPointer) {
+ if (currentWindowUnderPointer != m_currentWindow) {
+ QWindowSystemInterface::handleEnterEvent(currentWindowUnderPointer, localPos, globalPos);
+ m_currentWindow = currentWindowUnderPointer;
+ if (QWindowsWindow *wumPlatformWindow = QWindowsWindow::windowsWindowOf(currentWindowUnderPointer))
+ wumPlatformWindow->applyCursor();
+ trackLeave(hwnd);
+ }
+ } else {
+ platformWindow->applyCursor();
+ }
+ m_windowUnderPointer = currentWindowUnderPointer;
+ }
+
+ QWindowSystemInterface::handleMouseEvent(window, localPos, globalPos, mouseButtons, button, eventType,
+ keyModifiers, Qt::MouseEventNotSynthesized);
+
+ // The initial down click over the QSizeGrip area, which posts a resize WM_SYSCOMMAND
+ // has go to through DefWindowProc() for resizing to work, so we return false here,
+ // unless the mouse is captured, as it would mess with menu processing.
+ return msg.message != WM_POINTERDOWN || GetCapture();
+ }
+ }
+ case WM_POINTERHWHEEL:
+ case WM_POINTERWHEEL: {
+
+ int delta = GET_WHEEL_DELTA_WPARAM(msg.wParam);
+
+ // Qt horizontal wheel rotation orientation is opposite to the one in WM_POINTERHWHEEL
+ if (msg.message == WM_POINTERHWHEEL)
+ delta = -delta;
+
+ const QPoint angleDelta = (msg.message == WM_POINTERHWHEEL || (keyModifiers & Qt::AltModifier)) ?
+ QPoint(delta, 0) : QPoint(0, delta);
+
+ if (isValidWheelReceiver(window))
+ QWindowSystemInterface::handleWheelEvent(window, localPos, globalPos, QPoint(), angleDelta, keyModifiers);
+ return true;
+ }
+ case WM_POINTERLEAVE:
+ return true;
+ }
+ return false;
+}
+
+bool QWindowsPointerHandler::translateTouchEvent(QWindow *window, HWND hwnd,
+ QtWindows::WindowsEventType et,
+ MSG msg, PVOID vTouchInfo, quint32 count)
+{
+ Q_UNUSED(hwnd);
+ Q_UNUSED(et);
+
+ if (et & QtWindows::NonClientEventFlag)
+ return false; // Let DefWindowProc() handle Non Client messages.
+
+ if (count < 1)
+ return false;
+
+ const QScreen *screen = window->screen();
+ if (!screen)
+ screen = QGuiApplication::primaryScreen();
+ if (!screen)
+ return false;
+
+ POINTER_TOUCH_INFO *touchInfo = static_cast<POINTER_TOUCH_INFO *>(vTouchInfo);
+
+ const QRect screenGeometry = screen->geometry();
+
+ QList<QWindowSystemInterface::TouchPoint> touchPoints;
+
+ for (quint32 i = 0; i < count; ++i) {
+
+ QWindowSystemInterface::TouchPoint touchPoint;
+ touchPoint.id = touchInfo[i].pointerInfo.pointerId;
+ touchPoint.pressure = (touchInfo[i].touchMask & TOUCH_MASK_PRESSURE) ?
+ touchInfo[i].pressure / 1024.0 : 1.0;
+ if (m_lastTouchPositions.contains(touchPoint.id))
+ touchPoint.normalPosition = m_lastTouchPositions.value(touchPoint.id);
+
+ const QPointF screenPos = QPointF(touchInfo[i].pointerInfo.ptPixelLocation.x,
+ touchInfo[i].pointerInfo.ptPixelLocation.y);
+
+ if (touchInfo[i].touchMask & TOUCH_MASK_CONTACTAREA)
+ touchPoint.area.setSize(QSizeF(touchInfo[i].rcContact.right - touchInfo[i].rcContact.left,
+ touchInfo[i].rcContact.bottom - touchInfo[i].rcContact.top));
+ touchPoint.area.moveCenter(screenPos);
+ QPointF normalPosition = QPointF(screenPos.x() / screenGeometry.width(),
+ screenPos.y() / screenGeometry.height());
+ const bool stationaryTouchPoint = (normalPosition == touchPoint.normalPosition);
+ touchPoint.normalPosition = normalPosition;
+
+ if (touchInfo[i].pointerInfo.pointerFlags & POINTER_FLAG_DOWN) {
+ touchPoint.state = Qt::TouchPointPressed;
+ m_lastTouchPositions.insert(touchPoint.id, touchPoint.normalPosition);
+ } else if (touchInfo[i].pointerInfo.pointerFlags & POINTER_FLAG_UP) {
+ touchPoint.state = Qt::TouchPointReleased;
+ m_lastTouchPositions.remove(touchPoint.id);
+ } else {
+ touchPoint.state = stationaryTouchPoint ? Qt::TouchPointStationary : Qt::TouchPointMoved;
+ m_lastTouchPositions.insert(touchPoint.id, touchPoint.normalPosition);
+ }
+ touchPoints.append(touchPoint);
+ }
+
+ QWindowSystemInterface::handleTouchEvent(window, m_touchDevice.data(), touchPoints,
+ QWindowsKeyMapper::queryKeyboardModifiers());
+
+ if (!(QWindowsIntegration::instance()->options() & QWindowsIntegration::DontPassOsMouseEventsSynthesizedFromTouch)) {
+
+ const QPoint globalPos = QPoint(touchInfo->pointerInfo.ptPixelLocation.x, touchInfo->pointerInfo.ptPixelLocation.y);
+ const QPoint localPos = QWindowsGeometryHint::mapFromGlobal(hwnd, globalPos);
+ const Qt::KeyboardModifiers keyModifiers = QWindowsKeyMapper::queryKeyboardModifiers();
+ const Qt::MouseButtons mouseButtons = queryMouseButtons();
+
+ QEvent::Type eventType;
+ Qt::MouseButton button;
+ getMouseEventInfo(msg.message, touchInfo->pointerInfo.ButtonChangeType, globalPos, &eventType, &button);
+
+ QWindowSystemInterface::handleMouseEvent(window, localPos, globalPos, mouseButtons, button, eventType,
+ keyModifiers, Qt::MouseEventSynthesizedByQt);
+ }
+
+ return true;
+}
+
+bool QWindowsPointerHandler::translatePenEvent(QWindow *window, HWND hwnd, QtWindows::WindowsEventType et,
+ MSG msg, PVOID vPenInfo)
+{
+ if (et & QtWindows::NonClientEventFlag)
+ return false; // Let DefWindowProc() handle Non Client messages.
+
+ POINTER_PEN_INFO *penInfo = static_cast<POINTER_PEN_INFO *>(vPenInfo);
+ const quint32 pointerId = penInfo->pointerInfo.pointerId;
+ const QPoint globalPos = QPoint(penInfo->pointerInfo.ptPixelLocation.x, penInfo->pointerInfo.ptPixelLocation.y);
+ const QPoint localPos = QWindowsGeometryHint::mapFromGlobal(hwnd, globalPos);
+ const qreal pressure = (penInfo->penMask & PEN_MASK_PRESSURE) ? qreal(penInfo->pressure) / 1024.0 : 0.5;
+ const qreal rotation = (penInfo->penMask & PEN_MASK_ROTATION) ? qreal(penInfo->rotation) : 0.0;
+ const qreal tangentialPressure = 0.0;
+ const int xTilt = (penInfo->penMask & PEN_MASK_TILT_X) ? penInfo->tiltX : 0;
+ const int yTilt = (penInfo->penMask & PEN_MASK_TILT_Y) ? penInfo->tiltY : 0;
+ const int z = 0;
+
+ const QTabletEvent::TabletDevice device = QTabletEvent::Stylus;
+ QTabletEvent::PointerType type;
+ Qt::MouseButtons mouseButtons;
+
+ const bool pointerInContact = IS_POINTER_INCONTACT_WPARAM(msg.wParam);
+ if (pointerInContact)
+ mouseButtons = Qt::LeftButton;
+
+ if (penInfo->penFlags & (PEN_FLAG_ERASER | PEN_FLAG_INVERTED)) {
+ type = QTabletEvent::Eraser;
+ } else {
+ type = QTabletEvent::Pen;
+ if (pointerInContact && penInfo->penFlags & PEN_FLAG_BARREL)
+ mouseButtons = Qt::RightButton; // Either left or right, not both
+ }
+
+ switch (msg.message) {
+ case WM_POINTERENTER: {
+ QWindowSystemInterface::handleTabletEnterProximityEvent(device, type, pointerId);
+ m_windowUnderPointer = window;
+ // The local coordinates may fall outside the window.
+ // Wait until the next update to send the enter event.
+ m_needsEnterOnPointerUpdate = true;
+ break;
+ }
+ case WM_POINTERLEAVE:
+ if (m_windowUnderPointer && m_windowUnderPointer == m_currentWindow) {
+ QWindowSystemInterface::handleLeaveEvent(m_windowUnderPointer);
+ m_windowUnderPointer = nullptr;
+ m_currentWindow = nullptr;
+ }
+ QWindowSystemInterface::handleTabletLeaveProximityEvent(device, type, pointerId);
+ break;
+ case WM_POINTERDOWN:
+ case WM_POINTERUP:
+ case WM_POINTERUPDATE: {
+ QWindow *target = QGuiApplicationPrivate::tabletDevicePoint(pointerId).target; // Pass to window that grabbed it.
+ if (!target && m_windowUnderPointer)
+ target = m_windowUnderPointer;
+ if (!target)
+ target = window;
+
+ if (m_needsEnterOnPointerUpdate) {
+ m_needsEnterOnPointerUpdate = false;
+ if (window != m_currentWindow) {
+ QWindowSystemInterface::handleEnterEvent(window, localPos, globalPos);
+ m_currentWindow = window;
+ if (QWindowsWindow *wumPlatformWindow = QWindowsWindow::windowsWindowOf(target))
+ wumPlatformWindow->applyCursor();
+ }
+ }
+ const Qt::KeyboardModifiers keyModifiers = QWindowsKeyMapper::queryKeyboardModifiers();
+
+ QWindowSystemInterface::handleTabletEvent(target, localPos, globalPos, device, type, mouseButtons,
+ pressure, xTilt, yTilt, tangentialPressure, rotation, z,
+ pointerId, keyModifiers);
+
+ QEvent::Type eventType;
+ Qt::MouseButton button;
+ getMouseEventInfo(msg.message, penInfo->pointerInfo.ButtonChangeType, globalPos, &eventType, &button);
+
+ QWindowSystemInterface::handleMouseEvent(target, localPos, globalPos, mouseButtons, button, eventType,
+ keyModifiers, Qt::MouseEventSynthesizedByQt);
+ break;
+ }
+ }
+ return true;
+}
+
+// SetCursorPos()/TrackMouseEvent() will generate old-style WM_MOUSE messages. Handle them here.
+bool QWindowsPointerHandler::translateMouseEvent(QWindow *window, HWND hwnd, QtWindows::WindowsEventType et, MSG msg, LRESULT *result)
+{
+ Q_UNUSED(et);
+
+ *result = 0;
+ if (msg.message != WM_MOUSELEAVE && msg.message != WM_MOUSEMOVE)
+ return false;
+
+ const QPoint localPos(GET_X_LPARAM(msg.lParam), GET_Y_LPARAM(msg.lParam));
+ const QPoint globalPos = QWindowsGeometryHint::mapToGlobal(hwnd, localPos);
+
+ QWindowsWindow *platformWindow = static_cast<QWindowsWindow *>(window->handle());
+
+ if (msg.message == WM_MOUSELEAVE) {
+ if (window == m_currentWindow) {
+ QWindowSystemInterface::handleLeaveEvent(window);
+ m_windowUnderPointer = nullptr;
+ m_currentWindow = nullptr;
+ platformWindow->applyCursor();
+ }
+ return false;
+ }
+
+ // Windows sends a mouse move with no buttons pressed to signal "Enter"
+ // when a window is shown over the cursor. Discard the event and only use
+ // it for generating QEvent::Enter to be consistent with other platforms -
+ // X11 and macOS.
+ static QPoint lastMouseMovePos;
+ const bool discardEvent = msg.wParam == 0 && (m_windowUnderPointer.isNull() || globalPos == lastMouseMovePos);
+ lastMouseMovePos = globalPos;
+
+ QWindow *currentWindowUnderPointer = getWindowUnderPointer(window, globalPos);
+
+ if (currentWindowUnderPointer != m_windowUnderPointer) {
+ if (m_windowUnderPointer && m_windowUnderPointer == m_currentWindow) {
+ QWindowSystemInterface::handleLeaveEvent(m_windowUnderPointer);
+ m_currentWindow = nullptr;
+ }
+
+ if (currentWindowUnderPointer) {
+ if (currentWindowUnderPointer != m_currentWindow) {
+ QWindowSystemInterface::handleEnterEvent(currentWindowUnderPointer, localPos, globalPos);
+ m_currentWindow = currentWindowUnderPointer;
+ if (QWindowsWindow *wumPlatformWindow = QWindowsWindow::windowsWindowOf(currentWindowUnderPointer))
+ wumPlatformWindow->applyCursor();
+ trackLeave(hwnd);
+ }
+ } else {
+ platformWindow->applyCursor();
+ }
+ m_windowUnderPointer = currentWindowUnderPointer;
+ }
+
+ const Qt::KeyboardModifiers keyModifiers = QWindowsKeyMapper::queryKeyboardModifiers();
+ const Qt::MouseButtons mouseButtons = queryMouseButtons();
+
+ if (!discardEvent)
+ QWindowSystemInterface::handleMouseEvent(window, localPos, globalPos, mouseButtons, Qt::NoButton, QEvent::MouseMove,
+ keyModifiers, Qt::MouseEventNotSynthesized);
+ return false;
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowspointerhandler.h b/src/plugins/platforms/windows/qwindowspointerhandler.h
new file mode 100644
index 0000000000..11bc9419d7
--- /dev/null
+++ b/src/plugins/platforms/windows/qwindowspointerhandler.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINDOWSPOINTERHANDLER_H
+#define QWINDOWSPOINTERHANDLER_H
+
+#include "qtwindowsglobal.h"
+#include <QtCore/qt_windows.h>
+
+#include <QtCore/qpointer.h>
+#include <QtCore/qscopedpointer.h>
+#include <QtCore/qhash.h>
+
+QT_BEGIN_NAMESPACE
+
+class QWindow;
+class QTouchDevice;
+
+class QWindowsPointerHandler
+{
+ Q_DISABLE_COPY(QWindowsPointerHandler)
+public:
+ QWindowsPointerHandler() = default;
+ bool translatePointerEvent(QWindow *window, HWND hwnd, QtWindows::WindowsEventType et, MSG msg, LRESULT *result);
+ bool translateMouseEvent(QWindow *window, HWND hwnd, QtWindows::WindowsEventType et, MSG msg, LRESULT *result);
+ QTouchDevice *touchDevice() const { return m_touchDevice.data(); }
+ QTouchDevice *ensureTouchDevice();
+ Qt::MouseButtons queryMouseButtons();
+ QWindow *windowUnderMouse() const { return m_windowUnderPointer.data(); }
+ void clearWindowUnderMouse() { m_windowUnderPointer = nullptr; }
+
+private:
+ bool translateMouseTouchPadEvent(QWindow *window, HWND hwnd, QtWindows::WindowsEventType et, MSG msg, PVOID vPointerInfo);
+ bool translateTouchEvent(QWindow *window, HWND hwnd, QtWindows::WindowsEventType et, MSG msg, PVOID vTouchInfo, unsigned int count);
+ bool translatePenEvent(QWindow *window, HWND hwnd, QtWindows::WindowsEventType et, MSG msg, PVOID vPenInfo);
+
+ QScopedPointer<QTouchDevice> m_touchDevice;
+ QHash<int, QPointF> m_lastTouchPositions;
+ QPointer<QWindow> m_windowUnderPointer;
+ QPointer<QWindow> m_currentWindow;
+ bool m_needsEnterOnPointerUpdate = false;
+};
+
+QT_END_NAMESPACE
+
+#endif // QWINDOWSPOINTERHANDLER_H
diff --git a/src/plugins/platforms/windows/qwindowsscreen.cpp b/src/plugins/platforms/windows/qwindowsscreen.cpp
index d56dc870ea..bf7f359aac 100644
--- a/src/plugins/platforms/windows/qwindowsscreen.cpp
+++ b/src/plugins/platforms/windows/qwindowsscreen.cpp
@@ -45,14 +45,14 @@
#include <QtCore/qt_windows.h>
-#include <QtCore/QSettings>
-#include <QtGui/QPixmap>
-#include <QtGui/QGuiApplication>
+#include <QtCore/qsettings.h>
+#include <QtGui/qpixmap.h>
+#include <QtGui/qguiapplication.h>
#include <qpa/qwindowsysteminterface.h>
#include <private/qhighdpiscaling_p.h>
-#include <QtGui/QScreen>
+#include <QtGui/qscreen.h>
-#include <QtCore/QDebug>
+#include <QtCore/qdebug.h>
QT_BEGIN_NAMESPACE
@@ -274,9 +274,12 @@ QList<QPlatformScreen *> QWindowsScreen::virtualSiblings() const
{
QList<QPlatformScreen *> result;
if (m_data.flags & QWindowsScreenData::VirtualDesktop) {
- foreach (QWindowsScreen *screen, QWindowsContext::instance()->screenManager().screens())
+ const QWindowsScreenManager::WindowsScreenList screens
+ = QWindowsContext::instance()->screenManager().screens();
+ for (QWindowsScreen *screen : screens) {
if (screen->data().flags & QWindowsScreenData::VirtualDesktop)
result.push_back(screen);
+ }
} else {
result.push_back(const_cast<QWindowsScreen *>(this));
}
@@ -505,7 +508,8 @@ void QWindowsScreenManager::removeScreen(int index)
// move those manually.
if (screen != primaryScreen) {
unsigned movedWindowCount = 0;
- foreach (QWindow *w, QGuiApplication::topLevelWindows()) {
+ const QWindowList tlws = QGuiApplication::topLevelWindows();
+ for (QWindow *w : tlws) {
if (w->screen() == screen && w->handle() && w->type() != Qt::Desktop) {
if (w->isVisible() && w->windowState() != Qt::WindowMinimized
&& (QWindowsWindow::baseWindowOf(w)->exStyle() & WS_EX_TOOLWINDOW)) {
@@ -530,9 +534,9 @@ void QWindowsScreenManager::removeScreen(int index)
bool QWindowsScreenManager::handleScreenChanges()
{
// Look for changed monitors, add new ones
- WindowsScreenDataList newDataList = monitorData();
+ const WindowsScreenDataList newDataList = monitorData();
const bool lockScreen = newDataList.size() == 1 && (newDataList.front().flags & QWindowsScreenData::LockScreen);
- foreach (const QWindowsScreenData &newData, newDataList) {
+ for (const QWindowsScreenData &newData : newDataList) {
const int existingIndex = indexOfMonitor(m_screens, newData.name);
if (existingIndex != -1) {
m_screens.at(existingIndex)->handleChanges(newData);
@@ -564,7 +568,7 @@ void QWindowsScreenManager::clearScreens()
const QWindowsScreen *QWindowsScreenManager::screenAtDp(const QPoint &p) const
{
- foreach (QWindowsScreen *scr, m_screens) {
+ for (QWindowsScreen *scr : m_screens) {
if (scr->geometry().contains(p))
return scr;
}
diff --git a/src/plugins/platforms/windows/qwindowsscreen.h b/src/plugins/platforms/windows/qwindowsscreen.h
index 5753e605da..824bcb1ad6 100644
--- a/src/plugins/platforms/windows/qwindowsscreen.h
+++ b/src/plugins/platforms/windows/qwindowsscreen.h
@@ -42,10 +42,10 @@
#include "qtwindowsglobal.h"
-#include <QtCore/QList>
-#include <QtCore/QVector>
-#include <QtCore/QPair>
-#include <QtCore/QScopedPointer>
+#include <QtCore/qlist.h>
+#include <QtCore/qvector.h>
+#include <QtCore/qpair.h>
+#include <QtCore/qscopedpointer.h>
#include <qpa/qplatformscreen.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowsservices.cpp b/src/plugins/platforms/windows/qwindowsservices.cpp
index 48332b35f8..b6ed27464e 100644
--- a/src/plugins/platforms/windows/qwindowsservices.cpp
+++ b/src/plugins/platforms/windows/qwindowsservices.cpp
@@ -41,9 +41,9 @@
#include "qwindowsservices.h"
#include <QtCore/qt_windows.h>
-#include <QtCore/QUrl>
-#include <QtCore/QDebug>
-#include <QtCore/QDir>
+#include <QtCore/qurl.h>
+#include <QtCore/qdebug.h>
+#include <QtCore/qdir.h>
#include <shlobj.h>
#include <intshcut.h>
diff --git a/src/plugins/platforms/windows/qwindowstabletsupport.cpp b/src/plugins/platforms/windows/qwindowstabletsupport.cpp
index 280519d39d..dad3e9df9f 100644
--- a/src/plugins/platforms/windows/qwindowstabletsupport.cpp
+++ b/src/plugins/platforms/windows/qwindowstabletsupport.cpp
@@ -46,13 +46,13 @@
#include <qpa/qwindowsysteminterface.h>
-#include <QtGui/QTabletEvent>
-#include <QtGui/QScreen>
-#include <QtGui/QGuiApplication>
-#include <QtGui/QWindow>
-#include <QtCore/QDebug>
-#include <QtCore/QVarLengthArray>
-#include <QtCore/QtMath>
+#include <QtGui/qevent.h>
+#include <QtGui/qscreen.h>
+#include <QtGui/qguiapplication.h>
+#include <QtGui/qwindow.h>
+#include <QtCore/qdebug.h>
+#include <QtCore/qvarlengtharray.h>
+#include <QtCore/qmath.h>
#include <private/qguiapplication_p.h>
#include <QtCore/private/qsystemlibrary_p.h>
@@ -135,9 +135,9 @@ QDebug operator<<(QDebug d, const QWindowsTabletDeviceData &t)
d.nospace();
d << "TabletDevice id:" << t.uniqueId << " pressure: " << t.minPressure
<< ".." << t.maxPressure << " tan pressure: " << t.minTanPressure << ".."
- << t.maxTanPressure << " area:" << t.minX << t.minY <<t.minZ
- << ".." << t.maxX << t.maxY << t.maxZ << " device " << t.currentDevice
- << " pointer " << t.currentPointerType;
+ << t.maxTanPressure << " area: (" << t.minX << ',' << t.minY << ',' << t.minZ
+ << ")..(" << t.maxX << ',' << t.maxY << ',' << t.maxZ << ") device "
+ << t.currentDevice << " pointer " << t.currentPointerType;
return d;
}
@@ -211,9 +211,6 @@ bool QWindowsWinTab32DLL::init()
QWindowsTabletSupport::QWindowsTabletSupport(HWND window, HCTX context)
: m_window(window)
, m_context(context)
- , m_absoluteRange(20)
- , m_tiltSupport(false)
- , m_currentDevice(-1)
{
AXIS orientation[3];
// Some tablets don't support tilt, check if it is possible,
@@ -230,13 +227,13 @@ QWindowsTabletSupport::~QWindowsTabletSupport()
QWindowsTabletSupport *QWindowsTabletSupport::create()
{
if (!m_winTab32DLL.init())
- return 0;
+ return nullptr;
const HWND window = QWindowsContext::instance()->createDummyWindow(QStringLiteral("TabletDummyWindow"),
L"TabletDummyWindow",
qWindowsTabletSupportWndProc);
if (!window) {
qCWarning(lcQpaTablet) << __FUNCTION__ << "Unable to create window for tablet.";
- return 0;
+ return nullptr;
}
LOGCONTEXT lcMine;
// build our context from the default context
@@ -255,7 +252,7 @@ QWindowsTabletSupport *QWindowsTabletSupport::create()
if (!context) {
qCDebug(lcQpaTablet) << __FUNCTION__ << "Unable to open tablet.";
DestroyWindow(window);
- return 0;
+ return nullptr;
}
// Set the size of the Packet Queue to the correct size
@@ -266,7 +263,7 @@ QWindowsTabletSupport *QWindowsTabletSupport::create()
qWarning("Unable to set queue size on tablet. The tablet will not work.");
QWindowsTabletSupport::m_winTab32DLL.wTClose(context);
DestroyWindow(window);
- return 0;
+ return nullptr;
} // cannot restore old size
} // cannot set
} // mismatch
@@ -285,7 +282,7 @@ unsigned QWindowsTabletSupport::options() const
QString QWindowsTabletSupport::description() const
{
- const unsigned size = m_winTab32DLL.wTInfo(WTI_INTERFACE, IFC_WINTABID, 0);
+ const unsigned size = m_winTab32DLL.wTInfo(WTI_INTERFACE, IFC_WINTABID, nullptr);
if (!size)
return QString();
QVarLengthArray<TCHAR> winTabId(size + 1);
diff --git a/src/plugins/platforms/windows/qwindowstabletsupport.h b/src/plugins/platforms/windows/qwindowstabletsupport.h
index 340818c3f7..d98dbd4de7 100644
--- a/src/plugins/platforms/windows/qwindowstabletsupport.h
+++ b/src/plugins/platforms/windows/qwindowstabletsupport.h
@@ -43,8 +43,8 @@
#include "qtwindowsglobal.h"
#include <QtGui/qtguiglobal.h>
-#include <QtCore/QVector>
-#include <QtCore/QPointF>
+#include <QtCore/qvector.h>
+#include <QtCore/qpoint.h>
#include <wintab.h>
@@ -83,22 +83,23 @@ struct QWindowsWinTab32DLL
struct QWindowsTabletDeviceData
{
- QWindowsTabletDeviceData() : minPressure(0), maxPressure(0), minTanPressure(0),
- maxTanPressure(0), minX(0), maxX(0), minY(0), maxY(0), minZ(0), maxZ(0),
- uniqueId(0), currentDevice(0), currentPointerType(0) {}
-
QPointF scaleCoordinates(int coordX, int coordY,const QRect &targetArea) const;
qreal scalePressure(qreal p) const { return p / qreal(maxPressure - minPressure); }
qreal scaleTangentialPressure(qreal p) const { return p / qreal(maxTanPressure - minTanPressure); }
- int minPressure;
- int maxPressure;
- int minTanPressure;
- int maxTanPressure;
- int minX, maxX, minY, maxY, minZ, maxZ;
- qint64 uniqueId;
- int currentDevice;
- int currentPointerType;
+ int minPressure = 0;
+ int maxPressure = 0;
+ int minTanPressure = 0;
+ int maxTanPressure = 0;
+ int minX = 0;
+ int maxX = 0;
+ int minY = 0;
+ int maxY = 0;
+ int minZ = 0;
+ int maxZ = 0;
+ qint64 uniqueId = 0;
+ int currentDevice = 0;
+ int currentPointerType = 0;
};
#ifndef QT_NO_DEBUG_STREAM
@@ -145,10 +146,10 @@ private:
static QWindowsWinTab32DLL m_winTab32DLL;
const HWND m_window;
const HCTX m_context;
- int m_absoluteRange;
- bool m_tiltSupport;
+ int m_absoluteRange = 20;
+ bool m_tiltSupport = false;
QVector<QWindowsTabletDeviceData> m_devices;
- int m_currentDevice;
+ int m_currentDevice = -1;
QPointF m_oldGlobalPosF;
Mode m_mode = PenMode;
State m_state = PenUp;
diff --git a/src/plugins/platforms/windows/qwindowstheme.cpp b/src/plugins/platforms/windows/qwindowstheme.cpp
index 651c661d6b..9d2d4c28e0 100644
--- a/src/plugins/platforms/windows/qwindowstheme.cpp
+++ b/src/plugins/platforms/windows/qwindowstheme.cpp
@@ -59,20 +59,20 @@
#endif
#include <shellapi.h>
-#include <QtCore/QVariant>
-#include <QtCore/QCoreApplication>
-#include <QtCore/QDebug>
-#include <QtCore/QTextStream>
-#include <QtCore/QSysInfo>
-#include <QtCore/QCache>
-#include <QtCore/QThread>
-#include <QtCore/QMutex>
-#include <QtCore/QWaitCondition>
-#include <QtGui/QColor>
-#include <QtGui/QPalette>
-#include <QtGui/QGuiApplication>
-#include <QtGui/QPainter>
-#include <QtGui/QPixmapCache>
+#include <QtCore/qvariant.h>
+#include <QtCore/qcoreapplication.h>
+#include <QtCore/qdebug.h>
+#include <QtCore/qtextstream.h>
+#include <QtCore/qsysinfo.h>
+#include <QtCore/qcache.h>
+#include <QtCore/qthread.h>
+#include <QtCore/qmutex.h>
+#include <QtCore/qwaitcondition.h>
+#include <QtGui/qcolor.h>
+#include <QtGui/qpalette.h>
+#include <QtGui/qguiapplication.h>
+#include <QtGui/qpainter.h>
+#include <QtGui/qpixmapcache.h>
#include <qpa/qwindowsysteminterface.h>
#include <QtThemeSupport/private/qabstractfileiconengine_p.h>
#include <QtFontDatabaseSupport/private/qwindowsfontdatabase_p.h>
diff --git a/src/plugins/platforms/windows/qwindowstheme.h b/src/plugins/platforms/windows/qwindowstheme.h
index 237e8158fa..f6e60a268b 100644
--- a/src/plugins/platforms/windows/qwindowstheme.h
+++ b/src/plugins/platforms/windows/qwindowstheme.h
@@ -42,8 +42,8 @@
#include <qpa/qplatformtheme.h>
-#include <QtCore/QSharedPointer>
-#include <QtCore/QVariant>
+#include <QtCore/qsharedpointer.h>
+#include <QtCore/qvariant.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowsthreadpoolrunner.h b/src/plugins/platforms/windows/qwindowsthreadpoolrunner.h
index 5601cc9305..99705927af 100644
--- a/src/plugins/platforms/windows/qwindowsthreadpoolrunner.h
+++ b/src/plugins/platforms/windows/qwindowsthreadpoolrunner.h
@@ -40,10 +40,10 @@
#ifndef QWINDOWSTHREADPOOLRUNNER_H
#define QWINDOWSTHREADPOOLRUNNER_H
-#include <QtCore/QMutex>
-#include <QtCore/QRunnable>
-#include <QtCore/QThreadPool>
-#include <QtCore/QWaitCondition>
+#include <QtCore/qmutex.h>
+#include <QtCore/qrunnable.h>
+#include <QtCore/qthreadpool.h>
+#include <QtCore/qwaitcondition.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowsvulkaninstance.cpp b/src/plugins/platforms/windows/qwindowsvulkaninstance.cpp
index d81ee8ba29..5ffb4375ce 100644
--- a/src/plugins/platforms/windows/qwindowsvulkaninstance.cpp
+++ b/src/plugins/platforms/windows/qwindowsvulkaninstance.cpp
@@ -44,20 +44,9 @@ QT_BEGIN_NAMESPACE
QWindowsVulkanInstance::QWindowsVulkanInstance(QVulkanInstance *instance)
: m_instance(instance),
m_getPhysDevPresSupport(nullptr),
- m_createSurface(nullptr),
- m_destroySurface(nullptr)
+ m_createSurface(nullptr)
{
- if (qEnvironmentVariableIsSet("QT_VULKAN_LIB"))
- m_lib.setFileName(QString::fromUtf8(qgetenv("QT_VULKAN_LIB")));
- else
- m_lib.setFileName(QStringLiteral("vulkan-1"));
-
- if (!m_lib.load()) {
- qWarning("Failed to load %s: %s", qPrintable(m_lib.fileName()), qPrintable(m_lib.errorString()));
- return;
- }
-
- init(&m_lib);
+ loadVulkanLibrary(QStringLiteral("vulkan-1"));
}
void QWindowsVulkanInstance::createOrAdoptInstance()
@@ -106,14 +95,6 @@ VkSurfaceKHR QWindowsVulkanInstance::createSurface(HWND win)
qWarning("Failed to find vkCreateWin32SurfaceKHR");
return surface;
}
- if (!m_destroySurface) {
- m_destroySurface = reinterpret_cast<PFN_vkDestroySurfaceKHR>(
- m_vkGetInstanceProcAddr(m_vkInst, "vkDestroySurfaceKHR"));
- }
- if (!m_destroySurface) {
- qWarning("Failed to find vkDestroySurfaceKHR");
- return surface;
- }
VkWin32SurfaceCreateInfoKHR surfaceInfo;
memset(&surfaceInfo, 0, sizeof(surfaceInfo));
@@ -127,10 +108,4 @@ VkSurfaceKHR QWindowsVulkanInstance::createSurface(HWND win)
return surface;
}
-void QWindowsVulkanInstance::destroySurface(VkSurfaceKHR surface)
-{
- if (m_destroySurface && surface)
- m_destroySurface(m_vkInst, surface, nullptr);
-}
-
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowsvulkaninstance.h b/src/plugins/platforms/windows/qwindowsvulkaninstance.h
index ca60ab7627..40442c63d0 100644
--- a/src/plugins/platforms/windows/qwindowsvulkaninstance.h
+++ b/src/plugins/platforms/windows/qwindowsvulkaninstance.h
@@ -47,7 +47,7 @@
#define VK_USE_PLATFORM_WIN32_KHR
#include <QtVulkanSupport/private/qbasicvulkanplatforminstance_p.h>
-#include <QLibrary>
+#include <QtCore/qlibrary.h>
QT_BEGIN_NAMESPACE
@@ -61,14 +61,11 @@ public:
bool supportsPresent(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, QWindow *window) override;
VkSurfaceKHR createSurface(HWND win);
- void destroySurface(VkSurfaceKHR surface);
private:
QVulkanInstance *m_instance;
- QLibrary m_lib;
PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR m_getPhysDevPresSupport;
PFN_vkCreateWin32SurfaceKHR m_createSurface;
- PFN_vkDestroySurfaceKHR m_destroySurface;
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 3909c64c53..150ab5fc04 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -62,19 +62,20 @@
# include "qwindowscursor.h"
#endif
-#include <QtGui/QGuiApplication>
-#include <QtGui/QScreen>
-#include <QtGui/QWindow>
-#include <QtGui/QRegion>
-#include <QtGui/QOpenGLContext>
+#include <QtGui/qguiapplication.h>
+#include <QtGui/qscreen.h>
+#include <QtGui/qwindow.h>
+#include <QtGui/qregion.h>
+#include <QtGui/qopenglcontext.h>
#include <private/qsystemlibrary_p.h>
#include <private/qwindow_p.h> // QWINDOWSIZE_MAX
#include <private/qguiapplication_p.h>
#include <private/qhighdpiscaling_p.h>
#include <qpa/qwindowsysteminterface.h>
-#include <QtCore/QDebug>
-#include <QtCore/QLibraryInfo>
+#include <QtCore/qdebug.h>
+#include <QtCore/qlibraryinfo.h>
+#include <QtCore/qoperatingsystemversion.h>
#include <dwmapi.h>
@@ -422,6 +423,31 @@ static inline void updateGLWindowSettings(const QWindow *w, HWND hwnd, Qt::Windo
}
/*!
+ Calculates the dimensions of the invisible borders within the
+ window frames in Windows 10, using an empirical expression that
+ reproduces the measured values for standard DPI settings.
+*/
+
+static QMargins invisibleMargins(QPoint screenPoint)
+{
+ if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::Windows10) {
+ POINT pt = {screenPoint.x(), screenPoint.y()};
+ if (HMONITOR hMonitor = MonitorFromPoint(pt, MONITOR_DEFAULTTONULL)) {
+ if (QWindowsContext::shcoredll.isValid()) {
+ UINT dpiX;
+ UINT dpiY;
+ if (SUCCEEDED(QWindowsContext::shcoredll.getDpiForMonitor(hMonitor, 0, &dpiX, &dpiY))) {
+ const qreal sc = (dpiX - 96) / 96.0;
+ const int gap = 7 + qRound(5*sc) - int(sc);
+ return QMargins(gap, 0, gap, gap);
+ }
+ }
+ }
+ }
+ return QMargins();
+}
+
+/*!
\class WindowCreationData
\brief Window creation code.
@@ -651,16 +677,20 @@ QWindowsWindowData
const QWindowCreationContextPtr context(new QWindowCreationContext(w, data.geometry, rect, data.customMargins, style, exStyle));
QWindowsContext::instance()->setWindowCreationContext(context);
+ QMargins invMargins = topLevel && !(result.flags & Qt::FramelessWindowHint) && QWindowsGeometryHint::positionIncludesFrame(w)
+ ? invisibleMargins(QPoint(context->frameX, context->frameY)) : QMargins();
+
qCDebug(lcQpaWindows).nospace()
<< "CreateWindowEx: " << w << " class=" << windowClassName << " title=" << title
<< '\n' << *this << "\nrequested: " << rect << ": "
<< context->frameWidth << 'x' << context->frameHeight
<< '+' << context->frameX << '+' << context->frameY
- << " custom margins: " << context->customMargins;
+ << " custom margins: " << context->customMargins
+ << " invisible margins: " << invMargins;
result.hwnd = CreateWindowEx(exStyle, classNameUtf16, titleUtf16,
style,
- context->frameX, context->frameY,
+ context->frameX - invMargins.left(), context->frameY - invMargins.top(),
context->frameWidth, context->frameHeight,
parentHandle, NULL, appinst, NULL);
qCDebug(lcQpaWindows).nospace()
@@ -673,7 +703,7 @@ QWindowsWindowData
}
result.geometry = context->obtainedGeometry;
- result.frame = context->margins;
+ result.fullFrameMargins = context->margins;
result.embedded = embedded;
result.customMargins = context->customMargins;
@@ -887,7 +917,7 @@ QRect QWindowsBaseWindow::frameGeometry_sys() const
QRect QWindowsBaseWindow::geometry_sys() const
{
- return frameGeometry_sys().marginsRemoved(frameMargins());
+ return frameGeometry_sys().marginsRemoved(fullFrameMargins());
}
QMargins QWindowsBaseWindow::frameMargins_sys() const
@@ -1560,7 +1590,7 @@ QRect QWindowsWindow::normalGeometry() const
const bool fakeFullScreen =
m_savedFrameGeometry.isValid() && (window()->windowStates() & Qt::WindowFullScreen);
const QRect frame = fakeFullScreen ? m_savedFrameGeometry : normalFrameGeometry(m_data.hwnd);
- const QMargins margins = fakeFullScreen ? QWindowsGeometryHint::frame(m_savedStyle, 0) : frameMargins();
+ const QMargins margins = fakeFullScreen ? QWindowsGeometryHint::frame(m_savedStyle, 0) : fullFrameMargins();
return frame.isValid() ? frame.marginsRemoved(margins) : frame;
}
@@ -1592,8 +1622,8 @@ void QWindowsWindow::setGeometry(const QRect &rectIn)
window()->metaObject()->className(), qPrintable(window()->objectName()),
m_data.geometry.width(), m_data.geometry.height(),
m_data.geometry.x(), m_data.geometry.y(),
- m_data.frame.left(), m_data.frame.top(),
- m_data.frame.right(), m_data.frame.bottom(),
+ m_data.fullFrameMargins.left(), m_data.fullFrameMargins.top(),
+ m_data.fullFrameMargins.right(), m_data.fullFrameMargins.bottom(),
m_data.customMargins.left(), m_data.customMargins.top(),
m_data.customMargins.right(), m_data.customMargins.bottom(),
window()->minimumWidth(), window()->minimumHeight(),
@@ -1685,7 +1715,7 @@ void QWindowsWindow::handleGeometryChange()
void QWindowsBaseWindow::setGeometry_sys(const QRect &rect) const
{
- const QMargins margins = frameMargins();
+ const QMargins margins = fullFrameMargins();
const QRect frameGeometry = rect + margins;
qCDebug(lcQpaWindows) << '>' << __FUNCTION__ << window()
@@ -1856,7 +1886,8 @@ void QWindowsWindow::handleWindowStateChange(Qt::WindowStates state)
fireExpose(QRegion(0, 0, w->width(), w->height()));
exposeEventsSent = true;
}
- foreach (QWindow *child, QGuiApplication::allWindows()) {
+ const QWindowList allWindows = QGuiApplication::allWindows();
+ for (QWindow *child : allWindows) {
if (child != w && child->isVisible() && child->transientParent() == w) {
QWindowsWindow *platformWindow = QWindowsWindow::windowsWindowOf(child);
if (platformWindow && platformWindow->isLayered()) {
@@ -2048,7 +2079,7 @@ void QWindowsWindow::setExStyle(unsigned s) const
SetWindowLongPtr(m_data.hwnd, GWL_EXSTYLE, s);
}
-void QWindowsWindow::windowEvent(QEvent *event)
+bool QWindowsWindow::windowEvent(QEvent *event)
{
switch (event->type()) {
case QEvent::WindowBlocked: // Blocked by another modal window.
@@ -2064,6 +2095,8 @@ void QWindowsWindow::windowEvent(QEvent *event)
default:
break;
}
+
+ return QPlatformWindow::windowEvent(event);
}
void QWindowsWindow::propagateSizeHints()
@@ -2104,21 +2137,29 @@ bool QWindowsWindow::handleGeometryChangingMessage(MSG *message, const QWindow *
bool QWindowsWindow::handleGeometryChanging(MSG *message) const
{
- const QMargins margins = window()->isTopLevel() ? frameMargins() : QMargins();
+ const QMargins margins = window()->isTopLevel() ? fullFrameMargins() : QMargins();
return QWindowsWindow::handleGeometryChangingMessage(message, window(), margins);
}
-void QWindowsWindow::setFrameMargins(const QMargins &newMargins)
+void QWindowsWindow::setFullFrameMargins(const QMargins &newMargins)
{
- if (m_data.frame != newMargins) {
- qCDebug(lcQpaWindows) << __FUNCTION__ << window() << m_data.frame << "->" << newMargins;
- m_data.frame = newMargins;
+ if (m_data.fullFrameMargins != newMargins) {
+ qCDebug(lcQpaWindows) << __FUNCTION__ << window() << m_data.fullFrameMargins << "->" << newMargins;
+ m_data.fullFrameMargins = newMargins;
}
}
QMargins QWindowsWindow::frameMargins() const
{
- return m_data.frame;
+ QMargins result = fullFrameMargins();
+ if (isTopLevel() && !(m_data.flags & Qt::FramelessWindowHint))
+ result -= invisibleMargins(geometry().topLeft());
+ return result;
+}
+
+QMargins QWindowsWindow::fullFrameMargins() const
+{
+ return m_data.fullFrameMargins;
}
void QWindowsWindow::setOpacity(qreal level)
@@ -2172,7 +2213,7 @@ void QWindowsWindow::setMask(const QRegion &region)
// Mask is in client area coordinates, so offset it in case we have a frame
if (window()->isTopLevel()) {
- const QMargins margins = frameMargins();
+ const QMargins margins = fullFrameMargins();
OffsetRgn(winRegion, margins.left(), margins.top());
}
diff --git a/src/plugins/platforms/windows/qwindowswindow.h b/src/plugins/platforms/windows/qwindowswindow.h
index 6d439bce1a..5ff25eb474 100644
--- a/src/plugins/platforms/windows/qwindowswindow.h
+++ b/src/plugins/platforms/windows/qwindowswindow.h
@@ -41,7 +41,7 @@
#define QWINDOWSWINDOW_H
#include <QtCore/qt_windows.h>
-#include <QtCore/QPointer>
+#include <QtCore/qpointer.h>
#include "qwindowscursor.h"
#include <qpa/qplatformwindow.h>
@@ -108,8 +108,8 @@ struct QWindowsWindowData
{
Qt::WindowFlags flags;
QRect geometry;
- QMargins frame; // Do not use directly for windows, see FrameDirty.
- QMargins customMargins; // User-defined, additional frame for NCCALCSIZE
+ QMargins fullFrameMargins; // Do not use directly for windows, see FrameDirty.
+ QMargins customMargins; // User-defined, additional frame for NCCALCSIZE
HWND hwnd = 0;
bool embedded = false;
@@ -125,9 +125,10 @@ public:
WId winId() const override { return WId(handle()); }
QRect geometry() const override { return geometry_sys(); }
- QMargins frameMargins() const override { return frameMargins_sys(); }
+ QMargins frameMargins() const override { return fullFrameMargins(); }
QPoint mapToGlobal(const QPoint &pos) const override;
QPoint mapFromGlobal(const QPoint &pos) const override;
+ virtual QMargins fullFrameMargins() const { return frameMargins_sys(); }
using QPlatformWindow::screenForGeometry;
@@ -251,13 +252,14 @@ public:
void raise() override { raise_sys(); }
void lower() override { lower_sys(); }
- void windowEvent(QEvent *event) override;
+ bool windowEvent(QEvent *event) override;
void propagateSizeHints() override;
static bool handleGeometryChangingMessage(MSG *message, const QWindow *qWindow, const QMargins &marginsDp);
bool handleGeometryChanging(MSG *message) const;
QMargins frameMargins() const override;
- void setFrameMargins(const QMargins &newMargins);
+ QMargins fullFrameMargins() const override;
+ void setFullFrameMargins(const QMargins &newMargins);
void setOpacity(qreal level) override;
void setMask(const QRegion &region) override;
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiaaccessibility.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiaaccessibility.cpp
index 907883bf5b..0ae60ad220 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiaaccessibility.cpp
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiaaccessibility.cpp
@@ -37,16 +37,16 @@
**
****************************************************************************/
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiaaccessibility.h"
#include "qwindowsuiamainprovider.h"
#include "qwindowsuiautils.h"
-#include <QtGui/QAccessible>
-#include <QtGui/QWindow>
-#include <QtGui/QGuiApplication>
+#include <QtGui/qaccessible.h>
+#include <QtGui/qwindow.h>
+#include <QtGui/qguiapplication.h>
#include <QtGui/private/qguiapplication_p.h>
#include <QtCore/qt_windows.h>
#include <qpa/qplatformintegration.h>
@@ -107,19 +107,15 @@ void QWindowsUiaAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event
return;
switch (event->type()) {
-
case QAccessible::Focus:
QWindowsUiaMainProvider::notifyFocusChange(event);
break;
-
case QAccessible::StateChanged:
QWindowsUiaMainProvider::notifyStateChange(static_cast<QAccessibleStateChangeEvent *>(event));
break;
-
case QAccessible::ValueChanged:
QWindowsUiaMainProvider::notifyValueChange(static_cast<QAccessibleValueChangeEvent *>(event));
break;
-
case QAccessible::TextAttributeChanged:
case QAccessible::TextColumnChanged:
case QAccessible::TextInserted:
@@ -129,7 +125,6 @@ void QWindowsUiaAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event
case QAccessible::TextCaretMoved:
QWindowsUiaMainProvider::notifyTextChange(event);
break;
-
default:
break;
}
@@ -137,4 +132,4 @@ void QWindowsUiaAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiaaccessibility.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiaaccessibility.h
index bbb81d596b..48b4f9fa6a 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiaaccessibility.h
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiaaccessibility.h
@@ -40,15 +40,15 @@
#ifndef QWINDOWSUIAACCESSIBILITY_H
#define QWINDOWSUIAACCESSIBILITY_H
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowscontext.h"
#include <qpa/qplatformaccessibility.h>
QT_BEGIN_NAMESPACE
-// Windows plataform accessibility implemented over UI Automation.
+// Windows platform accessibility implemented over UI Automation.
class QWindowsUiaAccessibility : public QPlatformAccessibility
{
public:
@@ -60,6 +60,6 @@ public:
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
#endif // QWINDOWSUIAACCESSIBILITY_H
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiabaseprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiabaseprovider.cpp
index 1e1fc49c0f..53c647512a 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiabaseprovider.cpp
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiabaseprovider.cpp
@@ -37,17 +37,15 @@
**
****************************************************************************/
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiabaseprovider.h"
#include "qwindowsuiautils.h"
#include "qwindowscontext.h"
-#include <QtGui/QAccessible>
-#include <QtGui/QAccessibleInterface>
-#include <QtCore/QDebug>
-#include <QtCore/QString>
+#include <QtGui/qaccessible.h>
+#include <QtCore/qstring.h>
QT_BEGIN_NAMESPACE
@@ -78,4 +76,4 @@ QAccessible::Id QWindowsUiaBaseProvider::id() const
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiabaseprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiabaseprovider.h
index 3ae403e8c5..9caa7d6898 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiabaseprovider.h
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiabaseprovider.h
@@ -40,12 +40,11 @@
#ifndef QWINDOWSUIABASEPROVIDER_H
#define QWINDOWSUIABASEPROVIDER_H
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
-#include <QtGui/QAccessible>
-#include <QtGui/QAccessibleInterface>
-#include <QtCore/QPointer>
+#include <QtGui/qaccessible.h>
+#include <QtCore/qpointer.h>
#include <qwindowscombase.h>
#include <QtWindowsUIAutomationSupport/private/qwindowsuiawrapper_p.h>
@@ -53,7 +52,6 @@
QT_BEGIN_NAMESPACE
class QAccessibleInterface;
-class QDebug;
// Base class for UI Automation providers.
class QWindowsUiaBaseProvider : public QObject
@@ -73,6 +71,6 @@ private:
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
#endif // QWINDOWSUIABASEPROVIDER_H
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiagriditemprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiagriditemprovider.cpp
index e0502c00f3..93d360c40b 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiagriditemprovider.cpp
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiagriditemprovider.cpp
@@ -37,18 +37,17 @@
**
****************************************************************************/
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiagriditemprovider.h"
#include "qwindowsuiamainprovider.h"
#include "qwindowsuiautils.h"
#include "qwindowscontext.h"
-#include <QtGui/QAccessible>
-#include <QtGui/QAccessibleInterface>
-#include <QtCore/QDebug>
-#include <QtCore/QString>
+#include <QtGui/qaccessible.h>
+#include <QtCore/qloggingcategory.h>
+#include <QtCore/qstring.h>
QT_BEGIN_NAMESPACE
@@ -148,7 +147,7 @@ HRESULT STDMETHODCALLTYPE QWindowsUiaGridItemProvider::get_ColumnSpan(int *pRetV
return S_OK;
}
-// Returns the provider for the cointaining table/tree.
+// Returns the provider for the containing table/tree.
HRESULT STDMETHODCALLTYPE QWindowsUiaGridItemProvider::get_ContainingGrid(IRawElementProviderSimple **pRetVal)
{
qCDebug(lcQpaUiAutomation) << __FUNCTION__;
@@ -173,4 +172,4 @@ HRESULT STDMETHODCALLTYPE QWindowsUiaGridItemProvider::get_ContainingGrid(IRawEl
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiagriditemprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiagriditemprovider.h
index a93b50ef97..3d17056d38 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiagriditemprovider.h
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiagriditemprovider.h
@@ -40,8 +40,8 @@
#ifndef QWINDOWSUIAGRIDITEMPROVIDER_H
#define QWINDOWSUIAGRIDITEMPROVIDER_H
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiabaseprovider.h"
@@ -57,15 +57,15 @@ public:
virtual ~QWindowsUiaGridItemProvider();
// IGridItemProvider
- HRESULT STDMETHODCALLTYPE get_Row(int *pRetVal);
- HRESULT STDMETHODCALLTYPE get_Column(int *pRetVal);
- HRESULT STDMETHODCALLTYPE get_RowSpan(int *pRetVal);
- HRESULT STDMETHODCALLTYPE get_ColumnSpan(int *pRetVal);
- HRESULT STDMETHODCALLTYPE get_ContainingGrid(IRawElementProviderSimple **pRetVal);
+ HRESULT STDMETHODCALLTYPE get_Row(int *pRetVal) override;
+ HRESULT STDMETHODCALLTYPE get_Column(int *pRetVal) override;
+ HRESULT STDMETHODCALLTYPE get_RowSpan(int *pRetVal) override;
+ HRESULT STDMETHODCALLTYPE get_ColumnSpan(int *pRetVal) override;
+ HRESULT STDMETHODCALLTYPE get_ContainingGrid(IRawElementProviderSimple **pRetVal) override;
};
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
#endif // QWINDOWSUIAGRIDITEMPROVIDER_H
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiagridprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiagridprovider.cpp
index 65c2df703b..cce9d8143c 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiagridprovider.cpp
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiagridprovider.cpp
@@ -37,18 +37,17 @@
**
****************************************************************************/
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiagridprovider.h"
#include "qwindowsuiamainprovider.h"
#include "qwindowsuiautils.h"
#include "qwindowscontext.h"
-#include <QtGui/QAccessible>
-#include <QtGui/QAccessibleInterface>
-#include <QtCore/QDebug>
-#include <QtCore/QString>
+#include <QtGui/qaccessible.h>
+#include <QtCore/qloggingcategory.h>
+#include <QtCore/qstring.h>
QT_BEGIN_NAMESPACE
@@ -133,4 +132,4 @@ HRESULT STDMETHODCALLTYPE QWindowsUiaGridProvider::get_ColumnCount(int *pRetVal)
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiagridprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiagridprovider.h
index 15521f98b3..b96fc1a93c 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiagridprovider.h
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiagridprovider.h
@@ -40,8 +40,8 @@
#ifndef QWINDOWSUIAGRIDPROVIDER_H
#define QWINDOWSUIAGRIDPROVIDER_H
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiabaseprovider.h"
@@ -57,13 +57,13 @@ public:
virtual ~QWindowsUiaGridProvider();
// IGridProvider
- HRESULT STDMETHODCALLTYPE GetItem(int row, int column, IRawElementProviderSimple **pRetVal);
- HRESULT STDMETHODCALLTYPE get_RowCount(int *pRetVal);
- HRESULT STDMETHODCALLTYPE get_ColumnCount(int *pRetVal);
+ HRESULT STDMETHODCALLTYPE GetItem(int row, int column, IRawElementProviderSimple **pRetVal) override;
+ HRESULT STDMETHODCALLTYPE get_RowCount(int *pRetVal) override;
+ HRESULT STDMETHODCALLTYPE get_ColumnCount(int *pRetVal) override;
};
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
#endif // QWINDOWSUIAGRIDPROVIDER_H
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiainvokeprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiainvokeprovider.cpp
index 2af883c4f6..d09770bc81 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiainvokeprovider.cpp
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiainvokeprovider.cpp
@@ -37,17 +37,16 @@
**
****************************************************************************/
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiainvokeprovider.h"
#include "qwindowsuiautils.h"
#include "qwindowscontext.h"
-#include <QtGui/QAccessible>
-#include <QtGui/QAccessibleInterface>
-#include <QtCore/QDebug>
-#include <QtCore/QString>
+#include <QtGui/qaccessible.h>
+#include <QtCore/qloggingcategory.h>
+#include <QtCore/qstring.h>
QT_BEGIN_NAMESPACE
@@ -81,4 +80,4 @@ HRESULT STDMETHODCALLTYPE QWindowsUiaInvokeProvider::Invoke()
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiainvokeprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiainvokeprovider.h
index 2b8a646983..5fb509c5f3 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiainvokeprovider.h
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiainvokeprovider.h
@@ -40,8 +40,8 @@
#ifndef QWINDOWSUIAINVOKEPROVIDER_H
#define QWINDOWSUIAINVOKEPROVIDER_H
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiabaseprovider.h"
@@ -57,11 +57,11 @@ public:
virtual ~QWindowsUiaInvokeProvider();
// IInvokeProvider
- HRESULT STDMETHODCALLTYPE Invoke();
+ HRESULT STDMETHODCALLTYPE Invoke() override;
};
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
#endif // QWINDOWSUIAINVOKEPROVIDER_H
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp
index 46f73f81a0..de06077890 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp
@@ -37,8 +37,8 @@
**
****************************************************************************/
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiamainprovider.h"
#include "qwindowsuiavalueprovider.h"
@@ -57,10 +57,10 @@
#include "qwindowsuiautils.h"
#include "qwindowsuiaprovidercache.h"
-#include <QtCore/QDebug>
-#include <QtGui/QAccessible>
-#include <QtGui/QGuiApplication>
-#include <QtGui/QWindow>
+#include <QtCore/qloggingcategory.h>
+#include <QtGui/qaccessible.h>
+#include <QtGui/qguiapplication.h>
+#include <QtGui/qwindow.h>
#if !defined(Q_CC_BOR) && !defined (Q_CC_GNU)
#include <comdef.h>
@@ -391,9 +391,8 @@ HRESULT QWindowsUiaMainProvider::GetPropertyValue(PROPERTYID idProp, VARIANT *pR
break;
case UIA_NamePropertyId: {
QString name = accessible->text(QAccessible::Name);
- if (name.isEmpty() && clientTopLevel) {
+ if (name.isEmpty() && clientTopLevel)
name = QCoreApplication::applicationName();
- }
setVariantString(name, pRetVal);
break;
}
@@ -635,4 +634,4 @@ HRESULT QWindowsUiaMainProvider::GetFocus(IRawElementProviderFragment **pRetVal)
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.h
index 893cbf7f8a..11684de721 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.h
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.h
@@ -40,15 +40,15 @@
#ifndef QWINDOWSUIAMAINPROVIDER_H
#define QWINDOWSUIAMAINPROVIDER_H
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiabaseprovider.h"
-#include <QtCore/QPointer>
-#include <QtCore/QSharedPointer>
+#include <QtCore/qpointer.h>
+#include <QtCore/qsharedpointer.h>
#include <QtCore/qt_windows.h>
-#include <QtGui/QAccessible>
+#include <QtGui/qaccessible.h>
QT_BEGIN_NAMESPACE
@@ -71,27 +71,27 @@ public:
static void notifyTextChange(QAccessibleEvent *event);
// IUnknown
- HRESULT STDMETHODCALLTYPE QueryInterface(REFIID id, LPVOID *iface);
- ULONG STDMETHODCALLTYPE AddRef();
- ULONG STDMETHODCALLTYPE Release();
+ HRESULT STDMETHODCALLTYPE QueryInterface(REFIID id, LPVOID *iface) override;
+ ULONG STDMETHODCALLTYPE AddRef() override;
+ ULONG STDMETHODCALLTYPE Release() override;
// IRawElementProviderSimple methods
- HRESULT STDMETHODCALLTYPE get_ProviderOptions(ProviderOptions *pRetVal);
- HRESULT STDMETHODCALLTYPE GetPatternProvider(PATTERNID idPattern, IUnknown **pRetVal);
- HRESULT STDMETHODCALLTYPE GetPropertyValue(PROPERTYID idProp, VARIANT *pRetVal);
- HRESULT STDMETHODCALLTYPE get_HostRawElementProvider(IRawElementProviderSimple **pRetVal);
+ HRESULT STDMETHODCALLTYPE get_ProviderOptions(ProviderOptions *pRetVal) override;
+ HRESULT STDMETHODCALLTYPE GetPatternProvider(PATTERNID idPattern, IUnknown **pRetVal) override;
+ HRESULT STDMETHODCALLTYPE GetPropertyValue(PROPERTYID idProp, VARIANT *pRetVal) override;
+ HRESULT STDMETHODCALLTYPE get_HostRawElementProvider(IRawElementProviderSimple **pRetVal) override;
// IRawElementProviderFragment methods
- HRESULT STDMETHODCALLTYPE Navigate(NavigateDirection direction, IRawElementProviderFragment **pRetVal);
- HRESULT STDMETHODCALLTYPE GetRuntimeId(SAFEARRAY **pRetVal);
- HRESULT STDMETHODCALLTYPE get_BoundingRectangle(UiaRect *pRetVal);
- HRESULT STDMETHODCALLTYPE GetEmbeddedFragmentRoots(SAFEARRAY **pRetVal);
+ HRESULT STDMETHODCALLTYPE Navigate(NavigateDirection direction, IRawElementProviderFragment **pRetVal) override;
+ HRESULT STDMETHODCALLTYPE GetRuntimeId(SAFEARRAY **pRetVal) override;
+ HRESULT STDMETHODCALLTYPE get_BoundingRectangle(UiaRect *pRetVal) override;
+ HRESULT STDMETHODCALLTYPE GetEmbeddedFragmentRoots(SAFEARRAY **pRetVal) override;
HRESULT STDMETHODCALLTYPE SetFocus();
- HRESULT STDMETHODCALLTYPE get_FragmentRoot(IRawElementProviderFragmentRoot **pRetVal);
+ HRESULT STDMETHODCALLTYPE get_FragmentRoot(IRawElementProviderFragmentRoot **pRetVal) override;
// IRawElementProviderFragmentRoot methods
- HRESULT STDMETHODCALLTYPE ElementProviderFromPoint(double x, double y, IRawElementProviderFragment **pRetVal);
- HRESULT STDMETHODCALLTYPE GetFocus(IRawElementProviderFragment **pRetVal);
+ HRESULT STDMETHODCALLTYPE ElementProviderFromPoint(double x, double y, IRawElementProviderFragment **pRetVal) override;
+ HRESULT STDMETHODCALLTYPE GetFocus(IRawElementProviderFragment **pRetVal) override;
private:
QString automationIdForAccessible(const QAccessibleInterface *accessible);
@@ -100,6 +100,6 @@ private:
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
#endif // QWINDOWSUIAMAINPROVIDER_H
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiaprovidercache.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiaprovidercache.cpp
index 9f0a1e126f..c55e827a46 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiaprovidercache.cpp
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiaprovidercache.cpp
@@ -37,15 +37,13 @@
**
****************************************************************************/
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiaprovidercache.h"
#include "qwindowsuiautils.h"
#include "qwindowscontext.h"
-#include <QtCore/QDebug>
-
QT_BEGIN_NAMESPACE
using namespace QWindowsUiAutomation;
@@ -66,7 +64,7 @@ QWindowsUiaProviderCache *QWindowsUiaProviderCache::instance()
// Returns the provider instance associated with the ID, or nullptr.
QWindowsUiaBaseProvider *QWindowsUiaProviderCache::providerForId(QAccessible::Id id) const
{
- return providerTable.value(id);
+ return m_providerTable.value(id);
}
// Inserts a provider in the cache and associates it with an accessibility ID.
@@ -74,8 +72,8 @@ void QWindowsUiaProviderCache::insert(QAccessible::Id id, QWindowsUiaBaseProvide
{
remove(id);
if (provider) {
- providerTable[id] = provider;
- inverseTable[provider] = id;
+ m_providerTable[id] = provider;
+ m_inverseTable[provider] = id;
// Connects the destroyed signal to our slot, to remove deleted objects from the cache.
QObject::connect(provider, &QObject::destroyed, this, &QWindowsUiaProviderCache::objectDestroyed);
}
@@ -87,20 +85,20 @@ void QWindowsUiaProviderCache::objectDestroyed(QObject *obj)
// We have to use the inverse table to map the object address back to its ID,
// since at this point (called from QObject destructor), it has already been
// partially destroyed and we cannot treat it as a provider.
- auto it = inverseTable.find(obj);
- if (it != inverseTable.end()) {
- providerTable.remove(*it);
- inverseTable.remove(obj);
+ auto it = m_inverseTable.find(obj);
+ if (it != m_inverseTable.end()) {
+ m_providerTable.remove(*it);
+ m_inverseTable.remove(obj);
}
}
// Removes a provider with a given id from the cache.
void QWindowsUiaProviderCache::remove(QAccessible::Id id)
{
- inverseTable.remove(providerTable.value(id));
- providerTable.remove(id);
+ m_inverseTable.remove(m_providerTable.value(id));
+ m_providerTable.remove(id);
}
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiaprovidercache.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiaprovidercache.h
index 7ad30ac39c..f66dc2c170 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiaprovidercache.h
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiaprovidercache.h
@@ -40,14 +40,13 @@
#ifndef QWINDOWSUIAPROVIDERCACHE_H
#define QWINDOWSUIAPROVIDERCACHE_H
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiabaseprovider.h"
-#include <QtCore/QHash>
-#include <QtGui/QAccessible>
-#include <QtGui/QAccessibleInterface>
+#include <QtCore/qhash.h>
+#include <QtGui/qaccessible.h>
QT_BEGIN_NAMESPACE
@@ -66,12 +65,12 @@ private Q_SLOTS:
void objectDestroyed(QObject *obj);
private:
- QHash<QAccessible::Id, QWindowsUiaBaseProvider *> providerTable;
- QHash<QObject *, QAccessible::Id> inverseTable;
+ QHash<QAccessible::Id, QWindowsUiaBaseProvider *> m_providerTable;
+ QHash<QObject *, QAccessible::Id> m_inverseTable;
};
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
#endif // QWINDOWSUIAPROVIDERCACHE_H
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiarangevalueprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiarangevalueprovider.cpp
index 0cd09c3f0a..7c1827387a 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiarangevalueprovider.cpp
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiarangevalueprovider.cpp
@@ -37,17 +37,16 @@
**
****************************************************************************/
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiarangevalueprovider.h"
#include "qwindowsuiautils.h"
#include "qwindowscontext.h"
-#include <QtGui/QAccessible>
-#include <QtGui/QAccessibleInterface>
-#include <QtCore/QDebug>
-#include <QtCore/QString>
+#include <QtGui/qaccessible.h>
+#include <QtCore/qloggingcategory.h>
+#include <QtCore/qstring.h>
QT_BEGIN_NAMESPACE
@@ -187,4 +186,4 @@ HRESULT STDMETHODCALLTYPE QWindowsUiaRangeValueProvider::get_SmallChange(double
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiarangevalueprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiarangevalueprovider.h
index f742ef99c2..c5e0a03ee5 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiarangevalueprovider.h
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiarangevalueprovider.h
@@ -40,8 +40,8 @@
#ifndef QWINDOWSUIARANGEVALUEPROVIDER_H
#define QWINDOWSUIARANGEVALUEPROVIDER_H
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiabaseprovider.h"
@@ -57,17 +57,17 @@ public:
virtual ~QWindowsUiaRangeValueProvider();
// IRangeValueProvider
- HRESULT STDMETHODCALLTYPE SetValue(double val);
- HRESULT STDMETHODCALLTYPE get_Value(double *pRetVal);
- HRESULT STDMETHODCALLTYPE get_IsReadOnly(BOOL *pRetVal);
- HRESULT STDMETHODCALLTYPE get_Maximum(double *pRetVal);
- HRESULT STDMETHODCALLTYPE get_Minimum(double *pRetVal);
- HRESULT STDMETHODCALLTYPE get_LargeChange(double *pRetVal);
- HRESULT STDMETHODCALLTYPE get_SmallChange(double *pRetVal);
+ HRESULT STDMETHODCALLTYPE SetValue(double val) override;
+ HRESULT STDMETHODCALLTYPE get_Value(double *pRetVal) override;
+ HRESULT STDMETHODCALLTYPE get_IsReadOnly(BOOL *pRetVal) override;
+ HRESULT STDMETHODCALLTYPE get_Maximum(double *pRetVal) override;
+ HRESULT STDMETHODCALLTYPE get_Minimum(double *pRetVal) override;
+ HRESULT STDMETHODCALLTYPE get_LargeChange(double *pRetVal) override;
+ HRESULT STDMETHODCALLTYPE get_SmallChange(double *pRetVal) override;
};
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
#endif // QWINDOWSUIARANGEVALUEPROVIDER_H
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionitemprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionitemprovider.cpp
index 45216a6d1c..a93a05c7bc 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionitemprovider.cpp
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionitemprovider.cpp
@@ -37,18 +37,17 @@
**
****************************************************************************/
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiaselectionitemprovider.h"
#include "qwindowsuiamainprovider.h"
#include "qwindowsuiautils.h"
#include "qwindowscontext.h"
-#include <QtGui/QAccessible>
-#include <QtGui/QAccessibleInterface>
-#include <QtCore/QDebug>
-#include <QtCore/QString>
+#include <QtGui/qaccessible.h>
+#include <QtCore/qloggingcategory.h>
+#include <QtCore/qstring.h>
QT_BEGIN_NAMESPACE
@@ -198,4 +197,4 @@ HRESULT STDMETHODCALLTYPE QWindowsUiaSelectionItemProvider::get_SelectionContain
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionitemprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionitemprovider.h
index 6a9b5b1e4b..1f2605188b 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionitemprovider.h
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionitemprovider.h
@@ -40,8 +40,8 @@
#ifndef QWINDOWSUIASELECTIONITEMPROVIDER_H
#define QWINDOWSUIASELECTIONITEMPROVIDER_H
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiabaseprovider.h"
@@ -57,15 +57,15 @@ public:
virtual ~QWindowsUiaSelectionItemProvider();
// ISelectionItemProvider
- HRESULT STDMETHODCALLTYPE Select();
- HRESULT STDMETHODCALLTYPE AddToSelection();
- HRESULT STDMETHODCALLTYPE RemoveFromSelection();
- HRESULT STDMETHODCALLTYPE get_IsSelected(BOOL *pRetVal);
- HRESULT STDMETHODCALLTYPE get_SelectionContainer(IRawElementProviderSimple **pRetVal);
+ HRESULT STDMETHODCALLTYPE Select() override;
+ HRESULT STDMETHODCALLTYPE AddToSelection() override;
+ HRESULT STDMETHODCALLTYPE RemoveFromSelection() override;
+ HRESULT STDMETHODCALLTYPE get_IsSelected(BOOL *pRetVal) override;
+ HRESULT STDMETHODCALLTYPE get_SelectionContainer(IRawElementProviderSimple **pRetVal) override;
};
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
#endif // QWINDOWSUIASELECTIONITEMPROVIDER_H
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionprovider.cpp
index 1c06503bfc..3305e9c5c4 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionprovider.cpp
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionprovider.cpp
@@ -37,19 +37,18 @@
**
****************************************************************************/
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiaselectionprovider.h"
#include "qwindowsuiamainprovider.h"
#include "qwindowsuiautils.h"
#include "qwindowscontext.h"
-#include <QtGui/QAccessible>
-#include <QtGui/QAccessibleInterface>
-#include <QtCore/QDebug>
-#include <QtCore/QString>
-#include <QList>
+#include <QtGui/qaccessible.h>
+#include <QtCore/qloggingcategory.h>
+#include <QtCore/qstring.h>
+#include <QtCore/qlist.h>
QT_BEGIN_NAMESPACE
@@ -144,4 +143,4 @@ HRESULT STDMETHODCALLTYPE QWindowsUiaSelectionProvider::get_IsSelectionRequired(
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionprovider.h
index 5a07a82ac8..0376d25804 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionprovider.h
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionprovider.h
@@ -40,8 +40,8 @@
#ifndef QWINDOWSUIASELECTIONPROVIDER_H
#define QWINDOWSUIASELECTIONPROVIDER_H
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiabaseprovider.h"
@@ -57,13 +57,13 @@ public:
virtual ~QWindowsUiaSelectionProvider();
// ISelectionProvider
- HRESULT STDMETHODCALLTYPE GetSelection(SAFEARRAY **pRetVal);
- HRESULT STDMETHODCALLTYPE get_CanSelectMultiple(BOOL *pRetVal);
- HRESULT STDMETHODCALLTYPE get_IsSelectionRequired(BOOL *pRetVal);
+ HRESULT STDMETHODCALLTYPE GetSelection(SAFEARRAY **pRetVal) override;
+ HRESULT STDMETHODCALLTYPE get_CanSelectMultiple(BOOL *pRetVal) override;
+ HRESULT STDMETHODCALLTYPE get_IsSelectionRequired(BOOL *pRetVal) override;
};
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
#endif // QWINDOWSUIASELECTIONPROVIDER_H
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiatableitemprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiatableitemprovider.cpp
index 3ea29fc86c..2a94012590 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiatableitemprovider.cpp
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiatableitemprovider.cpp
@@ -37,18 +37,17 @@
**
****************************************************************************/
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiatableitemprovider.h"
#include "qwindowsuiamainprovider.h"
#include "qwindowsuiautils.h"
#include "qwindowscontext.h"
-#include <QtGui/QAccessible>
-#include <QtGui/QAccessibleInterface>
-#include <QtCore/QDebug>
-#include <QtCore/QString>
+#include <QtGui/qaccessible.h>
+#include <QtCore/qloggingcategory.h>
+#include <QtCore/qstring.h>
QT_BEGIN_NAMESPACE
@@ -126,4 +125,4 @@ HRESULT STDMETHODCALLTYPE QWindowsUiaTableItemProvider::GetColumnHeaderItems(SAF
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiatableitemprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiatableitemprovider.h
index 277884c980..bf4b52ee0b 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiatableitemprovider.h
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiatableitemprovider.h
@@ -40,8 +40,8 @@
#ifndef QWINDOWSUIATABLEITEMPROVIDER_H
#define QWINDOWSUIATABLEITEMPROVIDER_H
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiabaseprovider.h"
@@ -57,12 +57,12 @@ public:
virtual ~QWindowsUiaTableItemProvider();
// ITableItemProvider
- HRESULT STDMETHODCALLTYPE GetRowHeaderItems(SAFEARRAY **pRetVal);
- HRESULT STDMETHODCALLTYPE GetColumnHeaderItems(SAFEARRAY **pRetVal);
+ HRESULT STDMETHODCALLTYPE GetRowHeaderItems(SAFEARRAY **pRetVal) override;
+ HRESULT STDMETHODCALLTYPE GetColumnHeaderItems(SAFEARRAY **pRetVal) override;
};
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
#endif // QWINDOWSUIATABLEITEMPROVIDER_H
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiatableprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiatableprovider.cpp
index f79a24536b..80086f1d4f 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiatableprovider.cpp
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiatableprovider.cpp
@@ -37,18 +37,17 @@
**
****************************************************************************/
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiatableprovider.h"
#include "qwindowsuiamainprovider.h"
#include "qwindowsuiautils.h"
#include "qwindowscontext.h"
-#include <QtGui/QAccessible>
-#include <QtGui/QAccessibleInterface>
-#include <QtCore/QDebug>
-#include <QtCore/QString>
+#include <QtGui/qaccessible.h>
+#include <QtCore/qloggingcategory.h>
+#include <QtCore/qstring.h>
QT_BEGIN_NAMESPACE
@@ -151,4 +150,4 @@ HRESULT STDMETHODCALLTYPE QWindowsUiaTableProvider::get_RowOrColumnMajor(enum Ro
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiatableprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiatableprovider.h
index 8cd0acda03..94c8ab93a7 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiatableprovider.h
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiatableprovider.h
@@ -40,8 +40,8 @@
#ifndef QWINDOWSUIATABLEPROVIDER_H
#define QWINDOWSUIATABLEPROVIDER_H
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiabaseprovider.h"
@@ -57,13 +57,13 @@ public:
virtual ~QWindowsUiaTableProvider();
// ITableProvider
- HRESULT STDMETHODCALLTYPE GetRowHeaders(SAFEARRAY **pRetVal);
- HRESULT STDMETHODCALLTYPE GetColumnHeaders(SAFEARRAY **pRetVal);
- HRESULT STDMETHODCALLTYPE get_RowOrColumnMajor(enum RowOrColumnMajor *pRetVal);
+ HRESULT STDMETHODCALLTYPE GetRowHeaders(SAFEARRAY **pRetVal) override;
+ HRESULT STDMETHODCALLTYPE GetColumnHeaders(SAFEARRAY **pRetVal) override;
+ HRESULT STDMETHODCALLTYPE get_RowOrColumnMajor(enum RowOrColumnMajor *pRetVal) override;
};
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
#endif // QWINDOWSUIATABLEPROVIDER_H
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiatextprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiatextprovider.cpp
index e1622933af..9d1e72fb78 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiatextprovider.cpp
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiatextprovider.cpp
@@ -37,17 +37,16 @@
**
****************************************************************************/
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiatextprovider.h"
#include "qwindowsuiautils.h"
#include "qwindowscontext.h"
-#include <QtGui/QAccessible>
-#include <QtGui/QAccessibleInterface>
-#include <QtCore/QDebug>
-#include <QtCore/QString>
+#include <QtGui/qaccessible.h>
+#include <QtCore/qloggingcategory.h>
+#include <QtCore/qstring.h>
QT_BEGIN_NAMESPACE
@@ -258,4 +257,4 @@ HRESULT STDMETHODCALLTYPE QWindowsUiaTextProvider::GetCaretRange(BOOL *isActive,
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiatextprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiatextprovider.h
index a6d10027fa..a9be70fa16 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiatextprovider.h
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiatextprovider.h
@@ -40,8 +40,8 @@
#ifndef QWINDOWSUIATEXTPROVIDER_H
#define QWINDOWSUIATEXTPROVIDER_H
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiabaseprovider.h"
#include "qwindowsuiatextrangeprovider.h"
@@ -58,23 +58,23 @@ public:
~QWindowsUiaTextProvider();
// IUnknown overrides
- HRESULT STDMETHODCALLTYPE QueryInterface(REFIID id, LPVOID *iface);
+ HRESULT STDMETHODCALLTYPE QueryInterface(REFIID id, LPVOID *iface) override;
// ITextProvider
- HRESULT STDMETHODCALLTYPE GetSelection(SAFEARRAY **pRetVal);
- HRESULT STDMETHODCALLTYPE GetVisibleRanges(SAFEARRAY **pRetVal);
- HRESULT STDMETHODCALLTYPE RangeFromChild(IRawElementProviderSimple *childElement, ITextRangeProvider **pRetVal);
- HRESULT STDMETHODCALLTYPE RangeFromPoint(UiaPoint point, ITextRangeProvider **pRetVal);
- HRESULT STDMETHODCALLTYPE get_DocumentRange(ITextRangeProvider **pRetVal);
- HRESULT STDMETHODCALLTYPE get_SupportedTextSelection(SupportedTextSelection *pRetVal);
+ HRESULT STDMETHODCALLTYPE GetSelection(SAFEARRAY **pRetVal) override;
+ HRESULT STDMETHODCALLTYPE GetVisibleRanges(SAFEARRAY **pRetVal) override;
+ HRESULT STDMETHODCALLTYPE RangeFromChild(IRawElementProviderSimple *childElement, ITextRangeProvider **pRetVal) override;
+ HRESULT STDMETHODCALLTYPE RangeFromPoint(UiaPoint point, ITextRangeProvider **pRetVal) override;
+ HRESULT STDMETHODCALLTYPE get_DocumentRange(ITextRangeProvider **pRetVal) override;
+ HRESULT STDMETHODCALLTYPE get_SupportedTextSelection(SupportedTextSelection *pRetVal) override;
// ITextProvider2
- HRESULT STDMETHODCALLTYPE RangeFromAnnotation(IRawElementProviderSimple *annotationElement, ITextRangeProvider **pRetVal);
- HRESULT STDMETHODCALLTYPE GetCaretRange(BOOL *isActive, ITextRangeProvider **pRetVal);
+ HRESULT STDMETHODCALLTYPE RangeFromAnnotation(IRawElementProviderSimple *annotationElement, ITextRangeProvider **pRetVal) override;
+ HRESULT STDMETHODCALLTYPE GetCaretRange(BOOL *isActive, ITextRangeProvider **pRetVal) override;
};
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
#endif // QWINDOWSUIATEXTPROVIDER_H
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiatextrangeprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiatextrangeprovider.cpp
index dae7cbdd5f..1be186f6b3 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiatextrangeprovider.cpp
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiatextrangeprovider.cpp
@@ -37,18 +37,17 @@
**
****************************************************************************/
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiatextrangeprovider.h"
#include "qwindowsuiamainprovider.h"
#include "qwindowsuiautils.h"
#include "qwindowscontext.h"
-#include <QtGui/QAccessible>
-#include <QtGui/QAccessibleInterface>
-#include <QtCore/QDebug>
-#include <QtCore/QString>
+#include <QtGui/qaccessible.h>
+#include <QtCore/qloggingcategory.h>
+#include <QtCore/qstring.h>
QT_BEGIN_NAMESPACE
@@ -238,12 +237,12 @@ HRESULT QWindowsUiaTextRangeProvider::GetBoundingRectangles(SAFEARRAY **pRetVal)
int endRange = qMin(end, m_endOffset);
if (startRange < endRange) {
// Calculates a bounding rectangle for the line and adds it to the list.
- QRect startRect = textInterface->characterRect(startRange);
- QRect endRect = textInterface->characterRect(endRange - 1);
- QRect lineRect(qMin(startRect.x(), endRect.x()),
- qMin(startRect.y(), endRect.y()),
- qMax(startRect.x() + startRect.width(), endRect.x() + endRect.width()) - qMin(startRect.x(), endRect.x()),
- qMax(startRect.y() + startRect.height(), endRect.y() + endRect.height()) - qMin(startRect.y(), endRect.y()));
+ const QRect startRect = textInterface->characterRect(startRange);
+ const QRect endRect = textInterface->characterRect(endRange - 1);
+ const QRect lineRect(qMin(startRect.x(), endRect.x()),
+ qMin(startRect.y(), endRect.y()),
+ qMax(startRect.x() + startRect.width(), endRect.x() + endRect.width()) - qMin(startRect.x(), endRect.x()),
+ qMax(startRect.y() + startRect.height(), endRect.y() + endRect.height()) - qMin(startRect.y(), endRect.y()));
rectList.append(lineRect);
}
if (end >= len) break;
@@ -519,9 +518,9 @@ HRESULT QWindowsUiaTextRangeProvider::Select()
}
// Not supported.
-HRESULT QWindowsUiaTextRangeProvider::FindTextW(BSTR /* text */, BOOL /* backward */,
- BOOL /* ignoreCase */,
- ITextRangeProvider **pRetVal)
+HRESULT QWindowsUiaTextRangeProvider::FindText(BSTR /* text */, BOOL /* backward */,
+ BOOL /* ignoreCase */,
+ ITextRangeProvider **pRetVal)
{
if (!pRetVal)
return E_INVALIDARG;
@@ -551,4 +550,4 @@ HRESULT QWindowsUiaTextRangeProvider::unselect()
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiatextrangeprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiatextrangeprovider.h
index 6fe6502c41..39b9069fc0 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiatextrangeprovider.h
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiatextrangeprovider.h
@@ -40,8 +40,8 @@
#ifndef QWINDOWSUIATEXTRANGEPROVIDER_H
#define QWINDOWSUIATEXTRANGEPROVIDER_H
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiabaseprovider.h"
@@ -56,24 +56,25 @@ public:
explicit QWindowsUiaTextRangeProvider(QAccessible::Id id, int startOffset, int endOffset);
virtual ~QWindowsUiaTextRangeProvider();
- HRESULT STDMETHODCALLTYPE AddToSelection();
- HRESULT STDMETHODCALLTYPE Clone(ITextRangeProvider **pRetVal);
- HRESULT STDMETHODCALLTYPE Compare(ITextRangeProvider *range, BOOL *pRetVal);
- HRESULT STDMETHODCALLTYPE CompareEndpoints(TextPatternRangeEndpoint endpoint, ITextRangeProvider *targetRange, TextPatternRangeEndpoint targetEndpoint, int *pRetVal);
- HRESULT STDMETHODCALLTYPE ExpandToEnclosingUnit(TextUnit unit);
- HRESULT STDMETHODCALLTYPE FindAttribute(TEXTATTRIBUTEID attributeId, VARIANT val, BOOL backward, ITextRangeProvider **pRetVal);
- HRESULT STDMETHODCALLTYPE FindText(BSTR text, BOOL backward, BOOL ignoreCase, ITextRangeProvider **pRetVal);
- HRESULT STDMETHODCALLTYPE GetAttributeValue(TEXTATTRIBUTEID attributeId, VARIANT *pRetVal);
- HRESULT STDMETHODCALLTYPE GetBoundingRectangles(SAFEARRAY **pRetVal);
- HRESULT STDMETHODCALLTYPE GetChildren(SAFEARRAY **pRetVal);
- HRESULT STDMETHODCALLTYPE GetEnclosingElement(IRawElementProviderSimple **pRetVal);
- HRESULT STDMETHODCALLTYPE GetText(int maxLength, BSTR *pRetVal);
- HRESULT STDMETHODCALLTYPE Move(TextUnit unit, int count, int *pRetVal);
- HRESULT STDMETHODCALLTYPE MoveEndpointByRange(TextPatternRangeEndpoint endpoint, ITextRangeProvider *targetRange, TextPatternRangeEndpoint targetEndpoint);
- HRESULT STDMETHODCALLTYPE MoveEndpointByUnit(TextPatternRangeEndpoint endpoint, TextUnit unit, int count, int *pRetVal);
- HRESULT STDMETHODCALLTYPE RemoveFromSelection();
- HRESULT STDMETHODCALLTYPE ScrollIntoView(BOOL alignToTop);
- HRESULT STDMETHODCALLTYPE Select();
+ // ITextRangeProvider
+ HRESULT STDMETHODCALLTYPE AddToSelection() override;
+ HRESULT STDMETHODCALLTYPE Clone(ITextRangeProvider **pRetVal) override;
+ HRESULT STDMETHODCALLTYPE Compare(ITextRangeProvider *range, BOOL *pRetVal) override;
+ HRESULT STDMETHODCALLTYPE CompareEndpoints(TextPatternRangeEndpoint endpoint, ITextRangeProvider *targetRange, TextPatternRangeEndpoint targetEndpoint, int *pRetVal) override;
+ HRESULT STDMETHODCALLTYPE ExpandToEnclosingUnit(TextUnit unit) override;
+ HRESULT STDMETHODCALLTYPE FindAttribute(TEXTATTRIBUTEID attributeId, VARIANT val, BOOL backward, ITextRangeProvider **pRetVal) override;
+ HRESULT STDMETHODCALLTYPE FindText(BSTR text, BOOL backward, BOOL ignoreCase, ITextRangeProvider **pRetVal) override;
+ HRESULT STDMETHODCALLTYPE GetAttributeValue(TEXTATTRIBUTEID attributeId, VARIANT *pRetVal) override;
+ HRESULT STDMETHODCALLTYPE GetBoundingRectangles(SAFEARRAY **pRetVal) override;
+ HRESULT STDMETHODCALLTYPE GetChildren(SAFEARRAY **pRetVal) override;
+ HRESULT STDMETHODCALLTYPE GetEnclosingElement(IRawElementProviderSimple **pRetVal) override;
+ HRESULT STDMETHODCALLTYPE GetText(int maxLength, BSTR *pRetVal) override;
+ HRESULT STDMETHODCALLTYPE Move(TextUnit unit, int count, int *pRetVal) override;
+ HRESULT STDMETHODCALLTYPE MoveEndpointByRange(TextPatternRangeEndpoint endpoint, ITextRangeProvider *targetRange, TextPatternRangeEndpoint targetEndpoint) override;
+ HRESULT STDMETHODCALLTYPE MoveEndpointByUnit(TextPatternRangeEndpoint endpoint, TextUnit unit, int count, int *pRetVal) override;
+ HRESULT STDMETHODCALLTYPE RemoveFromSelection() override;
+ HRESULT STDMETHODCALLTYPE ScrollIntoView(BOOL alignToTop) override;
+ HRESULT STDMETHODCALLTYPE Select() override;
private:
HRESULT unselect();
@@ -83,6 +84,6 @@ private:
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
#endif // QWINDOWSUIATEXTRANGEPROVIDER_H
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiatoggleprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiatoggleprovider.cpp
index 01cdfd7e91..32445e4ffb 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiatoggleprovider.cpp
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiatoggleprovider.cpp
@@ -37,17 +37,16 @@
**
****************************************************************************/
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiatoggleprovider.h"
#include "qwindowsuiautils.h"
#include "qwindowscontext.h"
-#include <QtGui/QAccessible>
-#include <QtGui/QAccessibleInterface>
-#include <QtCore/QDebug>
-#include <QtCore/QString>
+#include <QtGui/qaccessible.h>
+#include <QtCore/qloggingcategory.h>
+#include <QtCore/qstring.h>
QT_BEGIN_NAMESPACE
@@ -102,4 +101,4 @@ HRESULT STDMETHODCALLTYPE QWindowsUiaToggleProvider::get_ToggleState(ToggleState
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiatoggleprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiatoggleprovider.h
index a0df983e40..2bed6f7e36 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiatoggleprovider.h
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiatoggleprovider.h
@@ -40,8 +40,8 @@
#ifndef QWINDOWSUIATOGGLEPROVIDER_H
#define QWINDOWSUIATOGGLEPROVIDER_H
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiabaseprovider.h"
@@ -57,12 +57,12 @@ public:
virtual ~QWindowsUiaToggleProvider();
// IToggleProvider
- HRESULT STDMETHODCALLTYPE Toggle();
- HRESULT STDMETHODCALLTYPE get_ToggleState(ToggleState *pRetVal);
+ HRESULT STDMETHODCALLTYPE Toggle() override;
+ HRESULT STDMETHODCALLTYPE get_ToggleState(ToggleState *pRetVal) override;
};
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
#endif // QWINDOWSUIATOGGLEPROVIDER_H
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiautils.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiautils.cpp
index 89e5075dcb..96f557efd3 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiautils.cpp
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiautils.cpp
@@ -37,14 +37,14 @@
**
****************************************************************************/
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiautils.h"
#include "qwindowscontext.h"
#include "qwindowswindow.h"
-#include <QtGui/QWindow>
+#include <QtGui/qwindow.h>
#include <QtGui/private/qhighdpiscaling_p.h>
#include <cmath>
@@ -218,4 +218,4 @@ bool isTextUnitSeparator(TextUnit unit, const QChar &ch)
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiautils.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiautils.h
index 15f4d6e8ba..6a482f6c1c 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiautils.h
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiautils.h
@@ -40,16 +40,14 @@
#ifndef QWINDOWSUIAUTILS_H
#define QWINDOWSUIAUTILS_H
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
-#include <QtCore/QString>
+#include <QtCore/qstring.h>
#include <QtCore/qt_windows.h>
-#include <QtGui/QAccessible>
-#include <QtGui/QAccessibleInterface>
-#include <QtGui/QWindow>
-#include <QtCore/QDebug>
-#include <QtCore/QRect>
+#include <QtGui/qaccessible.h>
+#include <QtGui/qwindow.h>
+#include <QtCore/qrect.h>
#include <QtWindowsUIAutomationSupport/private/qwindowsuiawrapper_p.h>
QT_BEGIN_NAMESPACE
@@ -84,6 +82,6 @@ void setVariantString(const QString &value, VARIANT *variant);
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
#endif // QWINDOWSUIAUTILS_H
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiavalueprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiavalueprovider.cpp
index ef7d564e22..8651bcff60 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiavalueprovider.cpp
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiavalueprovider.cpp
@@ -37,17 +37,16 @@
**
****************************************************************************/
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiavalueprovider.h"
#include "qwindowsuiautils.h"
#include "qwindowscontext.h"
-#include <QtGui/QAccessible>
-#include <QtGui/QAccessibleInterface>
-#include <QtCore/QDebug>
-#include <QtCore/QString>
+#include <QtGui/qaccessible.h>
+#include <QtCore/qloggingcategory.h>
+#include <QtCore/qstring.h>
QT_BEGIN_NAMESPACE
@@ -129,4 +128,4 @@ HRESULT STDMETHODCALLTYPE QWindowsUiaValueProvider::get_Value(BSTR *pRetVal)
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiavalueprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiavalueprovider.h
index db54fc0a46..334a17e51d 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiavalueprovider.h
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiavalueprovider.h
@@ -40,8 +40,8 @@
#ifndef QWINDOWSUIAVALUEPROVIDER_H
#define QWINDOWSUIAVALUEPROVIDER_H
-#include <QtCore/QtConfig>
-#ifndef QT_NO_ACCESSIBILITY
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
#include "qwindowsuiabaseprovider.h"
@@ -58,13 +58,13 @@ public:
virtual ~QWindowsUiaValueProvider();
// IValueProvider
- HRESULT STDMETHODCALLTYPE SetValue(LPCWSTR val);
- HRESULT STDMETHODCALLTYPE get_IsReadOnly(BOOL *pRetVal);
- HRESULT STDMETHODCALLTYPE get_Value(BSTR *pRetVal);
+ HRESULT STDMETHODCALLTYPE SetValue(LPCWSTR val) override;
+ HRESULT STDMETHODCALLTYPE get_IsReadOnly(BOOL *pRetVal) override;
+ HRESULT STDMETHODCALLTYPE get_Value(BSTR *pRetVal) override;
};
QT_END_NAMESPACE
-#endif // QT_NO_ACCESSIBILITY
+#endif // QT_CONFIG(accessibility)
#endif // QWINDOWSUIAVALUEPROVIDER_H
diff --git a/src/plugins/platforms/windows/windows.pri b/src/plugins/platforms/windows/windows.pri
index f4c396f7c5..c1d4e907d9 100644
--- a/src/plugins/platforms/windows/windows.pri
+++ b/src/plugins/platforms/windows/windows.pri
@@ -9,7 +9,7 @@ mingw: LIBS *= -luuid
# For the dialog helpers:
LIBS += -lshlwapi -lshell32 -ladvapi32
-DEFINES *= QT_NO_CAST_FROM_ASCII
+DEFINES *= QT_NO_CAST_FROM_ASCII QT_NO_FOREACH
SOURCES += \
$$PWD/qwindowswindow.cpp \
@@ -18,6 +18,7 @@ SOURCES += \
$$PWD/qwindowsscreen.cpp \
$$PWD/qwindowskeymapper.cpp \
$$PWD/qwindowsmousehandler.cpp \
+ $$PWD/qwindowspointerhandler.cpp \
$$PWD/qwindowsole.cpp \
$$PWD/qwindowsdropdataobject.cpp \
$$PWD/qwindowsmime.cpp \
@@ -40,6 +41,7 @@ HEADERS += \
$$PWD/qwindowsscreen.h \
$$PWD/qwindowskeymapper.h \
$$PWD/qwindowsmousehandler.h \
+ $$PWD/qwindowspointerhandler.h \
$$PWD/qtwindowsglobal.h \
$$PWD/qwindowsole.h \
$$PWD/qwindowsdropdataobject.h \
diff --git a/src/plugins/platforms/winrt/qwinrtcanvas.cpp b/src/plugins/platforms/winrt/qwinrtcanvas.cpp
new file mode 100644
index 0000000000..ad77d811e6
--- /dev/null
+++ b/src/plugins/platforms/winrt/qwinrtcanvas.cpp
@@ -0,0 +1,146 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qwinrtcanvas.h"
+#include "uiautomation/qwinrtuiaaccessibility.h"
+#include "uiautomation/qwinrtuiamainprovider.h"
+#include "uiautomation/qwinrtuiametadatacache.h"
+#include "uiautomation/qwinrtuiautils.h"
+
+#include <QtCore/QLoggingCategory>
+#include <QtCore/qfunctions_winrt.h>
+
+using namespace Microsoft::WRL;
+using namespace Microsoft::WRL::Wrappers;
+using namespace ABI::Windows::Foundation;
+using namespace ABI::Windows::System;
+using namespace ABI::Windows::UI;
+using namespace ABI::Windows::UI::Core;
+using namespace ABI::Windows::UI::Xaml;
+using namespace ABI::Windows::Foundation;
+using namespace ABI::Windows::Foundation::Collections;
+
+QT_BEGIN_NAMESPACE
+
+QWinRTCanvas::QWinRTCanvas(const std::function<QWindow*()> &delegateWindow)
+{
+ ComPtr<Xaml::Controls::ICanvasFactory> factory;
+ HRESULT hr = RoGetActivationFactory(HString::MakeReference(RuntimeClass_Windows_UI_Xaml_Controls_Canvas).Get(), IID_PPV_ARGS(&factory));
+ Q_ASSERT_SUCCEEDED(hr);
+
+ hr = factory->CreateInstance(this, &m_base, &m_core);
+ Q_ASSERT_SUCCEEDED(hr);
+
+ delegate = delegateWindow;
+}
+
+QWinRTCanvas::~QWinRTCanvas()
+{
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTCanvas::QueryInterface(REFIID iid, LPVOID *iface)
+{
+ if (!iface)
+ return E_POINTER;
+ *iface = nullptr;
+
+ if (iid == IID_IUnknown) {
+ *iface = static_cast<Xaml::IUIElementOverrides *>(this);
+ AddRef();
+ return S_OK;
+ } else if (iid == Xaml::IID_IUIElementOverrides) {
+ *iface = static_cast<Xaml::IUIElementOverrides *>(this);
+ AddRef();
+ return S_OK;
+ } else {
+ return m_base.CopyTo(iid, iface);
+ }
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTCanvas::GetIids(ULONG *iidCount, IID **iids)
+{
+ *iidCount = 0;
+ *iids = nullptr;
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTCanvas::GetRuntimeClassName(HSTRING *className)
+{
+ const wchar_t *name = L"QWinRTCanvas";
+ return ::WindowsCreateString(name, static_cast<UINT32>(::wcslen(name)), className);
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTCanvas::GetTrustLevel(TrustLevel *trustLevel)
+{
+ *trustLevel = TrustLevel::BaseTrust;
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTCanvas::OnCreateAutomationPeer(Xaml::Automation::Peers::IAutomationPeer **returnValue)
+{
+ if (!returnValue)
+ return E_INVALIDARG;
+ *returnValue = nullptr;
+
+ if (delegate) {
+ if (QWindow *window = delegate()) {
+ QWinRTUiaAccessibility::activate();
+ if (QAccessibleInterface *accessible = window->accessibleRoot()) {
+ QAccessible::Id accid = QWinRTUiAutomation::idForAccessible(accessible);
+ QWinRTUiaMetadataCache::instance()->load(accid);
+ if (ComPtr<QWinRTUiaMainProvider> provider = QWinRTUiaMainProvider::providerForAccessibleId(accid))
+ return provider.CopyTo(returnValue);
+ }
+ }
+ }
+ return m_base->OnCreateAutomationPeer(returnValue);
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTCanvas::OnDisconnectVisualChildren()
+{
+ return m_base->OnDisconnectVisualChildren();
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTCanvas::FindSubElementsForTouchTargeting(Point point, Rect boundingRect, IIterable<IIterable<ABI::Windows::Foundation::Point>*> **returnValue)
+{
+ return m_base->FindSubElementsForTouchTargeting(point, boundingRect, returnValue);
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/plugins/platforms/winrt/qwinrtcanvas.h b/src/plugins/platforms/winrt/qwinrtcanvas.h
new file mode 100644
index 0000000000..68c15c7602
--- /dev/null
+++ b/src/plugins/platforms/winrt/qwinrtcanvas.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINRTCANVAS_H
+#define QWINRTCANVAS_H
+
+#include <QtCore/qglobal.h>
+#include <QtGui/QWindow>
+
+#include <wrl.h>
+#include <windows.ui.xaml.h>
+#include <functional>
+
+QT_BEGIN_NAMESPACE
+
+class QWinRTCanvas:
+ public Microsoft::WRL::RuntimeClass<ABI::Windows::UI::Xaml::IUIElementOverrides>
+{
+public:
+ QWinRTCanvas(const std::function<QWindow*()> &delegateWindow);
+ virtual ~QWinRTCanvas();
+
+ HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID *iface) override;
+ HRESULT STDMETHODCALLTYPE GetIids(ULONG *iidCount, IID **iids) override;
+ HRESULT STDMETHODCALLTYPE GetRuntimeClassName(HSTRING *className) override;
+ HRESULT STDMETHODCALLTYPE GetTrustLevel(TrustLevel *trustLevel) override;
+ HRESULT STDMETHODCALLTYPE OnCreateAutomationPeer(ABI::Windows::UI::Xaml::Automation::Peers::IAutomationPeer **returnValue) override;
+ HRESULT STDMETHODCALLTYPE OnDisconnectVisualChildren() override;
+ HRESULT STDMETHODCALLTYPE FindSubElementsForTouchTargeting(ABI::Windows::Foundation::Point point, ABI::Windows::Foundation::Rect boundingRect, ABI::Windows::Foundation::Collections::IIterable<ABI::Windows::Foundation::Collections::IIterable<ABI::Windows::Foundation::Point>*> **returnValue) override;
+
+private:
+ Microsoft::WRL::ComPtr<ABI::Windows::UI::Xaml::IUIElementOverrides> m_base;
+ Microsoft::WRL::ComPtr<ABI::Windows::UI::Xaml::Controls::ICanvas> m_core;
+ std::function<QWindow*()> delegate;
+};
+
+QT_END_NAMESPACE
+
+#endif // QWINRTCANVAS_H
diff --git a/src/plugins/platforms/winrt/qwinrtintegration.cpp b/src/plugins/platforms/winrt/qwinrtintegration.cpp
index c52207d23b..4f37583bed 100644
--- a/src/plugins/platforms/winrt/qwinrtintegration.cpp
+++ b/src/plugins/platforms/winrt/qwinrtintegration.cpp
@@ -50,6 +50,9 @@
#if QT_CONFIG(draganddrop)
#include "qwinrtdrag.h"
#endif
+#if QT_CONFIG(accessibility)
+# include "uiautomation/qwinrtuiaaccessibility.h"
+#endif
#include <QtGui/QOffscreenSurface>
#include <QtGui/QOpenGLContext>
@@ -119,6 +122,9 @@ public:
QPlatformClipboard *clipboard;
QWinRTScreen *mainScreen;
QScopedPointer<QWinRTInputContext> inputContext;
+#if QT_CONFIG(accessibility)
+ QWinRTUiaAccessibility *accessibility;
+#endif
ComPtr<ICoreApplication> application;
QHash<CoreApplicationCallbackRemover, EventRegistrationToken> applicationTokens;
@@ -198,6 +204,9 @@ QWinRTIntegration::QWinRTIntegration() : d_ptr(new QWinRTIntegrationPrivate)
screenAdded(d->mainScreen);
d->platformServices = new QWinRTServices;
d->clipboard = new QWinRTClipboard;
+#if QT_CONFIG(accessibility)
+ d->accessibility = new QWinRTUiaAccessibility;
+#endif
}
QWinRTIntegration::~QWinRTIntegration()
@@ -315,6 +324,14 @@ QPlatformDrag *QWinRTIntegration::drag() const
}
#endif // QT_CONFIG(draganddrop)
+#if QT_CONFIG(accessibility)
+QPlatformAccessibility *QWinRTIntegration::accessibility() const
+{
+ Q_D(const QWinRTIntegration);
+ return d->accessibility;
+}
+#endif // QT_CONFIG(accessibility)
+
Qt::KeyboardModifiers QWinRTIntegration::queryKeyboardModifiers() const
{
Q_D(const QWinRTIntegration);
diff --git a/src/plugins/platforms/winrt/qwinrtintegration.h b/src/plugins/platforms/winrt/qwinrtintegration.h
index d1a9b7edbd..7c83e27c26 100644
--- a/src/plugins/platforms/winrt/qwinrtintegration.h
+++ b/src/plugins/platforms/winrt/qwinrtintegration.h
@@ -100,6 +100,9 @@ public:
#if QT_CONFIG(draganddrop)
QPlatformDrag *drag() const override;
#endif
+#if QT_CONFIG(accessibility)
+ QPlatformAccessibility *accessibility() const override;
+#endif
Qt::KeyboardModifiers queryKeyboardModifiers() const override;
diff --git a/src/plugins/platforms/winrt/qwinrtscreen.cpp b/src/plugins/platforms/winrt/qwinrtscreen.cpp
index 928fff32d6..2e79c3505b 100644
--- a/src/plugins/platforms/winrt/qwinrtscreen.cpp
+++ b/src/plugins/platforms/winrt/qwinrtscreen.cpp
@@ -46,6 +46,7 @@
#include "qwinrtdrag.h"
#endif
#include "qwinrtwindow.h"
+#include "qwinrtcanvas.h"
#include <private/qeventdispatcher_winrt_p.h>
#include <private/qhighdpiscaling_p.h>
@@ -463,7 +464,7 @@ public:
QTouchDevice *touchDevice;
ComPtr<ICoreWindow> coreWindow;
ComPtr<ICorePointerRedirector> redirect;
- ComPtr<Xaml::IDependencyObject> canvas;
+ ComPtr<QWinRTCanvas> canvas;
ComPtr<IApplicationView> view;
ComPtr<IDisplayInformation> displayInformation;
@@ -553,27 +554,25 @@ QWinRTScreen::QWinRTScreen()
hr = applicationViewStatics->GetForCurrentView(&d->view);
RETURN_VOID_IF_FAILED("Could not access currentView");
- // Create a canvas and set it as the window content. Eventually, this should have its own method so multiple "screens" can be added
- ComPtr<Xaml::Controls::ICanvas> canvas;
- hr = RoActivateInstance(HString::MakeReference(RuntimeClass_Windows_UI_Xaml_Controls_Canvas).Get(), &canvas);
- Q_ASSERT_SUCCEEDED(hr);
+ d->canvas = Make<QWinRTCanvas>([this]() { return topWindow(); });
+
ComPtr<Xaml::IFrameworkElement> frameworkElement;
- hr = canvas.As(&frameworkElement);
+ hr = d->canvas.As(&frameworkElement);
Q_ASSERT_SUCCEEDED(hr);
hr = frameworkElement->put_Width(d->logicalRect.width());
Q_ASSERT_SUCCEEDED(hr);
hr = frameworkElement->put_Height(d->logicalRect.height());
Q_ASSERT_SUCCEEDED(hr);
+
ComPtr<Xaml::IUIElement> uiElement;
- hr = canvas.As(&uiElement);
+ hr = d->canvas.As(&uiElement);
Q_ASSERT_SUCCEEDED(hr);
+
#if QT_CONFIG(draganddrop)
QWinRTDrag::instance()->setUiElement(uiElement);
#endif
hr = window->put_Content(uiElement.Get());
Q_ASSERT_SUCCEEDED(hr);
- hr = canvas.As(&d->canvas);
- Q_ASSERT_SUCCEEDED(hr);
d->cursor.reset(new QWinRTCursor);
@@ -723,7 +722,10 @@ ICoreWindow *QWinRTScreen::coreWindow() const
Xaml::IDependencyObject *QWinRTScreen::canvas() const
{
Q_D(const QWinRTScreen);
- return d->canvas.Get();
+ Xaml::IDependencyObject *depCanvas;
+ if (SUCCEEDED(d->canvas.CopyTo(&depCanvas)))
+ return depCanvas;
+ return nullptr;
}
void QWinRTScreen::initialize()
@@ -860,6 +862,8 @@ void QWinRTScreen::removeWindow(QWindow *window)
Q_D(QWinRTScreen);
qCDebug(lcQpaWindows) << __FUNCTION__ << window;
+ handleExpose();
+
const bool wasTopWindow = window == topWindow();
if (!d->visibleWindows.removeAll(window))
return;
@@ -867,7 +871,6 @@ void QWinRTScreen::removeWindow(QWindow *window)
const Qt::WindowType type = window->type();
if (wasTopWindow && type != Qt::Popup && type != Qt::ToolTip && type != Qt::Tool)
QWindowSystemInterface::handleWindowActivated(nullptr, Qt::OtherFocusReason);
- handleExpose();
QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents);
#if QT_CONFIG(draganddrop)
if (wasTopWindow)
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiaaccessibility.cpp b/src/plugins/platforms/winrt/uiautomation/qwinrtuiaaccessibility.cpp
new file mode 100644
index 0000000000..878fcd0f96
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiaaccessibility.cpp
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiaaccessibility.h"
+#include "qwinrtuiamainprovider.h"
+
+#include <QtGui/QAccessible>
+#include <QtGui/QWindow>
+#include <QtGui/QGuiApplication>
+#include <QtGui/private/qguiapplication_p.h>
+#include <QtCore/qt_windows.h>
+#include <qpa/qplatformintegration.h>
+
+QT_BEGIN_NAMESPACE
+
+QWinRTUiaAccessibility::QWinRTUiaAccessibility()
+{
+}
+
+QWinRTUiaAccessibility::~QWinRTUiaAccessibility()
+{
+}
+
+// Handles UI Automation window messages.
+void QWinRTUiaAccessibility::activate()
+{
+ // Start handling accessibility internally
+ QGuiApplicationPrivate::platformIntegration()->accessibility()->setActive(true);
+}
+
+// Handles accessibility update notifications.
+void QWinRTUiaAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event)
+{
+ if (!event)
+ return;
+
+ QAccessibleInterface *accessible = event->accessibleInterface();
+ if (!isActive() || !accessible || !accessible->isValid())
+ return;
+
+ switch (event->type()) {
+ case QAccessible::Focus:
+ QWinRTUiaMainProvider::notifyFocusChange(event);
+ break;
+ case QAccessible::StateChanged:
+ QWinRTUiaMainProvider::notifyStateChange(static_cast<QAccessibleStateChangeEvent *>(event));
+ break;
+ case QAccessible::ValueChanged:
+ QWinRTUiaMainProvider::notifyValueChange(static_cast<QAccessibleValueChangeEvent *>(event));
+ break;
+ case QAccessible::TextAttributeChanged:
+ case QAccessible::TextColumnChanged:
+ case QAccessible::TextInserted:
+ case QAccessible::TextRemoved:
+ case QAccessible::TextUpdated:
+ case QAccessible::TextSelectionChanged:
+ case QAccessible::TextCaretMoved:
+ QWinRTUiaMainProvider::notifyTextChange(event);
+ break;
+ default:
+ break;
+ }
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
diff --git a/src/platformheaders/xcbfunctions/qxcbintegrationfunctions.h b/src/plugins/platforms/winrt/uiautomation/qwinrtuiaaccessibility.h
index fc24dd0f6e..b966271e21 100644
--- a/src/platformheaders/xcbfunctions/qxcbintegrationfunctions.h
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiaaccessibility.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
@@ -37,24 +37,28 @@
**
****************************************************************************/
-#ifndef QXCBINTEGRATIONFUNCTIONS_H
-#define QXCBINTEGRATIONFUNCTIONS_H
+#ifndef QWINRTUIAACCESSIBILITY_H
+#define QWINRTUIAACCESSIBILITY_H
-#include <QtPlatformHeaders/QPlatformHeaderHelper>
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include <qpa/qplatformaccessibility.h>
QT_BEGIN_NAMESPACE
-class QXcbIntegrationFunctions
+// WinRT platform accessibility implemented over UI Automation.
+class QWinRTUiaAccessibility : public QPlatformAccessibility
{
public:
- typedef bool (*XEmbedSystemTrayVisualHasAlphaChannel)();
- static const QByteArray xEmbedSystemTrayVisualHasAlphaChannelIdentifier() { return QByteArrayLiteral("XcbXEmbedSystemTrayVisualHasAlphaChannel"); }
- static bool xEmbedSystemTrayVisualHasAlphaChannel()
- {
- return QPlatformHeaderHelper::callPlatformFunction<bool, XEmbedSystemTrayVisualHasAlphaChannel>(xEmbedSystemTrayVisualHasAlphaChannelIdentifier());
- }
+ explicit QWinRTUiaAccessibility();
+ virtual ~QWinRTUiaAccessibility();
+ static void activate();
+ void notifyAccessibilityUpdate(QAccessibleEvent *event) override;
};
QT_END_NAMESPACE
-#endif /*QXCBINTEGRATIONFUNCTIONS_H*/
+#endif // QT_CONFIG(accessibility)
+
+#endif // QWINRTUIAACCESSIBILITY_H
diff --git a/src/gui/image/qimage_avx2.cpp b/src/plugins/platforms/winrt/uiautomation/qwinrtuiabaseprovider.cpp
index 0519f17c5d..ee53714caa 100644
--- a/src/gui/image/qimage_avx2.cpp
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiabaseprovider.cpp
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the plugins of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -37,31 +37,40 @@
**
****************************************************************************/
-#include <qimage.h>
-#include <private/qdrawhelper_p.h>
-#include <private/qimage_p.h>
-#include <private/qsimd_p.h>
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
-#ifdef QT_COMPILER_SUPPORTS_AVX2
+#include "qwinrtuiabaseprovider.h"
+
+#include <QtGui/QAccessible>
+#include <QtGui/QAccessibleInterface>
+#include <QtCore/QLoggingCategory>
+#include <QtCore/QString>
QT_BEGIN_NAMESPACE
-void convert_ARGB_to_ARGB_PM_avx2(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
+QWinRTUiaBaseProvider::QWinRTUiaBaseProvider(QAccessible::Id id) :
+ m_id(id)
{
- Q_ASSERT(src->format == QImage::Format_ARGB32 || src->format == QImage::Format_RGBA8888);
- Q_ASSERT(dest->format == QImage::Format_ARGB32_Premultiplied || dest->format == QImage::Format_RGBA8888_Premultiplied);
- Q_ASSERT(src->width == dest->width);
- Q_ASSERT(src->height == dest->height);
+}
+
+QWinRTUiaBaseProvider::~QWinRTUiaBaseProvider()
+{
+}
- const uint *src_data = (uint *) src->data;
- uint *dest_data = (uint *) dest->data;
- for (int i = 0; i < src->height; ++i) {
- qt_convertARGB32ToARGB32PM(dest_data, src_data, src->width);
- src_data += src->bytes_per_line >> 2;
- dest_data += dest->bytes_per_line >> 2;
- }
+QAccessibleInterface *QWinRTUiaBaseProvider::accessibleInterface() const
+{
+ QAccessibleInterface *accessible = QAccessible::accessibleInterface(m_id);
+ if (accessible && accessible->isValid())
+ return accessible;
+ return nullptr;
+}
+
+QAccessible::Id QWinRTUiaBaseProvider::id() const
+{
+ return m_id;
}
QT_END_NAMESPACE
-#endif // QT_COMPILER_SUPPORTS_AVX2
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiabaseprovider.h b/src/plugins/platforms/winrt/uiautomation/qwinrtuiabaseprovider.h
new file mode 100644
index 0000000000..d8837354dc
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiabaseprovider.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINRTUIABASEPROVIDER_H
+#define QWINRTUIABASEPROVIDER_H
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include <QtGui/QAccessible>
+#include <QtGui/QAccessibleInterface>
+#include <QtCore/QPointer>
+
+QT_BEGIN_NAMESPACE
+
+// Base class for UI Automation providers.
+class QWinRTUiaBaseProvider : public QObject
+{
+ Q_OBJECT
+ Q_DISABLE_COPY(QWinRTUiaBaseProvider)
+public:
+ explicit QWinRTUiaBaseProvider(QAccessible::Id id);
+ virtual ~QWinRTUiaBaseProvider();
+
+ QAccessibleInterface *accessibleInterface() const;
+ QAccessible::Id id() const;
+
+private:
+ QAccessible::Id m_id;
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
+
+#endif // QWINRTUIABASEPROVIDER_H
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiacontrolmetadata.cpp b/src/plugins/platforms/winrt/uiautomation/qwinrtuiacontrolmetadata.cpp
new file mode 100644
index 0000000000..4e406a3545
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiacontrolmetadata.cpp
@@ -0,0 +1,182 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiacontrolmetadata.h"
+#include "qwinrtuiautils.h"
+
+#include <QtCore/QLoggingCategory>
+#include <QtCore/QString>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QWinRTUiAutomation;
+
+QWinRTUiaControlMetadata::QWinRTUiaControlMetadata()
+{
+}
+
+QWinRTUiaControlMetadata::QWinRTUiaControlMetadata(QAccessible::Id id)
+{
+ update(id);
+}
+
+void QWinRTUiaControlMetadata::update(QAccessible::Id id)
+{
+ if (QAccessibleInterface *accessible = accessibleForId(id)) {
+ m_automationId = generateAutomationId(accessible);
+ m_className = generateClassName(accessible);
+ m_controlName = generateControlName(accessible);
+ m_role = generateRole(accessible);
+ m_state = accessible->state();
+ m_accelerator = accessible->text(QAccessible::Accelerator);
+ m_access = accessible->text(QAccessible::Accelerator);
+ m_help = accessible->text(QAccessible::Help);
+ m_description = accessible->text(QAccessible::Description);
+ m_value = accessible->text(QAccessible::Value);
+ m_boundingRect = accessible->rect();
+ updateValueData(accessible);
+ updateTableData(accessible);
+ updateTextData(accessible);
+ }
+}
+
+QString QWinRTUiaControlMetadata::generateControlName(QAccessibleInterface *accessible)
+{
+ const bool clientTopLevel = (accessible->role() == QAccessible::Client)
+ && accessible->parent() && (accessible->parent()->role() == QAccessible::Application);
+
+ QString name = accessible->text(QAccessible::Name);
+ if (name.isEmpty() && clientTopLevel)
+ name = QCoreApplication::applicationName();
+ return name;
+}
+
+QString QWinRTUiaControlMetadata::generateClassName(QAccessibleInterface *accessible)
+{
+ QString name;
+
+ if (QObject *obj = accessible->object())
+ name = QLatin1String(obj->metaObject()->className());
+ return name;
+}
+
+// Generates an ID based on the name of the controls and their parents.
+QString QWinRTUiaControlMetadata::generateAutomationId(QAccessibleInterface *accessible)
+{
+ QString autid;
+ QObject *obj = accessible->object();
+ while (obj) {
+ QString name = obj->objectName();
+ if (name.isEmpty()) {
+ autid = QStringLiteral("");
+ break;
+ }
+ if (!autid.isEmpty())
+ autid.prepend(QLatin1Char('.'));
+ autid.prepend(name);
+ obj = obj->parent();
+ }
+ return autid;
+}
+
+QAccessible::Role QWinRTUiaControlMetadata::generateRole(QAccessibleInterface *accessible)
+{
+ const bool clientTopLevel = (accessible->role() == QAccessible::Client)
+ && accessible->parent() && (accessible->parent()->role() == QAccessible::Application);
+
+ if (clientTopLevel) {
+ // Reports a top-level widget as a window.
+ return QAccessible::Window;
+ } else {
+ return accessible->role();
+ }
+}
+
+void QWinRTUiaControlMetadata::updateValueData(QAccessibleInterface *accessible)
+{
+ if (QAccessibleValueInterface *valueInterface = accessible->valueInterface()) {
+ m_minimumValue = valueInterface->minimumValue().toDouble();
+ m_maximumValue = valueInterface->maximumValue().toDouble();
+ m_currentValue = valueInterface->currentValue().toDouble();
+ m_minimumStepSize = valueInterface->minimumStepSize().toDouble();
+ } else {
+ m_minimumValue = 0.0;
+ m_maximumValue = 0.0;
+ m_currentValue = 0.0;
+ m_minimumStepSize = 0.0;
+ }
+}
+
+void QWinRTUiaControlMetadata::updateTableData(QAccessibleInterface *accessible)
+{
+ if (QAccessibleTableInterface *tableInterface = accessible->tableInterface()) {
+ m_rowIndex = 0;
+ m_columnIndex = 0;
+ m_rowCount = tableInterface->rowCount();
+ m_columnCount = tableInterface->columnCount();
+ } else if (QAccessibleTableCellInterface *tableCellInterface = accessible->tableCellInterface()) {
+ m_rowIndex = tableCellInterface->rowIndex();
+ m_columnIndex = tableCellInterface->columnIndex();
+ m_rowCount = tableCellInterface->rowExtent();
+ m_columnCount = tableCellInterface->columnExtent();
+ } else {
+ m_rowIndex = 0;
+ m_columnIndex = 0;
+ m_rowCount = 0;
+ m_columnCount = 0;
+ }
+}
+
+void QWinRTUiaControlMetadata::updateTextData(QAccessibleInterface *accessible)
+{
+ if (QAccessibleTextInterface *textInterface = accessible->textInterface()) {
+ m_cursorPosition = textInterface->cursorPosition();
+ m_text = textInterface->text(0, textInterface->characterCount());
+ } else {
+ m_cursorPosition = 0;
+ m_text = QStringLiteral("");
+ }
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiacontrolmetadata.h b/src/plugins/platforms/winrt/uiautomation/qwinrtuiacontrolmetadata.h
new file mode 100644
index 0000000000..769f073a1b
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiacontrolmetadata.h
@@ -0,0 +1,117 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINRTUIACONTROLMETADATA_H
+#define QWINRTUIACONTROLMETADATA_H
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include <QString>
+#include <QtGui/QAccessible>
+#include <QtGui/QAccessibleInterface>
+
+QT_BEGIN_NAMESPACE
+
+// Cacheable control metadata
+class QWinRTUiaControlMetadata
+{
+public:
+ QWinRTUiaControlMetadata();
+ QWinRTUiaControlMetadata(QAccessible::Id id);
+ void update(QAccessible::Id id);
+ QString automationId() const { return m_automationId; }
+ QString className() const { return m_className; }
+ QString controlName() const { return m_controlName; }
+ QString accelerator() const { return m_accelerator; }
+ QString access() const { return m_access; }
+ QString help() const { return m_help; }
+ QString description() const { return m_description; }
+ QString value() const { return m_value; }
+ QString text() const { return m_text; }
+ QAccessible::Role role() const { return m_role; }
+ QAccessible::State state() const { return m_state; }
+ QRect boundingRect() const { return m_boundingRect; }
+ double minimumValue() const { return m_minimumValue; }
+ double maximumValue() const { return m_maximumValue; }
+ double currentValue() const { return m_currentValue; }
+ double minimumStepSize() const { return m_minimumStepSize; }
+ int rowIndex() const { return m_rowIndex; }
+ int columnIndex() const { return m_columnIndex; }
+ int rowCount() const { return m_rowCount; }
+ int columnCount() const { return m_columnCount; }
+ int characterCount() const { return m_text.length(); }
+ int cursorPosition() const { return m_cursorPosition; }
+
+private:
+ QString generateControlName(QAccessibleInterface *accessible);
+ QString generateClassName(QAccessibleInterface *accessible);
+ QString generateAutomationId(QAccessibleInterface *accessible);
+ QAccessible::Role generateRole(QAccessibleInterface *accessible);
+ void updateValueData(QAccessibleInterface *accessible);
+ void updateTableData(QAccessibleInterface *accessible);
+ void updateTextData(QAccessibleInterface *accessible);
+ QString m_automationId;
+ QString m_className;
+ QString m_controlName;
+ QString m_accelerator;
+ QString m_access;
+ QString m_help;
+ QString m_description;
+ QString m_value;
+ QString m_text;
+ QAccessible::Role m_role = QAccessible::NoRole;
+ QAccessible::State m_state;
+ QRect m_boundingRect;
+ double m_minimumValue = 0.0;
+ double m_maximumValue = 0.0;
+ double m_currentValue = 0.0;
+ double m_minimumStepSize = 0.0;
+ int m_rowIndex = 0;
+ int m_columnIndex = 0;
+ int m_rowCount = 0;
+ int m_columnCount = 0;
+ int m_cursorPosition = 0;
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
+
+#endif // QWINRTUIACONTROLMETADATA_H
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiaemptypropertyvalue.h b/src/plugins/platforms/winrt/uiautomation/qwinrtuiaemptypropertyvalue.h
new file mode 100644
index 0000000000..35e4df75fc
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiaemptypropertyvalue.h
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINRTUIAEMPTYPROPERTYVALUE_H
+#define QWINRTUIAEMPTYPROPERTYVALUE_H
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include <wrl.h>
+#include <windows.ui.xaml.h>
+
+QT_BEGIN_NAMESPACE
+
+// Implements an empty property value.
+class QWinRTUiaEmptyPropertyValue :
+ public Microsoft::WRL::RuntimeClass<ABI::Windows::Foundation::IPropertyValue>
+{
+ InspectableClass(L"QWinRTUiaEmptyPropertyValue", BaseTrust);
+public:
+
+ HRESULT STDMETHODCALLTYPE get_Type(ABI::Windows::Foundation::PropertyType *value)
+ {
+ *value = ABI::Windows::Foundation::PropertyType_Empty;
+ return S_OK;
+ }
+
+ HRESULT STDMETHODCALLTYPE get_IsNumericScalar(boolean*) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetUInt8(BYTE*) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetInt16(INT16*) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetUInt16(UINT16*) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetInt32(INT32*) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetUInt32(UINT32*) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetInt64(INT64*) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetUInt64(UINT64*) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetSingle(FLOAT*) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetDouble(DOUBLE*) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetChar16(WCHAR*) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetBoolean(boolean*) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetString(HSTRING*) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetGuid(GUID*) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetDateTime(ABI::Windows::Foundation::DateTime*) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetTimeSpan(ABI::Windows::Foundation::TimeSpan*) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetPoint(ABI::Windows::Foundation::Point*) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetSize(ABI::Windows::Foundation::Size*) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetRect(ABI::Windows::Foundation::Rect*) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetUInt8Array(UINT32*, BYTE**) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetInt16Array(UINT32*, INT16**) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetUInt16Array(UINT32*, UINT16**) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetInt32Array(UINT32*, INT32**) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetUInt32Array(UINT32*, UINT32**) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetInt64Array(UINT32*, INT64**) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetUInt64Array(UINT32*, UINT64**) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetSingleArray(UINT32*, FLOAT**) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetDoubleArray(UINT32*, DOUBLE**) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetChar16Array(UINT32*, WCHAR**) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetBooleanArray(UINT32*, boolean**) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetStringArray(UINT32*, HSTRING**) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetInspectableArray(UINT32*, IInspectable***) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetGuidArray(UINT32*, GUID**) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetDateTimeArray(UINT32*, ABI::Windows::Foundation::DateTime**) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetTimeSpanArray(UINT32*, ABI::Windows::Foundation::TimeSpan**) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetPointArray(UINT32*, ABI::Windows::Foundation::Point**) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetSizeArray(UINT32*, ABI::Windows::Foundation::Size**) { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE GetRectArray(UINT32*, ABI::Windows::Foundation::Rect**) { return E_FAIL; }
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
+
+#endif // QWINRTUIAEMPTYPROPERTYVALUE_H
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiagriditemprovider.cpp b/src/plugins/platforms/winrt/uiautomation/qwinrtuiagriditemprovider.cpp
new file mode 100644
index 0000000000..524000b618
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiagriditemprovider.cpp
@@ -0,0 +1,160 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiagriditemprovider.h"
+#include "qwinrtuiamainprovider.h"
+#include "qwinrtuiametadatacache.h"
+#include "qwinrtuiautils.h"
+
+#include <QtGui/QAccessible>
+#include <QtGui/QAccessibleInterface>
+#include <QtCore/QLoggingCategory>
+#include <QtCore/QString>
+#include <QtCore/private/qeventdispatcher_winrt_p.h>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QWinRTUiAutomation;
+using namespace ABI::Windows::UI::Xaml::Automation;
+using namespace ABI::Windows::UI::Xaml::Automation::Provider;
+using namespace ABI::Windows::UI::Xaml::Automation::Peers;
+
+QWinRTUiaGridItemProvider::QWinRTUiaGridItemProvider(QAccessible::Id id) :
+ QWinRTUiaBaseProvider(id)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+}
+
+QWinRTUiaGridItemProvider::~QWinRTUiaGridItemProvider()
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+}
+
+// Returns the column index of the item.
+HRESULT STDMETHODCALLTYPE QWinRTUiaGridItemProvider::get_Column(INT32 *value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!value)
+ return E_INVALIDARG;
+
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ *value = metadata->columnIndex();
+ return S_OK;
+}
+
+// Returns the number of columns occupied by the item.
+HRESULT STDMETHODCALLTYPE QWinRTUiaGridItemProvider::get_ColumnSpan(INT32 *value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!value)
+ return E_INVALIDARG;
+
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ *value = metadata->columnCount();
+ return S_OK;
+}
+
+// Returns the provider for the containing table/tree.
+HRESULT STDMETHODCALLTYPE QWinRTUiaGridItemProvider::get_ContainingGrid(IIRawElementProviderSimple **value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!value)
+ return E_INVALIDARG;
+ *value = nullptr;
+
+ auto accid = id();
+ auto elementId = QSharedPointer<QAccessible::Id>(new QAccessible::Id(0));
+ auto ptrElementId = new QSharedPointer<QAccessible::Id>(elementId);
+
+ if (!SUCCEEDED(QEventDispatcherWinRT::runOnMainThread([accid, ptrElementId]() {
+ if (QAccessibleInterface *accessible = accessibleForId(accid)) {
+ if (QAccessibleTableCellInterface *tableCellInterface = accessible->tableCellInterface()) {
+ if (QAccessibleInterface *table = tableCellInterface->table()) {
+ **ptrElementId = idForAccessible(table);
+ QWinRTUiaMetadataCache::instance()->load(**ptrElementId);
+ }
+ }
+ }
+ delete ptrElementId;
+ return S_OK;
+ }))) {
+ return E_FAIL;
+ }
+
+ if (!*elementId)
+ return S_OK;
+
+ return QWinRTUiaMainProvider::rawProviderForAccessibleId(*elementId, value);
+}
+
+// Returns the row index of the item.
+HRESULT STDMETHODCALLTYPE QWinRTUiaGridItemProvider::get_Row(INT32 *value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!value)
+ return E_INVALIDARG;
+
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ *value = metadata->rowIndex();
+ return S_OK;
+}
+
+// Returns the number of rows occupied by the item.
+HRESULT STDMETHODCALLTYPE QWinRTUiaGridItemProvider::get_RowSpan(INT32 *value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!value)
+ return E_INVALIDARG;
+
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ *value = metadata->rowCount();
+ return S_OK;
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiagriditemprovider.h b/src/plugins/platforms/winrt/uiautomation/qwinrtuiagriditemprovider.h
new file mode 100644
index 0000000000..70504fc555
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiagriditemprovider.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINRTUIAGRIDITEMPROVIDER_H
+#define QWINRTUIAGRIDITEMPROVIDER_H
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiabaseprovider.h"
+
+#include <wrl.h>
+#include <windows.ui.xaml.h>
+
+QT_BEGIN_NAMESPACE
+
+// Implements the Grid Item control pattern provider. Used by items within a table/tree.
+class QWinRTUiaGridItemProvider :
+ public QWinRTUiaBaseProvider,
+ public Microsoft::WRL::RuntimeClass<ABI::Windows::UI::Xaml::Automation::Provider::IGridItemProvider>
+{
+ Q_OBJECT
+ Q_DISABLE_COPY(QWinRTUiaGridItemProvider)
+ InspectableClass(L"QWinRTUiaGridItemProvider", BaseTrust);
+
+public:
+ explicit QWinRTUiaGridItemProvider(QAccessible::Id id);
+ virtual ~QWinRTUiaGridItemProvider();
+
+ // IGridItemProvider
+ HRESULT STDMETHODCALLTYPE get_Column(INT32 *value) override;
+ HRESULT STDMETHODCALLTYPE get_ColumnSpan(INT32 *value) override;
+ HRESULT STDMETHODCALLTYPE get_ContainingGrid(ABI::Windows::UI::Xaml::Automation::Provider::IIRawElementProviderSimple **value) override;
+ HRESULT STDMETHODCALLTYPE get_Row(INT32 *value) override;
+ HRESULT STDMETHODCALLTYPE get_RowSpan(INT32 *value) override;
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
+
+#endif // QWINRTUIAGRIDITEMPROVIDER_H
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiagridprovider.cpp b/src/plugins/platforms/winrt/uiautomation/qwinrtuiagridprovider.cpp
new file mode 100644
index 0000000000..e469991de2
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiagridprovider.cpp
@@ -0,0 +1,135 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiagridprovider.h"
+#include "qwinrtuiamainprovider.h"
+#include "qwinrtuiametadatacache.h"
+#include "qwinrtuiautils.h"
+
+#include <QtGui/QAccessible>
+#include <QtGui/QAccessibleInterface>
+#include <QtCore/QLoggingCategory>
+#include <QtCore/QString>
+#include <QtCore/private/qeventdispatcher_winrt_p.h>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QWinRTUiAutomation;
+using namespace ABI::Windows::UI::Xaml::Automation;
+using namespace ABI::Windows::UI::Xaml::Automation::Provider;
+using namespace ABI::Windows::UI::Xaml::Automation::Peers;
+
+QWinRTUiaGridProvider::QWinRTUiaGridProvider(QAccessible::Id id) :
+ QWinRTUiaBaseProvider(id)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+}
+
+QWinRTUiaGridProvider::~QWinRTUiaGridProvider()
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+}
+
+// Returns the number of columns.
+HRESULT STDMETHODCALLTYPE QWinRTUiaGridProvider::get_ColumnCount(INT32 *value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!value)
+ return E_INVALIDARG;
+
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ *value = metadata->columnCount();
+ return S_OK;
+}
+
+// Returns the number of rows.
+HRESULT STDMETHODCALLTYPE QWinRTUiaGridProvider::get_RowCount(INT32 *value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!value)
+ return E_INVALIDARG;
+
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ *value = metadata->rowCount();
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaGridProvider::GetItem(INT32 row, INT32 column, IIRawElementProviderSimple **returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ *returnValue = nullptr;
+
+ auto accid = id();
+ auto elementId = QSharedPointer<QAccessible::Id>(new QAccessible::Id(0));
+ auto ptrElementId = new QSharedPointer<QAccessible::Id>(elementId);
+
+ if (!SUCCEEDED(QEventDispatcherWinRT::runOnMainThread([accid, row, column, ptrElementId]() {
+ if (QAccessibleInterface *accessible = accessibleForId(accid)) {
+ if (QAccessibleTableInterface *tableInterface = accessible->tableInterface()) {
+ if ((row >= 0) && (row < tableInterface->rowCount()) && (column >= 0) && (column < tableInterface->columnCount())) {
+ if (QAccessibleInterface *cell = tableInterface->cellAt(row, column)) {
+ **ptrElementId = idForAccessible(cell);
+ QWinRTUiaMetadataCache::instance()->load(**ptrElementId);
+ }
+ }
+ }
+ }
+ delete ptrElementId;
+ return S_OK;
+ }))) {
+ return E_FAIL;
+ }
+
+ if (!*elementId)
+ return E_FAIL;
+
+ return QWinRTUiaMainProvider::rawProviderForAccessibleId(*elementId, returnValue);
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiagridprovider.h b/src/plugins/platforms/winrt/uiautomation/qwinrtuiagridprovider.h
new file mode 100644
index 0000000000..d6dfaed315
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiagridprovider.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINRTUIAGRIDPROVIDER_H
+#define QWINRTUIAGRIDPROVIDER_H
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiabaseprovider.h"
+
+#include <wrl.h>
+#include <windows.ui.xaml.h>
+
+QT_BEGIN_NAMESPACE
+
+// Implements the Grid control pattern provider. Used by tables/trees.
+class QWinRTUiaGridProvider :
+ public QWinRTUiaBaseProvider,
+ public Microsoft::WRL::RuntimeClass<ABI::Windows::UI::Xaml::Automation::Provider::IGridProvider>
+{
+ Q_OBJECT
+ Q_DISABLE_COPY(QWinRTUiaGridProvider)
+ InspectableClass(L"QWinRTUiaGridProvider", BaseTrust);
+
+public:
+ explicit QWinRTUiaGridProvider(QAccessible::Id id);
+ virtual ~QWinRTUiaGridProvider();
+
+ // IGridProvider
+ HRESULT STDMETHODCALLTYPE get_ColumnCount(INT32 *value) override;
+ HRESULT STDMETHODCALLTYPE get_RowCount(INT32 *value) override;
+ HRESULT STDMETHODCALLTYPE GetItem(INT32 row, INT32 column, ABI::Windows::UI::Xaml::Automation::Provider::IIRawElementProviderSimple **returnValue) override;
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
+
+#endif // QWINRTUIAGRIDPROVIDER_H
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiainvokeprovider.cpp b/src/plugins/platforms/winrt/uiautomation/qwinrtuiainvokeprovider.cpp
new file mode 100644
index 0000000000..e2cf7bc107
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiainvokeprovider.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiainvokeprovider.h"
+#include "qwinrtuiametadatacache.h"
+#include "qwinrtuiautils.h"
+
+#include <QtGui/QAccessible>
+#include <QtGui/QAccessibleInterface>
+#include <QtCore/QLoggingCategory>
+#include <QtCore/QString>
+#include <QtCore/private/qeventdispatcher_winrt_p.h>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QWinRTUiAutomation;
+using namespace ABI::Windows::UI::Xaml::Automation;
+using namespace ABI::Windows::UI::Xaml::Automation::Provider;
+
+QWinRTUiaInvokeProvider::QWinRTUiaInvokeProvider(QAccessible::Id id) :
+ QWinRTUiaBaseProvider(id)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+}
+
+QWinRTUiaInvokeProvider::~QWinRTUiaInvokeProvider()
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaInvokeProvider::Invoke()
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ auto accid = id();
+
+ QEventDispatcherWinRT::runOnMainThread([accid]() {
+ if (QAccessibleInterface *accessible = accessibleForId(accid))
+ if (QAccessibleActionInterface *actionInterface = accessible->actionInterface())
+ actionInterface->doAction(QAccessibleActionInterface::pressAction());
+ QWinRTUiaMetadataCache::instance()->load(accid);
+ return S_OK;
+ }, 0);
+ return S_OK;
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiainvokeprovider.h b/src/plugins/platforms/winrt/uiautomation/qwinrtuiainvokeprovider.h
new file mode 100644
index 0000000000..dfe7917a16
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiainvokeprovider.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINRTUIAINVOKEPROVIDER_H
+#define QWINRTUIAINVOKEPROVIDER_H
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiabaseprovider.h"
+
+#include <wrl.h>
+#include <windows.ui.xaml.h>
+
+QT_BEGIN_NAMESPACE
+
+// Implements the Invoke control pattern provider.
+class QWinRTUiaInvokeProvider :
+ public QWinRTUiaBaseProvider,
+ public Microsoft::WRL::RuntimeClass<ABI::Windows::UI::Xaml::Automation::Provider::IInvokeProvider>
+{
+ Q_OBJECT
+ Q_DISABLE_COPY(QWinRTUiaInvokeProvider)
+ InspectableClass(L"QWinRTUiaInvokeProvider", BaseTrust);
+
+public:
+ explicit QWinRTUiaInvokeProvider(QAccessible::Id id);
+ virtual ~QWinRTUiaInvokeProvider();
+
+ // IInvokeProvider
+ HRESULT STDMETHODCALLTYPE Invoke() override;
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
+
+#endif // QWINRTUIAINVOKEPROVIDER_H
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiamainprovider.cpp b/src/plugins/platforms/winrt/uiautomation/qwinrtuiamainprovider.cpp
new file mode 100644
index 0000000000..99efe27c34
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiamainprovider.cpp
@@ -0,0 +1,779 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiamainprovider.h"
+#include "qwinrtuiaprovidercache.h"
+#include "qwinrtuiavalueprovider.h"
+#include "qwinrtuiarangevalueprovider.h"
+#include "qwinrtuiatextprovider.h"
+#include "qwinrtuiatoggleprovider.h"
+#include "qwinrtuiainvokeprovider.h"
+#include "qwinrtuiaselectionprovider.h"
+#include "qwinrtuiaselectionitemprovider.h"
+#include "qwinrtuiatableprovider.h"
+#include "qwinrtuiatableitemprovider.h"
+#include "qwinrtuiagridprovider.h"
+#include "qwinrtuiagriditemprovider.h"
+#include "qwinrtuiapeervector.h"
+#include "qwinrtuiametadatacache.h"
+#include "qwinrtuiaemptypropertyvalue.h"
+#include "qwinrtuiautils.h"
+
+#include <QCoreApplication>
+#include <QSemaphore>
+#include <QtCore/QLoggingCategory>
+#include <QtCore/qfunctions_winrt.h>
+#include <QtCore/private/qeventdispatcher_winrt_p.h>
+
+using namespace QWinRTUiAutomation;
+using namespace Microsoft::WRL;
+using namespace Microsoft::WRL::Wrappers;
+using namespace ABI::Windows::System;
+using namespace ABI::Windows::UI;
+using namespace ABI::Windows::UI::Core;
+using namespace ABI::Windows::UI::Xaml;
+using namespace ABI::Windows::UI::Xaml::Automation;
+using namespace ABI::Windows::UI::Xaml::Automation::Provider;
+using namespace ABI::Windows::UI::Xaml::Automation::Peers;
+using namespace ABI::Windows::Foundation;
+using namespace ABI::Windows::Foundation::Collections;
+
+QT_BEGIN_NAMESPACE
+
+QWinRTUiaMainProvider::QWinRTUiaMainProvider(QAccessible::Id id)
+ : QWinRTUiaBaseProvider(id)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ ComPtr<IAutomationPeerFactory> factory;
+ HRESULT hr = RoGetActivationFactory(HString::MakeReference(RuntimeClass_Windows_UI_Xaml_Automation_Peers_AutomationPeer).Get(), IID_PPV_ARGS(&factory));
+ Q_ASSERT_SUCCEEDED(hr);
+
+ hr = factory->CreateInstance(this, &m_base, &m_core);
+ Q_ASSERT_SUCCEEDED(hr);
+}
+
+QWinRTUiaMainProvider::~QWinRTUiaMainProvider()
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::QueryInterface(REFIID iid, LPVOID *iface)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!iface)
+ return E_POINTER;
+ *iface = nullptr;
+
+ if (iid == IID_IUnknown) {
+ *iface = static_cast<IAutomationPeerOverrides *>(this);
+ AddRef();
+ return S_OK;
+ } else if (iid == IID_IAutomationPeerOverrides) {
+ *iface = static_cast<IAutomationPeerOverrides *>(this);
+ AddRef();
+ return S_OK;
+ } else {
+ return m_base.CopyTo(iid, iface);
+ }
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::GetIids(ULONG *iidCount, IID **iids)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+ *iidCount = 0;
+ *iids = nullptr;
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::GetRuntimeClassName(HSTRING *className)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+ return qHString(QStringLiteral("QWinRTUiaMainProvider"), className);
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::GetTrustLevel(TrustLevel *trustLevel)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+ *trustLevel = TrustLevel::BaseTrust;
+ return S_OK;
+}
+
+// Returns a cached instance of the provider for a specific accessible interface.
+QWinRTUiaMainProvider *QWinRTUiaMainProvider::providerForAccessibleId(QAccessible::Id id)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ QWinRTUiaProviderCache *providerCache = QWinRTUiaProviderCache::instance();
+ QWinRTUiaMainProvider *provider = qobject_cast<QWinRTUiaMainProvider *>(providerCache->providerForId(id));
+
+ if (provider) {
+ provider->AddRef();
+ } else {
+ ComPtr<QWinRTUiaMainProvider> p = Make<QWinRTUiaMainProvider>(id);
+ provider = p.Get();
+ provider->AddRef();
+ providerCache->insert(id, provider);
+ }
+ return provider;
+}
+
+// Returns an IIRawElementProviderSimple for a specific accessible interface.
+HRESULT QWinRTUiaMainProvider::rawProviderForAccessibleId(QAccessible::Id elementId,
+ IIRawElementProviderSimple **returnValue)
+{
+ if (!returnValue)
+ return E_INVALIDARG;
+ *returnValue = nullptr;
+
+ if (ComPtr<QWinRTUiaMainProvider> provider = providerForAccessibleId(elementId)) {
+ ComPtr<IAutomationPeer> automationPeer;
+ if (SUCCEEDED(provider.As(&automationPeer))) {
+ ComPtr<IAutomationPeerProtected> automationPeerProtected;
+ if (SUCCEEDED(provider.As(&automationPeerProtected))) {
+ return automationPeerProtected->ProviderFromPeer(automationPeer.Get(), returnValue);
+ }
+ }
+ }
+ return E_FAIL;
+}
+
+// Returns an array of IIRawElementProviderSimple instances for a list of accessible interface ids.
+HRESULT QWinRTUiaMainProvider::rawProviderArrayForAccessibleIdList(const QList<QAccessible::Id> &elementIds,
+ UINT32 *returnValueSize,
+ IIRawElementProviderSimple ***returnValue)
+{
+ if (!returnValueSize || !returnValue)
+ return E_INVALIDARG;
+ *returnValueSize = 0;
+ *returnValue = nullptr;
+
+ QList<IIRawElementProviderSimple *> rawProviderList;
+
+ for (auto elementId : qAsConst(elementIds)) {
+ IIRawElementProviderSimple *rawProvider;
+ if (SUCCEEDED(rawProviderForAccessibleId(elementId, &rawProvider)))
+ rawProviderList.append(rawProvider);
+ }
+
+ if (rawProviderList.size() == 0)
+ return S_OK;
+
+ *returnValue = static_cast<IIRawElementProviderSimple **>(CoTaskMemAlloc(rawProviderList.size() * sizeof(IIRawElementProviderSimple *)));
+ if (!*returnValue) {
+ for (auto rawProvider : qAsConst(rawProviderList))
+ rawProvider->Release();
+ return E_OUTOFMEMORY;
+ }
+
+ int index = 0;
+ for (auto rawProvider : qAsConst(rawProviderList))
+ (*returnValue)[index++] = rawProvider;
+ *returnValueSize = rawProviderList.size();
+ return S_OK;
+}
+
+void QWinRTUiaMainProvider::notifyFocusChange(QAccessibleEvent *event)
+{
+ if (QAccessibleInterface *accessible = event->accessibleInterface()) {
+ QAccessible::Id accid = idForAccessible(accessible);
+ QWinRTUiaMetadataCache::instance()->load(accid);
+ QEventDispatcherWinRT::runOnXamlThread([accid]() {
+ if (ComPtr<QWinRTUiaMainProvider> provider = providerForAccessibleId(accid)) {
+ ComPtr<IAutomationPeer> automationPeer;
+ if (SUCCEEDED(provider->QueryInterface(IID_PPV_ARGS(&automationPeer)))) {
+ automationPeer->RaiseAutomationEvent(AutomationEvents_AutomationFocusChanged);
+ }
+ }
+ return S_OK;
+ }, false);
+ }
+}
+
+void QWinRTUiaMainProvider::notifyStateChange(QAccessibleStateChangeEvent *event)
+{
+ if (QAccessibleInterface *accessible = event->accessibleInterface()) {
+ QAccessible::Id accid = idForAccessible(accessible);
+ QWinRTUiaMetadataCache::instance()->load(accid);
+
+ if (event->changedStates().checked || event->changedStates().checkStateMixed) {
+ // Notifies states changes in checkboxes.
+ if (accessible->role() == QAccessible::CheckBox) {
+ QEventDispatcherWinRT::runOnXamlThread([accid]() {
+ if (ComPtr<QWinRTUiaMainProvider> provider = providerForAccessibleId(accid)) {
+ ComPtr<IAutomationPeer> automationPeer;
+ if (SUCCEEDED(provider->QueryInterface(IID_PPV_ARGS(&automationPeer)))) {
+ ComPtr<ITogglePatternIdentifiersStatics> toggleStatics;
+ if (SUCCEEDED(RoGetActivationFactory(HString::MakeReference(RuntimeClass_Windows_UI_Xaml_Automation_TogglePatternIdentifiers).Get(), IID_PPV_ARGS(&toggleStatics)))) {
+ ComPtr<IAutomationProperty> toggleStateProperty;
+ if (SUCCEEDED(toggleStatics->get_ToggleStateProperty(&toggleStateProperty))) {
+ ComPtr<QWinRTUiaEmptyPropertyValue> emptyValue = Make<QWinRTUiaEmptyPropertyValue>();
+ // by sending an event with an empty value we force ui automation to refresh its state
+ automationPeer->RaisePropertyChangedEvent(toggleStateProperty.Get(), emptyValue.Get(), emptyValue.Get());
+ }
+ }
+ }
+ }
+ return S_OK;
+ }, false);
+ }
+ }
+ if (event->changedStates().active) {
+ if (accessible->role() == QAccessible::Window) {
+ // Notifies window opened/closed.
+ bool active = accessible->state().active;
+ QEventDispatcherWinRT::runOnXamlThread([accid, active]() {
+ if (ComPtr<QWinRTUiaMainProvider> provider = providerForAccessibleId(accid)) {
+ ComPtr<IAutomationPeer> automationPeer;
+ if (SUCCEEDED(provider->QueryInterface(IID_PPV_ARGS(&automationPeer)))) {
+ if (active) {
+ automationPeer->RaiseAutomationEvent(AutomationEvents_WindowOpened);
+ } else {
+ automationPeer->RaiseAutomationEvent(AutomationEvents_WindowClosed);
+ }
+ }
+ }
+ return S_OK;
+ }, false);
+ }
+ }
+ }
+}
+
+void QWinRTUiaMainProvider::notifyValueChange(QAccessibleValueChangeEvent *event)
+{
+ if (QAccessibleInterface *accessible = event->accessibleInterface()) {
+ QAccessible::Id accid = idForAccessible(accessible);
+ QWinRTUiaMetadataCache::instance()->load(accid);
+ if (QAccessibleValueInterface *valueInterface = accessible->valueInterface()) {
+ // Notifies changes in values of controls supporting the value interface.
+ double value = valueInterface->currentValue().toDouble();
+ QEventDispatcherWinRT::runOnXamlThread([accid, value]() {
+ // For some reason RaisePropertyChangedEvent() does not seem to be
+ // forwarding notifications for any property types except empty,
+ // which would do nothing here. ToDo: find a workaround.
+ return S_OK;
+ }, false);
+ }
+ }
+}
+
+// Notifies changes in text content and selection state of text controls.
+void QWinRTUiaMainProvider::notifyTextChange(QAccessibleEvent *event)
+{
+ if (QAccessibleInterface *accessible = event->accessibleInterface()) {
+ QAccessible::Id accid = idForAccessible(accessible);
+ QWinRTUiaMetadataCache::instance()->load(accid);
+ bool readOnly = accessible->state().readOnly;
+ QAccessible::Event eventType = event->type();
+ if (accessible->textInterface()) {
+ QEventDispatcherWinRT::runOnXamlThread([accid, eventType, readOnly]() {
+ if (ComPtr<QWinRTUiaMainProvider> provider = providerForAccessibleId(accid)) {
+ ComPtr<IAutomationPeer> automationPeer;
+ if (SUCCEEDED(provider->QueryInterface(IID_PPV_ARGS(&automationPeer)))) {
+ if (eventType == QAccessible::TextSelectionChanged) {
+ automationPeer->RaiseAutomationEvent(AutomationEvents_TextPatternOnTextSelectionChanged);
+ } else if (eventType == QAccessible::TextCaretMoved) {
+ if (!readOnly) {
+ automationPeer->RaiseAutomationEvent(AutomationEvents_TextPatternOnTextSelectionChanged);
+ }
+ } else {
+ automationPeer->RaiseAutomationEvent(AutomationEvents_TextPatternOnTextChanged);
+ }
+ }
+ }
+ return S_OK;
+ }, false);
+ }
+ }
+}
+
+// Return providers for specific control patterns
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::GetPatternCore(PatternInterface patternInterface, IInspectable **returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__ << patternInterface;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ *returnValue = nullptr;
+
+ QAccessibleInterface *accessible = accessibleInterface();
+ if (!accessible)
+ return E_FAIL;
+
+ switch (patternInterface) {
+ case PatternInterface_Text:
+ case PatternInterface_Text2: {
+ // All text controls.
+ if (accessible->textInterface()) {
+ ComPtr<QWinRTUiaTextProvider> provider = Make<QWinRTUiaTextProvider>(id());
+ return provider.CopyTo(returnValue);
+ }
+ break;
+ }
+ case PatternInterface_Value: {
+ // All accessible controls return text(QAccessible::Value) (which may be empty).
+ ComPtr<QWinRTUiaValueProvider> provider = Make<QWinRTUiaValueProvider>(id());
+ return provider.CopyTo(returnValue);
+ }
+ case PatternInterface_RangeValue: {
+ // Controls providing a numeric value within a range (e.g., sliders, scroll bars, dials).
+ if (accessible->valueInterface()) {
+ ComPtr<QWinRTUiaRangeValueProvider> provider = Make<QWinRTUiaRangeValueProvider>(id());
+ return provider.CopyTo(returnValue);
+ }
+ break;
+ }
+ case PatternInterface_Toggle: {
+ // Checkbox controls.
+ if (accessible->role() == QAccessible::CheckBox) {
+ ComPtr<QWinRTUiaToggleProvider> provider = Make<QWinRTUiaToggleProvider>(id());
+ return provider.CopyTo(returnValue);
+ }
+ break;
+ }
+ case PatternInterface_Selection: {
+ // Lists of items.
+ if (accessible->role() == QAccessible::List) {
+ ComPtr<QWinRTUiaSelectionProvider> provider = Make<QWinRTUiaSelectionProvider>(id());
+ return provider.CopyTo(returnValue);
+ }
+ break;
+ }
+ case PatternInterface_SelectionItem: {
+ // Items within a list and radio buttons.
+ if ((accessible->role() == QAccessible::RadioButton)
+ || (accessible->role() == QAccessible::ListItem)) {
+ ComPtr<QWinRTUiaSelectionItemProvider> provider = Make<QWinRTUiaSelectionItemProvider>(id());
+ return provider.CopyTo(returnValue);
+ }
+ break;
+ }
+ case PatternInterface_Table: {
+ // Table/tree.
+ if (accessible->tableInterface()
+ && ((accessible->role() == QAccessible::Table) || (accessible->role() == QAccessible::Tree))) {
+ ComPtr<QWinRTUiaTableProvider> provider = Make<QWinRTUiaTableProvider>(id());
+ return provider.CopyTo(returnValue);
+ }
+ break;
+ }
+ case PatternInterface_TableItem: {
+ // Item within a table/tree.
+ if (accessible->tableCellInterface()
+ && ((accessible->role() == QAccessible::Cell) || (accessible->role() == QAccessible::TreeItem))) {
+ ComPtr<QWinRTUiaTableItemProvider> provider = Make<QWinRTUiaTableItemProvider>(id());
+ return provider.CopyTo(returnValue);
+ }
+ break;
+ }
+ case PatternInterface_Grid: {
+ // Table/tree.
+ if (accessible->tableInterface()
+ && ((accessible->role() == QAccessible::Table) || (accessible->role() == QAccessible::Tree))) {
+ ComPtr<QWinRTUiaGridProvider> provider = Make<QWinRTUiaGridProvider>(id());
+ return provider.CopyTo(returnValue);
+ }
+ break;
+ }
+ case PatternInterface_GridItem: {
+ // Item within a table/tree.
+ if (accessible->tableCellInterface()
+ && ((accessible->role() == QAccessible::Cell) || (accessible->role() == QAccessible::TreeItem))) {
+ ComPtr<QWinRTUiaGridItemProvider> provider = Make<QWinRTUiaGridItemProvider>(id());
+ return provider.CopyTo(returnValue);
+ }
+ break;
+ }
+ case PatternInterface_Invoke: {
+ // Things that have an invokable action (e.g., simple buttons).
+ if (accessible->actionInterface()) {
+ ComPtr<QWinRTUiaInvokeProvider> provider = Make<QWinRTUiaInvokeProvider>(id());
+ return provider.CopyTo(returnValue);
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::GetAcceleratorKeyCore(HSTRING *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ return qHString(metadata->accelerator(), returnValue);
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::GetAccessKeyCore(HSTRING *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ return qHString(metadata->access(), returnValue);
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::GetAutomationControlTypeCore(AutomationControlType *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ *returnValue = roleToControlType(metadata->role());
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::GetAutomationIdCore(HSTRING *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ return qHString(metadata->automationId(), returnValue);
+}
+
+// Returns the bounding rectangle for the accessible control.
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::GetBoundingRectangleCore(ABI::Windows::Foundation::Rect *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+
+ QRect rect = metadata->boundingRect();
+ returnValue->X = rect.x();
+ returnValue->Y = rect.y();
+ returnValue->Width = rect.width();
+ returnValue->Height = rect.height();
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::GetChildrenCore(IVector<AutomationPeer *> **returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ *returnValue = nullptr;
+
+ auto accid = id();
+ auto children = QSharedPointer<QList<QAccessible::Id>>(new QList<QAccessible::Id>);
+ auto ptrChildren = new QSharedPointer<QList<QAccessible::Id>>(children);
+
+ if (!SUCCEEDED(QEventDispatcherWinRT::runOnMainThread([accid, ptrChildren]() {
+ if (QAccessibleInterface *accessible = accessibleForId(accid)) {
+ int childCount = accessible->childCount();
+ for (int i = 0; i < childCount; ++i) {
+ if (QAccessibleInterface *childAcc = accessible->child(i)) {
+ QAccessible::Id childId = idForAccessible(childAcc);
+ QWinRTUiaMetadataCache::instance()->load(childId);
+ (*ptrChildren)->append(childId);
+ }
+ }
+ }
+ delete ptrChildren;
+ return S_OK;
+ }))) {
+ return E_FAIL;
+ }
+
+ ComPtr<IVector<AutomationPeer *>> peerVector = Make<QWinRTUiaPeerVector>();
+
+ for (auto childId : qAsConst(*children)) {
+ if (ComPtr<QWinRTUiaMainProvider> provider = providerForAccessibleId(childId)) {
+ IAutomationPeer *peer;
+ if (SUCCEEDED(provider.CopyTo(&peer)))
+ peerVector->Append(peer);
+ }
+ }
+ return peerVector.CopyTo(returnValue);
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::GetClassNameCore(HSTRING *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ return qHString(metadata->className(), returnValue);
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::GetClickablePointCore(ABI::Windows::Foundation::Point *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::GetHelpTextCore(HSTRING *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ return qHString(metadata->help(), returnValue);
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::GetItemStatusCore(HSTRING *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::GetItemTypeCore(HSTRING *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::GetLabeledByCore(IAutomationPeer **returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::GetLocalizedControlTypeCore(HSTRING *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::GetNameCore(HSTRING *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ return qHString(metadata->controlName(), returnValue);
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::GetOrientationCore(AutomationOrientation *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ *returnValue = AutomationOrientation_None;
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::HasKeyboardFocusCore(boolean *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ *returnValue = (metadata->state().focused != 0);
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::IsContentElementCore(boolean *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ *returnValue = true;
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::IsControlElementCore(boolean *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ *returnValue = true;
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::IsEnabledCore(boolean *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ *returnValue = (metadata->state().disabled == 0);
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::IsKeyboardFocusableCore(boolean *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ *returnValue = (metadata->state().focusable != 0);
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::IsOffscreenCore(boolean *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ *returnValue = false;
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::IsPasswordCore(boolean *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ *returnValue = (metadata->role() == QAccessible::EditableText) && (metadata->state().passwordEdit != 0);
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::IsRequiredForFormCore(boolean *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ *returnValue = false;
+ return S_OK;
+}
+
+// Sets focus to the control.
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::SetFocusCore()
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ QAccessibleInterface *accessible = accessibleInterface();
+ if (!accessible)
+ return E_FAIL;
+
+ QAccessibleActionInterface *actionInterface = accessible->actionInterface();
+ if (!actionInterface)
+ return E_FAIL;
+
+ QEventDispatcherWinRT::runOnMainThread([actionInterface]() {
+ actionInterface->doAction(QAccessibleActionInterface::setFocusAction());
+ return S_OK;
+ });
+ return S_OK;
+}
+
+// Returns a provider for the UI element present at the specified screen coordinates.
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::GetPeerFromPointCore(ABI::Windows::Foundation::Point point, IAutomationPeer **returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ *returnValue = nullptr;
+
+ // Scale coordinates from High DPI screens?
+
+ auto accid = id();
+ auto elementId = QSharedPointer<QAccessible::Id>(new QAccessible::Id(0));
+ auto ptrElementId = new QSharedPointer<QAccessible::Id>(elementId);
+
+ if (!SUCCEEDED(QEventDispatcherWinRT::runOnMainThread([accid, ptrElementId, point]() {
+ // Controls can be embedded within grouping elements. By default returns the innermost control.
+ QAccessibleInterface *target = accessibleForId(accid);
+ while (QAccessibleInterface *tmpacc = target->childAt(point.X, point.Y)) {
+ target = tmpacc;
+ // For accessibility tools it may be better to return the text element instead of its subcomponents.
+ if (target->textInterface()) break;
+ }
+ **ptrElementId = idForAccessible(target);
+ QWinRTUiaMetadataCache::instance()->load(**ptrElementId);
+ delete ptrElementId;
+ return S_OK;
+ }))) {
+ return E_FAIL;
+ }
+
+ if (ComPtr<QWinRTUiaMainProvider> provider = providerForAccessibleId(*elementId))
+ return provider.CopyTo(returnValue);
+ return E_FAIL;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaMainProvider::GetLiveSettingCore(AutomationLiveSetting *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ return E_NOTIMPL;
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
+
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiamainprovider.h b/src/plugins/platforms/winrt/uiautomation/qwinrtuiamainprovider.h
new file mode 100644
index 0000000000..3ae9d2759e
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiamainprovider.h
@@ -0,0 +1,124 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINRTUIAMAINPROVIDER_H
+#define QWINRTUIAMAINPROVIDER_H
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiabaseprovider.h"
+
+#include <QtCore/qglobal.h>
+#include <QtCore/QPointer>
+#include <QtCore/QSharedPointer>
+#include <QtGui/QAccessible>
+#include <QtGui/QAccessibleInterface>
+
+#include <wrl.h>
+#include <windows.ui.xaml.h>
+
+QT_BEGIN_NAMESPACE
+
+// The main WinRT UI Automation class.
+class QWinRTUiaMainProvider:
+ public QWinRTUiaBaseProvider,
+ public Microsoft::WRL::RuntimeClass<ABI::Windows::UI::Xaml::Automation::Peers::IAutomationPeerOverrides>
+{
+ Q_OBJECT
+ Q_DISABLE_COPY(QWinRTUiaMainProvider)
+
+public:
+ explicit QWinRTUiaMainProvider(QAccessible::Id id);
+ virtual ~QWinRTUiaMainProvider();
+ static QWinRTUiaMainProvider *providerForAccessibleId(QAccessible::Id id);
+ static HRESULT rawProviderForAccessibleId(QAccessible::Id elementId, ABI::Windows::UI::Xaml::Automation::Provider::IIRawElementProviderSimple **returnValue);
+ static HRESULT rawProviderArrayForAccessibleIdList(const QList<QAccessible::Id> &elementIds, UINT32 *returnValueSize, ABI::Windows::UI::Xaml::Automation::Provider::IIRawElementProviderSimple ***returnValue);
+ static void notifyFocusChange(QAccessibleEvent *event);
+ static void notifyStateChange(QAccessibleStateChangeEvent *event);
+ static void notifyValueChange(QAccessibleValueChangeEvent *event);
+ static void notifyTextChange(QAccessibleEvent *event);
+
+ // IUnknown
+ HRESULT STDMETHODCALLTYPE QueryInterface(REFIID id, LPVOID *iface) override;
+
+ // IInspectable
+ HRESULT STDMETHODCALLTYPE GetIids(ULONG *iidCount, IID **iids) override;
+ HRESULT STDMETHODCALLTYPE GetRuntimeClassName(HSTRING *className) override;
+ HRESULT STDMETHODCALLTYPE GetTrustLevel(TrustLevel *trustLevel) override;
+
+ // IAutomationPeerOverrides
+ HRESULT STDMETHODCALLTYPE GetPatternCore(ABI::Windows::UI::Xaml::Automation::Peers::PatternInterface patternInterface, IInspectable **returnValue) override;
+ HRESULT STDMETHODCALLTYPE GetAcceleratorKeyCore(HSTRING *returnValue) override;
+ HRESULT STDMETHODCALLTYPE GetAccessKeyCore(HSTRING *returnValue) override;
+ HRESULT STDMETHODCALLTYPE GetAutomationControlTypeCore(ABI::Windows::UI::Xaml::Automation::Peers::AutomationControlType *returnValue) override;
+ HRESULT STDMETHODCALLTYPE GetAutomationIdCore(HSTRING *returnValue) override;
+ HRESULT STDMETHODCALLTYPE GetBoundingRectangleCore(ABI::Windows::Foundation::Rect *returnValue) override;
+ HRESULT STDMETHODCALLTYPE GetChildrenCore(ABI::Windows::Foundation::Collections::IVector<ABI::Windows::UI::Xaml::Automation::Peers::AutomationPeer*> **returnValue) override;
+ HRESULT STDMETHODCALLTYPE GetClassNameCore(HSTRING *returnValue) override;
+ HRESULT STDMETHODCALLTYPE GetClickablePointCore(ABI::Windows::Foundation::Point *returnValue) override;
+ HRESULT STDMETHODCALLTYPE GetHelpTextCore(HSTRING *returnValue) override;
+ HRESULT STDMETHODCALLTYPE GetItemStatusCore(HSTRING *returnValue) override;
+ HRESULT STDMETHODCALLTYPE GetItemTypeCore(HSTRING *returnValue) override;
+ HRESULT STDMETHODCALLTYPE GetLabeledByCore(ABI::Windows::UI::Xaml::Automation::Peers::IAutomationPeer **returnValue) override;
+ HRESULT STDMETHODCALLTYPE GetLocalizedControlTypeCore(HSTRING *returnValue) override;
+ HRESULT STDMETHODCALLTYPE GetNameCore(HSTRING *returnValue) override;
+ HRESULT STDMETHODCALLTYPE GetOrientationCore(ABI::Windows::UI::Xaml::Automation::Peers::AutomationOrientation *returnValue) override;
+ HRESULT STDMETHODCALLTYPE HasKeyboardFocusCore(boolean *returnValue) override;
+ HRESULT STDMETHODCALLTYPE IsContentElementCore(boolean *returnValue) override;
+ HRESULT STDMETHODCALLTYPE IsControlElementCore(boolean *returnValue) override;
+ HRESULT STDMETHODCALLTYPE IsEnabledCore(boolean *returnValue) override;
+ HRESULT STDMETHODCALLTYPE IsKeyboardFocusableCore(boolean *returnValue) override;
+ HRESULT STDMETHODCALLTYPE IsOffscreenCore(boolean *returnValue) override;
+ HRESULT STDMETHODCALLTYPE IsPasswordCore(boolean *returnValue) override;
+ HRESULT STDMETHODCALLTYPE IsRequiredForFormCore(boolean *returnValue) override;
+ HRESULT STDMETHODCALLTYPE SetFocusCore() override;
+ HRESULT STDMETHODCALLTYPE GetPeerFromPointCore(ABI::Windows::Foundation::Point point, ABI::Windows::UI::Xaml::Automation::Peers::IAutomationPeer **returnValue) override;
+ HRESULT STDMETHODCALLTYPE GetLiveSettingCore(ABI::Windows::UI::Xaml::Automation::Peers::AutomationLiveSetting *returnValue) override;
+
+private:
+ Microsoft::WRL::ComPtr<ABI::Windows::UI::Xaml::Automation::Peers::IAutomationPeerOverrides> m_base;
+ Microsoft::WRL::ComPtr<ABI::Windows::UI::Xaml::Automation::Peers::IAutomationPeer> m_core;
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
+
+#endif // QWINRTUIAMAINPROVIDER_H
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiametadatacache.cpp b/src/plugins/platforms/winrt/uiautomation/qwinrtuiametadatacache.cpp
new file mode 100644
index 0000000000..442ff184a8
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiametadatacache.cpp
@@ -0,0 +1,112 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiametadatacache.h"
+#include "qwinrtuiautils.h"
+
+#include <QtCore/QLoggingCategory>
+#include <QtCore/private/qeventdispatcher_winrt_p.h>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QWinRTUiAutomation;
+
+// Private constructor
+QWinRTUiaMetadataCache::QWinRTUiaMetadataCache()
+{
+}
+
+// shared instance
+QWinRTUiaMetadataCache *QWinRTUiaMetadataCache::instance()
+{
+ static QWinRTUiaMetadataCache metadataCache;
+ return &metadataCache;
+}
+
+// Returns the cached metadata associated with the ID, or an instance with default values.
+QSharedPointer<QWinRTUiaControlMetadata> QWinRTUiaMetadataCache::metadataForId(QAccessible::Id id)
+{
+ QSharedPointer<QWinRTUiaControlMetadata> metadata;
+
+ m_mutex.lock();
+ if (m_metadataTable.contains(id))
+ metadata = m_metadataTable[id];
+ else
+ metadata = QSharedPointer<QWinRTUiaControlMetadata>(new QWinRTUiaControlMetadata);
+ m_mutex.unlock();
+ return metadata;
+}
+
+// Caches metadata from the accessibility framework within the main thread.
+bool QWinRTUiaMetadataCache::load(QAccessible::Id id)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!SUCCEEDED(QEventDispatcherWinRT::runOnMainThread([id]() {
+ QWinRTUiaMetadataCache::instance()->insert(id, QSharedPointer<QWinRTUiaControlMetadata>(new QWinRTUiaControlMetadata(id)));
+ return S_OK;
+ }))) {
+ return false;
+ }
+ return true;
+}
+
+// Inserts metadata in the cache and associates it with an accessibility ID.
+void QWinRTUiaMetadataCache::insert(QAccessible::Id id, const QSharedPointer<QWinRTUiaControlMetadata> &metadata)
+{
+ m_mutex.lock();
+ m_metadataTable[id] = metadata;
+ m_mutex.unlock();
+}
+
+// Removes metadata with a given id from the cache.
+void QWinRTUiaMetadataCache::remove(QAccessible::Id id)
+{
+ m_mutex.lock();
+ m_metadataTable.remove(id);
+ m_mutex.unlock();
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
+
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiametadatacache.h b/src/plugins/platforms/winrt/uiautomation/qwinrtuiametadatacache.h
new file mode 100644
index 0000000000..2d68d1b654
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiametadatacache.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINRTUIAMETADATACACHE_H
+#define QWINRTUIAMETADATACACHE_H
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiacontrolmetadata.h"
+
+#include <QtCore/QHash>
+#include <QtCore/QMutex>
+#include <QtGui/QAccessible>
+#include <QtGui/QAccessibleInterface>
+
+QT_BEGIN_NAMESPACE
+
+// Singleton used to cache metadata using the accessibility ID as the key.
+class QWinRTUiaMetadataCache : public QObject
+{
+ QWinRTUiaMetadataCache();
+ Q_OBJECT
+public:
+ static QWinRTUiaMetadataCache *instance();
+ QSharedPointer<QWinRTUiaControlMetadata> metadataForId(QAccessible::Id id);
+ void insert(QAccessible::Id id, const QSharedPointer<QWinRTUiaControlMetadata> &metadata);
+ void remove(QAccessible::Id id);
+ bool load(QAccessible::Id id);
+
+private:
+ QHash<QAccessible::Id, QSharedPointer<QWinRTUiaControlMetadata>> m_metadataTable;
+ QMutex m_mutex;
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
+
+#endif // QWINRTUIAMETADATACACHE_H
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiapeervector.cpp b/src/plugins/platforms/winrt/uiautomation/qwinrtuiapeervector.cpp
new file mode 100644
index 0000000000..e3d6bcae4b
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiapeervector.cpp
@@ -0,0 +1,149 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiapeervector.h"
+#include "qwinrtuiautils.h"
+
+using namespace ABI::Windows::UI::Xaml::Automation::Peers;
+using namespace ABI::Windows::Foundation::Collections;
+
+QT_BEGIN_NAMESPACE
+
+HRESULT QWinRTUiaPeerVector::GetAt(quint32 index, IAutomationPeer **item)
+{
+ if (index >= quint32(m_impl.size()))
+ return E_FAIL;
+ if ((*item = m_impl.at(index)))
+ (*item)->AddRef();
+ return S_OK;
+}
+
+HRESULT QWinRTUiaPeerVector::get_Size(quint32 *size)
+{
+ *size = m_impl.size();
+ return S_OK;
+}
+
+HRESULT QWinRTUiaPeerVector::GetView(IVectorView<AutomationPeer *> **view)
+{
+ *view = nullptr;
+ return E_NOTIMPL;
+}
+
+HRESULT QWinRTUiaPeerVector::IndexOf(IAutomationPeer *value, quint32 *index, boolean *found)
+{
+ int idx = m_impl.indexOf(value);
+ if (idx > -1) {
+ *index = quint32(idx);
+ *found = true;
+ } else {
+ *found = false;
+ }
+ return S_OK;
+}
+
+HRESULT QWinRTUiaPeerVector::SetAt(quint32 index, IAutomationPeer *item)
+{
+ if (index >= quint32(m_impl.size()))
+ return E_FAIL;
+ if (IAutomationPeer *elem = m_impl.at(index)) {
+ if (elem == item)
+ return S_OK;
+ else
+ elem->Release();
+ }
+ if (item)
+ item->AddRef();
+ m_impl[index] = item;
+ return S_OK;
+}
+
+HRESULT QWinRTUiaPeerVector::InsertAt(quint32 index, IAutomationPeer *item)
+{
+ if (index >= quint32(m_impl.size()))
+ return E_FAIL;
+ if (item)
+ item->AddRef();
+ m_impl.insert(index, item);
+ return S_OK;
+}
+
+HRESULT QWinRTUiaPeerVector::RemoveAt(quint32 index)
+{
+ if (index >= quint32(m_impl.size()))
+ return E_FAIL;
+ if (IAutomationPeer *elem = m_impl.at(index))
+ elem->Release();
+ m_impl.remove(index);
+ return S_OK;
+}
+
+HRESULT QWinRTUiaPeerVector::Append(IAutomationPeer *item)
+{
+ if (item)
+ item->AddRef();
+ m_impl.append(item);
+ return S_OK;
+}
+
+HRESULT QWinRTUiaPeerVector::RemoveAtEnd()
+{
+ if (m_impl.size() == 0)
+ return E_FAIL;
+ if (IAutomationPeer *elem = m_impl.last())
+ elem->Release();
+ m_impl.removeLast();
+ return S_OK;
+}
+
+HRESULT QWinRTUiaPeerVector::Clear()
+{
+ for (auto elem : qAsConst(m_impl))
+ if (elem)
+ elem->Release();
+ m_impl.clear();
+ return S_OK;
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiapeervector.h b/src/plugins/platforms/winrt/uiautomation/qwinrtuiapeervector.h
new file mode 100644
index 0000000000..265526de09
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiapeervector.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINRTUIAPEERVECTOR_H
+#define QWINRTUIAPEERVECTOR_H
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include <QtCore/QString>
+#include <QtCore/qt_windows.h>
+#include <QtGui/QAccessible>
+#include <QtGui/QAccessibleInterface>
+#include <QtGui/QWindow>
+#include <QVector>
+
+#include <wrl.h>
+#include <windows.ui.xaml.h>
+
+QT_BEGIN_NAMESPACE
+
+// Implements IVector<AutomationPeer *>
+class QWinRTUiaPeerVector : public Microsoft::WRL::RuntimeClass<ABI::Windows::Foundation::Collections::IVector<ABI::Windows::UI::Xaml::Automation::Peers::AutomationPeer *>>
+{
+public:
+ HRESULT STDMETHODCALLTYPE GetAt(quint32 index, ABI::Windows::UI::Xaml::Automation::Peers::IAutomationPeer **item) override;
+ HRESULT STDMETHODCALLTYPE get_Size(quint32 *size) override;
+ HRESULT STDMETHODCALLTYPE GetView(ABI::Windows::Foundation::Collections::IVectorView<ABI::Windows::UI::Xaml::Automation::Peers::AutomationPeer *> **view) override;
+ HRESULT STDMETHODCALLTYPE IndexOf(ABI::Windows::UI::Xaml::Automation::Peers::IAutomationPeer *value, quint32 *index, boolean *found) override;
+ HRESULT STDMETHODCALLTYPE SetAt(quint32 index, ABI::Windows::UI::Xaml::Automation::Peers::IAutomationPeer *item) override;
+ HRESULT STDMETHODCALLTYPE InsertAt(quint32 index, ABI::Windows::UI::Xaml::Automation::Peers::IAutomationPeer *item) override;
+ HRESULT STDMETHODCALLTYPE RemoveAt(quint32 index) override;
+ HRESULT STDMETHODCALLTYPE Append(ABI::Windows::UI::Xaml::Automation::Peers::IAutomationPeer *item) override;
+ HRESULT STDMETHODCALLTYPE RemoveAtEnd() override;
+ HRESULT STDMETHODCALLTYPE Clear() override;
+private:
+ QVector<ABI::Windows::UI::Xaml::Automation::Peers::IAutomationPeer *> m_impl;
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
+
+#endif // QWINRTUIAPEERVECTOR_H
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiaprovidercache.cpp b/src/plugins/platforms/winrt/uiautomation/qwinrtuiaprovidercache.cpp
new file mode 100644
index 0000000000..06ff094c45
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiaprovidercache.cpp
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiaprovidercache.h"
+
+QT_BEGIN_NAMESPACE
+
+// Private constructor
+QWinRTUiaProviderCache::QWinRTUiaProviderCache()
+{
+}
+
+// shared instance
+QWinRTUiaProviderCache *QWinRTUiaProviderCache::instance()
+{
+ static QWinRTUiaProviderCache providerCache;
+ return &providerCache;
+}
+
+// Returns the provider instance associated with the ID, or nullptr.
+QWinRTUiaBaseProvider *QWinRTUiaProviderCache::providerForId(QAccessible::Id id) const
+{
+ return m_providerTable.value(id);
+}
+
+// Inserts a provider in the cache and associates it with an accessibility ID.
+void QWinRTUiaProviderCache::insert(QAccessible::Id id, QWinRTUiaBaseProvider *provider)
+{
+ remove(id);
+ if (provider) {
+ m_providerTable[id] = provider;
+ m_inverseTable[provider] = id;
+ // Connects the destroyed signal to our slot, to remove deleted objects from the cache.
+ QObject::connect(provider, &QObject::destroyed, this, &QWinRTUiaProviderCache::objectDestroyed);
+ }
+}
+
+// Removes deleted provider objects from the cache.
+void QWinRTUiaProviderCache::objectDestroyed(QObject *obj)
+{
+ // We have to use the inverse table to map the object address back to its ID,
+ // since at this point (called from QObject destructor), it has already been
+ // partially destroyed and we cannot treat it as a provider.
+ auto it = m_inverseTable.find(obj);
+ if (it != m_inverseTable.end()) {
+ m_providerTable.remove(*it);
+ m_inverseTable.remove(obj);
+ }
+}
+
+// Removes a provider with a given id from the cache.
+void QWinRTUiaProviderCache::remove(QAccessible::Id id)
+{
+ m_inverseTable.remove(m_providerTable.value(id));
+ m_providerTable.remove(id);
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiaprovidercache.h b/src/plugins/platforms/winrt/uiautomation/qwinrtuiaprovidercache.h
new file mode 100644
index 0000000000..393ef7d562
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiaprovidercache.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINRTUIAPROVIDERCACHE_H
+#define QWINRTUIAPROVIDERCACHE_H
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiabaseprovider.h"
+
+#include <QtCore/QHash>
+#include <QtGui/QAccessible>
+#include <QtGui/QAccessibleInterface>
+
+QT_BEGIN_NAMESPACE
+
+// Singleton used to cache provider instances using the accessibility ID as the key.
+class QWinRTUiaProviderCache : public QObject
+{
+ QWinRTUiaProviderCache();
+ Q_OBJECT
+public:
+ static QWinRTUiaProviderCache *instance();
+ QWinRTUiaBaseProvider *providerForId(QAccessible::Id id) const;
+ void insert(QAccessible::Id id, QWinRTUiaBaseProvider *provider);
+ void remove(QAccessible::Id id);
+
+private Q_SLOTS:
+ void objectDestroyed(QObject *obj);
+
+private:
+ QHash<QAccessible::Id, QWinRTUiaBaseProvider *> m_providerTable;
+ QHash<QObject *, QAccessible::Id> m_inverseTable;
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
+
+#endif // QWINRTUIAPROVIDERCACHE_H
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiarangevalueprovider.cpp b/src/plugins/platforms/winrt/uiautomation/qwinrtuiarangevalueprovider.cpp
new file mode 100644
index 0000000000..4ac59c890a
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiarangevalueprovider.cpp
@@ -0,0 +1,167 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiarangevalueprovider.h"
+#include "qwinrtuiametadatacache.h"
+#include "qwinrtuiautils.h"
+
+#include <QtGui/QAccessible>
+#include <QtGui/QAccessibleInterface>
+#include <QtCore/QLoggingCategory>
+#include <QtCore/QString>
+#include <QtCore/private/qeventdispatcher_winrt_p.h>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QWinRTUiAutomation;
+using namespace ABI::Windows::UI::Xaml::Automation;
+using namespace ABI::Windows::UI::Xaml::Automation::Provider;
+
+QWinRTUiaRangeValueProvider::QWinRTUiaRangeValueProvider(QAccessible::Id id) :
+ QWinRTUiaBaseProvider(id)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+}
+
+QWinRTUiaRangeValueProvider::~QWinRTUiaRangeValueProvider()
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaRangeValueProvider::get_IsReadOnly(boolean *value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!value)
+ return E_INVALIDARG;
+
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ *value = (metadata->state().readOnly != 0);
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaRangeValueProvider::get_LargeChange(DOUBLE *value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!value)
+ return E_INVALIDARG;
+
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ *value = metadata->minimumStepSize();
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaRangeValueProvider::get_Maximum(DOUBLE *value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!value)
+ return E_INVALIDARG;
+
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ *value = metadata->maximumValue();
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaRangeValueProvider::get_Minimum(DOUBLE *value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!value)
+ return E_INVALIDARG;
+
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ *value = metadata->minimumValue();
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaRangeValueProvider::get_SmallChange(DOUBLE *value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!value)
+ return E_INVALIDARG;
+
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ *value = metadata->minimumStepSize();
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaRangeValueProvider::get_Value(DOUBLE *value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!value)
+ return E_INVALIDARG;
+
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ *value = metadata->currentValue();
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaRangeValueProvider::SetValue(DOUBLE value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ auto accid = id();
+
+ QEventDispatcherWinRT::runOnMainThread([accid, value]() {
+ if (QAccessibleInterface *accessible = accessibleForId(accid)) {
+ if (QAccessibleValueInterface *valueInterface = accessible->valueInterface()) {
+ double minimum = valueInterface->minimumValue().toDouble();
+ double maximum = valueInterface->maximumValue().toDouble();
+ if ((value >= minimum) && (value <= maximum)) {
+ valueInterface->setCurrentValue(QVariant(value));
+ }
+ }
+ }
+ QWinRTUiaMetadataCache::instance()->load(accid);
+ return S_OK;
+ }, 0);
+
+ return S_OK;
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiarangevalueprovider.h b/src/plugins/platforms/winrt/uiautomation/qwinrtuiarangevalueprovider.h
new file mode 100644
index 0000000000..4e98959526
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiarangevalueprovider.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINRTUIARANGEVALUEPROVIDER_H
+#define QWINRTUIARANGEVALUEPROVIDER_H
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiabaseprovider.h"
+
+#include <wrl.h>
+#include <windows.ui.xaml.h>
+
+QT_BEGIN_NAMESPACE
+
+// Implements the Range Value control pattern provider.
+class QWinRTUiaRangeValueProvider :
+ public QWinRTUiaBaseProvider,
+ public Microsoft::WRL::RuntimeClass<ABI::Windows::UI::Xaml::Automation::Provider::IRangeValueProvider>
+{
+ Q_OBJECT
+ Q_DISABLE_COPY(QWinRTUiaRangeValueProvider)
+ InspectableClass(L"QWinRTUiaRangeValueProvider", BaseTrust);
+
+public:
+ explicit QWinRTUiaRangeValueProvider(QAccessible::Id id);
+ virtual ~QWinRTUiaRangeValueProvider();
+
+ // IRangeValueProvider
+ HRESULT STDMETHODCALLTYPE get_IsReadOnly(boolean *value) override;
+ HRESULT STDMETHODCALLTYPE get_LargeChange(DOUBLE *value) override;
+ HRESULT STDMETHODCALLTYPE get_Maximum(DOUBLE *value) override;
+ HRESULT STDMETHODCALLTYPE get_Minimum(DOUBLE *value) override;
+ HRESULT STDMETHODCALLTYPE get_SmallChange(DOUBLE *value) override;
+ HRESULT STDMETHODCALLTYPE get_Value(DOUBLE *value) override;
+ HRESULT STDMETHODCALLTYPE SetValue(DOUBLE value) override;
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
+
+#endif // QWINRTUIARANGEVALUEPROVIDER_H
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiaselectionitemprovider.cpp b/src/plugins/platforms/winrt/uiautomation/qwinrtuiaselectionitemprovider.cpp
new file mode 100644
index 0000000000..9bc88272ba
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiaselectionitemprovider.cpp
@@ -0,0 +1,214 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiaselectionitemprovider.h"
+#include "qwinrtuiamainprovider.h"
+#include "qwinrtuiametadatacache.h"
+#include "qwinrtuiautils.h"
+
+#include <QtGui/QAccessible>
+#include <QtGui/QAccessibleInterface>
+#include <QtCore/QLoggingCategory>
+#include <QtCore/QString>
+#include <QtCore/private/qeventdispatcher_winrt_p.h>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QWinRTUiAutomation;
+using namespace ABI::Windows::UI::Xaml::Automation;
+using namespace ABI::Windows::UI::Xaml::Automation::Provider;
+using namespace ABI::Windows::UI::Xaml::Automation::Peers;
+
+QWinRTUiaSelectionItemProvider::QWinRTUiaSelectionItemProvider(QAccessible::Id id) :
+ QWinRTUiaBaseProvider(id)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+}
+
+QWinRTUiaSelectionItemProvider::~QWinRTUiaSelectionItemProvider()
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+}
+
+// Returns true if element is currently selected.
+HRESULT STDMETHODCALLTYPE QWinRTUiaSelectionItemProvider::get_IsSelected(boolean *value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!value)
+ return E_INVALIDARG;
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ if (metadata->role() == QAccessible::RadioButton)
+ *value = metadata->state().checked;
+ else
+ *value = metadata->state().selected;
+ return S_OK;
+}
+
+// Returns the provider for the container element (e.g., the list for the list item).
+HRESULT STDMETHODCALLTYPE QWinRTUiaSelectionItemProvider::get_SelectionContainer(IIRawElementProviderSimple **value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!value)
+ return E_INVALIDARG;
+ *value = nullptr;
+
+ auto accid = id();
+ auto elementId = QSharedPointer<QAccessible::Id>(new QAccessible::Id(0));
+ auto ptrElementId = new QSharedPointer<QAccessible::Id>(elementId);
+
+ if (!SUCCEEDED(QEventDispatcherWinRT::runOnMainThread([accid, ptrElementId]() {
+ if (QAccessibleInterface *accessible = accessibleForId(accid)) {
+ // Radio buttons do not require a container.
+ if (accessible->role() == QAccessible::ListItem) {
+ if (QAccessibleInterface *parent = accessible->parent()) {
+ if (parent->role() == QAccessible::List) {
+ **ptrElementId = idForAccessible(parent);
+ }
+ }
+ }
+ }
+ delete ptrElementId;
+ return S_OK;
+ }))) {
+ return E_FAIL;
+ }
+
+ if (!*elementId)
+ return S_OK;
+
+ return QWinRTUiaMainProvider::rawProviderForAccessibleId(*elementId, value);
+}
+
+// Adds the element to the list of selected elements.
+HRESULT STDMETHODCALLTYPE QWinRTUiaSelectionItemProvider::AddToSelection()
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ auto accid = id();
+
+ QEventDispatcherWinRT::runOnMainThread([accid]() {
+ if (QAccessibleInterface *accessible = accessibleForId(accid)) {
+ if (QAccessibleActionInterface *actionInterface = accessible->actionInterface()) {
+ if (accessible->role() == QAccessible::RadioButton) {
+ // For radio buttons we invoke the selection action.
+ actionInterface->doAction(QAccessibleActionInterface::pressAction());
+ } else {
+ // Toggle list item if not already selected.
+ if (!accessible->state().selected) {
+ actionInterface->doAction(QAccessibleActionInterface::toggleAction());
+ }
+ }
+ }
+ }
+ QWinRTUiaMetadataCache::instance()->load(accid);
+ return S_OK;
+ }, 0);
+ return S_OK;
+}
+
+// Removes a list item from selection.
+HRESULT STDMETHODCALLTYPE QWinRTUiaSelectionItemProvider::RemoveFromSelection()
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ auto accid = id();
+
+ QEventDispatcherWinRT::runOnMainThread([accid]() {
+ if (QAccessibleInterface *accessible = accessibleForId(accid)) {
+ if (QAccessibleActionInterface *actionInterface = accessible->actionInterface()) {
+ if (accessible->role() != QAccessible::RadioButton) {
+ if (accessible->state().selected) {
+ actionInterface->doAction(QAccessibleActionInterface::toggleAction());
+ }
+ }
+ }
+ }
+ QWinRTUiaMetadataCache::instance()->load(accid);
+ return S_OK;
+ }, 0);
+ return S_OK;
+}
+
+// Selects the element (deselecting all others).
+HRESULT STDMETHODCALLTYPE QWinRTUiaSelectionItemProvider::Select()
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ auto accid = id();
+
+ QEventDispatcherWinRT::runOnMainThread([accid]() {
+ if (QAccessibleInterface *accessible = accessibleForId(accid)) {
+ if (QAccessibleActionInterface *actionInterface = accessible->actionInterface()) {
+ if (accessible->role() == QAccessible::RadioButton) {
+ // For radio buttons we just invoke the selection action; others are automatically deselected.
+ actionInterface->doAction(QAccessibleActionInterface::pressAction());
+ } else {
+ // Toggle list item if not already selected. It must be done first to support all selection modes.
+ if (!accessible->state().selected) {
+ actionInterface->doAction(QAccessibleActionInterface::toggleAction());
+ }
+ // Toggle selected siblings.
+ if (QAccessibleInterface *parent = accessible->parent()) {
+ for (int i = 0; i < parent->childCount(); ++i) {
+ if (QAccessibleInterface *sibling = parent->child(i)) {
+ if ((sibling != accessible) && (sibling->state().selected)) {
+ if (QAccessibleActionInterface *siblingAction = sibling->actionInterface()) {
+ siblingAction->doAction(QAccessibleActionInterface::toggleAction());
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ QWinRTUiaMetadataCache::instance()->load(accid);
+ return S_OK;
+ }, 0);
+ return S_OK;
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiaselectionitemprovider.h b/src/plugins/platforms/winrt/uiautomation/qwinrtuiaselectionitemprovider.h
new file mode 100644
index 0000000000..1b3cce7495
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiaselectionitemprovider.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINRTUIASELECTIONITEMPROVIDER_H
+#define QWINRTUIASELECTIONITEMPROVIDER_H
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiabaseprovider.h"
+
+#include <wrl.h>
+#include <windows.ui.xaml.h>
+
+QT_BEGIN_NAMESPACE
+
+// Implements the Selection Item control pattern provider. Used for List items and radio buttons.
+class QWinRTUiaSelectionItemProvider :
+ public QWinRTUiaBaseProvider,
+ public Microsoft::WRL::RuntimeClass<ABI::Windows::UI::Xaml::Automation::Provider::ISelectionItemProvider>
+{
+ Q_OBJECT
+ Q_DISABLE_COPY(QWinRTUiaSelectionItemProvider)
+ InspectableClass(L"QWinRTUiaSelectionItemProvider", BaseTrust);
+
+public:
+ explicit QWinRTUiaSelectionItemProvider(QAccessible::Id id);
+ virtual ~QWinRTUiaSelectionItemProvider();
+
+ // ISelectionItemProvider
+ HRESULT STDMETHODCALLTYPE get_IsSelected(boolean *value) override;
+ HRESULT STDMETHODCALLTYPE get_SelectionContainer(ABI::Windows::UI::Xaml::Automation::Provider::IIRawElementProviderSimple **value) override;
+ HRESULT STDMETHODCALLTYPE AddToSelection() override;
+ HRESULT STDMETHODCALLTYPE RemoveFromSelection() override;
+ HRESULT STDMETHODCALLTYPE Select() override;
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
+
+#endif // QWINRTUIASELECTIONITEMPROVIDER_H
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiaselectionprovider.cpp b/src/plugins/platforms/winrt/uiautomation/qwinrtuiaselectionprovider.cpp
new file mode 100644
index 0000000000..9e61a8df61
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiaselectionprovider.cpp
@@ -0,0 +1,158 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiaselectionprovider.h"
+#include "qwinrtuiametadatacache.h"
+#include "qwinrtuiamainprovider.h"
+#include "qwinrtuiautils.h"
+
+#include <QtGui/QAccessible>
+#include <QtGui/QAccessibleInterface>
+#include <QtCore/QLoggingCategory>
+#include <QtCore/QString>
+#include <QtCore/private/qeventdispatcher_winrt_p.h>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QWinRTUiAutomation;
+using namespace ABI::Windows::UI::Xaml::Automation;
+using namespace ABI::Windows::UI::Xaml::Automation::Provider;
+using namespace ABI::Windows::UI::Xaml::Automation::Peers;
+
+QWinRTUiaSelectionProvider::QWinRTUiaSelectionProvider(QAccessible::Id id) :
+ QWinRTUiaBaseProvider(id)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+}
+
+QWinRTUiaSelectionProvider::~QWinRTUiaSelectionProvider()
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaSelectionProvider::get_CanSelectMultiple(boolean *value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!value)
+ return E_INVALIDARG;
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ *value = (metadata->state().multiSelectable != 0);
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaSelectionProvider::get_IsSelectionRequired(boolean *value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!value)
+ return E_INVALIDARG;
+ *value = false;
+
+ auto accid = id();
+ auto selectionRequired = QSharedPointer<bool>(new bool(false));
+ auto ptrSelectionRequired = new QSharedPointer<bool>(selectionRequired);
+
+ if (!SUCCEEDED(QEventDispatcherWinRT::runOnMainThread([accid, ptrSelectionRequired]() {
+ // Initially returns false if none are selected. After the first selection, it may be required.
+ bool anySelected = false;
+ if (QAccessibleInterface *accessible = accessibleForId(accid)) {
+ int childCount = accessible->childCount();
+ for (int i = 0; i < childCount; ++i) {
+ if (QAccessibleInterface *childAcc = accessible->child(i)) {
+ if (childAcc->state().selected) {
+ anySelected = true;
+ break;
+ }
+ }
+ }
+ **ptrSelectionRequired = anySelected && !accessible->state().multiSelectable && !accessible->state().extSelectable;
+ }
+ delete ptrSelectionRequired;
+ return S_OK;
+ }))) {
+ return E_FAIL;
+ }
+
+ *value = *selectionRequired;
+ return S_OK;
+}
+
+// Returns an array of providers with the selected items.
+HRESULT STDMETHODCALLTYPE QWinRTUiaSelectionProvider::GetSelection(UINT32 *returnValueSize, IIRawElementProviderSimple ***returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValueSize || !returnValue)
+ return E_INVALIDARG;
+ *returnValueSize = 0;
+ *returnValue = nullptr;
+
+ auto accid = id();
+ auto elementIds = QSharedPointer<QList<QAccessible::Id>>(new QList<QAccessible::Id>);
+ auto ptrElementIds = new QSharedPointer<QList<QAccessible::Id>>(elementIds);
+
+ if (!SUCCEEDED(QEventDispatcherWinRT::runOnMainThread([accid, ptrElementIds]() {
+ if (QAccessibleInterface *accessible = accessibleForId(accid)) {
+ int childCount = accessible->childCount();
+ for (int i = 0; i < childCount; ++i) {
+ if (QAccessibleInterface *childAcc = accessible->child(i)) {
+ if (childAcc->state().selected) {
+ QAccessible::Id childId = idForAccessible(childAcc);
+ QWinRTUiaMetadataCache::instance()->load(childId);
+ (*ptrElementIds)->append(childId);
+ }
+ }
+ }
+ }
+ delete ptrElementIds;
+ return S_OK;
+ }))) {
+ return E_FAIL;
+ }
+
+ return QWinRTUiaMainProvider::rawProviderArrayForAccessibleIdList(*elementIds, returnValueSize, returnValue);
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiaselectionprovider.h b/src/plugins/platforms/winrt/uiautomation/qwinrtuiaselectionprovider.h
new file mode 100644
index 0000000000..dcd286800f
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiaselectionprovider.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINRTUIASELECTIONPROVIDER_H
+#define QWINRTUIASELECTIONPROVIDER_H
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiabaseprovider.h"
+
+#include <wrl.h>
+#include <windows.ui.xaml.h>
+
+QT_BEGIN_NAMESPACE
+
+// Implements the Selection control pattern provider. Used for Lists.
+class QWinRTUiaSelectionProvider :
+ public QWinRTUiaBaseProvider,
+ public Microsoft::WRL::RuntimeClass<ABI::Windows::UI::Xaml::Automation::Provider::ISelectionProvider>
+{
+ Q_OBJECT
+ Q_DISABLE_COPY(QWinRTUiaSelectionProvider)
+ InspectableClass(L"QWinRTUiaSelectionProvider", BaseTrust);
+
+public:
+ explicit QWinRTUiaSelectionProvider(QAccessible::Id id);
+ virtual ~QWinRTUiaSelectionProvider();
+
+ // ISelectionProvider
+ HRESULT STDMETHODCALLTYPE get_CanSelectMultiple(boolean *value) override;
+ HRESULT STDMETHODCALLTYPE get_IsSelectionRequired(boolean *value) override;
+ HRESULT STDMETHODCALLTYPE GetSelection(UINT32 *returnValueSize, ABI::Windows::UI::Xaml::Automation::Provider::IIRawElementProviderSimple ***returnValue) override;
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
+
+#endif // QWINRTUIASELECTIONPROVIDER_H
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiatableitemprovider.cpp b/src/plugins/platforms/winrt/uiautomation/qwinrtuiatableitemprovider.cpp
new file mode 100644
index 0000000000..1af74a8b72
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiatableitemprovider.cpp
@@ -0,0 +1,141 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiatableitemprovider.h"
+#include "qwinrtuiamainprovider.h"
+#include "qwinrtuiametadatacache.h"
+#include "qwinrtuiautils.h"
+
+#include <QtGui/QAccessible>
+#include <QtGui/QAccessibleInterface>
+#include <QtCore/QLoggingCategory>
+#include <QtCore/QString>
+#include <QtCore/private/qeventdispatcher_winrt_p.h>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QWinRTUiAutomation;
+using namespace ABI::Windows::UI::Xaml::Automation;
+using namespace ABI::Windows::UI::Xaml::Automation::Provider;
+
+QWinRTUiaTableItemProvider::QWinRTUiaTableItemProvider(QAccessible::Id id) :
+ QWinRTUiaBaseProvider(id)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+}
+
+QWinRTUiaTableItemProvider::~QWinRTUiaTableItemProvider()
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+}
+
+// Returns the providers for the column headers associated with the item.
+HRESULT STDMETHODCALLTYPE QWinRTUiaTableItemProvider::GetColumnHeaderItems(UINT32 *returnValueSize, IIRawElementProviderSimple ***returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValueSize || !returnValue)
+ return E_INVALIDARG;
+ *returnValueSize = 0;
+ *returnValue = nullptr;
+
+ auto accid = id();
+ auto elementIds = QSharedPointer<QList<QAccessible::Id>>(new QList<QAccessible::Id>);
+ auto ptrElementIds = new QSharedPointer<QList<QAccessible::Id>>(elementIds);
+
+ if (!SUCCEEDED(QEventDispatcherWinRT::runOnMainThread([accid, ptrElementIds]() {
+ if (QAccessibleInterface *accessible = accessibleForId(accid)) {
+ if (QAccessibleTableCellInterface *tableCellInterface = accessible->tableCellInterface()) {
+ QList<QAccessibleInterface *> headers = tableCellInterface->columnHeaderCells();
+ for (auto header : qAsConst(headers)) {
+ QAccessible::Id headerId = idForAccessible(header);
+ QWinRTUiaMetadataCache::instance()->load(headerId);
+ (*ptrElementIds)->append(headerId);
+ }
+ }
+ }
+ delete ptrElementIds;
+ return S_OK;
+ }))) {
+ return E_FAIL;
+ }
+
+ return QWinRTUiaMainProvider::rawProviderArrayForAccessibleIdList(*elementIds, returnValueSize, returnValue);
+}
+
+// Returns the providers for the row headers associated with the item.
+HRESULT STDMETHODCALLTYPE QWinRTUiaTableItemProvider::GetRowHeaderItems(UINT32 *returnValueSize, IIRawElementProviderSimple ***returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValueSize || !returnValue)
+ return E_INVALIDARG;
+ *returnValueSize = 0;
+ *returnValue = nullptr;
+
+ auto accid = id();
+ auto elementIds = QSharedPointer<QList<QAccessible::Id>>(new QList<QAccessible::Id>);
+ auto ptrElementIds = new QSharedPointer<QList<QAccessible::Id>>(elementIds);
+
+ if (!SUCCEEDED(QEventDispatcherWinRT::runOnMainThread([accid, ptrElementIds]() {
+ if (QAccessibleInterface *accessible = accessibleForId(accid)) {
+ if (QAccessibleTableCellInterface *tableCellInterface = accessible->tableCellInterface()) {
+ QList<QAccessibleInterface *> headers = tableCellInterface->rowHeaderCells();
+ for (auto header : qAsConst(headers)) {
+ QAccessible::Id headerId = idForAccessible(header);
+ QWinRTUiaMetadataCache::instance()->load(headerId);
+ (*ptrElementIds)->append(headerId);
+ }
+ }
+ }
+ delete ptrElementIds;
+ return S_OK;
+ }))) {
+ return E_FAIL;
+ }
+
+ return QWinRTUiaMainProvider::rawProviderArrayForAccessibleIdList(*elementIds, returnValueSize, returnValue);
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiatableitemprovider.h b/src/plugins/platforms/winrt/uiautomation/qwinrtuiatableitemprovider.h
new file mode 100644
index 0000000000..cb759864ae
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiatableitemprovider.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINRTUIATABLEITEMPROVIDER_H
+#define QWINRTUIATABLEITEMPROVIDER_H
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiabaseprovider.h"
+
+#include <wrl.h>
+#include <windows.ui.xaml.h>
+
+QT_BEGIN_NAMESPACE
+
+// Implements the Table Item control pattern provider. Used by items within a table/tree.
+class QWinRTUiaTableItemProvider :
+ public QWinRTUiaBaseProvider,
+ public Microsoft::WRL::RuntimeClass<ABI::Windows::UI::Xaml::Automation::Provider::ITableItemProvider>
+{
+ Q_OBJECT
+ Q_DISABLE_COPY(QWinRTUiaTableItemProvider)
+ InspectableClass(L"QWinRTUiaTableItemProvider", BaseTrust);
+
+public:
+ explicit QWinRTUiaTableItemProvider(QAccessible::Id id);
+ virtual ~QWinRTUiaTableItemProvider();
+
+ // ITableItemProvider
+ HRESULT STDMETHODCALLTYPE GetColumnHeaderItems(UINT32 *returnValueSize, ABI::Windows::UI::Xaml::Automation::Provider::IIRawElementProviderSimple ***returnValue) override;
+ HRESULT STDMETHODCALLTYPE GetRowHeaderItems(UINT32 *returnValueSize, ABI::Windows::UI::Xaml::Automation::Provider::IIRawElementProviderSimple ***returnValue) override;
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
+
+#endif // QWINRTUIATABLEITEMPROVIDER_H
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiatableprovider.cpp b/src/plugins/platforms/winrt/uiautomation/qwinrtuiatableprovider.cpp
new file mode 100644
index 0000000000..e71ade3c1f
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiatableprovider.cpp
@@ -0,0 +1,167 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiatableprovider.h"
+#include "qwinrtuiamainprovider.h"
+#include "qwinrtuiametadatacache.h"
+#include "qwinrtuiautils.h"
+
+#include <QtGui/QAccessible>
+#include <QtGui/QAccessibleInterface>
+#include <QtCore/QLoggingCategory>
+#include <QtCore/QString>
+#include <QtCore/private/qeventdispatcher_winrt_p.h>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QWinRTUiAutomation;
+using namespace ABI::Windows::UI::Xaml::Automation;
+using namespace ABI::Windows::UI::Xaml::Automation::Provider;
+using namespace ABI::Windows::UI::Xaml::Automation::Peers;
+
+QWinRTUiaTableProvider::QWinRTUiaTableProvider(QAccessible::Id id) :
+ QWinRTUiaBaseProvider(id)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+}
+
+QWinRTUiaTableProvider::~QWinRTUiaTableProvider()
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+}
+
+// Returns the primary direction of traversal for the table.
+HRESULT STDMETHODCALLTYPE QWinRTUiaTableProvider::get_RowOrColumnMajor(RowOrColumnMajor *value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!value)
+ return E_INVALIDARG;
+ *value = RowOrColumnMajor_Indeterminate;
+ return S_OK;
+}
+
+// Gets the providers for all the column headers in the table.
+HRESULT STDMETHODCALLTYPE QWinRTUiaTableProvider::GetColumnHeaders(UINT32 *returnValueSize, IIRawElementProviderSimple ***returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValueSize || !returnValue)
+ return E_INVALIDARG;
+ *returnValueSize = 0;
+ *returnValue = nullptr;
+
+ auto accid = id();
+ auto elementIds = QSharedPointer<QList<QAccessible::Id>>(new QList<QAccessible::Id>);
+ auto ptrElementIds = new QSharedPointer<QList<QAccessible::Id>>(elementIds);
+
+ if (!SUCCEEDED(QEventDispatcherWinRT::runOnMainThread([accid, ptrElementIds]() {
+ if (QAccessibleInterface *accessible = accessibleForId(accid)) {
+ if (QAccessibleTableInterface *tableInterface = accessible->tableInterface()) {
+ for (int i = 0; i < tableInterface->columnCount(); ++i) {
+ if (QAccessibleInterface *cell = tableInterface->cellAt(0, i)) {
+ QWinRTUiaMetadataCache::instance()->load(idForAccessible(cell));
+ if (QAccessibleTableCellInterface *tableCellInterface = cell->tableCellInterface()) {
+ QList<QAccessibleInterface *> headers = tableCellInterface->columnHeaderCells();
+ for (auto header : qAsConst(headers)) {
+ QAccessible::Id headerId = idForAccessible(header);
+ QWinRTUiaMetadataCache::instance()->load(headerId);
+ (*ptrElementIds)->append(headerId);
+ }
+ }
+ }
+ }
+ }
+ }
+ delete ptrElementIds;
+ return S_OK;
+ }))) {
+ return E_FAIL;
+ }
+
+ return QWinRTUiaMainProvider::rawProviderArrayForAccessibleIdList(*elementIds, returnValueSize, returnValue);
+}
+
+// Gets the providers for all the row headers in the table.
+HRESULT STDMETHODCALLTYPE QWinRTUiaTableProvider::GetRowHeaders(UINT32 *returnValueSize, IIRawElementProviderSimple ***returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValueSize || !returnValue)
+ return E_INVALIDARG;
+ *returnValueSize = 0;
+ *returnValue = nullptr;
+
+ auto accid = id();
+ auto elementIds = QSharedPointer<QList<QAccessible::Id>>(new QList<QAccessible::Id>);
+ auto ptrElementIds = new QSharedPointer<QList<QAccessible::Id>>(elementIds);
+
+ if (!SUCCEEDED(QEventDispatcherWinRT::runOnMainThread([accid, ptrElementIds]() {
+ if (QAccessibleInterface *accessible = accessibleForId(accid)) {
+ if (QAccessibleTableInterface *tableInterface = accessible->tableInterface()) {
+ for (int i = 0; i < tableInterface->rowCount(); ++i) {
+ if (QAccessibleInterface *cell = tableInterface->cellAt(i, 0)) {
+ QWinRTUiaMetadataCache::instance()->load(idForAccessible(cell));
+ if (QAccessibleTableCellInterface *tableCellInterface = cell->tableCellInterface()) {
+ QList<QAccessibleInterface *> headers = tableCellInterface->rowHeaderCells();
+ for (auto header : qAsConst(headers)) {
+ QAccessible::Id headerId = idForAccessible(header);
+ QWinRTUiaMetadataCache::instance()->load(headerId);
+ (*ptrElementIds)->append(headerId);
+ }
+ }
+ }
+ }
+ }
+ }
+ delete ptrElementIds;
+ return S_OK;
+ }))) {
+ return E_FAIL;
+ }
+
+ return QWinRTUiaMainProvider::rawProviderArrayForAccessibleIdList(*elementIds, returnValueSize, returnValue);
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiatableprovider.h b/src/plugins/platforms/winrt/uiautomation/qwinrtuiatableprovider.h
new file mode 100644
index 0000000000..0cd174e401
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiatableprovider.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINRTUIATABLEPROVIDER_H
+#define QWINRTUIATABLEPROVIDER_H
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiabaseprovider.h"
+
+#include <wrl.h>
+#include <windows.ui.xaml.h>
+
+QT_BEGIN_NAMESPACE
+
+// Implements the Table control pattern provider. Used by tables/trees.
+class QWinRTUiaTableProvider :
+ public QWinRTUiaBaseProvider,
+ public Microsoft::WRL::RuntimeClass<ABI::Windows::UI::Xaml::Automation::Provider::ITableProvider>
+{
+ Q_OBJECT
+ Q_DISABLE_COPY(QWinRTUiaTableProvider)
+ InspectableClass(L"QWinRTUiaTableProvider", BaseTrust);
+
+public:
+ explicit QWinRTUiaTableProvider(QAccessible::Id id);
+ virtual ~QWinRTUiaTableProvider();
+
+ // ITableProvider
+ HRESULT STDMETHODCALLTYPE get_RowOrColumnMajor(ABI::Windows::UI::Xaml::Automation::RowOrColumnMajor *value) override;
+ HRESULT STDMETHODCALLTYPE GetColumnHeaders(UINT32 *returnValueSize, ABI::Windows::UI::Xaml::Automation::Provider::IIRawElementProviderSimple ***returnValue) override;
+ HRESULT STDMETHODCALLTYPE GetRowHeaders(UINT32 *returnValueSize, ABI::Windows::UI::Xaml::Automation::Provider::IIRawElementProviderSimple ***returnValue) override;
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
+
+#endif // QWINRTUIATABLEPROVIDER_H
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiatextprovider.cpp b/src/plugins/platforms/winrt/uiautomation/qwinrtuiatextprovider.cpp
new file mode 100644
index 0000000000..aa120377df
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiatextprovider.cpp
@@ -0,0 +1,232 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiatextprovider.h"
+#include "qwinrtuiametadatacache.h"
+#include "qwinrtuiatextrangeprovider.h"
+#include "qwinrtuiautils.h"
+
+#include <QtGui/QAccessible>
+#include <QtGui/QAccessibleInterface>
+#include <QtCore/QLoggingCategory>
+#include <QtCore/QString>
+#include <QtCore/private/qeventdispatcher_winrt_p.h>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QWinRTUiAutomation;
+using namespace Microsoft::WRL;
+using namespace Microsoft::WRL::Wrappers;
+using namespace ABI::Windows::UI::Xaml::Automation;
+using namespace ABI::Windows::UI::Xaml::Automation::Provider;
+
+QWinRTUiaTextProvider::QWinRTUiaTextProvider(QAccessible::Id id) :
+ QWinRTUiaBaseProvider(id)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+}
+
+QWinRTUiaTextProvider::~QWinRTUiaTextProvider()
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+}
+
+// Returns a text range provider for the entire text.
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextProvider::get_DocumentRange(ITextRangeProvider **value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!value)
+ return E_INVALIDARG;
+
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ ComPtr<QWinRTUiaTextRangeProvider> textRangeProvider = Make<QWinRTUiaTextRangeProvider>(id(), 0, metadata->characterCount());
+ return textRangeProvider.CopyTo(value);
+}
+
+// Currently supporting single selection.
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextProvider::get_SupportedTextSelection(SupportedTextSelection *value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+ if (!value)
+ return E_INVALIDARG;
+ *value = SupportedTextSelection_Single;
+ return S_OK;
+
+}
+
+// Returns an array of providers for the selected text ranges.
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextProvider::GetSelection(UINT32 *returnValueSize, ITextRangeProvider ***returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValueSize || !returnValue)
+ return E_INVALIDARG;
+ *returnValueSize = 0;
+ *returnValue = nullptr;
+
+ auto accid = id();
+ auto selections = QSharedPointer<QList<QPair<int,int>>>(new QList<QPair<int,int>>);
+ auto ptrSelections = new QSharedPointer<QList<QPair<int,int>>>(selections);
+
+ if (!SUCCEEDED(QEventDispatcherWinRT::runOnMainThread([accid, ptrSelections]() {
+ if (QAccessibleInterface *accessible = accessibleForId(accid)) {
+ if (QAccessibleTextInterface *textInterface = accessible->textInterface()) {
+ for (int i = 0; i < textInterface->selectionCount(); ++i) {
+ QPair<int,int> sel;
+ textInterface->selection(i, &sel.first, &sel.second);
+ (*ptrSelections)->append(sel);
+ }
+ if ((*ptrSelections)->size() == 0) {
+ // If there is no selection, we return an array with a single degenerate (empty) text range at the cursor position.
+ QPair<int,int> sel(textInterface->cursorPosition(), textInterface->cursorPosition());
+ (*ptrSelections)->append(sel);
+ }
+ }
+ }
+ delete ptrSelections;
+ return S_OK;
+ }))) {
+ return E_FAIL;
+ }
+
+ int selCount = selections->size();
+ if (selCount < 1)
+ return E_FAIL;
+
+ ITextRangeProvider **providerArray = static_cast<ITextRangeProvider **>(CoTaskMemAlloc(selCount * sizeof(ITextRangeProvider *)));
+ if (!providerArray)
+ return E_OUTOFMEMORY;
+
+ for (int i = 0; i < selCount; ++i) {
+ ComPtr<QWinRTUiaTextRangeProvider> textRangeProvider = Make<QWinRTUiaTextRangeProvider>(id(), (*selections)[i].first, (*selections)[i].second);
+ textRangeProvider.CopyTo(&providerArray[i]);
+ }
+ *returnValueSize = selCount;
+ *returnValue = providerArray;
+ return S_OK;
+}
+
+// Returns an array of providers for the visible text ranges.
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextProvider::GetVisibleRanges(UINT32 *returnValueSize, ITextRangeProvider ***returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValueSize || !returnValue)
+ return E_INVALIDARG;
+
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+
+ // Considering the entire text as visible.
+ ComPtr<QWinRTUiaTextRangeProvider> textRangeProvider = Make<QWinRTUiaTextRangeProvider>(id(), 0, metadata->characterCount());
+ textRangeProvider.CopyTo(*returnValue);
+ *returnValueSize = 1;
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextProvider::RangeFromChild(IIRawElementProviderSimple *childElement, ITextRangeProvider **returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+ if (!childElement || !returnValue)
+ return E_INVALIDARG;
+ *returnValue = nullptr;
+ // No children supported.
+ return S_OK;
+}
+
+// Returns a degenerate text range at the specified point.
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextProvider::RangeFromPoint(ABI::Windows::Foundation::Point screenLocation, ITextRangeProvider **returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ *returnValue = nullptr;
+
+ const QPoint pt(screenLocation.X, screenLocation.Y);
+ auto accid = id();
+ auto offset = QSharedPointer<int>(new int);
+ auto ptrOffset = new QSharedPointer<int>(offset);
+
+ if (!SUCCEEDED(QEventDispatcherWinRT::runOnMainThread([accid, pt, ptrOffset]() {
+ if (QAccessibleInterface *accessible = accessibleForId(accid))
+ if (QAccessibleTextInterface *textInterface = accessible->textInterface())
+ **ptrOffset = qBound(0, textInterface->offsetAtPoint(pt), textInterface->characterCount() - 1);
+ delete ptrOffset;
+ return S_OK;
+ }))) {
+ return E_FAIL;
+ }
+
+ ComPtr<QWinRTUiaTextRangeProvider> textRangeProvider = Make<QWinRTUiaTextRangeProvider>(id(), *offset, *offset);
+ textRangeProvider.CopyTo(returnValue);
+ return S_OK;
+}
+
+// Not supporting annotations.
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextProvider::RangeFromAnnotation(IIRawElementProviderSimple *annotationElement, ITextRangeProvider **returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+ if (!annotationElement || !returnValue)
+ return E_INVALIDARG;
+ *returnValue = nullptr;
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextProvider::GetCaretRange(boolean *isActive, ITextRangeProvider **returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!isActive || !returnValue)
+ return E_INVALIDARG;
+
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ *isActive = metadata->state().focused;
+
+ ComPtr<QWinRTUiaTextRangeProvider> textRangeProvider = Make<QWinRTUiaTextRangeProvider>(id(), metadata->cursorPosition(), metadata->cursorPosition());
+ return textRangeProvider.CopyTo(returnValue);
+}
+
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiatextprovider.h b/src/plugins/platforms/winrt/uiautomation/qwinrtuiatextprovider.h
new file mode 100644
index 0000000000..80d88e4115
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiatextprovider.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINRTUIATEXTPROVIDER_H
+#define QWINRTUIATEXTPROVIDER_H
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiabaseprovider.h"
+
+#include <wrl.h>
+#include <windows.ui.xaml.h>
+
+QT_BEGIN_NAMESPACE
+
+// Implements the Text control pattern provider. Used for text controls.
+class QWinRTUiaTextProvider :
+ public QWinRTUiaBaseProvider,
+ public Microsoft::WRL::RuntimeClass<ABI::Windows::UI::Xaml::Automation::Provider::ITextProvider, ABI::Windows::UI::Xaml::Automation::Provider::ITextProvider2>
+{
+ Q_OBJECT
+ Q_DISABLE_COPY(QWinRTUiaTextProvider)
+ InspectableClass(L"QWinRTUiaTextProvider", BaseTrust);
+
+public:
+ explicit QWinRTUiaTextProvider(QAccessible::Id id);
+ virtual ~QWinRTUiaTextProvider();
+
+ // ITextProvider
+ HRESULT STDMETHODCALLTYPE get_DocumentRange(ABI::Windows::UI::Xaml::Automation::Provider::ITextRangeProvider **value) override;
+ HRESULT STDMETHODCALLTYPE get_SupportedTextSelection(ABI::Windows::UI::Xaml::Automation::SupportedTextSelection *value) override;
+ HRESULT STDMETHODCALLTYPE GetSelection(UINT32 *returnValueSize, ABI::Windows::UI::Xaml::Automation::Provider::ITextRangeProvider ***returnValue) override;
+ HRESULT STDMETHODCALLTYPE GetVisibleRanges(UINT32 *returnValueSize, ABI::Windows::UI::Xaml::Automation::Provider::ITextRangeProvider ***returnValue) override;
+ HRESULT STDMETHODCALLTYPE RangeFromChild(ABI::Windows::UI::Xaml::Automation::Provider::IIRawElementProviderSimple *childElement, ABI::Windows::UI::Xaml::Automation::Provider::ITextRangeProvider **returnValue) override;
+ HRESULT STDMETHODCALLTYPE RangeFromPoint(ABI::Windows::Foundation::Point screenLocation, ABI::Windows::UI::Xaml::Automation::Provider::ITextRangeProvider **returnValue) override;
+
+ // ITextProvider2
+ HRESULT STDMETHODCALLTYPE RangeFromAnnotation(ABI::Windows::UI::Xaml::Automation::Provider::IIRawElementProviderSimple *annotationElement, ABI::Windows::UI::Xaml::Automation::Provider::ITextRangeProvider **returnValue) override;
+ HRESULT STDMETHODCALLTYPE GetCaretRange(boolean *isActive, ABI::Windows::UI::Xaml::Automation::Provider::ITextRangeProvider **returnValue) override;
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
+
+#endif // QWINRTUIATEXTPROVIDER_H
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiatextrangeprovider.cpp b/src/plugins/platforms/winrt/uiautomation/qwinrtuiatextrangeprovider.cpp
new file mode 100644
index 0000000000..fc3778d652
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiatextrangeprovider.cpp
@@ -0,0 +1,497 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiatextrangeprovider.h"
+#include "qwinrtuiametadatacache.h"
+#include "qwinrtuiamainprovider.h"
+#include "qwinrtuiautils.h"
+
+#include <QtGui/QAccessible>
+#include <QtGui/QAccessibleInterface>
+#include <QtCore/QLoggingCategory>
+#include <QtCore/QString>
+#include <QtCore/private/qeventdispatcher_winrt_p.h>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QWinRTUiAutomation;
+using namespace Microsoft::WRL;
+using namespace Microsoft::WRL::Wrappers;
+using namespace ABI::Windows::Foundation;
+using namespace ABI::Windows::UI::Xaml;
+using namespace ABI::Windows::UI::Xaml::Automation;
+using namespace ABI::Windows::UI::Xaml::Automation::Provider;
+using namespace ABI::Windows::UI::Xaml::Automation::Text;
+
+QWinRTUiaTextRangeProvider::QWinRTUiaTextRangeProvider(QAccessible::Id id, int startOffset, int endOffset) :
+ QWinRTUiaBaseProvider(id),
+ m_startOffset(startOffset),
+ m_endOffset(endOffset)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__ << startOffset << endOffset;
+}
+
+QWinRTUiaTextRangeProvider::~QWinRTUiaTextRangeProvider()
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextRangeProvider::Clone(ITextRangeProvider **returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+ if (!returnValue)
+ return E_INVALIDARG;
+
+ ComPtr<QWinRTUiaTextRangeProvider> textRangeProvider = Make<QWinRTUiaTextRangeProvider>(id(), m_startOffset, m_endOffset);
+ textRangeProvider.CopyTo(returnValue);
+ return S_OK;
+}
+
+// Two ranges are considered equal if their start/end points are the same.
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextRangeProvider::Compare(ITextRangeProvider *textRangeProvider, boolean *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+ if (!textRangeProvider || !returnValue)
+ return E_INVALIDARG;
+
+ QWinRTUiaTextRangeProvider *targetProvider = static_cast<QWinRTUiaTextRangeProvider *>(textRangeProvider);
+ *returnValue = ((targetProvider->m_startOffset == m_startOffset) && (targetProvider->m_endOffset == m_endOffset));
+ return S_OK;
+}
+
+// Compare different endpoinds between two providers.
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextRangeProvider::CompareEndpoints(TextPatternRangeEndpoint endpoint, ITextRangeProvider *textRangeProvider, TextPatternRangeEndpoint targetEndpoint, INT32 *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!textRangeProvider || !returnValue)
+ return E_INVALIDARG;
+
+ QWinRTUiaTextRangeProvider *targetProvider = static_cast<QWinRTUiaTextRangeProvider *>(textRangeProvider);
+
+ int point = (endpoint == TextPatternRangeEndpoint_Start) ? m_startOffset : m_endOffset;
+ int targetPoint = (targetEndpoint == TextPatternRangeEndpoint_Start) ?
+ targetProvider->m_startOffset : targetProvider->m_endOffset;
+ *returnValue = point - targetPoint;
+ return S_OK;
+}
+
+// Expands/normalizes the range for a given text unit.
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextRangeProvider::ExpandToEnclosingUnit(TextUnit unit)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__ << "unit=" << unit << "this: " << this;
+
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+
+ int len = metadata->characterCount();
+ if (len < 1) {
+ m_startOffset = 0;
+ m_endOffset = 0;
+ } else {
+ if (unit == TextUnit_Character) {
+ m_startOffset = qBound(0, m_startOffset, len - 1);
+ m_endOffset = m_startOffset + 1;
+ } else {
+ QString text = metadata->text();
+ for (int t = m_startOffset; t >= 0; --t) {
+ if (!isTextUnitSeparator(unit, text[t]) && ((t == 0) || isTextUnitSeparator(unit, text[t - 1]))) {
+ m_startOffset = t;
+ break;
+ }
+ }
+ for (int t = m_startOffset; t < len; ++t) {
+ if ((t == len - 1) || (isTextUnitSeparator(unit, text[t]) && ((unit == TextUnit_Word) || !isTextUnitSeparator(unit, text[t + 1])))) {
+ m_endOffset = t + 1;
+ break;
+ }
+ }
+ }
+ }
+ return S_OK;
+}
+
+// Not supported.
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextRangeProvider::FindAttribute(INT32 /*attributeId*/, IInspectable * /*value*/, boolean /*backward*/, ITextRangeProvider **returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+ if (!returnValue)
+ return E_INVALIDARG;
+ *returnValue = nullptr;
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextRangeProvider::FindText(HSTRING /*text*/, boolean /*backward*/, boolean /*ignoreCase*/, ITextRangeProvider **returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+ if (!returnValue)
+ return E_INVALIDARG;
+ *returnValue = nullptr;
+ return S_OK;
+}
+
+// Returns the value of a given attribute.
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextRangeProvider::GetAttributeValue(INT32 attributeId, IInspectable **returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__ << "attributeId=" << attributeId;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ *returnValue = nullptr;
+
+ ComPtr<IPropertyValueStatics> propertyValueStatics;
+ if (FAILED(RoGetActivationFactory(HString::MakeReference(RuntimeClass_Windows_Foundation_PropertyValue).Get(), IID_PPV_ARGS(&propertyValueStatics))))
+ return E_FAIL;
+
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+
+ switch (attributeId) {
+ case AutomationTextAttributesEnum_IsReadOnlyAttribute:
+ return propertyValueStatics->CreateBoolean(metadata->state().readOnly, returnValue);
+ case AutomationTextAttributesEnum_CaretPositionAttribute:
+ if (metadata->cursorPosition() == 0)
+ return propertyValueStatics->CreateInt32(AutomationCaretPosition_BeginningOfLine, returnValue);
+ else if (metadata->cursorPosition() == metadata->characterCount())
+ return propertyValueStatics->CreateInt32(AutomationCaretPosition_EndOfLine, returnValue);
+ else
+ return propertyValueStatics->CreateInt32(AutomationCaretPosition_Unknown, returnValue);
+ default:
+ break;
+ }
+ return E_FAIL;
+}
+
+// Returns an array of bounding rectangles for text lines within the range.
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextRangeProvider::GetBoundingRectangles(UINT32 *returnValueSize, DOUBLE **returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValueSize || !returnValue)
+ return E_INVALIDARG;
+ *returnValueSize = 0;
+ *returnValue = nullptr;
+
+ auto accid = id();
+ auto startOffset = m_startOffset;
+ auto endOffset = m_endOffset;
+ auto rects = QSharedPointer<QList<QRect>>(new QList<QRect>);
+ auto ptrRects = new QSharedPointer<QList<QRect>>(rects);
+
+ if (!SUCCEEDED(QEventDispatcherWinRT::runOnMainThread([accid, startOffset, endOffset, ptrRects]() {
+ if (QAccessibleInterface *accessible = accessibleForId(accid)) {
+ if (QAccessibleTextInterface *textInterface = accessible->textInterface()) {
+ int len = textInterface->characterCount();
+ if ((startOffset >= 0) && (endOffset <= len) && (startOffset < endOffset)) {
+ int start, end;
+ textInterface->textAtOffset(startOffset, QAccessible::LineBoundary, &start, &end);
+ while ((start >= 0) && (end >= 0)) {
+ int startRange = qMax(start, startOffset);
+ int endRange = qMin(end, endOffset);
+ if (startRange < endRange) {
+ // Calculates a bounding rectangle for the line and adds it to the list.
+ const QRect startRect = textInterface->characterRect(startRange);
+ const QRect endRect = textInterface->characterRect(endRange - 1);
+ const QRect lineRect(qMin(startRect.x(), endRect.x()),
+ qMin(startRect.y(), endRect.y()),
+ qMax(startRect.x() + startRect.width(), endRect.x() + endRect.width()) - qMin(startRect.x(), endRect.x()),
+ qMax(startRect.y() + startRect.height(), endRect.y() + endRect.height()) - qMin(startRect.y(), endRect.y()));
+ (*ptrRects)->append(lineRect);
+ }
+ if (end >= len) break;
+ textInterface->textAfterOffset(end + 1, QAccessible::LineBoundary, &start, &end);
+ }
+ }
+ }
+ }
+ delete ptrRects;
+ return S_OK;
+ }))) {
+ return E_FAIL;
+ }
+
+ DOUBLE *doubleArray = static_cast<DOUBLE *>(CoTaskMemAlloc(4 * rects->size() * sizeof(DOUBLE)));
+ if (!doubleArray)
+ return E_OUTOFMEMORY;
+
+ for (int i = 0; i < rects->size(); ++i) {
+ doubleArray[i*4] = (*rects)[i].left();
+ doubleArray[i*4+1] = (*rects)[i].top();
+ doubleArray[i*4+2] = (*rects)[i].width();
+ doubleArray[i*4+3] = (*rects)[i].height();
+ }
+ *returnValue = doubleArray;
+ *returnValueSize = 4 * rects->size();
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextRangeProvider::GetEnclosingElement(IIRawElementProviderSimple **returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+ if (!returnValue)
+ return E_INVALIDARG;
+ return QWinRTUiaMainProvider::rawProviderForAccessibleId(id(), returnValue);
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextRangeProvider::GetText(INT32 maxLength, HSTRING *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+ if (!returnValue)
+ return E_INVALIDARG;
+ *returnValue = nullptr;
+
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+
+ QString rangeText = metadata->text().mid(m_startOffset, m_endOffset - m_startOffset);
+
+ if ((maxLength > -1) && (rangeText.size() > maxLength))
+ rangeText.truncate(maxLength);
+ return qHString(rangeText, returnValue);
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextRangeProvider::Move(TextUnit unit, INT32 count, INT32 *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+ if (!returnValue)
+ return E_INVALIDARG;
+ *returnValue = 0;
+
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+
+ int len = metadata->characterCount();
+ if (len < 1)
+ return S_OK;
+
+ if (unit == TextUnit_Character) {
+ // Moves the start point, ensuring it lies within the bounds.
+ int start = qBound(0, m_startOffset + count, len - 1);
+ // If range was initially empty, leaves it as is; otherwise, normalizes it to one char.
+ m_endOffset = (m_endOffset > m_startOffset) ? start + 1 : start;
+ *returnValue = start - m_startOffset; // Returns the actually moved distance.
+ m_startOffset = start;
+ } else {
+ if (count > 0) {
+ MoveEndpointByUnit(TextPatternRangeEndpoint_End, unit, count, returnValue);
+ MoveEndpointByUnit(TextPatternRangeEndpoint_Start, unit, count, returnValue);
+ } else {
+ MoveEndpointByUnit(TextPatternRangeEndpoint_Start, unit, count, returnValue);
+ MoveEndpointByUnit(TextPatternRangeEndpoint_End, unit, count, returnValue);
+ }
+ }
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextRangeProvider::MoveEndpointByUnit(TextPatternRangeEndpoint endpoint, TextUnit unit, INT32 count, INT32 *returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+ if (!returnValue)
+ return E_INVALIDARG;
+ *returnValue = 0;
+
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+
+ int len = metadata->characterCount();
+ if (len < 1)
+ return S_OK;
+
+ if (unit == TextUnit_Character) {
+ if (endpoint == TextPatternRangeEndpoint_Start) {
+ int boundedValue = qBound(0, m_startOffset + count, len - 1);
+ *returnValue = boundedValue - m_startOffset;
+ m_startOffset = boundedValue;
+ m_endOffset = qBound(m_startOffset, m_endOffset, len);
+ } else {
+ int boundedValue = qBound(0, m_endOffset + count, len);
+ *returnValue = boundedValue - m_endOffset;
+ m_endOffset = boundedValue;
+ m_startOffset = qBound(0, m_startOffset, m_endOffset);
+ }
+ } else {
+ QString text = metadata->text();
+ int moved = 0;
+
+ if (endpoint == TextPatternRangeEndpoint_Start) {
+ if (count > 0) {
+ for (int t = m_startOffset; (t < len - 1) && (moved < count); ++t) {
+ if (isTextUnitSeparator(unit, text[t]) && !isTextUnitSeparator(unit, text[t + 1])) {
+ m_startOffset = t + 1;
+ ++moved;
+ }
+ }
+ m_endOffset = qBound(m_startOffset, m_endOffset, len);
+ } else {
+ for (int t = m_startOffset - 1; (t >= 0) && (moved > count); --t) {
+ if (!isTextUnitSeparator(unit, text[t]) && ((t == 0) || isTextUnitSeparator(unit, text[t - 1]))) {
+ m_startOffset = t;
+ --moved;
+ }
+ }
+ }
+ } else {
+ if (count > 0) {
+ for (int t = m_endOffset; (t < len) && (moved < count); ++t) {
+ if ((t == len - 1) || (isTextUnitSeparator(unit, text[t]) && ((unit == TextUnit_Word) || !isTextUnitSeparator(unit, text[t + 1])))) {
+ m_endOffset = t + 1;
+ ++moved;
+ }
+ }
+ } else {
+ int end = 0;
+ for (int t = m_endOffset - 2; (t > 0) && (moved > count); --t) {
+ if (isTextUnitSeparator(unit, text[t]) && ((unit == TextUnit_Word) || !isTextUnitSeparator(unit, text[t + 1]))) {
+ end = t + 1;
+ --moved;
+ }
+ }
+ m_endOffset = end;
+ m_startOffset = qBound(0, m_startOffset, m_endOffset);
+ }
+ }
+ *returnValue = moved;
+ }
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextRangeProvider::MoveEndpointByRange(TextPatternRangeEndpoint endpoint, ITextRangeProvider *textRangeProvider, TextPatternRangeEndpoint targetEndpoint)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+ if (!textRangeProvider)
+ return E_INVALIDARG;
+
+ QWinRTUiaTextRangeProvider *targetProvider = static_cast<QWinRTUiaTextRangeProvider *>(textRangeProvider);
+
+ int targetPoint = (targetEndpoint == TextPatternRangeEndpoint_Start) ?
+ targetProvider->m_startOffset : targetProvider->m_endOffset;
+
+ // If the moved endpoint crosses the other endpoint, that one is moved too.
+ if (endpoint == TextPatternRangeEndpoint_Start) {
+ m_startOffset = targetPoint;
+ if (m_endOffset < m_startOffset)
+ m_endOffset = m_startOffset;
+ } else {
+ m_endOffset = targetPoint;
+ if (m_endOffset < m_startOffset)
+ m_startOffset = m_endOffset;
+ }
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextRangeProvider::Select()
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ auto accid = id();
+ auto startOffset = m_startOffset;
+ auto endOffset = m_endOffset;
+
+ QEventDispatcherWinRT::runOnMainThread([accid, startOffset, endOffset]() {
+ if (QAccessibleInterface *accessible = accessibleForId(accid))
+ if (QAccessibleTextInterface *textInterface = accessible->textInterface()) {
+ // unselects all and adds a new selection
+ for (int i = textInterface->selectionCount() - 1; i >= 0; --i)
+ textInterface->removeSelection(i);
+ textInterface->addSelection(startOffset, endOffset);
+ }
+ QWinRTUiaMetadataCache::instance()->load(accid);
+ return S_OK;
+ }, 0);
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextRangeProvider::AddToSelection()
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+ return Select();
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextRangeProvider::RemoveFromSelection()
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ auto accid = id();
+
+ QEventDispatcherWinRT::runOnMainThread([accid]() {
+ if (QAccessibleInterface *accessible = accessibleForId(accid))
+ if (QAccessibleTextInterface *textInterface = accessible->textInterface()) {
+ // unselects all
+ for (int i = textInterface->selectionCount() - 1; i >= 0; --i)
+ textInterface->removeSelection(i);
+ }
+ QWinRTUiaMetadataCache::instance()->load(accid);
+ return S_OK;
+ }, 0);
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextRangeProvider::ScrollIntoView(boolean /*alignToTop*/)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ auto accid = id();
+ auto startOffset = m_startOffset;
+ auto endOffset = m_endOffset;
+
+ QEventDispatcherWinRT::runOnMainThread([accid, startOffset, endOffset]() {
+ if (QAccessibleInterface *accessible = accessibleForId(accid))
+ if (QAccessibleTextInterface *textInterface = accessible->textInterface()) {
+ textInterface->scrollToSubstring(startOffset, endOffset);
+ }
+ QWinRTUiaMetadataCache::instance()->load(accid);
+ return S_OK;
+ }, 0);
+ return S_OK;
+}
+
+// Returns an array of children elements embedded within the range.
+HRESULT STDMETHODCALLTYPE QWinRTUiaTextRangeProvider::GetChildren(UINT32 *returnValueSize, IIRawElementProviderSimple ***returnValue)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!returnValue)
+ return E_INVALIDARG;
+ // Not supporting any children.
+ returnValueSize = 0;
+ *returnValue = nullptr;
+ return S_OK;
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiatextrangeprovider.h b/src/plugins/platforms/winrt/uiautomation/qwinrtuiatextrangeprovider.h
new file mode 100644
index 0000000000..81b5f0d400
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiatextrangeprovider.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINRTUIATEXTRANGEPROVIDER_H
+#define QWINRTUIATEXTRANGEPROVIDER_H
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiabaseprovider.h"
+
+#include <wrl.h>
+#include <windows.ui.xaml.h>
+
+QT_BEGIN_NAMESPACE
+
+// Implements the Text Range control pattern provider. Used for text controls.
+class QWinRTUiaTextRangeProvider :
+ public QWinRTUiaBaseProvider,
+ public Microsoft::WRL::RuntimeClass<ABI::Windows::UI::Xaml::Automation::Provider::ITextRangeProvider>
+{
+ Q_OBJECT
+ Q_DISABLE_COPY(QWinRTUiaTextRangeProvider)
+ InspectableClass(L"QWinRTUiaTextRangeProvider", BaseTrust);
+
+public:
+ explicit QWinRTUiaTextRangeProvider(QAccessible::Id id, int startOffset, int endOffset);
+ virtual ~QWinRTUiaTextRangeProvider();
+
+ // ITextRangeProvider
+ HRESULT STDMETHODCALLTYPE Clone(ABI::Windows::UI::Xaml::Automation::Provider::ITextRangeProvider **returnValue) override;
+ HRESULT STDMETHODCALLTYPE Compare(ABI::Windows::UI::Xaml::Automation::Provider::ITextRangeProvider *textRangeProvider, boolean *returnValue) override;
+ HRESULT STDMETHODCALLTYPE CompareEndpoints(ABI::Windows::UI::Xaml::Automation::Text::TextPatternRangeEndpoint endpoint, ABI::Windows::UI::Xaml::Automation::Provider::ITextRangeProvider *textRangeProvider, ABI::Windows::UI::Xaml::Automation::Text::TextPatternRangeEndpoint targetEndpoint, INT32 *returnValue) override;
+ HRESULT STDMETHODCALLTYPE ExpandToEnclosingUnit(ABI::Windows::UI::Xaml::Automation::Text::TextUnit unit) override;
+ HRESULT STDMETHODCALLTYPE FindAttribute(INT32 attributeId, IInspectable *value, boolean backward, ABI::Windows::UI::Xaml::Automation::Provider::ITextRangeProvider **returnValue) override;
+ HRESULT STDMETHODCALLTYPE FindText(HSTRING text, boolean backward, boolean ignoreCase, ABI::Windows::UI::Xaml::Automation::Provider::ITextRangeProvider **returnValue) override;
+ HRESULT STDMETHODCALLTYPE GetAttributeValue(INT32 attributeId, IInspectable **returnValue) override;
+ HRESULT STDMETHODCALLTYPE GetBoundingRectangles(UINT32 *returnValueSize, DOUBLE **returnValue) override;
+ HRESULT STDMETHODCALLTYPE GetEnclosingElement(ABI::Windows::UI::Xaml::Automation::Provider::IIRawElementProviderSimple **returnValue) override;
+ HRESULT STDMETHODCALLTYPE GetText(INT32 maxLength, HSTRING *returnValue) override;
+ HRESULT STDMETHODCALLTYPE Move(ABI::Windows::UI::Xaml::Automation::Text::TextUnit unit, INT32 count, INT32 *returnValue) override;
+ HRESULT STDMETHODCALLTYPE MoveEndpointByUnit(ABI::Windows::UI::Xaml::Automation::Text::TextPatternRangeEndpoint endpoint, ABI::Windows::UI::Xaml::Automation::Text::TextUnit unit, INT32 count, INT32 *returnValue) override;
+ HRESULT STDMETHODCALLTYPE MoveEndpointByRange(ABI::Windows::UI::Xaml::Automation::Text::TextPatternRangeEndpoint endpoint, ABI::Windows::UI::Xaml::Automation::Provider::ITextRangeProvider *textRangeProvider, ABI::Windows::UI::Xaml::Automation::Text::TextPatternRangeEndpoint targetEndpoint) override;
+ HRESULT STDMETHODCALLTYPE Select() override;
+ HRESULT STDMETHODCALLTYPE AddToSelection() override;
+ HRESULT STDMETHODCALLTYPE RemoveFromSelection() override;
+ HRESULT STDMETHODCALLTYPE ScrollIntoView(boolean alignToTop) override;
+ HRESULT STDMETHODCALLTYPE GetChildren(UINT32 *returnValueSize, ABI::Windows::UI::Xaml::Automation::Provider::IIRawElementProviderSimple ***returnValue) override;
+
+private:
+ int m_startOffset;
+ int m_endOffset;
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
+
+#endif // QWINRTUIATEXTRANGEPROVIDER_H
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiatoggleprovider.cpp b/src/plugins/platforms/winrt/uiautomation/qwinrtuiatoggleprovider.cpp
new file mode 100644
index 0000000000..59f55eb422
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiatoggleprovider.cpp
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiatoggleprovider.h"
+#include "qwinrtuiametadatacache.h"
+#include "qwinrtuiautils.h"
+
+#include <QtGui/QAccessible>
+#include <QtGui/QAccessibleInterface>
+#include <QtCore/QLoggingCategory>
+#include <QtCore/QString>
+#include <QtCore/private/qeventdispatcher_winrt_p.h>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QWinRTUiAutomation;
+using namespace ABI::Windows::UI::Xaml::Automation;
+using namespace ABI::Windows::UI::Xaml::Automation::Provider;
+
+QWinRTUiaToggleProvider::QWinRTUiaToggleProvider(QAccessible::Id id) :
+ QWinRTUiaBaseProvider(id)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+}
+
+QWinRTUiaToggleProvider::~QWinRTUiaToggleProvider()
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+}
+
+// Gets the current toggle state.
+HRESULT STDMETHODCALLTYPE QWinRTUiaToggleProvider::get_ToggleState(ToggleState *value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!value)
+ return E_INVALIDARG;
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ if (metadata->state().checked)
+ *value = metadata->state().checkStateMixed ? ToggleState_Indeterminate : ToggleState_On;
+ else
+ *value = ToggleState_Off;
+ return S_OK;
+}
+
+// Toggles the state by invoking the toggle action.
+HRESULT STDMETHODCALLTYPE QWinRTUiaToggleProvider::Toggle()
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ auto accid = id();
+
+ QEventDispatcherWinRT::runOnMainThread([accid]() {
+ if (QAccessibleInterface *accessible = accessibleForId(accid))
+ if (QAccessibleActionInterface *actionInterface = accessible->actionInterface())
+ actionInterface->doAction(QAccessibleActionInterface::toggleAction());
+ QWinRTUiaMetadataCache::instance()->load(accid);
+ return S_OK;
+ }, 0);
+ return S_OK;
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiatoggleprovider.h b/src/plugins/platforms/winrt/uiautomation/qwinrtuiatoggleprovider.h
new file mode 100644
index 0000000000..3d1740c0a1
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiatoggleprovider.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINRTUIATOGGLEPROVIDER_H
+#define QWINRTUIATOGGLEPROVIDER_H
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiabaseprovider.h"
+
+#include <wrl.h>
+#include <windows.ui.xaml.h>
+
+QT_BEGIN_NAMESPACE
+
+// Implements the Toggle control pattern provider. Used for checkboxes.
+class QWinRTUiaToggleProvider :
+ public QWinRTUiaBaseProvider,
+ public Microsoft::WRL::RuntimeClass<ABI::Windows::UI::Xaml::Automation::Provider::IToggleProvider>
+{
+ Q_OBJECT
+ Q_DISABLE_COPY(QWinRTUiaToggleProvider)
+ InspectableClass(L"QWinRTUiaToggleProvider", BaseTrust);
+
+public:
+ explicit QWinRTUiaToggleProvider(QAccessible::Id id);
+ virtual ~QWinRTUiaToggleProvider();
+
+ // IToggleProvider
+ HRESULT STDMETHODCALLTYPE get_ToggleState(ABI::Windows::UI::Xaml::Automation::ToggleState *value) override;
+ HRESULT STDMETHODCALLTYPE Toggle() override;
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
+
+#endif // QWINRTUIATOGGLEPROVIDER_H
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiautils.cpp b/src/plugins/platforms/winrt/uiautomation/qwinrtuiautils.cpp
new file mode 100644
index 0000000000..98483216c0
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiautils.cpp
@@ -0,0 +1,182 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiautils.h"
+
+using namespace ABI::Windows::UI::Xaml::Automation::Peers;
+using namespace ABI::Windows::UI::Xaml::Automation::Text;
+using namespace ABI::Windows::Foundation::Collections;
+
+QT_BEGIN_NAMESPACE
+
+Q_LOGGING_CATEGORY(lcQpaUiAutomation, "qt.qpa.uiautomation")
+
+namespace QWinRTUiAutomation {
+
+// Returns the window containing the element (usually the top window),
+QWindow *windowForAccessible(const QAccessibleInterface *accessible)
+{
+ QWindow *window = accessible->window();
+ if (!window) {
+ QAccessibleInterface *acc = accessible->parent();
+ while (acc && acc->isValid() && !window) {
+ window = acc->window();
+ QAccessibleInterface *par = acc->parent();
+ acc = par;
+ }
+ }
+ return window;
+}
+
+QAccessibleInterface *accessibleForId(QAccessible::Id id)
+{
+ QAccessibleInterface *accessible = QAccessible::accessibleInterface(id);
+ if (!accessible || !accessible->isValid())
+ return nullptr;
+ return accessible;
+}
+
+QAccessible::Id idForAccessible(QAccessibleInterface *accessible)
+{
+ if (!accessible)
+ return QAccessible::Id(0);
+ return QAccessible::uniqueId(accessible);
+}
+
+// Maps an accessibility role ID to an UI Automation control type ID.
+AutomationControlType roleToControlType(QAccessible::Role role)
+{
+ static const QHash<QAccessible::Role, AutomationControlType> mapping {
+ {QAccessible::TitleBar, AutomationControlType::AutomationControlType_TitleBar},
+ {QAccessible::MenuBar, AutomationControlType::AutomationControlType_MenuBar},
+ {QAccessible::ScrollBar, AutomationControlType::AutomationControlType_ScrollBar},
+ {QAccessible::Grip, AutomationControlType::AutomationControlType_Thumb},
+ {QAccessible::Sound, AutomationControlType::AutomationControlType_Custom},
+ {QAccessible::Cursor, AutomationControlType::AutomationControlType_Custom},
+ {QAccessible::Caret, AutomationControlType::AutomationControlType_Custom},
+ {QAccessible::AlertMessage, AutomationControlType::AutomationControlType_Custom},
+ {QAccessible::Window, AutomationControlType::AutomationControlType_Window},
+ {QAccessible::Client, AutomationControlType::AutomationControlType_Custom},
+ {QAccessible::PopupMenu, AutomationControlType::AutomationControlType_Menu},
+ {QAccessible::MenuItem, AutomationControlType::AutomationControlType_MenuItem},
+ {QAccessible::ToolTip, AutomationControlType::AutomationControlType_ToolTip},
+ {QAccessible::Application, AutomationControlType::AutomationControlType_Custom},
+ {QAccessible::Document, AutomationControlType::AutomationControlType_Document},
+ {QAccessible::Pane, AutomationControlType::AutomationControlType_Pane},
+ {QAccessible::Chart, AutomationControlType::AutomationControlType_Custom},
+ {QAccessible::Dialog, AutomationControlType::AutomationControlType_Window},
+ {QAccessible::Border, AutomationControlType::AutomationControlType_Custom},
+ {QAccessible::Grouping, AutomationControlType::AutomationControlType_Group},
+ {QAccessible::Separator, AutomationControlType::AutomationControlType_Separator},
+ {QAccessible::ToolBar, AutomationControlType::AutomationControlType_ToolBar},
+ {QAccessible::StatusBar, AutomationControlType::AutomationControlType_StatusBar},
+ {QAccessible::Table, AutomationControlType::AutomationControlType_Table},
+ {QAccessible::ColumnHeader, AutomationControlType::AutomationControlType_Header},
+ {QAccessible::RowHeader, AutomationControlType::AutomationControlType_Header},
+ {QAccessible::Column, AutomationControlType::AutomationControlType_HeaderItem},
+ {QAccessible::Row, AutomationControlType::AutomationControlType_HeaderItem},
+ {QAccessible::Cell, AutomationControlType::AutomationControlType_DataItem},
+ {QAccessible::Link, AutomationControlType::AutomationControlType_Hyperlink},
+ {QAccessible::HelpBalloon, AutomationControlType::AutomationControlType_ToolTip},
+ {QAccessible::Assistant, AutomationControlType::AutomationControlType_Custom},
+ {QAccessible::List, AutomationControlType::AutomationControlType_List},
+ {QAccessible::ListItem, AutomationControlType::AutomationControlType_ListItem},
+ {QAccessible::Tree, AutomationControlType::AutomationControlType_Tree},
+ {QAccessible::TreeItem, AutomationControlType::AutomationControlType_TreeItem},
+ {QAccessible::PageTab, AutomationControlType::AutomationControlType_TabItem},
+ {QAccessible::PropertyPage, AutomationControlType::AutomationControlType_Custom},
+ {QAccessible::Indicator, AutomationControlType::AutomationControlType_Custom},
+ {QAccessible::Graphic, AutomationControlType::AutomationControlType_Image},
+ {QAccessible::StaticText, AutomationControlType::AutomationControlType_Edit},
+ {QAccessible::EditableText, AutomationControlType::AutomationControlType_Edit},
+ {QAccessible::Button, AutomationControlType::AutomationControlType_Button},
+ {QAccessible::CheckBox, AutomationControlType::AutomationControlType_CheckBox},
+ {QAccessible::RadioButton, AutomationControlType::AutomationControlType_RadioButton},
+ {QAccessible::ComboBox, AutomationControlType::AutomationControlType_ComboBox},
+ {QAccessible::ProgressBar, AutomationControlType::AutomationControlType_ProgressBar},
+ {QAccessible::Dial, AutomationControlType::AutomationControlType_Custom},
+ {QAccessible::HotkeyField, AutomationControlType::AutomationControlType_Custom},
+ {QAccessible::Slider, AutomationControlType::AutomationControlType_Slider},
+ {QAccessible::SpinBox, AutomationControlType::AutomationControlType_Spinner},
+ {QAccessible::Canvas, AutomationControlType::AutomationControlType_Custom},
+ {QAccessible::Animation, AutomationControlType::AutomationControlType_Custom},
+ {QAccessible::Equation, AutomationControlType::AutomationControlType_Custom},
+ {QAccessible::ButtonDropDown, AutomationControlType::AutomationControlType_Button},
+ {QAccessible::ButtonMenu, AutomationControlType::AutomationControlType_Button},
+ {QAccessible::ButtonDropGrid, AutomationControlType::AutomationControlType_Button},
+ {QAccessible::Whitespace, AutomationControlType::AutomationControlType_Custom},
+ {QAccessible::PageTabList, AutomationControlType::AutomationControlType_Tab},
+ {QAccessible::Clock, AutomationControlType::AutomationControlType_Custom},
+ {QAccessible::Splitter, AutomationControlType::AutomationControlType_Custom},
+ };
+
+ return mapping.value(role, AutomationControlType::AutomationControlType_Custom);
+}
+
+// True if a character can be a separator for a text unit.
+bool isTextUnitSeparator(TextUnit unit, const QChar &ch)
+{
+ return (((unit == TextUnit_Word) || (unit == TextUnit_Format)) && ch.isSpace())
+ || ((unit == TextUnit_Line) && (ch.toLatin1() == '\n'));
+}
+
+HRESULT qHString(const QString &str, HSTRING *returnValue)
+{
+ if (!returnValue)
+ return E_INVALIDARG;
+
+ const wchar_t *wstr = reinterpret_cast<const wchar_t *>(str.utf16());
+ return ::WindowsCreateString(wstr, static_cast<UINT32>(::wcslen(wstr)), returnValue);
+}
+
+QString hStrToQStr(const HSTRING &hStr)
+{
+ quint32 len;
+ const wchar_t *wstr = ::WindowsGetStringRawBuffer(hStr, &len);
+ return QString::fromWCharArray(wstr, len);
+}
+
+} // namespace QWinRTUiAutomation
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiautils.h b/src/plugins/platforms/winrt/uiautomation/qwinrtuiautils.h
new file mode 100644
index 0000000000..9519cb4eb5
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiautils.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINRTUIAUTILS_H
+#define QWINRTUIAUTILS_H
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include <QtCore/QString>
+#include <QtCore/qt_windows.h>
+#include <QtGui/QAccessible>
+#include <QtGui/QAccessibleInterface>
+#include <QtGui/QWindow>
+#include <QtCore/QLoggingCategory>
+
+#include <wrl.h>
+#include <windows.ui.xaml.h>
+#include <functional>
+
+QT_BEGIN_NAMESPACE
+
+Q_DECLARE_LOGGING_CATEGORY(lcQpaUiAutomation)
+
+namespace QWinRTUiAutomation {
+
+QWindow *windowForAccessible(const QAccessibleInterface *accessible);
+
+QAccessibleInterface *accessibleForId(QAccessible::Id id);
+
+QAccessible::Id idForAccessible(QAccessibleInterface *accessible);
+
+ABI::Windows::UI::Xaml::Automation::Peers::AutomationControlType roleToControlType(QAccessible::Role role);
+
+bool isTextUnitSeparator(ABI::Windows::UI::Xaml::Automation::Text::TextUnit unit, const QChar &ch);
+
+HRESULT qHString(const QString &str, HSTRING *returnValue);
+
+QString hStrToQStr(const HSTRING &hStr);
+
+} // namespace QWinRTUiAutomation
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
+
+#endif // QWINRTUIAUTILS_H
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiavalueprovider.cpp b/src/plugins/platforms/winrt/uiautomation/qwinrtuiavalueprovider.cpp
new file mode 100644
index 0000000000..21389b74d2
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiavalueprovider.cpp
@@ -0,0 +1,136 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiavalueprovider.h"
+#include "qwinrtuiametadatacache.h"
+#include "qwinrtuiautils.h"
+
+#include <QtGui/QAccessible>
+#include <QtGui/QAccessibleInterface>
+#include <QtCore/QLoggingCategory>
+#include <QtCore/QString>
+#include <QtCore/private/qeventdispatcher_winrt_p.h>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QWinRTUiAutomation;
+using namespace ABI::Windows::UI::Xaml::Automation;
+using namespace ABI::Windows::UI::Xaml::Automation::Provider;
+
+QWinRTUiaValueProvider::QWinRTUiaValueProvider(QAccessible::Id id) :
+ QWinRTUiaBaseProvider(id)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+}
+
+QWinRTUiaValueProvider::~QWinRTUiaValueProvider()
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+}
+
+// True for read-only controls.
+HRESULT STDMETHODCALLTYPE QWinRTUiaValueProvider::get_IsReadOnly(boolean *value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!value)
+ return E_INVALIDARG;
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ *value = (metadata->state().readOnly != 0);
+ return S_OK;
+}
+
+// Returns the value in text form.
+HRESULT STDMETHODCALLTYPE QWinRTUiaValueProvider::get_Value(HSTRING *value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ if (!value)
+ return E_INVALIDARG;
+ QSharedPointer<QWinRTUiaControlMetadata> metadata = QWinRTUiaMetadataCache::instance()->metadataForId(id());
+ return qHString(metadata->value(), value);
+}
+
+// Sets the value associated with the control.
+HRESULT STDMETHODCALLTYPE QWinRTUiaValueProvider::SetValue(HSTRING value)
+{
+ qCDebug(lcQpaUiAutomation) << __FUNCTION__;
+
+ auto accid = id();
+ auto tmpValue = QSharedPointer<QString>(new QString);
+ auto ptrValue = new QSharedPointer<QString>(tmpValue);
+
+ *tmpValue = hStrToQStr(value);
+
+ QEventDispatcherWinRT::runOnMainThread([accid, ptrValue]() {
+
+ if (QAccessibleInterface *accessible = accessibleForId(accid)) {
+
+ // First sets the value as a text.
+ accessible->setText(QAccessible::Value, **ptrValue);
+
+ // Then, if the control supports the value interface (range value)
+ // and the supplied text can be converted to a number, and that number
+ // lies within the min/max limits, sets it as the control's current (numeric) value.
+ if (QAccessibleValueInterface *valueInterface = accessible->valueInterface()) {
+ bool ok = false;
+ double numval = (*ptrValue)->toDouble(&ok);
+ if (ok) {
+ double minimum = valueInterface->minimumValue().toDouble();
+ double maximum = valueInterface->maximumValue().toDouble();
+ if ((numval >= minimum) && (numval <= maximum)) {
+ valueInterface->setCurrentValue(QVariant(numval));
+ }
+ }
+ }
+ }
+ QWinRTUiaMetadataCache::instance()->load(accid);
+ delete ptrValue;
+ return S_OK;
+ }, 0);
+
+ return S_OK;
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
diff --git a/src/plugins/platforms/winrt/uiautomation/qwinrtuiavalueprovider.h b/src/plugins/platforms/winrt/uiautomation/qwinrtuiavalueprovider.h
new file mode 100644
index 0000000000..d9cd5d200d
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/qwinrtuiavalueprovider.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINRTUIAVALUEPROVIDER_H
+#define QWINRTUIAVALUEPROVIDER_H
+
+#include <QtGui/qtguiglobal.h>
+#if QT_CONFIG(accessibility)
+
+#include "qwinrtuiabaseprovider.h"
+
+#include <wrl.h>
+#include <windows.ui.xaml.h>
+
+QT_BEGIN_NAMESPACE
+
+// Implements the Value control pattern provider.
+// Supported for all controls that can return text(QAccessible::Value).
+class QWinRTUiaValueProvider :
+ public QWinRTUiaBaseProvider,
+ public Microsoft::WRL::RuntimeClass<ABI::Windows::UI::Xaml::Automation::Provider::IValueProvider>
+{
+ Q_OBJECT
+ Q_DISABLE_COPY(QWinRTUiaValueProvider)
+ InspectableClass(L"QWinRTUiaValueProvider", BaseTrust);
+
+public:
+ explicit QWinRTUiaValueProvider(QAccessible::Id id);
+ virtual ~QWinRTUiaValueProvider();
+
+ // IValueProvider
+ HRESULT STDMETHODCALLTYPE get_IsReadOnly(boolean *value) override;
+ HRESULT STDMETHODCALLTYPE get_Value(HSTRING *value) override;
+ HRESULT STDMETHODCALLTYPE SetValue(HSTRING value) override;
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_CONFIG(accessibility)
+
+#endif // QWINRTUIAVALUEPROVIDER_H
diff --git a/src/plugins/platforms/winrt/uiautomation/uiautomation.pri b/src/plugins/platforms/winrt/uiautomation/uiautomation.pri
new file mode 100644
index 0000000000..ca0dfae53f
--- /dev/null
+++ b/src/plugins/platforms/winrt/uiautomation/uiautomation.pri
@@ -0,0 +1,45 @@
+
+SOURCES += \
+ $$PWD/qwinrtuiaaccessibility.cpp \
+ $$PWD/qwinrtuiabaseprovider.cpp \
+ $$PWD/qwinrtuiacontrolmetadata.cpp \
+ $$PWD/qwinrtuiagriditemprovider.cpp \
+ $$PWD/qwinrtuiagridprovider.cpp \
+ $$PWD/qwinrtuiainvokeprovider.cpp \
+ $$PWD/qwinrtuiamainprovider.cpp \
+ $$PWD/qwinrtuiametadatacache.cpp \
+ $$PWD/qwinrtuiapeervector.cpp \
+ $$PWD/qwinrtuiaprovidercache.cpp \
+ $$PWD/qwinrtuiarangevalueprovider.cpp \
+ $$PWD/qwinrtuiaselectionitemprovider.cpp \
+ $$PWD/qwinrtuiaselectionprovider.cpp \
+ $$PWD/qwinrtuiatableitemprovider.cpp \
+ $$PWD/qwinrtuiatableprovider.cpp \
+ $$PWD/qwinrtuiatextprovider.cpp \
+ $$PWD/qwinrtuiatextrangeprovider.cpp \
+ $$PWD/qwinrtuiatoggleprovider.cpp \
+ $$PWD/qwinrtuiautils.cpp \
+ $$PWD/qwinrtuiavalueprovider.cpp
+
+HEADERS += \
+ $$PWD/qwinrtuiaaccessibility.h \
+ $$PWD/qwinrtuiabaseprovider.h \
+ $$PWD/qwinrtuiacontrolmetadata.h \
+ $$PWD/qwinrtuiaemptypropertyvalue.h \
+ $$PWD/qwinrtuiagriditemprovider.h \
+ $$PWD/qwinrtuiagridprovider.h \
+ $$PWD/qwinrtuiainvokeprovider.h \
+ $$PWD/qwinrtuiamainprovider.h \
+ $$PWD/qwinrtuiametadatacache.h \
+ $$PWD/qwinrtuiapeervector.h \
+ $$PWD/qwinrtuiaprovidercache.h \
+ $$PWD/qwinrtuiarangevalueprovider.h \
+ $$PWD/qwinrtuiaselectionitemprovider.h \
+ $$PWD/qwinrtuiaselectionprovider.h \
+ $$PWD/qwinrtuiatableitemprovider.h \
+ $$PWD/qwinrtuiatableprovider.h \
+ $$PWD/qwinrtuiatextprovider.h \
+ $$PWD/qwinrtuiatextrangeprovider.h \
+ $$PWD/qwinrtuiatoggleprovider.h \
+ $$PWD/qwinrtuiautils.h \
+ $$PWD/qwinrtuiavalueprovider.h
diff --git a/src/plugins/platforms/winrt/winrt.pro b/src/plugins/platforms/winrt/winrt.pro
index 46371b4880..6a847465e4 100644
--- a/src/plugins/platforms/winrt/winrt.pro
+++ b/src/plugins/platforms/winrt/winrt.pro
@@ -13,6 +13,7 @@ LIBS += -lws2_32 -ld3d11
SOURCES = \
main.cpp \
qwinrtbackingstore.cpp \
+ qwinrtcanvas.cpp \
qwinrtclipboard.cpp \
qwinrtcursor.cpp \
qwinrteglcontext.cpp \
@@ -30,6 +31,7 @@ SOURCES = \
HEADERS = \
qwinrtbackingstore.h \
+ qwinrtcanvas.h \
qwinrtclipboard.h \
qwinrtcursor.h \
qwinrteglcontext.h \
@@ -56,6 +58,8 @@ qtConfig(draganddrop) {
HEADERS += qwinrtdrag.h
}
+qtConfig(accessibility): include($$PWD/uiautomation/uiautomation.pri)
+
PLUGIN_TYPE = platforms
PLUGIN_CLASS_NAME = QWinRTIntegrationPlugin
!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = -
diff --git a/src/plugins/platforms/xcb/README b/src/plugins/platforms/xcb/README
index 8308db46dc..5f238ab261 100644
--- a/src/plugins/platforms/xcb/README
+++ b/src/plugins/platforms/xcb/README
@@ -1,32 +1,7 @@
-Requires libxcb >= 1.5.
-
-PACKAGE DEPENDENCIES
-
-Required packages:
-libxcb1 libxcb1-dev libx11-xcb1 libx11-xcb-dev libxcb-keysyms1 libxcb-keysyms1-dev libxcb-image0 libxcb-image0-dev libxcb-shm0 libxcb-shm0-dev libxcb-icccm1 libxcb-icccm1-dev libxcb-sync0 libxcb-sync0-dev libxcb-render-util0 libxcb-render-util0-dev libxcb-xfixes0-dev libxrender-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-glx0-dev libxcb-xinerama0-dev
-
-On Ubuntu 11.10 icccm1 is replaced by icccm4 and xcb-render-util is not available:
-libxcb1 libxcb1-dev libx11-xcb1 libx11-xcb-dev libxcb-keysyms1 libxcb-keysyms1-dev libxcb-image0 libxcb-image0-dev libxcb-shm0 libxcb-shm0-dev libxcb-icccm4 libxcb-icccm4-dev libxcb-sync0 libxcb-sync0-dev libxcb-xfixes0-dev libxrender-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-glx0-dev libxcb-xinerama0-dev
-The packages for xcb-render-util can be installed manually from http://packages.ubuntu.com/natty/libxcb-render-util0 and http://packages.ubuntu.com/natty/libxcb-render-util0-dev
-
-On Ubuntu 12.04 icccm1 is replaced by icccm4 and xcb-render-util can be installed automatically:
-libxcb1 libxcb1-dev libx11-xcb1 libx11-xcb-dev libxcb-keysyms1 libxcb-keysyms1-dev libxcb-image0 libxcb-image0-dev libxcb-shm0 libxcb-shm0-dev libxcb-icccm4 libxcb-icccm4-dev libxcb-sync0 libxcb-sync0-dev libxcb-xfixes0-dev libxrender-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0 libxcb-render-util0-dev libxcb-glx0-dev libxcb-xinerama0-dev
-
-
-On Fedora, the following packages are required:
-libxcb libxcb-devel libXrender libXrender-devel xcb-util-wm xcb-util-wm-devel xcb-util xcb-util-devel xcb-util-image xcb-util-image-devel xcb-util-keysyms xcb-util-keysyms-devel
+Requires libxcb >= 1.9.1.
REDUCING RUNTIME DEPENDENCIES
The '-qt-xcb' configure option can be used to get rid of most xcb- dependencies. Only libxcb will
still be linked dynamically, since it will be most likely be pulled in via other dependencies anyway.
This should allow for binaries that are portable across most modern Linux distributions.
-
-PACKAGE VERSION REQUIREMENTS
-
-When using touch input via XInput 2.2 or higher, there is a potential issue on systems that ship with
-a libXi older than 1.7.5. This is because XIAllowTouchEvents can deadlock with libXi 1.7.4 and earlier.
-When touch events are never received, this is not an issue, so plain mouse/keyboard systems are not affected.
-Qt versions before 5.8 attempted to recognize this scenario based on the pkg-config package version and skip
-the call. This has been removed starting from 5.8 since relying on pkg-config package versions is unsafe given
-that Qt must also support systems with limited or incomplete pkg-config setups.
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
index b81cb8efa1..e73e6f3e61 100644
--- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp
+++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
@@ -45,6 +45,16 @@
#include <xcb/shm.h>
#include <xcb/xcb_image.h>
+#if QT_CONFIG(xcb_render)
+#include <xcb/render.h>
+// 'template' is used as a function argument name in xcb_renderutil.h
+#define template template_param
+// extern "C" is missing too
+extern "C" {
+#include <xcb/xcb_renderutil.h>
+}
+#undef template
+#endif
#include <sys/ipc.h>
#include <sys/shm.h>
@@ -75,7 +85,7 @@ class QXcbBackingStore;
class QXcbBackingStoreImage : public QXcbObject
{
public:
- QXcbBackingStoreImage(QXcbBackingStore *backingStore, const QSize &size);
+ QXcbBackingStoreImage(QXcbScreen *screen, const QSize &size, uint depth, QImage::Format format);
~QXcbBackingStoreImage() { destroy(true); }
void resize(const QSize &size);
@@ -110,8 +120,9 @@ private:
void flushPixmap(const QRegion &region, bool fullRegion = false);
void setClip(const QRegion &region);
+ xcb_window_t m_screen_root;
+
xcb_shm_segment_info_t m_shm_info;
- QXcbBackingStore *m_backingStore = nullptr;
size_t m_segmentSize = 0;
xcb_image_t *m_xcb_image = nullptr;
@@ -179,17 +190,15 @@ static inline size_t imageDataSize(const xcb_image_t *image)
return static_cast<size_t>(image->stride) * image->height;
}
-QXcbBackingStoreImage::QXcbBackingStoreImage(QXcbBackingStore *backingStore, const QSize &size)
- : QXcbObject(backingStore->connection())
- , m_backingStore(backingStore)
+QXcbBackingStoreImage::QXcbBackingStoreImage(QXcbScreen *screen, const QSize &size, uint depth, QImage::Format format)
+ : QXcbObject(screen->connection())
+ , m_screen_root(screen->screen()->root)
{
- QXcbWindow *window = static_cast<QXcbWindow *>(backingStore->window()->handle());
- const xcb_format_t *fmt = connection()->formatForDepth(window->depth());
+ const xcb_format_t *fmt = connection()->formatForDepth(depth);
Q_ASSERT(fmt);
memset(&m_shm_info, 0, sizeof m_shm_info);
- QImage::Format format = window->imageFormat();
m_hasAlpha = QImage::toPixelFormat(format).alphaUsage() == QPixelFormat::UsesAlpha;
if (!m_hasAlpha)
create(size, fmt, qt_maybeAlphaVersionWithSameDepth(format));
@@ -238,11 +247,10 @@ void QXcbBackingStoreImage::create(const QSize &size, const xcb_format_t *fmt, Q
m_graphics_buffer = new QXcbGraphicsBuffer(&m_qimage);
m_xcb_pixmap = xcb_generate_id(xcb_connection());
- auto xcbScreen = static_cast<QXcbScreen *>(m_backingStore->window()->screen()->handle());
xcb_create_pixmap(xcb_connection(),
m_xcb_image->depth,
m_xcb_pixmap,
- xcbScreen->root(),
+ m_screen_root,
m_xcb_image->width, m_xcb_image->height);
}
@@ -832,7 +840,7 @@ void QXcbBackingStore::flush(QWindow *window, const QRegion &region, const QPoin
return;
}
- m_image->put(platformWindow->xcb_window(), clipped, offset);
+ render(platformWindow->xcb_window(), clipped, offset);
if (platformWindow->needsSync())
platformWindow->updateSyncRequestCounter();
@@ -840,6 +848,11 @@ void QXcbBackingStore::flush(QWindow *window, const QRegion &region, const QPoin
xcb_flush(xcb_connection());
}
+void QXcbBackingStore::render(xcb_window_t window, const QRegion &region, const QPoint &offset)
+{
+ m_image->put(window, region, offset);
+}
+
#ifndef QT_NO_OPENGL
void QXcbBackingStore::composeAndFlush(QWindow *window, const QRegion &region, const QPoint &offset,
QPlatformTextureList *textures,
@@ -873,10 +886,15 @@ void QXcbBackingStore::resize(const QSize &size, const QRegion &)
}
QXcbWindow* win = static_cast<QXcbWindow *>(pw);
+ recreateImage(win, size);
+}
+
+void QXcbBackingStore::recreateImage(QXcbWindow *win, const QSize &size)
+{
if (m_image)
m_image->resize(size);
else
- m_image = new QXcbBackingStoreImage(this, size);
+ m_image = new QXcbBackingStoreImage(win->xcbScreen(), size, win->depth(), win->imageFormat());
// Slow path for bgr888 VNC: Create an additional image, paint into that and
// swap R and B while copying to m_image after each paint.
@@ -893,4 +911,167 @@ bool QXcbBackingStore::scroll(const QRegion &area, int dx, int dy)
return false;
}
+QXcbSystemTrayBackingStore::QXcbSystemTrayBackingStore(QWindow *window)
+ : QXcbBackingStore(window)
+{
+ // We need three different behaviors depending on whether the X11 visual
+ // for the system tray supports an alpha channel, i.e. is 32 bits, and
+ // whether XRender can be used:
+ // 1) if the visual has an alpha channel, then render the window's buffer
+ // directly to the X11 window as usual
+ // 2) else if XRender can be used, then render the window's buffer to Pixmap,
+ // then render Pixmap's contents to the cleared X11 window with
+ // xcb_render_composite()
+ // 3) else grab the X11 window's content and paint it first each time as a
+ // background before rendering the window's buffer to the X11 window
+
+ auto *platformWindow = static_cast<QXcbWindow *>(window->handle());
+ quint8 depth = connection()->primaryScreen()->depthOfVisual(platformWindow->visualId());
+
+ if (depth != 32) {
+ platformWindow->setParentRelativeBackPixmap();
+#if QT_CONFIG(xcb_render)
+ initXRenderMode();
+#endif
+ m_useGrabbedBackgound = !m_usingXRenderMode;
+ }
+}
+
+QXcbSystemTrayBackingStore::~QXcbSystemTrayBackingStore()
+{
+#if QT_CONFIG(xcb_render)
+ if (m_xrenderPicture) {
+ xcb_render_free_picture(xcb_connection(), m_xrenderPicture);
+ m_xrenderPicture = XCB_NONE;
+ }
+ if (m_xrenderPixmap) {
+ xcb_free_pixmap(xcb_connection(), m_xrenderPixmap);
+ m_xrenderPixmap = XCB_NONE;
+ }
+ if (m_windowPicture) {
+ xcb_render_free_picture(xcb_connection(), m_windowPicture);
+ m_windowPicture = XCB_NONE;
+ }
+#endif // QT_CONFIG(xcb_render)
+}
+
+void QXcbSystemTrayBackingStore::beginPaint(const QRegion &region)
+{
+ QXcbBackingStore::beginPaint(region);
+
+ if (m_useGrabbedBackgound) {
+ QPainter p(paintDevice());
+ p.setCompositionMode(QPainter::CompositionMode_Source);
+ for (const QRect &rect: region)
+ p.drawPixmap(rect, m_grabbedBackground, rect);
+ }
+}
+
+void QXcbSystemTrayBackingStore::render(xcb_window_t window, const QRegion &region, const QPoint &offset)
+{
+ if (!m_usingXRenderMode) {
+ QXcbBackingStore::render(window, region, offset);
+ return;
+ }
+
+#if QT_CONFIG(xcb_render)
+ m_image->put(m_xrenderPixmap, region, offset);
+ const QRect bounds = region.boundingRect();
+ const QPoint target = bounds.topLeft();
+ const QRect source = bounds.translated(offset);
+ xcb_clear_area(xcb_connection(), false, window,
+ target.x(), target.y(), source.width(), source.height());
+ xcb_render_composite(xcb_connection(), XCB_RENDER_PICT_OP_OVER,
+ m_xrenderPicture, 0, m_windowPicture,
+ target.x(), target.y(), 0, 0, target.x(), target.y(),
+ source.width(), source.height());
+#endif // QT_CONFIG(xcb_render)
+}
+
+void QXcbSystemTrayBackingStore::recreateImage(QXcbWindow *win, const QSize &size)
+{
+ if (!m_usingXRenderMode) {
+ QXcbBackingStore::recreateImage(win, size);
+
+ if (m_useGrabbedBackgound) {
+ xcb_clear_area(xcb_connection(), false, win->xcb_window(),
+ 0, 0, size.width(), size.height());
+ m_grabbedBackground = win->xcbScreen()->grabWindow(win->winId(), 0, 0,
+ size.width(), size.height());
+ }
+ return;
+ }
+
+#if QT_CONFIG(xcb_render)
+ if (m_xrenderPicture) {
+ xcb_render_free_picture(xcb_connection(), m_xrenderPicture);
+ m_xrenderPicture = XCB_NONE;
+ }
+ if (m_xrenderPixmap) {
+ xcb_free_pixmap(xcb_connection(), m_xrenderPixmap);
+ m_xrenderPixmap = XCB_NONE;
+ }
+
+ QXcbScreen *screen = win->xcbScreen();
+
+ m_xrenderPixmap = xcb_generate_id(xcb_connection());
+ xcb_create_pixmap(xcb_connection(), 32, m_xrenderPixmap, screen->root(), size.width(), size.height());
+
+ m_xrenderPicture = xcb_generate_id(xcb_connection());
+ xcb_render_create_picture(xcb_connection(), m_xrenderPicture, m_xrenderPixmap, m_xrenderPictFormat, 0, 0);
+
+ // XRender expects premultiplied alpha
+ if (m_image)
+ m_image->resize(size);
+ else
+ m_image = new QXcbBackingStoreImage(screen, size, 32, QImage::Format_ARGB32_Premultiplied);
+#endif // QT_CONFIG(xcb_render)
+}
+
+#if QT_CONFIG(xcb_render)
+void QXcbSystemTrayBackingStore::initXRenderMode()
+{
+ if (!connection()->hasXRender())
+ return;
+
+ xcb_connection_t *conn = xcb_connection();
+ auto formatsReply = Q_XCB_REPLY(xcb_render_query_pict_formats, conn);
+
+ if (!formatsReply) {
+ qWarning("QXcbSystemTrayBackingStore: xcb_render_query_pict_formats() failed");
+ return;
+ }
+
+ xcb_render_pictforminfo_t *fmt = xcb_render_util_find_standard_format(formatsReply.get(),
+ XCB_PICT_STANDARD_ARGB_32);
+ if (!fmt) {
+ qWarning("QXcbSystemTrayBackingStore: Failed to find format PICT_STANDARD_ARGB_32");
+ return;
+ }
+
+ m_xrenderPictFormat = fmt->id;
+
+ auto *platformWindow = static_cast<QXcbWindow *>(window()->handle());
+ xcb_render_pictvisual_t *vfmt = xcb_render_util_find_visual_format(formatsReply.get(), platformWindow->visualId());
+
+ if (!vfmt) {
+ qWarning("QXcbSystemTrayBackingStore: Failed to find format for visual %x", platformWindow->visualId());
+ return;
+ }
+
+ m_windowPicture = xcb_generate_id(conn);
+ xcb_void_cookie_t cookie =
+ xcb_render_create_picture_checked(conn, m_windowPicture, platformWindow->xcb_window(), vfmt->format, 0, 0);
+ xcb_generic_error_t *error = xcb_request_check(conn, cookie);
+ if (error) {
+ qWarning("QXcbSystemTrayBackingStore: Failed to create Picture with format %x for window %x, error code %d",
+ vfmt->format, platformWindow->xcb_window(), error->error_code);
+ free(error);
+ return;
+ }
+
+ m_usingXRenderMode = true;
+}
+#endif // QT_CONFIG(xcb_render)
+
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.h b/src/plugins/platforms/xcb/qxcbbackingstore.h
index 734de1f7d7..39d023cb9d 100644
--- a/src/plugins/platforms/xcb/qxcbbackingstore.h
+++ b/src/plugins/platforms/xcb/qxcbbackingstore.h
@@ -77,12 +77,41 @@ public:
static bool createSystemVShmSegment(QXcbConnection *c, size_t segmentSize = 1,
void *shmInfo = nullptr);
-private:
+protected:
+ virtual void render(xcb_window_t window, const QRegion &region, const QPoint &offset);
+ virtual void recreateImage(QXcbWindow *win, const QSize &size);
+
QXcbBackingStoreImage *m_image = nullptr;
QStack<QRegion> m_paintRegions;
QImage m_rgbImage;
};
+class QXcbSystemTrayBackingStore : public QXcbBackingStore
+{
+public:
+ QXcbSystemTrayBackingStore(QWindow *window);
+ ~QXcbSystemTrayBackingStore();
+
+ void beginPaint(const QRegion &) override;
+
+protected:
+ void render(xcb_window_t window, const QRegion &region, const QPoint &offset) override;
+ void recreateImage(QXcbWindow *win, const QSize &size) override;
+
+private:
+#if QT_CONFIG(xcb_render)
+ void initXRenderMode();
+
+ xcb_pixmap_t m_xrenderPixmap = XCB_NONE;
+ xcb_render_picture_t m_xrenderPicture = XCB_NONE;
+ xcb_render_pictformat_t m_xrenderPictFormat = XCB_NONE;
+ xcb_render_picture_t m_windowPicture = XCB_NONE;
+#endif
+ bool m_usingXRenderMode = false;
+ bool m_useGrabbedBackgound = false;
+ QPixmap m_grabbedBackground;
+};
+
QT_END_NAMESPACE
#endif
diff --git a/src/plugins/platforms/xcb/qxcbclipboard.cpp b/src/plugins/platforms/xcb/qxcbclipboard.cpp
index b091928e8c..263ef5fb1f 100644
--- a/src/plugins/platforms/xcb/qxcbclipboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbclipboard.cpp
@@ -42,6 +42,7 @@
#include "qxcbconnection.h"
#include "qxcbscreen.h"
#include "qxcbmime.h"
+#include "qxcbwindow.h"
#include <private/qguiapplication_p.h>
#include <QElapsedTimer>
@@ -276,18 +277,6 @@ QXcbClipboard::QXcbClipboard(QXcbConnection *c)
m_timestamp[QClipboard::Selection] = XCB_CURRENT_TIME;
m_owner = connection()->getQtSelectionOwner();
-#ifndef QT_NO_DEBUG
- QByteArray ba("Qt clipboard window");
- xcb_change_property(xcb_connection(),
- XCB_PROP_MODE_REPLACE,
- m_owner,
- atom(QXcbAtom::_NET_WM_NAME),
- atom(QXcbAtom::UTF8_STRING),
- 8,
- ba.length(),
- ba.constData());
-#endif
-
if (connection()->hasXFixes()) {
const uint32_t mask = XCB_XFIXES_SELECTION_EVENT_MASK_SET_SELECTION_OWNER |
XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_WINDOW_DESTROY |
@@ -467,17 +456,9 @@ xcb_window_t QXcbClipboard::requestor() const
platformScreen->screen()->root_visual, // visual
0, // value mask
0); // value list
-#ifndef QT_NO_DEBUG
- QByteArray ba("Qt clipboard requestor window");
- xcb_change_property(xcb_connection(),
- XCB_PROP_MODE_REPLACE,
- window,
- atom(QXcbAtom::_NET_WM_NAME),
- atom(QXcbAtom::UTF8_STRING),
- 8,
- ba.length(),
- ba.constData());
-#endif
+
+ QXcbWindow::setWindowTitle(connection(), window,
+ QStringLiteral("Qt Clipboard Requestor Window"));
uint32_t mask = XCB_EVENT_MASK_PROPERTY_CHANGE;
xcb_change_window_attributes(xcb_connection(), window, XCB_CW_EVENT_MASK, &mask);
@@ -600,7 +581,7 @@ void QXcbClipboard::handleSelectionRequest(xcb_selection_request_event_t *req)
return;
}
- Q_DECLARE_XCB_EVENT(event, xcb_selection_notify_event_t);
+ q_padded_xcb_event<xcb_selection_notify_event_t> event = {};
event.response_type = XCB_SELECTION_NOTIFY;
event.requestor = req->requestor;
event.selection = req->selection;
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index 20414d0525..b4ccb808a0 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -55,6 +55,7 @@
#include "qxcbsystemtraytracker.h"
#include "qxcbglintegrationfactory.h"
#include "qxcbglintegration.h"
+#include "qxcbcursor.h"
#include "qxcbbackingstore.h"
#include <QSocketNotifier>
@@ -81,8 +82,8 @@
#undef register
#endif
-#if QT_CONFIG(xinput2)
-#include <X11/extensions/XI2proto.h>
+#if QT_CONFIG(xcb_xinput)
+#include <xcb/xinput.h>
#endif
#if QT_CONFIG(xcb_render)
@@ -118,6 +119,7 @@ Q_LOGGING_CATEGORY(lcQpaEvents, "qt.qpa.events")
Q_LOGGING_CATEGORY(lcQpaXcb, "qt.qpa.xcb") // for general (uncategorized) XCB logging
Q_LOGGING_CATEGORY(lcQpaPeeker, "qt.qpa.peeker")
Q_LOGGING_CATEGORY(lcQpaKeyboard, "qt.qpa.xkeyboard")
+Q_LOGGING_CATEGORY(lcQpaXDnd, "qt.qpa.xdnd")
// this event type was added in libxcb 1.10,
// but we support also older version
@@ -125,7 +127,7 @@ Q_LOGGING_CATEGORY(lcQpaKeyboard, "qt.qpa.xkeyboard")
#define XCB_GE_GENERIC 35
#endif
-#if QT_CONFIG(xinput2)
+#if QT_CONFIG(xcb_xinput)
// Starting from the xcb version 1.9.3 struct xcb_ge_event_t has changed:
// - "pad0" became "extension"
// - "pad1" and "pad" became "pad0"
@@ -143,7 +145,7 @@ static inline bool isXIEvent(xcb_generic_event_t *event, int opCode)
qt_xcb_ge_event_t *e = reinterpret_cast<qt_xcb_ge_event_t *>(event);
return e->extension == opCode;
}
-#endif // QT_CONFIG(xinput2)
+#endif // QT_CONFIG(xcb_xinput)
#if QT_CONFIG(xcb_xlib)
static const char * const xcbConnectionErrors[] = {
@@ -578,6 +580,9 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra
#if QT_CONFIG(xcb_render)
&xcb_render_id,
#endif
+#if QT_CONFIG(xcb_xinput)
+ &xcb_input_id,
+#endif
0
};
@@ -588,6 +593,7 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra
initializeAllAtoms();
+ initializeXSync();
if (!qEnvironmentVariableIsSet("QT_XCB_NO_MITSHM"))
initializeShm();
if (!qEnvironmentVariableIsSet("QT_XCB_NO_XRANDR"))
@@ -598,7 +604,7 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra
initializeScreens();
initializeXRender();
-#if QT_CONFIG(xinput2)
+#if QT_CONFIG(xcb_xinput)
if (!qEnvironmentVariableIsSet("QT_XCB_NO_XI2"))
initializeXInput2();
#endif
@@ -1111,13 +1117,13 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
handleClientMessageEvent((xcb_client_message_event_t *)event);
break;
case XCB_ENTER_NOTIFY:
-#if QT_CONFIG(xinput2)
+#if QT_CONFIG(xcb_xinput)
if (hasXInput2() && !xi2MouseEventsDisabled())
break;
#endif
HANDLE_PLATFORM_WINDOW_EVENT(xcb_enter_notify_event_t, event, handleEnterNotifyEvent);
case XCB_LEAVE_NOTIFY:
-#if QT_CONFIG(xinput2)
+#if QT_CONFIG(xcb_xinput)
if (hasXInput2() && !xi2MouseEventsDisabled())
break;
#endif
@@ -1180,7 +1186,7 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
}
break;
}
-#if QT_CONFIG(xinput2)
+#if QT_CONFIG(xcb_xinput)
case XCB_GE_GENERIC:
// Here the windowEventListener is invoked from xi2HandleEvent()
if (hasXInput2() && isXIEvent(event, m_xiOpCode))
@@ -1550,6 +1556,9 @@ xcb_window_t QXcbConnection::getQtSelectionOwner()
xcbScreen->root_visual, // visual
0, // value mask
0); // value list
+
+ QXcbWindow::setWindowTitle(connection(), m_qtSelectionOwner,
+ QStringLiteral("Qt Selection Window"));
}
return m_qtSelectionOwner;
}
@@ -1574,17 +1583,11 @@ xcb_window_t QXcbConnection::clientLeader()
XCB_WINDOW_CLASS_INPUT_OUTPUT,
screen->screen()->root_visual,
0, 0);
-#ifndef QT_NO_DEBUG
- QByteArray ba("Qt client leader window");
- xcb_change_property(xcb_connection(),
- XCB_PROP_MODE_REPLACE,
- m_clientLeader,
- atom(QXcbAtom::_NET_WM_NAME),
- atom(QXcbAtom::UTF8_STRING),
- 8,
- ba.length(),
- ba.constData());
-#endif
+
+
+ QXcbWindow::setWindowTitle(connection(), m_clientLeader,
+ QStringLiteral("Qt Client Leader Window"));
+
xcb_change_property(xcb_connection(),
XCB_PROP_MODE_REPLACE,
m_clientLeader,
@@ -1612,39 +1615,14 @@ xcb_window_t QXcbConnection::clientLeader()
return m_clientLeader;
}
-#if QT_CONFIG(xcb_xlib)
-void *QXcbConnection::xlib_display() const
-{
- return m_xlib_display;
-}
-
-void *QXcbConnection::createVisualInfoForDefaultVisualId() const
-{
- if (m_defaultVisualId == UINT_MAX)
- return 0;
- XVisualInfo info;
- memset(&info, 0, sizeof info);
- info.visualid = m_defaultVisualId;
-
- int count = 0;
- Display *dpy = static_cast<Display *>(connection()->xlib_display());
- XVisualInfo *retVisual = XGetVisualInfo(dpy, VisualIDMask, &info, &count);
- Q_ASSERT(count < 2);
- return retVisual;
-}
-
-#endif
-
-#if QT_CONFIG(xinput2)
-// it is safe to cast XI_* events here as long as we are only touching the first 32 bytes,
-// after that position event needs memmove, see xi2PrepareXIGenericDeviceEvent
+#if QT_CONFIG(xcb_xinput)
static inline bool isXIType(xcb_generic_event_t *event, int opCode, uint16_t type)
{
if (!isXIEvent(event, opCode))
return false;
- xXIGenericDeviceEvent *xiEvent = reinterpret_cast<xXIGenericDeviceEvent *>(event);
- return xiEvent->evtype == type;
+ auto *e = reinterpret_cast<qt_xcb_ge_event_t *>(event);
+ return e->event_type == type;
}
#endif
static inline bool isValid(xcb_generic_event_t *event)
@@ -1680,49 +1658,45 @@ bool QXcbConnection::compressEvent(xcb_generic_event_t *event, int currentIndex,
}
return false;
}
-#if QT_CONFIG(xinput2)
+#if QT_CONFIG(xcb_xinput)
// compress XI_* events
if (responseType == XCB_GE_GENERIC) {
if (!hasXInput2())
return false;
// compress XI_Motion
- if (isXIType(event, m_xiOpCode, XI_Motion)) {
+ if (isXIType(event, m_xiOpCode, XCB_INPUT_MOTION)) {
#if QT_CONFIG(tabletevent)
- xXIDeviceEvent *xdev = reinterpret_cast<xXIDeviceEvent *>(event);
- // Xlib's XI2 events need memmove, see xi2PrepareXIGenericDeviceEvent()
- auto sourceId = *reinterpret_cast<uint16_t *>(reinterpret_cast<char *>(&xdev->sourceid) + 4);
+ auto *xdev = reinterpret_cast<xcb_input_motion_event_t *>(event);
if (!QCoreApplication::testAttribute(Qt::AA_CompressTabletEvents) &&
- const_cast<QXcbConnection *>(this)->tabletDataForDevice(sourceId))
+ const_cast<QXcbConnection *>(this)->tabletDataForDevice(xdev->sourceid))
return false;
#endif // QT_CONFIG(tabletevent)
for (int j = nextIndex; j < eventqueue->size(); ++j) {
xcb_generic_event_t *next = eventqueue->at(j);
if (!isValid(next))
continue;
- if (isXIType(next, m_xiOpCode, XI_Motion))
+ if (isXIType(next, m_xiOpCode, XCB_INPUT_MOTION))
return true;
}
return false;
}
-#ifdef XCB_USE_XINPUT22
// compress XI_TouchUpdate for the same touch point id
- if (isXIType(event, m_xiOpCode, XI_TouchUpdate)) {
- xXIDeviceEvent *xiDeviceEvent = reinterpret_cast<xXIDeviceEvent *>(event);
- uint32_t id = xiDeviceEvent->detail % INT_MAX;
+ if (isXIType(event, m_xiOpCode, XCB_INPUT_TOUCH_UPDATE)) {
+ auto *touchUpdateEvent = reinterpret_cast<xcb_input_touch_update_event_t *>(event);
+ uint32_t id = touchUpdateEvent->detail % INT_MAX;
for (int j = nextIndex; j < eventqueue->size(); ++j) {
xcb_generic_event_t *next = eventqueue->at(j);
if (!isValid(next))
continue;
- if (isXIType(next, m_xiOpCode, XI_TouchUpdate)) {
- xXIDeviceEvent *xiDeviceNextEvent = reinterpret_cast<xXIDeviceEvent *>(next);
- if (id == xiDeviceNextEvent->detail % INT_MAX)
+ if (isXIType(next, m_xiOpCode, XCB_INPUT_TOUCH_UPDATE)) {
+ auto *touchUpdateNextEvent = reinterpret_cast<xcb_input_touch_update_event_t *>(next);
+ if (id == touchUpdateNextEvent->detail % INT_MAX)
return true;
}
}
return false;
}
-#endif
return false;
}
#endif
@@ -1848,6 +1822,7 @@ static const char * xcb_atomnames = {
"WM_CLIENT_LEADER\0"
"WM_WINDOW_ROLE\0"
"SM_CLIENT_ID\0"
+ "WM_CLIENT_MACHINE\0"
// Clipboard
"CLIPBOARD\0"
@@ -2039,10 +2014,7 @@ void QXcbConnection::initializeAllAtoms() {
++ptr;
}
- Q_ASSERT(i == QXcbAtom::NPredefinedAtoms);
-
- const QByteArray settings_atom_name = "_QT_SETTINGS_TIMESTAMP_" + m_displayName;
- names[i++] = settings_atom_name;
+ Q_ASSERT(i == QXcbAtom::NAtoms);
xcb_intern_atom_cookie_t cookies[QXcbAtom::NAtoms];
@@ -2295,6 +2267,15 @@ void QXcbConnection::initializeXKB()
#endif
}
+void QXcbConnection::initializeXSync()
+{
+ const xcb_query_extension_reply_t *reply = xcb_get_extension_data(xcb_connection(), &xcb_sync_id);
+ if (!reply || !reply->present)
+ return;
+
+ has_sync_extension = true;
+}
+
QXcbSystemTrayTracker *QXcbConnection::systemTrayTracker() const
{
if (!m_systemTrayTracker) {
@@ -2307,20 +2288,18 @@ QXcbSystemTrayTracker *QXcbConnection::systemTrayTracker() const
return m_systemTrayTracker;
}
-bool QXcbConnection::xEmbedSystemTrayAvailable()
+Qt::MouseButtons QXcbConnection::queryMouseButtons() const
{
- if (!QGuiApplicationPrivate::platformIntegration())
- return false;
- QXcbConnection *connection = static_cast<QXcbIntegration *>(QGuiApplicationPrivate::platformIntegration())->defaultConnection();
- return connection->systemTrayTracker();
+ int stateMask = 0;
+ QXcbCursor::queryPointer(connection(), 0, 0, &stateMask);
+ return translateMouseButtons(stateMask);
}
-bool QXcbConnection::xEmbedSystemTrayVisualHasAlphaChannel()
+Qt::KeyboardModifiers QXcbConnection::queryKeyboardModifiers() const
{
- if (!QGuiApplicationPrivate::platformIntegration())
- return false;
- QXcbConnection *connection = static_cast<QXcbIntegration *>(QGuiApplicationPrivate::platformIntegration())->defaultConnection();
- return connection->systemTrayTracker() && connection->systemTrayTracker()->visualHasAlphaChannel();
+ int stateMask = 0;
+ QXcbCursor::queryPointer(connection(), 0, 0, &stateMask);
+ return keyboard()->translateModifiers(stateMask);
}
bool QXcbConnection::event(QEvent *e)
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h
index 583659ea81..fa39bf6874 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.h
+++ b/src/plugins/platforms/xcb/qxcbconnection.h
@@ -71,16 +71,6 @@
#include <QTabletEvent>
#endif
-#if QT_CONFIG(xinput2)
-#include <X11/extensions/XI2.h>
-#ifdef XIScrollClass
-#define XCB_USE_XINPUT21 // XI 2.1 adds smooth scrolling support
-#ifdef XI_TouchBeginMask
-#define XCB_USE_XINPUT22 // XI 2.2 adds multi-point touch support
-#endif
-#endif
-#endif // QT_CONFIG(xinput2)
-
struct xcb_randr_get_output_info_reply_t;
QT_BEGIN_NAMESPACE
@@ -93,6 +83,7 @@ Q_DECLARE_LOGGING_CATEGORY(lcQpaEvents)
Q_DECLARE_LOGGING_CATEGORY(lcQpaXcb)
Q_DECLARE_LOGGING_CATEGORY(lcQpaPeeker)
Q_DECLARE_LOGGING_CATEGORY(lcQpaKeyboard)
+Q_DECLARE_LOGGING_CATEGORY(lcQpaXDnd)
class QXcbVirtualDesktop;
class QXcbScreen;
@@ -128,6 +119,7 @@ namespace QXcbAtom {
WM_CLIENT_LEADER,
WM_WINDOW_ROLE,
SM_CLIENT_ID,
+ WM_CLIENT_MACHINE,
// Clipboard
CLIPBOARD,
@@ -303,9 +295,6 @@ namespace QXcbAtom {
_COMPIZ_TOOLKIT_ACTION,
_GTK_LOAD_ICONTHEMES,
- NPredefinedAtoms,
-
- _QT_SETTINGS_TIMESTAMP = NPredefinedAtoms,
NAtoms
};
}
@@ -362,7 +351,7 @@ public:
virtual void handleFocusInEvent(const xcb_focus_in_event_t *) {}
virtual void handleFocusOutEvent(const xcb_focus_out_event_t *) {}
virtual void handlePropertyNotifyEvent(const xcb_property_notify_event_t *) {}
-#if QT_CONFIG(xinput2)
+#if QT_CONFIG(xcb_xinput)
virtual void handleXIMouseEvent(xcb_ge_event_t *, Qt::MouseEventSource = Qt::MouseEventNotSynthesized) {}
virtual void handleXIEnterLeave(xcb_ge_event_t *) {}
#endif
@@ -436,8 +425,7 @@ public:
xcb_visualid_t defaultVisualId() const { return m_defaultVisualId; }
#if QT_CONFIG(xcb_xlib)
- void *xlib_display() const;
- void *createVisualInfoForDefaultVisualId() const;
+ void *xlib_display() const { return m_xlib_display; }
#endif
void sync();
@@ -488,6 +476,7 @@ public:
bool hasXInput2() const { return m_xi2Enabled; }
bool hasShm() const { return has_shm; }
bool hasShmFd() const { return has_shm_fd; }
+ bool hasXSync() const { return has_sync_extension; }
bool threadedEventHandling() const { return m_reader->isRunning(); }
@@ -517,10 +506,11 @@ public:
QXcbNativeInterface *nativeInterface() const { return m_nativeInterface; }
QXcbSystemTrayTracker *systemTrayTracker() const;
- static bool xEmbedSystemTrayAvailable();
- static bool xEmbedSystemTrayVisualHasAlphaChannel();
-#if QT_CONFIG(xinput2)
+ Qt::MouseButtons queryMouseButtons() const;
+ Qt::KeyboardModifiers queryKeyboardModifiers() const;
+
+#if QT_CONFIG(xcb_xinput)
void xi2SelectStateEvents();
void xi2SelectDeviceEvents(xcb_window_t window);
void xi2SelectDeviceEventsCompatibility(xcb_window_t window);
@@ -529,14 +519,10 @@ public:
bool isAtLeastXI21() const { return m_xi2Enabled && m_xi2Minor >= 1; }
bool isAtLeastXI22() const { return m_xi2Enabled && m_xi2Minor >= 2; }
Qt::MouseButton xiToQtMouseButton(uint32_t b);
-#ifdef XCB_USE_XINPUT21
void xi2UpdateScrollingDevices();
-#endif
-#ifdef XCB_USE_XINPUT22
bool startSystemMoveResizeForTouchBegin(xcb_window_t window, const QPoint &point, int corner);
bool isTouchScreen(int id);
#endif
-#endif
QXcbEventReader *eventReader() const { return m_reader; }
bool canGrab() const { return m_canGrabServer; }
@@ -562,6 +548,7 @@ private:
void initializeXinerama();
void initializeXShape();
void initializeXKB();
+ void initializeXSync();
void handleClientMessageEvent(const xcb_client_message_event_t *event);
QXcbScreen* findScreenForCrtc(xcb_window_t rootWindow, xcb_randr_crtc_t crtc) const;
QXcbScreen* findScreenForOutput(xcb_window_t rootWindow, xcb_randr_output_t output) const;
@@ -577,7 +564,7 @@ private:
bool compressEvent(xcb_generic_event_t *event, int currentIndex, QXcbEventArray *eventqueue) const;
bool m_xi2Enabled = false;
-#if QT_CONFIG(xinput2)
+#if QT_CONFIG(xcb_xinput)
int m_xi2Minor = -1;
void initializeXInput2();
void xi2SetupDevice(void *info, bool removeExisting = true);
@@ -605,10 +592,8 @@ private:
void xi2HandleEvent(xcb_ge_event_t *event);
void xi2HandleHierarchyEvent(void *event);
void xi2HandleDeviceChangedEvent(void *event);
- int m_xiOpCode, m_xiEventBase, m_xiErrorBase;
-#ifdef XCB_USE_XINPUT22
+ int m_xiOpCode;
void xi2ProcessTouch(void *xiDevEvent, QXcbWindow *platformWindow);
-#endif // XCB_USE_XINPUT22
#if QT_CONFIG(tabletevent)
struct TabletData {
int deviceId = 0;
@@ -643,14 +628,11 @@ private:
QPointF lastScrollPosition;
};
QHash<int, ScrollingDevice> m_scrollingDevices;
-#ifdef XCB_USE_XINPUT21
void xi2HandleScrollEvent(void *event, ScrollingDevice &scrollingDevice);
void xi2UpdateScrollingDevice(ScrollingDevice &scrollingDevice);
ScrollingDevice *scrollingDeviceForId(int id);
-#endif
static bool xi2GetValuatorValueIfSet(const void *event, int valuatorNum, double *value);
- static void xi2PrepareXIGenericDeviceEvent(xcb_ge_event_t *event);
#endif
xcb_connection_t *m_connection = nullptr;
@@ -684,9 +666,8 @@ private:
#endif
QXcbEventReader *m_reader = nullptr;
-#if QT_CONFIG(xinput2)
+#if QT_CONFIG(xcb_xinput)
QHash<int, TouchDeviceData> m_touchDevices;
-#ifdef XCB_USE_XINPUT22
struct StartSystemMoveResizeInfo {
xcb_window_t window = XCB_NONE;
uint16_t deviceid;
@@ -694,7 +675,6 @@ private:
int corner;
} m_startSystemMoveResizeInfo;
#endif
-#endif
WindowMapper m_mapper;
QVector<PeekFunc> m_peekFuncs;
@@ -702,6 +682,9 @@ private:
uint32_t xfixes_first_event = 0;
uint32_t xrandr_first_event = 0;
uint32_t xkb_first_event = 0;
+#if QT_CONFIG(xcb_xinput)
+ uint32_t xinput_first_event = 0;
+#endif
bool has_xfixes = false;
bool has_xinerama_extension = false;
@@ -712,6 +695,7 @@ private:
bool has_render_extension = false;
bool has_shm = false;
bool has_shm_fd = false;
+ bool has_sync_extension = false;
QPair<int, int> m_xrenderVersion;
@@ -737,7 +721,7 @@ private:
QHash<qint32, qint32> m_peekerToCachedIndex;
friend class QXcbEventReader;
};
-#if QT_CONFIG(xinput2)
+#if QT_CONFIG(xcb_xinput)
#if QT_CONFIG(tabletevent)
Q_DECLARE_TYPEINFO(QXcbConnection::TabletData::ValuatorClassInfo, Q_PRIMITIVE_TYPE);
Q_DECLARE_TYPEINFO(QXcbConnection::TabletData, Q_MOVABLE_TYPE);
@@ -787,18 +771,11 @@ struct QStdFreeDeleter {
call##_reply(Q_XCB_REPLY_CONNECTION_ARG(__VA_ARGS__), call##_unchecked(__VA_ARGS__), nullptr) \
)
-template <typename T>
-union q_padded_xcb_event {
- T event;
- char padding[32];
-};
-
// The xcb_send_event() requires all events to have 32 bytes. It calls memcpy() on the
// passed in event. If the passed in event is less than 32 bytes, memcpy() reaches into
// unrelated memory.
-#define Q_DECLARE_XCB_EVENT(event_var, event_type) \
- q_padded_xcb_event<event_type> store = {}; \
- auto &event_var = store.event;
+template <typename T>
+struct alignas(32) q_padded_xcb_event : T { };
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
index e6e0ee988c..7ed61bff4e 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
@@ -47,59 +47,51 @@
#include <QDebug>
#include <cmath>
-#include <X11/extensions/XInput2.h>
-#include <X11/extensions/XI2proto.h>
+#include <xcb/xinput.h>
+
+using qt_xcb_input_device_event_t = xcb_input_button_press_event_t;
void QXcbConnection::initializeXInput2()
{
- Display *xDisplay = static_cast<Display *>(m_xlib_display);
- if (XQueryExtension(xDisplay, "XInputExtension", &m_xiOpCode, &m_xiEventBase, &m_xiErrorBase)) {
- int xiMajor = 2;
-#if defined(XCB_USE_XINPUT22)
- m_xi2Minor = 2; // for touch support 2.2 is enough
-#elif defined(XCB_USE_XINPUT21)
- m_xi2Minor = 1; // for smooth scrolling 2.1 is enough
-#else
- m_xi2Minor = 0; // for tablet support 2.0 is enough
-#endif
- qCDebug(lcQpaXInput, "Plugin build with support for XInput 2 version up "
- "to %d.%d", xiMajor, m_xi2Minor);
-
- switch (XIQueryVersion(xDisplay, &xiMajor, &m_xi2Minor)) {
- case Success:
- // Server's supported version can be lower than the version we have
- // announced to support. In this case Qt client will be limited by
- // X server's supported version.
- qCDebug(lcQpaXInput, "Using XInput version %d.%d", xiMajor, m_xi2Minor);
- m_xi2Enabled = true;
- xi2SetupDevices();
- xi2SelectStateEvents();
- break;
- case BadRequest: // Must be an X server with XInput 1
- qCDebug(lcQpaXInput, "X server does not support XInput 2");
- break;
- default: // BadValue
- qCDebug(lcQpaXInput, "Internal error");
- break;
- }
+ const xcb_query_extension_reply_t *reply = xcb_get_extension_data(m_connection, &xcb_input_id);
+ if (!reply || !reply->present) {
+ qCDebug(lcQpaXInput, "XInput extension is not present on the X server");
+ return;
+ }
+
+ m_xiOpCode = reply->major_opcode;
+ xinput_first_event = reply->first_event;
+
+ auto xinput_query = Q_XCB_REPLY(xcb_input_xi_query_version, m_connection, 2, 2);
+
+ if (!xinput_query || xinput_query->major_version != 2) {
+ qCWarning(lcQpaXInput, "X server does not support XInput 2");
+ } else {
+ qCDebug(lcQpaXInput, "Using XInput version %d.%d",
+ xinput_query->major_version, xinput_query->minor_version);
+ m_xi2Minor = xinput_query->minor_version;
+ m_xi2Enabled = true;
+ xi2SetupDevices();
+ xi2SelectStateEvents();
}
}
+struct qt_xcb_input_event_mask_t {
+ xcb_input_event_mask_t header;
+ uint32_t mask;
+};
+
void QXcbConnection::xi2SelectStateEvents()
{
// These state events do not depend on a specific X window, but are global
// for the X client's (application's) state.
- unsigned int bitMask = 0;
- unsigned char *xiBitMask = reinterpret_cast<unsigned char *>(&bitMask);
- XIEventMask xiEventMask;
- bitMask = XI_HierarchyChangedMask;
- bitMask |= XI_DeviceChangedMask;
- bitMask |= XI_PropertyEventMask;
- xiEventMask.deviceid = XIAllDevices;
- xiEventMask.mask_len = sizeof(bitMask);
- xiEventMask.mask = xiBitMask;
- Display *dpy = static_cast<Display *>(m_xlib_display);
- XISelectEvents(dpy, DefaultRootWindow(dpy), &xiEventMask, 1);
+ qt_xcb_input_event_mask_t xiEventMask;
+ xiEventMask.header.deviceid = XCB_INPUT_DEVICE_ALL;
+ xiEventMask.header.mask_len = 1;
+ xiEventMask.mask = XCB_INPUT_XI_EVENT_MASK_HIERARCHY;
+ xiEventMask.mask |= XCB_INPUT_XI_EVENT_MASK_DEVICE_CHANGED;
+ xiEventMask.mask |= XCB_INPUT_XI_EVENT_MASK_PROPERTY;
+ xcb_input_xi_select_events(m_connection, rootWindow(), 1, &xiEventMask.header);
}
void QXcbConnection::xi2SelectDeviceEvents(xcb_window_t window)
@@ -107,38 +99,42 @@ void QXcbConnection::xi2SelectDeviceEvents(xcb_window_t window)
if (window == rootWindow())
return;
- unsigned int bitMask = 0;
- unsigned char *xiBitMask = reinterpret_cast<unsigned char *>(&bitMask);
- bitMask |= XI_ButtonPressMask;
- bitMask |= XI_ButtonReleaseMask;
- bitMask |= XI_MotionMask;
+ uint32_t bitMask = XCB_INPUT_XI_EVENT_MASK_BUTTON_PRESS;
+ bitMask |= XCB_INPUT_XI_EVENT_MASK_BUTTON_RELEASE;
+ bitMask |= XCB_INPUT_XI_EVENT_MASK_MOTION;
// There is a check for enter/leave events in plain xcb enter/leave event handler,
// core enter/leave events will be ignored in this case.
- bitMask |= XI_EnterMask;
- bitMask |= XI_LeaveMask;
-#ifdef XCB_USE_XINPUT22
+ bitMask |= XCB_INPUT_XI_EVENT_MASK_ENTER;
+ bitMask |= XCB_INPUT_XI_EVENT_MASK_LEAVE;
if (isAtLeastXI22()) {
- bitMask |= XI_TouchBeginMask;
- bitMask |= XI_TouchUpdateMask;
- bitMask |= XI_TouchEndMask;
+ bitMask |= XCB_INPUT_XI_EVENT_MASK_TOUCH_BEGIN;
+ bitMask |= XCB_INPUT_XI_EVENT_MASK_TOUCH_UPDATE;
+ bitMask |= XCB_INPUT_XI_EVENT_MASK_TOUCH_END;
}
-#endif
- XIEventMask mask;
- mask.mask_len = sizeof(bitMask);
- mask.mask = xiBitMask;
- mask.deviceid = XIAllMasterDevices;
- Display *dpy = static_cast<Display *>(m_xlib_display);
- Status result = XISelectEvents(dpy, window, &mask, 1);
- if (result == Success)
+ qt_xcb_input_event_mask_t mask;
+ mask.header.deviceid = XCB_INPUT_DEVICE_ALL_MASTER;
+ mask.header.mask_len = 1;
+ mask.mask = bitMask;
+ xcb_void_cookie_t cookie =
+ xcb_input_xi_select_events_checked(m_connection, window, 1, &mask.header);
+ xcb_generic_error_t *error = xcb_request_check(m_connection, cookie);
+ if (error) {
+ qCDebug(lcQpaXInput, "failed to select events, window %x, error code %d", window, error->error_code);
+ free(error);
+ } else {
QWindowSystemInterfacePrivate::TabletEvent::setPlatformSynthesizesMouse(false);
- else
- qCDebug(lcQpaXInput, "failed to select events, window %x, result %d", window, result);
+ }
+}
+
+static inline qreal fixed3232ToReal(xcb_input_fp3232_t val)
+{
+ return qreal(val.integral) + qreal(val.frac) / (1ULL << 32);
}
void QXcbConnection::xi2SetupDevice(void *info, bool removeExisting)
{
- XIDeviceInfo *deviceInfo = reinterpret_cast<XIDeviceInfo *>(info);
+ auto *deviceInfo = reinterpret_cast<xcb_input_xi_device_info_t *>(info);
if (removeExisting) {
#if QT_CONFIG(tabletevent)
for (int i = 0; i < m_tabletData.count(); ++i) {
@@ -152,53 +148,54 @@ void QXcbConnection::xi2SetupDevice(void *info, bool removeExisting)
m_touchDevices.remove(deviceInfo->deviceid);
}
- qCDebug(lcQpaXInputDevices) << "input device " << deviceInfo->name << "ID" << deviceInfo->deviceid;
+ qCDebug(lcQpaXInputDevices) << "input device " << xcb_input_xi_device_info_name(deviceInfo) << "ID" << deviceInfo->deviceid;
#if QT_CONFIG(tabletevent)
TabletData tabletData;
#endif
ScrollingDevice scrollingDevice;
- for (int c = 0; c < deviceInfo->num_classes; ++c) {
- XIAnyClassInfo *classinfo = deviceInfo->classes[c];
+ auto classes_it = xcb_input_xi_device_info_classes_iterator(deviceInfo);
+ for (; classes_it.rem; xcb_input_device_class_next(&classes_it)) {
+ xcb_input_device_class_t *classinfo = classes_it.data;
switch (classinfo->type) {
- case XIValuatorClass: {
- XIValuatorClassInfo *vci = reinterpret_cast<XIValuatorClassInfo *>(classinfo);
+ case XCB_INPUT_DEVICE_CLASS_TYPE_VALUATOR: {
+ auto *vci = reinterpret_cast<xcb_input_valuator_class_t *>(classinfo);
const int valuatorAtom = qatom(vci->label);
qCDebug(lcQpaXInputDevices) << " has valuator" << atomName(vci->label) << "recognized?" << (valuatorAtom < QXcbAtom::NAtoms);
#if QT_CONFIG(tabletevent)
if (valuatorAtom < QXcbAtom::NAtoms) {
TabletData::ValuatorClassInfo info;
- info.minVal = vci->min;
- info.maxVal = vci->max;
+ info.minVal = fixed3232ToReal(vci->min);
+ info.maxVal = fixed3232ToReal(vci->max);
info.number = vci->number;
tabletData.valuatorInfo[valuatorAtom] = info;
}
#endif // QT_CONFIG(tabletevent)
if (valuatorAtom == QXcbAtom::RelHorizScroll || valuatorAtom == QXcbAtom::RelHorizWheel)
- scrollingDevice.lastScrollPosition.setX(vci->value);
+ scrollingDevice.lastScrollPosition.setX(fixed3232ToReal(vci->value));
else if (valuatorAtom == QXcbAtom::RelVertScroll || valuatorAtom == QXcbAtom::RelVertWheel)
- scrollingDevice.lastScrollPosition.setY(vci->value);
+ scrollingDevice.lastScrollPosition.setY(fixed3232ToReal(vci->value));
break;
}
-#ifdef XCB_USE_XINPUT21
- case XIScrollClass: {
- XIScrollClassInfo *sci = reinterpret_cast<XIScrollClassInfo *>(classinfo);
- if (sci->scroll_type == XIScrollTypeVertical) {
+ case XCB_INPUT_DEVICE_CLASS_TYPE_SCROLL: {
+ auto *sci = reinterpret_cast<xcb_input_scroll_class_t *>(classinfo);
+ if (sci->scroll_type == XCB_INPUT_SCROLL_TYPE_VERTICAL) {
scrollingDevice.orientations |= Qt::Vertical;
scrollingDevice.verticalIndex = sci->number;
- scrollingDevice.verticalIncrement = sci->increment;
- }
- else if (sci->scroll_type == XIScrollTypeHorizontal) {
+ scrollingDevice.verticalIncrement = fixed3232ToReal(sci->increment);
+ } else if (sci->scroll_type == XCB_INPUT_SCROLL_TYPE_HORIZONTAL) {
scrollingDevice.orientations |= Qt::Horizontal;
scrollingDevice.horizontalIndex = sci->number;
- scrollingDevice.horizontalIncrement = sci->increment;
+ scrollingDevice.horizontalIncrement = fixed3232ToReal(sci->increment);
}
break;
}
- case XIButtonClass: {
- XIButtonClassInfo *bci = reinterpret_cast<XIButtonClassInfo *>(classinfo);
+ case XCB_INPUT_DEVICE_CLASS_TYPE_BUTTON: {
+ auto *bci = reinterpret_cast<xcb_input_button_class_t *>(classinfo);
+ xcb_atom_t *labels = 0;
if (bci->num_buttons >= 5) {
- Atom label4 = bci->labels[3];
- Atom label5 = bci->labels[4];
+ labels = xcb_input_button_class_labels(bci);
+ xcb_atom_t label4 = labels[3];
+ xcb_atom_t label5 = labels[4];
// Some drivers have no labels on the wheel buttons, some have no label on just one and some have no label on
// button 4 and the wrong one on button 5. So we just check that they are not labelled with unrelated buttons.
if ((!label4 || qatom(label4) == QXcbAtom::ButtonWheelUp || qatom(label4) == QXcbAtom::ButtonWheelDown) &&
@@ -206,23 +203,20 @@ void QXcbConnection::xi2SetupDevice(void *info, bool removeExisting)
scrollingDevice.legacyOrientations |= Qt::Vertical;
}
if (bci->num_buttons >= 7) {
- Atom label6 = bci->labels[5];
- Atom label7 = bci->labels[6];
+ xcb_atom_t label6 = labels[5];
+ xcb_atom_t label7 = labels[6];
if ((!label6 || qatom(label6) == QXcbAtom::ButtonHorizWheelLeft) && (!label7 || qatom(label7) == QXcbAtom::ButtonHorizWheelRight))
scrollingDevice.legacyOrientations |= Qt::Horizontal;
}
qCDebug(lcQpaXInputDevices, " has %d buttons", bci->num_buttons);
break;
}
-#endif
- case XIKeyClass:
+ case XCB_INPUT_DEVICE_CLASS_TYPE_KEY:
qCDebug(lcQpaXInputDevices) << " it's a keyboard";
break;
-#ifdef XCB_USE_XINPUT22
- case XITouchClass:
+ case XCB_INPUT_DEVICE_CLASS_TYPE_TOUCH:
// will be handled in populateTouchDevices()
break;
-#endif
default:
qCDebug(lcQpaXInputDevices) << " has class" << classinfo->type;
break;
@@ -237,7 +231,8 @@ void QXcbConnection::xi2SetupDevice(void *info, bool removeExisting)
isTablet = true;
// But we need to be careful not to take the touch and tablet-button devices as tablets.
- QByteArray name = QByteArray(deviceInfo->name).toLower();
+ QByteArray name = QByteArray(xcb_input_xi_device_info_name(deviceInfo),
+ xcb_input_xi_device_info_name_length(deviceInfo)).toLower();
QString dbgType = QLatin1String("UNKNOWN");
if (name.contains("eraser")) {
isTablet = true;
@@ -281,7 +276,6 @@ void QXcbConnection::xi2SetupDevice(void *info, bool removeExisting)
}
#endif // QT_CONFIG(tabletevent)
-#ifdef XCB_USE_XINPUT21
if (scrollingDevice.orientations || scrollingDevice.legacyOrientations) {
scrollingDevice.deviceId = deviceInfo->deviceid;
// Only use legacy wheel button events when we don't have real scroll valuators.
@@ -289,7 +283,6 @@ void QXcbConnection::xi2SetupDevice(void *info, bool removeExisting)
m_scrollingDevices.insert(scrollingDevice.deviceId, scrollingDevice);
qCDebug(lcQpaXInputDevices) << " it's a scrolling device";
}
-#endif
if (!isTablet) {
TouchDeviceData *dev = populateTouchDevices(deviceInfo);
@@ -315,23 +308,28 @@ void QXcbConnection::xi2SetupDevices()
#endif
m_scrollingDevices.clear();
m_touchDevices.clear();
-
- Display *xDisplay = static_cast<Display *>(m_xlib_display);
- int deviceCount = 0;
- XIDeviceInfo *devices = XIQueryDevice(xDisplay, XIAllDevices, &deviceCount);
m_xiMasterPointerIds.clear();
- for (int i = 0; i < deviceCount; ++i) {
- XIDeviceInfo deviceInfo = devices[i];
- if (deviceInfo.use == XIMasterPointer) {
- m_xiMasterPointerIds.append(deviceInfo.deviceid);
+
+ auto reply = Q_XCB_REPLY(xcb_input_xi_query_device, m_connection, XCB_INPUT_DEVICE_ALL);
+ if (!reply) {
+ qCDebug(lcQpaXInputDevices) << "failed to query devices";
+ return;
+ }
+
+ auto it = xcb_input_xi_query_device_infos_iterator(reply.get());
+ for (; it.rem; xcb_input_xi_device_info_next(&it)) {
+ xcb_input_xi_device_info_t *deviceInfo = it.data;
+ if (deviceInfo->type == XCB_INPUT_DEVICE_TYPE_MASTER_POINTER) {
+ m_xiMasterPointerIds.append(deviceInfo->deviceid);
continue;
}
- if (deviceInfo.use == XISlavePointer) // only slave pointer devices are relevant here
- xi2SetupDevice(&deviceInfo, false);
+ // only slave pointer devices are relevant here
+ if (deviceInfo->type == XCB_INPUT_DEVICE_TYPE_SLAVE_POINTER)
+ xi2SetupDevice(deviceInfo, false);
}
+
if (m_xiMasterPointerIds.size() > 1)
qCDebug(lcQpaXInputDevices) << "multi-pointer X detected";
- XIFreeDeviceInfo(devices);
}
/*! \internal
@@ -376,70 +374,64 @@ void QXcbConnection::xi2SelectDeviceEventsCompatibility(xcb_window_t window)
if (window == rootWindow())
return;
- unsigned int mask = 0;
- unsigned char *bitMask = reinterpret_cast<unsigned char *>(&mask);
- Display *dpy = static_cast<Display *>(m_xlib_display);
+ uint32_t mask = 0;
-#ifdef XCB_USE_XINPUT22
if (isAtLeastXI22()) {
- mask |= XI_TouchBeginMask;
- mask |= XI_TouchUpdateMask;
- mask |= XI_TouchEndMask;
-
- XIEventMask xiMask;
- xiMask.mask_len = sizeof(mask);
- xiMask.mask = bitMask;
- xiMask.deviceid = XIAllMasterDevices;
- Status result = XISelectEvents(dpy, window, &xiMask, 1);
- if (result == Success)
+ mask |= XCB_INPUT_XI_EVENT_MASK_TOUCH_BEGIN;
+ mask |= XCB_INPUT_XI_EVENT_MASK_TOUCH_UPDATE;
+ mask |= XCB_INPUT_XI_EVENT_MASK_TOUCH_END;
+
+ qt_xcb_input_event_mask_t xiMask;
+ xiMask.header.deviceid = XCB_INPUT_DEVICE_ALL_MASTER;
+ xiMask.header.mask_len = 1;
+ xiMask.mask = mask;
+
+ xcb_void_cookie_t cookie =
+ xcb_input_xi_select_events_checked(m_connection, window, 1, &xiMask.header);
+ xcb_generic_error_t *error = xcb_request_check(m_connection, cookie);
+ if (error) {
+ qCDebug(lcQpaXInput, "failed to select events, window %x, error code %d", window, error->error_code);
+ free(error);
+ } else {
QWindowSystemInterfacePrivate::TabletEvent::setPlatformSynthesizesMouse(false);
- else
- qCDebug(lcQpaXInput, "failed to select events, window %x, result %d", window, result);
+ }
}
-#endif
- mask = XI_ButtonPressMask;
- mask |= XI_ButtonReleaseMask;
- mask |= XI_MotionMask;
+ mask = XCB_INPUT_XI_EVENT_MASK_BUTTON_PRESS;
+ mask |= XCB_INPUT_XI_EVENT_MASK_BUTTON_RELEASE;
+ mask |= XCB_INPUT_XI_EVENT_MASK_MOTION;
#if QT_CONFIG(tabletevent)
QSet<int> tabletDevices;
if (!m_tabletData.isEmpty()) {
const int nrTablets = m_tabletData.count();
- QVector<XIEventMask> xiEventMask(nrTablets);
+ QVector<qt_xcb_input_event_mask_t> xiEventMask(nrTablets);
for (int i = 0; i < nrTablets; ++i) {
int deviceId = m_tabletData.at(i).deviceId;
tabletDevices.insert(deviceId);
- xiEventMask[i].deviceid = deviceId;
- xiEventMask[i].mask_len = sizeof(mask);
- xiEventMask[i].mask = bitMask;
+ xiEventMask[i].header.deviceid = deviceId;
+ xiEventMask[i].header.mask_len = 1;
+ xiEventMask[i].mask = mask;
}
- XISelectEvents(dpy, window, xiEventMask.data(), nrTablets);
+ xcb_input_xi_select_events(m_connection, window, nrTablets, &(xiEventMask.data()->header));
}
#endif
-#ifdef XCB_USE_XINPUT21
if (!m_scrollingDevices.isEmpty()) {
- QVector<XIEventMask> xiEventMask(m_scrollingDevices.size());
+ QVector<qt_xcb_input_event_mask_t> xiEventMask(m_scrollingDevices.size());
int i = 0;
for (const ScrollingDevice& scrollingDevice : qAsConst(m_scrollingDevices)) {
#if QT_CONFIG(tabletevent)
if (tabletDevices.contains(scrollingDevice.deviceId))
continue; // All necessary events are already captured.
#endif
- xiEventMask[i].deviceid = scrollingDevice.deviceId;
- xiEventMask[i].mask_len = sizeof(mask);
- xiEventMask[i].mask = bitMask;
+ xiEventMask[i].header.deviceid = scrollingDevice.deviceId;
+ xiEventMask[i].header.mask_len = 1;
+ xiEventMask[i].mask = mask;
i++;
}
- XISelectEvents(dpy, window, xiEventMask.data(), i);
+ xcb_input_xi_select_events(m_connection, window, i, &(xiEventMask.data()->header));
}
-#endif
-
-#if !QT_CONFIG(tabletevent) && !defined(XCB_USE_XINPUT21)
- Q_UNUSED(bitMask);
- Q_UNUSED(dpy);
-#endif
}
QXcbConnection::TouchDeviceData *QXcbConnection::touchDeviceForId(int id)
@@ -452,39 +444,38 @@ QXcbConnection::TouchDeviceData *QXcbConnection::touchDeviceForId(int id)
QXcbConnection::TouchDeviceData *QXcbConnection::populateTouchDevices(void *info)
{
- XIDeviceInfo *deviceinfo = reinterpret_cast<XIDeviceInfo *>(info);
+ auto *deviceinfo = reinterpret_cast<xcb_input_xi_device_info_t *>(info);
QTouchDevice::Capabilities caps = 0;
int type = -1;
int maxTouchPoints = 1;
bool isTouchDevice = false;
bool hasRelativeCoords = false;
TouchDeviceData dev;
- for (int i = 0; i < deviceinfo->num_classes; ++i) {
- XIAnyClassInfo *classinfo = deviceinfo->classes[i];
+ auto classes_it = xcb_input_xi_device_info_classes_iterator(deviceinfo);
+ for (; classes_it.rem; xcb_input_device_class_next(&classes_it)) {
+ xcb_input_device_class_t *classinfo = classes_it.data;
switch (classinfo->type) {
-#ifdef XCB_USE_XINPUT22
- case XITouchClass: {
- XITouchClassInfo *tci = reinterpret_cast<XITouchClassInfo *>(classinfo);
+ case XCB_INPUT_DEVICE_CLASS_TYPE_TOUCH: {
+ auto *tci = reinterpret_cast<xcb_input_touch_class_t *>(classinfo);
maxTouchPoints = tci->num_touches;
qCDebug(lcQpaXInputDevices, " has touch class with mode %d", tci->mode);
switch (tci->mode) {
- case XIDependentTouch:
+ case XCB_INPUT_TOUCH_MODE_DEPENDENT:
type = QTouchDevice::TouchPad;
break;
- case XIDirectTouch:
+ case XCB_INPUT_TOUCH_MODE_DIRECT:
type = QTouchDevice::TouchScreen;
break;
}
break;
}
-#endif // XCB_USE_XINPUT22
- case XIValuatorClass: {
- XIValuatorClassInfo *vci = reinterpret_cast<XIValuatorClassInfo *>(classinfo);
+ case XCB_INPUT_DEVICE_CLASS_TYPE_VALUATOR: {
+ auto *vci = reinterpret_cast<xcb_input_valuator_class_t *>(classinfo);
const QXcbAtom::Atom valuatorAtom = qatom(vci->label);
if (valuatorAtom < QXcbAtom::NAtoms) {
TouchDeviceData::ValuatorClassInfo info;
- info.min = vci->min;
- info.max = vci->max;
+ info.min = fixed3232ToReal(vci->min);
+ info.max = fixed3232ToReal(vci->max);
info.number = vci->number;
info.label = valuatorAtom;
dev.valuatorInfo.append(info);
@@ -502,16 +493,16 @@ QXcbConnection::TouchDeviceData *QXcbConnection::populateTouchDevices(void *info
caps |= QTouchDevice::Pressure;
else if (valuatorAtom == QXcbAtom::RelX) {
hasRelativeCoords = true;
- dev.size.setWidth((vci->max - vci->min) * 1000.0 / vciResolution);
+ dev.size.setWidth((fixed3232ToReal(vci->max) - fixed3232ToReal(vci->min)) * 1000.0 / vciResolution);
} else if (valuatorAtom == QXcbAtom::RelY) {
hasRelativeCoords = true;
- dev.size.setHeight((vci->max - vci->min) * 1000.0 / vciResolution);
+ dev.size.setHeight((fixed3232ToReal(vci->max) - fixed3232ToReal(vci->min)) * 1000.0 / vciResolution);
} else if (valuatorAtom == QXcbAtom::AbsX) {
caps |= QTouchDevice::Position;
- dev.size.setWidth((vci->max - vci->min) * 1000.0 / vciResolution);
+ dev.size.setWidth((fixed3232ToReal(vci->max) - fixed3232ToReal(vci->min)) * 1000.0 / vciResolution);
} else if (valuatorAtom == QXcbAtom::AbsY) {
caps |= QTouchDevice::Position;
- dev.size.setHeight((vci->max - vci->min) * 1000.0 / vciResolution);
+ dev.size.setHeight((fixed3232ToReal(vci->max) - fixed3232ToReal(vci->min)) * 1000.0 / vciResolution);
}
break;
}
@@ -530,7 +521,8 @@ QXcbConnection::TouchDeviceData *QXcbConnection::populateTouchDevices(void *info
if (type >= QTouchDevice::TouchScreen && type <= QTouchDevice::TouchPad) {
dev.qtTouchDevice = new QTouchDevice;
- dev.qtTouchDevice->setName(QString::fromUtf8(deviceinfo->name));
+ dev.qtTouchDevice->setName(QString::fromUtf8(xcb_input_xi_device_info_name(deviceinfo),
+ xcb_input_xi_device_info_name_length(deviceinfo)));
dev.qtTouchDevice->setType((QTouchDevice::DeviceType)type);
dev.qtTouchDevice->setCapabilities(caps);
dev.qtTouchDevice->setMaximumTouchPoints(maxTouchPoints);
@@ -543,49 +535,46 @@ QXcbConnection::TouchDeviceData *QXcbConnection::populateTouchDevices(void *info
return isTouchDevice ? &m_touchDevices[deviceinfo->deviceid] : nullptr;
}
-#if defined(XCB_USE_XINPUT21) || QT_CONFIG(tabletevent)
-static inline qreal fixed1616ToReal(FP1616 val)
+#if QT_CONFIG(tabletevent)
+static inline qreal fixed1616ToReal(xcb_input_fp1616_t val)
{
return qreal(val) / 0x10000;
}
-#endif // defined(XCB_USE_XINPUT21) || QT_CONFIG(tabletevent)
+#endif // QT_CONFIG(tabletevent)
void QXcbConnection::xi2HandleEvent(xcb_ge_event_t *event)
{
- xi2PrepareXIGenericDeviceEvent(event);
- xXIGenericDeviceEvent *xiEvent = reinterpret_cast<xXIGenericDeviceEvent *>(event);
+ auto *xiEvent = reinterpret_cast<qt_xcb_input_device_event_t *>(event);
int sourceDeviceId = xiEvent->deviceid; // may be the master id
- xXIDeviceEvent *xiDeviceEvent = 0;
- xXIEnterEvent *xiEnterEvent = 0;
+ qt_xcb_input_device_event_t *xiDeviceEvent = nullptr;
+ xcb_input_enter_event_t *xiEnterEvent = nullptr;
QXcbWindowEventListener *eventListener = 0;
- switch (xiEvent->evtype) {
- case XI_ButtonPress:
- case XI_ButtonRelease:
- case XI_Motion:
-#ifdef XCB_USE_XINPUT22
- case XI_TouchBegin:
- case XI_TouchUpdate:
- case XI_TouchEnd:
-#endif
+ switch (xiEvent->event_type) {
+ case XCB_INPUT_BUTTON_PRESS:
+ case XCB_INPUT_BUTTON_RELEASE:
+ case XCB_INPUT_MOTION:
+ case XCB_INPUT_TOUCH_BEGIN:
+ case XCB_INPUT_TOUCH_UPDATE:
+ case XCB_INPUT_TOUCH_END:
{
- xiDeviceEvent = reinterpret_cast<xXIDeviceEvent *>(event);
+ xiDeviceEvent = xiEvent;
eventListener = windowEventListenerFromId(xiDeviceEvent->event);
sourceDeviceId = xiDeviceEvent->sourceid; // use the actual device id instead of the master
break;
}
- case XI_Enter:
- case XI_Leave: {
- xiEnterEvent = reinterpret_cast<xXIEnterEvent *>(event);
+ case XCB_INPUT_ENTER:
+ case XCB_INPUT_LEAVE: {
+ xiEnterEvent = reinterpret_cast<xcb_input_enter_event_t *>(event);
eventListener = windowEventListenerFromId(xiEnterEvent->event);
sourceDeviceId = xiEnterEvent->sourceid; // use the actual device id instead of the master
break;
}
- case XI_HierarchyChanged:
- xi2HandleHierarchyEvent(xiEvent);
+ case XCB_INPUT_HIERARCHY:
+ xi2HandleHierarchyEvent(event);
return;
- case XI_DeviceChanged:
- xi2HandleDeviceChangedEvent(xiEvent);
+ case XCB_INPUT_DEVICE_CHANGED:
+ xi2HandleDeviceChangedEvent(event);
return;
default:
break;
@@ -600,32 +589,30 @@ void QXcbConnection::xi2HandleEvent(xcb_ge_event_t *event)
#if QT_CONFIG(tabletevent)
if (!xiEnterEvent) {
QXcbConnection::TabletData *tablet = tabletDataForDevice(sourceDeviceId);
- if (tablet && xi2HandleTabletEvent(xiEvent, tablet))
+ if (tablet && xi2HandleTabletEvent(event, tablet))
return;
}
#endif // QT_CONFIG(tabletevent)
-#ifdef XCB_USE_XINPUT21
if (ScrollingDevice *device = scrollingDeviceForId(sourceDeviceId))
- xi2HandleScrollEvent(xiEvent, *device);
-#endif // XCB_USE_XINPUT21
+ xi2HandleScrollEvent(event, *device);
-#ifdef XCB_USE_XINPUT22
if (xiDeviceEvent) {
- switch (xiDeviceEvent->evtype) {
- case XI_ButtonPress:
- case XI_ButtonRelease:
- case XI_Motion:
- if (!xi2MouseEventsDisabled() && eventListener && !(xiDeviceEvent->flags & XIPointerEmulated))
+ switch (xiDeviceEvent->event_type) {
+ case XCB_INPUT_BUTTON_PRESS:
+ case XCB_INPUT_BUTTON_RELEASE:
+ case XCB_INPUT_MOTION:
+ if (!xi2MouseEventsDisabled() && eventListener &&
+ !(xiDeviceEvent->flags & XCB_INPUT_POINTER_EVENT_FLAGS_POINTER_EMULATED))
eventListener->handleXIMouseEvent(event);
break;
- case XI_TouchBegin:
- case XI_TouchUpdate:
- case XI_TouchEnd:
+ case XCB_INPUT_TOUCH_BEGIN:
+ case XCB_INPUT_TOUCH_UPDATE:
+ case XCB_INPUT_TOUCH_END:
if (Q_UNLIKELY(lcQpaXInputEvents().isDebugEnabled()))
qCDebug(lcQpaXInputEvents, "XI2 touch event type %d seq %d detail %d pos %6.1f, %6.1f root pos %6.1f, %6.1f on window %x",
- event->event_type, xiDeviceEvent->sequenceNumber, xiDeviceEvent->detail,
+ event->event_type, xiDeviceEvent->sequence, xiDeviceEvent->detail,
fixed1616ToReal(xiDeviceEvent->event_x), fixed1616ToReal(xiDeviceEvent->event_y),
fixed1616ToReal(xiDeviceEvent->root_x), fixed1616ToReal(xiDeviceEvent->root_y),xiDeviceEvent->event);
if (QXcbWindow *platformWindow = platformWindowFromId(xiDeviceEvent->event))
@@ -633,14 +620,13 @@ void QXcbConnection::xi2HandleEvent(xcb_ge_event_t *event)
break;
}
} else if (xiEnterEvent && !xi2MouseEventsDisabled() && eventListener) {
- switch (xiEnterEvent->evtype) {
- case XI_Enter:
- case XI_Leave:
+ switch (xiEnterEvent->event_type) {
+ case XCB_INPUT_ENTER:
+ case XCB_INPUT_LEAVE:
eventListener->handleXIEnterLeave(event);
break;
}
}
-#endif // XCB_USE_XINPUT22
}
bool QXcbConnection::xi2MouseEventsDisabled() const
@@ -651,7 +637,6 @@ bool QXcbConnection::xi2MouseEventsDisabled() const
return xi2MouseDisabled || has_xinerama_extension;
}
-#ifdef XCB_USE_XINPUT22
bool QXcbConnection::isTouchScreen(int id)
{
auto device = touchDeviceForId(id);
@@ -660,11 +645,11 @@ bool QXcbConnection::isTouchScreen(int id)
void QXcbConnection::xi2ProcessTouch(void *xiDevEvent, QXcbWindow *platformWindow)
{
- xXIDeviceEvent *xiDeviceEvent = static_cast<xXIDeviceEvent *>(xiDevEvent);
+ auto *xiDeviceEvent = reinterpret_cast<xcb_input_touch_begin_event_t *>(xiDevEvent);
TouchDeviceData *dev = touchDeviceForId(xiDeviceEvent->sourceid);
Q_ASSERT(dev);
const bool firstTouch = dev->touchPoints.isEmpty();
- if (xiDeviceEvent->evtype == XI_TouchBegin) {
+ if (xiDeviceEvent->event_type == XCB_INPUT_TOUCH_BEGIN) {
QWindowSystemInterface::TouchPoint tp;
tp.id = xiDeviceEvent->detail % INT_MAX;
tp.state = Qt::TouchPointPressed;
@@ -735,7 +720,7 @@ void QXcbConnection::xi2ProcessTouch(void *xiDevEvent, QXcbWindow *platformWindo
y = touchPoint.area.center().y();
ny = y / screen->geometry().height();
}
- if (xiDeviceEvent->evtype != XI_TouchEnd) {
+ if (xiDeviceEvent->event_type != XCB_INPUT_TOUCH_END) {
if (!dev->providesTouchOrientation) {
if (w == 0.0)
w = touchPoint.area.width();
@@ -750,8 +735,8 @@ void QXcbConnection::xi2ProcessTouch(void *xiDevEvent, QXcbWindow *platformWindo
}
}
- switch (xiDeviceEvent->evtype) {
- case XI_TouchBegin:
+ switch (xiDeviceEvent->event_type) {
+ case XCB_INPUT_TOUCH_BEGIN:
if (firstTouch) {
dev->firstPressedPosition = QPointF(x, y);
dev->firstPressedNormalPosition = QPointF(nx, ny);
@@ -761,14 +746,12 @@ void QXcbConnection::xi2ProcessTouch(void *xiDevEvent, QXcbWindow *platformWindo
// Touches must be accepted when we are grabbing touch events. Otherwise the entire sequence
// will get replayed when the grab ends.
if (m_xiGrab) {
- // Note that XIAllowTouchEvents is known to deadlock with older libXi versions,
- // for details see qtbase/src/plugins/platforms/xcb/README. This has nothing to
- // do with the XInput protocol version, but is a bug in libXi implementation instead.
- XIAllowTouchEvents(static_cast<Display *>(m_xlib_display), xiDeviceEvent->deviceid,
- xiDeviceEvent->detail, xiDeviceEvent->event, XIAcceptTouch);
+ xcb_input_xi_allow_events(m_connection, XCB_CURRENT_TIME, xiDeviceEvent->deviceid,
+ XCB_INPUT_EVENT_MODE_ACCEPT_TOUCH,
+ xiDeviceEvent->detail, xiDeviceEvent->event);
}
break;
- case XI_TouchUpdate:
+ case XCB_INPUT_TOUCH_UPDATE:
if (dev->qtTouchDevice->type() == QTouchDevice::TouchPad && dev->pointPressedPosition.value(touchPoint.id) == QPointF(x, y)) {
qreal dx = (nx - dev->firstPressedNormalPosition.x()) *
dev->size.width() * screen->geometry().width() / screen->physicalSize().width();
@@ -789,14 +772,15 @@ void QXcbConnection::xi2ProcessTouch(void *xiDevEvent, QXcbWindow *platformWindo
xiDeviceEvent->detail == m_startSystemMoveResizeInfo.pointid) {
QXcbWindow *window = platformWindowFromId(m_startSystemMoveResizeInfo.window);
if (window) {
- XIAllowTouchEvents(static_cast<Display *>(m_xlib_display), xiDeviceEvent->deviceid,
- xiDeviceEvent->detail, xiDeviceEvent->event, XIRejectTouch);
+ xcb_input_xi_allow_events(m_connection, XCB_CURRENT_TIME, xiDeviceEvent->deviceid,
+ XCB_INPUT_EVENT_MODE_REJECT_TOUCH,
+ xiDeviceEvent->detail, xiDeviceEvent->event);
window->doStartSystemMoveResize(QPoint(x, y), m_startSystemMoveResizeInfo.corner);
m_startSystemMoveResizeInfo.window = XCB_NONE;
}
}
break;
- case XI_TouchEnd:
+ case XCB_INPUT_TOUCH_END:
touchPoint.state = Qt::TouchPointReleased;
if (dev->qtTouchDevice->type() == QTouchDevice::TouchPad && dev->pointPressedPosition.value(touchPoint.id) == QPointF(x, y)) {
qreal dx = (nx - dev->firstPressedNormalPosition.x()) *
@@ -814,7 +798,7 @@ void QXcbConnection::xi2ProcessTouch(void *xiDevEvent, QXcbWindow *platformWindo
if (Q_UNLIKELY(lcQpaXInputEvents().isDebugEnabled()))
qCDebug(lcQpaXInputEvents) << " touchpoint " << touchPoint.id << " state " << touchPoint.state << " pos norm " << touchPoint.normalPosition <<
" area " << touchPoint.area << " pressure " << touchPoint.pressure;
- Qt::KeyboardModifiers modifiers = keyboard()->translateModifiers(xiDeviceEvent->mods.effective_mods);
+ Qt::KeyboardModifiers modifiers = keyboard()->translateModifiers(xiDeviceEvent->mods.effective);
QWindowSystemInterface::handleTouchEvent(platformWindow->window(), xiDeviceEvent->time, dev->qtTouchDevice, dev->touchPoints.values(), modifiers);
if (touchPoint.state == Qt::TouchPointReleased)
// If a touchpoint was released, we can forget it, because the ID won't be reused.
@@ -845,46 +829,46 @@ bool QXcbConnection::startSystemMoveResizeForTouchBegin(xcb_window_t window, con
}
return false;
}
-#endif // XCB_USE_XINPUT22
bool QXcbConnection::xi2SetMouseGrabEnabled(xcb_window_t w, bool grab)
{
- Display *xDisplay = static_cast<Display *>(xlib_display());
bool ok = false;
if (grab) { // grab
- XIEventMask evmask;
- unsigned char mask[XIMaskLen(XI_LASTEVENT)];
- evmask.mask = mask;
- evmask.mask_len = sizeof(mask);
- memset(mask, 0, sizeof(mask));
- XISetMask(mask, XI_ButtonPress);
- XISetMask(mask, XI_ButtonRelease);
- XISetMask(mask, XI_Motion);
- XISetMask(mask, XI_Enter);
- XISetMask(mask, XI_Leave);
- XISetMask(mask, XI_TouchBegin);
- XISetMask(mask, XI_TouchUpdate);
- XISetMask(mask, XI_TouchEnd);
+ uint32_t mask = XCB_INPUT_XI_EVENT_MASK_BUTTON_PRESS
+ | XCB_INPUT_XI_EVENT_MASK_BUTTON_RELEASE
+ | XCB_INPUT_XI_EVENT_MASK_MOTION
+ | XCB_INPUT_XI_EVENT_MASK_ENTER
+ | XCB_INPUT_XI_EVENT_MASK_LEAVE
+ | XCB_INPUT_XI_EVENT_MASK_TOUCH_BEGIN
+ | XCB_INPUT_XI_EVENT_MASK_TOUCH_UPDATE
+ | XCB_INPUT_XI_EVENT_MASK_TOUCH_END;
for (int id : m_xiMasterPointerIds) {
- evmask.deviceid = id;
- Status result = XIGrabDevice(xDisplay, id, w, CurrentTime, None,
- XIGrabModeAsync, XIGrabModeAsync, False, &evmask);
- if (result != Success) {
+ xcb_generic_error_t *error = nullptr;
+ auto cookie = xcb_input_xi_grab_device(m_connection, w, XCB_CURRENT_TIME, XCB_CURSOR_NONE, id,
+ XCB_INPUT_GRAB_MODE_22_ASYNC, XCB_INPUT_GRAB_MODE_22_ASYNC,
+ false, 1, &mask);
+ auto *reply = xcb_input_xi_grab_device_reply(m_connection, cookie, &error);
+ if (error) {
qCDebug(lcQpaXInput, "failed to grab events for device %d on window %x"
- "(result %d)", id, w, result);
+ "(error code %d)", id, w, error->error_code);
+ free(error);
} else {
// Managed to grab at least one of master pointers, that should be enough
// to properly dismiss windows that rely on mouse grabbing.
ok = true;
}
+ free(reply);
}
} else { // ungrab
for (int id : m_xiMasterPointerIds) {
- Status result = XIUngrabDevice(xDisplay, id, CurrentTime);
- if (result != Success)
- qCDebug(lcQpaXInput, "XIUngrabDevice failed - id: %d (result %d)", id, result);
+ auto cookie = xcb_input_xi_ungrab_device_checked(m_connection, XCB_CURRENT_TIME, id);
+ xcb_generic_error_t *error = xcb_request_check(m_connection, cookie);
+ if (error) {
+ qCDebug(lcQpaXInput, "XIUngrabDevice failed - id: %d (error code %d)", id, error->error_code);
+ free(error);
+ }
}
// XIUngrabDevice does not seem to wait for a reply from X server (similar to
// xcb_ungrab_pointer). Ungrabbing won't fail, unless NoSuchExtension error
@@ -901,9 +885,9 @@ bool QXcbConnection::xi2SetMouseGrabEnabled(xcb_window_t w, bool grab)
void QXcbConnection::xi2HandleHierarchyEvent(void *event)
{
- xXIHierarchyEvent *xiEvent = reinterpret_cast<xXIHierarchyEvent *>(event);
+ auto *xiEvent = reinterpret_cast<xcb_input_hierarchy_event_t *>(event);
// We only care about hotplugged devices
- if (!(xiEvent->flags & (XISlaveRemoved | XISlaveAdded)))
+ if (!(xiEvent->flags & (XCB_INPUT_HIERARCHY_MASK_SLAVE_REMOVED | XCB_INPUT_HIERARCHY_MASK_SLAVE_ADDED)))
return;
xi2SetupDevices();
@@ -920,23 +904,19 @@ void QXcbConnection::xi2HandleHierarchyEvent(void *event)
void QXcbConnection::xi2HandleDeviceChangedEvent(void *event)
{
- xXIDeviceChangedEvent *xiEvent = reinterpret_cast<xXIDeviceChangedEvent *>(event);
+ auto *xiEvent = reinterpret_cast<xcb_input_device_changed_event_t *>(event);
switch (xiEvent->reason) {
- case XIDeviceChange: {
- int nrDevices = 0;
- Display *dpy = static_cast<Display *>(m_xlib_display);
- XIDeviceInfo* deviceInfo = XIQueryDevice(dpy, xiEvent->sourceid, &nrDevices);
- if (nrDevices <= 0)
+ case XCB_INPUT_CHANGE_REASON_DEVICE_CHANGE: {
+ auto reply = Q_XCB_REPLY(xcb_input_xi_query_device, m_connection, xiEvent->sourceid);
+ if (!reply || reply->num_infos <= 0)
return;
- xi2SetupDevice(deviceInfo);
- XIFreeDeviceInfo(deviceInfo);
+ auto it = xcb_input_xi_query_device_infos_iterator(reply.get());
+ xi2SetupDevice(it.data);
break;
}
- case XISlaveSwitch: {
-#ifdef XCB_USE_XINPUT21
+ case XCB_INPUT_CHANGE_REASON_SLAVE_SWITCH: {
if (ScrollingDevice *scrollingDevice = scrollingDeviceForId(xiEvent->sourceid))
xi2UpdateScrollingDevice(*scrollingDevice);
-#endif
break;
}
default:
@@ -945,28 +925,28 @@ void QXcbConnection::xi2HandleDeviceChangedEvent(void *event)
}
}
-#ifdef XCB_USE_XINPUT21
void QXcbConnection::xi2UpdateScrollingDevice(ScrollingDevice &scrollingDevice)
{
- int nrDevices = 0;
- Display *dpy = static_cast<Display *>(m_xlib_display);
- XIDeviceInfo* deviceInfo = XIQueryDevice(dpy, scrollingDevice.deviceId, &nrDevices);
- if (nrDevices <= 0) {
+ auto reply = Q_XCB_REPLY(xcb_input_xi_query_device, m_connection, scrollingDevice.deviceId);
+ if (!reply || reply->num_infos <= 0) {
qCDebug(lcQpaXInputDevices, "scrolling device %d no longer present", scrollingDevice.deviceId);
return;
}
QPointF lastScrollPosition;
if (lcQpaXInputEvents().isDebugEnabled())
lastScrollPosition = scrollingDevice.lastScrollPosition;
- for (int c = 0; c < deviceInfo->num_classes; ++c) {
- XIAnyClassInfo *classInfo = deviceInfo->classes[c];
- if (classInfo->type == XIValuatorClass) {
- XIValuatorClassInfo *vci = reinterpret_cast<XIValuatorClassInfo *>(classInfo);
+
+ xcb_input_xi_device_info_t *deviceInfo = xcb_input_xi_query_device_infos_iterator(reply.get()).data;
+ auto classes_it = xcb_input_xi_device_info_classes_iterator(deviceInfo);
+ for (; classes_it.rem; xcb_input_device_class_next(&classes_it)) {
+ xcb_input_device_class_t *classInfo = classes_it.data;
+ if (classInfo->type == XCB_INPUT_DEVICE_CLASS_TYPE_VALUATOR) {
+ auto *vci = reinterpret_cast<xcb_input_valuator_class_t *>(classInfo);
const int valuatorAtom = qatom(vci->label);
if (valuatorAtom == QXcbAtom::RelHorizScroll || valuatorAtom == QXcbAtom::RelHorizWheel)
- scrollingDevice.lastScrollPosition.setX(vci->value);
+ scrollingDevice.lastScrollPosition.setX(fixed3232ToReal(vci->value));
else if (valuatorAtom == QXcbAtom::RelVertScroll || valuatorAtom == QXcbAtom::RelVertWheel)
- scrollingDevice.lastScrollPosition.setY(vci->value);
+ scrollingDevice.lastScrollPosition.setY(fixed3232ToReal(vci->value));
}
}
if (Q_UNLIKELY(lcQpaXInputEvents().isDebugEnabled() && lastScrollPosition != scrollingDevice.lastScrollPosition))
@@ -974,8 +954,6 @@ void QXcbConnection::xi2UpdateScrollingDevice(ScrollingDevice &scrollingDevice)
lastScrollPosition.x(), lastScrollPosition.y(),
scrollingDevice.lastScrollPosition.x(),
scrollingDevice.lastScrollPosition.y());
-
- XIFreeDeviceInfo(deviceInfo);
}
void QXcbConnection::xi2UpdateScrollingDevices()
@@ -998,10 +976,9 @@ QXcbConnection::ScrollingDevice *QXcbConnection::scrollingDeviceForId(int id)
void QXcbConnection::xi2HandleScrollEvent(void *event, ScrollingDevice &scrollingDevice)
{
- xXIGenericDeviceEvent *xiEvent = reinterpret_cast<xXIGenericDeviceEvent *>(event);
+ auto *xiDeviceEvent = reinterpret_cast<qt_xcb_input_device_event_t *>(event);
- if (xiEvent->evtype == XI_Motion && scrollingDevice.orientations) {
- xXIDeviceEvent* xiDeviceEvent = reinterpret_cast<xXIDeviceEvent *>(event);
+ if (xiDeviceEvent->event_type == XCB_INPUT_MOTION && scrollingDevice.orientations) {
if (QXcbWindow *platformWindow = platformWindowFromId(xiDeviceEvent->event)) {
QPoint rawDelta;
QPoint angleDelta;
@@ -1035,17 +1012,16 @@ void QXcbConnection::xi2HandleScrollEvent(void *event, ScrollingDevice &scrollin
if (!angleDelta.isNull()) {
QPoint local(fixed1616ToReal(xiDeviceEvent->event_x), fixed1616ToReal(xiDeviceEvent->event_y));
QPoint global(fixed1616ToReal(xiDeviceEvent->root_x), fixed1616ToReal(xiDeviceEvent->root_y));
- Qt::KeyboardModifiers modifiers = keyboard()->translateModifiers(xiDeviceEvent->mods.effective_mods);
+ Qt::KeyboardModifiers modifiers = keyboard()->translateModifiers(xiDeviceEvent->mods.effective);
if (modifiers & Qt::AltModifier) {
std::swap(angleDelta.rx(), angleDelta.ry());
std::swap(rawDelta.rx(), rawDelta.ry());
}
qCDebug(lcQpaXInputEvents) << "scroll wheel @ window pos" << local << "delta px" << rawDelta << "angle" << angleDelta;
- QWindowSystemInterface::handleWheelEvent(platformWindow->window(), xiEvent->time, local, global, rawDelta, angleDelta, modifiers);
+ QWindowSystemInterface::handleWheelEvent(platformWindow->window(), xiDeviceEvent->time, local, global, rawDelta, angleDelta, modifiers);
}
}
- } else if (xiEvent->evtype == XI_ButtonRelease && scrollingDevice.legacyOrientations) {
- xXIDeviceEvent* xiDeviceEvent = reinterpret_cast<xXIDeviceEvent *>(event);
+ } else if (xiDeviceEvent->event_type == XCB_INPUT_BUTTON_RELEASE && scrollingDevice.legacyOrientations) {
if (QXcbWindow *platformWindow = platformWindowFromId(xiDeviceEvent->event)) {
QPoint angleDelta;
if (scrollingDevice.legacyOrientations & Qt::Vertical) {
@@ -1063,16 +1039,15 @@ void QXcbConnection::xi2HandleScrollEvent(void *event, ScrollingDevice &scrollin
if (!angleDelta.isNull()) {
QPoint local(fixed1616ToReal(xiDeviceEvent->event_x), fixed1616ToReal(xiDeviceEvent->event_y));
QPoint global(fixed1616ToReal(xiDeviceEvent->root_x), fixed1616ToReal(xiDeviceEvent->root_y));
- Qt::KeyboardModifiers modifiers = keyboard()->translateModifiers(xiDeviceEvent->mods.effective_mods);
+ Qt::KeyboardModifiers modifiers = keyboard()->translateModifiers(xiDeviceEvent->mods.effective);
if (modifiers & Qt::AltModifier)
std::swap(angleDelta.rx(), angleDelta.ry());
qCDebug(lcQpaXInputEvents) << "scroll wheel (button" << xiDeviceEvent->detail << ") @ window pos" << local << "delta angle" << angleDelta;
- QWindowSystemInterface::handleWheelEvent(platformWindow->window(), xiEvent->time, local, global, QPoint(), angleDelta, modifiers);
+ QWindowSystemInterface::handleWheelEvent(platformWindow->window(), xiDeviceEvent->time, local, global, QPoint(), angleDelta, modifiers);
}
}
}
}
-#endif // XCB_USE_XINPUT21
static int xi2ValuatorOffset(const unsigned char *maskPtr, int maskLen, int number)
{
@@ -1095,10 +1070,10 @@ static int xi2ValuatorOffset(const unsigned char *maskPtr, int maskLen, int numb
bool QXcbConnection::xi2GetValuatorValueIfSet(const void *event, int valuatorNum, double *value)
{
- const xXIDeviceEvent *xideviceevent = static_cast<const xXIDeviceEvent *>(event);
- const unsigned char *buttonsMaskAddr = (const unsigned char*)&xideviceevent[1];
- const unsigned char *valuatorsMaskAddr = buttonsMaskAddr + xideviceevent->buttons_len * 4;
- FP3232 *valuatorsValuesAddr = (FP3232*)(valuatorsMaskAddr + xideviceevent->valuators_len * 4);
+ auto *xideviceevent = static_cast<const qt_xcb_input_device_event_t *>(event);
+ auto *buttonsMaskAddr = reinterpret_cast<const unsigned char *>(&xideviceevent[1]);
+ auto *valuatorsMaskAddr = buttonsMaskAddr + xideviceevent->buttons_len * 4;
+ auto *valuatorsValuesAddr = reinterpret_cast<const xcb_input_fp3232_t *>(valuatorsMaskAddr + xideviceevent->valuators_len * 4);
int valuatorOffset = xi2ValuatorOffset(valuatorsMaskAddr, xideviceevent->valuators_len, valuatorNum);
if (valuatorOffset < 0)
@@ -1109,15 +1084,6 @@ bool QXcbConnection::xi2GetValuatorValueIfSet(const void *event, int valuatorNum
return true;
}
-void QXcbConnection::xi2PrepareXIGenericDeviceEvent(xcb_ge_event_t *event)
-{
- // xcb event structs contain stuff that wasn't on the wire, the full_sequence field
- // adds an extra 4 bytes and generic events cookie data is on the wire right after the standard 32 bytes.
- // Move this data back to have the same layout in memory as it was on the wire
- // and allow casting, overwriting the full_sequence field.
- memmove((char*) event + 32, (char*) event + 36, event->length * 4);
-}
-
Qt::MouseButton QXcbConnection::xiToQtMouseButton(uint32_t b)
{
switch (b) {
@@ -1181,31 +1147,29 @@ static const char *pointerTypeName(QTabletEvent::PointerType ptype) {
bool QXcbConnection::xi2HandleTabletEvent(const void *event, TabletData *tabletData)
{
bool handled = true;
- Display *xDisplay = static_cast<Display *>(m_xlib_display);
- const xXIGenericDeviceEvent *xiEvent = static_cast<const xXIGenericDeviceEvent *>(event);
- const xXIDeviceEvent *xiDeviceEvent = reinterpret_cast<const xXIDeviceEvent *>(xiEvent);
+ const auto *xiDeviceEvent = reinterpret_cast<const qt_xcb_input_device_event_t *>(event);
- switch (xiEvent->evtype) {
- case XI_ButtonPress: {
+ switch (xiDeviceEvent->event_type) {
+ case XCB_INPUT_BUTTON_PRESS: {
Qt::MouseButton b = xiToQtMouseButton(xiDeviceEvent->detail);
tabletData->buttons |= b;
- xi2ReportTabletEvent(xiEvent, tabletData);
+ xi2ReportTabletEvent(event, tabletData);
break;
}
- case XI_ButtonRelease: {
+ case XCB_INPUT_BUTTON_RELEASE: {
Qt::MouseButton b = xiToQtMouseButton(xiDeviceEvent->detail);
tabletData->buttons ^= b;
- xi2ReportTabletEvent(xiEvent, tabletData);
+ xi2ReportTabletEvent(event, tabletData);
break;
}
- case XI_Motion:
- xi2ReportTabletEvent(xiEvent, tabletData);
+ case XCB_INPUT_MOTION:
+ xi2ReportTabletEvent(event, tabletData);
break;
- case XI_PropertyEvent: {
+ case XCB_INPUT_PROPERTY: {
// This is the wacom driver's way of reporting tool proximity.
// The evdev driver doesn't do it this way.
- const xXIPropertyEvent *ev = reinterpret_cast<const xXIPropertyEvent *>(event);
- if (ev->what == XIPropertyModified) {
+ const auto *ev = reinterpret_cast<const xcb_input_property_event_t *>(event);
+ if (ev->what == XCB_INPUT_PROPERTY_FLAG_MODIFIED) {
if (ev->property == atom(QXcbAtom::WacomSerialIDs)) {
enum WacomSerialIndex {
_WACSER_USB_ID = 0,
@@ -1215,15 +1179,12 @@ bool QXcbConnection::xi2HandleTabletEvent(const void *event, TabletData *tabletD
_WACSER_TOOL_ID,
_WACSER_COUNT
};
- Atom propType;
- int propFormat;
- unsigned long numItems, bytesAfter;
- unsigned char *data;
- if (XIGetProperty(xDisplay, tabletData->deviceId, ev->property, 0, 100,
- 0, AnyPropertyType, &propType, &propFormat,
- &numItems, &bytesAfter, &data) == Success) {
- if (propType == atom(QXcbAtom::INTEGER) && propFormat == 32 && numItems == _WACSER_COUNT) {
- quint32 *ptr = reinterpret_cast<quint32 *>(data);
+
+ auto reply = Q_XCB_REPLY(xcb_input_xi_get_property, m_connection, tabletData->deviceId, 0,
+ ev->property, XCB_GET_PROPERTY_TYPE_ANY, 0, 100);
+ if (reply) {
+ if (reply->type == atom(QXcbAtom::INTEGER) && reply->format == 32 && reply->num_items == _WACSER_COUNT) {
+ quint32 *ptr = reinterpret_cast<quint32 *>(xcb_input_xi_get_property_items(reply.get()));
quint32 tool = ptr[_WACSER_TOOL_ID];
// Workaround for http://sourceforge.net/p/linuxwacom/bugs/246/
// e.g. on Thinkpad Helix, tool ID will be 0 and serial will be 1
@@ -1255,7 +1216,6 @@ bool QXcbConnection::xi2HandleTabletEvent(const void *event, TabletData *tabletD
tabletData->deviceId, ptr[_WACSER_USB_ID], ptr[_WACSER_LAST_TOOL_SERIAL], ptr[_WACSER_LAST_TOOL_ID],
ptr[_WACSER_TOOL_SERIAL], ptr[_WACSER_TOOL_ID], toolName(tabletData->tool));
}
- XFree(data);
}
}
}
@@ -1271,12 +1231,12 @@ bool QXcbConnection::xi2HandleTabletEvent(const void *event, TabletData *tabletD
void QXcbConnection::xi2ReportTabletEvent(const void *event, TabletData *tabletData)
{
- const xXIDeviceEvent *ev = reinterpret_cast<const xXIDeviceEvent *>(event);
+ auto *ev = reinterpret_cast<const qt_xcb_input_device_event_t *>(event);
QXcbWindow *xcbWindow = platformWindowFromId(ev->event);
if (!xcbWindow)
return;
QWindow *window = xcbWindow->window();
- const Qt::KeyboardModifiers modifiers = keyboard()->translateModifiers(ev->mods.effective_mods);
+ const Qt::KeyboardModifiers modifiers = keyboard()->translateModifiers(ev->mods.effective);
QPointF local(fixed1616ToReal(ev->event_x), fixed1616ToReal(ev->event_y));
QPointF global(fixed1616ToReal(ev->root_x), fixed1616ToReal(ev->root_y));
double pressure = 0, rotation = 0, tangentialPressure = 0;
@@ -1319,7 +1279,7 @@ void QXcbConnection::xi2ReportTabletEvent(const void *event, TabletData *tabletD
qCDebug(lcQpaXInputEvents, "XI2 event on tablet %d with tool %s type %s seq %d detail %d time %d "
"pos %6.1f, %6.1f root pos %6.1f, %6.1f buttons 0x%x pressure %4.2lf tilt %d, %d rotation %6.2lf modifiers 0x%x",
tabletData->deviceId, toolName(tabletData->tool), pointerTypeName(tabletData->pointerType),
- ev->sequenceNumber, ev->detail, ev->time,
+ ev->sequence, ev->detail, ev->time,
local.x(), local.y(), global.x(), global.y(),
(int)tabletData->buttons, pressure, xTilt, yTilt, rotation, (int)modifiers);
diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp
index b401100dd4..57629ac03a 100644
--- a/src/plugins/platforms/xcb/qxcbcursor.cpp
+++ b/src/plugins/platforms/xcb/qxcbcursor.cpp
@@ -628,6 +628,12 @@ xcb_cursor_t QXcbCursor::createBitmapCursor(QCursor *cursor)
}
#endif
+/*! \internal
+
+ Note that the logical state of a device (as seen by means of the protocol) may
+ lag the physical state if device event processing is frozen. See QueryPointer
+ in X11 protocol specification.
+*/
void QXcbCursor::queryPointer(QXcbConnection *c, QXcbVirtualDesktop **virtualDesktop, QPoint *pos, int *keybMask)
{
if (pos)
diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp
index c8ba33edf5..0d72da0701 100644
--- a/src/plugins/platforms/xcb/qxcbdrag.cpp
+++ b/src/plugins/platforms/xcb/qxcbdrag.cpp
@@ -63,19 +63,6 @@
QT_BEGIN_NAMESPACE
-//#define DND_DEBUG
-#ifdef DND_DEBUG
-#define DEBUG qDebug
-#else
-#define DEBUG if(0) qDebug
-#endif
-
-#ifdef DND_DEBUG
-#define DNDDEBUG qDebug()
-#else
-#define DNDDEBUG if(0) qDebug()
-#endif
-
const int xdnd_version = 5;
static inline xcb_window_t xcb_window(QPlatformWindow *w)
@@ -164,8 +151,12 @@ void QXcbDrag::init()
QXcbCursor::queryPointer(connection(), &current_virtual_desktop, 0);
drag_types.clear();
+ //current_embedding_widget = 0;
+
dropped = false;
canceled = false;
+
+ source_sameanswer = QRect();
}
bool QXcbDrag::eventFilter(QObject *o, QEvent *e)
@@ -181,11 +172,10 @@ bool QXcbDrag::eventFilter(QObject *o, QEvent *e)
void QXcbDrag::startDrag()
{
- // #fixme enableEventFilter();
-
init();
#ifndef QT_NO_CLIPBOARD
+ qCDebug(lcQpaXDnd) << "starting drag where source:" << connection()->clipboard()->owner();
xcb_set_selection_owner(xcb_connection(), connection()->clipboard()->owner(),
atom(QXcbAtom::XdndSelection), connection()->time());
#endif
@@ -211,6 +201,9 @@ void QXcbDrag::startDrag()
QBasicDrag::startDrag();
if (connection()->mouseGrabber() == nullptr)
shapedPixmapWindow()->setMouseGrabEnabled(true);
+
+ auto nativePixelPos = QHighDpi::toNativePixels(QCursor::pos(), initiatorWindow);
+ move(nativePixelPos, QGuiApplication::mouseButtons(), QGuiApplication::keyboardModifiers());
}
void QXcbDrag::endDrag()
@@ -307,34 +300,13 @@ xcb_window_t QXcbDrag::findRealWindow(const QPoint & pos, xcb_window_t w, int md
return 0;
}
-void QXcbDrag::move(const QPoint &globalPos)
+bool QXcbDrag::findXdndAwareTarget(const QPoint &globalPos, xcb_window_t *target_out)
{
-
- if (source_sameanswer.contains(globalPos) && source_sameanswer.isValid())
- return;
-
- QXcbVirtualDesktop *virtualDesktop = nullptr;
- QPoint cursorPos;
- QXcbCursor::queryPointer(connection(), &virtualDesktop, &cursorPos);
- QXcbScreen *screen = virtualDesktop->screenAt(cursorPos);
- QPoint deviceIndependentPos = QHighDpiScaling::mapPositionFromNative(globalPos, screen);
-
- if (virtualDesktop != current_virtual_desktop) {
- setUseCompositing(virtualDesktop->compositingActive());
- recreateShapedPixmapWindow(static_cast<QPlatformScreen*>(screen)->screen(), deviceIndependentPos);
- if (connection()->mouseGrabber() == nullptr)
- shapedPixmapWindow()->setMouseGrabEnabled(true);
-
- current_virtual_desktop = virtualDesktop;
- } else {
- QBasicDrag::moveShapedPixmapWindow(deviceIndependentPos);
- }
-
xcb_window_t rootwin = current_virtual_desktop->root();
- auto translate = Q_XCB_REPLY(xcb_translate_coordinates, connection()->xcb_connection(),
+ auto translate = Q_XCB_REPLY(xcb_translate_coordinates, xcb_connection(),
rootwin, rootwin, globalPos.x(), globalPos.y());
if (!translate)
- return;
+ return false;
xcb_window_t target = translate->child;
int lx = translate->dst_x;
@@ -343,10 +315,9 @@ void QXcbDrag::move(const QPoint &globalPos)
if (target && target != rootwin) {
xcb_window_t src = rootwin;
while (target != 0) {
- DNDDEBUG << "checking target for XdndAware" << target << lx << ly;
+ qCDebug(lcQpaXDnd) << "checking target for XdndAware" << target;
- // translate coordinates
- auto translate = Q_XCB_REPLY(xcb_translate_coordinates, connection()->xcb_connection(),
+ auto translate = Q_XCB_REPLY(xcb_translate_coordinates, xcb_connection(),
src, target, lx, ly);
if (!translate) {
target = 0;
@@ -357,12 +328,11 @@ void QXcbDrag::move(const QPoint &globalPos)
src = target;
xcb_window_t child = translate->child;
- // check if it has XdndAware
auto reply = Q_XCB_REPLY(xcb_get_property, xcb_connection(), false, target,
atom(QXcbAtom::XdndAware), XCB_GET_PROPERTY_TYPE_ANY, 0, 0);
bool aware = reply && reply->type != XCB_NONE;
if (aware) {
- DNDDEBUG << "Found XdndAware on " << target;
+ qCDebug(lcQpaXDnd) << "found XdndAware on" << target;
break;
}
@@ -370,14 +340,45 @@ void QXcbDrag::move(const QPoint &globalPos)
}
if (!target || target == shapedPixmapWindow()->handle()->winId()) {
- DNDDEBUG << "need to find real window";
+ qCDebug(lcQpaXDnd) << "need to find real window";
target = findRealWindow(globalPos, rootwin, 6, true);
if (target == 0)
target = findRealWindow(globalPos, rootwin, 6, false);
- DNDDEBUG << "real window found" << target;
+ qCDebug(lcQpaXDnd) << "real window found" << target;
}
}
+ *target_out = target;
+ return true;
+}
+
+void QXcbDrag::move(const QPoint &globalPos, Qt::MouseButtons b, Qt::KeyboardModifiers mods)
+{
+ // The source sends XdndEnter and XdndPosition to the target.
+ if (source_sameanswer.contains(globalPos) && source_sameanswer.isValid())
+ return;
+
+ QXcbVirtualDesktop *virtualDesktop = nullptr;
+ QPoint cursorPos;
+ QXcbCursor::queryPointer(connection(), &virtualDesktop, &cursorPos);
+ QXcbScreen *screen = virtualDesktop->screenAt(cursorPos);
+ QPoint deviceIndependentPos = QHighDpiScaling::mapPositionFromNative(globalPos, screen);
+
+ if (virtualDesktop != current_virtual_desktop) {
+ setUseCompositing(virtualDesktop->compositingActive());
+ recreateShapedPixmapWindow(static_cast<QPlatformScreen*>(screen)->screen(), deviceIndependentPos);
+ if (connection()->mouseGrabber() == nullptr)
+ shapedPixmapWindow()->setMouseGrabEnabled(true);
+
+ current_virtual_desktop = virtualDesktop;
+ } else {
+ QBasicDrag::moveShapedPixmapWindow(deviceIndependentPos);
+ }
+
+ xcb_window_t target;
+ if (!findXdndAwareTarget(globalPos, &target))
+ return;
+
QXcbWindow *w = 0;
if (target) {
w = connection()->platformWindowFromId(target);
@@ -385,7 +386,7 @@ void QXcbDrag::move(const QPoint &globalPos)
w = 0;
} else {
w = 0;
- target = rootwin;
+ target = current_virtual_desktop->root();
}
xcb_window_t proxy_target = xdndProxy(connection(), target);
@@ -427,13 +428,14 @@ void QXcbDrag::move(const QPoint &globalPos)
enter.data.data32[0] = 0;
#endif
enter.data.data32[1] = flags;
- enter.data.data32[2] = drag_types.size()>0 ? drag_types.at(0) : 0;
- enter.data.data32[3] = drag_types.size()>1 ? drag_types.at(1) : 0;
- enter.data.data32[4] = drag_types.size()>2 ? drag_types.at(2) : 0;
+ enter.data.data32[2] = drag_types.size() > 0 ? drag_types.at(0) : 0;
+ enter.data.data32[3] = drag_types.size() > 1 ? drag_types.at(1) : 0;
+ enter.data.data32[4] = drag_types.size() > 2 ? drag_types.at(2) : 0;
// provisionally set the rectangle to 5x5 pixels...
- source_sameanswer = QRect(globalPos.x() - 2, globalPos.y() -2 , 5, 5);
+ source_sameanswer = QRect(globalPos.x() - 2, globalPos.y() - 2 , 5, 5);
+
+ qCDebug(lcQpaXDnd) << "sending XdndEnter to target:" << target;
- DEBUG() << "sending Xdnd enter source=" << enter.data.data32[0];
if (w)
handleEnter(w, &enter, current_proxy_target);
else if (target)
@@ -447,7 +449,8 @@ void QXcbDrag::move(const QPoint &globalPos)
if (target) {
waiting_for_status = true;
-
+ // The source sends a ClientMessage of type XdndPosition. This tells the target the
+ // position of the mouse and the action that the user requested.
xcb_client_message_event_t move;
move.response_type = XCB_CLIENT_MESSAGE;
move.sequence = 0;
@@ -462,21 +465,34 @@ void QXcbDrag::move(const QPoint &globalPos)
move.data.data32[1] = 0; // flags
move.data.data32[2] = (globalPos.x() << 16) + globalPos.y();
move.data.data32[3] = connection()->time();
- move.data.data32[4] = toXdndAction(defaultAction(currentDrag()->supportedActions(), QGuiApplication::keyboardModifiers()));
- DEBUG() << "sending Xdnd position source=" << move.data.data32[0] << "target=" << move.window;
+ move.data.data32[4] = toXdndAction(defaultAction(currentDrag()->supportedActions(), mods));
+
+ qCDebug(lcQpaXDnd) << "sending XdndPosition to target:" << target;
source_time = connection()->time();
if (w)
- handle_xdnd_position(w, &move);
+ handle_xdnd_position(w, &move, b, mods);
else
xcb_send_event(xcb_connection(), false, proxy_target, XCB_EVENT_MASK_NO_EVENT, (const char *)&move);
}
+
+ static const bool isUnity = qgetenv("XDG_CURRENT_DESKTOP").toLower() == "unity";
+ if (isUnity && xdndCollectionWindow == XCB_NONE) {
+ QString name = QXcbWindow::windowTitle(connection(), target);
+ if (name == QStringLiteral("XdndCollectionWindowImp"))
+ xdndCollectionWindow = target;
+ }
+ if (target == xdndCollectionWindow) {
+ setCanDrop(false);
+ updateCursor(Qt::IgnoreAction);
+ }
}
-void QXcbDrag::drop(const QPoint &globalPos)
+void QXcbDrag::drop(const QPoint &globalPos, Qt::MouseButtons b, Qt::KeyboardModifiers mods)
{
- QBasicDrag::drop(globalPos);
+ // XdndDrop is sent from source to target to complete the drop.
+ QBasicDrag::drop(globalPos, b, mods);
if (!current_target)
return;
@@ -500,7 +516,7 @@ void QXcbDrag::drop(const QPoint &globalPos)
QXcbWindow *w = connection()->platformWindowFromId(current_proxy_target);
- if (w && (w->window()->type() == Qt::Desktop) /*&& !w->acceptDrops()*/)
+ if (w && w->window()->type() == Qt::Desktop) // && !w->acceptDrops()
w = 0;
Transaction t = {
@@ -519,16 +535,13 @@ void QXcbDrag::drop(const QPoint &globalPos)
cleanup_timer = startTimer(XdndDropTransactionTimeout);
}
+ qCDebug(lcQpaXDnd) << "sending drop to target:" << current_target;
+
if (w) {
- handleDrop(w, &drop);
+ handleDrop(w, &drop, b, mods);
} else {
xcb_send_event(xcb_connection(), false, current_proxy_target, XCB_EVENT_MASK_NO_EVENT, (const char *)&drop);
}
-
- current_target = 0;
- current_proxy_target = 0;
- source_time = 0;
-// current_embedding_widget = 0;
}
Qt::DropAction QXcbDrag::toDropAction(xcb_atom_t a) const
@@ -586,44 +599,6 @@ int QXcbDrag::findTransactionByTime(xcb_timestamp_t timestamp)
}
#if 0
-
-// find an ancestor with XdndAware on it
-static Window findXdndAwareParent(Window window)
-{
- Window target = 0;
- forever {
- // check if window has XdndAware
- Atom type = 0;
- int f;
- unsigned long n, a;
- unsigned char *data = 0;
- if (XGetWindowProperty(X11->display, window, ATOM(XdndAware), 0, 0, False,
- AnyPropertyType, &type, &f,&n,&a,&data) == Success) {
- if (data)
- XFree(data);
- if (type) {
- target = window;
- break;
- }
- }
-
- // try window's parent
- Window root;
- Window parent;
- Window *children;
- uint unused;
- if (!XQueryTree(X11->display, window, &root, &parent, &children, &unused))
- break;
- if (children)
- XFree(children);
- if (window == root)
- break;
- window = parent;
- }
- return target;
-}
-
-
// for embedding only
static QWidget* current_embedding_widget = 0;
static xcb_client_message_event_t last_enter_event;
@@ -665,11 +640,10 @@ static bool checkEmbedded(QWidget* w, const XEvent* xe)
}
#endif
-
-void QXcbDrag::handleEnter(QPlatformWindow *window, const xcb_client_message_event_t *event, xcb_window_t proxy)
+void QXcbDrag::handleEnter(QPlatformWindow *, const xcb_client_message_event_t *event, xcb_window_t proxy)
{
- Q_UNUSED(window);
- DEBUG() << "handleEnter" << window;
+ // The target receives XdndEnter.
+ qCDebug(lcQpaXDnd) << "target:" << event->window << "received XdndEnter";
xdnd_types.clear();
@@ -705,11 +679,16 @@ void QXcbDrag::handleEnter(QPlatformWindow *window, const xcb_client_message_eve
}
}
for(int i = 0; i < xdnd_types.length(); ++i)
- DEBUG() << " " << connection()->atomName(xdnd_types.at(i));
+ qCDebug(lcQpaXDnd) << " " << connection()->atomName(xdnd_types.at(i));
}
-void QXcbDrag::handle_xdnd_position(QPlatformWindow *w, const xcb_client_message_event_t *e)
+void QXcbDrag::handle_xdnd_position(QPlatformWindow *w, const xcb_client_message_event_t *e,
+ Qt::MouseButtons b, Qt::KeyboardModifiers mods)
{
+ // The target receives XdndPosition. The target window must determine which widget the mouse
+ // is in and ask it whether or not it will accept the drop.
+ qCDebug(lcQpaXDnd) << "target:" << e->window << "received XdndPosition";
+
QPoint p((e->data.data32[2] & 0xffff0000) >> 16, e->data.data32[2] & 0x0000ffff);
Q_ASSERT(w);
QRect geometry = w->geometry();
@@ -718,8 +697,9 @@ void QXcbDrag::handle_xdnd_position(QPlatformWindow *w, const xcb_client_message
if (!w || !w->window() || (w->window()->type() == Qt::Desktop))
return;
- if (e->data.data32[0] != xdnd_dragsource) {
- DEBUG("xdnd drag position from unexpected source (%x not %x)", e->data.data32[0], xdnd_dragsource);
+ if (Q_UNLIKELY(e->data.data32[0] != xdnd_dragsource)) {
+ qCDebug(lcQpaXDnd, "xdnd drag position from unexpected source (%x not %x)",
+ e->data.data32[0], xdnd_dragsource);
return;
}
@@ -741,10 +721,19 @@ void QXcbDrag::handle_xdnd_position(QPlatformWindow *w, const xcb_client_message
supported_actions = Qt::DropActions(toDropAction(e->data.data32[4]));
}
- QPlatformDragQtResponse qt_response = QWindowSystemInterface::handleDrag(w->window(),dropData,p,supported_actions);
+ auto buttons = currentDrag() ? b : connection()->queryMouseButtons();
+ auto modifiers = currentDrag() ? mods : connection()->queryKeyboardModifiers();
+
+ QPlatformDragQtResponse qt_response = QWindowSystemInterface::handleDrag(
+ w->window(), dropData, p, supported_actions, buttons, modifiers);
+
+ // ### FIXME ? - answerRect appears to be unused.
QRect answerRect(p + geometry.topLeft(), QSize(1,1));
answerRect = qt_response.answerRect().translated(geometry.topLeft()).intersected(geometry);
+ // The target sends a ClientMessage of type XdndStatus. This tells the source whether or not
+ // it will accept the drop, and, if so, what action will be taken. It also includes a rectangle
+ // that means "don't send another XdndPosition message until the mouse moves out of here".
xcb_client_message_event_t response;
response.response_type = XCB_CLIENT_MESSAGE;
response.sequence = 0;
@@ -775,13 +764,15 @@ void QXcbDrag::handle_xdnd_position(QPlatformWindow *w, const xcb_client_message
// reset
target_time = XCB_CURRENT_TIME;
+ qCDebug(lcQpaXDnd) << "sending XdndStatus to source:" << xdnd_dragsource;
+
#ifndef QT_NO_CLIPBOARD
if (xdnd_dragsource == connection()->clipboard()->owner())
handle_xdnd_status(&response);
else
#endif
- xcb_send_event(xcb_connection(), false, current_proxy_target,
- XCB_EVENT_MASK_NO_EVENT, (const char *)&response);
+ xcb_send_event(xcb_connection(), false, current_proxy_target,
+ XCB_EVENT_MASK_NO_EVENT, (const char *)&response);
}
namespace
@@ -818,7 +809,9 @@ void QXcbDrag::handlePosition(QPlatformWindow * w, const xcb_client_message_even
void QXcbDrag::handle_xdnd_status(const xcb_client_message_event_t *event)
{
- DEBUG("xdndHandleStatus");
+ // The source receives XdndStatus. It can use the action to change the cursor to indicate
+ // whether or not the user's requested action will be performed.
+ qCDebug(lcQpaXDnd) << "source:" << event->window << "received XdndStatus";
waiting_for_status = false;
// ignore late status messages
if (event->data.data32[0] && event->data.data32[0] != current_target)
@@ -864,12 +857,13 @@ void QXcbDrag::handleStatus(const xcb_client_message_event_t *event)
handle_xdnd_status(lastEvent);
if (lastEvent != event)
free(lastEvent);
- DEBUG("xdndHandleStatus end");
}
void QXcbDrag::handleLeave(QPlatformWindow *w, const xcb_client_message_event_t *event)
{
- DEBUG("xdnd leave");
+ // If the target receives XdndLeave, it frees any cached data and forgets the whole incident.
+ qCDebug(lcQpaXDnd) << "target:" << event->window << "received XdndLeave";
+
if (!currentWindow || w != currentWindow.data()->handle())
return; // sanity
@@ -882,22 +876,19 @@ void QXcbDrag::handleLeave(QPlatformWindow *w, const xcb_client_message_event_t
if (event->data.data32[0] != xdnd_dragsource) {
// This often happens - leave other-process window quickly
- DEBUG("xdnd drag leave from unexpected source (%x not %x", event->data.data32[0], xdnd_dragsource);
+ qCDebug(lcQpaXDnd, "xdnd drag leave from unexpected source (%x not %x",
+ event->data.data32[0], xdnd_dragsource);
}
- QWindowSystemInterface::handleDrag(w->window(),0,QPoint(),Qt::IgnoreAction);
-
- xdnd_dragsource = 0;
- xdnd_types.clear();
- currentWindow.clear();
+ QWindowSystemInterface::handleDrag(w->window(), nullptr, QPoint(), Qt::IgnoreAction, 0, 0);
}
void QXcbDrag::send_leave()
{
+ // XdndLeave is sent from the source to the target to cancel the drop.
if (!current_target)
return;
-
xcb_client_message_event_t leave;
leave.response_type = XCB_CLIENT_MESSAGE;
leave.sequence = 0;
@@ -919,21 +910,21 @@ void QXcbDrag::send_leave()
if (w && (w->window()->type() == Qt::Desktop) /*&& !w->acceptDrops()*/)
w = 0;
+ qCDebug(lcQpaXDnd) << "sending XdndLeave to target:" << current_target;
+
if (w)
handleLeave(w, (const xcb_client_message_event_t *)&leave);
else
xcb_send_event(xcb_connection(), false,current_proxy_target,
XCB_EVENT_MASK_NO_EVENT, (const char *)&leave);
-
- current_target = 0;
- current_proxy_target = 0;
- source_time = XCB_CURRENT_TIME;
- waiting_for_status = false;
}
-void QXcbDrag::handleDrop(QPlatformWindow *, const xcb_client_message_event_t *event)
+void QXcbDrag::handleDrop(QPlatformWindow *, const xcb_client_message_event_t *event,
+ Qt::MouseButtons b, Qt::KeyboardModifiers mods)
{
- DEBUG("xdndHandleDrop");
+ // Target receives XdndDrop. Once it is finished processing the drop, it sends XdndFinished.
+ qCDebug(lcQpaXDnd) << "target:" << event->window << "received XdndDrop";
+
if (!currentWindow) {
xdnd_dragsource = 0;
return; // sanity
@@ -941,16 +932,14 @@ void QXcbDrag::handleDrop(QPlatformWindow *, const xcb_client_message_event_t *e
const uint32_t *l = event->data.data32;
- DEBUG("xdnd drop");
-
if (l[0] != xdnd_dragsource) {
- DEBUG("xdnd drop from unexpected source (%x not %x", l[0], xdnd_dragsource);
+ qCDebug(lcQpaXDnd, "xdnd drop from unexpected source (%x not %x", l[0], xdnd_dragsource);
return;
}
// update the "user time" from the timestamp in the event.
if (l[2] != 0)
- target_time = /*X11->userTime =*/ l[2];
+ target_time = l[2];
Qt::DropActions supported_drop_actions;
QMimeData *dropData = 0;
@@ -960,9 +949,6 @@ void QXcbDrag::handleDrop(QPlatformWindow *, const xcb_client_message_event_t *e
} else {
dropData = m_dropData;
supported_drop_actions = accepted_drop_action;
-
- // Drop coming from another app? Update keyboard modifiers.
- QGuiApplicationPrivate::modifier_buttons = QGuiApplication::queryKeyboardModifiers();
}
if (!dropData)
@@ -973,7 +959,13 @@ void QXcbDrag::handleDrop(QPlatformWindow *, const xcb_client_message_event_t *e
// dropData = QDragManager::dragPrivate(X11->dndDropTransactions.at(at).object)->data;
// if we can't find it, then use the data in the drag manager
- QPlatformDropQtResponse response = QWindowSystemInterface::handleDrop(currentWindow.data(),dropData,currentPosition,supported_drop_actions);
+ auto buttons = currentDrag() ? b : connection()->queryMouseButtons();
+ auto modifiers = currentDrag() ? mods : connection()->queryKeyboardModifiers();
+
+ QPlatformDropQtResponse response = QWindowSystemInterface::handleDrop(
+ currentWindow.data(), dropData, currentPosition, supported_drop_actions,
+ buttons, modifiers);
+
setExecutedDropAction(response.acceptedAction());
xcb_client_message_event_t finished;
@@ -985,34 +977,26 @@ void QXcbDrag::handleDrop(QPlatformWindow *, const xcb_client_message_event_t *e
finished.data.data32[0] = currentWindow ? xcb_window(currentWindow.data()) : XCB_NONE;
finished.data.data32[1] = response.isAccepted(); // flags
finished.data.data32[2] = toXdndAction(response.acceptedAction());
- xcb_send_event(xcb_connection(), false, current_proxy_target,
- XCB_EVENT_MASK_NO_EVENT, (char *)&finished);
- xdnd_dragsource = 0;
- currentWindow.clear();
- waiting_for_status = false;
+ qCDebug(lcQpaXDnd) << "sending XdndFinished to source:" << xdnd_dragsource;
- // reset
- target_time = XCB_CURRENT_TIME;
+ xcb_send_event(xcb_connection(), false, current_proxy_target,
+ XCB_EVENT_MASK_NO_EVENT, (char *)&finished);
dropped = true;
}
-
void QXcbDrag::handleFinished(const xcb_client_message_event_t *event)
{
- DEBUG("xdndHandleFinished");
+ // Source receives XdndFinished when target is done processing the drop data.
+ qCDebug(lcQpaXDnd) << "source:" << event->window << "received XdndFinished";
+
#ifndef QT_NO_CLIPBOARD
if (event->window != connection()->clipboard()->owner())
return;
#endif
const unsigned long *l = (const unsigned long *)event->data.data32;
-
- DNDDEBUG << "xdndHandleFinished, l[0]" << l[0]
- << "current_target" << current_target
- << "qt_xdnd_current_proxy_targe" << current_proxy_target;
-
if (l[0]) {
int at = findTransactionByWindow(l[0]);
if (at != -1) {
@@ -1087,7 +1071,8 @@ void QXcbDrag::timerEvent(QTimerEvent* e)
void QXcbDrag::cancel()
{
- DEBUG("QXcbDrag::cancel");
+ qCDebug(lcQpaXDnd) << "dnd was canceled";
+
QBasicDrag::cancel();
if (current_target)
send_leave();
@@ -1098,7 +1083,6 @@ void QXcbDrag::cancel()
canceled = true;
}
-// find an ancestor with XdndAware on it
static xcb_window_t findXdndAwareParent(QXcbConnection *c, xcb_window_t window)
{
xcb_window_t target = 0;
@@ -1127,7 +1111,8 @@ static xcb_window_t findXdndAwareParent(QXcbConnection *c, xcb_window_t window)
void QXcbDrag::handleSelectionRequest(const xcb_selection_request_event_t *event)
{
- Q_DECLARE_XCB_EVENT(notify, xcb_selection_notify_event_t);
+ qCDebug(lcQpaXDnd) << "handle selection request from target:" << event->requestor;
+ q_padded_xcb_event<xcb_selection_notify_event_t> notify = {};
notify.response_type = XCB_SELECTION_NOTIFY;
notify.requestor = event->requestor;
notify.selection = event->selection;
@@ -1194,10 +1179,10 @@ void QXcbDrag::handleSelectionRequest(const xcb_selection_request_event_t *event
bool QXcbDrag::dndEnable(QXcbWindow *w, bool on)
{
- DNDDEBUG << "xdndEnable" << w << on;
+ // Windows announce that they support the XDND protocol by creating a window property XdndAware.
if (on) {
- QXcbWindow *xdnd_widget = 0;
- if ((w->window()->type() == Qt::Desktop)) {
+ QXcbWindow *window = nullptr;
+ if (w->window()->type() == Qt::Desktop) {
if (desktop_proxy) // *WE* already have one.
return false;
@@ -1208,8 +1193,8 @@ bool QXcbDrag::dndEnable(QXcbWindow *w, bool on)
if (!proxy_id) {
desktop_proxy = new QWindow;
- xdnd_widget = static_cast<QXcbWindow *>(desktop_proxy->handle());
- proxy_id = xdnd_widget->xcb_window();
+ window = static_cast<QXcbWindow *>(desktop_proxy->handle());
+ proxy_id = window->xcb_window();
xcb_atom_t xdnd_proxy = atom(QXcbAtom::XdndProxy);
xcb_change_property(xcb_connection(), XCB_PROP_MODE_REPLACE, w->xcb_window(), xdnd_proxy,
XCB_ATOM_WINDOW, 32, 1, &proxy_id);
@@ -1218,24 +1203,24 @@ bool QXcbDrag::dndEnable(QXcbWindow *w, bool on)
}
} else {
- xdnd_widget = w;
+ window = w;
}
- if (xdnd_widget) {
- DNDDEBUG << "setting XdndAware for" << xdnd_widget << xdnd_widget->xcb_window();
+ if (window) {
+ qCDebug(lcQpaXDnd) << "setting XdndAware for" << window->xcb_window();
xcb_atom_t atm = xdnd_version;
- xcb_change_property(xcb_connection(), XCB_PROP_MODE_REPLACE, xdnd_widget->xcb_window(),
+ xcb_change_property(xcb_connection(), XCB_PROP_MODE_REPLACE, window->xcb_window(),
atom(QXcbAtom::XdndAware), XCB_ATOM_ATOM, 32, 1, &atm);
return true;
} else {
return false;
}
} else {
- if ((w->window()->type() == Qt::Desktop)) {
+ if (w->window()->type() == Qt::Desktop) {
xcb_delete_property(xcb_connection(), w->xcb_window(), atom(QXcbAtom::XdndProxy));
delete desktop_proxy;
desktop_proxy = 0;
} else {
- DNDDEBUG << "not deleting XDndAware";
+ qCDebug(lcQpaXDnd) << "not deleting XDndAware";
}
return true;
}
@@ -1293,7 +1278,6 @@ QVariant QXcbDropData::xdndObtainData(const QByteArray &format, QVariant::Type r
return mimeConvertToFormat(c, a, result, QLatin1String(format), requestedType, encoding);
}
-
bool QXcbDropData::hasFormat_sys(const QString &format) const
{
return formats().contains(format);
diff --git a/src/plugins/platforms/xcb/qxcbdrag.h b/src/plugins/platforms/xcb/qxcbdrag.h
index 60287b717b..c19008c04b 100644
--- a/src/plugins/platforms/xcb/qxcbdrag.h
+++ b/src/plugins/platforms/xcb/qxcbdrag.h
@@ -78,14 +78,15 @@ public:
void startDrag() override;
void cancel() override;
- void move(const QPoint &globalPos) override;
- void drop(const QPoint &globalPos) override;
+ void move(const QPoint &globalPos, Qt::MouseButtons b, Qt::KeyboardModifiers mods) override;
+ void drop(const QPoint &globalPos, Qt::MouseButtons b, Qt::KeyboardModifiers mods) override;
void endDrag() override;
void handleEnter(QPlatformWindow *window, const xcb_client_message_event_t *event, xcb_window_t proxy = 0);
void handlePosition(QPlatformWindow *w, const xcb_client_message_event_t *event);
void handleLeave(QPlatformWindow *w, const xcb_client_message_event_t *event);
- void handleDrop(QPlatformWindow *, const xcb_client_message_event_t *event);
+ void handleDrop(QPlatformWindow *, const xcb_client_message_event_t *event,
+ Qt::MouseButtons b = 0, Qt::KeyboardModifiers mods = 0);
void handleStatus(const xcb_client_message_event_t *event);
void handleSelectionRequest(const xcb_selection_request_event_t *event);
@@ -100,12 +101,15 @@ public:
protected:
void timerEvent(QTimerEvent* e) override;
+ bool findXdndAwareTarget(const QPoint &globalPos, xcb_window_t *target_out);
+
private:
friend class QXcbDropData;
void init();
- void handle_xdnd_position(QPlatformWindow *w, const xcb_client_message_event_t *event);
+ void handle_xdnd_position(QPlatformWindow *w, const xcb_client_message_event_t *event,
+ Qt::MouseButtons b = 0, Qt::KeyboardModifiers mods = 0);
void handle_xdnd_status(const xcb_client_message_event_t *event);
void send_leave();
@@ -139,6 +143,9 @@ private:
bool dropped;
bool canceled;
+ // A window from Unity DnD Manager, which does not respect the XDnD spec
+ xcb_window_t xdndCollectionWindow = XCB_NONE;
+
// top-level window we sent position to last.
xcb_window_t current_target;
// window to send events to (always valid if current_target)
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index bf9eaacbb8..e9b36c48b8 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -69,12 +69,12 @@
#define register /* C++17 deprecated register */
#include <X11/Xlib.h>
#undef register
+#endif
#if QT_CONFIG(xcb_native_painting)
#include "qxcbnativepainting.h"
#include "qpixmap_x11_p.h"
#include "qbackingstore_x11_p.h"
#endif
-#endif
#include <qpa/qplatforminputcontextfactory_p.h>
#include <private/qgenericunixthemes_p.h>
@@ -243,7 +243,8 @@ QPlatformWindow *QXcbIntegration::createPlatformWindow(QWindow *window) const
{
QXcbScreen *screen = static_cast<QXcbScreen *>(window->screen()->handle());
QXcbGlIntegration *glIntegration = screen->connection()->glIntegration();
- if (window->type() != Qt::Desktop) {
+ const bool isTrayIconWindow = window->objectName() == QLatin1String("QSystemTrayIconSysWindow");
+ if (window->type() != Qt::Desktop && !isTrayIconWindow) {
if (window->supportsOpenGL()) {
if (glIntegration) {
QXcbWindow *xcbWindow = glIntegration->createWindow(window);
@@ -259,7 +260,7 @@ QPlatformWindow *QXcbIntegration::createPlatformWindow(QWindow *window) const
}
}
- Q_ASSERT(window->type() == Qt::Desktop || !window->supportsOpenGL()
+ Q_ASSERT(window->type() == Qt::Desktop || isTrayIconWindow || !window->supportsOpenGL()
|| (!glIntegration && window->surfaceType() == QSurface::RasterGLSurface)); // for VNC
QXcbWindow *xcbWindow = new QXcbWindow(window);
xcbWindow->create();
@@ -286,6 +287,10 @@ QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLCont
QPlatformBackingStore *QXcbIntegration::createPlatformBackingStore(QWindow *window) const
{
+ const bool isTrayIconWindow = window->objectName() == QLatin1String("QSystemTrayIconSysWindow");
+ if (isTrayIconWindow)
+ return new QXcbSystemTrayBackingStore(window);
+
#if QT_CONFIG(xcb_native_painting)
if (nativePaintingEnabled())
return new QXcbNativeBackingStore(window);
@@ -381,8 +386,17 @@ QPlatformClipboard *QXcbIntegration::clipboard() const
#endif
#if QT_CONFIG(draganddrop)
+#include <private/qsimpledrag_p.h>
QPlatformDrag *QXcbIntegration::drag() const
{
+ static const bool useSimpleDrag = qEnvironmentVariableIsSet("QT_XCB_USE_SIMPLE_DRAG");
+ if (Q_UNLIKELY(useSimpleDrag)) { // This is useful for testing purposes
+ static QSimpleDrag *simpleDrag = nullptr;
+ if (!simpleDrag)
+ simpleDrag = new QSimpleDrag();
+ return simpleDrag;
+ }
+
return m_connections.at(0)->drag();
}
#endif
@@ -414,10 +428,7 @@ QPlatformServices *QXcbIntegration::services() const
Qt::KeyboardModifiers QXcbIntegration::queryKeyboardModifiers() const
{
- int keybMask = 0;
- QXcbConnection *conn = m_connections.at(0);
- QXcbCursor::queryPointer(conn, 0, 0, &keybMask);
- return conn->keyboard()->translateModifiers(keybMask);
+ return m_connections.at(0)->queryKeyboardModifiers();
}
QList<int> QXcbIntegration::possibleKeys(const QKeyEvent *e) const
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
index 3733995a0d..3ad16d78d9 100644
--- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
@@ -52,10 +52,8 @@
#include <xkbcommon/xkbcommon-keysyms.h>
-#if QT_CONFIG(xinput2)
-#include <X11/extensions/XI2proto.h>
-#undef KeyPress
-#undef KeyRelease
+#if QT_CONFIG(xcb_xinput)
+#include <xcb/xinput.h>
#endif
QT_BEGIN_NAMESPACE
@@ -831,20 +829,20 @@ void QXcbKeyboard::updateXKBStateFromCore(quint16 state)
}
}
-#if QT_CONFIG(xinput2)
+#if QT_CONFIG(xcb_xinput)
void QXcbKeyboard::updateXKBStateFromXI(void *modInfo, void *groupInfo)
{
if (m_config && !connection()->hasXKB()) {
- xXIModifierInfo *mods = static_cast<xXIModifierInfo *>(modInfo);
- xXIGroupInfo *group = static_cast<xXIGroupInfo *>(groupInfo);
+ auto *mods = static_cast<xcb_input_modifier_info_t *>(modInfo);
+ auto *group = static_cast<xcb_input_group_info_t *>(groupInfo);
const xkb_state_component changedComponents
= xkb_state_update_mask(m_xkbState.get(),
- mods->base_mods,
- mods->latched_mods,
- mods->locked_mods,
- group->base_group,
- group->latched_group,
- group->locked_group);
+ mods->base,
+ mods->latched,
+ mods->locked,
+ group->base,
+ group->latched,
+ group->locked);
handleStateChanges(changedComponents);
}
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.h b/src/plugins/platforms/xcb/qxcbkeyboard.h
index c131d69267..ab926eab84 100644
--- a/src/plugins/platforms/xcb/qxcbkeyboard.h
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.h
@@ -74,7 +74,7 @@ public:
void updateXKBMods();
xkb_mod_mask_t xkbModMask(quint16 state);
void updateXKBStateFromCore(quint16 state);
-#if QT_CONFIG(xinput2)
+#if QT_CONFIG(xcb_xinput)
void updateXKBStateFromXI(void *modInfo, void *groupInfo);
#endif
#if QT_CONFIG(xkb)
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
index db44e58cbb..26b9fcc15a 100644
--- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
+++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
@@ -54,7 +54,6 @@
#include <QtGui/qscreen.h>
#include <QtPlatformHeaders/qxcbwindowfunctions.h>
-#include <QtPlatformHeaders/qxcbintegrationfunctions.h>
#include <QtPlatformHeaders/qxcbscreenfunctions.h>
#include <stdio.h>
@@ -106,50 +105,6 @@ static inline QXcbSystemTrayTracker *systemTrayTracker(const QScreen *s)
return static_cast<const QXcbScreen *>(s->handle())->connection()->systemTrayTracker();
}
-bool QXcbNativeInterface::systemTrayAvailable(const QScreen *screen) const
-{
- return systemTrayTracker(screen);
-}
-
-bool QXcbNativeInterface::requestSystemTrayWindowDock(const QWindow *window)
-{
- return QXcbWindow::requestSystemTrayWindowDockStatic(window);
-}
-
-QRect QXcbNativeInterface::systemTrayWindowGlobalGeometry(const QWindow *window)
-{
- return QXcbWindow::systemTrayWindowGlobalGeometryStatic(window);
-}
-
-xcb_window_t QXcbNativeInterface::locateSystemTray(xcb_connection_t *conn, const QXcbScreen *screen)
-{
- if (m_sysTraySelectionAtom == XCB_ATOM_NONE) {
- const QByteArray net_sys_tray = QString::fromLatin1("_NET_SYSTEM_TRAY_S%1").arg(screen->screenNumber()).toLatin1();
- auto intern_r = Q_XCB_REPLY_UNCHECKED(xcb_intern_atom, conn,
- true, net_sys_tray.length(), net_sys_tray);
- if (!intern_r)
- return XCB_WINDOW_NONE;
-
- m_sysTraySelectionAtom = intern_r->atom;
- }
-
- auto sel_owner_r = Q_XCB_REPLY_UNCHECKED(xcb_get_selection_owner, conn, m_sysTraySelectionAtom);
- if (!sel_owner_r)
- return XCB_WINDOW_NONE;
-
- return sel_owner_r->owner;
-}
-
-bool QXcbNativeInterface::systrayVisualHasAlphaChannel()
-{
- return QXcbConnection::xEmbedSystemTrayVisualHasAlphaChannel();
-}
-
-void QXcbNativeInterface::setParentRelativeBackPixmap(QWindow *window)
-{
- QXcbWindow::setParentRelativeBackPixmapStatic(window);
-}
-
void *QXcbNativeInterface::nativeResourceForIntegration(const QByteArray &resourceString)
{
QByteArray lowerCaseResource = resourceString.toLower();
@@ -371,18 +326,6 @@ QFunctionPointer QXcbNativeInterface::platformFunction(const QByteArray &functio
if (function == QXcbWindowFunctions::setWmWindowIconTextIdentifier())
return QFunctionPointer(QXcbWindowFunctions::SetWmWindowIconText(QXcbWindow::setWindowIconTextStatic));
- if (function == QXcbWindowFunctions::setParentRelativeBackPixmapIdentifier())
- return QFunctionPointer(QXcbWindowFunctions::SetParentRelativeBackPixmap(QXcbWindow::setParentRelativeBackPixmapStatic));
-
- if (function == QXcbWindowFunctions::requestSystemTrayWindowDockIdentifier())
- return QFunctionPointer(QXcbWindowFunctions::RequestSystemTrayWindowDock(QXcbWindow::requestSystemTrayWindowDockStatic));
-
- if (function == QXcbWindowFunctions::systemTrayWindowGlobalGeometryIdentifier())
- return QFunctionPointer(QXcbWindowFunctions::SystemTrayWindowGlobalGeometry(QXcbWindow::systemTrayWindowGlobalGeometryStatic));
-
- if (function == QXcbIntegrationFunctions::xEmbedSystemTrayVisualHasAlphaChannelIdentifier())
- return QFunctionPointer(QXcbIntegrationFunctions::XEmbedSystemTrayVisualHasAlphaChannel(QXcbConnection::xEmbedSystemTrayVisualHasAlphaChannel));
-
if (function == QXcbWindowFunctions::visualIdIdentifier()) {
return QFunctionPointer(QXcbWindowFunctions::VisualId(QXcbWindow::visualIdStatic));
}
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.h b/src/plugins/platforms/xcb/qxcbnativeinterface.h
index 6a752c68ca..5ec3827afd 100644
--- a/src/plugins/platforms/xcb/qxcbnativeinterface.h
+++ b/src/plugins/platforms/xcb/qxcbnativeinterface.h
@@ -122,11 +122,6 @@ public:
QXcbConnection::PeekOptions option = QXcbConnection::PeekDefault,
qint32 peekerId = -1);
- Q_INVOKABLE bool systemTrayAvailable(const QScreen *screen) const;
- Q_INVOKABLE void setParentRelativeBackPixmap(QWindow *window);
- Q_INVOKABLE bool systrayVisualHasAlphaChannel();
- Q_INVOKABLE bool requestSystemTrayWindowDock(const QWindow *window);
- Q_INVOKABLE QRect systemTrayWindowGlobalGeometry(const QWindow *window);
Q_INVOKABLE QString dumpConnectionNativeWindows(const QXcbConnection *connection, WId root) const;
Q_INVOKABLE QString dumpNativeWindows(WId root = 0) const;
@@ -136,8 +131,6 @@ signals:
void systemTrayWindowChanged(QScreen *screen);
private:
- xcb_window_t locateSystemTray(xcb_connection_t *conn, const QXcbScreen *screen);
-
const QByteArray m_genericEventFilterType;
xcb_atom_t m_sysTraySelectionAtom = XCB_ATOM_NONE;
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
index 7f2793b2b7..b398768bbc 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -95,12 +95,6 @@ QXcbVirtualDesktop::QXcbVirtualDesktop(QXcbConnection *connection, xcb_screen_t
m_windowManagerName = QXcbWindow::windowTitle(connection, windowManager);
}
- const xcb_query_extension_reply_t *sync_reply = xcb_get_extension_data(xcb_connection(), &xcb_sync_id);
- if (!sync_reply || !sync_reply->present)
- m_syncRequestSupported = false;
- else
- m_syncRequestSupported = true;
-
xcb_depth_iterator_t depth_iterator =
xcb_screen_allowed_depths_iterator(screen);
diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h
index 6438669e7a..e13777f661 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.h
+++ b/src/plugins/platforms/xcb/qxcbscreen.h
@@ -102,7 +102,6 @@ public:
int antialiasingEnabled() const { return m_antialiasingEnabled; }
QString windowManagerName() const { return m_windowManagerName; }
- bool syncRequestSupported() const { return m_syncRequestSupported; }
QSurfaceFormat surfaceFormatFor(const QSurfaceFormat &format) const;
@@ -133,7 +132,6 @@ private:
QFontEngine::SubpixelAntialiasingType m_subpixelType = QFontEngine::SubpixelAntialiasingType(-1);
int m_antialiasingEnabled = -1;
QString m_windowManagerName;
- bool m_syncRequestSupported = false;
QMap<xcb_visualid_t, xcb_visualtype_t> m_visuals;
QMap<xcb_visualid_t, quint8> m_visualDepths;
uint16_t m_rotation = XCB_RANDR_ROTATION_ROTATE_0;
@@ -188,7 +186,6 @@ public:
void windowShown(QXcbWindow *window);
QString windowManagerName() const { return m_virtualDesktop->windowManagerName(); }
- bool syncRequestSupported() const { return m_virtualDesktop->syncRequestSupported(); }
QSurfaceFormat surfaceFormatFor(const QSurfaceFormat &format) const;
diff --git a/src/plugins/platforms/xcb/qxcbsystemtraytracker.cpp b/src/plugins/platforms/xcb/qxcbsystemtraytracker.cpp
index c98879c7df..684e603fab 100644
--- a/src/plugins/platforms/xcb/qxcbsystemtraytracker.cpp
+++ b/src/plugins/platforms/xcb/qxcbsystemtraytracker.cpp
@@ -91,8 +91,7 @@ xcb_window_t QXcbSystemTrayTracker::locateTrayWindow(const QXcbConnection *conne
return reply->owner;
}
-// API for QPlatformNativeInterface/QPlatformSystemTrayIcon: Request a window
-// to be docked on the tray.
+// Request a window to be docked on the tray.
void QXcbSystemTrayTracker::requestSystemTrayWindowDock(xcb_window_t window) const
{
xcb_client_message_event_t trayRequest;
@@ -122,23 +121,6 @@ xcb_window_t QXcbSystemTrayTracker::trayWindow()
return m_trayWindow;
}
-// API for QPlatformNativeInterface/QPlatformSystemTrayIcon: Return the geometry of a
-// a window parented on the tray. Determines the global geometry via XCB since mapToGlobal
-// does not work for the QWindow parented on the tray.
-QRect QXcbSystemTrayTracker::systemTrayWindowGlobalGeometry(xcb_window_t window) const
-{
- xcb_connection_t *conn = m_connection->xcb_connection();
- auto geomReply = Q_XCB_REPLY(xcb_get_geometry, conn, window);
- if (!geomReply)
- return QRect();
-
- auto translateReply = Q_XCB_REPLY(xcb_translate_coordinates, conn, window, m_connection->rootWindow(), 0, 0);
- if (!translateReply)
- return QRect();
-
- return QRect(QPoint(translateReply->dst_x, translateReply->dst_y), QSize(geomReply->width, geomReply->height));
-}
-
inline void QXcbSystemTrayTracker::emitSystemTrayWindowChanged()
{
if (const QPlatformScreen *ps = m_connection->primaryScreen())
@@ -162,10 +144,18 @@ void QXcbSystemTrayTracker::handleDestroyNotifyEvent(const xcb_destroy_notify_ev
}
}
-bool QXcbSystemTrayTracker::visualHasAlphaChannel()
+xcb_visualid_t QXcbSystemTrayTracker::visualId()
+{
+ xcb_visualid_t visual = netSystemTrayVisual();
+ if (visual == XCB_NONE)
+ visual = m_connection->primaryScreen()->screen()->root_visual;
+ return visual;
+}
+
+xcb_visualid_t QXcbSystemTrayTracker::netSystemTrayVisual()
{
if (m_trayWindow == XCB_WINDOW_NONE)
- return false;
+ return XCB_NONE;
xcb_atom_t tray_atom = m_connection->atom(QXcbAtom::_NET_SYSTEM_TRAY_VISUAL);
@@ -174,7 +164,7 @@ bool QXcbSystemTrayTracker::visualHasAlphaChannel()
false, m_trayWindow,
tray_atom, XCB_ATOM_VISUALID, 0, 1);
if (!systray_atom_reply)
- return false;
+ return XCB_NONE;
xcb_visualid_t systrayVisualId = XCB_NONE;
if (systray_atom_reply->value_len > 0 && xcb_get_property_value_length(systray_atom_reply.get()) > 0) {
@@ -182,12 +172,7 @@ bool QXcbSystemTrayTracker::visualHasAlphaChannel()
systrayVisualId = vids[0];
}
- if (systrayVisualId != XCB_NONE) {
- quint8 depth = m_connection->primaryScreen()->depthOfVisual(systrayVisualId);
- return depth == 32;
- }
-
- return false;
+ return systrayVisualId;
}
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbsystemtraytracker.h b/src/plugins/platforms/xcb/qxcbsystemtraytracker.h
index a95b9374e9..d2fc24c957 100644
--- a/src/plugins/platforms/xcb/qxcbsystemtraytracker.h
+++ b/src/plugins/platforms/xcb/qxcbsystemtraytracker.h
@@ -57,13 +57,12 @@ public:
xcb_window_t trayWindow();
void requestSystemTrayWindowDock(xcb_window_t window) const;
- QRect systemTrayWindowGlobalGeometry(xcb_window_t window) const;
void notifyManagerClientMessageEvent(const xcb_client_message_event_t *);
void handleDestroyNotifyEvent(const xcb_destroy_notify_event_t *) override;
- bool visualHasAlphaChannel();
+ xcb_visualid_t visualId();
signals:
void systemTrayWindowChanged(QScreen *screen);
@@ -73,6 +72,7 @@ private:
xcb_atom_t selection);
static xcb_window_t locateTrayWindow(const QXcbConnection *connection, xcb_atom_t selection);
void emitSystemTrayWindowChanged();
+ xcb_visualid_t netSystemTrayVisual();
const xcb_atom_t m_selection;
const xcb_atom_t m_trayAtom;
diff --git a/src/plugins/platforms/xcb/qxcbvulkaninstance.cpp b/src/plugins/platforms/xcb/qxcbvulkaninstance.cpp
index 4d540defa9..b3f8a5832d 100644
--- a/src/plugins/platforms/xcb/qxcbvulkaninstance.cpp
+++ b/src/plugins/platforms/xcb/qxcbvulkaninstance.cpp
@@ -46,20 +46,9 @@ QT_BEGIN_NAMESPACE
QXcbVulkanInstance::QXcbVulkanInstance(QVulkanInstance *instance)
: m_instance(instance),
m_getPhysDevPresSupport(nullptr),
- m_createSurface(nullptr),
- m_destroySurface(nullptr)
+ m_createSurface(nullptr)
{
- if (qEnvironmentVariableIsSet("QT_VULKAN_LIB"))
- m_lib.setFileName(QString::fromUtf8(qgetenv("QT_VULKAN_LIB")));
- else
- m_lib.setFileName(QStringLiteral("vulkan"));
-
- if (!m_lib.load()) {
- qWarning("Failed to load %s: %s", qPrintable(m_lib.fileName()), qPrintable(m_lib.errorString()));
- return;
- }
-
- init(&m_lib);
+ loadVulkanLibrary(QStringLiteral("vulkan"));
}
QXcbVulkanInstance::~QXcbVulkanInstance()
@@ -114,14 +103,6 @@ VkSurfaceKHR QXcbVulkanInstance::createSurface(QXcbWindow *window)
qWarning("Failed to find vkCreateXcbSurfaceKHR");
return surface;
}
- if (!m_destroySurface) {
- m_destroySurface = reinterpret_cast<PFN_vkDestroySurfaceKHR>(
- m_vkGetInstanceProcAddr(m_vkInst, "vkDestroySurfaceKHR"));
- }
- if (!m_destroySurface) {
- qWarning("Failed to find vkDestroySurfaceKHR");
- return surface;
- }
VkXcbSurfaceCreateInfoKHR surfaceInfo;
memset(&surfaceInfo, 0, sizeof(surfaceInfo));
@@ -135,12 +116,6 @@ VkSurfaceKHR QXcbVulkanInstance::createSurface(QXcbWindow *window)
return surface;
}
-void QXcbVulkanInstance::destroySurface(VkSurfaceKHR surface)
-{
- if (m_destroySurface && surface)
- m_destroySurface(m_vkInst, surface, nullptr);
-}
-
void QXcbVulkanInstance::presentQueued(QWindow *window)
{
QXcbWindow *w = static_cast<QXcbWindow *>(window->handle());
diff --git a/src/plugins/platforms/xcb/qxcbvulkaninstance.h b/src/plugins/platforms/xcb/qxcbvulkaninstance.h
index dbe057d944..53f7345254 100644
--- a/src/plugins/platforms/xcb/qxcbvulkaninstance.h
+++ b/src/plugins/platforms/xcb/qxcbvulkaninstance.h
@@ -64,14 +64,11 @@ public:
void presentQueued(QWindow *window) override;
VkSurfaceKHR createSurface(QXcbWindow *window);
- void destroySurface(VkSurfaceKHR surface);
private:
QVulkanInstance *m_instance;
- QLibrary m_lib;
PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR m_getPhysDevPresSupport;
PFN_vkCreateXcbSurfaceKHR m_createSurface;
- PFN_vkDestroySurfaceKHR m_destroySurface;
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 50711e75c3..9e9058e6e9 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -70,6 +70,9 @@
#undef class
#include <xcb/xfixes.h>
#include <xcb/shape.h>
+#if QT_CONFIG(xcb_xinput)
+#include <xcb/xinput.h>
+#endif
// xcb-icccm 3.8 support
#ifdef XCB_ICCCM_NUM_WM_SIZE_HINTS_ELEMENTS
@@ -109,11 +112,6 @@
#undef register
#endif
-#if QT_CONFIG(xinput2)
-#include <X11/extensions/XInput2.h>
-#include <X11/extensions/XI2proto.h>
-#endif
-
#define XCOORD_MAX 16383
enum {
defaultWindowWidth = 160,
@@ -200,11 +198,6 @@ void QXcbWindow::setImageFormatForVisual(const xcb_visualtype_t *visual)
}
}
-static inline bool positionIncludesFrame(QWindow *w)
-{
- return qt_window_private(w)->positionPolicy == QWindowPrivate::WindowFrameInclusive;
-}
-
#if QT_CONFIG(xcb_xlib)
static inline XTextProperty* qstringToXTP(Display *dpy, const QString& s)
{
@@ -308,6 +301,7 @@ void QXcbWindow::create()
destroy();
m_windowState = Qt::WindowNoState;
+ m_trayIconWindow = window()->objectName() == QLatin1String("QSystemTrayIconSysWindow");
Qt::WindowType type = window()->type();
@@ -334,9 +328,6 @@ void QXcbWindow::create()
return;
}
- // Parameters to XCreateWindow() are frame corner + inner size.
- // This fits in case position policy is frame inclusive. There is
- // currently no way to implement it for frame-exclusive geometries.
QPlatformWindow::setGeometry(rect);
if (platformScreen != currentScreen)
@@ -368,7 +359,9 @@ void QXcbWindow::create()
const xcb_visualtype_t *visual = nullptr;
- if (connection()->hasDefaultVisualId()) {
+ if (m_trayIconWindow && connection()->systemTrayTracker()) {
+ visual = platformScreen->visualForId(connection()->systemTrayTracker()->visualId());
+ } else if (connection()->hasDefaultVisualId()) {
visual = platformScreen->visualForId(connection()->defaultVisualId());
if (!visual)
qWarning() << "Failed to use requested visual id.";
@@ -458,9 +451,7 @@ void QXcbWindow::create()
properties[propertyCount++] = atom(QXcbAtom::WM_TAKE_FOCUS);
properties[propertyCount++] = atom(QXcbAtom::_NET_WM_PING);
- m_usingSyncProtocol = platformScreen->syncRequestSupported();
-
- if (m_usingSyncProtocol)
+ if (connection()->hasXSync())
properties[propertyCount++] = atom(QXcbAtom::_NET_WM_SYNC_REQUEST);
if (window()->flags() & Qt::WindowContextHelpButtonHint)
@@ -484,7 +475,7 @@ void QXcbWindow::create()
XCB_ATOM_STRING, 8, wmClass.size(), wmClass.constData());
}
- if (m_usingSyncProtocol) {
+ if (connection()->hasXSync()) {
m_syncCounter = xcb_generate_id(xcb_connection());
xcb_sync_create_counter(xcb_connection(), m_syncCounter, m_syncValue);
@@ -504,6 +495,13 @@ void QXcbWindow::create()
atom(QXcbAtom::_NET_WM_PID), XCB_ATOM_CARDINAL, 32,
1, &pid);
+ const QByteArray clientMachine = QSysInfo::machineHostName().toLocal8Bit();
+ if (!clientMachine.isEmpty()) {
+ xcb_change_property(xcb_connection(), XCB_PROP_MODE_REPLACE, m_window,
+ atom(QXcbAtom::WM_CLIENT_MACHINE), XCB_ATOM_STRING, 8,
+ clientMachine.size(), clientMachine.constData());
+ }
+
xcb_wm_hints_t hints;
memset(&hints, 0, sizeof(hints));
xcb_wm_hints_set_normal(&hints);
@@ -524,7 +522,7 @@ void QXcbWindow::create()
atom(QXcbAtom::_XEMBED_INFO),
32, 2, (void *)data);
-#if QT_CONFIG(xinput2)
+#if QT_CONFIG(xcb_xinput)
if (connection()->hasXInput2()) {
if (connection()->xi2MouseEventsDisabled())
connection()->xi2SelectDeviceEventsCompatibility(m_window);
@@ -562,6 +560,9 @@ void QXcbWindow::create()
QByteArray wmWindowRole = window()->property(wm_window_role_property_id).toByteArray();
setWmWindowRole(wmWindowRole);
}
+
+ if (m_trayIconWindow)
+ m_embedded = requestSystemTrayWindowDock();
}
QXcbWindow::~QXcbWindow()
@@ -587,7 +588,7 @@ void QXcbWindow::destroy()
if (connection()->mouseGrabber() == this)
connection()->setMouseGrabber(nullptr);
- if (m_syncCounter && m_usingSyncProtocol)
+ if (m_syncCounter && connection()->hasXSync())
xcb_sync_destroy_counter(xcb_connection(), m_syncCounter);
if (m_window) {
if (m_netWmUserTimeWindow) {
@@ -623,25 +624,23 @@ void QXcbWindow::setGeometry(const QRect &rect)
if (!newScreen)
newScreen = xcbScreen();
- const QRect wmGeometry = windowToWmGeometry(rect);
-
if (newScreen != currentScreen)
QWindowSystemInterface::handleWindowScreenChanged(window(), newScreen->QPlatformScreen::screen());
if (qt_window_private(window())->positionAutomatic) {
const quint32 mask = XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT;
const qint32 values[] = {
- qBound<qint32>(1, wmGeometry.width(), XCOORD_MAX),
- qBound<qint32>(1, wmGeometry.height(), XCOORD_MAX),
+ qBound<qint32>(1, rect.width(), XCOORD_MAX),
+ qBound<qint32>(1, rect.height(), XCOORD_MAX),
};
xcb_configure_window(xcb_connection(), m_window, mask, reinterpret_cast<const quint32*>(values));
} else {
const quint32 mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT;
const qint32 values[] = {
- qBound<qint32>(-XCOORD_MAX, wmGeometry.x(), XCOORD_MAX),
- qBound<qint32>(-XCOORD_MAX, wmGeometry.y(), XCOORD_MAX),
- qBound<qint32>(1, wmGeometry.width(), XCOORD_MAX),
- qBound<qint32>(1, wmGeometry.height(), XCOORD_MAX),
+ qBound<qint32>(-XCOORD_MAX, rect.x(), XCOORD_MAX),
+ qBound<qint32>(-XCOORD_MAX, rect.y(), XCOORD_MAX),
+ qBound<qint32>(1, rect.width(), XCOORD_MAX),
+ qBound<qint32>(1, rect.height(), XCOORD_MAX),
};
xcb_configure_window(xcb_connection(), m_window, mask, reinterpret_cast<const quint32*>(values));
if (window()->parent() && !window()->transientParent()) {
@@ -764,9 +763,6 @@ void QXcbWindow::show()
xcb_set_wm_hints(xcb_connection(), m_window, &hints);
- m_gravity = positionIncludesFrame(window()) ?
- XCB_GRAVITY_NORTH_WEST : XCB_GRAVITY_STATIC;
-
// update WM_NORMAL_HINTS
propagateSizeHints();
@@ -801,7 +797,7 @@ void QXcbWindow::show()
else if (connection()->time() != XCB_TIME_CURRENT_TIME)
updateNetWmUserTime(connection()->time());
- if (window()->objectName() == QLatin1String("QSystemTrayIconSysWindow"))
+ if (m_trayIconWindow)
return; // defer showing until XEMBED_EMBEDDED_NOTIFY
xcb_map_window(xcb_connection(), m_window);
@@ -819,7 +815,7 @@ void QXcbWindow::hide()
xcb_unmap_window(xcb_connection(), m_window);
// send synthetic UnmapNotify event according to icccm 4.1.4
- Q_DECLARE_XCB_EVENT(event, xcb_unmap_notify_event_t);
+ q_padded_xcb_event<xcb_unmap_notify_event_t> event = {};
event.response_type = XCB_UNMAP_NOTIFY;
event.event = xcbScreen()->root();
event.window = m_window;
@@ -1364,17 +1360,10 @@ void QXcbWindow::updateNetWmUserTime(xcb_timestamp_t timestamp)
xcb_change_property(xcb_connection(), XCB_PROP_MODE_REPLACE, m_window, atom(QXcbAtom::_NET_WM_USER_TIME_WINDOW),
XCB_ATOM_WINDOW, 32, 1, &m_netWmUserTimeWindow);
xcb_delete_property(xcb_connection(), m_window, atom(QXcbAtom::_NET_WM_USER_TIME));
-#ifndef QT_NO_DEBUG
- QByteArray ba("Qt NET_WM user time window");
- xcb_change_property(xcb_connection(),
- XCB_PROP_MODE_REPLACE,
- m_netWmUserTimeWindow,
- atom(QXcbAtom::_NET_WM_NAME),
- atom(QXcbAtom::UTF8_STRING),
- 8,
- ba.length(),
- ba.constData());
-#endif
+
+ QXcbWindow::setWindowTitle(connection(), m_netWmUserTimeWindow,
+ QStringLiteral("Qt NET_WM User Time Window"));
+
} else if (!isSupportedByWM) {
// WM no longer supports it, then we should remove the
// _NET_WM_USER_TIME_WINDOW atom.
@@ -1452,24 +1441,7 @@ void QXcbWindow::setParent(const QPlatformWindow *parent)
void QXcbWindow::setWindowTitle(const QString &title)
{
- QString fullTitle = formatWindowTitle(title, QString::fromUtf8(" \xe2\x80\x94 ")); // unicode character U+2014, EM DASH
- const QByteArray ba = std::move(fullTitle).toUtf8();
- xcb_change_property(xcb_connection(),
- XCB_PROP_MODE_REPLACE,
- m_window,
- atom(QXcbAtom::_NET_WM_NAME),
- atom(QXcbAtom::UTF8_STRING),
- 8,
- ba.length(),
- ba.constData());
-
-#if QT_CONFIG(xcb_xlib)
- Display *dpy = static_cast<Display *>(connection()->xlib_display());
- XTextProperty *text = qstringToXTP(dpy, title);
- if (text)
- XSetWMName(dpy, m_window, text);
-#endif
- xcb_flush(xcb_connection());
+ setWindowTitle(connection(), m_window, title);
}
void QXcbWindow::setWindowIconText(const QString &title)
@@ -1541,38 +1513,28 @@ void QXcbWindow::lower()
xcb_configure_window(xcb_connection(), m_window, mask, values);
}
-// Adapt the geometry to match the WM expection with regards
-// to gravity.
-QRect QXcbWindow::windowToWmGeometry(QRect r) const
-{
- if (m_dirtyFrameMargins || m_frameMargins.isNull())
- return r;
- const bool frameInclusive = positionIncludesFrame(window());
- // XCB_GRAVITY_STATIC requires the inner geometry, whereas
- // XCB_GRAVITY_NORTH_WEST requires the frame geometry
- if (frameInclusive && m_gravity == XCB_GRAVITY_STATIC) {
- r.translate(m_frameMargins.left(), m_frameMargins.top());
- } else if (!frameInclusive && m_gravity == XCB_GRAVITY_NORTH_WEST) {
- r.translate(-m_frameMargins.left(), -m_frameMargins.top());
- }
- return r;
-}
-
void QXcbWindow::propagateSizeHints()
{
// update WM_NORMAL_HINTS
xcb_size_hints_t hints;
memset(&hints, 0, sizeof(hints));
- const QRect xRect = windowToWmGeometry(geometry());
+ const QRect rect = geometry();
+ QWindowPrivate *win = qt_window_private(window());
+
+ if (!win->positionAutomatic)
+ xcb_size_hints_set_position(&hints, true, rect.x(), rect.y());
+ if (rect.width() < QWINDOWSIZE_MAX || rect.height() < QWINDOWSIZE_MAX)
+ xcb_size_hints_set_size(&hints, true, rect.width(), rect.height());
- QWindow *win = window();
+ /* Gravity describes how to interpret x and y values the next time
+ window needs to be positioned on a screen.
+ XCB_GRAVITY_STATIC : the left top corner of the client window
+ XCB_GRAVITY_NORTH_WEST : the left top corner of the frame window */
+ auto gravity = win->positionPolicy == QWindowPrivate::WindowFrameInclusive
+ ? XCB_GRAVITY_NORTH_WEST : XCB_GRAVITY_STATIC;
- if (!qt_window_private(win)->positionAutomatic)
- xcb_size_hints_set_position(&hints, true, xRect.x(), xRect.y());
- if (xRect.width() < QWINDOWSIZE_MAX || xRect.height() < QWINDOWSIZE_MAX)
- xcb_size_hints_set_size(&hints, true, xRect.width(), xRect.height());
- xcb_size_hints_set_win_gravity(&hints, m_gravity);
+ xcb_size_hints_set_win_gravity(&hints, gravity);
QSize minimumSize = windowMinimumSize();
QSize maximumSize = windowMaximumSize();
@@ -1836,12 +1798,6 @@ void QXcbWindow::setWmWindowRole(const QByteArray &role)
role.size(), role.constData());
}
-void QXcbWindow::setParentRelativeBackPixmapStatic(QWindow *window)
-{
- if (window->handle())
- static_cast<QXcbWindow *>(window->handle())->setParentRelativeBackPixmap();
-}
-
void QXcbWindow::setParentRelativeBackPixmap()
{
const quint32 mask = XCB_CW_BACK_PIXMAP;
@@ -1849,14 +1805,7 @@ void QXcbWindow::setParentRelativeBackPixmap()
xcb_change_window_attributes(xcb_connection(), m_window, mask, values);
}
-bool QXcbWindow::requestSystemTrayWindowDockStatic(const QWindow *window)
-{
- if (window->handle())
- return static_cast<QXcbWindow *>(window->handle())->requestSystemTrayWindowDock();
- return false;
-}
-
-bool QXcbWindow::requestSystemTrayWindowDock() const
+bool QXcbWindow::requestSystemTrayWindowDock()
{
if (!connection()->systemTrayTracker())
return false;
@@ -1864,20 +1813,6 @@ bool QXcbWindow::requestSystemTrayWindowDock() const
return true;
}
-QRect QXcbWindow::systemTrayWindowGlobalGeometryStatic(const QWindow *window)
-{
- if (window->handle())
- return static_cast<QXcbWindow *>(window->handle())->systemTrayWindowGlobalGeometry();
- return QRect();
-}
-
-QRect QXcbWindow::systemTrayWindowGlobalGeometry() const
-{
- if (!connection()->systemTrayTracker())
- return QRect();
- return connection()->systemTrayTracker()->systemTrayWindowGlobalGeometry(m_window);
-}
-
class ExposeCompressor
{
public:
@@ -1977,7 +1912,7 @@ void QXcbWindow::handleClientMessageEvent(const xcb_client_message_event_t *even
connection()->setTime(event->data.data32[1]);
m_syncValue.lo = event->data.data32[2];
m_syncValue.hi = event->data.data32[3];
- if (m_usingSyncProtocol)
+ if (connection()->hasXSync())
m_syncState = SyncReceived;
#ifndef QT_NO_WHATSTHIS
} else if (protocolAtom == atom(QXcbAtom::_NET_WM_CONTEXT_HELP)) {
@@ -2052,7 +1987,7 @@ void QXcbWindow::handleConfigureNotifyEvent(const xcb_configure_notify_event_t *
}
m_oldWindowSize = actualGeometry.size();
- if (m_usingSyncProtocol && m_syncState == SyncReceived)
+ if (connection()->hasXSync() && m_syncState == SyncReceived)
m_syncState = SyncAndConfigureReceived;
m_dirtyFrameMargins = true;
@@ -2137,7 +2072,7 @@ void QXcbWindow::handleButtonPressEvent(int event_x, int event_y, int root_x, in
updateNetWmUserTime(timestamp);
- if (m_embedded) {
+ if (m_embedded && !m_trayIconWindow) {
if (window() != QGuiApplication::focusWindow()) {
const QXcbWindow *container = static_cast<const QXcbWindow *>(parent());
Q_ASSERT(container != 0);
@@ -2149,7 +2084,7 @@ void QXcbWindow::handleButtonPressEvent(int event_x, int event_y, int root_x, in
QPoint global(root_x, root_y);
if (isWheel) {
-#if QT_CONFIG(xinput2)
+#if QT_CONFIG(xcb_xinput)
if (!connection()->isAtLeastXI21()) {
#endif
QPoint angleDelta;
@@ -2164,7 +2099,7 @@ void QXcbWindow::handleButtonPressEvent(int event_x, int event_y, int root_x, in
if (modifiers & Qt::AltModifier)
std::swap(angleDelta.rx(), angleDelta.ry());
QWindowSystemInterface::handleWheelEvent(window(), timestamp, local, global, QPoint(), angleDelta, modifiers);
-#if QT_CONFIG(xinput2)
+#if QT_CONFIG(xcb_xinput)
}
#endif
return;
@@ -2204,7 +2139,7 @@ static inline bool doCheckUnGrabAncestor(QXcbConnection *conn)
if (conn) {
const bool mouseButtonsPressed = (conn->buttonState() != Qt::NoButton);
-#if QT_CONFIG(xinput2)
+#if QT_CONFIG(xcb_xinput)
return mouseButtonsPressed || (conn->hasXInput2() && !conn->xi2MouseEventsDisabled());
#else
return mouseButtonsPressed;
@@ -2258,7 +2193,7 @@ void QXcbWindow::handleEnterNotifyEvent(int event_x, int event_y, int root_x, in
if (ignoreEnterEvent(mode, detail, connection()) || connection()->mousePressWindow())
return;
-#ifdef XCB_USE_XINPUT21
+#if QT_CONFIG(xcb_xinput)
// Updates scroll valuators, as user might have done some scrolling outside our X client.
connection()->xi2UpdateScrollingDevices();
#endif
@@ -2330,16 +2265,18 @@ void QXcbWindow::handleMotionNotifyEvent(const xcb_motion_notify_event_t *event)
event->time, QEvent::MouseMove);
}
-#if QT_CONFIG(xinput2)
-static inline int fixed1616ToInt(FP1616 val)
+#if QT_CONFIG(xcb_xinput)
+static inline int fixed1616ToInt(xcb_input_fp1616_t val)
{
return int(qreal(val) / 0x10000);
}
+#define qt_xcb_mask_is_set(ptr, event) (((unsigned char*)(ptr))[(event)>>3] & (1 << ((event) & 7)))
+
void QXcbWindow::handleXIMouseEvent(xcb_ge_event_t *event, Qt::MouseEventSource source)
{
QXcbConnection *conn = connection();
- xXIDeviceEvent *ev = reinterpret_cast<xXIDeviceEvent *>(event);
+ auto *ev = reinterpret_cast<xcb_input_button_press_event_t *>(event);
if (ev->buttons_len > 0) {
unsigned char *buttonMask = (unsigned char *) &ev[1];
@@ -2347,16 +2284,16 @@ void QXcbWindow::handleXIMouseEvent(xcb_ge_event_t *event, Qt::MouseEventSource
// XIPointerEmulated being set: https://bugs.freedesktop.org/show_bug.cgi?id=98188
// Filter them out by other attributes: when their source device is a touch screen
// and the LMB is pressed.
- if (XIMaskIsSet(buttonMask, 1) && conn->isTouchScreen(ev->sourceid)) {
+ if (qt_xcb_mask_is_set(buttonMask, 1) && conn->isTouchScreen(ev->sourceid)) {
if (Q_UNLIKELY(lcQpaXInputEvents().isDebugEnabled()))
qCDebug(lcQpaXInput, "XI2 mouse event from touch device %d was ignored", ev->sourceid);
return;
}
for (int i = 1; i <= 15; ++i)
- conn->setButtonState(conn->translateMouseButton(i), XIMaskIsSet(buttonMask, i));
+ conn->setButtonState(conn->translateMouseButton(i), qt_xcb_mask_is_set(buttonMask, i));
}
- const Qt::KeyboardModifiers modifiers = conn->keyboard()->translateModifiers(ev->mods.effective_mods);
+ const Qt::KeyboardModifiers modifiers = conn->keyboard()->translateModifiers(ev->mods.effective);
const int event_x = fixed1616ToInt(ev->event_x);
const int event_y = fixed1616ToInt(ev->event_y);
const int root_x = fixed1616ToInt(ev->root_x);
@@ -2373,47 +2310,47 @@ void QXcbWindow::handleXIMouseEvent(xcb_ge_event_t *event, Qt::MouseEventSource
sourceName = me.valueToKey(source);
}
- switch (ev->evtype) {
- case XI_ButtonPress:
+ switch (ev->event_type) {
+ case XCB_INPUT_BUTTON_PRESS:
if (Q_UNLIKELY(lcQpaXInputEvents().isDebugEnabled()))
qCDebug(lcQpaXInputEvents, "XI2 mouse press, button %d, time %d, source %s", button, ev->time, sourceName);
conn->setButtonState(button, true);
handleButtonPressEvent(event_x, event_y, root_x, root_y, ev->detail, modifiers, ev->time, QEvent::MouseButtonPress, source);
break;
- case XI_ButtonRelease:
+ case XCB_INPUT_BUTTON_RELEASE:
if (Q_UNLIKELY(lcQpaXInputEvents().isDebugEnabled()))
qCDebug(lcQpaXInputEvents, "XI2 mouse release, button %d, time %d, source %s", button, ev->time, sourceName);
conn->setButtonState(button, false);
handleButtonReleaseEvent(event_x, event_y, root_x, root_y, ev->detail, modifiers, ev->time, QEvent::MouseButtonRelease, source);
break;
- case XI_Motion:
+ case XCB_INPUT_MOTION:
if (Q_UNLIKELY(lcQpaXInputEvents().isDebugEnabled()))
qCDebug(lcQpaXInputEvents, "XI2 mouse motion %d,%d, time %d, source %s", event_x, event_y, ev->time, sourceName);
handleMotionNotifyEvent(event_x, event_y, root_x, root_y, modifiers, ev->time, QEvent::MouseMove, source);
break;
default:
- qWarning() << "Unrecognized XI2 mouse event" << ev->evtype;
+ qWarning() << "Unrecognized XI2 mouse event" << ev->event_type;
break;
}
}
void QXcbWindow::handleXIEnterLeave(xcb_ge_event_t *event)
{
- xXIEnterEvent *ev = reinterpret_cast<xXIEnterEvent *>(event);
+ auto *ev = reinterpret_cast<xcb_input_enter_event_t *>(event);
// Compare the window with current mouse grabber to prevent deliver events to any other windows.
// If leave event occurs and the window is under mouse - allow to deliver the leave event.
QXcbWindow *mouseGrabber = connection()->mouseGrabber();
if (mouseGrabber && mouseGrabber != this
- && (ev->evtype != XI_Leave || QGuiApplicationPrivate::currentMouseWindow != window())) {
+ && (ev->event_type != XCB_INPUT_LEAVE || QGuiApplicationPrivate::currentMouseWindow != window())) {
return;
}
const int root_x = fixed1616ToInt(ev->root_x);
const int root_y = fixed1616ToInt(ev->root_y);
- switch (ev->evtype) {
- case XI_Enter: {
+ switch (ev->event_type) {
+ case XCB_INPUT_ENTER: {
const int event_x = fixed1616ToInt(ev->event_x);
const int event_y = fixed1616ToInt(ev->event_y);
qCDebug(lcQpaXInputEvents, "XI2 mouse enter %d,%d, mode %d, detail %d, time %d",
@@ -2421,7 +2358,7 @@ void QXcbWindow::handleXIEnterLeave(xcb_ge_event_t *event)
handleEnterNotifyEvent(event_x, event_y, root_x, root_y, ev->mode, ev->detail, ev->time);
break;
}
- case XI_Leave:
+ case XCB_INPUT_LEAVE:
qCDebug(lcQpaXInputEvents, "XI2 mouse leave, mode %d, detail %d, time %d",
ev->mode, ev->detail, ev->time);
connection()->keyboard()->updateXKBStateFromXI(&ev->mods, &ev->group);
@@ -2523,7 +2460,7 @@ void QXcbWindow::updateSyncRequestCounter()
// window manager does not expect a sync event yet.
return;
}
- if (m_usingSyncProtocol && (m_syncValue.lo != 0 || m_syncValue.hi != 0)) {
+ if (connection()->hasXSync() && (m_syncValue.lo != 0 || m_syncValue.hi != 0)) {
xcb_sync_set_counter(xcb_connection(), m_syncCounter, m_syncValue);
xcb_flush(xcb_connection());
@@ -2563,7 +2500,7 @@ bool QXcbWindow::setMouseGrabEnabled(bool grab)
if (grab && !connection()->canGrab())
return false;
-#if QT_CONFIG(xinput2)
+#if QT_CONFIG(xcb_xinput)
if (connection()->hasXInput2() && !connection()->xi2MouseEventsDisabled()) {
bool result = connection()->xi2SetMouseGrabEnabled(m_window, grab);
if (grab && result)
@@ -2591,11 +2528,11 @@ bool QXcbWindow::setMouseGrabEnabled(bool grab)
return result;
}
-void QXcbWindow::windowEvent(QEvent *event)
+bool QXcbWindow::windowEvent(QEvent *event)
{
switch (event->type()) {
case QEvent::FocusIn:
- if (m_embedded && !event->spontaneous()) {
+ if (m_embedded && !m_trayIconWindow && !event->spontaneous()) {
QFocusEvent *focusEvent = static_cast<QFocusEvent *>(event);
switch (focusEvent->reason()) {
case Qt::TabFocusReason:
@@ -2617,7 +2554,7 @@ void QXcbWindow::windowEvent(QEvent *event)
default:
break;
}
- QPlatformWindow::windowEvent(event);
+ return QPlatformWindow::windowEvent(event);
}
bool QXcbWindow::startSystemResize(const QPoint &pos, Qt::Corner corner)
@@ -2636,7 +2573,7 @@ bool QXcbWindow::startSystemMoveResize(const QPoint &pos, int corner)
if (!connection()->wmSupport()->isSupportedByWM(moveResize))
return false;
const QPoint globalPos = QHighDpi::toNativePixels(window()->mapToGlobal(pos), window()->screen());
-#ifdef XCB_USE_XINPUT22
+#if QT_CONFIG(xcb_xinput)
if (connection()->startSystemMoveResizeForTouchBegin(m_window, globalPos, corner))
return true;
#endif
@@ -2713,11 +2650,6 @@ void QXcbWindow::handleXEmbedMessage(const xcb_client_message_event_t *event)
case XEMBED_EMBEDDED_NOTIFY:
xcb_map_window(xcb_connection(), m_window);
xcbScreen()->windowShown(this);
- // Without Qt::WA_TranslucentBackground, we use a ParentRelative BackPixmap.
- // Clear the whole tray icon window to its background color as early as possible
- // so that we can get a clean result from grabWindow() later.
- xcb_clear_area(xcb_connection(), false, m_window, 0, 0, geometry().width(), geometry().height());
- xcb_flush(xcb_connection());
break;
case XEMBED_FOCUS_IN:
Qt::FocusReason reason;
@@ -2831,6 +2763,28 @@ QXcbScreen *QXcbWindow::xcbScreen() const
return static_cast<QXcbScreen *>(screen());
}
+void QXcbWindow::setWindowTitle(const QXcbConnection *conn, xcb_window_t window, const QString &title)
+{
+ QString fullTitle = formatWindowTitle(title, QString::fromUtf8(" \xe2\x80\x94 ")); // unicode character U+2014, EM DASH
+ const QByteArray ba = std::move(fullTitle).toUtf8();
+ xcb_change_property(conn->xcb_connection(),
+ XCB_PROP_MODE_REPLACE,
+ window,
+ conn->atom(QXcbAtom::_NET_WM_NAME),
+ conn->atom(QXcbAtom::UTF8_STRING),
+ 8,
+ ba.length(),
+ ba.constData());
+
+#if QT_CONFIG(xcb_xlib)
+ Display *dpy = static_cast<Display *>(conn->xlib_display());
+ XTextProperty *text = qstringToXTP(dpy, title);
+ if (text)
+ XSetWMName(dpy, window, text);
+#endif
+ xcb_flush(conn->xcb_connection());
+}
+
QString QXcbWindow::windowTitle(const QXcbConnection *conn, xcb_window_t window)
{
const xcb_atom_t utf8Atom = conn->atom(QXcbAtom::UTF8_STRING);
@@ -2841,6 +2795,15 @@ QString QXcbWindow::windowTitle(const QXcbConnection *conn, xcb_window_t window)
const char *name = reinterpret_cast<const char *>(xcb_get_property_value(reply.get()));
return QString::fromUtf8(name, xcb_get_property_value_length(reply.get()));
}
+
+ reply = Q_XCB_REPLY_UNCHECKED(xcb_get_property, conn->xcb_connection(),
+ false, window, conn->atom(QXcbAtom::WM_NAME),
+ XCB_ATOM_STRING, 0, 1024);
+ if (reply && reply->format == 8 && reply->type == XCB_ATOM_STRING) {
+ const char *name = reinterpret_cast<const char *>(xcb_get_property_value(reply.get()));
+ return QString::fromLatin1(name, xcb_get_property_value_length(reply.get()));
+ }
+
return QString();
}
diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h
index cb8af9e666..c6bc915b6a 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.h
+++ b/src/plugins/platforms/xcb/qxcbwindow.h
@@ -105,7 +105,7 @@ public:
QSurfaceFormat format() const override;
- void windowEvent(QEvent *event) override;
+ bool windowEvent(QEvent *event) override;
bool startSystemResize(const QPoint &pos, Qt::Corner corner) override;
bool startSystemMove(const QPoint &pos) override;
@@ -137,7 +137,7 @@ public:
void handleFocusInEvent(const xcb_focus_in_event_t *event) override;
void handleFocusOutEvent(const xcb_focus_out_event_t *event) override;
void handlePropertyNotifyEvent(const xcb_property_notify_event_t *event) override;
-#if QT_CONFIG(xinput2)
+#if QT_CONFIG(xcb_xinput)
void handleXIMouseEvent(xcb_ge_event_t *, Qt::MouseEventSource source = Qt::MouseEventNotSynthesized) override;
void handleXIEnterLeave(xcb_ge_event_t *) override;
#endif
@@ -159,14 +159,8 @@ public:
static void setWindowIconTextStatic(QWindow *window, const QString &text);
- static void setParentRelativeBackPixmapStatic(QWindow *window);
void setParentRelativeBackPixmap();
-
- static bool requestSystemTrayWindowDockStatic(const QWindow *window);
- bool requestSystemTrayWindowDock() const;
-
- static QRect systemTrayWindowGlobalGeometryStatic(const QWindow *window);
- QRect systemTrayWindowGlobalGeometry() const;
+ bool requestSystemTrayWindowDock();
uint visualId() const;
bool needsSync() const;
@@ -179,9 +173,12 @@ public:
bool startSystemMoveResize(const QPoint &pos, int corner);
bool doStartSystemMoveResize(const QPoint &globalPos, int corner);
+ bool isTrayIconWindow() const { return m_trayIconWindow; }
+
virtual void create();
virtual void destroy();
+ static void setWindowTitle(const QXcbConnection *conn, xcb_window_t window, const QString &title);
static QString windowTitle(const QXcbConnection *conn, xcb_window_t window);
public Q_SLOTS:
@@ -252,15 +249,13 @@ protected:
Qt::WindowStates m_windowState = Qt::WindowNoState;
- xcb_gravity_t m_gravity = XCB_GRAVITY_STATIC;
-
bool m_mapped = false;
bool m_transparent = false;
- bool m_usingSyncProtocol = false;
bool m_deferredActivation = false;
bool m_embedded = false;
bool m_alertState = false;
bool m_minimized = false;
+ bool m_trayIconWindow = false;
xcb_window_t m_netWmUserTimeWindow = XCB_NONE;
QSurfaceFormat m_format;
diff --git a/src/plugins/platforms/xcb/xcb-static/xcb-static.pro b/src/plugins/platforms/xcb/xcb-static/xcb-static.pro
index 20d8b83e7c..078b275381 100644
--- a/src/plugins/platforms/xcb/xcb-static/xcb-static.pro
+++ b/src/plugins/platforms/xcb/xcb-static/xcb-static.pro
@@ -2,7 +2,7 @@
# Statically compile in code for
# libxcb-fixes, libxcb-randr, libxcb-shm, libxcb-sync, libxcb-image,
# libxcb-keysyms, libxcb-icccm, libxcb-renderutil, libxcb-xkb,
-# libxcb-xinerama
+# libxcb-xinerama, libxcb-xinput
#
CONFIG += static
@@ -29,7 +29,8 @@ SOURCES += \
$$LIBXCB_DIR/render.c \
$$LIBXCB_DIR/shape.c \
$$LIBXCB_DIR/xkb.c \
- $$LIBXCB_DIR/xinerama.c
+ $$LIBXCB_DIR/xinerama.c \
+ $$LIBXCB_DIR/xinput.c
#
# xcb-util
diff --git a/src/plugins/platforms/xcb/xcb_qpa_lib.pro b/src/plugins/platforms/xcb/xcb_qpa_lib.pro
index 9c4797ac26..9390d04983 100644
--- a/src/plugins/platforms/xcb/xcb_qpa_lib.pro
+++ b/src/plugins/platforms/xcb/xcb_qpa_lib.pro
@@ -58,11 +58,10 @@ DEFINES += QT_BUILD_XCB_PLUGIN
qtConfig(xcb-xlib) {
QMAKE_USE += xcb_xlib
+}
- qtConfig(xinput2) {
- SOURCES += qxcbconnection_xi2.cpp
- QMAKE_USE += xinput2
- }
+qtConfig(xcb-xinput) {
+ SOURCES += qxcbconnection_xi2.cpp
}
qtConfig(xcb-sm) {
@@ -89,6 +88,7 @@ qtConfig(vulkan) {
} else {
qtConfig(xkb): QMAKE_USE += xcb_xkb
qtConfig(xcb-render): QMAKE_USE += xcb_render
+ qtConfig(xcb-xinput): QMAKE_USE += xcb_xinput
QMAKE_USE += xcb_syslibs
}
diff --git a/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp b/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp
index c31b326357..39b93bc4b8 100644
--- a/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp
+++ b/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp
@@ -101,6 +101,10 @@ const QDBusArgument &operator >>(const QDBusArgument &arg, QFlatpakFileDialog::F
class QFlatpakFileDialogPrivate
{
public:
+ QFlatpakFileDialogPrivate(QPlatformFileDialogHelper *nativeFileDialog)
+ : nativeFileDialog(nativeFileDialog)
+ { }
+
WId winId = 0;
bool modal = false;
bool multipleFiles = false;
@@ -111,12 +115,19 @@ public:
QStringList nameFilters;
QStringList mimeTypesFilters;
QStringList selectedFiles;
+ QPlatformFileDialogHelper *nativeFileDialog = nullptr;
};
-QFlatpakFileDialog::QFlatpakFileDialog()
+QFlatpakFileDialog::QFlatpakFileDialog(QPlatformFileDialogHelper *nativeFileDialog)
: QPlatformFileDialogHelper()
- , d_ptr(new QFlatpakFileDialogPrivate)
+ , d_ptr(new QFlatpakFileDialogPrivate(nativeFileDialog))
{
+ Q_D(QFlatpakFileDialog);
+
+ if (d->nativeFileDialog) {
+ connect(d->nativeFileDialog, SIGNAL(accept()), this, SIGNAL(accept()));
+ connect(d->nativeFileDialog, SIGNAL(reject()), this, SIGNAL(reject()));
+ }
}
QFlatpakFileDialog::~QFlatpakFileDialog()
@@ -127,6 +138,9 @@ void QFlatpakFileDialog::initializeDialog()
{
Q_D(QFlatpakFileDialog);
+ if (d->nativeFileDialog)
+ d->nativeFileDialog->setOptions(options());
+
if (options()->fileMode() == QFileDialogOptions::ExistingFiles)
d->multipleFiles = true;
@@ -265,6 +279,11 @@ void QFlatpakFileDialog::setDirectory(const QUrl &directory)
{
Q_D(QFlatpakFileDialog);
+ if (d->nativeFileDialog) {
+ d->nativeFileDialog->setOptions(options());
+ d->nativeFileDialog->setDirectory(directory);
+ }
+
d->directory = directory.path();
}
@@ -272,6 +291,9 @@ QUrl QFlatpakFileDialog::directory() const
{
Q_D(const QFlatpakFileDialog);
+ if (d->nativeFileDialog && (options()->fileMode() == QFileDialogOptions::Directory || options()->fileMode() == QFileDialogOptions::DirectoryOnly))
+ return d->nativeFileDialog->directory();
+
return d->directory;
}
@@ -279,6 +301,11 @@ void QFlatpakFileDialog::selectFile(const QUrl &filename)
{
Q_D(QFlatpakFileDialog);
+ if (d->nativeFileDialog) {
+ d->nativeFileDialog->setOptions(options());
+ d->nativeFileDialog->selectFile(filename);
+ }
+
d->selectedFiles << filename.path();
}
@@ -286,6 +313,9 @@ QList<QUrl> QFlatpakFileDialog::selectedFiles() const
{
Q_D(const QFlatpakFileDialog);
+ if (d->nativeFileDialog && (options()->fileMode() == QFileDialogOptions::Directory || options()->fileMode() == QFileDialogOptions::DirectoryOnly))
+ return d->nativeFileDialog->selectedFiles();
+
QList<QUrl> files;
for (const QString &file : d->selectedFiles) {
files << QUrl(file);
@@ -295,13 +325,22 @@ QList<QUrl> QFlatpakFileDialog::selectedFiles() const
void QFlatpakFileDialog::setFilter()
{
- // TODO
+ Q_D(QFlatpakFileDialog);
+
+ if (d->nativeFileDialog) {
+ d->nativeFileDialog->setOptions(options());
+ d->nativeFileDialog->setFilter();
+ }
}
void QFlatpakFileDialog::selectNameFilter(const QString &filter)
{
- Q_UNUSED(filter);
- // TODO
+ Q_D(QFlatpakFileDialog);
+
+ if (d->nativeFileDialog) {
+ d->nativeFileDialog->setOptions(options());
+ d->nativeFileDialog->selectNameFilter(filter);
+ }
}
QString QFlatpakFileDialog::selectedNameFilter() const
@@ -312,6 +351,13 @@ QString QFlatpakFileDialog::selectedNameFilter() const
void QFlatpakFileDialog::exec()
{
+ Q_D(QFlatpakFileDialog);
+
+ if (d->nativeFileDialog && (options()->fileMode() == QFileDialogOptions::Directory || options()->fileMode() == QFileDialogOptions::DirectoryOnly)) {
+ d->nativeFileDialog->exec();
+ return;
+ }
+
// HACK we have to avoid returning until we emit that the dialog was accepted or rejected
QEventLoop loop;
loop.connect(this, SIGNAL(accept()), SLOT(quit()));
@@ -321,18 +367,24 @@ void QFlatpakFileDialog::exec()
void QFlatpakFileDialog::hide()
{
+ Q_D(QFlatpakFileDialog);
+
+ if (d->nativeFileDialog)
+ d->nativeFileDialog->hide();
}
bool QFlatpakFileDialog::show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent)
{
Q_D(QFlatpakFileDialog);
- Q_UNUSED(windowFlags);
initializeDialog();
d->modal = windowModality != Qt::NonModal;
d->winId = parent ? parent->winId() : 0;
+ if (d->nativeFileDialog && (options()->fileMode() == QFileDialogOptions::Directory || options()->fileMode() == QFileDialogOptions::DirectoryOnly))
+ return d->nativeFileDialog->show(windowFlags, windowModality, parent);
+
openPortal();
return true;
diff --git a/src/plugins/platformthemes/flatpak/qflatpakfiledialog_p.h b/src/plugins/platformthemes/flatpak/qflatpakfiledialog_p.h
index f3e195faa0..bd1dae209d 100644
--- a/src/plugins/platformthemes/flatpak/qflatpakfiledialog_p.h
+++ b/src/plugins/platformthemes/flatpak/qflatpakfiledialog_p.h
@@ -69,7 +69,7 @@ public:
};
typedef QVector<Filter> FilterList;
- QFlatpakFileDialog();
+ QFlatpakFileDialog(QPlatformFileDialogHelper *nativeFileDialog = nullptr);
~QFlatpakFileDialog();
bool defaultNameFilterDisables() const override;
diff --git a/src/plugins/platformthemes/flatpak/qflatpaktheme.cpp b/src/plugins/platformthemes/flatpak/qflatpaktheme.cpp
index 6c5e1389cf..142d91a00b 100644
--- a/src/plugins/platformthemes/flatpak/qflatpaktheme.cpp
+++ b/src/plugins/platformthemes/flatpak/qflatpaktheme.cpp
@@ -130,8 +130,12 @@ QPlatformDialogHelper* QFlatpakTheme::createPlatformDialogHelper(DialogType type
{
Q_D(const QFlatpakTheme);
- if (type == FileDialog)
+ if (type == FileDialog) {
+ if (d->baseTheme->usePlatformNativeDialog(type))
+ return new QFlatpakFileDialog(static_cast<QPlatformFileDialogHelper*>(d->baseTheme->createPlatformDialogHelper(type)));
+
return new QFlatpakFileDialog;
+ }
return d->baseTheme->createPlatformDialogHelper(type);
}
diff --git a/src/plugins/printsupport/cups/qcupsprintengine.cpp b/src/plugins/printsupport/cups/qcupsprintengine.cpp
index 6c29a99705..c9683eb99d 100644
--- a/src/plugins/printsupport/cups/qcupsprintengine.cpp
+++ b/src/plugins/printsupport/cups/qcupsprintengine.cpp
@@ -104,7 +104,11 @@ void QCupsPrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &v
break;
case PPK_QPageLayout: {
QPageLayout pageLayout = value.value<QPageLayout>();
- if (pageLayout.isValid() && (d->m_printDevice.isValidPageLayout(pageLayout, d->resolution) || d->m_printDevice.supportsCustomPageSizes())) {
+ if (pageLayout.isValid() && (d->m_printDevice.isValidPageLayout(pageLayout, d->resolution)
+ || d->m_printDevice.supportsCustomPageSizes()
+ || d->m_printDevice.supportedPageSizes().isEmpty())) {
+ // supportedPageSizes().isEmpty() because QPageSetupWidget::initPageSizes says
+ // "If no available printer page sizes, populate with all page sizes"
d->m_pageLayout = pageLayout;
d->setPageSize(pageLayout.pageSize());
}
@@ -132,6 +136,9 @@ QVariant QCupsPrintEngine::property(PrintEnginePropertyKey key) const
case PPK_CupsOptions:
ret = d->cupsOptions;
break;
+ case PPK_Duplex:
+ ret = d->duplex;
+ break;
default:
ret = QPdfPrintEngine::property(key);
break;
@@ -140,7 +147,9 @@ QVariant QCupsPrintEngine::property(PrintEnginePropertyKey key) const
}
-QCupsPrintEnginePrivate::QCupsPrintEnginePrivate(QPrinter::PrinterMode m) : QPdfPrintEnginePrivate(m)
+QCupsPrintEnginePrivate::QCupsPrintEnginePrivate(QPrinter::PrinterMode m)
+ : QPdfPrintEnginePrivate(m)
+ , duplex(QPrint::DuplexNone)
{
}
diff --git a/src/plugins/printsupport/cups/qcupsprintengine_p.h b/src/plugins/printsupport/cups/qcupsprintengine_p.h
index d5363bb8cc..2a1a83b9d7 100644
--- a/src/plugins/printsupport/cups/qcupsprintengine_p.h
+++ b/src/plugins/printsupport/cups/qcupsprintengine_p.h
@@ -99,6 +99,7 @@ private:
QPrintDevice m_printDevice;
QStringList cupsOptions;
QString cupsTempFile;
+ QPrint::DuplexMode duplex;
};
QT_END_NAMESPACE
diff --git a/src/plugins/printsupport/cups/qcupsprintersupport.cpp b/src/plugins/printsupport/cups/qcupsprintersupport.cpp
index a9c992a2e1..56191c4dec 100644
--- a/src/plugins/printsupport/cups/qcupsprintersupport.cpp
+++ b/src/plugins/printsupport/cups/qcupsprintersupport.cpp
@@ -47,6 +47,13 @@
#include <QtPrintSupport/QPrinterInfo>
+#include <QGuiApplication>
+#include <QDialog>
+#include <QDialogButtonBox>
+#include <QFormLayout>
+#include <QLabel>
+#include <QLineEdit>
+
#include <cups/ppd.h>
#ifndef QT_LINUXBASE // LSB merges everything into cups.h
# include <cups/language.h>
@@ -54,9 +61,74 @@
QT_BEGIN_NAMESPACE
+static const char *getPasswordCB(const char */*prompt*/, http_t *http, const char */*method*/, const char *resource, void */*user_data*/)
+{
+ // cups doesn't free the const char * we return so keep around
+ // the last password so we don't leak memory if called multiple times.
+ static QByteArray password;
+
+ // prompt is always "Password for %s on %s? " but we can't use it since we allow the user to change the user.
+ // That is fine because cups always calls cupsUser after calling this callback.
+ // We build our own prompt with the hostname (if not localhost) and the resource that is being used
+
+ char hostname[HTTP_MAX_HOST];
+ httpGetHostname(http, hostname, HTTP_MAX_HOST);
+
+ const QString username = QString::fromLocal8Bit(cupsUser());
+
+ QDialog dialog;
+ dialog.setWindowTitle(QCoreApplication::translate("QCupsPrinterSupport", "Authentication Needed"));
+
+ QFormLayout *layout = new QFormLayout(&dialog);
+ layout->setSizeConstraint(QLayout::SetFixedSize);
+
+ QLineEdit *usernameLE = new QLineEdit();
+ usernameLE->setText(username);
+
+ QLineEdit *passwordLE = new QLineEdit();
+ passwordLE->setEchoMode(QLineEdit::Password);
+
+ QString resourceString = QString::fromLocal8Bit(resource);
+ if (resourceString.startsWith(QStringLiteral("/printers/")))
+ resourceString = resourceString.mid(QStringLiteral("/printers/").length());
+
+ QLabel *label = new QLabel();
+ if (hostname == QStringLiteral("localhost")) {
+ label->setText(QCoreApplication::translate("QCupsPrinterSupport", "Authentication needed to use %1.").arg(resourceString));
+ } else {
+ label->setText(QCoreApplication::translate("QCupsPrinterSupport", "Authentication needed to use %1 on %2.").arg(resourceString).arg(hostname));
+ label->setWordWrap(true);
+ }
+
+ layout->addRow(label);
+ layout->addRow(new QLabel(QCoreApplication::translate("QCupsPrinterSupport", "Username:")), usernameLE);
+ layout->addRow(new QLabel(QCoreApplication::translate("QCupsPrinterSupport", "Password:")), passwordLE);
+
+ QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
+ layout->addRow(buttonBox);
+
+ QObject::connect(buttonBox, &QDialogButtonBox::accepted, &dialog, &QDialog::accept);
+ QObject::connect(buttonBox, &QDialogButtonBox::rejected, &dialog, &QDialog::reject);
+
+ passwordLE->setFocus();
+
+ if (dialog.exec() != QDialog::Accepted)
+ return nullptr;
+
+ if (usernameLE->text() != username)
+ cupsSetUser(usernameLE->text().toLocal8Bit().constData());
+
+ password = passwordLE->text().toLocal8Bit();
+
+ return password.constData();
+}
+
QCupsPrinterSupport::QCupsPrinterSupport()
: QPlatformPrinterSupport()
{
+ // Only show password dialog if GUI application
+ if (qobject_cast<QGuiApplication*>(QCoreApplication::instance()))
+ cupsSetPasswordCB2(getPasswordCB, nullptr /* user_data */ );
}
QCupsPrinterSupport::~QCupsPrinterSupport()
diff --git a/src/plugins/printsupport/cups/qppdprintdevice.cpp b/src/plugins/printsupport/cups/qppdprintdevice.cpp
index 340b1a1ff4..d2ddc4144f 100644
--- a/src/plugins/printsupport/cups/qppdprintdevice.cpp
+++ b/src/plugins/printsupport/cups/qppdprintdevice.cpp
@@ -50,13 +50,6 @@
QT_BEGIN_NAMESPACE
-QPpdPrintDevice::QPpdPrintDevice()
- : QPlatformPrintDevice(),
- m_cupsDest(0),
- m_ppd(0)
-{
-}
-
QPpdPrintDevice::QPpdPrintDevice(const QString &id)
: QPlatformPrintDevice(id),
m_cupsDest(0),
@@ -69,9 +62,26 @@ QPpdPrintDevice::QPpdPrintDevice(const QString &id)
m_cupsName = parts.at(0).toUtf8();
if (parts.size() > 1)
m_cupsInstance = parts.at(1).toUtf8();
- loadPrinter();
- if (m_cupsDest && m_ppd) {
+ // Get the print instance and PPD file
+ m_cupsDest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, m_cupsName, m_cupsInstance.isNull() ? nullptr : m_cupsInstance.constData());
+ if (m_cupsDest) {
+ const char *ppdFile = cupsGetPPD(m_cupsName);
+ if (ppdFile) {
+ m_ppd = ppdOpenFile(ppdFile);
+ unlink(ppdFile);
+ }
+ if (m_ppd) {
+ ppdMarkDefaults(m_ppd);
+ cupsMarkOptions(m_ppd, m_cupsDest->num_options, m_cupsDest->options);
+ ppdLocalize(m_ppd);
+
+ m_minimumPhysicalPageSize = QSize(m_ppd->custom_min[0], m_ppd->custom_min[1]);
+ m_maximumPhysicalPageSize = QSize(m_ppd->custom_max[0], m_ppd->custom_max[1]);
+ m_customMargins = QMarginsF(m_ppd->custom_margins[0], m_ppd->custom_margins[3],
+ m_ppd->custom_margins[2], m_ppd->custom_margins[1]);
+ }
+
m_name = printerOption("printer-info");
m_location = printerOption("printer-location");
m_makeAndModel = printerOption("printer-make-and-model");
@@ -87,10 +97,6 @@ QPpdPrintDevice::QPpdPrintDevice(const QString &id)
// Cups ppd_file_t variable_sizes custom_min custom_max
// PPD MaxMediaWidth MaxMediaHeight
m_supportsCustomPageSizes = type & CUPS_PRINTER_VARIABLE;
- m_minimumPhysicalPageSize = QSize(m_ppd->custom_min[0], m_ppd->custom_min[1]);
- m_maximumPhysicalPageSize = QSize(m_ppd->custom_max[0], m_ppd->custom_max[1]);
- m_customMargins = QMarginsF(m_ppd->custom_margins[0], m_ppd->custom_margins[3],
- m_ppd->custom_margins[2], m_ppd->custom_margins[1]);
}
}
}
@@ -107,7 +113,7 @@ QPpdPrintDevice::~QPpdPrintDevice()
bool QPpdPrintDevice::isValid() const
{
- return m_cupsDest && m_ppd;
+ return m_cupsDest;
}
bool QPpdPrintDevice::isDefault() const
@@ -152,8 +158,8 @@ void QPpdPrintDevice::loadPageSizes() const
}
}
}
- m_havePageSizes = true;
}
+ m_havePageSizes = true;
}
QPageSize QPpdPrintDevice::defaultPageSize() const
@@ -359,14 +365,18 @@ void QPpdPrintDevice::loadDuplexModes() const
ppd_option_t *duplexModes = ppdFindOption(m_ppd, "Duplex");
if (duplexModes) {
m_duplexModes.reserve(duplexModes->num_choices);
- for (int i = 0; i < duplexModes->num_choices; ++i)
- m_duplexModes.append(QPrintUtils::ppdChoiceToDuplexMode(duplexModes->choices[i].choice));
+ for (int i = 0; i < duplexModes->num_choices; ++i) {
+ if (ppdInstallableConflict(m_ppd, duplexModes->keyword, duplexModes->choices[i].choice) == 0) {
+ m_duplexModes.append(QPrintUtils::ppdChoiceToDuplexMode(duplexModes->choices[i].choice));
+ }
+ }
}
// If no result, try just the default
if (m_duplexModes.size() == 0) {
duplexModes = ppdFindOption(m_ppd, "DefaultDuplex");
- if (duplexModes)
+ if (duplexModes && (ppdInstallableConflict(m_ppd, duplexModes->keyword, duplexModes->choices[0].choice) == 0)) {
m_duplexModes.append(QPrintUtils::ppdChoiceToDuplexMode(duplexModes->choices[0].choice));
+ }
}
}
// If still no result, or not added in PPD, then add None
@@ -417,7 +427,7 @@ QPrint::ColorMode QPpdPrintDevice::defaultColorMode() const
ppd_option_t *colorModel = ppdFindOption(m_ppd, "DefaultColorModel");
if (!colorModel)
colorModel = ppdFindOption(m_ppd, "ColorModel");
- if (!colorModel || (colorModel && !qstrcmp(colorModel->defchoice, "Gray")))
+ if (!colorModel || qstrcmp(colorModel->defchoice, "Gray") != 0)
return QPrint::Color;
}
return QPrint::GrayScale;
@@ -481,38 +491,6 @@ void QPpdPrintDevice::loadMimeTypes() const
}
#endif
-void QPpdPrintDevice::loadPrinter()
-{
- // Just to be safe, check if existing printer needs closing
- if (m_ppd) {
- ppdClose(m_ppd);
- m_ppd = 0;
- }
- if (m_cupsDest) {
- cupsFreeDests(1, m_cupsDest);
- m_cupsDest = 0;
- }
-
- // Get the print instance and PPD file
- m_cupsDest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, m_cupsName, m_cupsInstance.isNull() ? nullptr : m_cupsInstance.constData());
- if (m_cupsDest) {
- const char *ppdFile = cupsGetPPD(m_cupsName);
- if (ppdFile) {
- m_ppd = ppdOpenFile(ppdFile);
- unlink(ppdFile);
- }
- if (m_ppd) {
- ppdMarkDefaults(m_ppd);
- cupsMarkOptions(m_ppd, m_cupsDest->num_options, m_cupsDest->options);
- ppdLocalize(m_ppd);
- } else {
- cupsFreeDests(1, m_cupsDest);
- m_cupsDest = 0;
- m_ppd = 0;
- }
- }
-}
-
QString QPpdPrintDevice::printerOption(const QString &key) const
{
return cupsGetOption(key.toUtf8(), m_cupsDest->num_options, m_cupsDest->options);
diff --git a/src/plugins/printsupport/cups/qppdprintdevice.h b/src/plugins/printsupport/cups/qppdprintdevice.h
index 9867083bd7..90f90d6788 100644
--- a/src/plugins/printsupport/cups/qppdprintdevice.h
+++ b/src/plugins/printsupport/cups/qppdprintdevice.h
@@ -65,7 +65,6 @@ QT_BEGIN_NAMESPACE
class QPpdPrintDevice : public QPlatformPrintDevice
{
public:
- QPpdPrintDevice();
explicit QPpdPrintDevice(const QString &id);
virtual ~QPpdPrintDevice();
@@ -105,7 +104,6 @@ protected:
#endif
private:
- void loadPrinter();
QString printerOption(const QString &key) const;
cups_ptype_e printerTypeFlags() const;
diff --git a/src/plugins/sqldrivers/configure.json b/src/plugins/sqldrivers/configure.json
index 234f880579..4802d3b04d 100644
--- a/src/plugins/sqldrivers/configure.json
+++ b/src/plugins/sqldrivers/configure.json
@@ -229,7 +229,7 @@ Oracle driver, as the current build will most likely fail."
"summary": [
{
- "section": "Qt Sql",
+ "section": "Qt Sql Drivers",
"entries": [
"sql-db2", "sql-ibase", "sql-mysql", "sql-oci", "sql-odbc", "sql-psql",
"sql-sqlite2", "sql-sqlite", "system-sqlite", "sql-tds"
diff --git a/src/plugins/sqldrivers/configure.pri b/src/plugins/sqldrivers/configure.pri
index b69b51b679..24954e9514 100644
--- a/src/plugins/sqldrivers/configure.pri
+++ b/src/plugins/sqldrivers/configure.pri
@@ -19,9 +19,9 @@ defineTest(qtConfLibrary_psqlConfig) {
libs =
!isEmpty(libdir): libs += "-L$$libdir"
libs += "-lpq"
- $${1}.libs = "$$val_escape(libs)"
+ $${1}.libs = $$libs
includedir -= $$QMAKE_DEFAULT_INCDIRS
- $${1}.includedir = "$$val_escape(includedir)"
+ $${1}.includedir = $$includedir
export($${1}.libs)
export($${1}.includedir)
return(true)
@@ -34,7 +34,7 @@ defineTest(qtConfLibrary_psqlEnv) {
# Respect PSQL_LIBS if set
PSQL_LIBS = $$getenv(PSQL_LIBS)
!isEmpty(PSQL_LIBS) {
- $${1}.libs = $$PSQL_LIBS
+ eval($${1}.libs = $$PSQL_LIBS)
export($${1}.libs)
} else {
!qtConfLibrary_inline($$1, $$2): \
@@ -69,14 +69,14 @@ defineTest(qtConfLibrary_mysqlConfig) {
}
libs = $$cleanlibs
}
- $${1}.libs = "$$val_escape(libs)"
+ $${1}.libs = $$libs
eval(rawincludedir = $$includedir)
rawincludedir ~= s/^-I//g
includedir =
for (id, rawincludedir): \
includedir += $$clean_path($$id)
includedir -= $$QMAKE_DEFAULT_INCDIRS
- $${1}.includedir = "$$val_escape(includedir)"
+ $${1}.includedir = $$includedir
export($${1}.libs)
export($${1}.includedir)
return(true)
@@ -90,9 +90,9 @@ defineTest(qtConfLibrary_sybaseEnv) {
sybase = $$getenv(SYBASE)
!isEmpty(sybase): \
libs += "-L$${sybase}/lib"
- libs += $$getenv(SYBASE_LIBS)
+ eval(libs += $$getenv(SYBASE_LIBS))
!isEmpty(libs) {
- $${1}.libs = "$$val_escape(libs)"
+ $${1}.libs = $$libs
export($${1}.libs)
}
return(true)
diff --git a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
index 18c8b48462..9c6c3ff429 100644
--- a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
+++ b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
@@ -305,7 +305,9 @@ static QVariant::Type qDecodeMYSQLType(int mysqltype, uint flags)
type = QVariant::Date;
break;
case FIELD_TYPE_TIME :
- type = QVariant::Time;
+ // A time field can be within the range '-838:59:59' to '838:59:59' so
+ // use QString instead of QTime since QTime is limited to 24 hour clock
+ type = QVariant::String;
break;
case FIELD_TYPE_DATETIME :
case FIELD_TYPE_TIMESTAMP :
diff --git a/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp b/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
index 2a770d0245..46c1a539a2 100644
--- a/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
+++ b/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
@@ -55,9 +55,6 @@
#include <qcache.h>
#include <qregularexpression.h>
#endif
-#if QT_CONFIG(timezone)
-#include <QTimeZone>
-#endif
#include <QScopedValueRollback>
#if defined Q_OS_WIN
@@ -421,34 +418,6 @@ bool QSQLiteResult::prepare(const QString &query)
return true;
}
-static QString secondsToOffset(int seconds)
-{
- const QChar sign = ushort(seconds < 0 ? '-' : '+');
- seconds = qAbs(seconds);
- const int hours = seconds / 3600;
- const int minutes = (seconds % 3600) / 60;
-
- return QString(QStringLiteral("%1%2:%3")).arg(sign).arg(hours, 2, 10, QLatin1Char('0')).arg(minutes, 2, 10, QLatin1Char('0'));
-}
-
-static QString timespecToString(const QDateTime &dateTime)
-{
- switch (dateTime.timeSpec()) {
- case Qt::LocalTime:
- return QString();
- case Qt::UTC:
- return QStringLiteral("Z");
- case Qt::OffsetFromUTC:
- return secondsToOffset(dateTime.offsetFromUtc());
-#if QT_CONFIG(timezone)
- case Qt::TimeZone:
- return secondsToOffset(dateTime.timeZone().offsetFromUtc(dateTime));
-#endif
- default:
- return QString();
- }
-}
-
bool QSQLiteResult::execBatch(bool arrayBind)
{
Q_UNUSED(arrayBind);
@@ -555,7 +524,7 @@ bool QSQLiteResult::exec()
break;
case QVariant::DateTime: {
const QDateTime dateTime = value.toDateTime();
- const QString str = dateTime.toString(QLatin1String("yyyy-MM-ddThh:mm:ss.zzz") + timespecToString(dateTime));
+ const QString str = dateTime.toString(Qt::ISODateWithMs);
res = sqlite3_bind_text16(d->stmt, i + 1, str.utf16(),
str.size() * sizeof(ushort), SQLITE_TRANSIENT);
break;
diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm
index 2d212bfe3b..60fe547807 100644
--- a/src/plugins/styles/mac/qmacstyle_mac.mm
+++ b/src/plugins/styles/mac/qmacstyle_mac.mm
@@ -143,22 +143,12 @@ static QWindow *qt_getWindow(const QWidget *widget)
return widget ? widget->window()->windowHandle() : 0;
}
-@interface QT_MANGLE_NAMESPACE(NotificationReceiver) : NSObject {
-QMacStylePrivate *mPrivate;
-}
-- (id)initWithPrivate:(QMacStylePrivate *)priv;
-- (void)scrollBarStyleDidChange:(NSNotification *)notification;
+@interface QT_MANGLE_NAMESPACE(NotificationReceiver) : NSObject
@end
QT_NAMESPACE_ALIAS_OBJC_CLASS(NotificationReceiver);
@implementation NotificationReceiver
-- (id)initWithPrivate:(QMacStylePrivate *)priv
-{
- self = [super init];
- mPrivate = priv;
- return self;
-}
- (void)scrollBarStyleDidChange:(NSNotification *)notification
{
@@ -1908,7 +1898,7 @@ QMacStyle::QMacStyle()
Q_D(QMacStyle);
QMacAutoReleasePool pool;
- d->receiver = [[NotificationReceiver alloc] initWithPrivate:d];
+ d->receiver = [[NotificationReceiver alloc] init];
[[NSNotificationCenter defaultCenter] addObserver:d->receiver
selector:@selector(scrollBarStyleDidChange:)
name:NSPreferredScrollerStyleDidChangeNotification
@@ -5876,7 +5866,7 @@ QSize QMacStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
switch (ct) {
#if QT_CONFIG(spinbox)
case CT_SpinBox:
- if (const QStyleOptionSpinBox *vopt = qstyleoption_cast<const QStyleOptionSpinBox *>(opt)) {
+ if (qstyleoption_cast<const QStyleOptionSpinBox *>(opt)) {
const int buttonWidth = 20; // FIXME Use subControlRect()
sz += QSize(buttonWidth, 0);
}
diff --git a/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp b/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp
index 6add110249..bb110660a3 100644
--- a/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp
+++ b/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp
@@ -2171,12 +2171,12 @@ QRect QWindowsVistaStyle::subControlRect(ComplexControl control, const QStyleOpt
if (const QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(option)) {
if (!buttonVisible(subControl, tb))
return rect;
+ const qreal factor = QWindowsStylePrivate::nativeMetricScaleFactor(widget);
const bool isToolTitle = false;
const int height = tb->rect.height();
const int width = tb->rect.width();
const int buttonWidth =
- qRound(qreal(GetSystemMetrics(SM_CXSIZE)) * QWindowsStylePrivate::nativeMetricScaleFactor(widget)
- - QStyleHelper::dpiScaled(4));
+ qRound(qreal(GetSystemMetrics(SM_CXSIZE)) * factor - QStyleHelper::dpiScaled(4));
const int frameWidth = proxy()->pixelMetric(PM_MdiSubWindowFrameWidth, option, widget);
const bool sysmenuHint = (tb->titleBarFlags & Qt::WindowSystemMenuHint) != 0;
@@ -2190,31 +2190,31 @@ QRect QWindowsVistaStyle::subControlRect(ComplexControl control, const QStyleOpt
rect = QRect(frameWidth, 0, width - (buttonWidth + frameWidth + 10), height);
if (isToolTitle) {
if (sysmenuHint) {
- rect.adjust(0, 0, -buttonWidth - 3, 0);
+ rect.adjust(0, 0, int(-buttonWidth - 3 * factor), 0);
}
if (minimizeHint || maximizeHint)
- rect.adjust(0, 0, -buttonWidth - 2, 0);
+ rect.adjust(0, 0, int(-buttonWidth - 2 * factor), 0);
} else {
if (sysmenuHint) {
- const int leftOffset = height - 8;
- rect.adjust(leftOffset, 0, 0, 4);
+ const int leftOffset = int(height - 8 * factor);
+ rect.adjust(leftOffset, 0, 0, int(4 * factor));
}
if (minimizeHint)
- rect.adjust(0, 0, -buttonWidth - 2, 0);
+ rect.adjust(0, 0, int(-buttonWidth - 2 * factor), 0);
if (maximizeHint)
- rect.adjust(0, 0, -buttonWidth - 2, 0);
+ rect.adjust(0, 0, int(-buttonWidth - 2 * factor), 0);
if (contextHint)
- rect.adjust(0, 0, -buttonWidth - 2, 0);
+ rect.adjust(0, 0, int(-buttonWidth - 2 * factor), 0);
if (shadeHint)
- rect.adjust(0, 0, -buttonWidth - 2, 0);
+ rect.adjust(0, 0, int(-buttonWidth - 2 * factor), 0);
}
- rect.translate(0, 2);
+ rect.translate(0, int(2 * factor));
rect = visualRect(option->direction, option->rect, rect);
break;
case SC_TitleBarSysMenu:
{
- const int controlTop = 6;
- const int controlHeight = height - controlTop - 3;
+ const int controlTop = int(6 * factor);
+ const int controlHeight = int(height - controlTop - 3 * factor);
int iconExtent = proxy()->pixelMetric(PM_SmallIconSize);
QSize iconSize = tb->icon.actualSize(QSize(iconExtent, iconExtent));
if (tb->icon.isNull())
@@ -2222,7 +2222,7 @@ QRect QWindowsVistaStyle::subControlRect(ComplexControl control, const QStyleOpt
int hPad = (controlHeight - iconSize.height())/2;
int vPad = (controlHeight - iconSize.width())/2;
rect = QRect(frameWidth + hPad, controlTop + vPad, iconSize.width(), iconSize.height());
- rect.translate(0, 3);
+ rect.translate(0, int(3 * factor));
rect = visualRect(option->direction, option->rect, rect);
}
break;
diff --git a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp
index 36a8afb453..4b583e13d3 100644
--- a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp
+++ b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp
@@ -494,7 +494,8 @@ bool QWindowsXPStylePrivate::isTransparent(XPThemeData &themeData)
QRegion QWindowsXPStylePrivate::region(XPThemeData &themeData)
{
HRGN hRgn = 0;
- RECT rect = themeData.toRECT(themeData.rect);
+ const qreal factor = QWindowsStylePrivate::nativeMetricScaleFactor(themeData.widget);
+ RECT rect = themeData.toRECT(QRect(themeData.rect.topLeft() / factor, themeData.rect.size() / factor));
if (!SUCCEEDED(GetThemeBackgroundRegion(themeData.handle(), bufferHDC(), themeData.partId,
themeData.stateId, &rect, &hRgn))) {
return QRegion();
@@ -523,7 +524,7 @@ QRegion QWindowsXPStylePrivate::region(XPThemeData &themeData)
RECT *r = reinterpret_cast<RECT*>(rd->Buffer);
for (uint i = 0; i < rd->rdh.nCount; ++i) {
QRect rect;
- rect.setCoords(r->left, r->top, r->right - 1, r->bottom - 1);
+ rect.setCoords(int(r->left * factor), int(r->top * factor), int((r->right - 1) * factor), int((r->bottom - 1) * factor));
++r;
region |= rect;
}
@@ -1756,9 +1757,9 @@ case PE_Frame:
else
stateId = FS_INACTIVE;
- int fwidth = frm->lineWidth + frm->midLineWidth;
+ int fwidth = int((frm->lineWidth + frm->midLineWidth) / QWindowsStylePrivate::nativeMetricScaleFactor(widget));
- XPThemeData theme(0, p, themeNumber, 0, stateId);
+ XPThemeData theme(widget, p, themeNumber, 0, stateId);
if (!theme.isValid())
break;
@@ -2949,6 +2950,7 @@ void QWindowsXPStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCo
{
if (const QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(option))
{
+ const qreal factor = QWindowsStylePrivate::nativeMetricScaleFactor(widget);
bool isActive = tb->titleBarState & QStyle::State_Active;
XPThemeData theme(widget, p, QWindowsXPStylePrivate::WindowTheme);
if (sub & SC_TitleBarLabel) {
@@ -2975,13 +2977,15 @@ void QWindowsXPStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCo
GetThemeColor(theme.handle(), WP_CAPTION, isActive ? CS_ACTIVE : CS_INACTIVE, TMT_TEXTSHADOWCOLOR, &textShadowRef);
QColor textShadow = qRgb(GetRValue(textShadowRef), GetGValue(textShadowRef), GetBValue(textShadowRef));
p->setPen(textShadow);
- p->drawText(ir.x() + 3, ir.y() + 2, ir.width() - 1, ir.height(),
+ p->drawText(int(ir.x() + 3 * factor), int(ir.y() + 2 * factor),
+ int(ir.width() - 1 * factor), ir.height(),
Qt::AlignLeft | Qt::AlignVCenter | Qt::TextSingleLine, tb->text);
}
COLORREF captionText = GetSysColor(isActive ? COLOR_CAPTIONTEXT : COLOR_INACTIVECAPTIONTEXT);
QColor textColor = qRgb(GetRValue(captionText), GetGValue(captionText), GetBValue(captionText));
p->setPen(textColor);
- p->drawText(ir.x() + 2, ir.y() + 1, ir.width() - 2, ir.height(),
+ p->drawText(int(ir.x() + 2 * factor), int(ir.y() + 1 * factor),
+ int(ir.width() - 2 * factor), ir.height(),
Qt::AlignLeft | Qt::AlignVCenter | Qt::TextSingleLine, tb->text);
}
if (sub & SC_TitleBarSysMenu && tb->titleBarFlags & Qt::WindowSystemMenuHint) {
diff --git a/src/printsupport/dialogs/qpagesetupdialog_mac.mm b/src/printsupport/dialogs/qpagesetupdialog_mac.mm
index 1e398452f7..a3511fe7b6 100644
--- a/src/printsupport/dialogs/qpagesetupdialog_mac.mm
+++ b/src/printsupport/dialogs/qpagesetupdialog_mac.mm
@@ -52,16 +52,13 @@ QT_USE_NAMESPACE
@class QT_MANGLE_NAMESPACE(QCocoaPageLayoutDelegate);
@interface QT_MANGLE_NAMESPACE(QCocoaPageLayoutDelegate) : NSObject
-{
+@end
+
+@implementation QT_MANGLE_NAMESPACE(QCocoaPageLayoutDelegate) {
NSPrintInfo *printInfo;
}
-- (id)initWithNSPrintInfo:(NSPrintInfo *)nsPrintInfo;
-- (void)pageLayoutDidEnd:(NSPageLayout *)pageLayout
- returnCode:(int)returnCode contextInfo:(void *)contextInfo;
-@end
-@implementation QT_MANGLE_NAMESPACE(QCocoaPageLayoutDelegate)
-- (id)initWithNSPrintInfo:(NSPrintInfo *)nsPrintInfo
+- (instancetype)initWithNSPrintInfo:(NSPrintInfo *)nsPrintInfo
{
self = [super init];
if (self) {
diff --git a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
index 7e32f9aa57..d9b4a84aa9 100644
--- a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
+++ b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
@@ -49,6 +49,7 @@
#include "qpainter.h"
#include "qprintdialog.h"
+#include "qtextcodec.h"
#include "qdialogbuttonbox.h"
#include <ui_qpagesetupwidget.h>
@@ -235,6 +236,9 @@ QPageSetupWidget::QPageSetupWidget(QWidget *parent)
m_pagePreview(nullptr),
m_printer(nullptr),
m_printDevice(nullptr),
+#if QT_CONFIG(cups)
+ m_pageSizePpdOption(nullptr),
+#endif
m_outputFormat(QPrinter::PdfFormat),
m_units(QPageLayout::Point),
m_savedUnits(QPageLayout::Point),
@@ -391,6 +395,11 @@ void QPageSetupWidget::setPrinter(QPrinter *printer, QPrintDevice *printDevice,
m_printer = printer;
m_printDevice = printDevice;
+#if QT_CONFIG(cups)
+ // find the PageSize cups option
+ m_pageSizePpdOption = m_printDevice ? QCUPSSupport::findPpdOption("PageSize", m_printDevice) : nullptr;
+#endif
+
// Initialize the layout to the current QPrinter layout
m_pageLayout = m_printer->pageLayout();
@@ -415,6 +424,12 @@ void QPageSetupWidget::setPrinter(QPrinter *printer, QPrintDevice *printDevice,
initPageSizes();
updateWidget();
updateSavedValues();
+
+ if (m_ui.pageSizeCombo->currentIndex() == -1) {
+ // This can happen in raw printers that since they don't have a default
+ // page size none will get selected so just default to the first size (A4)
+ m_ui.pageSizeCombo->setCurrentIndex(0);
+ }
}
// Update the widget with the current settings
@@ -547,15 +562,48 @@ void QPageSetupWidget::revertToSavedValues()
m_ui.pagesPerSheetLayoutCombo->setCurrentIndex(m_savedPagesPerSheetLayout);
}
+#if QT_CONFIG(cups)
+bool QPageSetupWidget::hasPpdConflict() const
+{
+ if (m_pageSizePpdOption) {
+ if (m_pageSizePpdOption->conflicted) {
+ const QIcon warning = QApplication::style()->standardIcon(QStyle::SP_MessageBoxWarning, nullptr, nullptr);
+ const int pixmap_size = m_ui.pageSizeCombo->sizeHint().height() * .75;
+ m_ui.pageSizeWarningLabel->setPixmap(warning.pixmap(pixmap_size, pixmap_size));
+ } else {
+ m_ui.pageSizeWarningLabel->setPixmap(QPixmap());
+ }
+ return m_pageSizePpdOption->conflicted;
+ }
+
+ return false;
+}
+#endif
+
// Updates size/preview after the combobox has been changed.
void QPageSetupWidget::pageSizeChanged()
{
- if (m_blockSignals)
- return;
-
QPageSize pageSize;
if (m_ui.pageSizeCombo->currentIndex() != m_realCustomPageSizeIndex) {
pageSize = m_ui.pageSizeCombo->currentData().value<QPageSize>();
+
+#if QT_CONFIG(cups)
+ if (m_pageSizePpdOption) {
+ ppd_file_t *ppd = m_printDevice->property(PDPK_PpdFile).value<ppd_file_t*>();
+ QTextCodec *cupsCodec = QTextCodec::codecForName(ppd->lang_encoding);
+ for (int i = 0; i < m_pageSizePpdOption->num_choices; ++i) {
+ const ppd_choice_t *choice = &m_pageSizePpdOption->choices[i];
+ if (cupsCodec->toUnicode(choice->text) == m_ui.pageSizeCombo->currentText()) {
+ const auto values = QStringList{} << QString::fromLatin1(m_pageSizePpdOption->keyword)
+ << QString::fromLatin1(choice->choice);
+ m_printDevice->setProperty(PDPK_PpdOption, values);
+ emit ppdOptionChanged();
+ break;
+ }
+ }
+ }
+#endif
+
} else {
QSizeF customSize;
if (m_pageLayout.orientation() == QPageLayout::Landscape)
@@ -563,7 +611,22 @@ void QPageSetupWidget::pageSizeChanged()
else
customSize = QSizeF(m_ui.pageWidth->value(), m_ui.pageHeight->value());
pageSize = QPageSize(customSize, QPageSize::Unit(m_units));
+
+#if QT_CONFIG(cups)
+ if (m_pageSizePpdOption) {
+ const auto values = QStringList{} << QString::fromLatin1(m_pageSizePpdOption->keyword)
+ << QStringLiteral("Custom");
+ m_printDevice->setProperty(PDPK_PpdOption, values);
+ emit ppdOptionChanged();
+ }
+#endif
}
+
+ // We always need to update the m_pageSizePpdOption when the page size changes
+ // even if it's from inside updateWidget, so do not move up
+ if (m_blockSignals)
+ return;
+
const QMarginsF printable = m_printDevice ? m_printDevice->printableMargins(pageSize, m_pageLayout.orientation(), m_printer->resolution())
: QMarginsF();
m_pageLayout.setPageSize(pageSize, qt_convertMargins(printable, QPageLayout::Point, m_pageLayout.units()));
diff --git a/src/printsupport/dialogs/qpagesetupdialog_unix_p.h b/src/printsupport/dialogs/qpagesetupdialog_unix_p.h
index bb33a0f587..7bfdaed740 100644
--- a/src/printsupport/dialogs/qpagesetupdialog_unix_p.h
+++ b/src/printsupport/dialogs/qpagesetupdialog_unix_p.h
@@ -54,6 +54,7 @@
#include <QtPrintSupport/private/qtprintsupportglobal_p.h>
#include "qprinter.h"
+#include "kernel/qprint_p.h"
#include <QtGui/qpagelayout.h>
@@ -78,6 +79,13 @@ public:
void updateSavedValues();
void revertToSavedValues();
+#if QT_CONFIG(cups)
+ bool hasPpdConflict() const;
+
+signals:
+ void ppdOptionChanged();
+#endif
+
private slots:
void pageSizeChanged();
void pageOrientationChanged();
@@ -100,6 +108,9 @@ private:
QPagePreview *m_pagePreview;
QPrinter *m_printer;
QPrintDevice *m_printDevice;
+#if QT_CONFIG(cups)
+ ppd_option_t *m_pageSizePpdOption;
+#endif
QPrinter::OutputFormat m_outputFormat;
QString m_printerName;
QPageLayout m_pageLayout;
diff --git a/src/printsupport/dialogs/qpagesetupwidget.ui b/src/printsupport/dialogs/qpagesetupwidget.ui
index 960a9dac17..3f24553c76 100644
--- a/src/printsupport/dialogs/qpagesetupwidget.ui
+++ b/src/printsupport/dialogs/qpagesetupwidget.ui
@@ -99,6 +99,9 @@
</property>
</spacer>
</item>
+ <item row="0" column="2">
+ <widget class="QLabel" name="pageSizeWarningLabel"/>
+ </item>
</layout>
</widget>
</item>
diff --git a/src/printsupport/dialogs/qprintdialog_mac.mm b/src/printsupport/dialogs/qprintdialog_mac.mm
index 854779977c..ed2d0908c4 100644
--- a/src/printsupport/dialogs/qprintdialog_mac.mm
+++ b/src/printsupport/dialogs/qprintdialog_mac.mm
@@ -77,22 +77,20 @@ QT_USE_NAMESPACE
@class QT_MANGLE_NAMESPACE(QCocoaPrintPanelDelegate);
@interface QT_MANGLE_NAMESPACE(QCocoaPrintPanelDelegate) : NSObject
-{
+@end
+
+@implementation QT_MANGLE_NAMESPACE(QCocoaPrintPanelDelegate) {
NSPrintInfo *printInfo;
}
-- (id)initWithNSPrintInfo:(NSPrintInfo *)nsPrintInfo;
-- (void)printPanelDidEnd:(NSPrintPanel *)printPanel
- returnCode:(int)returnCode contextInfo:(void *)contextInfo;
-@end
-@implementation QT_MANGLE_NAMESPACE(QCocoaPrintPanelDelegate)
-- (id)initWithNSPrintInfo:(NSPrintInfo *)nsPrintInfo
+- (instancetype)initWithNSPrintInfo:(NSPrintInfo *)nsPrintInfo
{
- if (self = [super init]) {
+ if ((self = [self init])) {
printInfo = nsPrintInfo;
}
return self;
}
+
- (void)printPanelDidEnd:(NSPrintPanel *)printPanel
returnCode:(int)returnCode contextInfo:(void *)contextInfo
{
@@ -102,8 +100,8 @@ QT_USE_NAMESPACE
QPrinter *printer = dialog->printer();
if (returnCode == NSModalResponseOK) {
- PMPrintSession session = static_cast<PMPrintSession>([printInfo PMPrintSession]);
- PMPrintSettings settings = static_cast<PMPrintSettings>([printInfo PMPrintSettings]);
+ PMPrintSession session = static_cast<PMPrintSession>(printInfo.PMPrintSession);
+ PMPrintSettings settings = static_cast<PMPrintSettings>(printInfo.PMPrintSettings);
UInt32 frompage, topage;
PMGetFirstPage(settings, &frompage);
@@ -192,6 +190,7 @@ QT_USE_NAMESPACE
dialog->done((returnCode == NSModalResponseOK) ? QDialog::Accepted : QDialog::Rejected);
}
+
@end
QT_BEGIN_NAMESPACE
diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp
index 86daea3b02..5390a8b2f2 100644
--- a/src/printsupport/dialogs/qprintdialog_unix.cpp
+++ b/src/printsupport/dialogs/qprintdialog_unix.cpp
@@ -50,12 +50,14 @@
#endif
#include <QtCore/qdebug.h>
#include <QtCore/qdir.h>
+#include <QtCore/qglobal.h>
#include <QtCore/qtextcodec.h>
#include <QtGui/qevent.h>
#if QT_CONFIG(filesystemmodel)
#include <QtWidgets/qfilesystemmodel.h>
#endif
#include <QtWidgets/qstyleditemdelegate.h>
+#include <QtWidgets/qformlayout.h>
#include <QtPrintSupport/qprinter.h>
#include <qpa/qplatformprintplugin.h>
@@ -73,6 +75,7 @@
#include "ui_qprintwidget.h"
#if QT_CONFIG(cups)
+Q_DECLARE_METATYPE(const ppd_option_t *)
#include <private/qcups_p.h>
#if QT_CONFIG(cupsjobwidget)
#include "qcupsjobwidget_p.h"
@@ -110,11 +113,6 @@ Print dialog class declarations
allow editing of Page and Advanced tabs.
Layout in qprintpropertieswidget.ui
-
- QPPDOptionsModel: Holds the PPD Options for the printer.
-
- QPPDOptionsEditor: Edits the PPD Options for the printer.
-
*/
static void initResources()
@@ -124,9 +122,6 @@ static void initResources()
QT_BEGIN_NAMESPACE
-class QOptionTreeItem;
-class QPPDOptionsModel;
-
class QPrintPropertiesDialog : public QDialog
{
Q_OBJECT
@@ -138,13 +133,13 @@ public:
void setupPrinter() const;
- void showEvent(QShowEvent *event) override;
-
private slots:
void reject() override;
void accept() override;
private:
+ void showEvent(QShowEvent *event) override;
+
friend class QUnixPrintWidgetPrivate;
#if QT_CONFIG(cups)
QPrinter *m_printer;
@@ -156,9 +151,16 @@ private:
#endif
#if QT_CONFIG(cups)
- void setCupsOptionsFromItems(QOptionTreeItem *parent) const;
+ bool createAdvancedOptionsWidget();
+ void setPrinterAdvancedCupsOptions() const;
+ void revertAdvancedOptionsToSavedValues() const;
+ void advancedOptionsUpdateSavedValues() const;
+ bool anyPpdOptionConflict() const;
+ bool anyAdvancedOptionConflict() const;
- QPPDOptionsModel *m_cupsOptionsModel;
+ QPrintDevice *m_currentPrintDevice;
+ QTextCodec *m_cupsCodec = nullptr;
+ QVector<QComboBox*> m_advancedOptionsCombos;
#endif
};
@@ -174,6 +176,7 @@ public:
void updatePrinter();
private:
+ friend class QPrintDialog;
friend class QPrintDialogPrivate;
friend class QUnixPrintWidgetPrivate;
QUnixPrintWidgetPrivate *d;
@@ -206,6 +209,11 @@ public:
void updateWidget();
+#if QT_CONFIG(cups)
+ void setPpdDuplex(QPrinter::DuplexMode mode);
+ ppd_option_t *m_duplexPpdOption;
+#endif
+
private:
QPrintDialogPrivate *optionsPane;
bool filePrintersAdded;
@@ -229,6 +237,9 @@ public:
#endif
void _q_collapseOrExpandDialog();
+#if QT_CONFIG(cups)
+ void updatePpdDuplexOption(QRadioButton *radio);
+#endif
void setupPrinter();
void updateWidgets();
@@ -240,103 +251,12 @@ public:
QDialogButtonBox *buttons;
QPushButton *collapseButton;
QPrinter::OutputFormat printerOutputFormat;
-};
-
-#if QT_CONFIG(cups)
-class QOptionTreeItem
-{
-public:
- enum ItemType { Root, Group, Option, Choice };
-
- QOptionTreeItem(ItemType t, int i, const void *p, QOptionTreeItem *pi)
- : type(t),
- index(i),
- ptr(p),
- parentItem(pi) {}
-
- ~QOptionTreeItem() {
- qDeleteAll(childItems);
- }
-
- ItemType type;
- int index;
- const void *ptr;
- QOptionTreeItem *parentItem;
- QList<QOptionTreeItem*> childItems;
-};
-
-class QOptionTreeItemOption : public QOptionTreeItem
-{
-public:
- QOptionTreeItemOption (int i, const void *p, QOptionTreeItem *pi)
- : QOptionTreeItem(Option, i, p, pi)
- {
- }
-
- // These indices are related to ppd_option_t::choices not to childItems
- int selected;
- int originallySelected;
-};
-
-class QPPDOptionsModel : public QAbstractItemModel
-{
- Q_OBJECT
-
-public:
- explicit QPPDOptionsModel(QPrintDevice *currentPrintDevice, QObject *parent);
-
- int columnCount(const QModelIndex &parent = QModelIndex()) const override;
- int rowCount(const QModelIndex &parent = QModelIndex()) const override;
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
- QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
- QModelIndex parent(const QModelIndex &index) const override;
- Qt::ItemFlags flags(const QModelIndex &index) const override;
- QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const override;
-
- void setCupsOptionsFromItems(QPrinter *printer) const;
- void reject();
- void updateSavedValues();
- void revertToSavedValues();
-
- QPrintDevice *currentPrintDevice() const;
- QTextCodec *cupsCodec() const;
-
- void emitConflictsChanged();
- bool hasConflicts() const;
-
-signals:
- void hasConflictsChanged(bool conflicts);
-
private:
- void parseGroups(QOptionTreeItem *parent);
- void parseOptions(QOptionTreeItem *parent);
- void parseChoices(QOptionTreeItemOption *parent);
-
- void setCupsOptionsFromItems(QPrinter *printer, QOptionTreeItem *parent) const;
- void reject(QOptionTreeItem *item);
- void updateSavedValues(QOptionTreeItem *item);
- void revertToSavedValues(QOptionTreeItem *item);
- void emitDataChanged(QOptionTreeItem *item, const QModelIndex &itemIndex, bool *conflictsFound);
- bool hasConflicts(QOptionTreeItem *item) const;
-
- QPrintDevice *m_currentPrintDevice;
- QTextCodec *m_cupsCodec;
- QOptionTreeItem *m_rootItem;
+ void setExplicitDuplexMode(QPrint::DuplexMode duplexMode);
+ // duplex mode explicitly set by user, QPrint::DuplexAuto otherwise
+ QPrint::DuplexMode explicitDuplexMode;
};
-class QPPDOptionsEditor : public QStyledItemDelegate
-{
- Q_OBJECT
-public:
- explicit QPPDOptionsEditor(QObject *parent) : QStyledItemDelegate(parent) {}
-
- QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
- void setEditorData(QWidget *editor, const QModelIndex &index) const override;
- void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
-};
-
-#endif
-
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
@@ -377,24 +297,15 @@ QPrintPropertiesDialog::QPrintPropertiesDialog(QPrinter *printer, QPrintDevice *
const int advancedTabIndex = widget.tabs->indexOf(widget.cupsPropertiesPage);
#if QT_CONFIG(cups)
- m_cupsOptionsModel = new QPPDOptionsModel(currentPrintDevice, this);
-
- widget.treeView->setItemDelegate(new QPPDOptionsEditor(this));
+ m_currentPrintDevice = currentPrintDevice;
+ const bool anyWidgetCreated = createAdvancedOptionsWidget();
- if (m_cupsOptionsModel->rowCount() > 0) {
- widget.treeView->setModel(m_cupsOptionsModel);
+ widget.tabs->setTabEnabled(advancedTabIndex, anyWidgetCreated);
- for (int i = 0; i < m_cupsOptionsModel->rowCount(); ++i)
- widget.treeView->expand(m_cupsOptionsModel->index(i, 0));
+ connect(widget.pageSetup, &QPageSetupWidget::ppdOptionChanged, this, [this] {
+ widget.conflictsLabel->setVisible(anyPpdOptionConflict());
+ });
- widget.tabs->setTabEnabled(advancedTabIndex, true);
- } else {
- widget.treeView->setModel(nullptr);
- widget.tabs->setTabEnabled(advancedTabIndex, false);
- }
-
- widget.conflictsLabel->setVisible(m_cupsOptionsModel->hasConflicts());
- connect(m_cupsOptionsModel, &QPPDOptionsModel::hasConflictsChanged, widget.conflictsLabel, &QLabel::setVisible);
#else
Q_UNUSED(currentPrintDevice)
widget.tabs->setTabEnabled(advancedTabIndex, false);
@@ -420,16 +331,10 @@ void QPrintPropertiesDialog::setupPrinter() const
// Set Color by default, that will change if the "ColorModel" property is available
m_printer->setColorMode(QPrinter::Color);
- m_cupsOptionsModel->setCupsOptionsFromItems(m_printer);
+ setPrinterAdvancedCupsOptions();
#endif
}
-void QPrintPropertiesDialog::showEvent(QShowEvent *event)
-{
- widget.treeView->resizeColumnToContents(0);
- QDialog::showEvent(event);
-}
-
void QPrintPropertiesDialog::reject()
{
widget.pageSetup->revertToSavedValues();
@@ -439,7 +344,7 @@ void QPrintPropertiesDialog::reject()
#endif
#if QT_CONFIG(cups)
- m_cupsOptionsModel->revertToSavedValues();
+ revertAdvancedOptionsToSavedValues();
#endif
QDialog::reject();
}
@@ -447,7 +352,14 @@ void QPrintPropertiesDialog::reject()
void QPrintPropertiesDialog::accept()
{
#if QT_CONFIG(cups)
- if (m_cupsOptionsModel->hasConflicts()) {
+ if (widget.pageSetup->hasPpdConflict()) {
+ widget.tabs->setCurrentWidget(widget.tabPage);
+ const QMessageBox::StandardButton answer = QMessageBox::warning(this, tr("Page Setup Conflicts"),
+ tr("There are conflicts in page setup options. Do you want to fix them?"),
+ QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
+ if (answer != QMessageBox::No)
+ return;
+ } else if (anyAdvancedOptionConflict()) {
widget.tabs->setCurrentWidget(widget.cupsPropertiesPage);
const QMessageBox::StandardButton answer = QMessageBox::warning(this, tr("Advanced Option Conflicts"),
tr("There are conflicts in some advanced options. Do you want to fix them?"),
@@ -455,7 +367,7 @@ void QPrintPropertiesDialog::accept()
if (answer != QMessageBox::No)
return;
}
- m_cupsOptionsModel->updateSavedValues();
+ advancedOptionsUpdateSavedValues();
#endif
#if QT_CONFIG(cupsjobwidget)
@@ -467,6 +379,224 @@ void QPrintPropertiesDialog::accept()
QDialog::accept();
}
+void QPrintPropertiesDialog::showEvent(QShowEvent *event)
+{
+#if QT_CONFIG(cups)
+ widget.conflictsLabel->setVisible(anyPpdOptionConflict());
+#endif
+ QDialog::showEvent(event);
+}
+
+#if QT_CONFIG(cups)
+
+// Used to store the ppd_option_t for each QComboBox that represents an advanced option
+static const char *ppdOptionProperty = "_q_ppd_option";
+
+// Used to store the originally selected choice index for each QComboBox that represents an advanced option
+static const char *ppdOriginallySelectedChoiceProperty = "_q_ppd_originally_selected_choice";
+
+// Used to store the warning label pointer for each QComboBox that represents an advanced option
+static const char *warningLabelProperty = "_q_warning_label";
+
+static bool isBlacklistedGroup(const ppd_group_t *group) Q_DECL_NOTHROW
+{
+ return qstrcmp(group->name, "InstallableOptions") == 0;
+};
+
+static bool isBlacklistedOption(const char *keyword) Q_DECL_NOTHROW
+{
+ // We already let the user set these options elsewhere
+ const char *cupsOptionBlacklist[] = {
+ "Collate",
+ "Copies",
+ "OutputOrder",
+ "PageRegion",
+ "PageSize",
+ "Duplex" // handled by the main dialog
+ };
+ auto equals = [](const char *keyword) {
+ return [keyword](const char *candidate) {
+ return qstrcmp(keyword, candidate) == 0;
+ };
+ };
+ return std::any_of(std::begin(cupsOptionBlacklist), std::end(cupsOptionBlacklist), equals(keyword));
+};
+
+bool QPrintPropertiesDialog::createAdvancedOptionsWidget()
+{
+ bool anyWidgetCreated = false;
+
+ ppd_file_t *ppd = m_currentPrintDevice->property(PDPK_PpdFile).value<ppd_file_t*>();
+
+ if (ppd) {
+ m_cupsCodec = QTextCodec::codecForName(ppd->lang_encoding);
+
+ QWidget *holdingWidget = new QWidget();
+ QVBoxLayout *layout = new QVBoxLayout(holdingWidget);
+
+ for (int i = 0; i < ppd->num_groups; ++i) {
+ const ppd_group_t *group = &ppd->groups[i];
+
+ if (!isBlacklistedGroup(group)) {
+ QFormLayout *groupLayout = new QFormLayout();
+
+ for (int i = 0; i < group->num_options; ++i) {
+ const ppd_option_t *option = &group->options[i];
+
+ if (!isBlacklistedOption(option->keyword)) {
+ QComboBox *choicesCb = new QComboBox();
+
+ const auto setPpdOptionFromCombo = [this, choicesCb, option] {
+ // We can't use choicesCb->currentIndex() to know the index of the option in the choices[] array
+ // because some of them may not be present in the list because they conflict with the
+ // installable options so use the index passed on addItem
+ const int selectedChoiceIndex = choicesCb->currentData().toInt();
+ const auto values = QStringList{} << QString::fromLatin1(option->keyword)
+ << QString::fromLatin1(option->choices[selectedChoiceIndex].choice);
+ m_currentPrintDevice->setProperty(PDPK_PpdOption, values);
+ widget.conflictsLabel->setVisible(anyPpdOptionConflict());
+ };
+
+ bool foundMarkedChoice = false;
+ bool markedChoiceNotAvailable = false;
+ for (int i = 0; i < option->num_choices; ++i) {
+ const ppd_choice_t *choice = &option->choices[i];
+ const auto values = QStringList{} << QString::fromLatin1(option->keyword) << QString::fromLatin1(choice->choice);
+ const bool choiceIsInstallableConflict = m_currentPrintDevice->isFeatureAvailable(PDPK_PpdChoiceIsInstallableConflict, values);
+ if (choiceIsInstallableConflict && static_cast<int>(choice->marked) == 1) {
+ markedChoiceNotAvailable = true;
+ } else if (!choiceIsInstallableConflict) {
+ choicesCb->addItem(m_cupsCodec->toUnicode(choice->text), i);
+ if (static_cast<int>(choice->marked) == 1) {
+ choicesCb->setCurrentIndex(choicesCb->count() - 1);
+ choicesCb->setProperty(ppdOriginallySelectedChoiceProperty, QVariant(i));
+ foundMarkedChoice = true;
+ } else if (!foundMarkedChoice && qstrcmp(choice->choice, option->defchoice) == 0) {
+ choicesCb->setCurrentIndex(choicesCb->count() - 1);
+ choicesCb->setProperty(ppdOriginallySelectedChoiceProperty, QVariant(i));
+ }
+ }
+ }
+
+ if (markedChoiceNotAvailable) {
+ // If the user default option is not available because of it conflicting with
+ // the installed options, we need to set the internal ppd value to the value
+ // being shown in the combo
+ setPpdOptionFromCombo();
+ }
+
+ if (choicesCb->count() > 1) {
+
+ connect(choicesCb, QOverload<int>::of(&QComboBox::currentIndexChanged), this, setPpdOptionFromCombo);
+
+ // We need an extra label at the end to show the conflict warning
+ QWidget *choicesCbWithLabel = new QWidget();
+ QHBoxLayout *choicesCbWithLabelLayout = new QHBoxLayout(choicesCbWithLabel);
+ choicesCbWithLabelLayout->setContentsMargins(0, 0, 0, 0);
+ QLabel *warningLabel = new QLabel();
+ choicesCbWithLabelLayout->addWidget(choicesCb);
+ choicesCbWithLabelLayout->addWidget(warningLabel);
+
+ QLabel *optionLabel = new QLabel(m_cupsCodec->toUnicode(option->text));
+ groupLayout->addRow(optionLabel, choicesCbWithLabel);
+ anyWidgetCreated = true;
+ choicesCb->setProperty(ppdOptionProperty, QVariant::fromValue(option));
+ choicesCb->setProperty(warningLabelProperty, QVariant::fromValue(warningLabel));
+ m_advancedOptionsCombos << choicesCb;
+ } else {
+ delete choicesCb;
+ }
+ }
+ }
+
+ if (groupLayout->rowCount() > 0) {
+ QGroupBox *groupBox = new QGroupBox(m_cupsCodec->toUnicode(group->text));
+ groupBox->setLayout(groupLayout);
+ layout->addWidget(groupBox);
+ } else {
+ delete groupLayout;
+ }
+ }
+ }
+
+ layout->addStretch();
+ widget.scrollArea->setWidget(holdingWidget);
+ }
+
+ if (!m_cupsCodec)
+ m_cupsCodec = QTextCodec::codecForLocale();
+
+ return anyWidgetCreated;
+}
+
+void QPrintPropertiesDialog::setPrinterAdvancedCupsOptions() const
+{
+ for (const QComboBox *choicesCb : m_advancedOptionsCombos) {
+ const ppd_option_t *option = choicesCb->property(ppdOptionProperty).value<const ppd_option_t *>();
+
+ // We can't use choicesCb->currentIndex() to know the index of the option in the choices[] array
+ // because some of them may not be present in the list because they conflict with the
+ // installable options so use the index passed on addItem
+ const int selectedChoiceIndex = choicesCb->currentData().toInt();
+ const char *selectedChoice = option->choices[selectedChoiceIndex].choice;
+
+ if (qstrcmp(option->keyword, "ColorModel") == 0)
+ m_printer->setColorMode(qstrcmp(selectedChoice, "Gray") == 0 ? QPrinter::GrayScale : QPrinter::Color);
+
+ if (qstrcmp(option->defchoice, selectedChoice) != 0)
+ QCUPSSupport::setCupsOption(m_printer, QString::fromLatin1(option->keyword), QString::fromLatin1(selectedChoice));
+ }
+}
+
+void QPrintPropertiesDialog::revertAdvancedOptionsToSavedValues() const
+{
+ for (QComboBox *choicesCb : m_advancedOptionsCombos) {
+ const int originallySelectedChoice = choicesCb->property(ppdOriginallySelectedChoiceProperty).value<int>();
+ const int newComboIndexToSelect = choicesCb->findData(originallySelectedChoice);
+ choicesCb->setCurrentIndex(newComboIndexToSelect);
+ // The currentIndexChanged lambda takes care of resetting the ppd option
+ }
+ widget.conflictsLabel->setVisible(anyPpdOptionConflict());
+}
+
+void QPrintPropertiesDialog::advancedOptionsUpdateSavedValues() const
+{
+ for (QComboBox *choicesCb : m_advancedOptionsCombos)
+ choicesCb->setProperty(ppdOriginallySelectedChoiceProperty, choicesCb->currentData());
+}
+
+bool QPrintPropertiesDialog::anyPpdOptionConflict() const
+{
+ // we need to execute both since besides returning true/false they update the warning icons
+ const bool pageSetupConflicts = widget.pageSetup->hasPpdConflict();
+ const bool advancedOptionConflicts = anyAdvancedOptionConflict();
+ return pageSetupConflicts || advancedOptionConflicts;
+}
+
+bool QPrintPropertiesDialog::anyAdvancedOptionConflict() const
+{
+ const QIcon warning = QApplication::style()->standardIcon(QStyle::SP_MessageBoxWarning, nullptr, nullptr);
+
+ bool anyConflicted = false;
+
+ for (const QComboBox *choicesCb : m_advancedOptionsCombos) {
+ const ppd_option_t *option = choicesCb->property(ppdOptionProperty).value<const ppd_option_t *>();
+ QLabel *warningLabel = choicesCb->property(warningLabelProperty).value<QLabel *>();
+ if (option->conflicted) {
+ anyConflicted = true;
+ const int pixmap_size = choicesCb->sizeHint().height() * .75;
+ warningLabel->setPixmap(warning.pixmap(pixmap_size, pixmap_size));
+ } else {
+ warningLabel->setPixmap(QPixmap());
+ }
+ }
+
+ return anyConflicted;
+}
+
+#endif
+
+
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
@@ -479,7 +609,8 @@ void QPrintPropertiesDialog::accept()
*/
QPrintDialogPrivate::QPrintDialogPrivate()
- : top(nullptr), bottom(nullptr), buttons(nullptr), collapseButton(nullptr)
+ : top(nullptr), bottom(nullptr), buttons(nullptr), collapseButton(nullptr),
+ explicitDuplexMode(QPrint::DuplexAuto)
{
initResources();
}
@@ -540,6 +671,16 @@ void QPrintDialogPrivate::init()
q, SLOT(_q_togglePageSetCombo(bool)));
QObject::connect(collapseButton, SIGNAL(released()), q, SLOT(_q_collapseOrExpandDialog()));
+
+ QObject::connect(options.noDuplex, &QAbstractButton::clicked, q, [this] { setExplicitDuplexMode(QPrint::DuplexNone); });
+ QObject::connect(options.duplexLong, &QAbstractButton::clicked, q, [this] { setExplicitDuplexMode(QPrint::DuplexLongSide); });
+ QObject::connect(options.duplexShort, &QAbstractButton::clicked, q, [this] { setExplicitDuplexMode(QPrint::DuplexShortSide); });
+
+#if QT_CONFIG(cups)
+ QObject::connect(options.noDuplex, &QAbstractButton::toggled, q, [this] { updatePpdDuplexOption(options.noDuplex); });
+ QObject::connect(options.duplexLong, &QAbstractButton::toggled, q, [this] { updatePpdDuplexOption(options.duplexLong); });
+ QObject::connect(options.duplexShort, &QAbstractButton::toggled, q, [this] { updatePpdDuplexOption(options.duplexShort); });
+#endif
}
// initialize printer options
@@ -559,13 +700,20 @@ void QPrintDialogPrivate::selectPrinter(const QPrinter::OutputFormat outputForma
else
options.grayscale->setChecked(true);
- switch (p->duplex()) {
- case QPrinter::DuplexNone:
+ // keep duplex value explicitly set by user, if any, and selected printer supports it;
+ // use device default otherwise
+ QPrint::DuplexMode duplex;
+ if (explicitDuplexMode != QPrint::DuplexAuto && supportedDuplexMode.contains(explicitDuplexMode))
+ duplex = explicitDuplexMode;
+ else
+ duplex = top->d->m_currentPrintDevice.defaultDuplexMode();
+ switch (duplex) {
+ case QPrint::DuplexNone:
options.noDuplex->setChecked(true); break;
- case QPrinter::DuplexLongSide:
- case QPrinter::DuplexAuto:
+ case QPrint::DuplexLongSide:
+ case QPrint::DuplexAuto:
options.duplexLong->setChecked(true); break;
- case QPrinter::DuplexShortSide:
+ case QPrint::DuplexShortSide:
options.duplexShort->setChecked(true); break;
}
options.copies->setValue(p->copyCount());
@@ -665,8 +813,26 @@ static bool isValidPagesString(const QString &pagesString) Q_DECL_NOTHROW
auto pagesRanges = pageRangesFromString(pagesString);
return !pagesRanges.empty();
}
+
+void QPrintDialogPrivate::updatePpdDuplexOption(QRadioButton *radio)
+{
+ const bool checked = radio->isChecked();
+ if (checked) {
+ if (radio == options.noDuplex) top->d->setPpdDuplex(QPrinter::DuplexNone);
+ else if (radio == options.duplexLong) top->d->setPpdDuplex(QPrinter::DuplexLongSide);
+ else if (radio == options.duplexShort) top->d->setPpdDuplex(QPrinter::DuplexShortSide);
+ }
+ const bool conflict = checked && top->d->m_duplexPpdOption && top->d->m_duplexPpdOption->conflicted;
+ radio->setIcon(conflict ? QApplication::style()->standardIcon(QStyle::SP_MessageBoxWarning, nullptr, nullptr) : QIcon());
+}
+
#endif
+void QPrintDialogPrivate::setExplicitDuplexMode(const QPrint::DuplexMode duplexMode)
+{
+ explicitDuplexMode = duplexMode;
+}
+
void QPrintDialogPrivate::setupPrinter()
{
// First setup the requested OutputFormat, Printer and Page Size first
@@ -931,6 +1097,13 @@ void QPrintDialog::accept()
QMessageBox::Ok, QMessageBox::Ok);
return;
}
+ if (d->top->d->m_duplexPpdOption && d->top->d->m_duplexPpdOption->conflicted) {
+ const QMessageBox::StandardButton answer = QMessageBox::warning(this, tr("Duplex Settings Conflicts"),
+ tr("There are conflicts in duplex settings. Do you want to fix them?"),
+ QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
+ if (answer != QMessageBox::No)
+ return;
+ }
#endif
d->setupPrinter();
QDialog::accept();
@@ -952,8 +1125,11 @@ void QPrintDialog::accept()
/*! \internal
*/
QUnixPrintWidgetPrivate::QUnixPrintWidgetPrivate(QUnixPrintWidget *p, QPrinter *prn)
- : parent(p), propertiesDialog(nullptr), printer(prn), optionsPane(0),
- filePrintersAdded(false)
+ : parent(p), propertiesDialog(nullptr), printer(prn),
+#if QT_CONFIG(cups)
+ m_duplexPpdOption(nullptr),
+#endif
+ optionsPane(nullptr), filePrintersAdded(false)
{
q = nullptr;
if (parent)
@@ -1043,6 +1219,10 @@ void QUnixPrintWidgetPrivate::_q_printerChanged(int index)
propertiesDialog = nullptr;
}
+#if QT_CONFIG(cups)
+ m_duplexPpdOption = nullptr;
+#endif
+
if (filePrintersAdded) {
Q_ASSERT(index != printerCount - 2); // separator
if (index == printerCount - 1) { // PDF
@@ -1077,6 +1257,10 @@ void QUnixPrintWidgetPrivate::_q_printerChanged(int index)
if (optionsPane)
optionsPane->selectPrinter(QPrinter::NativeFormat);
}
+
+#if QT_CONFIG(cups)
+ m_duplexPpdOption = QCUPSSupport::findPpdOption("Duplex", &m_currentPrintDevice);
+#endif
}
void QUnixPrintWidgetPrivate::setOptionsPane(QPrintDialogPrivate *pane)
@@ -1172,11 +1356,30 @@ void QUnixPrintWidgetPrivate::setupPrinterProperties()
propertiesDialog = new QPrintPropertiesDialog(q->printer(), &m_currentPrintDevice, outputFormat, printerName, q);
}
+#if QT_CONFIG(cups)
+void QUnixPrintWidgetPrivate::setPpdDuplex(QPrinter::DuplexMode mode)
+{
+ auto values = QStringList{} << QStringLiteral("Duplex");
+ if (mode == QPrinter::DuplexNone) values << QStringLiteral("None");
+ else if (mode == QPrinter::DuplexLongSide) values << QStringLiteral("DuplexNoTumble");
+ else if (mode == QPrinter::DuplexShortSide) values << QStringLiteral("DuplexTumble");
+
+ m_currentPrintDevice.setProperty(PDPK_PpdOption, values);
+}
+#endif
+
void QUnixPrintWidgetPrivate::_q_btnPropertiesClicked()
{
if (!propertiesDialog)
setupPrinterProperties();
propertiesDialog->exec();
+
+#if QT_CONFIG(cups)
+ // update the warning icon on the duplex options if needed
+ optionsPane->updatePpdDuplexOption(optionsPane->options.noDuplex);
+ optionsPane->updatePpdDuplexOption(optionsPane->options.duplexLong);
+ optionsPane->updatePpdDuplexOption(optionsPane->options.duplexShort);
+#endif
}
void QUnixPrintWidgetPrivate::setupPrinter()
@@ -1262,436 +1465,8 @@ void QUnixPrintWidget::updatePrinter()
d->setupPrinter();
}
-////////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////////
-
-/*
-
- QPPDOptionsModel
-
- Holds the PPD Options for the printer.
-
-*/
-
#if QT_CONFIG(cups)
-static bool isBlacklistedGroup(ppd_group_t *group) Q_DECL_NOTHROW
-{
- return qstrcmp(group->name, "InstallableOptions") == 0;
-};
-
-QPPDOptionsModel::QPPDOptionsModel(QPrintDevice *currentPrintDevice, QObject *parent)
- : QAbstractItemModel(parent)
- , m_currentPrintDevice(currentPrintDevice)
- , m_cupsCodec(nullptr)
-{
- ppd_file_t *ppd = m_currentPrintDevice->property(PDPK_PpdFile).value<ppd_file_t*>();
- m_rootItem = new QOptionTreeItem(QOptionTreeItem::Root, 0, ppd, nullptr);
-
- if (ppd) {
- m_cupsCodec = QTextCodec::codecForName(ppd->lang_encoding);
- for (int i = 0; i < ppd->num_groups; ++i) {
- if (!isBlacklistedGroup(&ppd->groups[i])) {
- QOptionTreeItem *group = new QOptionTreeItem(QOptionTreeItem::Group, i, &ppd->groups[i], m_rootItem);
- m_rootItem->childItems.append(group);
- parseGroups(group); // parse possible subgroups
- parseOptions(group); // parse options
- }
- }
- }
-
- if (!m_cupsCodec)
- m_cupsCodec = QTextCodec::codecForLocale();
-}
-
-int QPPDOptionsModel::columnCount(const QModelIndex &) const
-{
- return 2;
-}
-
-int QPPDOptionsModel::rowCount(const QModelIndex &parent) const
-{
- QOptionTreeItem *itm;
- if (!parent.isValid())
- itm = m_rootItem;
- else
- itm = static_cast<QOptionTreeItem*>(parent.internalPointer());
-
- if (itm->type == QOptionTreeItem::Option)
- return 0;
-
- return itm->childItems.count();
-}
-
-QVariant QPPDOptionsModel::data(const QModelIndex &index, int role) const
-{
- if (!index.isValid())
- return QVariant();
-
- QOptionTreeItem *itm = static_cast<QOptionTreeItem*>(index.internalPointer());
-
- switch (role) {
- case Qt::FontRole: {
- if (itm->type == QOptionTreeItem::Group){
- QFont font;
- font.setBold(true);
- return QVariant(font);
- }
- return QVariant();
- }
- break;
-
- case Qt::DisplayRole: {
- if (index.column() == 0) {
- if (itm->type == QOptionTreeItem::Option) {
- const ppd_option_t *option = static_cast<const ppd_option_t*>(itm->ptr);
- return m_cupsCodec->toUnicode(option->text);
- } else if (itm->type == QOptionTreeItem::Group) {
- const ppd_group_t *group = static_cast<const ppd_group_t*>(itm->ptr);
- return m_cupsCodec->toUnicode(group->text);
- }
- } else if (itm->type == QOptionTreeItem::Option) {
- QOptionTreeItemOption *itmOption = static_cast<QOptionTreeItemOption *>(itm);
- const ppd_option_t *option = static_cast<const ppd_option_t*>(itm->ptr);
- if (itmOption->selected > -1)
- return m_cupsCodec->toUnicode(option->choices[itmOption->selected].text);
- }
-
- return QVariant();
- }
- break;
-
- case Qt::DecorationRole: {
- if (itm->type == QOptionTreeItem::Option && index.column() == 1) {
- const ppd_option_t *option = static_cast<const ppd_option_t*>(itm->ptr);
- if (option->conflicted) {
- const QIcon warning = QApplication::style()->standardIcon(QStyle::SP_MessageBoxWarning, nullptr, nullptr);
- if (!warning.isNull())
- return warning;
-
- qWarning() << "Current application style returned a null icon for SP_MessageBoxWarning.";
- return QColor(Qt::red);
- }
- }
- return QVariant();
- }
- break;
-
- }
-
- return QVariant();
-}
-
-QModelIndex QPPDOptionsModel::index(int row, int column, const QModelIndex &parent) const
-{
- QOptionTreeItem *itm;
- if (!parent.isValid())
- itm = m_rootItem;
- else
- itm = static_cast<QOptionTreeItem*>(parent.internalPointer());
-
- return createIndex(row, column, itm->childItems.at(row));
-}
-
-
-QModelIndex QPPDOptionsModel::parent(const QModelIndex &index) const
-{
- if (!index.isValid())
- return QModelIndex();
-
- QOptionTreeItem *itm = static_cast<QOptionTreeItem*>(index.internalPointer());
-
- if (itm->parentItem && itm->parentItem != m_rootItem)
- return createIndex(itm->parentItem->index, 0, itm->parentItem);
-
- return QModelIndex();
-}
-
-Qt::ItemFlags QPPDOptionsModel::flags(const QModelIndex &index) const
-{
- if (!index.isValid() || static_cast<QOptionTreeItem*>(index.internalPointer())->type == QOptionTreeItem::Group)
- return Qt::ItemIsEnabled;
-
- if (index.column() == 1)
- return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable;
-
- return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
-}
-
-QPrintDevice *QPPDOptionsModel::currentPrintDevice() const
-{
- return m_currentPrintDevice;
-}
-
-QTextCodec *QPPDOptionsModel::cupsCodec() const
-{
- return m_cupsCodec;
-}
-
-void QPPDOptionsModel::setCupsOptionsFromItems(QPrinter *printer) const
-{
- setCupsOptionsFromItems(printer, m_rootItem);
-}
-
-void QPPDOptionsModel::setCupsOptionsFromItems(QPrinter *printer, QOptionTreeItem *parent) const
-{
- for (QOptionTreeItem *itm : qAsConst(parent->childItems)) {
- if (itm->type == QOptionTreeItem::Option) {
- QOptionTreeItemOption *itmOption = static_cast<QOptionTreeItemOption *>(itm);
- const ppd_option_t *opt = static_cast<const ppd_option_t*>(itm->ptr);
-
- if (qstrcmp(opt->keyword, "ColorModel") == 0)
- printer->setColorMode(qstrcmp(opt->choices[itmOption->selected].choice, "Gray") == 0 ? QPrinter::GrayScale : QPrinter::Color);
-
- if (qstrcmp(opt->defchoice, opt->choices[itmOption->selected].choice) != 0) {
- QCUPSSupport::setCupsOption(printer, QString::fromLatin1(opt->keyword), QString::fromLatin1(opt->choices[itmOption->selected].choice));
- }
- } else {
- setCupsOptionsFromItems(printer, itm);
- }
- }
-}
-
-void QPPDOptionsModel::parseGroups(QOptionTreeItem *parent)
-{
- const ppd_group_t *group = static_cast<const ppd_group_t*>(parent->ptr);
-
- if (group) {
- for (int i = 0; i < group->num_subgroups; ++i) {
- if (!isBlacklistedGroup(&group->subgroups[i])) {
- QOptionTreeItem *subgroup = new QOptionTreeItem(QOptionTreeItem::Group, i, &group->subgroups[i], parent);
- parent->childItems.append(subgroup);
- parseGroups(subgroup); // parse possible subgroups
- parseOptions(subgroup); // parse options
- }
- }
- }
-}
-
-static bool isBlacklistedOption(const char *keyword) Q_DECL_NOTHROW
-{
- // We already let the user set these options elsewhere
- const char *cupsOptionBlacklist[] = {
- "Collate",
- "Copies",
- "OutputOrder",
- "PageRegion",
- "PageSize",
- "Duplex" // handled by the main dialog
- };
- auto equals = [](const char *keyword) {
- return [keyword](const char *candidate) {
- return qstrcmp(keyword, candidate) == 0;
- };
- };
- return std::any_of(std::begin(cupsOptionBlacklist), std::end(cupsOptionBlacklist), equals(keyword));
-};
-
-void QPPDOptionsModel::parseOptions(QOptionTreeItem *parent)
-{
- const ppd_group_t *group = static_cast<const ppd_group_t*>(parent->ptr);
- for (int i = 0; i < group->num_options; ++i) {
- if (!isBlacklistedOption(group->options[i].keyword)) {
- QOptionTreeItemOption *opt = new QOptionTreeItemOption(i, &group->options[i], parent);
- parseChoices(opt);
-
- // Don't show options that are actually not options at all
- // because they don't give the user any choice
- if (opt->childItems.count() > 1)
- parent->childItems.append(opt);
- else
- delete opt;
- }
- }
-}
-
-void QPPDOptionsModel::parseChoices(QOptionTreeItemOption *parent)
-{
- const ppd_option_t *option = static_cast<const ppd_option_t*>(parent->ptr);
- bool marked = false;
- for (int i = 0; i < option->num_choices; ++i) {
- const auto values = QStringList{} << QString::fromLatin1(option->keyword) << QString::fromLatin1(option->choices[i].choice);
- if (!m_currentPrintDevice->isFeatureAvailable(PDPK_PpdChoiceIsInstallableConflict, values)) {
- QOptionTreeItem *choice = new QOptionTreeItem(QOptionTreeItem::Choice, i, &option->choices[i], parent);
- if (static_cast<int>(option->choices[i].marked) == 1) {
- parent->selected = i;
- marked = true;
- } else if (!marked && qstrcmp(option->choices[i].choice, option->defchoice) == 0) {
- parent->selected = i;
- }
- parent->originallySelected = parent->selected;
- parent->childItems.append(choice);
- }
- }
-}
-
-bool QPPDOptionsModel::hasConflicts() const
-{
- return hasConflicts(m_rootItem);
-}
-
-bool QPPDOptionsModel::hasConflicts(QOptionTreeItem *item) const
-{
- if (item->type == QOptionTreeItem::Option) {
- const ppd_option_t *option = static_cast<const ppd_option_t*>(item->ptr);
- return option->conflicted;
- }
-
- for (QOptionTreeItem *child : qAsConst(item->childItems)) {
- if (hasConflicts(child))
- return true;
- }
-
- return false;
-}
-
-void QPPDOptionsModel::emitConflictsChanged()
-{
- bool conflictsFound = false;
- emitDataChanged(m_rootItem, QModelIndex(), &conflictsFound);
-
- emit hasConflictsChanged(conflictsFound);
-}
-
-void QPPDOptionsModel::emitDataChanged(QOptionTreeItem *item, const QModelIndex &itemIndex, bool *conflictsFound)
-{
- if (item->type == QOptionTreeItem::Option) {
- // We just emit DecorationRole dataChanged for all the leaves
- // and let the view requery the value
- const QModelIndex secondColItem = index(itemIndex.row(), 1, itemIndex.parent());
- emit dataChanged(secondColItem, secondColItem, QVector<int>() << Qt::DecorationRole);
-
- if (conflictsFound && *conflictsFound == false) {
- const ppd_option_t *option = static_cast<const ppd_option_t*>(item->ptr);
- if (option->conflicted && conflictsFound)
- *conflictsFound = true;
- }
- }
-
- for (int i = 0; i < item->childItems.count(); ++i) {
- QOptionTreeItem *child = item->childItems.at(i);
- emitDataChanged(child, index(i, 0, itemIndex), conflictsFound);
- }
-}
-
-QVariant QPPDOptionsModel::headerData(int section, Qt::Orientation, int role) const
-{
- if (role != Qt::DisplayRole)
- return QVariant();
-
- switch (section) {
- case 0:
- return QVariant(tr("Name"));
- case 1:
- return QVariant(tr("Value"));
- }
-
- return QVariant();
-}
-
-void QPPDOptionsModel::revertToSavedValues()
-{
- revertToSavedValues(m_rootItem);
- emitConflictsChanged();
-}
-
-void QPPDOptionsModel::revertToSavedValues(QOptionTreeItem *item)
-{
- if (item->type == QOptionTreeItem::Option) {
- QOptionTreeItemOption *itemOption = static_cast<QOptionTreeItemOption *>(item);
-
- const ppd_option_t *option = static_cast<const ppd_option_t*>(item->ptr);
- const char *choice = itemOption->originallySelected != -1 ? option->choices[itemOption->originallySelected].choice
- : option->defchoice;
- const auto values = QStringList{} << QString::fromLatin1(option->keyword) << QString::fromLatin1(choice);
- m_currentPrintDevice->setProperty(PDPK_PpdOption, values);
- itemOption->selected = itemOption->originallySelected;
- }
-
- for (QOptionTreeItem *child : qAsConst(item->childItems))
- revertToSavedValues(child);
-}
-
-void QPPDOptionsModel::updateSavedValues()
-{
- updateSavedValues(m_rootItem);
-}
-
-void QPPDOptionsModel::updateSavedValues(QOptionTreeItem *item)
-{
- if (item->type == QOptionTreeItem::Option) {
- QOptionTreeItemOption *itemOption = static_cast<QOptionTreeItemOption *>(item);
- itemOption->originallySelected = itemOption->selected;
- }
-
- for (QOptionTreeItem *child : qAsConst(item->childItems))
- updateSavedValues(child);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////////
-
-/*
-
- QPPDOptionsEditor
-
- Edits the PPD Options for the printer.
-
-*/
-
-QWidget *QPPDOptionsEditor::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
-{
- Q_UNUSED(option)
-
- if (index.column() == 1 && static_cast<QOptionTreeItem*>(index.internalPointer())->type == QOptionTreeItem::Option)
- return new QComboBox(parent);
-
- return nullptr;
-}
-
-void QPPDOptionsEditor::setEditorData(QWidget *editor, const QModelIndex &index) const
-{
- if (index.column() != 1)
- return;
-
- QComboBox *cb = static_cast<QComboBox*>(editor);
- QOptionTreeItemOption *itm = static_cast<QOptionTreeItemOption*>(index.internalPointer());
-
- if (itm->selected == -1)
- cb->addItem(QString());
-
- const QPPDOptionsModel *m = static_cast<const QPPDOptionsModel*>(index.model());
- for (auto *childItem : qAsConst(itm->childItems)) {
- const ppd_choice_t *choice = static_cast<const ppd_choice_t*>(childItem->ptr);
- cb->addItem(m->cupsCodec()->toUnicode(choice->text), childItem->index);
- if (childItem->index == itm->selected)
- cb->setCurrentIndex(cb->count() - 1);
- }
-}
-
-void QPPDOptionsEditor::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
-{
- QComboBox *cb = static_cast<QComboBox*>(editor);
- QOptionTreeItemOption *itm = static_cast<QOptionTreeItemOption*>(index.internalPointer());
-
- // We can't use cb->currentIndex() to know the index of the option in the choices[] array
- // because some of them may not be present in the list because they conflict with the
- // installable options so use the index passed on addItem
- const int selectedChoiceIndex = cb->currentData().toInt();
-
- if (itm->selected == selectedChoiceIndex || selectedChoiceIndex < 0)
- return;
-
- const ppd_option_t *opt = static_cast<const ppd_option_t*>(itm->ptr);
- QPPDOptionsModel *m = static_cast<QPPDOptionsModel*>(model);
-
- const auto values = QStringList{} << QString::fromLatin1(opt->keyword) << QString::fromLatin1(opt->choices[selectedChoiceIndex].choice);
- m->currentPrintDevice()->setProperty(PDPK_PpdOption, values);
- itm->selected = selectedChoiceIndex;
-
- m->emitConflictsChanged();
-}
-
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
diff --git a/src/printsupport/dialogs/qprintpropertieswidget.ui b/src/printsupport/dialogs/qprintpropertieswidget.ui
index d8e526139b..c2b4836d26 100644
--- a/src/printsupport/dialogs/qprintpropertieswidget.ui
+++ b/src/printsupport/dialogs/qprintpropertieswidget.ui
@@ -47,60 +47,74 @@
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
- <widget class="QTreeView" name="treeView">
- <property name="alternatingRowColors">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="conflictsLabel">
- <property name="palette">
- <palette>
- <active>
- <colorrole role="WindowText">
- <brush brushstyle="SolidPattern">
- <color alpha="255">
- <red>255</red>
- <green>0</green>
- <blue>0</blue>
- </color>
- </brush>
- </colorrole>
- </active>
- <inactive>
- <colorrole role="WindowText">
- <brush brushstyle="SolidPattern">
- <color alpha="255">
- <red>255</red>
- <green>0</green>
- <blue>0</blue>
- </color>
- </brush>
- </colorrole>
- </inactive>
- <disabled>
- <colorrole role="WindowText">
- <brush brushstyle="SolidPattern">
- <color alpha="255">
- <red>165</red>
- <green>167</green>
- <blue>169</blue>
- </color>
- </brush>
- </colorrole>
- </disabled>
- </palette>
+ <widget class="QScrollArea" name="scrollArea">
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
</property>
- <property name="text">
- <string>There are conflicts in some options. Please fix them.</string>
+ <property name="widgetResizable">
+ <bool>true</bool>
</property>
+ <widget class="QWidget" name="scrollAreaWidgetContents">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>376</width>
+ <height>217</height>
+ </rect>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout"/>
+ </widget>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
+ <item>
+ <widget class="QLabel" name="conflictsLabel">
+ <property name="palette">
+ <palette>
+ <active>
+ <colorrole role="WindowText">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>255</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </active>
+ <inactive>
+ <colorrole role="WindowText">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>255</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </inactive>
+ <disabled>
+ <colorrole role="WindowText">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>165</red>
+ <green>167</green>
+ <blue>169</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </disabled>
+ </palette>
+ </property>
+ <property name="text">
+ <string>There are conflicts in some options. Please fix them.</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
<customwidgets>
diff --git a/src/printsupport/kernel/qcups.cpp b/src/printsupport/kernel/qcups.cpp
index 7e8e1707b2..8505e8356c 100644
--- a/src/printsupport/kernel/qcups.cpp
+++ b/src/printsupport/kernel/qcups.cpp
@@ -39,6 +39,7 @@
#include "qcups_p.h"
+#include "qprintdevice_p.h"
#include "qprintengine.h"
QT_BEGIN_NAMESPACE
@@ -146,6 +147,25 @@ QCUPSSupport::JobHoldUntilWithTime QCUPSSupport::parseJobHoldUntil(const QString
return { QCUPSSupport::NoHold, QTime() };
}
+ppd_option_t *QCUPSSupport::findPpdOption(const char *optionName, QPrintDevice *printDevice)
+{
+ ppd_file_t *ppd = printDevice->property(PDPK_PpdFile).value<ppd_file_t*>();
+
+ if (ppd) {
+ for (int i = 0; i < ppd->num_groups; ++i) {
+ ppd_group_t *group = &ppd->groups[i];
+
+ for (int i = 0; i < group->num_options; ++i) {
+ ppd_option_t *option = &group->options[i];
+
+ if (qstrcmp(option->keyword, optionName) == 0)
+ return option;
+ }
+ }
+ }
+
+ return nullptr;
+}
void QCUPSSupport::setJobHold(QPrinter *printer, const JobHoldUntil jobHold, const QTime &holdUntilTime)
{
diff --git a/src/printsupport/kernel/qcups_p.h b/src/printsupport/kernel/qcups_p.h
index 9a71483bb9..57ec281383 100644
--- a/src/printsupport/kernel/qcups_p.h
+++ b/src/printsupport/kernel/qcups_p.h
@@ -52,6 +52,7 @@
//
#include <QtPrintSupport/private/qtprintsupportglobal_p.h>
+#include <QtPrintSupport/private/qprint_p.h>
#include "QtCore/qstring.h"
#include "QtCore/qstringlist.h"
#include "QtPrintSupport/qprinter.h"
@@ -61,6 +62,8 @@ QT_REQUIRE_CONFIG(cups);
QT_BEGIN_NAMESPACE
+class QPrintDevice;
+
// HACK! Define these here temporarily so they can be used in the dialogs
// without a circular reference to QCupsPrintEngine in the plugin.
// Move back to qcupsprintengine_p.h in the plugin once all usage
@@ -163,6 +166,8 @@ public:
QTime time;
};
static JobHoldUntilWithTime parseJobHoldUntil(const QString &jobHoldUntil);
+
+ static ppd_option_t *findPpdOption(const char *optionName, QPrintDevice *printDevice);
};
Q_DECLARE_TYPEINFO(QCUPSSupport::JobHoldUntil, Q_PRIMITIVE_TYPE);
Q_DECLARE_TYPEINFO(QCUPSSupport::BannerPage, Q_PRIMITIVE_TYPE);
diff --git a/src/printsupport/kernel/qplatformprintdevice.cpp b/src/printsupport/kernel/qplatformprintdevice.cpp
index 8dba402a6e..23a92fc2a1 100644
--- a/src/printsupport/kernel/qplatformprintdevice.cpp
+++ b/src/printsupport/kernel/qplatformprintdevice.cpp
@@ -50,23 +50,6 @@ QT_BEGIN_NAMESPACE
#ifndef QT_NO_PRINTER
-QPlatformPrintDevice::QPlatformPrintDevice()
- : m_isRemote(false),
- m_supportsMultipleCopies(false),
- m_supportsCollateCopies(false),
- m_havePageSizes(false),
- m_supportsCustomPageSizes(false),
- m_haveResolutions(false),
- m_haveInputSlots(false),
- m_haveOutputBins(false),
- m_haveDuplexModes(false),
- m_haveColorModes(false)
-#ifndef QT_NO_MIMETYPE
- , m_haveMimeTypes(false)
-#endif
-{
-}
-
QPlatformPrintDevice::QPlatformPrintDevice(const QString &id)
: m_id(id),
m_isRemote(false),
@@ -247,6 +230,10 @@ QPageSize QPlatformPrintDevice::supportedPageSize(const QSizeF &size, QPageSize:
QPageSize QPlatformPrintDevice::supportedPageSizeMatch(const QPageSize &pageSize) const
{
+ // If it's a known page size, just return itself
+ if (m_pageSizes.contains(pageSize))
+ return pageSize;
+
// Try to find a supported page size based on point size
for (const QPageSize &ps : m_pageSizes) {
if (ps.sizePoints() == pageSize.sizePoints())
diff --git a/src/printsupport/kernel/qplatformprintdevice.h b/src/printsupport/kernel/qplatformprintdevice.h
index a988518547..14701271c3 100644
--- a/src/printsupport/kernel/qplatformprintdevice.h
+++ b/src/printsupport/kernel/qplatformprintdevice.h
@@ -69,8 +69,7 @@ class Q_PRINTSUPPORT_EXPORT QPlatformPrintDevice
{
Q_DISABLE_COPY(QPlatformPrintDevice)
public:
- QPlatformPrintDevice();
- explicit QPlatformPrintDevice(const QString &id);
+ explicit QPlatformPrintDevice(const QString &id = QString());
virtual ~QPlatformPrintDevice();
virtual QString id() const;
diff --git a/src/printsupport/kernel/qprintengine_pdf.cpp b/src/printsupport/kernel/qprintengine_pdf.cpp
index 0230ebddc8..3c24e5ac69 100644
--- a/src/printsupport/kernel/qprintengine_pdf.cpp
+++ b/src/printsupport/kernel/qprintengine_pdf.cpp
@@ -132,6 +132,8 @@ void QPdfPrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &va
// The following keys are settings that are unsupported by the PDF PrintEngine
case PPK_CustomBase:
break;
+ case PPK_Duplex:
+ break;
// The following keys are properties and settings that are supported by the PDF PrintEngine
case PPK_CollateCopies:
@@ -203,9 +205,6 @@ void QPdfPrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &va
case PPK_FontEmbedding:
d->embedFonts = value.toBool();
break;
- case PPK_Duplex:
- d->duplex = static_cast<QPrint::DuplexMode>(value.toInt());
- break;
case PPK_CustomPaperSize:
d->m_pageLayout.setPageSize(QPageSize(value.toSizeF(), QPageSize::Point));
break;
@@ -249,6 +248,7 @@ QVariant QPdfPrintEngine::property(PrintEnginePropertyKey key) const
// The following keys are settings that are unsupported by the PDF PrintEngine
// Return sensible default values to ensure consistent behavior across platforms
case PPK_CustomBase:
+ case PPK_Duplex:
// Special case, leave null
break;
@@ -322,9 +322,6 @@ QVariant QPdfPrintEngine::property(PrintEnginePropertyKey key) const
case PPK_FontEmbedding:
ret = d->embedFonts;
break;
- case PPK_Duplex:
- ret = d->duplex;
- break;
case PPK_CustomPaperSize:
ret = d->m_pageLayout.fullRectPoints().size();
break;
@@ -389,7 +386,6 @@ void QPdfPrintEnginePrivate::closePrintDevice()
QPdfPrintEnginePrivate::QPdfPrintEnginePrivate(QPrinter::PrinterMode m)
: QPdfEnginePrivate(),
- duplex(QPrint::DuplexNone),
collate(true),
copies(1),
pageOrder(QPrinter::FirstPageFirst),
diff --git a/src/printsupport/kernel/qprintengine_pdf_p.h b/src/printsupport/kernel/qprintengine_pdf_p.h
index bb01a2e9e1..e7ae21f260 100644
--- a/src/printsupport/kernel/qprintengine_pdf_p.h
+++ b/src/printsupport/kernel/qprintengine_pdf_p.h
@@ -130,7 +130,6 @@ private:
QString printProgram;
QString selectionOption;
- QPrint::DuplexMode duplex;
bool collate;
int copies;
QPrinter::PageOrder pageOrder;
diff --git a/src/printsupport/kernel/qprinter.cpp b/src/printsupport/kernel/qprinter.cpp
index 8a2cdcb34f..ed4292ff3d 100644
--- a/src/printsupport/kernel/qprinter.cpp
+++ b/src/printsupport/kernel/qprinter.cpp
@@ -224,8 +224,8 @@ void QPrinterPrivate::setProperty(QPrintEngine::PrintEnginePropertyKey key, cons
class QPrinterPagedPaintDevicePrivate : public QPagedPaintDevicePrivate
{
public:
- QPrinterPagedPaintDevicePrivate(QPrinterPrivate *d)
- : QPagedPaintDevicePrivate(), pd(d)
+ QPrinterPagedPaintDevicePrivate(QPrinter *p)
+ : QPagedPaintDevicePrivate(), m_printer(p)
{}
virtual ~QPrinterPagedPaintDevicePrivate()
@@ -233,6 +233,8 @@ public:
bool setPageLayout(const QPageLayout &newPageLayout) override
{
+ QPrinterPrivate *pd = QPrinterPrivate::get(m_printer);
+
if (pd->paintEngine->type() != QPaintEngine::Pdf
&& pd->printEngine->printerState() == QPrinter::Active) {
qWarning("QPrinter::setPageLayout: Cannot be changed while printer is active");
@@ -242,14 +244,13 @@ public:
// Try to set the print engine page layout
pd->setProperty(QPrintEngine::PPK_QPageLayout, QVariant::fromValue(newPageLayout));
- // Set QPagedPaintDevice layout to match the current print engine value
- m_pageLayout = pageLayout();
-
return pageLayout().isEquivalentTo(newPageLayout);
}
bool setPageSize(const QPageSize &pageSize) override
{
+ QPrinterPrivate *pd = QPrinterPrivate::get(m_printer);
+
if (pd->paintEngine->type() != QPaintEngine::Pdf
&& pd->printEngine->printerState() == QPrinter::Active) {
qWarning("QPrinter::setPageLayout: Cannot be changed while printer is active");
@@ -260,46 +261,38 @@ public:
// Try to set the print engine page size
pd->setProperty(QPrintEngine::PPK_QPageSize, QVariant::fromValue(pageSize));
- // Set QPagedPaintDevice layout to match the current print engine value
- m_pageLayout = pageLayout();
-
return pageLayout().pageSize().isEquivalentTo(pageSize);
}
bool setPageOrientation(QPageLayout::Orientation orientation) override
{
+ QPrinterPrivate *pd = QPrinterPrivate::get(m_printer);
+
// Set the print engine value
pd->setProperty(QPrintEngine::PPK_Orientation, orientation);
- // Set QPagedPaintDevice layout to match the current print engine value
- m_pageLayout = pageLayout();
-
return pageLayout().orientation() == orientation;
}
- bool setPageMargins(const QMarginsF &margins) override
- {
- return setPageMargins(margins, pageLayout().units());
- }
-
bool setPageMargins(const QMarginsF &margins, QPageLayout::Unit units) override
{
+ QPrinterPrivate *pd = QPrinterPrivate::get(m_printer);
+
// Try to set print engine margins
QPair<QMarginsF, QPageLayout::Unit> pair = qMakePair(margins, units);
pd->setProperty(QPrintEngine::PPK_QPageMargins, QVariant::fromValue(pair));
- // Set QPagedPaintDevice layout to match the current print engine value
- m_pageLayout = pageLayout();
-
return pageLayout().margins() == margins && pageLayout().units() == units;
}
QPageLayout pageLayout() const override
{
+ QPrinterPrivate *pd = QPrinterPrivate::get(m_printer);
+
return pd->printEngine->property(QPrintEngine::PPK_QPageLayout).value<QPageLayout>();
}
- QPrinterPrivate *pd;
+ QPrinter *m_printer;
};
@@ -554,11 +547,9 @@ public:
Creates a new printer object with the given \a mode.
*/
QPrinter::QPrinter(PrinterMode mode)
- : QPagedPaintDevice(),
+ : QPagedPaintDevice(new QPrinterPagedPaintDevicePrivate(this)),
d_ptr(new QPrinterPrivate(this))
{
- delete d;
- d = new QPrinterPagedPaintDevicePrivate(d_func());
d_ptr->init(QPrinterInfo(), mode);
}
@@ -568,11 +559,9 @@ QPrinter::QPrinter(PrinterMode mode)
Creates a new printer object with the given \a printer and \a mode.
*/
QPrinter::QPrinter(const QPrinterInfo& printer, PrinterMode mode)
- : QPagedPaintDevice(),
+ : QPagedPaintDevice(new QPrinterPagedPaintDevicePrivate(this)),
d_ptr(new QPrinterPrivate(this))
{
- delete d;
- d = new QPrinterPagedPaintDevicePrivate(d_func());
d_ptr->init(printer, mode);
}
@@ -1469,8 +1458,6 @@ void QPrinter::setFullPage(bool fp)
Q_D(QPrinter);
// Set the print engine
d->setProperty(QPrintEngine::PPK_FullPage, fp);
- // Set QPagedPaintDevice layout to match the current print engine value
- devicePageLayout() = pageLayout();
}
diff --git a/src/printsupport/kernel/qprinter_p.h b/src/printsupport/kernel/qprinter_p.h
index 6ced466236..37c9702c17 100644
--- a/src/printsupport/kernel/qprinter_p.h
+++ b/src/printsupport/kernel/qprinter_p.h
@@ -94,6 +94,10 @@ public:
}
+ static QPrinterPrivate *get(QPrinter *printer) {
+ return printer->d_ptr.get();
+ }
+
void init(const QPrinterInfo &printer, QPrinter::PrinterMode mode);
QPrinterInfo findValidPrinter(const QPrinterInfo &printer = QPrinterInfo());
diff --git a/src/sql/configure.json b/src/sql/configure.json
new file mode 100644
index 0000000000..8fdc27e3a2
--- /dev/null
+++ b/src/sql/configure.json
@@ -0,0 +1,22 @@
+{
+ "module": "sql",
+ "depends": [
+ "core"
+ ],
+
+ "features": {
+ "sqlmodel": {
+ "label": "SQL item models",
+ "purpose": "Provides item model classes backed by SQL databases.",
+ "condition": "features.itemmodel",
+ "output": [ "publicFeature" ]
+ }
+ },
+
+ "summary": [
+ {
+ "section": "Qt Sql",
+ "entries": [ "sqlmodel" ]
+ }
+ ]
+}
diff --git a/src/sql/kernel/qtsqlglobal.h b/src/sql/kernel/qtsqlglobal.h
index d421adc84b..ec79e8da1e 100644
--- a/src/sql/kernel/qtsqlglobal.h
+++ b/src/sql/kernel/qtsqlglobal.h
@@ -41,6 +41,7 @@
#define QTSQLGLOBAL_H
#include <QtCore/qglobal.h>
+#include <QtSql/qtsql-config.h>
QT_BEGIN_NAMESPACE
diff --git a/src/sql/kernel/qtsqlglobal_p.h b/src/sql/kernel/qtsqlglobal_p.h
index ab45f6cd38..78a2461257 100644
--- a/src/sql/kernel/qtsqlglobal_p.h
+++ b/src/sql/kernel/qtsqlglobal_p.h
@@ -53,5 +53,6 @@
#include <QtSql/qtsqlglobal.h>
#include <QtCore/private/qglobal_p.h>
+#include <QtSql/private/qtsql-config_p.h>
#endif // QTSQLGLOBAL_P_H
diff --git a/src/sql/models/qsqlquerymodel.h b/src/sql/models/qsqlquerymodel.h
index 869a5f030c..427b369ae2 100644
--- a/src/sql/models/qsqlquerymodel.h
+++ b/src/sql/models/qsqlquerymodel.h
@@ -44,8 +44,9 @@
#include <QtCore/qabstractitemmodel.h>
#include <QtSql/qsqldatabase.h>
-QT_BEGIN_NAMESPACE
+QT_REQUIRE_CONFIG(sqlmodel);
+QT_BEGIN_NAMESPACE
class QSqlQueryModelPrivate;
class QSqlError;
diff --git a/src/sql/models/qsqlquerymodel_p.h b/src/sql/models/qsqlquerymodel_p.h
index ffc34b9f95..76aaf00c88 100644
--- a/src/sql/models/qsqlquerymodel_p.h
+++ b/src/sql/models/qsqlquerymodel_p.h
@@ -60,6 +60,8 @@
#include "QtCore/qvarlengtharray.h"
#include "QtCore/qvector.h"
+QT_REQUIRE_CONFIG(sqlmodel);
+
QT_BEGIN_NAMESPACE
class QSqlQueryModelPrivate: public QAbstractItemModelPrivate
diff --git a/src/sql/models/qsqlrelationaldelegate.h b/src/sql/models/qsqlrelationaldelegate.h
index 53f43a4acb..e8ae5a229d 100644
--- a/src/sql/models/qsqlrelationaldelegate.h
+++ b/src/sql/models/qsqlrelationaldelegate.h
@@ -42,6 +42,8 @@
#include <QtSql/qtsqlglobal.h>
+QT_REQUIRE_CONFIG(sqlmodel);
+
#ifdef QT_WIDGETS_LIB
#include <QtWidgets/qitemdelegate.h>
@@ -53,7 +55,7 @@
#endif
#include <QtSql/qsqldriver.h>
#include <QtSql/qsqlrelationaltablemodel.h>
-
+#include <QtCore/qmetaobject.h>
QT_BEGIN_NAMESPACE
@@ -97,6 +99,27 @@ QWidget *createEditor(QWidget *aParent,
return combo;
}
+ void setEditorData(QWidget *editor, const QModelIndex &index) const override
+ {
+ if (!index.isValid())
+ return;
+
+ if (qobject_cast<QComboBox *>(editor)) {
+ // Taken from QItemDelegate::setEditorData() as we need
+ // to present the DisplayRole and not the EditRole which
+ // is the id reference to the related model
+ QVariant v = index.data(Qt::DisplayRole);
+ QByteArray n = editor->metaObject()->userProperty().name();
+ if (!n.isEmpty()) {
+ if (!v.isValid())
+ v = QVariant(editor->property(n).userType(), nullptr);
+ editor->setProperty(n, v);
+ return;
+ }
+ }
+ QItemDelegate::setEditorData(editor, index);
+ }
+
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
{
if (!index.isValid())
diff --git a/src/sql/models/qsqlrelationaltablemodel.h b/src/sql/models/qsqlrelationaltablemodel.h
index 90b7a6481f..555755009c 100644
--- a/src/sql/models/qsqlrelationaltablemodel.h
+++ b/src/sql/models/qsqlrelationaltablemodel.h
@@ -45,6 +45,8 @@
#include <QtCore/qtypeinfo.h>
+QT_REQUIRE_CONFIG(sqlmodel);
+
QT_BEGIN_NAMESPACE
diff --git a/src/sql/models/qsqltablemodel.h b/src/sql/models/qsqltablemodel.h
index 77b0517c74..7acc7dc94d 100644
--- a/src/sql/models/qsqltablemodel.h
+++ b/src/sql/models/qsqltablemodel.h
@@ -44,6 +44,8 @@
#include <QtSql/qsqldatabase.h>
#include <QtSql/qsqlquerymodel.h>
+QT_REQUIRE_CONFIG(sqlmodel);
+
QT_BEGIN_NAMESPACE
diff --git a/src/sql/models/qsqltablemodel_p.h b/src/sql/models/qsqltablemodel_p.h
index 490bb48a24..faa1b30803 100644
--- a/src/sql/models/qsqltablemodel_p.h
+++ b/src/sql/models/qsqltablemodel_p.h
@@ -56,6 +56,8 @@
#include "QtSql/qsqlindex.h"
#include "QtCore/qmap.h"
+QT_REQUIRE_CONFIG(sqlmodel);
+
QT_BEGIN_NAMESPACE
class Q_AUTOTEST_EXPORT QSqlTableModelPrivate: public QSqlQueryModelPrivate
diff --git a/src/sql/sql.pro b/src/sql/sql.pro
index 821ae1c9b9..1cd2a05250 100644
--- a/src/sql/sql.pro
+++ b/src/sql/sql.pro
@@ -11,7 +11,7 @@ PRECOMPILED_HEADER = ../corelib/global/qt_pch.h
SQL_P = sql
include(kernel/kernel.pri)
-include(models/models.pri)
+qtConfig(sqlmodel): include(models/models.pri)
MODULE_PLUGIN_TYPES = \
sqldrivers
diff --git a/src/testlib/doc/snippets/code/doc_src_qtestlib.cpp b/src/testlib/doc/snippets/code/doc_src_qtestlib.cpp
index 0dc45bef76..de301b8df9 100644
--- a/src/testlib/doc/snippets/code/doc_src_qtestlib.cpp
+++ b/src/testlib/doc/snippets/code/doc_src_qtestlib.cpp
@@ -48,19 +48,41 @@
**
****************************************************************************/
+#include <QtTest>
+
//! [0]
class MyFirstTest: public QObject
{
Q_OBJECT
+
+private:
+ bool myCondition()
+ {
+ return true;
+ }
+
private slots:
void initTestCase()
- { qDebug("called before everything else"); }
+ {
+ qDebug("Called before everything else.");
+ }
+
void myFirstTest()
- { QVERIFY(1 == 1); }
+ {
+ QVERIFY(true); // check that a condition is satisfied
+ QCOMPARE(1, 1); // compare two values
+ }
+
void mySecondTest()
- { QVERIFY(1 != 2); }
+ {
+ QVERIFY(myCondition());
+ QVERIFY(1 != 2);
+ }
+
void cleanupTestCase()
- { qDebug("called after myFirstTest and mySecondTest"); }
+ {
+ qDebug("Called after myFirstTest and mySecondTest.");
+ }
};
//! [0]
diff --git a/src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp b/src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp
index 990b7a38d7..202f87af52 100644
--- a/src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp
+++ b/src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp
@@ -177,13 +177,6 @@ namespace MyNamespace {
}
//! [toString-overload]
-//! [17]
-int i = 0;
-while (myNetworkServerNotResponding() && i++ < 50)
- QTest::qWait(250);
-//! [17]
-
-
//! [18]
MyTestObject test1;
QTest::qExec(&test1);
@@ -245,11 +238,6 @@ void MyTestClass::cleanup()
QTest::qSleep(250);
//! [23]
-//! [24]
-QWidget widget;
-widget.show();
-QTest::qWaitForWindowShown(&widget);
-//! [24]
//! [25]
QTouchDevice *dev = QTest::createTouchDevice();
@@ -306,13 +294,5 @@ QTest::keyClick(myWindow, Qt::Key_Escape);
QTest::keyClick(myWindow, Qt::Key_Escape, Qt::ShiftModifier, 200);
//! [29]
-//! [30]
-MyObject obj;
-obj.startup();
-QTest::qWaitFor([&]() {
- return obj.isReady();
-}, 3000);
-//! [30]
-
}
diff --git a/src/testlib/doc/src/qttestlib-manual.qdoc b/src/testlib/doc/src/qttestlib-manual.qdoc
index 9bd210d71f..9c6bdf60a4 100644
--- a/src/testlib/doc/src/qttestlib-manual.qdoc
+++ b/src/testlib/doc/src/qttestlib-manual.qdoc
@@ -69,8 +69,8 @@
\li Qt Test supports benchmarking and provides several measurement back-ends.
\row
\li \b {IDE friendly}
- \li Qt Test outputs messages that can be interpreted by Visual
- Studio and KDevelop.
+ \li Qt Test outputs messages that can be interpreted by Qt Creator, Visual
+ Studio, and KDevelop.
\row
\li \b Thread-safety
\li The error reporting is thread safe and atomic.
@@ -175,7 +175,7 @@
\list
\li \c -o \e{filename,format} \br
Writes output to the specified file, in the specified format (one of
- \c txt, \c xml, \c lightxml or \c xunitxml). The special filename \c -
+ \c txt, \c xml, \c lightxml, \c xunitxml or \c tap). The special filename \c -
may be used to log to standard output.
\li \c -o \e filename \br
Writes output to the specified file.
@@ -192,6 +192,8 @@
benchmarks, since it suppresses normal pass/fail messages.
\li \c -teamcity \br
Outputs results in TeamCity format.
+ \li \c -tap \br
+ Outputs results in Test Anything Protocol (TAP) format.
\endlist
The first version of the \c -o option may be repeated in order to log
@@ -199,8 +201,8 @@
option can log test results to standard output.
If the first version of the \c -o option is used, neither the second version
- of the \c -o option nor the \c -txt, \c -xml, \c -lightxml, \c -teamcity
- or \c -xunitxml options should be used.
+ of the \c -o option nor the \c -txt, \c -xml, \c -lightxml, \c -teamcity,
+ \c -xunitxml or \c -tap options should be used.
If neither version of the \c -o option is used, test results will be logged to
standard output. If no format option is used, test results will be logged in
diff --git a/src/testlib/qabstracttestlogger.cpp b/src/testlib/qabstracttestlogger.cpp
index 63c165b9dc..2b54cd410b 100644
--- a/src/testlib/qabstracttestlogger.cpp
+++ b/src/testlib/qabstracttestlogger.cpp
@@ -39,6 +39,7 @@
#include <QtTest/private/qabstracttestlogger_p.h>
#include <QtTest/qtestassert.h>
+#include <qtestresult_p.h>
#include <QtCore/qbytearray.h>
#include <QtCore/qstring.h>
@@ -189,4 +190,26 @@ int qt_asprintf(QTestCharBuffer *str, const char *format, ...)
}
+namespace QTestPrivate
+{
+
+void generateTestIdentifier(QTestCharBuffer *identifier, int parts)
+{
+ const char *testObject = parts & TestObject ? QTestResult::currentTestObjectName() : "";
+ const char *testFunction = parts & TestFunction ? (QTestResult::currentTestFunction() ? QTestResult::currentTestFunction() : "UnknownTestFunc") : "";
+ const char *objectFunctionFiller = parts & TestObject && parts & (TestFunction | TestDataTag) ? "::" : "";
+ const char *testFuctionStart = parts & TestFunction ? "(" : "";
+ const char *testFuctionEnd = parts & TestFunction ? ")" : "";
+
+ const char *dataTag = (parts & TestDataTag) && QTestResult::currentDataTag() ? QTestResult::currentDataTag() : "";
+ const char *globalDataTag = (parts & TestDataTag) && QTestResult::currentGlobalDataTag() ? QTestResult::currentGlobalDataTag() : "";
+ const char *tagFiller = (dataTag[0] && globalDataTag[0]) ? ":" : "";
+
+ QTest::qt_asprintf(identifier, "%s%s%s%s%s%s%s%s",
+ testObject, objectFunctionFiller, testFunction, testFuctionStart,
+ globalDataTag, tagFiller, dataTag, testFuctionEnd);
+}
+
+}
+
QT_END_NAMESPACE
diff --git a/src/testlib/qabstracttestlogger_p.h b/src/testlib/qabstracttestlogger_p.h
index c4083b43f4..018361b81e 100644
--- a/src/testlib/qabstracttestlogger_p.h
+++ b/src/testlib/qabstracttestlogger_p.h
@@ -58,6 +58,7 @@
QT_BEGIN_NAMESPACE
class QBenchmarkResult;
+class QTestData;
class QAbstractTestLogger
{
@@ -91,6 +92,8 @@ public:
virtual void enterTestFunction(const char *function) = 0;
virtual void leaveTestFunction() = 0;
+ virtual void enterTestData(QTestData *) {}
+
virtual void addIncident(IncidentTypes type, const char *description,
const char *file = 0, int line = 0) = 0;
virtual void addBenchmarkResult(const QBenchmarkResult &result) = 0;
@@ -175,6 +178,11 @@ namespace QTest
int qt_asprintf(QTestCharBuffer *buf, const char *format, ...);
}
+namespace QTestPrivate
+{
+ enum IdentifierPart { TestObject = 0x1, TestFunction = 0x2, TestDataTag = 0x4, AllParts = 0xFFFF };
+ void generateTestIdentifier(QTestCharBuffer *identifier, int parts = AllParts);
+}
QT_END_NAMESPACE
diff --git a/src/testlib/qappletestlogger.cpp b/src/testlib/qappletestlogger.cpp
new file mode 100644
index 0000000000..e970f008d2
--- /dev/null
+++ b/src/testlib/qappletestlogger.cpp
@@ -0,0 +1,157 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtTest 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qappletestlogger_p.h"
+
+#include <QPair>
+
+QT_BEGIN_NAMESPACE
+
+#if defined(QT_USE_APPLE_UNIFIED_LOGGING)
+
+using namespace QTestPrivate;
+
+bool QAppleTestLogger::debugLoggingEnabled()
+{
+ // Debug-level messages are only captured in memory when debug logging is
+ // enabled through a configuration change, which can happen automatically
+ // when running inside Xcode, or with the Console application open.
+ if (__builtin_available(macOS 10.12, iOS 10, tvOS 10, watchOS 3, *))
+ return os_log_type_enabled(OS_LOG_DEFAULT, OS_LOG_TYPE_DEBUG);
+
+ return false;
+}
+
+QAppleTestLogger::QAppleTestLogger(QAbstractTestLogger *logger)
+ : QAbstractTestLogger(nullptr)
+ , m_logger(logger)
+{
+}
+
+static QAppleLogActivity testFunctionActivity;
+
+void QAppleTestLogger::enterTestFunction(const char *function)
+{
+ // Re-create activity each time
+ testFunctionActivity = QT_APPLE_LOG_ACTIVITY("Running test function").enter();
+
+ if (__builtin_available(macOS 10.12, iOS 10, tvOS 10, watchOS 3, *)) {
+ QTestCharBuffer testIdentifier;
+ QTestPrivate::generateTestIdentifier(&testIdentifier);
+ QString identifier = QString::fromLatin1(testIdentifier.data());
+ QMessageLogContext context(nullptr, 0, nullptr, "qt.test.enter");
+ QString message = identifier;
+ if (AppleUnifiedLogger::messageHandler(QtDebugMsg, context, message, identifier))
+ return; // AUL already printed to stderr
+ }
+
+ m_logger->enterTestFunction(function);
+}
+
+void QAppleTestLogger::leaveTestFunction()
+{
+ m_logger->leaveTestFunction();
+ testFunctionActivity.leave();
+}
+
+typedef QPair<QtMsgType, const char *> IncidentClassification;
+static IncidentClassification incidentTypeToClassification(QAbstractTestLogger::IncidentTypes type)
+{
+ switch (type) {
+ case QAbstractTestLogger::Pass:
+ return IncidentClassification(QtInfoMsg, "pass");
+ case QAbstractTestLogger::XFail:
+ return IncidentClassification(QtInfoMsg, "xfail");
+ case QAbstractTestLogger::Fail:
+ return IncidentClassification(QtCriticalMsg, "fail");
+ case QAbstractTestLogger::XPass:
+ return IncidentClassification(QtInfoMsg, "xpass");
+ case QAbstractTestLogger::BlacklistedPass:
+ return IncidentClassification(QtWarningMsg, "bpass");
+ case QAbstractTestLogger::BlacklistedFail:
+ return IncidentClassification(QtInfoMsg, "bfail");
+ }
+ return IncidentClassification(QtFatalMsg, nullptr);
+}
+
+void QAppleTestLogger::addIncident(IncidentTypes type, const char *description,
+ const char *file, int line)
+{
+ if (__builtin_available(macOS 10.12, iOS 10, tvOS 10, watchOS 3, *)) {
+ IncidentClassification incidentClassification = incidentTypeToClassification(type);
+
+ QTestCharBuffer category;
+ QTest::qt_asprintf(&category, "qt.test.%s", incidentClassification.second);
+ QMessageLogContext context(file, line, /* function = */ nullptr, category.data());
+
+ QTestCharBuffer subsystemBuffer;
+ // It would be nice to have the data tag as part of the subsystem too, but that
+ // will for some tests results in hundreds of thousands of log objects being
+ // created, so we limit the subsystem to test functions, which we can hope
+ // are reasonably limited.
+ generateTestIdentifier(&subsystemBuffer, TestObject | TestFunction);
+ QString subsystem = QString::fromLatin1(subsystemBuffer.data());
+
+ // We still want the full identifier as part of the message though
+ QTestCharBuffer testIdentifier;
+ generateTestIdentifier(&testIdentifier);
+ QString message = QString::fromLatin1(testIdentifier.data());
+ if (qstrlen(description))
+ message += QLatin1Char('\n') % QString::fromLatin1(description);
+
+ if (AppleUnifiedLogger::messageHandler(incidentClassification.first, context, message, subsystem))
+ return; // AUL already printed to stderr
+ }
+
+ m_logger->addIncident(type, description, file, line);
+}
+
+void QAppleTestLogger::addMessage(QtMsgType type, const QMessageLogContext &context, const QString &message)
+{
+ if (__builtin_available(macOS 10.12, iOS 10, tvOS 10, watchOS 3, *)) {
+ if (AppleUnifiedLogger::messageHandler(type, context, message))
+ return; // AUL already printed to stderr
+ }
+
+ m_logger->addMessage(type, context, message);
+}
+
+#endif // QT_USE_APPLE_UNIFIED_LOGGING
+
+QT_END_NAMESPACE
diff --git a/src/testlib/qappletestlogger_p.h b/src/testlib/qappletestlogger_p.h
new file mode 100644
index 0000000000..5a45fad7a0
--- /dev/null
+++ b/src/testlib/qappletestlogger_p.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtTest 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QAPPLETESTLOGGER_P_H
+#define QAPPLETESTLOGGER_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtTest/private/qabstracttestlogger_p.h>
+
+#include <QtCore/private/qcore_mac_p.h>
+
+QT_BEGIN_NAMESPACE
+
+#if defined(QT_USE_APPLE_UNIFIED_LOGGING)
+class QAppleTestLogger : public QAbstractTestLogger
+{
+public:
+ static bool debugLoggingEnabled();
+
+ QAppleTestLogger(QAbstractTestLogger *logger);
+
+ void startLogging() override
+ { m_logger->startLogging(); }
+ void stopLogging() override
+ { m_logger->stopLogging(); }
+
+ void enterTestFunction(const char *function) override;
+ void leaveTestFunction() override;
+
+ void addIncident(IncidentTypes type, const char *description,
+ const char *file = 0, int line = 0) override;
+ void addMessage(QtMsgType, const QMessageLogContext &,
+ const QString &) override;
+
+ void addBenchmarkResult(const QBenchmarkResult &result) override
+ { m_logger->addBenchmarkResult(result); }
+
+ void addMessage(MessageTypes type, const QString &message,
+ const char *file = 0, int line = 0) override
+ { m_logger->addMessage(type, message, file, line); }
+
+private:
+ QScopedPointer<QAbstractTestLogger> m_logger;
+};
+#endif
+
+QT_END_NAMESPACE
+
+#endif // QAPPLETESTLOGGER_P_H
diff --git a/src/testlib/qplaintestlogger.cpp b/src/testlib/qplaintestlogger.cpp
index e5226b7820..853515f2d9 100644
--- a/src/testlib/qplaintestlogger.cpp
+++ b/src/testlib/qplaintestlogger.cpp
@@ -221,18 +221,6 @@ void QPlainTestLogger::outputMessage(const char *str)
outputString(str);
}
-static void testIdentifier(QTestCharBuffer *identifier)
-{
- const char *testObject = QTestResult::currentTestObjectName();
- const char *testFunction = QTestResult::currentTestFunction() ? QTestResult::currentTestFunction() : "UnknownTestFunc";
-
- const char *dataTag = QTestResult::currentDataTag() ? QTestResult::currentDataTag() : "";
- const char *globalDataTag = QTestResult::currentGlobalDataTag() ? QTestResult::currentGlobalDataTag() : "";
- const char *tagFiller = (dataTag[0] && globalDataTag[0]) ? ":" : "";
-
- QTest::qt_asprintf(identifier, "%s::%s(%s%s%s)", testObject, testFunction, globalDataTag, tagFiller, dataTag);
-}
-
void QPlainTestLogger::printMessage(const char *type, const char *msg, const char *file, int line)
{
QTEST_ASSERT(type);
@@ -251,10 +239,10 @@ void QPlainTestLogger::printMessage(const char *type, const char *msg, const cha
}
const char *msgFiller = msg[0] ? " " : "";
- QTestCharBuffer testIdent;
- testIdentifier(&testIdent);
+ QTestCharBuffer testIdentifier;
+ QTestPrivate::generateTestIdentifier(&testIdentifier);
QTest::qt_asprintf(&messagePrefix, "%s: %s%s%s%s\n",
- type, testIdent.data(), msgFiller, msg, failureLocation.data());
+ type, testIdentifier.data(), msgFiller, msg, failureLocation.data());
// In colored mode, printf above stripped our nonprintable control characters.
// Put them back.
diff --git a/src/testlib/qsignalspy.h b/src/testlib/qsignalspy.h
index 824dc6aaed..218a26ec5c 100644
--- a/src/testlib/qsignalspy.h
+++ b/src/testlib/qsignalspy.h
@@ -59,11 +59,7 @@ public:
explicit QSignalSpy(const QObject *obj, const char *aSignal)
: m_waiting(false)
{
-#ifdef Q_CC_BOR
- const int memberOffset = QObject::staticMetaObject.methodCount();
-#else
static const int memberOffset = QObject::staticMetaObject.methodCount();
-#endif
if (!obj) {
qWarning("QSignalSpy: Cannot spy on a null object");
return;
@@ -104,11 +100,7 @@ public:
QSignalSpy(const typename QtPrivate::FunctionPointer<Func>::Object *obj, Func signal0)
: m_waiting(false)
{
-#ifdef Q_CC_BOR
- const int memberOffset = QObject::staticMetaObject.methodCount();
-#else
static const int memberOffset = QObject::staticMetaObject.methodCount();
-#endif
if (!obj) {
qWarning("QSignalSpy: Cannot spy on a null object");
return;
diff --git a/src/testlib/qtaptestlogger.cpp b/src/testlib/qtaptestlogger.cpp
new file mode 100644
index 0000000000..37ab89ac91
--- /dev/null
+++ b/src/testlib/qtaptestlogger.cpp
@@ -0,0 +1,254 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtTest 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qtaptestlogger_p.h"
+
+#include "qtestlog_p.h"
+#include "qtestresult_p.h"
+#include "qtestassert.h"
+
+#include <QtCore/qregularexpression.h>
+
+QT_BEGIN_NAMESPACE
+
+QTapTestLogger::QTapTestLogger(const char *filename)
+ : QAbstractTestLogger(filename)
+ , m_wasExpectedFail(false)
+{
+}
+
+QTapTestLogger::~QTapTestLogger()
+{
+}
+
+void QTapTestLogger::startLogging()
+{
+ QAbstractTestLogger::startLogging();
+
+ QTestCharBuffer preamble;
+ QTest::qt_asprintf(&preamble, "TAP version 13\n"
+ // By convention, test suite names are output as diagnostics lines
+ // This is a pretty poor convention, as consumers will then treat
+ // actual diagnostics, e.g. qDebug, as test suite names o_O
+ "# %s\n", QTestResult::currentTestObjectName());
+ outputString(preamble.data());
+}
+
+void QTapTestLogger::stopLogging()
+{
+ const int total = QTestLog::totalCount();
+
+ QTestCharBuffer testPlanAndStats;
+ QTest::qt_asprintf(&testPlanAndStats,
+ "1..%d\n"
+ "# tests %d\n"
+ "# pass %d\n"
+ "# fail %d\n",
+ total, total, QTestLog::passCount(), QTestLog::failCount());
+ outputString(testPlanAndStats.data());
+
+ QAbstractTestLogger::stopLogging();
+}
+
+void QTapTestLogger::enterTestFunction(const char *function)
+{
+ Q_UNUSED(function);
+ m_wasExpectedFail = false;
+}
+
+void QTapTestLogger::enterTestData(QTestData *data)
+{
+ Q_UNUSED(data);
+ m_wasExpectedFail = false;
+}
+
+using namespace QTestPrivate;
+
+void QTapTestLogger::outputTestLine(bool ok, int testNumber, QTestCharBuffer &directive)
+{
+ QTestCharBuffer testIdentifier;
+ QTestPrivate::generateTestIdentifier(&testIdentifier, TestFunction | TestDataTag);
+
+ QTestCharBuffer testLine;
+ QTest::qt_asprintf(&testLine, "%s %d - %s%s\n",
+ ok ? "ok" : "not ok", testNumber, testIdentifier.data(), directive.data());
+
+ outputString(testLine.data());
+}
+
+void QTapTestLogger::addIncident(IncidentTypes type, const char *description,
+ const char *file, int line)
+{
+ if (m_wasExpectedFail && type == Pass) {
+ // XFail comes with a corresponding Pass incident, but we only want
+ // to emit a single test point for it, so skip the this pass.
+ return;
+ }
+
+ bool ok = type == Pass || type == XPass || type == BlacklistedPass;
+
+ QTestCharBuffer directive;
+ if (type == XFail || type == XPass || type == BlacklistedFail || type == BlacklistedPass)
+ // We treat expected or blacklisted failures/passes as TODO-failures/passes,
+ // which should be treated as soft issues by consumers. Not all do though :/
+ QTest::qt_asprintf(&directive, " # TODO %s", description);
+
+ int testNumber = QTestLog::totalCount();
+ if (type == XFail) {
+ // The global test counter hasn't been updated yet for XFail
+ testNumber += 1;
+ }
+
+ outputTestLine(ok, testNumber, directive);
+
+ if (!ok) {
+ // All failures need a diagnostics sections to not confuse consumers
+
+ // The indent needs to be two spaces for maximum compatibility
+ #define YAML_INDENT " "
+
+ outputString(YAML_INDENT "---\n");
+
+ if (type != XFail) {
+ // This is fragile, but unfortunately testlib doesn't plumb
+ // the expected and actual values to the loggers (yet).
+ static QRegularExpression verifyRegex(
+ QLatin1Literal("^'(?<actualexpression>.*)' returned (?<actual>\\w+).+\\((?<message>.*)\\)$"));
+
+ static QRegularExpression comparRegex(
+ QLatin1Literal("^(?<message>.*)\n"
+ "\\s*Actual\\s+\\((?<actualexpression>.*)\\)\\s*: (?<actual>.*)\n"
+ "\\s*Expected\\s+\\((?<expectedexpresssion>.*)\\)\\s*: (?<expected>.*)$"));
+
+ QString descriptionString = QString::fromUtf8(description);
+ QRegularExpressionMatch match = verifyRegex.match(descriptionString);
+ if (!match.hasMatch())
+ match = comparRegex.match(descriptionString);
+
+ if (match.hasMatch()) {
+ bool isVerify = match.regularExpression() == verifyRegex;
+ QString message = match.captured(QLatin1Literal("message"));
+ QString expected;
+ QString actual;
+
+ if (isVerify) {
+ QString expression = QLatin1Literal(" (")
+ % match.captured(QLatin1Literal("actualexpression")) % QLatin1Char(')') ;
+ actual = match.captured(QLatin1Literal("actual")).toLower() % expression;
+ expected = (actual.startsWith(QLatin1Literal("true")) ? QLatin1Literal("false") : QLatin1Literal("true")) % expression;
+ if (message.isEmpty())
+ message = QLatin1Literal("Verification failed");
+ } else {
+ expected = match.captured(QLatin1Literal("expected"))
+ % QLatin1Literal(" (") % match.captured(QLatin1Literal("expectedexpresssion")) % QLatin1Char(')');
+ actual = match.captured(QLatin1Literal("actual"))
+ % QLatin1Literal(" (") % match.captured(QLatin1Literal("actualexpression")) % QLatin1Char(')');
+ }
+
+ QTestCharBuffer diagnosticsYamlish;
+ QTest::qt_asprintf(&diagnosticsYamlish,
+ YAML_INDENT "type: %s\n"
+ YAML_INDENT "message: %s\n"
+
+ // Some consumers understand 'wanted/found', while others need
+ // 'expected/actual', so we do both for maximum compatibility.
+ YAML_INDENT "wanted: %s\n"
+ YAML_INDENT "found: %s\n"
+ YAML_INDENT "expected: %s\n"
+ YAML_INDENT "actual: %s\n",
+
+ isVerify ? "QVERIFY" : "QCOMPARE",
+ qPrintable(message),
+ qPrintable(expected), qPrintable(actual),
+ qPrintable(expected), qPrintable(actual)
+ );
+
+ outputString(diagnosticsYamlish.data());
+ } else {
+ QTestCharBuffer unparsableDescription;
+ QTest::qt_asprintf(&unparsableDescription,
+ YAML_INDENT "# %s\n", description);
+ outputString(unparsableDescription.data());
+ }
+ }
+
+ if (file) {
+ QTestCharBuffer location;
+ QTest::qt_asprintf(&location,
+ // The generic 'at' key is understood by most consumers.
+ YAML_INDENT "at: %s::%s() (%s:%d)\n"
+
+ // The file and line keys are for consumers that are able
+ // to read more granular location info.
+ YAML_INDENT "file: %s\n"
+ YAML_INDENT "line: %d\n",
+
+ QTestResult::currentTestObjectName(),
+ QTestResult::currentTestFunction(),
+ file, line, file, line
+ );
+ outputString(location.data());
+ }
+
+ outputString(YAML_INDENT "...\n");
+ }
+
+ m_wasExpectedFail = type == XFail;
+}
+
+void QTapTestLogger::addMessage(MessageTypes type, const QString &message,
+ const char *file, int line)
+{
+ Q_UNUSED(file);
+ Q_UNUSED(line);
+
+ if (type == Skip) {
+ QTestCharBuffer directive;
+ QTest::qt_asprintf(&directive, " # SKIP %s", message.toUtf8().constData());
+ outputTestLine(/* ok = */ true, QTestLog::totalCount(), directive);
+ return;
+ }
+
+ QTestCharBuffer diagnostics;
+ QTest::qt_asprintf(&diagnostics, "# %s\n", qPrintable(message));
+ outputString(diagnostics.data());
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/testlib/qtaptestlogger_p.h b/src/testlib/qtaptestlogger_p.h
new file mode 100644
index 0000000000..b51343e4fe
--- /dev/null
+++ b/src/testlib/qtaptestlogger_p.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtTest 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QTAPTESTLOGGER_P_H
+#define QTAPTESTLOGGER_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtTest/private/qabstracttestlogger_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QTapTestLogger : public QAbstractTestLogger
+{
+public:
+ QTapTestLogger(const char *filename);
+ ~QTapTestLogger();
+
+ void startLogging() override;
+ void stopLogging() override;
+
+ void enterTestFunction(const char *) override;
+ void leaveTestFunction() override {}
+
+ void enterTestData(QTestData *data) override;
+
+ void addIncident(IncidentTypes type, const char *description,
+ const char *file = 0, int line = 0) override;
+ void addMessage(MessageTypes type, const QString &message,
+ const char *file = 0, int line = 0) override;
+
+ void addBenchmarkResult(const QBenchmarkResult &) override {};
+private:
+ void outputTestLine(bool ok, int testNumber, QTestCharBuffer &directive);
+ bool m_wasExpectedFail;
+};
+
+QT_END_NAMESPACE
+
+#endif // QTAPTESTLOGGER_P_H
diff --git a/src/testlib/qtest.h b/src/testlib/qtest.h
index 1cb6a91d33..927b68bd27 100644
--- a/src/testlib/qtest.h
+++ b/src/testlib/qtest.h
@@ -59,6 +59,8 @@
#include <QtCore/qsize.h>
#include <QtCore/qrect.h>
+#include <memory>
+
QT_BEGIN_NAMESPACE
@@ -215,6 +217,25 @@ inline char *toString(const std::pair<T1, T2> &pair)
return toString(QString::asprintf("std::pair(%s,%s)", first.data(), second.data()));
}
+template <typename Tuple, int... I>
+inline char *toString(const Tuple & tuple, QtPrivate::IndexesList<I...>) {
+ using UP = std::unique_ptr<char[]>;
+ // Generate a table of N + 1 elements where N is the number of
+ // elements in the tuple.
+ // The last element is needed to support the empty tuple use case.
+ const UP data[] = {
+ UP(toString(std::get<I>(tuple)))..., UP{}
+ };
+ return formatString("std::tuple(", ")", sizeof...(I), data[I].get()...);
+}
+
+template <class... Types>
+inline char *toString(const std::tuple<Types...> &tuple)
+{
+ static const std::size_t params_count = sizeof...(Types);
+ return toString(tuple, typename QtPrivate::Indexes<params_count>::Value());
+}
+
inline char *toString(std::nullptr_t)
{
return toString(QLatin1String("nullptr"));
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index f5668c274e..c1b4577157 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -60,6 +60,8 @@
#include <QtCore/qwaitcondition.h>
#include <QtCore/qmutex.h>
+#include <QtCore/qtestsupport_core.h>
+
#include <QtTest/private/qtestlog_p.h>
#include <QtTest/private/qtesttable_p.h>
#include <QtTest/qtestdata.h>
@@ -526,6 +528,7 @@ Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, char *argv[], bool qml)
" xml : XML document\n"
" lightxml : A stream of XML tags\n"
" teamcity : TeamCity format\n"
+ " tap : Test Anything Protocol\n"
"\n"
" *** Multiple loggers can be specified, but at most one can log to stdout.\n"
"\n"
@@ -537,6 +540,7 @@ Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, char *argv[], bool qml)
" -xml : Output results as XML document\n"
" -lightxml : Output results as stream of XML tags\n"
" -teamcity : Output results in TeamCity format\n"
+ " -tap : Output results in Test Anything Protocol format\n"
"\n"
" *** If no output file is specified, stdout is assumed.\n"
" *** If no output format is specified, -txt is assumed.\n"
@@ -624,6 +628,8 @@ Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, char *argv[], bool qml)
logFormat = QTestLog::LightXML;
} else if (strcmp(argv[i], "-teamcity") == 0) {
logFormat = QTestLog::TeamCity;
+ } else if (strcmp(argv[i], "-tap") == 0) {
+ logFormat = QTestLog::TAP;
} else if (strcmp(argv[i], "-silent") == 0) {
QTestLog::setVerboseLevel(-1);
} else if (strcmp(argv[i], "-v1") == 0) {
@@ -658,8 +664,10 @@ Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, char *argv[], bool qml)
logFormat = QTestLog::XunitXML;
else if (strcmp(format, "teamcity") == 0)
logFormat = QTestLog::TeamCity;
+ else if (strcmp(format, "tap") == 0)
+ logFormat = QTestLog::TAP;
else {
- fprintf(stderr, "output format must be one of txt, csv, lightxml, xml, teamcity or xunitxml\n");
+ fprintf(stderr, "output format must be one of txt, csv, lightxml, xml, tap, teamcity or xunitxml\n");
exit(1);
}
if (strcmp(filename, "-") == 0 && QTestLog::loggerUsingStdout()) {
@@ -1141,6 +1149,31 @@ void *fetchData(QTestData *data, const char *tagName, int typeId)
}
/*!
+ * \internal
+ */
+char *formatString(const char *prefix, const char *suffix, size_t numArguments, ...)
+{
+ va_list ap;
+ va_start(ap, numArguments);
+
+ QByteArray arguments;
+ arguments += prefix;
+
+ if (numArguments > 0) {
+ arguments += va_arg(ap, const char *);
+
+ for (size_t i = 1; i < numArguments; ++i) {
+ arguments += ", ";
+ arguments += va_arg(ap, const char *);
+ }
+ }
+
+ va_end(ap);
+ arguments += suffix;
+ return qstrdup(arguments.constData());
+}
+
+/*!
\fn char* QTest::toHexRepresentation(const char *ba, int length)
Returns a pointer to a string that is the string \a ba represented
@@ -2380,16 +2413,9 @@ bool QTest::currentTestFailed()
*/
void QTest::qSleep(int ms)
{
+ // ### Qt 6, move to QtCore or remove altogether
QTEST_ASSERT(ms > 0);
-
-#if defined(Q_OS_WINRT)
- WaitForSingleObjectEx(GetCurrentThread(), ms, true);
-#elif defined(Q_OS_WIN)
- Sleep(uint(ms));
-#else
- struct timespec ts = { time_t(ms / 1000), (ms % 1000) * 1000 * 1000 };
- nanosleep(&ts, NULL);
-#endif
+ QTestPrivate::qSleep(ms);
}
/*! \internal
diff --git a/src/testlib/qtestcase.h b/src/testlib/qtestcase.h
index 54669c11de..f6891dc941 100644
--- a/src/testlib/qtestcase.h
+++ b/src/testlib/qtestcase.h
@@ -253,6 +253,22 @@ namespace QTest
return nullptr;
}
+ template<typename F> // Output QFlags of registered enumerations
+ inline typename std::enable_if<QtPrivate::IsQEnumHelper<F>::Value, char*>::type toString(QFlags<F> f)
+ {
+ const QMetaEnum me = QMetaEnum::fromType<F>();
+ return qstrdup(me.valueToKeys(int(f)).constData());
+ }
+
+ template <typename F> // Fallback: Output hex value
+ inline typename std::enable_if<!QtPrivate::IsQEnumHelper<F>::Value, char*>::type toString(QFlags<F> f)
+ {
+ const size_t space = 3 + 2 * sizeof(unsigned); // 2 for 0x, two hex digits per byte, 1 for '\0'
+ char *msg = new char[space];
+ qsnprintf(msg, space, "0x%x", unsigned(f));
+ return msg;
+ }
+
} // namespace Internal
template<typename T>
@@ -267,6 +283,9 @@ namespace QTest
template <typename T1, typename T2>
inline char *toString(const std::pair<T1, T2> &pair);
+ template <class... Types>
+ inline char *toString(const std::tuple<Types...> &tuple);
+
Q_TESTLIB_EXPORT char *toHexRepresentation(const char *ba, int length);
Q_TESTLIB_EXPORT char *toPrettyCString(const char *unicode, int length);
Q_TESTLIB_EXPORT char *toPrettyUnicode(QStringView string);
@@ -372,6 +391,8 @@ namespace QTest
Q_TESTLIB_EXPORT bool compare_string_helper(const char *t1, const char *t2, const char *actual,
const char *expected, const char *file, int line);
+ Q_TESTLIB_EXPORT char *formatString(const char *prefix, const char *suffix, size_t numArguments, ...);
+
#ifndef Q_QDOC
QTEST_COMPARE_DECL(short)
QTEST_COMPARE_DECL(ushort)
diff --git a/src/testlib/qtestcase.qdoc b/src/testlib/qtestcase.qdoc
index 9a3c770e31..ad9776f7ec 100644
--- a/src/testlib/qtestcase.qdoc
+++ b/src/testlib/qtestcase.qdoc
@@ -1112,105 +1112,6 @@
Returns a textual representation of size policy \a sp.
*/
-/*! \fn void QTest::qWait(int ms)
-
- Waits for \a ms milliseconds. While waiting, events will be processed and
- your test will stay responsive to user interface events or network communication.
-
- Example:
- \snippet code/src_qtestlib_qtestcase.cpp 17
-
- The code above will wait until the network server is responding for a
- maximum of about 12.5 seconds.
-
- \sa QTest::qSleep(), QSignalSpy::wait()
-*/
-
-/*! \fn template <typename Functor> bool QTest::qWaitFor(Functor predicate, int timeout)
-
- Waits for \a timeout milliseconds or until the \a predicate returns true.
-
- Returns \c true if the \a predicate returned true at any point, otherwise returns \c false.
-
- Example:
- \snippet code/src_qtestlib_qtestcase.cpp 30
-
- The code above will wait for the object to become ready, for a
- maximum of three seconds.
-
- \since 5.10
-*/
-
-/*! \fn bool QTest::qWaitForWindowExposed(QWindow *window, int timeout)
- \since 5.0
-
- Waits for \a timeout milliseconds or until the \a window is exposed.
- Returns \c true if \c window is exposed within \a timeout milliseconds, otherwise returns \c false.
-
- This is mainly useful for asynchronous systems like X11, where a window will be mapped to screen some
- time after being asked to show itself on the screen.
-
- Note that a window that is mapped to screen may still not be considered exposed if the window client
- area is completely covered by other windows, or if the window is otherwise not visible. This function
- will then time out when waiting for such a window.
-
- \sa QTest::qWaitForWindowActive(), QWindow::isExposed()
-*/
-
-/*! \fn bool QTest::qWaitForWindowActive(QWindow *window, int timeout)
- \since 5.0
-
- Waits for \a timeout milliseconds or until the \a window is active.
-
- Returns \c true if \c window is active within \a timeout milliseconds, otherwise returns \c false.
-
- \sa QTest::qWaitForWindowExposed(), QWindow::isActive()
-*/
-
-/*! \fn bool QTest::qWaitForWindowExposed(QWidget *widget, int timeout)
- \since 5.0
-
- Waits for \a timeout milliseconds or until the \a widget's window is exposed.
- Returns \c true if \c widget's window is exposed within \a timeout milliseconds, otherwise returns \c false.
-
- This is mainly useful for asynchronous systems like X11, where a window will be mapped to screen some
- time after being asked to show itself on the screen.
-
- Note that a window that is mapped to screen may still not be considered exposed if the window client
- area is completely covered by other windows, or if the window is otherwise not visible. This function
- will then time out when waiting for such a window.
-
- A specific configuration where this happens is when using QGLWidget as a viewport widget on macOS:
- The viewport widget gets the expose event, not the parent widget.
-
- \sa QTest::qWaitForWindowActive()
-*/
-
-/*! \fn bool QTest::qWaitForWindowActive(QWidget *widget, int timeout)
- \since 5.0
-
- Waits for \a timeout milliseconds or until the \a widget's window is active.
-
- Returns \c true if \c widget's window is active within \a timeout milliseconds, otherwise returns \c false.
-
- \sa QTest::qWaitForWindowExposed(), QWidget::isActiveWindow()
-*/
-
-/*! \fn bool QTest::qWaitForWindowShown(QWidget *widget, int timeout)
- \since 5.0
- \deprecated
-
- Waits for \a timeout milliseconds or until the \a widget's window is exposed.
- Returns \c true if \c widget's window is exposed within \a timeout milliseconds, otherwise returns \c false.
-
- This function does the same as qWaitForWindowExposed().
-
- Example:
- \snippet code/src_qtestlib_qtestcase.cpp 24
-
- \sa QTest::qWaitForWindowActive(), QTest::qWaitForWindowExposed()
-*/
-
/*!
\fn QTouchDevice *QTest::createTouchDevice(QTouchDevice::DeviceType devType = QTouchDevice::TouchScreen)
\since 5.8
diff --git a/src/testlib/qtesteventloop.h b/src/testlib/qtesteventloop.h
index 19ad22565e..a77b47cd7f 100644
--- a/src/testlib/qtesteventloop.h
+++ b/src/testlib/qtesteventloop.h
@@ -83,7 +83,7 @@ protected:
inline void timerEvent(QTimerEvent *e) override;
private:
- bool inLoop;
+ Q_DECL_UNUSED_MEMBER bool inLoop; // ### Qt 6: remove
bool _timeout;
int timerId;
@@ -96,7 +96,6 @@ inline void QTestEventLoop::enterLoopMSecs(int ms)
QEventLoop l;
- inLoop = true;
_timeout = false;
timerId = startTimer(ms);
@@ -120,8 +119,6 @@ inline void QTestEventLoop::exitLoop()
if (loop)
loop->exit();
-
- inLoop = false;
}
inline void QTestEventLoop::timerEvent(QTimerEvent *e)
diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp
index 6260b9e3fd..1268730cc6 100644
--- a/src/testlib/qtestlog.cpp
+++ b/src/testlib/qtestlog.cpp
@@ -47,10 +47,15 @@
#include <QtTest/private/qxunittestlogger_p.h>
#include <QtTest/private/qxmltestlogger_p.h>
#include <QtTest/private/qteamcitylogger_p.h>
+#include <QtTest/private/qtaptestlogger_p.h>
#if defined(HAVE_XCTEST)
#include <QtTest/private/qxctestlogger_p.h>
#endif
+#if defined(Q_OS_DARWIN)
+#include <QtTest/private/qappletestlogger_p.h>
+#endif
+
#include <QtCore/qatomic.h>
#include <QtCore/qbytearray.h>
#include <QtCore/QElapsedTimer>
@@ -211,6 +216,11 @@ namespace QTest {
FOREACH_LOGGER(logger->leaveTestFunction());
}
+ static void enterTestData(QTestData *data)
+ {
+ FOREACH_LOGGER(logger->enterTestData(data));
+ }
+
static void addIncident(QAbstractTestLogger::IncidentTypes type, const char *description,
const char *file = 0, int line = 0)
{
@@ -339,6 +349,12 @@ void QTestLog::enterTestFunction(const char* function)
QTest::TestLoggers::enterTestFunction(function);
}
+void QTestLog::enterTestData(QTestData *data)
+{
+ QTEST_ASSERT(data);
+ QTest::TestLoggers::enterTestData(data);
+}
+
int QTestLog::unhandledIgnoreMessages()
{
int i = 0;
@@ -498,12 +514,24 @@ void QTestLog::addLogger(LogMode mode, const char *filename)
case QTestLog::TeamCity:
logger = new QTeamCityLogger(filename);
break;
+ case QTestLog::TAP:
+ logger = new QTapTestLogger(filename);
+ break;
#if defined(HAVE_XCTEST)
case QTestLog::XCTest:
logger = new QXcodeTestLogger;
break;
#endif
}
+
+#if defined(QT_USE_APPLE_UNIFIED_LOGGING)
+ // Logger that also feeds messages to AUL. It needs to wrap the existing
+ // logger, as it needs to be able to short circuit the existing logger
+ // in case AUL prints to stderr.
+ if (QAppleTestLogger::debugLoggingEnabled())
+ logger = new QAppleTestLogger(logger);
+#endif
+
QTEST_ASSERT(logger);
QTest::TestLoggers::addLogger(logger);
}
@@ -591,6 +619,11 @@ int QTestLog::blacklistCount()
return QTest::blacklists;
}
+int QTestLog::totalCount()
+{
+ return passCount() + failCount() + skipCount() + blacklistCount();
+}
+
void QTestLog::resetCounters()
{
QTest::passes = 0;
diff --git a/src/testlib/qtestlog_p.h b/src/testlib/qtestlog_p.h
index 3d28795188..600c078ce2 100644
--- a/src/testlib/qtestlog_p.h
+++ b/src/testlib/qtestlog_p.h
@@ -57,12 +57,13 @@ QT_BEGIN_NAMESPACE
class QBenchmarkResult;
class QRegularExpression;
+class QTestData;
class Q_TESTLIB_EXPORT QTestLog
{
public:
enum LogMode {
- Plain = 0, XML, LightXML, XunitXML, CSV, TeamCity,
+ Plain = 0, XML, LightXML, XunitXML, CSV, TeamCity, TAP,
#if defined(HAVE_XCTEST)
XCTest
#endif
@@ -71,6 +72,8 @@ public:
static void enterTestFunction(const char* function);
static void leaveTestFunction();
+ static void enterTestData(QTestData *data);
+
static void addPass(const char *msg);
static void addFail(const char *msg, const char *file, int line);
static void addXFail(const char *msg, const char *file, int line);
@@ -110,6 +113,7 @@ public:
static int failCount();
static int skipCount();
static int blacklistCount();
+ static int totalCount();
static void resetCounters();
diff --git a/src/testlib/qtestresult.cpp b/src/testlib/qtestresult.cpp
index 219190d5da..88e3407c90 100644
--- a/src/testlib/qtestresult.cpp
+++ b/src/testlib/qtestresult.cpp
@@ -110,6 +110,8 @@ void QTestResult::setCurrentTestData(QTestData *data)
{
QTest::currentTestData = data;
QTest::failed = false;
+ if (data)
+ QTestLog::enterTestData(data);
}
void QTestResult::setCurrentTestFunction(const char *func)
diff --git a/src/testlib/qtestsystem.h b/src/testlib/qtestsystem.h
index daa0d7aea0..7a73bbb5d2 100644
--- a/src/testlib/qtestsystem.h
+++ b/src/testlib/qtestsystem.h
@@ -41,113 +41,16 @@
#define QTESTSYSTEM_H
#include <QtTest/qtestcase.h>
-#include <QtCore/qcoreapplication.h>
-#include <QtCore/qdeadlinetimer.h>
-#ifdef QT_GUI_LIB
-# include <QtGui/QWindow>
-#endif
-#ifdef QT_WIDGETS_LIB
-# include <QtWidgets/QWidget>
-#endif
-
-QT_BEGIN_NAMESPACE
-
-namespace QTest
-{
- template <typename Functor>
- Q_REQUIRED_RESULT static bool qWaitFor(Functor predicate, int timeout = 5000)
- {
- // We should not spin the event loop in case the predicate is already true,
- // otherwise we might send new events that invalidate the predicate.
- if (predicate())
- return true;
-
- // qWait() is expected to spin the event loop, even when called with a small
- // timeout like 1ms, so we we can't use a simple while-loop here based on
- // the deadline timer not having timed out. Use do-while instead.
-
- int remaining = timeout;
- QDeadlineTimer deadline(remaining, Qt::PreciseTimer);
-
- do {
- QCoreApplication::processEvents(QEventLoop::AllEvents, remaining);
- QCoreApplication::sendPostedEvents(nullptr, QEvent::DeferredDelete);
-
- remaining = deadline.remainingTime();
- if (remaining > 0) {
- QTest::qSleep(qMin(10, remaining));
- remaining = deadline.remainingTime();
- }
-
- if (predicate())
- return true;
-
- remaining = deadline.remainingTime();
- } while (remaining > 0);
-
- return predicate(); // Last chance
- }
-
- Q_DECL_UNUSED inline static void qWait(int ms)
- {
- // Ideally this method would be implemented in terms of qWaitFor, with
- // a predicate that always returns false, but due to a compiler bug in
- // GCC 6 we can't do that.
-
- Q_ASSERT(QCoreApplication::instance());
-
- QDeadlineTimer timer(ms, Qt::PreciseTimer);
- int remaining = ms;
- do {
- QCoreApplication::processEvents(QEventLoop::AllEvents, remaining);
- QCoreApplication::sendPostedEvents(Q_NULLPTR, QEvent::DeferredDelete);
- remaining = timer.remainingTime();
- if (remaining <= 0)
- break;
- QTest::qSleep(qMin(10, remaining));
- remaining = timer.remainingTime();
- } while (remaining > 0);
- }
+#include <QtCore/qtestsupport_core.h>
#ifdef QT_GUI_LIB
- Q_REQUIRED_RESULT inline static bool qWaitForWindowActive(QWindow *window, int timeout = 5000)
- {
- return qWaitFor([&]() { return window->isActive(); }, timeout);
- }
-
- Q_REQUIRED_RESULT inline static bool qWaitForWindowExposed(QWindow *window, int timeout = 5000)
- {
- return qWaitFor([&]() { return window->isExposed(); }, timeout);
- }
+# include <QtGui/qtestsupport_gui.h>
#endif
-
#ifdef QT_WIDGETS_LIB
- Q_REQUIRED_RESULT inline static bool qWaitForWindowActive(QWidget *widget, int timeout = 5000)
- {
- if (QWindow *window = widget->window()->windowHandle())
- return qWaitForWindowActive(window, timeout);
- return false;
- }
-
- Q_REQUIRED_RESULT inline static bool qWaitForWindowExposed(QWidget *widget, int timeout = 5000)
- {
- if (QWindow *window = widget->window()->windowHandle())
- return qWaitForWindowExposed(window, timeout);
- return false;
- }
+# include <QtWidgets/qtestsupport_widgets.h>
#endif
-#if QT_DEPRECATED_SINCE(5, 0)
-# ifdef QT_WIDGETS_LIB
-
- QT_DEPRECATED Q_REQUIRED_RESULT inline static bool qWaitForWindowShown(QWidget *widget, int timeout = 5000)
- {
- return qWaitForWindowExposed(widget, timeout);
- }
-# endif // QT_WIDGETS_LIB
-#endif // QT_DEPRECATED_SINCE(5, 0)
-}
-
+QT_BEGIN_NAMESPACE
QT_END_NAMESPACE
#endif
diff --git a/src/testlib/qxctestlogger.mm b/src/testlib/qxctestlogger.mm
index 62fd73070f..9fa9da2fdd 100644
--- a/src/testlib/qxctestlogger.mm
+++ b/src/testlib/qxctestlogger.mm
@@ -200,7 +200,7 @@ private:
[autoreleasepool release];
}
-+ (id)defaultTestSuite
++ (QTestLibTests *)defaultTestSuite
{
return [[QtTestLibTests alloc] initWithName:@"QtTestLib"];
}
@@ -255,7 +255,7 @@ static XCTestSuiteRun *s_qtTestSuiteRun = 0;
@implementation QtTestLibTest
-- (id)initWithInvocation:(NSInvocation *)invocation
+- (instancetype)initWithInvocation:(NSInvocation *)invocation
{
if (self = [super initWithInvocation:invocation]) {
// The test object name and function name are used by XCTest after QtTestLib has
@@ -322,7 +322,7 @@ QXcodeTestLogger *QXcodeTestLogger::s_currentTestLogger = 0;
QXcodeTestLogger::QXcodeTestLogger()
: QAbstractTestLogger(0)
- , m_testRuns([[NSMutableArray arrayWithCapacity:2] retain])
+ , m_testRuns([[NSMutableArray<XCTestRun *> arrayWithCapacity:2] retain])
{
Q_ASSERT(!s_currentTestLogger);
@@ -383,11 +383,11 @@ static bool isTestFunctionInActiveScope(const char *function)
Q_ASSERT(activeScope == Selected);
- static NSArray *forcedTests = [@[ @"initTestCase", @"initTestCase_data", @"cleanupTestCase" ] retain];
+ static NSArray<NSString *> *forcedTests = [@[ @"initTestCase", @"initTestCase_data", @"cleanupTestCase" ] retain];
if ([forcedTests containsObject:[NSString stringWithUTF8String:function]])
return true;
- static NSArray *testsInScope = [[testScope componentsSeparatedByString:@","] retain];
+ static NSArray<NSString *> *testsInScope = [[testScope componentsSeparatedByString:@","] retain];
bool inScope = [testsInScope containsObject:[NSString stringWithFormat:@"%s/%s",
QTestResult::currentTestObjectName(), function]];
diff --git a/src/testlib/qxctestlogger_p.h b/src/testlib/qxctestlogger_p.h
index 1b641f18af..8baa5aa27f 100644
--- a/src/testlib/qxctestlogger_p.h
+++ b/src/testlib/qxctestlogger_p.h
@@ -90,7 +90,7 @@ private:
void pushTestRunForTest(XCTest *test, bool start);
XCTestRun *popTestRun();
- NSMutableArray *m_testRuns;
+ NSMutableArray<XCTestRun *> *m_testRuns;
static QXcodeTestLogger *s_currentTestLogger;
};
diff --git a/src/testlib/testlib.pro b/src/testlib/testlib.pro
index 06a6f8b8e5..46b61dac07 100644
--- a/src/testlib/testlib.pro
+++ b/src/testlib/testlib.pro
@@ -39,7 +39,8 @@ HEADERS = \
qtesttouch.h \
qtestblacklist_p.h \
qtesthelpers_p.h \
- qttestglobal.h
+ qttestglobal.h \
+ qtaptestlogger_p.h
SOURCES = \
qtestcase.cpp \
@@ -65,7 +66,8 @@ SOURCES = \
qtestmouse.cpp \
qtestxunitstreamer.cpp \
qxunittestlogger.cpp \
- qtestblacklist.cpp
+ qtestblacklist.cpp \
+ qtaptestlogger.cpp
qtConfig(itemmodeltester) {
HEADERS += \
@@ -84,6 +86,9 @@ embedded:QMAKE_CXXFLAGS += -fno-rtti
mac {
LIBS += -framework Security
+ SOURCES += qappletestlogger.cpp
+ HEADERS += qappletestlogger_p.h
+
macos {
HEADERS += qtestutil_macos_p.h
OBJECTIVE_SOURCES += qtestutil_macos.mm
diff --git a/src/tools/androiddeployqt/main.cpp b/src/tools/androiddeployqt/main.cpp
index f00188396d..ebd9480808 100644
--- a/src/tools/androiddeployqt/main.cpp
+++ b/src/tools/androiddeployqt/main.cpp
@@ -1287,6 +1287,9 @@ bool updateAndroidManifest(Options &options)
}
}
+ options.localJars.removeDuplicates();
+ options.initClasses.removeDuplicates();
+
QHash<QString, QString> replacements;
replacements[QLatin1String("-- %%INSERT_APP_NAME%% --")] = QFileInfo(options.applicationBinary).baseName().mid(sizeof("lib") - 1);
replacements[QLatin1String("-- %%INSERT_APP_LIB_NAME%% --")] = QFileInfo(options.applicationBinary).baseName().mid(sizeof("lib") - 1);
diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro
index a45382106a..83e44ff9a4 100644
--- a/src/tools/bootstrap/bootstrap.pro
+++ b/src/tools/bootstrap/bootstrap.pro
@@ -2,7 +2,7 @@ option(host_build)
TARGET = QtBootstrap
QT =
-CONFIG += minimal_syncqt internal_module force_bootstrap
+CONFIG += minimal_syncqt internal_module force_bootstrap gc_binaries
MODULE_INCNAME = QtCore QtXml
MODULE_DEFINES = \
@@ -12,6 +12,7 @@ MODULE_DEFINES = \
QT_VERSION_PATCH=$$QT_PATCH_VERSION \
QT_BOOTSTRAPPED \
QT_NO_CAST_TO_ASCII
+MODULE_CONFIG = gc_binaries
DEFINES += \
$$MODULE_DEFINES \
@@ -24,6 +25,7 @@ SOURCES += \
../../corelib/codecs/qlatincodec.cpp \
../../corelib/codecs/qtextcodec.cpp \
../../corelib/codecs/qutfcodec.cpp \
+ ../../corelib/global/qendian.cpp \
../../corelib/global/qglobal.cpp \
../../corelib/global/qlogging.cpp \
../../corelib/global/qmalloc.cpp \
diff --git a/src/tools/rcc/rcc.cpp b/src/tools/rcc/rcc.cpp
index 4c7d095ca3..1a7cab01df 100644
--- a/src/tools/rcc/rcc.cpp
+++ b/src/tools/rcc/rcc.cpp
@@ -377,7 +377,7 @@ enum RCCXmlTag {
Q_DECLARE_TYPEINFO(RCCXmlTag, Q_PRIMITIVE_TYPE);
bool RCCResourceLibrary::interpretResourceFile(QIODevice *inputDevice,
- const QString &fname, QString currentPath, bool ignoreErrors)
+ const QString &fname, QString currentPath, bool listMode)
{
Q_ASSERT(m_errorDevice);
const QChar slash = QLatin1Char('/');
@@ -527,7 +527,7 @@ bool RCCResourceLibrary::interpretResourceFile(QIODevice *inputDevice,
m_failedResources.push_back(child.fileName());
}
}
- } else if (file.isFile()) {
+ } else if (listMode || file.isFile()) {
const bool arc =
addFile(alias,
RCCFileInfo(alias.section(slash, -1),
@@ -551,8 +551,6 @@ bool RCCResourceLibrary::interpretResourceFile(QIODevice *inputDevice,
const QString msg = QString::fromLatin1("RCC: Error in '%1': Cannot find file '%2'\n")
.arg(fname, fileName);
m_errorDevice->write(msg.toUtf8());
- if (ignoreErrors)
- continue;
return false;
}
}
@@ -564,8 +562,6 @@ bool RCCResourceLibrary::interpretResourceFile(QIODevice *inputDevice,
}
if (reader.hasError()) {
- if (ignoreErrors)
- return true;
int errorLine = reader.lineNumber();
int errorColumn = reader.columnNumber();
QString errorMessage = reader.errorString();
@@ -577,7 +573,7 @@ bool RCCResourceLibrary::interpretResourceFile(QIODevice *inputDevice,
if (m_root == 0) {
const QString msg = QString::fromLatin1("RCC: Warning: No resources in '%1'.\n").arg(fname);
m_errorDevice->write(msg.toUtf8());
- if (!ignoreErrors && m_format == Binary) {
+ if (!listMode && m_format == Binary) {
// create dummy entry, otherwise loading with QResource will crash
m_root = new RCCFileInfo(QString(), QFileInfo(),
QLocale::C, QLocale::AnyCountry, RCCFileInfo::Directory);
@@ -645,14 +641,14 @@ void RCCResourceLibrary::reset()
}
-bool RCCResourceLibrary::readFiles(bool ignoreErrors, QIODevice &errorDevice)
+bool RCCResourceLibrary::readFiles(bool listMode, QIODevice &errorDevice)
{
reset();
m_errorDevice = &errorDevice;
//read in data
if (m_verbose) {
- const QString msg = QString::fromLatin1("Processing %1 files [%2]\n")
- .arg(m_fileNames.size()).arg(static_cast<int>(ignoreErrors));
+ const QString msg = QString::fromLatin1("Processing %1 files [listMode=%2]\n")
+ .arg(m_fileNames.size()).arg(static_cast<int>(listMode));
m_errorDevice->write(msg.toUtf8());
}
for (int i = 0; i < m_fileNames.size(); ++i) {
@@ -680,7 +676,7 @@ bool RCCResourceLibrary::readFiles(bool ignoreErrors, QIODevice &errorDevice)
m_errorDevice->write(msg.toUtf8());
}
- if (!interpretResourceFile(&fileIn, fname, pwd, ignoreErrors))
+ if (!interpretResourceFile(&fileIn, fname, pwd, listMode))
return false;
}
return true;
diff --git a/src/tools/rcc/rcc.h b/src/tools/rcc/rcc.h
index 19e04e401d..36984cf38a 100644
--- a/src/tools/rcc/rcc.h
+++ b/src/tools/rcc/rcc.h
@@ -53,7 +53,7 @@ public:
bool output(QIODevice &outDevice, QIODevice &tempDevice, QIODevice &errorDevice);
- bool readFiles(bool ignoreErrors, QIODevice &errorDevice);
+ bool readFiles(bool listMode, QIODevice &errorDevice);
enum Format { Binary, C_Code, Pass1, Pass2 };
void setFormat(Format f) { m_format = f; }
@@ -109,7 +109,7 @@ private:
void reset();
bool addFile(const QString &alias, const RCCFileInfo &file);
bool interpretResourceFile(QIODevice *inputDevice, const QString &file,
- QString currentPath = QString(), bool ignoreErrors = false);
+ QString currentPath = QString(), bool listMode = false);
bool writeHeader();
bool writeDataBlobs();
bool writeDataNames();
diff --git a/src/tools/tracegen/lttng.cpp b/src/tools/tracegen/lttng.cpp
index 6c0d8cc88b..5d41bf5f1f 100644
--- a/src/tools/tracegen/lttng.cpp
+++ b/src/tools/tracegen/lttng.cpp
@@ -69,6 +69,10 @@ static void writeCtfMacro(QTextStream &stream, const Tracepoint::Field &field)
case Tracepoint::Field::Integer:
stream << "ctf_integer(" << paramType << ", " << name << ", " << name << ")";
return;
+ case Tracepoint::Field::IntegerHex:
+ case Tracepoint::Field::Pointer:
+ stream << "ctf_integer_hex(" << paramType << ", " << name << ", " << name << ")";
+ return;
case Tracepoint::Field::Float:
stream << "ctf_float(" << paramType << ", " << name << ", " << name << ")";
return;
diff --git a/src/tools/tracegen/provider.cpp b/src/tools/tracegen/provider.cpp
index 00e105377e..a6523a2e3d 100644
--- a/src/tools/tracegen/provider.cpp
+++ b/src/tools/tracegen/provider.cpp
@@ -157,10 +157,13 @@ static Tracepoint::Field::BackendType backendType(QString rawType)
{ "signed_long_long_int", Tracepoint::Field::Integer },
{ "unsigned_long_long", Tracepoint::Field::Integer },
{ "char", Tracepoint::Field::Integer },
+ { "intptr_t", Tracepoint::Field::IntegerHex },
+ { "uintptr_t", Tracepoint::Field::IntegerHex },
+ { "std::intptr_t", Tracepoint::Field::IntegerHex },
+ { "std::uintptr_t", Tracepoint::Field::IntegerHex },
{ "float", Tracepoint::Field::Float },
{ "double", Tracepoint::Field::Float },
{ "long_double", Tracepoint::Field::Float },
- { "char_ptr", Tracepoint::Field::String },
{ "QString", Tracepoint::Field::QtString },
{ "QByteArray", Tracepoint::Field::QtByteArray },
{ "QUrl", Tracepoint::Field::QtUrl },
@@ -168,7 +171,6 @@ static Tracepoint::Field::BackendType backendType(QString rawType)
};
auto backendType = [](const QString &rawType) {
-
static const size_t tableSize = sizeof (typeTable) / sizeof (typeTable[0]);
for (size_t i = 0; i < tableSize; ++i) {
@@ -194,7 +196,13 @@ static Tracepoint::Field::BackendType backendType(QString rawType)
rawType = rawType.trimmed();
rawType.replace(QStringLiteral(" "), QStringLiteral("_"));
- return backendType(rawType.trimmed());
+ if (rawType == QLatin1String("char_ptr"))
+ return Tracepoint::Field::String;
+
+ if (rawType.endsWith(QLatin1String("_ptr")))
+ return Tracepoint::Field::Pointer;
+
+ return backendType(rawType);
}
static Tracepoint parseTracepoint(const QString &name, const QStringList &args,
@@ -264,35 +272,28 @@ Provider parseProvider(const QString &filename)
static const QRegExp tracedef(QStringLiteral("([A-Za-z][A-Za-z0-9_]*)\\((.*)\\)"));
- int lineNumber = 0;
-
Provider provider;
provider.name = QFileInfo(filename).baseName();
- for (;;) {
+ for (int lineNumber = 1; !s.atEnd(); ++lineNumber) {
QString line = s.readLine().trimmed();
- if (line.isNull())
- break;
-
- if (line.isEmpty() || line.startsWith(QStringLiteral("#"))) {
- ++lineNumber;
+ if (line.isEmpty() || line.startsWith(QLatin1Char('#')))
continue;
- }
if (tracedef.exactMatch(line)) {
const QString name = tracedef.cap(1);
- QStringList args = tracedef.cap(2).split(QStringLiteral(","), QString::SkipEmptyParts);
-
- if (args.at(0).isNull())
- args.clear();
+ const QString argsString = tracedef.cap(2);
+ const QStringList args = argsString.split(QLatin1Char(','),
+ QString::SkipEmptyParts);
provider.tracepoints << parseTracepoint(name, args, filename, lineNumber);
} else {
- panic("Syntax error whilre processing %s on line %d", qPrintable(filename), lineNumber);
+ panic("Syntax error while processing '%s' line %d:\n"
+ " '%s' does not look like a tracepoint definition",
+ qPrintable(filename), lineNumber,
+ qPrintable(line));
}
-
- ++lineNumber;
}
#ifdef TRACEGEN_DEBUG
diff --git a/src/tools/tracegen/provider.h b/src/tools/tracegen/provider.h
index d8cbd2662d..9771e62f4d 100644
--- a/src/tools/tracegen/provider.h
+++ b/src/tools/tracegen/provider.h
@@ -59,8 +59,10 @@ struct Tracepoint
Array,
Sequence,
Integer,
+ IntegerHex,
Float,
String,
+ Pointer,
QtString,
QtByteArray,
QtUrl,
diff --git a/src/widgets/accessible/complexwidgets.cpp b/src/widgets/accessible/complexwidgets.cpp
index 6cdc06d702..63c6fbb9bb 100644
--- a/src/widgets/accessible/complexwidgets.cpp
+++ b/src/widgets/accessible/complexwidgets.cpp
@@ -120,7 +120,14 @@ public:
return rec;
}
- bool isValid() const override { return m_parent.data() && m_parent->count() > m_index; }
+ bool isValid() const override {
+ if (m_parent) {
+ if (static_cast<QWidget *>(m_parent.data())->d_func()->data.in_destructor)
+ return false;
+ return m_parent->count() > m_index;
+ }
+ return false;
+ }
QAccessibleInterface *childAt(int, int) const override { return 0; }
int childCount() const override { return 0; }
@@ -199,7 +206,7 @@ QAccessibleTabBar::QAccessibleTabBar(QWidget *w)
QAccessibleTabBar::~QAccessibleTabBar()
{
- foreach (QAccessible::Id id, m_childInterfaces)
+ for (QAccessible::Id id : qAsConst(m_childInterfaces))
QAccessible::deleteAccessibleInterface(id);
}
diff --git a/src/widgets/accessible/itemviews.cpp b/src/widgets/accessible/itemviews.cpp
index 4d37400dc9..04a5dcc878 100644
--- a/src/widgets/accessible/itemviews.cpp
+++ b/src/widgets/accessible/itemviews.cpp
@@ -115,7 +115,7 @@ bool QAccessibleTable::isValid() const
QAccessibleTable::~QAccessibleTable()
{
- Q_FOREACH (QAccessible::Id id, childToId)
+ for (QAccessible::Id id : qAsConst(childToId))
QAccessible::deleteAccessibleInterface(id);
}
@@ -221,7 +221,7 @@ QList<QAccessibleInterface *> QAccessibleTable::selectedCells() const
return cells;
const QModelIndexList selectedIndexes = view()->selectionModel()->selectedIndexes();
cells.reserve(selectedIndexes.size());
- Q_FOREACH (const QModelIndex &index, selectedIndexes)
+ for (const QModelIndex &index : selectedIndexes)
cells.append(child(logicalIndex(index)));
return cells;
}
@@ -233,7 +233,7 @@ QList<int> QAccessibleTable::selectedColumns() const
QList<int> columns;
const QModelIndexList selectedColumns = view()->selectionModel()->selectedColumns();
columns.reserve(selectedColumns.size());
- Q_FOREACH (const QModelIndex &index, selectedColumns)
+ for (const QModelIndex &index : selectedColumns)
columns.append(index.column());
return columns;
@@ -246,7 +246,7 @@ QList<int> QAccessibleTable::selectedRows() const
QList<int> rows;
const QModelIndexList selectedRows = view()->selectionModel()->selectedRows();
rows.reserve(selectedRows.size());
- Q_FOREACH (const QModelIndex &index, selectedRows)
+ for (const QModelIndex &index : selectedRows)
rows.append(index.row());
return rows;
@@ -553,7 +553,7 @@ void QAccessibleTable::modelChange(QAccessibleTableModelChangeEvent *event)
switch (event->modelChangeType()) {
case QAccessibleTableModelChangeEvent::ModelReset:
- Q_FOREACH (QAccessible::Id id, childToId)
+ for (QAccessible::Id id : qAsConst(childToId))
QAccessible::deleteAccessibleInterface(id);
childToId.clear();
break;
diff --git a/src/widgets/accessible/qaccessiblemenu.cpp b/src/widgets/accessible/qaccessiblemenu.cpp
index 8b3353f625..507584eb02 100644
--- a/src/widgets/accessible/qaccessiblemenu.cpp
+++ b/src/widgets/accessible/qaccessiblemenu.cpp
@@ -117,10 +117,9 @@ QAccessibleInterface *QAccessibleMenu::child(int index) const
QAccessibleInterface *QAccessibleMenu::parent() const
{
if (QAction *menuAction = menu()->menuAction()) {
- QList<QWidget *> parentCandidates;
- parentCandidates << menu()->parentWidget();
- parentCandidates << menuAction->associatedWidgets();
- foreach (QWidget *w, parentCandidates) {
+ const QList<QWidget*> parentCandidates =
+ QList<QWidget*>() << menu()->parentWidget() << menuAction->associatedWidgets();
+ for (QWidget *w : parentCandidates) {
if (qobject_cast<QMenu*>(w)
#if QT_CONFIG(menubar)
|| qobject_cast<QMenuBar*>(w)
diff --git a/src/widgets/accessible/qaccessiblewidgets.cpp b/src/widgets/accessible/qaccessiblewidgets.cpp
index 872ddcded5..0d87cc486d 100644
--- a/src/widgets/accessible/qaccessiblewidgets.cpp
+++ b/src/widgets/accessible/qaccessiblewidgets.cpp
@@ -569,7 +569,7 @@ QCalendarWidget *QAccessibleCalendarWidget::calendarWidget() const
QAbstractItemView *QAccessibleCalendarWidget::calendarView() const
{
- foreach (QObject *child, calendarWidget()->children()) {
+ for (QObject *child : calendarWidget()->children()) {
if (child->objectName() == QLatin1String("qt_calendar_calendarview"))
return static_cast<QAbstractItemView *>(child);
}
@@ -578,7 +578,7 @@ QAbstractItemView *QAccessibleCalendarWidget::calendarView() const
QWidget *QAccessibleCalendarWidget::navigationBar() const
{
- foreach (QObject *child, calendarWidget()->children()) {
+ for (QObject *child : calendarWidget()->children()) {
if (child->objectName() == QLatin1String("qt_calendar_navigationbar"))
return static_cast<QWidget *>(child);
}
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp
index 99946d341d..e6a8ec47a4 100644
--- a/src/widgets/dialogs/qcolordialog.cpp
+++ b/src/widgets/dialogs/qcolordialog.cpp
@@ -2162,6 +2162,7 @@ QColor QColorDialog::getColor(const QColor &initial, QWidget *parent, const QStr
return dlg.selectedColor();
}
+#if QT_DEPRECATED_SINCE(5, 12)
/*!
\obsolete
@@ -2187,6 +2188,7 @@ QRgb QColorDialog::getRgba(QRgb initial, bool *ok, QWidget *parent)
*ok = color.isValid();
return result;
}
+#endif
/*!
Destroys the color dialog.
diff --git a/src/widgets/dialogs/qcolordialog.h b/src/widgets/dialogs/qcolordialog.h
index 6451ff9bde..cdbe0e7fb4 100644
--- a/src/widgets/dialogs/qcolordialog.h
+++ b/src/widgets/dialogs/qcolordialog.h
@@ -92,8 +92,9 @@ public:
const QString &title = QString(),
ColorDialogOptions options = ColorDialogOptions());
- // obsolete
- static QRgb getRgba(QRgb rgba = 0xffffffff, bool *ok = nullptr, QWidget *parent = nullptr);
+#if QT_DEPRECATED_SINCE(5, 12)
+ QT_DEPRECATED_X("Use getColor()") static QRgb getRgba(QRgb rgba = 0xffffffff, bool *ok = nullptr, QWidget *parent = nullptr);
+#endif
static int customCount();
static QColor customColor(int index);
diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp
index f5db4481ee..06f0393b4c 100644
--- a/src/widgets/dialogs/qdialog.cpp
+++ b/src/widgets/dialogs/qdialog.cpp
@@ -100,6 +100,10 @@ static inline int themeDialogType(const QDialog *dialog)
if (qobject_cast<const QErrorMessage *>(dialog))
return QPlatformTheme::MessageDialog;
#endif
+#if !QT_CONFIG(filedialog) && !QT_CONFIG(colordialog) && !QT_CONFIG(fontdialog) && \
+ !QT_CONFIG(messagebox) && !QT_CONFIG(errormessage)
+ Q_UNUSED(dialog);
+#endif
return -1;
}
@@ -514,6 +518,13 @@ void QDialog::open()
interaction with the parent window is blocked while the dialog is open.
By default, the dialog is application modal.
+ \note Avoid using this function; instead, use \c{open()}. Unlike exec(),
+ open() is asynchronous, and does not spin an additional event loop. This
+ prevents a series of dangerous bugs from happening (e.g. deleting the
+ dialog's parent while the dialog is open via exec()). When using open() you
+ can connect to the finished() signal of QDialog to be notified when the
+ dialog is closed.
+
\sa open(), show(), result(), setWindowModality()
*/
@@ -560,9 +571,12 @@ int QDialog::exec()
}
/*!
- Closes the dialog and sets its result code to \a r. If this dialog
- is shown with exec(), done() causes the local event loop to finish,
- and exec() to return \a r.
+ Closes the dialog and sets its result code to \a r. The finished() signal
+ will emit \a r; if \a r is QDialog::Accepted or QDialog::Rejected, the
+ accepted() or the rejected() signals will also be emitted, respectively.
+
+ If this dialog is shown with exec(), done() also causes the local event loop
+ to finish, and exec() to return \a r.
As with QWidget::close(), done() deletes the dialog if the
Qt::WA_DeleteOnClose flag is set. If the dialog is the application's
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index ecd2ab6776..2742b152f2 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -517,7 +517,7 @@ void QFileDialog::changeEvent(QEvent *e)
QFileDialogPrivate::QFileDialogPrivate()
:
-#ifndef QT_NO_PROXYMODEL
+#if QT_CONFIG(proxymodel)
proxyModel(0),
#endif
model(0),
@@ -663,7 +663,7 @@ void QFileDialogPrivate::retranslateStrings()
QList<QAction*> actions = qFileDialogUi->treeView->header()->actions();
QAbstractItemModel *abstractModel = model;
-#ifndef QT_NO_PROXYMODEL
+#if QT_CONFIG(proxymodel)
if (proxyModel)
abstractModel = proxyModel;
#endif
@@ -2813,7 +2813,7 @@ bool QFileDialogPrivate::restoreWidgetState(QStringList &history, int splitterPo
QList<QAction*> actions = headerView->actions();
QAbstractItemModel *abstractModel = model;
-#ifndef QT_NO_PROXYMODEL
+#if QT_CONFIG(proxymodel)
if (proxyModel)
abstractModel = proxyModel;
#endif
@@ -2982,7 +2982,7 @@ void QFileDialogPrivate::createWidgets()
q, SLOT(_q_showHeader(QAction*)));;
QAbstractItemModel *abstractModel = model;
-#ifndef QT_NO_PROXYMODEL
+#if QT_CONFIG(proxymodel)
if (proxyModel)
abstractModel = proxyModel;
#endif
@@ -3063,7 +3063,7 @@ void QFileDialogPrivate::_q_showHeader(QAction *action)
qFileDialogUi->treeView->header()->setSectionHidden(actionGroup->actions().indexOf(action) + 1, !action->isChecked());
}
-#ifndef QT_NO_PROXYMODEL
+#if QT_CONFIG(proxymodel)
/*!
\since 4.3
@@ -3141,7 +3141,7 @@ QAbstractProxyModel *QFileDialog::proxyModel() const
Q_D(const QFileDialog);
return d->proxyModel;
}
-#endif // QT_NO_PROXYMODEL
+#endif // QT_CONFIG(proxymodel)
/*!
\internal
diff --git a/src/widgets/dialogs/qfiledialog.h b/src/widgets/dialogs/qfiledialog.h
index 1cbd690f24..8646894750 100644
--- a/src/widgets/dialogs/qfiledialog.h
+++ b/src/widgets/dialogs/qfiledialog.h
@@ -178,7 +178,7 @@ public:
void setSupportedSchemes(const QStringList &schemes);
QStringList supportedSchemes() const;
-#ifndef QT_NO_PROXYMODEL
+#if QT_CONFIG(proxymodel)
void setProxyModel(QAbstractProxyModel *model);
QAbstractProxyModel *proxyModel() const;
#endif
diff --git a/src/widgets/dialogs/qfiledialog_p.h b/src/widgets/dialogs/qfiledialog_p.h
index 17290381d3..3a93a53911 100644
--- a/src/widgets/dialogs/qfiledialog_p.h
+++ b/src/widgets/dialogs/qfiledialog_p.h
@@ -227,7 +227,7 @@ public:
void _q_fileRenamed(const QString &path, const QString &oldName, const QString &newName);
// layout
-#ifndef QT_NO_PROXYMODEL
+#if QT_CONFIG(proxymodel)
QAbstractProxyModel *proxyModel;
#endif
@@ -346,17 +346,17 @@ private:
};
QModelIndex QFileDialogPrivate::mapToSource(const QModelIndex &index) const {
-#ifdef QT_NO_PROXYMODEL
- return index;
-#else
+#if QT_CONFIG(proxymodel)
return proxyModel ? proxyModel->mapToSource(index) : index;
+#else
+ return index;
#endif
}
QModelIndex QFileDialogPrivate::mapFromSource(const QModelIndex &index) const {
-#ifdef QT_NO_PROXYMODEL
- return index;
-#else
+#if QT_CONFIG(proxymodel)
return proxyModel ? proxyModel->mapFromSource(index) : index;
+#else
+ return index;
#endif
}
diff --git a/src/widgets/dialogs/qfilesystemmodel_p.h b/src/widgets/dialogs/qfilesystemmodel_p.h
index a2a02e2d41..1e72bb69a8 100644
--- a/src/widgets/dialogs/qfilesystemmodel_p.h
+++ b/src/widgets/dialogs/qfilesystemmodel_p.h
@@ -294,8 +294,6 @@ public:
void _q_fileSystemChanged(const QString &path, const QVector<QPair<QString, QFileInfo> > &);
void _q_resolvedName(const QString &fileName, const QString &resolvedName);
- static int naturalCompare(const QString &s1, const QString &s2, Qt::CaseSensitivity cs);
-
QDir rootDir;
#if QT_CONFIG(filesystemwatcher)
# ifdef Q_OS_WIN
diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp b/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp
index 71027f00a2..86c1fa243c 100644
--- a/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp
+++ b/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp
@@ -2526,7 +2526,7 @@ QGraphicsAnchorLayoutPrivate::getGraphParts(Orientation orientation)
// Check if this constraint have some overlap with current
// trunk variables...
- foreach (QSimplexVariable *ad, trunkVariables) {
+ for (QSimplexVariable *ad : qAsConst(trunkVariables)) {
if (c->variables.contains(ad)) {
match = true;
break;
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp
index fdf21fb499..203b879020 100644
--- a/src/widgets/graphicsview/qgraphicsitem.cpp
+++ b/src/widgets/graphicsview/qgraphicsitem.cpp
@@ -7310,7 +7310,7 @@ void QGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
selectedItems = d_ptr->scene->selectedItems();
initialPositions = d_ptr->scene->d_func()->movingItemsInitialPositions;
if (initialPositions.isEmpty()) {
- foreach (QGraphicsItem *item, selectedItems)
+ for (QGraphicsItem *item : qAsConst(selectedItems))
initialPositions[item] = item->pos();
initialPositions[this] = pos();
}
diff --git a/src/widgets/graphicsview/qgraphicsscene.cpp b/src/widgets/graphicsview/qgraphicsscene.cpp
index 37c631483a..7cc694a613 100644
--- a/src/widgets/graphicsview/qgraphicsscene.cpp
+++ b/src/widgets/graphicsview/qgraphicsscene.cpp
@@ -4331,7 +4331,8 @@ static void _q_paintIntoCache(QPixmap *pix, QGraphicsItem *item, const QRegion &
pix->fill(Qt::transparent);
pixmapPainter.begin(pix);
} else {
- subPix = QPixmap(br.size());
+ subPix = QPixmap(br.size() * pix->devicePixelRatio());
+ subPix.setDevicePixelRatio(pix->devicePixelRatio());
subPix.fill(Qt::transparent);
pixmapPainter.begin(&subPix);
pixmapPainter.translate(-br.topLeft());
@@ -4409,6 +4410,7 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte
return;
}
+ const qreal devicePixelRatio = painter->device()->devicePixelRatio();
const qreal oldPainterOpacity = painter->opacity();
qreal newPainterOpacity = oldPainterOpacity;
QGraphicsProxyWidget *proxy = item->isWidget() ? qobject_cast<QGraphicsProxyWidget *>(static_cast<QGraphicsWidget *>(item)) : 0;
@@ -4428,6 +4430,7 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte
// Fetch the off-screen transparent buffer and exposed area info.
QPixmapCache::Key pixmapKey;
QPixmap pix;
+
bool pixmapFound;
QGraphicsItemCache *itemCache = itemd->extraItemCache();
if (cacheMode == QGraphicsItem::ItemCoordinateCache) {
@@ -4442,18 +4445,20 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte
// Render using item coordinate cache mode.
if (cacheMode == QGraphicsItem::ItemCoordinateCache) {
QSize pixmapSize;
- bool fixedCacheSize = false;
+ bool fixedCacheSize = itemCache->fixedSize.isValid();
QRect br = brect.toAlignedRect();
- if ((fixedCacheSize = itemCache->fixedSize.isValid())) {
+ if (fixedCacheSize) {
pixmapSize = itemCache->fixedSize;
} else {
pixmapSize = br.size();
}
+ pixmapSize *= devicePixelRatio;
+
// Create or recreate the pixmap.
int adjust = itemCache->fixedSize.isValid() ? 0 : 2;
QSize adjustSize(adjust*2, adjust*2);
- br.adjust(-adjust, -adjust, adjust, adjust);
+ br.adjust(-adjust / devicePixelRatio, -adjust / devicePixelRatio, adjust / devicePixelRatio, adjust / devicePixelRatio);
if (pix.isNull() || (!fixedCacheSize && (pixmapSize + adjustSize) != pix.size())) {
pix = QPixmap(pixmapSize + adjustSize);
itemCache->boundingRect = br;
@@ -4476,7 +4481,8 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte
// Fit the item's bounding rect into the pixmap's coordinates.
QTransform itemToPixmap;
if (fixedCacheSize) {
- const QPointF scale(pixmapSize.width() / brect.width(), pixmapSize.height() / brect.height());
+ const QPointF scale((pixmapSize.width() / devicePixelRatio) / brect.width(),
+ (pixmapSize.height() / devicePixelRatio) / brect.height());
itemToPixmap.scale(scale.x(), scale.y());
}
itemToPixmap.translate(-br.x(), -br.y());
@@ -4498,6 +4504,7 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte
styleOptionTmp.exposedRect = exposedRect;
// Render.
+ pix.setDevicePixelRatio(devicePixelRatio);
_q_paintIntoCache(&pix, item, pixmapExposed, itemToPixmap, painter->renderHints(),
&styleOptionTmp, painterStateProtection);
@@ -4595,21 +4602,22 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte
// Copy / "scroll" the old pixmap onto the new ole and calculate
// scrolled exposure.
- if (newCacheIndent != deviceData->cacheIndent || deviceRect.size() != pix.size()) {
+ if (newCacheIndent != deviceData->cacheIndent || deviceRect.size() != pix.size() / devicePixelRatio) {
QPoint diff = newCacheIndent - deviceData->cacheIndent;
- QPixmap newPix(deviceRect.size());
+ QPixmap newPix(deviceRect.size() * devicePixelRatio);
// ### Investigate removing this fill (test with Plasma and
// graphicssystem raster).
newPix.fill(Qt::transparent);
if (!pix.isNull()) {
+ newPix.setDevicePixelRatio(devicePixelRatio);
QPainter newPixPainter(&newPix);
newPixPainter.drawPixmap(-diff, pix);
newPixPainter.end();
}
QRegion exposed;
- exposed += newPix.rect();
+ exposed += QRect(QPoint(0,0), newPix.size() / devicePixelRatio);
if (!pix.isNull())
- exposed -= QRect(-diff, pix.size());
+ exposed -= QRect(-diff, pix.size() / devicePixelRatio);
scrollExposure = exposed;
pix = newPix;
@@ -4621,9 +4629,9 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte
deviceData->cacheIndent = QPoint();
// Auto-adjust the pixmap size.
- if (deviceRect.size() != pix.size()) {
+ if (deviceRect.size() != pix.size() / devicePixelRatio) {
// exposed needs to cover the whole pixmap
- pix = QPixmap(deviceRect.size());
+ pix = QPixmap(deviceRect.size() * devicePixelRatio);
pixModified = true;
itemCache->allExposed = true;
itemCache->exposed.clear();
@@ -4667,6 +4675,7 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte
styleOptionTmp.exposedRect = br.adjusted(-1, -1, 1, 1);
// Render the exposed areas.
+ pix.setDevicePixelRatio(devicePixelRatio);
_q_paintIntoCache(&pix, item, pixmapExposed, itemToPixmap, painter->renderHints(),
&styleOptionTmp, painterStateProtection);
@@ -6391,7 +6400,7 @@ void QGraphicsScenePrivate::gestureEventHandler(QGestureEvent *event)
ev.setWidget(event->widget());
sendEvent(receiver.data(), &ev);
QSet<QGesture *> ignoredGestures;
- foreach (QGesture *g, gestures) {
+ for (QGesture *g : qAsConst(gestures)) {
if (!ev.isAccepted() && !ev.isAccepted(g)) {
// if the gesture was ignored by its target, we will update the
// targetItems list with a possible target items (items that
diff --git a/src/widgets/graphicsview/qgraphicssceneevent.cpp b/src/widgets/graphicsview/qgraphicssceneevent.cpp
index f7f09486e9..398ef1aaf5 100644
--- a/src/widgets/graphicsview/qgraphicssceneevent.cpp
+++ b/src/widgets/graphicsview/qgraphicssceneevent.cpp
@@ -259,8 +259,9 @@
#include "qgraphicssceneevent.h"
-#ifndef QT_NO_DEBUG
+#ifndef QT_NO_DEBUG_STREAM
#include <QtCore/qdebug.h>
+#include <private/qdebug_p.h>
#endif
#include <QtCore/qmap.h>
#include <QtCore/qpoint.h>
@@ -1730,4 +1731,99 @@ void QGraphicsSceneMoveEvent::setNewPos(const QPointF &pos)
d->newPos = pos;
}
+#ifndef QT_NO_DEBUG_STREAM
+template <class Event>
+static inline void formatPositions(QDebug &debug, const Event *event)
+{
+ debug << ", pos=";
+ QtDebugUtils::formatQPoint(debug, event->pos());
+ debug << ", scenePos=";
+ QtDebugUtils::formatQPoint(debug, event->scenePos());
+ debug << ", screenPos=";
+ QtDebugUtils::formatQPoint(debug, event->screenPos());
+}
+
+QDebug operator<<(QDebug debug, const QGraphicsSceneEvent *event)
+{
+ QDebugStateSaver saver(debug);
+ debug.nospace();
+ if (!event) {
+ debug << "QGraphicsSceneEvent(0)";
+ return debug;
+ }
+
+ const QEvent::Type type = event->type();
+ switch (type) {
+ case QEvent::GraphicsSceneMouseMove:
+ case QEvent::GraphicsSceneMousePress:
+ case QEvent::GraphicsSceneMouseRelease:
+ case QEvent::GraphicsSceneMouseDoubleClick: {
+ const QGraphicsSceneMouseEvent *me = static_cast<const QGraphicsSceneMouseEvent *>(event);
+ const Qt::MouseButton button = me->button();
+ const Qt::MouseButtons buttons = me->buttons();
+ debug << "QGraphicsSceneMouseEvent(";
+ QtDebugUtils::formatQEnum(debug, type);
+ if (type != QEvent::GraphicsSceneMouseMove) {
+ debug << ", ";
+ QtDebugUtils::formatQEnum(debug, button);
+ }
+ if (buttons && button != buttons) {
+ debug << ", buttons=";
+ QtDebugUtils::formatQFlags(debug, buttons);
+ }
+ QtDebugUtils::formatNonNullQFlags(debug, ", ", me->modifiers());
+ formatPositions(debug, me);
+ QtDebugUtils::formatNonNullQEnum(debug, ", ", me->source());
+ QtDebugUtils::formatNonNullQFlags(debug, ", flags=", me->flags());
+ debug << ')';
+ }
+ break;
+ case QEvent::GraphicsSceneContextMenu: {
+ const QGraphicsSceneContextMenuEvent *ce = static_cast<const QGraphicsSceneContextMenuEvent *>(event);
+ debug << "QGraphicsSceneContextMenuEvent(reason=" << ce->reason();
+ QtDebugUtils::formatNonNullQFlags(debug, ", ", ce->modifiers());
+ formatPositions(debug, ce);
+ debug << ')';
+ }
+ break;
+ case QEvent::GraphicsSceneHoverEnter:
+ case QEvent::GraphicsSceneHoverMove:
+ case QEvent::GraphicsSceneHoverLeave:
+ debug << "QGraphicsSceneHoverEvent(";
+ formatPositions(debug, static_cast<const QGraphicsSceneHoverEvent *>(event));
+ debug << ')';
+ break;
+ case QEvent::GraphicsSceneHelp:
+ break;
+ case QEvent::GraphicsSceneDragEnter:
+ case QEvent::GraphicsSceneDragMove:
+ case QEvent::GraphicsSceneDragLeave:
+ case QEvent::GraphicsSceneDrop: {
+ const QGraphicsSceneDragDropEvent *de = static_cast<const QGraphicsSceneDragDropEvent *>(event);
+ debug << "QGraphicsSceneDragDropEvent(proposedAction=";
+ QtDebugUtils::formatQEnum(debug, de->proposedAction());
+ debug << ", possibleActions=";
+ QtDebugUtils::formatQFlags(debug, de->possibleActions());
+ debug << ", source=" << de->source();
+ QtDebugUtils::formatNonNullQFlags(debug, ", buttons=", de->buttons());
+ QtDebugUtils::formatNonNullQFlags(debug, ", ", de->modifiers());
+ formatPositions(debug, de);
+ }
+ break;
+ case QEvent::GraphicsSceneWheel: {
+ const QGraphicsSceneWheelEvent *we = static_cast<const QGraphicsSceneWheelEvent *>(event);
+ debug << "QGraphicsSceneWheelEvent(";
+ QtDebugUtils::formatNonNullQFlags(debug, ", buttons=", we->buttons());
+ QtDebugUtils::formatNonNullQFlags(debug, ", ", we->modifiers());
+ formatPositions(debug, we);
+ debug << ')';
+ }
+ break;
+ default:
+ break;
+ }
+ return debug;
+}
+#endif // !QT_NO_DEBUG_STREAM
+
QT_END_NAMESPACE
diff --git a/src/widgets/graphicsview/qgraphicssceneevent.h b/src/widgets/graphicsview/qgraphicssceneevent.h
index 77b53e401d..9d940be2c0 100644
--- a/src/widgets/graphicsview/qgraphicssceneevent.h
+++ b/src/widgets/graphicsview/qgraphicssceneevent.h
@@ -320,6 +320,10 @@ public:
void setNewPos(const QPointF &pos);
};
+#ifndef QT_NO_DEBUG_STREAM
+Q_WIDGETS_EXPORT QDebug operator<<(QDebug, const QGraphicsSceneEvent *);
+#endif
+
QT_END_NAMESPACE
#endif
diff --git a/src/widgets/graphicsview/qgraphicsview.cpp b/src/widgets/graphicsview/qgraphicsview.cpp
index f79ee41e10..24647dd74c 100644
--- a/src/widgets/graphicsview/qgraphicsview.cpp
+++ b/src/widgets/graphicsview/qgraphicsview.cpp
@@ -2703,7 +2703,7 @@ void QGraphicsView::updateScene(const QList<QRectF> &rects)
dirtyViewportRects << xrect;
}
- foreach (const QRect &rect, dirtyViewportRects) {
+ for (const QRect &rect : qAsConst(dirtyViewportRects)) {
// Add the exposed rect to the update region. In rect update
// mode, we only count the bounding rect of items.
if (!boundingRectUpdate) {
@@ -3483,7 +3483,9 @@ void QGraphicsView::paintEvent(QPaintEvent *event)
// Recreate the background pixmap, and flag the whole background as
// exposed.
if (d->mustResizeBackgroundPixmap) {
- d->backgroundPixmap = QPixmap(viewport()->size());
+ const qreal dpr = d->viewport->devicePixelRatioF();
+ d->backgroundPixmap = QPixmap(viewport()->size() * dpr);
+ d->backgroundPixmap.setDevicePixelRatio(dpr);
QBrush bgBrush = viewport()->palette().brush(viewport()->backgroundRole());
if (!bgBrush.isOpaque())
d->backgroundPixmap.fill(Qt::transparent);
@@ -3679,14 +3681,20 @@ void QGraphicsView::scrollContentsBy(int dx, int dy)
&& X11->use_xrender
#endif
) {
+ // Below, QPixmap::scroll() works in device pixels, while the delta values
+ // and backgroundPixmapExposed are in device independent pixels.
+ const qreal dpr = d->backgroundPixmap.devicePixelRatio();
+ const qreal inverseDpr = qreal(1) / dpr;
+
// Scroll the background pixmap
QRegion exposed;
if (!d->backgroundPixmap.isNull())
- d->backgroundPixmap.scroll(dx, dy, d->backgroundPixmap.rect(), &exposed);
+ d->backgroundPixmap.scroll(dx * dpr, dy * dpr, d->backgroundPixmap.rect(), &exposed);
// Invalidate the background pixmap
d->backgroundPixmapExposed.translate(dx, dy);
- d->backgroundPixmapExposed += exposed;
+ const QRegion exposedScaled = QTransform::fromScale(inverseDpr, inverseDpr).map(exposed);
+ d->backgroundPixmapExposed += exposedScaled;
}
// Always replay on scroll.
diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp
index 9a8206de45..762e852f88 100644
--- a/src/widgets/itemviews/qheaderview.cpp
+++ b/src/widgets/itemviews/qheaderview.cpp
@@ -1853,11 +1853,13 @@ bool QHeaderView::restoreState(const QByteArray &state)
*/
void QHeaderView::reset()
{
+ Q_D(QHeaderView);
QAbstractItemView::reset();
// it would be correct to call clear, but some apps rely
// on the header keeping the sections, even after calling reset
//d->clear();
initializeSections();
+ d->invalidateCachedSizeHint();
}
/*!
@@ -2871,6 +2873,7 @@ bool QHeaderView::viewportEvent(QEvent *e)
}
return true; }
#endif // QT_CONFIG(statustip)
+ case QEvent::Resize:
case QEvent::FontChange:
case QEvent::StyleChange:
d->invalidateCachedSizeHint();
@@ -4086,7 +4089,7 @@ bool QHeaderViewPrivate::read(QDataStream &in)
}
int sectionItemsLengthTotal = 0;
- foreach (const SectionItem &section, newSectionItems)
+ for (const SectionItem &section : qAsConst(newSectionItems))
sectionItemsLengthTotal += section.size;
if (sectionItemsLengthTotal != lengthIn)
return false;
diff --git a/src/widgets/itemviews/qitemdelegate.cpp b/src/widgets/itemviews/qitemdelegate.cpp
index 91122283a4..dff4cc4593 100644
--- a/src/widgets/itemviews/qitemdelegate.cpp
+++ b/src/widgets/itemviews/qitemdelegate.cpp
@@ -103,7 +103,10 @@ public:
QItemEditorFactory *f;
bool clipPainting;
- QRect textLayoutBounds(const QStyleOptionViewItem &options) const;
+ QRect displayRect(const QModelIndex &index, const QStyleOptionViewItem &option,
+ const QRect &decorationRect, const QRect &checkRect) const;
+ QRect textLayoutBounds(const QStyleOptionViewItem &option,
+ const QRect &decorationRect, const QRect &checkRect) const;
QSizeF doTextLayout(int lineWidth) const;
mutable QTextLayout textLayout;
mutable QTextOption textOption;
@@ -121,21 +124,53 @@ public:
} tmp;
};
-QRect QItemDelegatePrivate::textLayoutBounds(const QStyleOptionViewItem &option) const
+QRect QItemDelegatePrivate::displayRect(const QModelIndex &index, const QStyleOptionViewItem &option,
+ const QRect &decorationRect, const QRect &checkRect) const
+{
+ Q_Q(const QItemDelegate);
+ const QVariant value = index.data(Qt::DisplayRole);
+ if (!value.isValid() || value.isNull())
+ return QRect();
+
+ const QString text = valueToText(value, option);
+ const QVariant fontVal = index.data(Qt::FontRole);
+ const QFont fnt = qvariant_cast<QFont>(fontVal).resolve(option.font);
+ return q->textRectangle(nullptr,
+ textLayoutBounds(option, decorationRect, checkRect),
+ fnt, text);
+}
+
+// similar to QCommonStylePrivate::viewItemSize(Qt::DisplayRole)
+QRect QItemDelegatePrivate::textLayoutBounds(const QStyleOptionViewItem &option,
+ const QRect &decorationRect, const QRect &checkRect) const
{
QRect rect = option.rect;
+ const QWidget *w = widget(option);
+ QStyle *style = w ? w->style() : QApplication::style();
const bool wrapText = option.features & QStyleOptionViewItem::WrapText;
+ // see QItemDelegate::drawDisplay
+ const int textMargin = style->pixelMetric(QStyle::PM_FocusFrameHMargin, 0, w) + 1;
switch (option.decorationPosition) {
case QStyleOptionViewItem::Left:
case QStyleOptionViewItem::Right:
- rect.setWidth(wrapText && rect.isValid() ? rect.width() : (QFIXED_MAX));
+ rect.setWidth(wrapText && rect.isValid() ? rect.width() - 2 * textMargin : (QFIXED_MAX));
break;
case QStyleOptionViewItem::Top:
case QStyleOptionViewItem::Bottom:
- rect.setWidth(wrapText ? option.decorationSize.width() : (QFIXED_MAX));
+ rect.setWidth(wrapText ? option.decorationSize.width() - 2 * textMargin : (QFIXED_MAX));
break;
}
+ if (wrapText) {
+ if (!decorationRect.isNull())
+ rect.setWidth(rect.width() - decorationRect.width() - 2 * textMargin);
+ if (!checkRect.isNull())
+ rect.setWidth(rect.width() - checkRect.width() - 2 * textMargin);
+ // adjust height to be sure that the text fits
+ const QSizeF size = doTextLayout(rect.width());
+ rect.setHeight(qCeil(size.height()));
+ }
+
return rect;
}
@@ -395,14 +430,6 @@ void QItemDelegate::paint(QPainter *painter,
decorationRect = QRect();
}
- QString text;
- QRect displayRect;
- value = index.data(Qt::DisplayRole);
- if (value.isValid() && !value.isNull()) {
- text = d->valueToText(value, opt);
- displayRect = textRectangle(painter, d->textLayoutBounds(opt), opt.font, text);
- }
-
QRect checkRect;
Qt::CheckState checkState = Qt::Unchecked;
value = index.data(Qt::CheckStateRole);
@@ -411,6 +438,14 @@ void QItemDelegate::paint(QPainter *painter,
checkRect = doCheck(opt, opt.rect, value);
}
+ QString text;
+ QRect displayRect;
+ value = index.data(Qt::DisplayRole);
+ if (value.isValid() && !value.isNull()) {
+ text = d->valueToText(value, opt);
+ displayRect = d->displayRect(index, opt, decorationRect, checkRect);
+ }
+
// do the layout
doLayout(opt, &checkRect, &decorationRect, &displayRect, false);
@@ -440,12 +475,13 @@ void QItemDelegate::paint(QPainter *painter,
QSize QItemDelegate::sizeHint(const QStyleOptionViewItem &option,
const QModelIndex &index) const
{
+ Q_D(const QItemDelegate);
QVariant value = index.data(Qt::SizeHintRole);
if (value.isValid())
return qvariant_cast<QSize>(value);
QRect decorationRect = rect(option, index, Qt::DecorationRole);
- QRect displayRect = rect(option, index, Qt::DisplayRole);
QRect checkRect = rect(option, index, Qt::CheckStateRole);
+ QRect displayRect = d->displayRect(index, option, decorationRect, checkRect);
doLayout(option, &checkRect, &decorationRect, &displayRect, true);
@@ -1000,8 +1036,8 @@ QPixmap *QItemDelegate::selected(const QPixmap &pixmap, const QPalette &palette,
/*!
\internal
+ Only used (and usable) for Qt::DecorationRole and Qt::CheckStateRole
*/
-
QRect QItemDelegate::rect(const QStyleOptionViewItem &option,
const QModelIndex &index, int role) const
{
@@ -1032,7 +1068,9 @@ QRect QItemDelegate::rect(const QStyleOptionViewItem &option,
const QString text = d->valueToText(value, option);
value = index.data(Qt::FontRole);
QFont fnt = qvariant_cast<QFont>(value).resolve(option.font);
- return textRectangle(0, d->textLayoutBounds(option), fnt, text); }
+ return textRectangle(nullptr,
+ d->textLayoutBounds(option, QRect(), QRect()),
+ fnt, text); }
}
}
return QRect();
diff --git a/src/widgets/itemviews/qlistview.cpp b/src/widgets/itemviews/qlistview.cpp
index a7174a92e8..e5769940d4 100644
--- a/src/widgets/itemviews/qlistview.cpp
+++ b/src/widgets/itemviews/qlistview.cpp
@@ -1631,6 +1631,32 @@ bool QListView::isSelectionRectVisible() const
}
/*!
+ \property QListView::itemAlignment
+ \brief the alignment of each item in its cell
+ \since 5.12
+
+ This is only supported in ListMode with TopToBottom flow
+ and with wrapping enabled.
+ The default alignment is 0, which means that an item fills
+ its cell entirely.
+*/
+void QListView::setItemAlignment(Qt::Alignment alignment)
+{
+ Q_D(QListView);
+ if (d->itemAlignment == alignment)
+ return;
+ d->itemAlignment = alignment;
+ if (viewMode() == ListMode && flow() == QListView::TopToBottom && isWrapping())
+ d->doDelayedItemsLayout();
+}
+
+Qt::Alignment QListView::itemAlignment() const
+{
+ Q_D(const QListView);
+ return d->itemAlignment;
+}
+
+/*!
\reimp
*/
bool QListView::event(QEvent *e)
@@ -1656,7 +1682,8 @@ QListViewPrivate::QListViewPrivate()
column(0),
uniformItemSizes(false),
batchSize(100),
- showElasticBand(false)
+ showElasticBand(false),
+ itemAlignment(Qt::Alignment())
{
}
@@ -2366,6 +2393,7 @@ QListViewItem QListModeViewBase::indexToListViewItem(const QModelIndex &index) c
options.rect.setSize(contentsSize);
QSize size = (uniformItemSizes() && cachedItemSize().isValid())
? cachedItemSize() : itemSize(options, index);
+ QSize cellSize = size;
QPoint pos;
if (flow() == QListView::LeftToRight) {
@@ -2378,12 +2406,22 @@ QListViewItem QListModeViewBase::indexToListViewItem(const QModelIndex &index) c
int right = (segment + 1 >= segmentPositions.count()
? contentsSize.width()
: segmentPositions.at(segment + 1));
- size.setWidth(right - pos.x());
+ cellSize.setWidth(right - pos.x());
} else { // make the items as wide as the viewport
- size.setWidth(qMax(size.width(), viewport()->width() - 2 * spacing()));
+ cellSize.setWidth(qMax(size.width(), viewport()->width() - 2 * spacing()));
}
}
+ if (dd->itemAlignment & Qt::AlignHorizontal_Mask) {
+ size.setWidth(qMin(size.width(), cellSize.width()));
+ if (dd->itemAlignment & Qt::AlignRight)
+ pos.setX(pos.x() + cellSize.width() - size.width());
+ if (dd->itemAlignment & Qt::AlignHCenter)
+ pos.setX(pos.x() + (cellSize.width() - size.width()) / 2);
+ } else {
+ size.setWidth(cellSize.width());
+ }
+
return QListViewItem(QRect(pos, size), index.row());
}
@@ -2562,8 +2600,18 @@ QVector<QModelIndex> QListModeViewBase::intersectingSet(const QRect &area) const
if (isHidden(row))
continue;
QModelIndex index = modelIndex(row);
- if (index.isValid())
- ret += index;
+ if (index.isValid()) {
+ if (flow() == QListView::LeftToRight || dd->itemAlignment == Qt::Alignment()) {
+ ret += index;
+ } else {
+ const auto viewItem = indexToListViewItem(index);
+ const int iw = viewItem.width();
+ const int startPos = qMax(segStartPosition, segmentPositions.at(seg));
+ const int endPos = qMin(segmentPositions.at(seg + 1), segEndPosition);
+ if (endPos >= viewItem.x && startPos < viewItem.x + iw)
+ ret += index;
+ }
+ }
#if 0 // for debugging
else
qWarning("intersectingSet: row %d was invalid", row);
@@ -2603,7 +2651,7 @@ int QListModeViewBase::perItemScrollingPageSteps(int length, int bounds, bool wr
positions = segmentPositions;
else if (!flowPositions.isEmpty()) {
positions.reserve(scrollValueMap.size());
- foreach (int itemShown, scrollValueMap)
+ for (int itemShown : scrollValueMap)
positions.append(flowPositions.at(itemShown));
}
if (positions.isEmpty() || bounds <= length)
@@ -2767,6 +2815,8 @@ bool QIconModeViewBase::filterStartDrag(Qt::DropActions supportedActions)
drag->setHotSpot(dd->pressedPosition - rect.topLeft());
Qt::DropAction action = drag->exec(supportedActions, dd->defaultDropAction);
draggedItems.clear();
+ // for internal moves the action was set to Qt::CopyAction in
+ // filterDropEvent() to avoid the deletion here
if (action == Qt::MoveAction)
dd->clearOrRemove();
}
@@ -2784,7 +2834,7 @@ bool QIconModeViewBase::filterDropEvent(QDropEvent *e)
if (qq->acceptDrops()) {
const Qt::ItemFlags dropableFlags = Qt::ItemIsDropEnabled|Qt::ItemIsEnabled;
const QVector<QModelIndex> &dropIndices = intersectingSet(QRect(end, QSize(1, 1)));
- foreach (const QModelIndex &index, dropIndices)
+ for (const QModelIndex &index : dropIndices)
if ((index.flags() & dropableFlags) == dropableFlags)
return false;
}
@@ -2803,6 +2853,8 @@ bool QIconModeViewBase::filterDropEvent(QDropEvent *e)
dd->stopAutoScroll();
draggedItems.clear();
dd->emitIndexesMoved(indexes);
+ // do not delete item on internal move, see filterStartDrag()
+ e->setDropAction(Qt::CopyAction);
e->accept(); // we have handled the event
// if the size has not grown, we need to check if it has shrinked
if (contentsSize != contents) {
diff --git a/src/widgets/itemviews/qlistview.h b/src/widgets/itemviews/qlistview.h
index 9fc4035999..8a5d5e02ae 100644
--- a/src/widgets/itemviews/qlistview.h
+++ b/src/widgets/itemviews/qlistview.h
@@ -65,6 +65,7 @@ class Q_WIDGETS_EXPORT QListView : public QAbstractItemView
Q_PROPERTY(int batchSize READ batchSize WRITE setBatchSize)
Q_PROPERTY(bool wordWrap READ wordWrap WRITE setWordWrap)
Q_PROPERTY(bool selectionRectVisible READ isSelectionRectVisible WRITE setSelectionRectVisible)
+ Q_PROPERTY(Qt::Alignment itemAlignment READ itemAlignment WRITE setItemAlignment)
public:
enum Movement { Static, Free, Snap };
@@ -125,6 +126,9 @@ public:
void setSelectionRectVisible(bool show);
bool isSelectionRectVisible() const;
+ void setItemAlignment(Qt::Alignment alignment);
+ Qt::Alignment itemAlignment() const;
+
QRect visualRect(const QModelIndex &index) const override;
void scrollTo(const QModelIndex &index, ScrollHint hint = EnsureVisible) override;
QModelIndex indexAt(const QPoint &p) const override;
diff --git a/src/widgets/itemviews/qlistview_p.h b/src/widgets/itemviews/qlistview_p.h
index ca947292e3..181386d4d0 100644
--- a/src/widgets/itemviews/qlistview_p.h
+++ b/src/widgets/itemviews/qlistview_p.h
@@ -431,6 +431,8 @@ public:
QRect elasticBand;
bool showElasticBand;
+
+ Qt::Alignment itemAlignment;
};
// inline implementations
diff --git a/src/widgets/itemviews/qlistwidget.cpp b/src/widgets/itemviews/qlistwidget.cpp
index 4f1c7fe80a..72e0a67a64 100644
--- a/src/widgets/itemviews/qlistwidget.cpp
+++ b/src/widgets/itemviews/qlistwidget.cpp
@@ -48,9 +48,6 @@
QT_BEGIN_NAMESPACE
-// workaround for VC++ 6.0 linker bug (?)
-typedef bool(*LessThan)(const QPair<QListWidgetItem*,int>&,const QPair<QListWidgetItem*,int>&);
-
class QListWidgetMimeData : public QMimeData
{
Q_OBJECT
@@ -301,7 +298,7 @@ void QListModel::sort(int column, Qt::SortOrder order)
sorting[i].second = i;
}
- LessThan compare = (order == Qt::AscendingOrder ? &itemLessThan : &itemGreaterThan);
+ const auto compare = (order == Qt::AscendingOrder ? &itemLessThan : &itemGreaterThan);
std::sort(sorting.begin(), sorting.end(), compare);
QModelIndexList fromIndexes;
QModelIndexList toIndexes;
@@ -338,7 +335,7 @@ void QListModel::ensureSorted(int column, Qt::SortOrder order, int start, int en
sorting[i].second = start + i;
}
- LessThan compare = (order == Qt::AscendingOrder ? &itemLessThan : &itemGreaterThan);
+ const auto compare = (order == Qt::AscendingOrder ? &itemLessThan : &itemGreaterThan);
std::sort(sorting.begin(), sorting.end(), compare);
QModelIndexList oldPersistentIndexes = persistentIndexList();
@@ -1847,7 +1844,7 @@ QMimeData *QListWidget::mimeData(const QList<QListWidgetItem*> items) const
// if non empty, it's called from the model's own mimeData
if (cachedIndexes.isEmpty()) {
cachedIndexes.reserve(items.count());
- foreach (QListWidgetItem *item, items)
+ for (QListWidgetItem *item : items)
cachedIndexes << indexFromItem(item);
QMimeData *result = d->listModel()->internalMimeData();
diff --git a/src/widgets/itemviews/qtableview.cpp b/src/widgets/itemviews/qtableview.cpp
index 1938fd8e92..9c2b3e5b54 100644
--- a/src/widgets/itemviews/qtableview.cpp
+++ b/src/widgets/itemviews/qtableview.cpp
@@ -74,7 +74,7 @@ void QSpanCollection::addSpan(QSpanCollection::Span *span)
//the previouslist is the list of spans that sarts _before_ the row of the span.
// and which may intersect this row.
const SubIndex previousList = it_y.value();
- foreach(Span *s, previousList) {
+ for (Span *s : previousList) {
//If a subspans intersect the row, we need to split it into subspans
if(s->bottom() >= span->top())
sub_index.insert(-s->left(), s);
@@ -798,6 +798,7 @@ void QTableViewPrivate::drawAndClipSpans(const QRegion &area, QPainter *painter,
const QStyleOptionViewItem &option, QBitArray *drawn,
int firstVisualRow, int lastVisualRow, int firstVisualColumn, int lastVisualColumn)
{
+ Q_Q(const QTableView);
bool alternateBase = false;
QRegion region = viewport->rect();
@@ -816,7 +817,7 @@ void QTableViewPrivate::drawAndClipSpans(const QRegion &area, QPainter *painter,
visibleSpans = set.toList();
}
- foreach (QSpanCollection::Span *span, visibleSpans) {
+ for (QSpanCollection::Span *span : qAsConst(visibleSpans)) {
int row = span->top();
int col = span->left();
QModelIndex index = model->index(row, col, root);
@@ -831,6 +832,18 @@ void QTableViewPrivate::drawAndClipSpans(const QRegion &area, QPainter *painter,
alternateBase = alternatingColors && (span->top() & 1);
opt.features.setFlag(QStyleOptionViewItem::Alternate, alternateBase);
drawCell(painter, opt, index);
+ if (showGrid) {
+ // adjust the clip rect to be able to paint the top & left grid lines
+ // if the headers are not visible, see paintEvent()
+ if (horizontalHeader->visualIndex(row) == 0)
+ rect.setTop(rect.top() + 1);
+ if (verticalHeader->visualIndex(row) == 0) {
+ if (q->isLeftToRight())
+ rect.setLeft(rect.left() + 1);
+ else
+ rect.setRight(rect.right() - 1);
+ }
+ }
region -= rect;
for (int r = span->top(); r <= span->bottom(); ++r) {
const int vr = visualRow(r);
@@ -1163,7 +1176,6 @@ void QTableView::doItemsLayout()
{
Q_D(QTableView);
QAbstractItemView::doItemsLayout();
- d->verticalHeader->d_func()->setScrollOffset(verticalScrollBar(), verticalScrollMode());
if (!d->verticalHeader->updatesEnabled())
d->verticalHeader->setUpdatesEnabled(true);
}
@@ -1321,10 +1333,10 @@ void QTableView::scrollContentsBy(int dx, int dy)
//we need to update the first line of the previous top item in the view
//because it has the grid drawn if the header is invisible.
//It is strictly related to what's done at then end of the paintEvent
- if (dy > 0 && d->horizontalHeader->isHidden() && d->verticalScrollMode == ScrollPerItem) {
+ if (dy > 0 && d->horizontalHeader->isHidden()) {
d->viewport->update(0, dy, d->viewport->width(), dy);
}
- if (dx > 0 && d->verticalHeader->isHidden() && d->horizontalScrollMode == ScrollPerItem) {
+ if (dx > 0 && d->verticalHeader->isHidden()) {
d->viewport->update(dx, 0, dx, d->viewport->height());
}
}
@@ -1504,10 +1516,26 @@ void QTableView::paintEvent(QPaintEvent *event)
//draw the top & left grid lines if the headers are not visible.
//We do update this line when subsequent scroll happen (see scrollContentsBy)
- if (horizontalHeader->isHidden() && verticalScrollMode() == ScrollPerItem)
- painter.drawLine(dirtyArea.left(), 0, dirtyArea.right(), 0);
- if (verticalHeader->isHidden() && horizontalScrollMode() == ScrollPerItem)
- painter.drawLine(0, dirtyArea.top(), 0, dirtyArea.bottom());
+ if (horizontalHeader->isHidden() && top == 0) {
+ const int row = verticalHeader->logicalIndex(top);
+ if (!verticalHeader->isSectionHidden(row)) {
+ const int rowY = rowViewportPosition(row) + offset.y();
+ if (rowY == dirtyArea.top())
+ painter.drawLine(dirtyArea.left(), rowY, dirtyArea.right(), rowY);
+ }
+ }
+ if (verticalHeader->isHidden() && left == 0) {
+ const int col = horizontalHeader->logicalIndex(left);
+ if (!horizontalHeader->isSectionHidden(col)) {
+ int colX = columnViewportPosition(col) + offset.x();
+ if (!isLeftToRight())
+ colX += columnWidth(left) - 1;
+ if (isLeftToRight() && colX == dirtyArea.left())
+ painter.drawLine(colX, dirtyArea.top(), colX, dirtyArea.bottom());
+ if (!isLeftToRight() && colX == dirtyArea.right())
+ painter.drawLine(colX, dirtyArea.top(), colX, dirtyArea.bottom());
+ }
+ }
painter.setPen(old);
}
}
@@ -2194,6 +2222,7 @@ void QTableView::updateGeometries()
verticalScrollBar()->setRange(0, verticalLength - vsize.height());
verticalScrollBar()->d_func()->itemviewChangeSingleStep(qMax(vsize.height() / (rowsInViewport + 1), 2));
}
+ d->verticalHeader->d_func()->setScrollOffset(verticalScrollBar(), verticalScrollMode());
d->geometryRecursionBlock = false;
QAbstractItemView::updateGeometries();
diff --git a/src/widgets/itemviews/qtablewidget.cpp b/src/widgets/itemviews/qtablewidget.cpp
index 9d5a2aa1bd..11925af7a0 100644
--- a/src/widgets/itemviews/qtablewidget.cpp
+++ b/src/widgets/itemviews/qtablewidget.cpp
@@ -453,17 +453,20 @@ bool QTableModel::setItemData(const QModelIndex &index, const QMap<int, QVariant
QTableWidget *view = qobject_cast<QTableWidget*>(QObject::parent());
QTableWidgetItem *itm = item(index);
if (itm) {
- itm->view = 0; // prohibits item from calling itemChanged()
- bool changed = false;
+ itm->view = nullptr; // prohibits item from calling itemChanged()
+ QVector<int> rolesVec;
for (QMap<int, QVariant>::ConstIterator it = roles.constBegin(); it != roles.constEnd(); ++it) {
- if (itm->data(it.key()) != it.value()) {
- itm->setData(it.key(), it.value());
- changed = true;
+ const int role = (it.key() == Qt::EditRole ? Qt::DisplayRole : it.key());
+ if (itm->data(role) != it.value()) {
+ itm->setData(role, it.value());
+ rolesVec += role;
+ if (role == Qt::DisplayRole)
+ rolesVec += Qt::EditRole;
}
}
itm->view = view;
- if (changed)
- itemChanged(itm);
+ if (!rolesVec.isEmpty())
+ itemChanged(itm, rolesVec);
return true;
}
@@ -506,7 +509,7 @@ void QTableModel::sort(int column, Qt::SortOrder order)
unsortable.append(row);
}
- LessThan compare = (order == Qt::AscendingOrder ? &itemLessThan : &itemGreaterThan);
+ const auto compare = (order == Qt::AscendingOrder ? &itemLessThan : &itemGreaterThan);
std::stable_sort(sortable.begin(), sortable.end(), compare);
QVector<QTableWidgetItem*> sorted_table(tableItems.count());
@@ -558,7 +561,7 @@ void QTableModel::ensureSorted(int column, Qt::SortOrder order,
sorting.append(QPair<QTableWidgetItem*,int>(itm, row));
}
- LessThan compare = (order == Qt::AscendingOrder ? &itemLessThan : &itemGreaterThan);
+ const auto compare = (order == Qt::AscendingOrder ? &itemLessThan : &itemGreaterThan);
std::stable_sort(sorting.begin(), sorting.end(), compare);
QModelIndexList oldPersistentIndexes, newPersistentIndexes;
QVector<QTableWidgetItem*> newTable = tableItems;
@@ -771,7 +774,7 @@ void QTableModel::clearContents()
endResetModel();
}
-void QTableModel::itemChanged(QTableWidgetItem *item)
+void QTableModel::itemChanged(QTableWidgetItem *item, const QVector<int> &roles)
{
if (!item)
return;
@@ -787,7 +790,7 @@ void QTableModel::itemChanged(QTableWidgetItem *item)
} else {
QModelIndex idx = index(item);
if (idx.isValid())
- emit dataChanged(idx, idx);
+ emit dataChanged(idx, idx, roles);
}
}
@@ -1386,8 +1389,13 @@ void QTableWidgetItem::setData(int role, const QVariant &value)
}
if (!found)
values.append(QWidgetItemData(role, value));
- if (QTableModel *model = (view ? qobject_cast<QTableModel*>(view->model()) : 0))
- model->itemChanged(this);
+ if (QTableModel *model = (view ? qobject_cast<QTableModel*>(view->model()) : nullptr))
+ {
+ const QVector<int> roles((role == Qt::DisplayRole) ?
+ QVector<int>({Qt::DisplayRole, Qt::EditRole}) :
+ QVector<int>({role}));
+ model->itemChanged(this, roles);
+ }
}
/*!
@@ -2595,7 +2603,7 @@ QMimeData *QTableWidget::mimeData(const QList<QTableWidgetItem*> items) const
// if non empty, it's called from the model's own mimeData
if (cachedIndexes.isEmpty()) {
cachedIndexes.reserve(items.count());
- foreach (QTableWidgetItem *item, items)
+ for (QTableWidgetItem *item : items)
cachedIndexes << indexFromItem(item);
QMimeData *result = d->tableModel()->internalMimeData();
diff --git a/src/widgets/itemviews/qtablewidget.h b/src/widgets/itemviews/qtablewidget.h
index 7322e3aed7..9de27d164f 100644
--- a/src/widgets/itemviews/qtablewidget.h
+++ b/src/widgets/itemviews/qtablewidget.h
@@ -302,6 +302,7 @@ Q_SIGNALS:
void itemActivated(QTableWidgetItem *item);
void itemEntered(QTableWidgetItem *item);
+ // ### Qt 6: add changed roles
void itemChanged(QTableWidgetItem *item);
void currentItemChanged(QTableWidgetItem *current, QTableWidgetItem *previous);
diff --git a/src/widgets/itemviews/qtablewidget_p.h b/src/widgets/itemviews/qtablewidget_p.h
index 6412477be0..9899272fce 100644
--- a/src/widgets/itemviews/qtablewidget_p.h
+++ b/src/widgets/itemviews/qtablewidget_p.h
@@ -62,9 +62,6 @@ QT_REQUIRE_CONFIG(tablewidget);
QT_BEGIN_NAMESPACE
-// workaround for VC++ 6.0 linker bug
-typedef bool(*LessThan)(const QPair<QTableWidgetItem*,int>&,const QPair<QTableWidgetItem*,int>&);
-
class QTableWidgetMimeData : public QMimeData
{
Q_OBJECT
@@ -160,7 +157,7 @@ public:
void clear();
void clearContents();
- void itemChanged(QTableWidgetItem *item);
+ void itemChanged(QTableWidgetItem *item, const QVector<int> &roles = QVector<int>());
QTableWidgetItem *createItem() const;
const QTableWidgetItem *itemPrototype() const;
diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp
index fbfbe56246..b339fe0f3b 100644
--- a/src/widgets/itemviews/qtreeview.cpp
+++ b/src/widgets/itemviews/qtreeview.cpp
@@ -632,11 +632,8 @@ bool QTreeView::isFirstColumnSpanned(int row, const QModelIndex &parent) const
Q_D(const QTreeView);
if (d->spanningIndexes.isEmpty() || !d->model)
return false;
- QModelIndex index = d->model->index(row, 0, parent);
- for (int i = 0; i < d->spanningIndexes.count(); ++i)
- if (d->spanningIndexes.at(i) == index)
- return true;
- return false;
+ const QModelIndex index = d->model->index(row, 0, parent);
+ return d->spanningIndexes.contains(index);
}
/*!
@@ -653,20 +650,14 @@ void QTreeView::setFirstColumnSpanned(int row, const QModelIndex &parent, bool s
Q_D(QTreeView);
if (!d->model)
return;
- QModelIndex index = d->model->index(row, 0, parent);
+ const QModelIndex index = d->model->index(row, 0, parent);
if (!index.isValid())
return;
- if (span) {
- QPersistentModelIndex persistent(index);
- if (!d->spanningIndexes.contains(persistent))
- d->spanningIndexes.append(persistent);
- } else {
- QPersistentModelIndex persistent(index);
- int i = d->spanningIndexes.indexOf(persistent);
- if (i >= 0)
- d->spanningIndexes.remove(i);
- }
+ if (span)
+ d->spanningIndexes.insert(index);
+ else
+ d->spanningIndexes.remove(index);
d->executePostedLayout();
int i = d->viewIndex(index);
@@ -1420,7 +1411,7 @@ QItemViewPaintPairs QTreeViewPrivate::draggablePaintPairs(const QModelIndexList
if (spanningIndexes.isEmpty())
return QAbstractItemViewPrivate::draggablePaintPairs(indexes, r);
QModelIndexList list;
- foreach (const QModelIndex &idx, indexes) {
+ for (const QModelIndex &idx : indexes) {
if (idx.column() > 0 && q->isFirstColumnSpanned(idx.row(), idx.parent()))
continue;
list << idx;
@@ -2000,19 +1991,21 @@ void QTreeView::keyPressEvent(QKeyEvent *event)
if (d->isIndexValid(current) && d->model && d->itemsExpandable) {
switch (event->key()) {
case Qt::Key_Asterisk: {
+ // do layouting only once after expanding is done
+ d->doDelayedItemsLayout();
QStack<QModelIndex> parents;
parents.push(current);
- while (!parents.isEmpty()) {
- QModelIndex parent = parents.pop();
- for (int row = 0; row < d->model->rowCount(parent); ++row) {
- QModelIndex child = d->model->index(row, 0, parent);
- if (!d->isIndexValid(child))
- break;
- parents.push(child);
- expand(child);
- }
+ while (!parents.isEmpty()) {
+ QModelIndex parent = parents.pop();
+ for (int row = 0; row < d->model->rowCount(parent); ++row) {
+ QModelIndex child = d->model->index(row, 0, parent);
+ if (!d->isIndexValid(child))
+ break;
+ parents.push(child);
+ expand(child);
}
- expand(current);
+ }
+ expand(current);
break; }
case Qt::Key_Plus:
expand(current);
@@ -2495,7 +2488,6 @@ void QTreeView::scrollContentsBy(int dx, int dy)
int previousScrollbarValue = currentScrollbarValue + dy; // -(-dy)
int currentViewIndex = currentScrollbarValue; // the first visible item
int previousViewIndex = previousScrollbarValue;
- const QVector<QTreeViewItem> viewItems = d->viewItems;
dy = 0;
if (previousViewIndex < currentViewIndex) { // scrolling down
for (int i = previousViewIndex; i < currentViewIndex; ++i) {
diff --git a/src/widgets/itemviews/qtreeview_p.h b/src/widgets/itemviews/qtreeview_p.h
index 9a391ee88a..8b217036a2 100644
--- a/src/widgets/itemviews/qtreeview_p.h
+++ b/src/widgets/itemviews/qtreeview_p.h
@@ -247,7 +247,7 @@ public:
void updateIndentationFromStyle();
// used for spanning rows
- QVector<QPersistentModelIndex> spanningIndexes;
+ QSet<QPersistentModelIndex> spanningIndexes;
// used for updating resized columns
int columnResizeTimerID;
diff --git a/src/widgets/itemviews/qtreewidget.cpp b/src/widgets/itemviews/qtreewidget.cpp
index 654c241079..d0728b1af2 100644
--- a/src/widgets/itemviews/qtreewidget.cpp
+++ b/src/widgets/itemviews/qtreewidget.cpp
@@ -52,9 +52,6 @@
QT_BEGIN_NAMESPACE
-// workaround for VC++ 6.0 linker bug (?)
-typedef bool(*LessThan)(const QPair<QTreeWidgetItem*,int>&,const QPair<QTreeWidgetItem*,int>&);
-
class QTreeModelLessThan
{
public:
@@ -610,7 +607,7 @@ void QTreeModel::ensureSorted(int column, Qt::SortOrder order,
sorting[i].second = start + i;
}
- LessThan compare = (order == Qt::AscendingOrder ? &itemLessThan : &itemGreaterThan);
+ const auto compare = (order == Qt::AscendingOrder ? &itemLessThan : &itemGreaterThan);
std::stable_sort(sorting.begin(), sorting.end(), compare);
QModelIndexList oldPersistentIndexes;
@@ -777,7 +774,7 @@ bool QTreeModel::isChanging() const
if column is -1 then all columns have changed
*/
-void QTreeModel::emitDataChanged(QTreeWidgetItem *item, int column)
+void QTreeModel::emitDataChanged(QTreeWidgetItem *item, int column, const QVector<int> &roles)
{
if (signalsBlocked())
return;
@@ -800,7 +797,7 @@ void QTreeModel::emitDataChanged(QTreeWidgetItem *item, int column)
topLeft = index(item, column);
bottomRight = topLeft;
}
- emit dataChanged(topLeft, bottomRight);
+ emit dataChanged(topLeft, bottomRight, roles);
}
void QTreeModel::beginInsertItems(QTreeWidgetItem *parent, int row, int count)
@@ -850,7 +847,7 @@ void QTreeModel::sortItems(QList<QTreeWidgetItem*> *items, int column, Qt::SortO
}
// do the sorting
- LessThan compare = (order == Qt::AscendingOrder ? &itemLessThan : &itemGreaterThan);
+ const auto compare = (order == Qt::AscendingOrder ? &itemLessThan : &itemGreaterThan);
std::stable_sort(sorting.begin(), sorting.end(), compare);
QModelIndexList fromList;
@@ -1004,7 +1001,6 @@ void QTreeModel::timerEvent(QTimerEvent *ev)
*/
/*!
- \fn void QTreeWidgetItem::setHidden(bool hide)
\since 4.2
Hides the item if \a hide is true, otherwise shows the item.
@@ -1015,6 +1011,14 @@ void QTreeModel::timerEvent(QTimerEvent *ev)
\sa isHidden()
*/
+void QTreeWidgetItem::setHidden(bool ahide)
+{
+ if (view) {
+ view->setItemHidden(this, ahide);
+ d->hidden = ahide;
+ }
+}
+
/*!
\fn bool QTreeWidgetItem::isHidden() const
\since 4.2
@@ -1024,6 +1028,11 @@ void QTreeModel::timerEvent(QTimerEvent *ev)
\sa setHidden()
*/
+bool QTreeWidgetItem::isHidden() const
+{
+ return (view ? d->hidden : false);
+}
+
/*!
\fn void QTreeWidgetItem::setExpanded(bool expand)
\since 4.2
@@ -1651,6 +1660,25 @@ void QTreeWidgetItem::setFlags(Qt::ItemFlags flags)
itemChanged();
}
+void QTreeWidgetItemPrivate::updateHiddenStatus(QTreeWidgetItem *item, bool inserting)
+{
+ QTreeModel *model = (item->view ? qobject_cast<QTreeModel*>(item->view->model()) : 0);
+ if (!model)
+ return;
+ QStack<QTreeWidgetItem *> parents;
+ parents.push(item);
+ while (!parents.isEmpty()) {
+ QTreeWidgetItem *parent = parents.pop();
+ QModelIndex index = model->index(parent, 0);
+ if (parent->d->hidden)
+ item->view->setRowHidden(index.row(), index.parent(), inserting);
+ for (int i = 0; i < parent->children.count(); ++i) {
+ QTreeWidgetItem *child = parent->children.at(i);
+ parents.push(child);
+ }
+ }
+}
+
void QTreeWidgetItemPrivate::propagateDisabled(QTreeWidgetItem *item)
{
Q_ASSERT(item);
@@ -1766,11 +1794,14 @@ void QTreeWidgetItem::setData(int column, int role, const QVariant &value)
}
if (model) {
- model->emitDataChanged(this, column);
+ const QVector<int> roles((role == Qt::DisplayRole || role == Qt::EditRole) ?
+ QVector<int>({Qt::DisplayRole, Qt::EditRole}) :
+ QVector<int>({role}));
+ model->emitDataChanged(this, column, roles);
if (role == Qt::CheckStateRole) {
QTreeWidgetItem *p;
for (p = par; p && (p->itemFlags & Qt::ItemIsAutoTristate); p = p->par)
- model->emitDataChanged(p, column);
+ model->emitDataChanged(p, column, roles);
}
}
}
@@ -1937,6 +1968,7 @@ void QTreeWidgetItem::insertChild(int index, QTreeWidgetItem *child)
stack.push(i->children.at(c));
}
children.insert(index, child);
+ d->updateHiddenStatus(child, true);
model->endInsertItems();
model->skipPendingSort = wasSkipSort;
} else {
@@ -1974,6 +2006,7 @@ QTreeWidgetItem *QTreeWidgetItem::takeChild(int index)
}
if (index >= 0 && index < children.count()) {
if (model) model->beginRemoveItems(this, index, 1);
+ d->updateHiddenStatus(children.at(index), false);
QTreeWidgetItem *item = children.takeAt(index);
item->par = 0;
QStack<QTreeWidgetItem*> stack;
@@ -2052,6 +2085,7 @@ void QTreeWidgetItem::insertChildren(int index, const QList<QTreeWidgetItem*> &c
this->children.insert(index + n, child);
if (child->par)
d->propagateDisabled(child);
+ d->updateHiddenStatus(child, true);
}
if (model) model->endInsertItems();
}
@@ -3099,6 +3133,8 @@ bool QTreeWidget::isItemHidden(const QTreeWidgetItem *item) const
*/
void QTreeWidget::setItemHidden(const QTreeWidgetItem *item, bool hide)
{
+ if (!item)
+ return;
Q_D(QTreeWidget);
if (item == d->treeModel()->headerItem) {
header()->setHidden(hide);
@@ -3106,6 +3142,7 @@ void QTreeWidget::setItemHidden(const QTreeWidgetItem *item, bool hide)
const QModelIndex index = d->index(item);
setRowHidden(index.row(), index.parent(), hide);
}
+ item->d->hidden = hide;
}
/*!
diff --git a/src/widgets/itemviews/qtreewidget.h b/src/widgets/itemviews/qtreewidget.h
index a31af0428a..975f208702 100644
--- a/src/widgets/itemviews/qtreewidget.h
+++ b/src/widgets/itemviews/qtreewidget.h
@@ -82,8 +82,8 @@ public:
inline void setSelected(bool select);
inline bool isSelected() const;
- inline void setHidden(bool hide);
- inline bool isHidden() const;
+ void setHidden(bool hide);
+ bool isHidden() const;
inline void setExpanded(bool expand);
inline bool isExpanded() const;
@@ -339,6 +339,7 @@ Q_SIGNALS:
void itemDoubleClicked(QTreeWidgetItem *item, int column);
void itemActivated(QTreeWidgetItem *item, int column);
void itemEntered(QTreeWidgetItem *item, int column);
+ // ### Qt 6: add changed roles
void itemChanged(QTreeWidgetItem *item, int column);
void itemExpanded(QTreeWidgetItem *item);
void itemCollapsed(QTreeWidgetItem *item);
@@ -409,12 +410,6 @@ inline void QTreeWidgetItem::setSelected(bool aselect)
inline bool QTreeWidgetItem::isSelected() const
{ return (view ? view->isItemSelected(this) : false); }
-inline void QTreeWidgetItem::setHidden(bool ahide)
-{ if (view) view->setItemHidden(this, ahide); }
-
-inline bool QTreeWidgetItem::isHidden() const
-{ return (view ? view->isItemHidden(this) : false); }
-
inline void QTreeWidgetItem::setExpanded(bool aexpand)
{ if (view) view->setItemExpanded(this, aexpand); }
diff --git a/src/widgets/itemviews/qtreewidget_p.h b/src/widgets/itemviews/qtreewidget_p.h
index f4625842ef..adc2c2c421 100644
--- a/src/widgets/itemviews/qtreewidget_p.h
+++ b/src/widgets/itemviews/qtreewidget_p.h
@@ -139,7 +139,7 @@ public:
protected:
QTreeModel(QTreeModelPrivate &, QTreeWidget *parent = 0);
- void emitDataChanged(QTreeWidgetItem *item, int column);
+ void emitDataChanged(QTreeWidgetItem *item, int column, const QVector<int> &roles);
void beginInsertItems(QTreeWidgetItem *parent, int row, int count);
void endInsertItems();
void beginRemoveItems(QTreeWidgetItem *parent, int row, int count);
@@ -187,13 +187,16 @@ class QTreeWidgetItemPrivate
{
public:
QTreeWidgetItemPrivate(QTreeWidgetItem *item)
- : q(item), disabled(false), selected(false), rowGuess(-1), policy(QTreeWidgetItem::DontShowIndicatorWhenChildless) {}
+ : q(item), disabled(false), selected(false), hidden(false), rowGuess(-1),
+ policy(QTreeWidgetItem::DontShowIndicatorWhenChildless) {}
void propagateDisabled(QTreeWidgetItem *item);
+ void updateHiddenStatus(QTreeWidgetItem *item, bool inserting);
void sortChildren(int column, Qt::SortOrder order, bool climb);
QTreeWidgetItem *q;
QVariantList display;
uint disabled : 1;
uint selected : 1;
+ uint hidden : 1;
int rowGuess;
QTreeWidgetItem::ChildIndicatorPolicy policy;
};
diff --git a/src/widgets/kernel/kernel.pri b/src/widgets/kernel/kernel.pri
index 1bdcecbc81..c2f6e4ce75 100644
--- a/src/widgets/kernel/kernel.pri
+++ b/src/widgets/kernel/kernel.pri
@@ -35,7 +35,8 @@ HEADERS += \
kernel/qgesturemanager_p.h \
kernel/qdesktopwidget_p.h \
kernel/qwidgetwindow_p.h \
- kernel/qwindowcontainer_p.h
+ kernel/qwindowcontainer_p.h \
+ kernel/qtestsupport_widgets.h
SOURCES += \
kernel/qaction.cpp \
@@ -60,7 +61,8 @@ SOURCES += \
kernel/qdesktopwidget.cpp \
kernel/qwidgetsvariant.cpp \
kernel/qwidgetwindow.cpp \
- kernel/qwindowcontainer.cpp
+ kernel/qwindowcontainer.cpp \
+ kernel/qtestsupport_widgets.cpp
macx: {
HEADERS += kernel/qmacgesturerecognizer_p.h
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index ba315d4338..581b7c9c94 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -110,6 +110,8 @@
#include <qpa/qplatformwindow.h>
+#include <qtwidgets_tracepoints_p.h>
+
//#define ALIEN_DEBUG
static void initResources()
@@ -1025,17 +1027,17 @@ QString QApplication::styleSheet() const
void QApplication::setStyleSheet(const QString& styleSheet)
{
QApplicationPrivate::styleSheet = styleSheet;
- QStyleSheetStyle *proxy = qobject_cast<QStyleSheetStyle*>(QApplicationPrivate::app_style);
+ QStyleSheetStyle *styleSheetStyle = qt_styleSheet(QApplicationPrivate::app_style);
if (styleSheet.isEmpty()) { // application style sheet removed
- if (!proxy)
+ if (!styleSheetStyle)
return; // there was no stylesheet before
- setStyle(proxy->base);
- } else if (proxy) { // style sheet update, just repolish
- proxy->repolish(qApp);
+ setStyle(styleSheetStyle->base);
+ } else if (styleSheetStyle) { // style sheet update, just repolish
+ styleSheetStyle->repolish(qApp);
} else { // stylesheet set the first time
- QStyleSheetStyle *newProxy = new QStyleSheetStyle(QApplicationPrivate::app_style);
- QApplicationPrivate::app_style->setParent(newProxy);
- setStyle(newProxy);
+ QStyleSheetStyle *newStyleSheetStyle = new QStyleSheetStyle(QApplicationPrivate::app_style);
+ QApplicationPrivate::app_style->setParent(newStyleSheetStyle);
+ setStyle(newStyleSheetStyle);
}
}
@@ -1145,11 +1147,11 @@ void QApplication::setStyle(QStyle *style)
QStyle *old = QApplicationPrivate::app_style; // save
#ifndef QT_NO_STYLE_STYLESHEET
- if (!QApplicationPrivate::styleSheet.isEmpty() && !qobject_cast<QStyleSheetStyle *>(style)) {
+ if (!QApplicationPrivate::styleSheet.isEmpty() && !qt_styleSheet(style)) {
// we have a stylesheet already and a new style is being set
- QStyleSheetStyle *newProxy = new QStyleSheetStyle(style);
- style->setParent(newProxy);
- QApplicationPrivate::app_style = newProxy;
+ QStyleSheetStyle *newStyleSheetStyle = new QStyleSheetStyle(style);
+ style->setParent(newStyleSheetStyle);
+ QApplicationPrivate::app_style = newStyleSheetStyle;
} else
#endif // QT_NO_STYLE_STYLESHEET
QApplicationPrivate::app_style = style;
@@ -1199,8 +1201,8 @@ void QApplication::setStyle(QStyle *style)
}
#ifndef QT_NO_STYLE_STYLESHEET
- if (QStyleSheetStyle *oldProxy = qobject_cast<QStyleSheetStyle *>(old)) {
- oldProxy->deref();
+ if (QStyleSheetStyle *oldStyleSheetStyle = qt_styleSheet(old)) {
+ oldStyleSheetStyle->deref();
} else
#endif
if (old && old->parent() == qApp) {
@@ -2627,7 +2629,7 @@ QWidget *QApplicationPrivate::pickMouseReceiver(QWidget *candidate, const QPoint
bool QApplicationPrivate::sendMouseEvent(QWidget *receiver, QMouseEvent *event,
QWidget *alienWidget, QWidget *nativeWidget,
QWidget **buttonDown, QPointer<QWidget> &lastMouseReceiver,
- bool spontaneous)
+ bool spontaneous, bool onlyDispatchEnterLeave)
{
Q_ASSERT(receiver);
Q_ASSERT(event);
@@ -2688,11 +2690,17 @@ bool QApplicationPrivate::sendMouseEvent(QWidget *receiver, QMouseEvent *event,
// We need this quard in case someone opens a modal dialog / popup. If that's the case
// leaveAfterRelease is set to null, but we shall not update lastMouseReceiver.
const bool wasLeaveAfterRelease = leaveAfterRelease != 0;
- bool result;
- if (spontaneous)
- result = QApplication::sendSpontaneousEvent(receiver, event);
- else
- result = QApplication::sendEvent(receiver, event);
+ bool result = true;
+ // This code is used for sending the synthetic enter/leave events for cases where it is needed
+ // due to other events causing the widget under the mouse to change. However in those cases
+ // we do not want to send the mouse event associated with this call, so this enables us to
+ // not send the unneeded mouse event
+ if (!onlyDispatchEnterLeave) {
+ if (spontaneous)
+ result = QApplication::sendSpontaneousEvent(receiver, event);
+ else
+ result = QApplication::sendEvent(receiver, event);
+ }
if (!graphicsWidget && leaveAfterRelease && event->type() == QEvent::MouseButtonRelease
&& !event->buttons() && QWidget::mouseGrabber() != leaveAfterRelease) {
@@ -2767,9 +2775,10 @@ void QApplicationPrivate::sendSyntheticEnterLeave(QWidget *widget)
if (widget->data->in_destructor && qt_button_down == widget)
qt_button_down = 0;
- // Send enter/leave events followed by a mouse move on the entered widget.
+ // A mouse move is not actually sent, but we utilize the sendMouseEvent() call to send the
+ // enter/leave events as appropriate
QMouseEvent e(QEvent::MouseMove, pos, windowPos, globalPos, Qt::NoButton, Qt::NoButton, Qt::NoModifier);
- sendMouseEvent(widgetUnderCursor, &e, widgetUnderCursor, tlw, &qt_button_down, qt_last_mouse_receiver);
+ sendMouseEvent(widgetUnderCursor, &e, widgetUnderCursor, tlw, &qt_button_down, qt_last_mouse_receiver, true, true);
#else // !QT_NO_CURSOR
Q_UNUSED(widget);
#endif // QT_NO_CURSOR
@@ -2947,8 +2956,10 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
d->checkReceiverThread(receiver);
#endif
- if (receiver->isWindowType())
- QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(static_cast<QWindow *>(receiver), e);
+ if (receiver->isWindowType()) {
+ if (QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(static_cast<QWindow *>(receiver), e))
+ return true; // Platform plugin ate the event
+ }
if(e->spontaneous()) {
// Capture the current mouse and keyboard states. Doing so here is
@@ -3288,6 +3299,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
QWheelEvent we(relpos, wheel->globalPos(), wheel->pixelDelta(), wheel->angleDelta(), wheel->delta(), wheel->orientation(), wheel->buttons(),
wheel->modifiers(), phase, wheel->source(), wheel->inverted());
+ we.setTimestamp(wheel->timestamp());
bool eventAccepted;
do {
we.spont = spontaneous && w == receiver;
@@ -3324,6 +3336,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
const QPoint &relpos = QApplicationPrivate::wheel_widget->mapFromGlobal(wheel->globalPos());
QWheelEvent we(relpos, wheel->globalPos(), wheel->pixelDelta(), wheel->angleDelta(), wheel->delta(), wheel->orientation(), wheel->buttons(),
wheel->modifiers(), wheel->phase(), wheel->source());
+ we.setTimestamp(wheel->timestamp());
we.spont = true;
we.ignore();
d->notify_helper(QApplicationPrivate::wheel_widget, &we);
@@ -3649,7 +3662,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
break;
w = w->parentWidget();
}
- foreach (QGesture *g, allGestures)
+ for (QGesture *g : qAsConst(allGestures))
gestureEvent->setAccepted(g, false);
gestureEvent->m_accept = false; // to make sure we check individual gestures
} else {
@@ -3696,11 +3709,19 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e)
{
+ // These tracepoints (and the whole function, actually) are very similar
+ // to the ones in QCoreApplicationPrivate::notify_helper; the reason for their
+ // duplication is because tracepoint symbols are not exported by QtCore.
+ // If you adjust the tracepoints here, consider adjusting QCoreApplicationPrivate too.
+ Q_TRACE(QApplication_notify_entry, receiver, e, e->type());
+
// send to all application event filters
if (threadRequiresCoreApplication()
&& receiver->d_func()->threadData->thread == mainThread()
- && sendThroughApplicationEventFilters(receiver, e))
+ && sendThroughApplicationEventFilters(receiver, e)) {
+ Q_TRACE(QApplication_notify_event_filtered, receiver, e, e->type());
return true;
+ }
if (receiver->isWidgetType()) {
QWidget *widget = static_cast<QWidget *>(receiver);
@@ -3720,11 +3741,18 @@ bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e)
}
// send to all receiver event filters
- if (sendThroughObjectEventFilters(receiver, e))
+ if (sendThroughObjectEventFilters(receiver, e)) {
+ Q_TRACE(QApplication_notify_event_filtered, receiver, e, e->type());
return true;
+ }
+
+ Q_TRACE(QApplication_notify_before_delivery, receiver, e, e->type());
// deliver the event
- bool consumed = receiver->event(e);
+ const bool consumed = receiver->event(e);
+
+ Q_TRACE(QApplication_notify_after_delivery, receiver, e, e->type(), consumed);
+
QCoreApplicationPrivate::setEventSpontaneous(e, false);
return consumed;
}
diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h
index 488ca6cbfd..2d9468cc21 100644
--- a/src/widgets/kernel/qapplication_p.h
+++ b/src/widgets/kernel/qapplication_p.h
@@ -226,7 +226,7 @@ public:
QWidget *buttonDown, QWidget *alienWidget);
static bool sendMouseEvent(QWidget *receiver, QMouseEvent *event, QWidget *alienWidget,
QWidget *native, QWidget **buttonDown, QPointer<QWidget> &lastMouseReceiver,
- bool spontaneous = true);
+ bool spontaneous = true, bool onlyDispatchEnterLeave = false);
void sendSyntheticEnterLeave(QWidget *widget);
static QWindow *windowForWidget(const QWidget *widget)
diff --git a/src/widgets/kernel/qgesture.cpp b/src/widgets/kernel/qgesture.cpp
index 7f8bf18e90..fc715687c6 100644
--- a/src/widgets/kernel/qgesture.cpp
+++ b/src/widgets/kernel/qgesture.cpp
@@ -916,7 +916,7 @@ QGesture *QGestureEvent::gesture(Qt::GestureType type) const
QList<QGesture *> QGestureEvent::activeGestures() const
{
QList<QGesture *> gestures;
- foreach (QGesture *gesture, m_gestures) {
+ for (QGesture *gesture : m_gestures) {
if (gesture->state() != Qt::GestureCanceled)
gestures.append(gesture);
}
@@ -929,7 +929,7 @@ QList<QGesture *> QGestureEvent::activeGestures() const
QList<QGesture *> QGestureEvent::canceledGestures() const
{
QList<QGesture *> gestures;
- foreach (QGesture *gesture, m_gestures) {
+ for (QGesture *gesture : m_gestures) {
if (gesture->state() == Qt::GestureCanceled)
gestures.append(gesture);
}
diff --git a/src/widgets/kernel/qlayout.cpp b/src/widgets/kernel/qlayout.cpp
index 9ce1c1c2d4..80ea27fee8 100644
--- a/src/widgets/kernel/qlayout.cpp
+++ b/src/widgets/kernel/qlayout.cpp
@@ -1246,6 +1246,26 @@ int QLayout::indexOf(QWidget *widget) const
}
/*!
+ \since 5.12
+ Searches for layout item \a layoutItem in this layout (not including child
+ layouts).
+
+ Returns the index of \a layoutItem, or -1 if \a layoutItem is not found.
+*/
+int QLayout::indexOf(QLayoutItem *layoutItem) const
+{
+ int i = 0;
+ QLayoutItem *item = itemAt(i);
+ while (item) {
+ if (item == layoutItem)
+ return i;
+ ++i;
+ item = itemAt(i);
+ }
+ return -1;
+}
+
+/*!
\enum QLayout::SizeConstraint
The possible values are:
diff --git a/src/widgets/kernel/qlayout.h b/src/widgets/kernel/qlayout.h
index bcc33a0811..616f4e7164 100644
--- a/src/widgets/kernel/qlayout.h
+++ b/src/widgets/kernel/qlayout.h
@@ -122,6 +122,7 @@ public:
virtual QLayoutItem *itemAt(int index) const = 0;
virtual QLayoutItem *takeAt(int index) = 0;
virtual int indexOf(QWidget *) const;
+ QT6_VIRTUAL int indexOf(QLayoutItem *) const;
virtual int count() const = 0;
bool isEmpty() const override;
QSizePolicy::ControlTypes controlTypes() const override;
diff --git a/src/widgets/kernel/qmacgesturerecognizer_p.h b/src/widgets/kernel/qmacgesturerecognizer_p.h
index e381a6cc2f..739fc201b7 100644
--- a/src/widgets/kernel/qmacgesturerecognizer_p.h
+++ b/src/widgets/kernel/qmacgesturerecognizer_p.h
@@ -66,9 +66,9 @@ class QMacSwipeGestureRecognizer : public QGestureRecognizer
public:
QMacSwipeGestureRecognizer();
- QGesture *create(QObject *target);
- QGestureRecognizer::Result recognize(QGesture *gesture, QObject *watched, QEvent *event);
- void reset(QGesture *gesture);
+ QGesture *create(QObject *target) override;
+ QGestureRecognizer::Result recognize(QGesture *gesture, QObject *watched, QEvent *event) override;
+ void reset(QGesture *gesture) override;
};
class QMacPinchGestureRecognizer : public QGestureRecognizer
@@ -76,9 +76,9 @@ class QMacPinchGestureRecognizer : public QGestureRecognizer
public:
QMacPinchGestureRecognizer();
- QGesture *create(QObject *target);
- QGestureRecognizer::Result recognize(QGesture *gesture, QObject *watched, QEvent *event);
- void reset(QGesture *gesture);
+ QGesture *create(QObject *target) override;
+ QGestureRecognizer::Result recognize(QGesture *gesture, QObject *watched, QEvent *event) override;
+ void reset(QGesture *gesture) override;
};
class QMacPanGestureRecognizer : public QObject, public QGestureRecognizer
@@ -86,9 +86,9 @@ class QMacPanGestureRecognizer : public QObject, public QGestureRecognizer
public:
QMacPanGestureRecognizer();
- QGesture *create(QObject *target);
- QGestureRecognizer::Result recognize(QGesture *gesture, QObject *watched, QEvent *event);
- void reset(QGesture *gesture);
+ QGesture *create(QObject *target) override;
+ QGestureRecognizer::Result recognize(QGesture *gesture, QObject *watched, QEvent *event) override;
+ void reset(QGesture *gesture) override;
protected:
void timerEvent(QTimerEvent *ev) override;
private:
diff --git a/src/widgets/kernel/qshortcut.cpp b/src/widgets/kernel/qshortcut.cpp
index fde039c75e..a680ff7913 100644
--- a/src/widgets/kernel/qshortcut.cpp
+++ b/src/widgets/kernel/qshortcut.cpp
@@ -149,8 +149,16 @@ static bool correctWidgetContext(Qt::ShortcutContext context, QWidget *w, QWidge
bool visible = w->isVisible();
#if QT_CONFIG(menubar)
if (QMenuBar *menuBar = qobject_cast<QMenuBar *>(w)) {
- if (menuBar->isNativeMenuBar())
- visible = true;
+ if (auto *pmb = menuBar->platformMenuBar()) {
+ if (menuBar->parentWidget()) {
+ visible = true;
+ } else {
+ if (auto *ww = qobject_cast<QWidgetWindow *>(pmb->parentWindow()))
+ w = ww->widget(); // Good enough since we only care about the window
+ else
+ return false; // This is not a QWidget window. We won't deliver
+ }
+ }
}
#endif
diff --git a/src/widgets/kernel/qtestsupport_widgets.cpp b/src/widgets/kernel/qtestsupport_widgets.cpp
new file mode 100644
index 0000000000..a1b35cc45b
--- /dev/null
+++ b/src/widgets/kernel/qtestsupport_widgets.cpp
@@ -0,0 +1,119 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtTest 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qtestsupport_widgets.h"
+
+#include "qwidget.h"
+
+#include <QtGui/qwindow.h>
+#include <QtGui/qtestsupport_gui.h>
+
+QT_BEGIN_NAMESPACE
+
+/*! \fn bool qWaitForWindowActive(QWidget *widget, int timeout)
+ \relates QTest
+ \since 5.0
+
+ Waits for \a timeout milliseconds or until the \a widget's window is active.
+
+ Returns \c true if \c widget's window is active within \a timeout milliseconds, otherwise returns \c false.
+
+ \sa QTest::qWaitForWindowExposed(), QWidget::isActiveWindow()
+*/
+Q_WIDGETS_EXPORT Q_REQUIRED_RESULT bool QTest::qWaitForWindowActive(QWidget *widget, int timeout)
+{
+ if (QWindow *window = widget->window()->windowHandle())
+ return QTest::qWaitForWindowActive(window, timeout);
+ return false;
+}
+
+/*! \fn bool qWaitForWindowExposed(QWidget *widget, int timeout)
+ \relates QTest
+ \since 5.0
+
+ Waits for \a timeout milliseconds or until the \a widget's window is exposed.
+ Returns \c true if \c widget's window is exposed within \a timeout milliseconds, otherwise returns \c false.
+
+ This is mainly useful for asynchronous systems like X11, where a window will be mapped to screen some
+ time after being asked to show itself on the screen.
+
+ Note that a window that is mapped to screen may still not be considered exposed if the window client
+ area is completely covered by other windows, or if the window is otherwise not visible. This function
+ will then time out when waiting for such a window.
+
+ A specific configuration where this happens is when using QGLWidget as a viewport widget on macOS:
+ The viewport widget gets the expose event, not the parent widget.
+
+ \sa QTest::qWaitForWindowActive()
+*/
+Q_WIDGETS_EXPORT Q_REQUIRED_RESULT bool QTest::qWaitForWindowExposed(QWidget *widget, int timeout)
+{
+ if (QWindow *window = widget->window()->windowHandle())
+ return QTest::qWaitForWindowExposed(window, timeout);
+ return false;
+}
+
+#if QT_DEPRECATED_SINCE(5, 0)
+/*! \fn bool qWaitForWindowShown(QWidget *widget, int timeout)
+ \relates QTest
+ \since 5.0
+ \deprecated
+
+ Waits for \a timeout milliseconds or until the \a widget's window is exposed.
+ Returns \c true if \c widget's window is exposed within \a timeout milliseconds, otherwise returns \c false.
+
+ This function does the same as qWaitForWindowExposed().
+
+ Example:
+
+ \code
+ QWidget widget;
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+ \endcode
+
+ \sa QTest::qWaitForWindowActive(), QTest::qWaitForWindowExposed()
+*/
+Q_WIDGETS_EXPORT QT_DEPRECATED Q_REQUIRED_RESULT bool QTest::qWaitForWindowShown(QWidget *widget, int timeout)
+{
+ return QTest::qWaitForWindowExposed(widget, timeout);
+}
+#endif
+
+QT_END_NAMESPACE
diff --git a/src/widgets/kernel/qtestsupport_widgets.h b/src/widgets/kernel/qtestsupport_widgets.h
new file mode 100644
index 0000000000..b96365899a
--- /dev/null
+++ b/src/widgets/kernel/qtestsupport_widgets.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtTest 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QTESTSUPPORT_WIDGETS_H
+#define QTESTSUPPORT_WIDGETS_H
+
+#include "qtwidgetsglobal.h"
+
+QT_BEGIN_NAMESPACE
+
+class QWidget;
+
+namespace QTest {
+Q_WIDGETS_EXPORT Q_REQUIRED_RESULT bool qWaitForWindowActive(QWidget *widget, int timeout = 5000);
+Q_WIDGETS_EXPORT Q_REQUIRED_RESULT bool qWaitForWindowExposed(QWidget *widget, int timeout = 5000);
+
+#if QT_DEPRECATED_SINCE(5, 0)
+Q_WIDGETS_EXPORT QT_DEPRECATED Q_REQUIRED_RESULT bool qWaitForWindowShown(QWidget *widget, int timeout = 5000);
+#endif
+}
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/widgets/kernel/qtooltip.cpp b/src/widgets/kernel/qtooltip.cpp
index ed7184302a..f70efff9a1 100644
--- a/src/widgets/kernel/qtooltip.cpp
+++ b/src/widgets/kernel/qtooltip.cpp
@@ -123,11 +123,11 @@ class QTipLabel : public QLabel
{
Q_OBJECT
public:
- QTipLabel(const QString &text, QWidget *w, int msecDisplayTime);
+ QTipLabel(const QString &text, const QPoint &pos, QWidget *w, int msecDisplayTime);
~QTipLabel();
static QTipLabel *instance;
- void updateSize();
+ void updateSize(const QPoint &pos);
bool eventFilter(QObject *, QEvent *) override;
@@ -135,7 +135,7 @@ public:
bool fadingOut;
- void reuseTip(const QString &text, int msecDisplayTime);
+ void reuseTip(const QString &text, int msecDisplayTime, const QPoint &pos);
void hideTip();
void hideTipImmediately();
void setTipRect(QWidget *w, const QRect &r);
@@ -171,7 +171,7 @@ private:
QTipLabel *QTipLabel::instance = 0;
-QTipLabel::QTipLabel(const QString &text, QWidget *w, int msecDisplayTime)
+QTipLabel::QTipLabel(const QString &text, const QPoint &pos, QWidget *w, int msecDisplayTime)
#ifndef QT_NO_STYLE_STYLESHEET
: QLabel(w, Qt::ToolTip | Qt::BypassGraphicsProxyWidget), styleSheetParent(0), widget(0)
#else
@@ -192,7 +192,7 @@ QTipLabel::QTipLabel(const QString &text, QWidget *w, int msecDisplayTime)
setWindowOpacity(style()->styleHint(QStyle::SH_ToolTipLabel_Opacity, 0, this) / 255.0);
setMouseTracking(true);
fadingOut = false;
- reuseTip(text, msecDisplayTime);
+ reuseTip(text, msecDisplayTime, pos);
}
void QTipLabel::restartExpireTimer(int msecDisplayTime)
@@ -204,7 +204,7 @@ void QTipLabel::restartExpireTimer(int msecDisplayTime)
hideTimer.stop();
}
-void QTipLabel::reuseTip(const QString &text, int msecDisplayTime)
+void QTipLabel::reuseTip(const QString &text, int msecDisplayTime, const QPoint &pos)
{
#ifndef QT_NO_STYLE_STYLESHEET
if (styleSheetParent){
@@ -214,20 +214,30 @@ void QTipLabel::reuseTip(const QString &text, int msecDisplayTime)
}
#endif
- setWordWrap(Qt::mightBeRichText(text));
+ setWordWrap(true);
setText(text);
- updateSize();
+ updateSize(pos);
restartExpireTimer(msecDisplayTime);
}
-void QTipLabel::updateSize()
+void QTipLabel::updateSize(const QPoint &pos)
{
QFontMetrics fm(font());
QSize extra(1, 0);
// Make it look good with the default ToolTip font on Mac, which has a small descent.
if (fm.descent() == 2 && fm.ascent() >= 11)
++extra.rheight();
- resize(sizeHint() + extra);
+ QSize sh = sizeHint();
+ if (wordWrap()) {
+ const QRect screenRect = QGuiApplication::screenAt(pos)->geometry();
+ if (sh.width() > screenRect.width()) {
+ // Try to use widely accepted 75chars max length or 80% of the screen width else.
+ // See https://en.wikipedia.org/wiki/Line_length
+ sh.setWidth(qMin(fm.averageCharWidth() * 75, static_cast<int>(screenRect.width() * .8)));
+ sh.setHeight(heightForWidth(sh.width()));
+ }
+ }
+ resize(sh + extra);
}
void QTipLabel::paintEvent(QPaintEvent *ev)
@@ -381,7 +391,7 @@ int QTipLabel::getTipScreen(const QPoint &pos, QWidget *w)
void QTipLabel::placeTip(const QPoint &pos, QWidget *w)
{
#ifndef QT_NO_STYLE_STYLESHEET
- if (testAttribute(Qt::WA_StyleSheet) || (w && qobject_cast<QStyleSheetStyle *>(w->style()))) {
+ if (testAttribute(Qt::WA_StyleSheet) || (w && qt_styleSheet(w->style()))) {
//the stylesheet need to know the real parent
QTipLabel::instance->setProperty("_q_stylesheet_parent", QVariant::fromValue(w));
//we force the style to be the QStyleSheetStyle, and force to clear the cache as well.
@@ -394,7 +404,7 @@ void QTipLabel::placeTip(const QPoint &pos, QWidget *w)
QTipLabel::instance, SLOT(styleSheetParentDestroyed()));
// QTBUG-64550: A font inherited by the style sheet might change the size,
// particular on Windows, where the tip is not parented on a window.
- QTipLabel::instance->updateSize();
+ QTipLabel::instance->updateSize(pos);
}
}
#endif //QT_NO_STYLE_STYLESHEET
@@ -497,7 +507,7 @@ void QToolTip::showText(const QPoint &pos, const QString &text, QWidget *w, cons
if (w)
localPos = w->mapFromGlobal(pos);
if (QTipLabel::instance->tipChanged(localPos, text, w)){
- QTipLabel::instance->reuseTip(text, msecDisplayTime);
+ QTipLabel::instance->reuseTip(text, msecDisplayTime, pos);
QTipLabel::instance->setTipRect(w, rect);
QTipLabel::instance->placeTip(pos, w);
}
@@ -511,10 +521,10 @@ void QToolTip::showText(const QPoint &pos, const QString &text, QWidget *w, cons
// raised when the tooltip will be shown
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
- new QTipLabel(text, QApplication::desktop()->screen(QTipLabel::getTipScreen(pos, w)), msecDisplayTime);
+ new QTipLabel(text, pos, QApplication::desktop()->screen(QTipLabel::getTipScreen(pos, w)), msecDisplayTime);
QT_WARNING_POP
#else
- new QTipLabel(text, w, msecDisplayTime); // sets QTipLabel::instance to itself
+ new QTipLabel(text, pos, w, msecDisplayTime); // sets QTipLabel::instance to itself
#endif
QTipLabel::instance->setTipRect(w, rect);
QTipLabel::instance->placeTip(pos, w);
diff --git a/src/widgets/kernel/qwhatsthis.cpp b/src/widgets/kernel/qwhatsthis.cpp
index 96d0cf61c4..1fa83d3238 100644
--- a/src/widgets/kernel/qwhatsthis.cpp
+++ b/src/widgets/kernel/qwhatsthis.cpp
@@ -48,7 +48,9 @@
#include "qscreen.h"
#include "qpainter.h"
#include "qtimer.h"
+#if QT_CONFIG(action)
#include "qaction.h"
+#endif // QT_CONFIG(action)
#include "qcursor.h"
#include "qbitmap.h"
#include "qtextdocument.h"
@@ -366,7 +368,9 @@ class QWhatsThisPrivate : public QObject
~QWhatsThisPrivate();
static QWhatsThisPrivate *instance;
bool eventFilter(QObject *, QEvent *) override;
+#if QT_CONFIG(action)
QPointer<QAction> action;
+#endif // QT_CONFIG(action)
static void say(QWidget *, const QString &, int x = 0, int y = 0);
static void notifyToplevels(QEvent *e);
bool leaveOnMouseRelease;
@@ -408,8 +412,10 @@ QWhatsThisPrivate::QWhatsThisPrivate()
QWhatsThisPrivate::~QWhatsThisPrivate()
{
+#if QT_CONFIG(action)
if (action)
action->setChecked(false);
+#endif // QT_CONFIG(action)
#ifndef QT_NO_CURSOR
QApplication::restoreOverrideCursor();
#endif
@@ -485,6 +491,7 @@ bool QWhatsThisPrivate::eventFilter(QObject *o, QEvent *e)
return true;
}
+#if QT_CONFIG(action)
class QWhatsThisAction: public QAction
{
Q_OBJECT
@@ -516,6 +523,7 @@ void QWhatsThisAction::actionTriggered()
QWhatsThisPrivate::instance->action = this;
}
}
+#endif // QT_CONFIG(action)
/*!
This function switches the user interface into "What's This?"
@@ -672,10 +680,12 @@ void QWhatsThis::hideText()
The returned QAction provides a convenient way to let users enter
"What's This?" mode.
*/
+#if QT_CONFIG(action)
QAction *QWhatsThis::createAction(QObject *parent)
{
return new QWhatsThisAction(parent);
}
+#endif // QT_CONFIG(action)
QT_END_NAMESPACE
diff --git a/src/widgets/kernel/qwhatsthis.h b/src/widgets/kernel/qwhatsthis.h
index 1f0f82b2a2..59c0b01c9b 100644
--- a/src/widgets/kernel/qwhatsthis.h
+++ b/src/widgets/kernel/qwhatsthis.h
@@ -48,7 +48,9 @@ QT_REQUIRE_CONFIG(whatsthis);
QT_BEGIN_NAMESPACE
+#if QT_CONFIG(action)
class QAction;
+#endif // QT_CONFIG(action)
class Q_WIDGETS_EXPORT QWhatsThis
{
@@ -62,7 +64,9 @@ public:
static void showText(const QPoint &pos, const QString &text, QWidget *w = nullptr);
static void hideText();
+#if QT_CONFIG(action)
static QAction *createAction(QObject *parent = nullptr);
+#endif // QT_CONFIG(action)
};
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 5f1f6d880a..9a19597cad 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -1849,7 +1849,7 @@ void QWidgetPrivate::deleteExtra()
deleteSysExtra();
#ifndef QT_NO_STYLE_STYLESHEET
// dereference the stylesheet style
- if (QStyleSheetStyle *proxy = qobject_cast<QStyleSheetStyle *>(extra->style))
+ if (QStyleSheetStyle *proxy = qt_styleSheet(extra->style))
proxy->deref();
#endif
if (extra->topextra) {
@@ -1905,19 +1905,21 @@ void QWidgetPrivate::deleteTLSysExtra()
}
/*
- Returns \c true if there are widgets above this which overlap with
+ Returns \c region of widgets above this which overlap with
\a rect, which is in parent's coordinate system (same as crect).
*/
-bool QWidgetPrivate::isOverlapped(const QRect &rect) const
+QRegion QWidgetPrivate::overlappedRegion(const QRect &rect, bool breakAfterFirst) const
{
Q_Q(const QWidget);
const QWidget *w = q;
QRect r = rect;
+ QPoint p;
+ QRegion region;
while (w) {
if (w->isWindow())
- return false;
+ break;
QWidgetPrivate *pd = w->parentWidget()->d_func();
bool above = false;
for (int i = 0; i < pd->children.size(); ++i) {
@@ -1929,19 +1931,23 @@ bool QWidgetPrivate::isOverlapped(const QRect &rect) const
continue;
}
- if (qRectIntersects(sibling->d_func()->effectiveRectFor(sibling->data->crect), r)) {
+ const QRect siblingRect = sibling->d_func()->effectiveRectFor(sibling->data->crect);
+ if (qRectIntersects(siblingRect, r)) {
const QWExtra *siblingExtra = sibling->d_func()->extra;
if (siblingExtra && siblingExtra->hasMask && !sibling->d_func()->graphicsEffect
&& !siblingExtra->mask.translated(sibling->data->crect.topLeft()).intersects(r)) {
continue;
}
- return true;
+ region += siblingRect.translated(-p);
+ if (breakAfterFirst)
+ break;
}
}
w = w->parentWidget();
r.translate(pd->data.crect.topLeft());
+ p += pd->data.crect.topLeft();
}
- return false;
+ return region;
}
void QWidgetPrivate::syncBackingStore()
@@ -2398,7 +2404,8 @@ static inline void fillRegion(QPainter *painter, const QRegion &rgn, const QBrus
#endif
} else if (brush.gradient()
- && brush.gradient()->coordinateMode() == QGradient::ObjectBoundingMode) {
+ && (brush.gradient()->coordinateMode() == QGradient::ObjectBoundingMode
+ || brush.gradient()->coordinateMode() == QGradient::ObjectMode)) {
painter->save();
painter->setClipRegion(rgn);
painter->fillRect(0, 0, painter->device()->width(), painter->device()->height(), brush);
@@ -2659,7 +2666,7 @@ void QWidget::setStyleSheet(const QString& styleSheet)
return;
d->createExtra();
- QStyleSheetStyle *proxy = qobject_cast<QStyleSheetStyle *>(d->extra->style);
+ QStyleSheetStyle *proxy = qt_styleSheet(d->extra->style);
d->extra->styleSheet = styleSheet;
if (styleSheet.isEmpty()) { // stylesheet removed
if (!proxy)
@@ -2724,12 +2731,12 @@ void QWidget::setStyle(QStyle *style)
setAttribute(Qt::WA_SetStyle, style != 0);
d->createExtra();
#ifndef QT_NO_STYLE_STYLESHEET
- if (QStyleSheetStyle *proxy = qobject_cast<QStyleSheetStyle *>(style)) {
+ if (QStyleSheetStyle *styleSheetStyle = qt_styleSheet(style)) {
//if for some reason someone try to set a QStyleSheetStyle, ref it
//(this may happen for exemple in QButtonDialogBox which propagates its style)
- proxy->ref();
+ styleSheetStyle->ref();
d->setStyle_helper(style, false);
- } else if (qobject_cast<QStyleSheetStyle *>(d->extra->style) || !qApp->styleSheet().isEmpty()) {
+ } else if (qt_styleSheet(d->extra->style) || !qApp->styleSheet().isEmpty()) {
// if we have an application stylesheet or have a proxy already, propagate
d->setStyle_helper(new QStyleSheetStyle(style), true);
} else
@@ -2737,48 +2744,22 @@ void QWidget::setStyle(QStyle *style)
d->setStyle_helper(style, false);
}
-void QWidgetPrivate::setStyle_helper(QStyle *newStyle, bool propagate, bool
-#if 0 // Used to be included in Qt4 for Q_WS_MAC
- metalHack
-#endif
- )
+void QWidgetPrivate::setStyle_helper(QStyle *newStyle, bool propagate)
{
Q_Q(QWidget);
- QStyle *oldStyle = q->style();
-#ifndef QT_NO_STYLE_STYLESHEET
- QPointer<QStyle> origStyle;
-#endif
+ QStyle *oldStyle = q->style();
-#if 0 // Used to be included in Qt4 for Q_WS_MAC
- // the metalhack boolean allows Qt/Mac to do a proper re-polish depending
- // on how the Qt::WA_MacBrushedMetal attribute is set. It is only ever
- // set when changing that attribute and passes the widget's CURRENT style.
- // therefore no need to do a reassignment.
- if (!metalHack)
-#endif
- {
- createExtra();
+ createExtra();
#ifndef QT_NO_STYLE_STYLESHEET
- origStyle = extra->style.data();
+ QPointer<QStyle> origStyle = extra->style;
#endif
- extra->style = newStyle;
- }
+ extra->style = newStyle;
// repolish
- if (q->windowType() != Qt::Desktop) {
- if (polished) {
- oldStyle->unpolish(q);
-#if 0 // Used to be included in Qt4 for Q_WS_MAC
- if (metalHack)
- macUpdateMetalAttribute();
-#endif
- q->style()->polish(q);
-#if 0 // Used to be included in Qt4 for Q_WS_MAC
- } else if (metalHack) {
- macUpdateMetalAttribute();
-#endif
- }
+ if (polished && q->windowType() != Qt::Desktop) {
+ oldStyle->unpolish(q);
+ q->style()->polish(q);
}
if (propagate) {
@@ -2792,8 +2773,8 @@ void QWidgetPrivate::setStyle_helper(QStyle *newStyle, bool propagate, bool
}
#ifndef QT_NO_STYLE_STYLESHEET
- if (!qobject_cast<QStyleSheetStyle*>(newStyle)) {
- if (const QStyleSheetStyle* cssStyle = qobject_cast<QStyleSheetStyle*>(origStyle.data())) {
+ if (!qt_styleSheet(newStyle)) {
+ if (const QStyleSheetStyle* cssStyle = qt_styleSheet(origStyle)) {
cssStyle->clearWidgetFont(q);
}
}
@@ -2804,7 +2785,7 @@ void QWidgetPrivate::setStyle_helper(QStyle *newStyle, bool propagate, bool
#ifndef QT_NO_STYLE_STYLESHEET
// dereference the old stylesheet style
- if (QStyleSheetStyle *proxy = qobject_cast<QStyleSheetStyle *>(origStyle.data()))
+ if (QStyleSheetStyle *proxy = qt_styleSheet(origStyle))
proxy->deref();
#endif
}
@@ -2815,7 +2796,9 @@ void QWidgetPrivate::inheritStyle()
#ifndef QT_NO_STYLE_STYLESHEET
Q_Q(QWidget);
- QStyleSheetStyle *proxy = extra ? qobject_cast<QStyleSheetStyle *>(extra->style) : 0;
+ QStyle *extraStyle = extra ? (QStyle*)extra->style : nullptr;
+
+ QStyleSheetStyle *proxy = qt_styleSheet(extraStyle);
if (!q->styleSheet().isEmpty()) {
Q_ASSERT(proxy);
@@ -2823,16 +2806,16 @@ void QWidgetPrivate::inheritStyle()
return;
}
- QStyle *origStyle = proxy ? proxy->base : (extra ? (QStyle*)extra->style : 0);
+ QStyle *origStyle = proxy ? proxy->base : extraStyle;
QWidget *parent = q->parentWidget();
QStyle *parentStyle = (parent && parent->d_func()->extra) ? (QStyle*)parent->d_func()->extra->style : 0;
// If we have stylesheet on app or parent has stylesheet style, we need
// to be running a proxy
- if (!qApp->styleSheet().isEmpty() || qobject_cast<QStyleSheetStyle *>(parentStyle)) {
+ if (!qApp->styleSheet().isEmpty() || qt_styleSheet(parentStyle)) {
QStyle *newStyle = parentStyle;
if (q->testAttribute(Qt::WA_SetStyle))
newStyle = new QStyleSheetStyle(origStyle);
- else if (QStyleSheetStyle *newProxy = qobject_cast<QStyleSheetStyle *>(parentStyle))
+ else if (QStyleSheetStyle *newProxy = qt_styleSheet(parentStyle))
newProxy->ref();
setStyle_helper(newStyle, true);
@@ -2841,7 +2824,7 @@ void QWidgetPrivate::inheritStyle()
// So, we have no stylesheet on parent/app and we have an empty stylesheet
// we just need our original style back
- if (origStyle == (extra ? (QStyle*)extra->style : 0)) // is it any different?
+ if (origStyle == extraStyle) // is it any different?
return;
// We could have inherited the proxy from our parent (which has a custom style)
@@ -4690,9 +4673,8 @@ void QWidget::setFont(const QFont &font)
#ifndef QT_NO_STYLE_STYLESHEET
const QStyleSheetStyle* style;
- if (d->extra && (style = qobject_cast<const QStyleSheetStyle*>(d->extra->style))) {
+ if (d->extra && (style = qt_styleSheet(d->extra->style)))
style->saveWidgetFont(this, font);
- }
#endif
setAttribute(Qt::WA_SetFont, font.resolve() != 0);
@@ -4788,7 +4770,7 @@ void QWidgetPrivate::updateFont(const QFont &font)
Q_Q(QWidget);
#ifndef QT_NO_STYLE_STYLESHEET
const QStyleSheetStyle* cssStyle;
- cssStyle = extra ? qobject_cast<const QStyleSheetStyle*>(extra->style) : 0;
+ cssStyle = extra ? qt_styleSheet(extra->style) : 0;
const bool useStyleSheetPropagationInWidgetStyles =
QCoreApplication::testAttribute(Qt::AA_UseStyleSheetPropagationInWidgetStyles);
#endif
@@ -7375,7 +7357,8 @@ QByteArray QWidget::saveGeometry() const
// Version history:
// - Qt 4.2 - 4.8.6, 5.0 - 5.3 : Version 1.0
// - Qt 4.8.6 - today, 5.4 - today: Version 2.0, save screen width in addition to check for high DPI scaling.
- quint16 majorVersion = 2;
+ // - Qt 5.12 - today : Version 3.0, save QWidget::geometry()
+ quint16 majorVersion = 3;
quint16 minorVersion = 0;
const int screenNumber = QDesktopWidgetPrivate::screenNumber(this);
stream << magicNumber
@@ -7391,7 +7374,8 @@ QByteArray QWidget::saveGeometry() const
<< qint32(screenNumber)
<< quint8(windowState() & Qt::WindowMaximized)
<< quint8(windowState() & Qt::WindowFullScreen)
- << qint32(QDesktopWidgetPrivate::screenGeometry(screenNumber).width()); // 1.1 onwards
+ << qint32(QDesktopWidgetPrivate::screenGeometry(screenNumber).width()) // added in 2.0
+ << geometry(); // added in 3.0
return array;
}
@@ -7431,7 +7415,7 @@ bool QWidget::restoreGeometry(const QByteArray &geometry)
if (storedMagicNumber != magicNumber)
return false;
- const quint16 currentMajorVersion = 2;
+ const quint16 currentMajorVersion = 3;
quint16 majorVersion = 0;
quint16 minorVersion = 0;
@@ -7442,7 +7426,8 @@ bool QWidget::restoreGeometry(const QByteArray &geometry)
// (Allow all minor versions.)
QRect restoredFrameGeometry;
- QRect restoredNormalGeometry;
+ QRect restoredGeometry;
+ QRect restoredNormalGeometry;
qint32 restoredScreenNumber;
quint8 maximized;
quint8 fullScreen;
@@ -7456,6 +7441,10 @@ bool QWidget::restoreGeometry(const QByteArray &geometry)
if (majorVersion > 1)
stream >> restoredScreenWidth;
+ if (majorVersion > 2)
+ stream >> restoredGeometry;
+
+ // ### Qt 6 - Perhaps it makes sense to dumb down the restoreGeometry() logic, see QTBUG-69104
if (restoredScreenNumber >= QDesktopWidgetPrivate::numScreens())
restoredScreenNumber = QDesktopWidgetPrivate::primaryScreen();
@@ -7542,14 +7531,11 @@ bool QWidget::restoreGeometry(const QByteArray &geometry)
setWindowState(ws);
d_func()->topData()->normalGeometry = restoredNormalGeometry;
} else {
- QPoint offset;
-#if 0 // Used to be included in Qt4 for Q_WS_X11
- if (isFullScreen())
- offset = d_func()->topData()->fullScreenOffset;
-#endif
setWindowState(windowState() & ~(Qt::WindowMaximized | Qt::WindowFullScreen));
- move(restoredFrameGeometry.topLeft() + offset);
- resize(restoredNormalGeometry.size());
+ if (majorVersion > 2)
+ setGeometry(restoredGeometry);
+ else
+ setGeometry(restoredNormalGeometry);
}
return true;
}
diff --git a/src/widgets/kernel/qwidget.h b/src/widgets/kernel/qwidget.h
index 9f9f167002..9d5fe89c70 100644
--- a/src/widgets/kernel/qwidget.h
+++ b/src/widgets/kernel/qwidget.h
@@ -714,6 +714,7 @@ private:
friend class QWidgetWindow;
friend class QAccessibleWidget;
friend class QAccessibleTable;
+ friend class QAccessibleTabButton;
#ifndef QT_NO_GESTURES
friend class QGestureManager;
friend class QWinNativePanGestureRecognizer;
diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h
index e8b550b1cd..20c4a682ed 100644
--- a/src/widgets/kernel/qwidget_p.h
+++ b/src/widgets/kernel/qwidget_p.h
@@ -395,7 +395,7 @@ public:
void setLocale_helper(const QLocale &l, bool forceUpdate = false);
void resolveLocale();
- void setStyle_helper(QStyle *newStyle, bool propagate, bool metalHack = false);
+ void setStyle_helper(QStyle *newStyle, bool propagate);
void inheritStyle();
void setUpdatesEnabled_helper(bool );
@@ -453,7 +453,7 @@ public:
// ### Qt 4.6: Merge into a template function (after MSVC isn't supported anymore).
void invalidateBuffer(const QRegion &);
void invalidateBuffer(const QRect &);
- bool isOverlapped(const QRect&) const;
+ QRegion overlappedRegion(const QRect &rect, bool breakAfterFirst = false) const;
void syncBackingStore();
void syncBackingStore(const QRegion &region);
diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp
index 3b093283cd..235c93bc18 100644
--- a/src/widgets/kernel/qwidgetbackingstore.cpp
+++ b/src/widgets/kernel/qwidgetbackingstore.cpp
@@ -59,6 +59,7 @@
#include <private/qgraphicseffect_p.h>
#endif
#include <QtGui/private/qwindow_p.h>
+#include <QtGui/private/qhighdpiscaling_p.h>
#include <qpa/qplatformbackingstore.h>
@@ -793,6 +794,25 @@ QWidgetBackingStore::~QWidgetBackingStore()
delete dirtyOnScreenWidgets;
}
+static QVector<QRect> getSortedRectsToScroll(const QRegion &region, int dx, int dy)
+{
+ QVector<QRect> rects;
+ std::copy(region.begin(), region.end(), std::back_inserter(rects));
+ if (rects.count() > 1) {
+ std::sort(rects.begin(), rects.end(), [=](const QRect &r1, const QRect &r2) {
+ if (r1.y() == r2.y()) {
+ if (dx > 0)
+ return r1.x() > r2.x();
+ return r1.x() < r2.x();
+ }
+ if (dy > 0)
+ return r1.y() > r2.y();
+ return r1.y() < r2.y();
+ });
+ }
+ return rects;
+}
+
//parent's coordinates; move whole rect; update parent and widget
//assume the screen blt has already been done, so we don't need to refresh that part
void QWidgetPrivate::moveRect(const QRect &rect, int dx, int dy)
@@ -820,12 +840,12 @@ void QWidgetPrivate::moveRect(const QRect &rect, int dx, int dy)
const QRect parentRect(rect & clipR);
const bool nativeWithTextureChild = textureChildSeen && q->internalWinId();
- bool accelerateMove = accelEnv && isOpaque && !nativeWithTextureChild
+ const bool accelerateMove = accelEnv && isOpaque && !nativeWithTextureChild
#if QT_CONFIG(graphicsview)
// No accelerate move for proxy widgets.
&& !tlw->d_func()->extra->proxyWidget
#endif
- && !isOverlapped(sourceRect) && !isOverlapped(destRect);
+ ;
if (!accelerateMove) {
QRegion parentR(effectiveRectFor(parentRect));
@@ -841,18 +861,39 @@ void QWidgetPrivate::moveRect(const QRect &rect, int dx, int dy)
QWidgetBackingStore *wbs = x->backingStoreTracker.data();
QRegion childExpose(newRect & clipR);
+ QRegion overlappedExpose;
- if (sourceRect.isValid() && wbs->bltRect(sourceRect, dx, dy, pw))
- childExpose -= destRect;
+ if (sourceRect.isValid()) {
+ overlappedExpose = (overlappedRegion(sourceRect) | overlappedRegion(destRect)) & clipR;
+
+ const qreal factor = QHighDpiScaling::factor(q->windowHandle());
+ if (overlappedExpose.isEmpty() || qFloor(factor) == factor) {
+ const QVector<QRect> rectsToScroll
+ = getSortedRectsToScroll(QRegion(sourceRect) - overlappedExpose, dx, dy);
+ for (QRect rect : rectsToScroll) {
+ if (wbs->bltRect(rect, dx, dy, pw)) {
+ childExpose -= rect.translated(dx, dy);
+ }
+ }
+ }
+
+ childExpose -= overlappedExpose;
+ }
if (!pw->updatesEnabled())
return;
const bool childUpdatesEnabled = q->updatesEnabled();
- if (childUpdatesEnabled && !childExpose.isEmpty()) {
- childExpose.translate(-data.crect.topLeft());
- wbs->markDirty(childExpose, q);
- isMoved = true;
+ if (childUpdatesEnabled) {
+ if (!overlappedExpose.isEmpty()) {
+ overlappedExpose.translate(-data.crect.topLeft());
+ invalidateBuffer(overlappedExpose);
+ }
+ if (!childExpose.isEmpty()) {
+ childExpose.translate(-data.crect.topLeft());
+ wbs->markDirty(childExpose, q);
+ isMoved = true;
+ }
}
QRegion parentExpose(parentRect);
@@ -888,13 +929,12 @@ void QWidgetPrivate::scrollRect(const QRect &rect, int dx, int dy)
static const bool accelEnv = qEnvironmentVariableIntValue("QT_NO_FAST_SCROLL") == 0;
- QRect scrollRect = rect & clipRect();
- bool overlapped = false;
- bool accelerateScroll = accelEnv && isOpaque && !q_func()->testAttribute(Qt::WA_WState_InPaintEvent)
- && !(overlapped = isOverlapped(scrollRect.translated(data.crect.topLeft())));
+ const QRect clipR = clipRect();
+ const QRect scrollRect = rect & clipR;
+ const bool accelerateScroll = accelEnv && isOpaque && !q_func()->testAttribute(Qt::WA_WState_InPaintEvent);
if (!accelerateScroll) {
- if (overlapped) {
+ if (!overlappedRegion(scrollRect.translated(data.crect.topLeft()), true).isEmpty()) {
QRegion region(scrollRect);
subtractOpaqueSiblings(region);
invalidateBuffer(region);
@@ -906,12 +946,23 @@ void QWidgetPrivate::scrollRect(const QRect &rect, int dx, int dy)
const QRect destRect = scrollRect.translated(dx, dy) & scrollRect;
const QRect sourceRect = destRect.translated(-dx, -dy);
+ const QRegion overlappedExpose = (overlappedRegion(scrollRect.translated(data.crect.topLeft())))
+ .translated(-data.crect.topLeft()) & clipR;
QRegion childExpose(scrollRect);
- if (sourceRect.isValid()) {
- if (wbs->bltRect(sourceRect, dx, dy, q))
- childExpose -= destRect;
+
+ const qreal factor = QHighDpiScaling::factor(q->windowHandle());
+ if (overlappedExpose.isEmpty() || qFloor(factor) == factor) {
+ const QVector<QRect> rectsToScroll
+ = getSortedRectsToScroll(QRegion(sourceRect) - overlappedExpose, dx, dy);
+ for (const QRect &rect : rectsToScroll) {
+ if (wbs->bltRect(rect, dx, dy, q)) {
+ childExpose -= rect.translated(dx, dy);
+ }
+ }
}
+ childExpose -= overlappedExpose;
+
if (inDirtyList) {
if (rect == q->rect()) {
dirty.translate(dx, dy);
@@ -928,6 +979,8 @@ void QWidgetPrivate::scrollRect(const QRect &rect, int dx, int dy)
if (!q->updatesEnabled())
return;
+ if (!overlappedExpose.isEmpty())
+ invalidateBuffer(overlappedExpose);
if (!childExpose.isEmpty()) {
wbs->markDirty(childExpose, q);
isScrolled = true;
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp
index 1f3057b008..1c73588b7c 100644
--- a/src/widgets/kernel/qwidgetwindow.cpp
+++ b/src/widgets/kernel/qwidgetwindow.cpp
@@ -311,8 +311,10 @@ bool QWidgetWindow::event(QEvent *event)
#if QT_CONFIG(draganddrop)
case QEvent::DragEnter:
+ handleDragEnterEvent(static_cast<QDragEnterEvent *>(event));
+ return true;
case QEvent::DragMove:
- handleDragEnterMoveEvent(static_cast<QDragMoveEvent *>(event));
+ handleDragMoveEvent(static_cast<QDragMoveEvent *>(event));
return true;
case QEvent::DragLeave:
handleDragLeaveEvent(static_cast<QDragLeaveEvent *>(event));
@@ -841,6 +843,7 @@ void QWidgetWindow::handleWheelEvent(QWheelEvent *event)
QPoint mapped = widget->mapFrom(rootWidget, pos);
QWheelEvent translated(mapped, event->globalPos(), event->pixelDelta(), event->angleDelta(), event->delta(), event->orientation(), event->buttons(), event->modifiers(), event->phase(), event->source(), event->inverted());
+ translated.setTimestamp(event->timestamp());
QGuiApplication::forwardEvent(widget, &translated, event);
}
@@ -848,62 +851,80 @@ void QWidgetWindow::handleWheelEvent(QWheelEvent *event)
#if QT_CONFIG(draganddrop)
-void QWidgetWindow::handleDragEnterMoveEvent(QDragMoveEvent *event)
+static QWidget *findDnDTarget(QWidget *parent, const QPoint &pos)
{
- Q_ASSERT(event->type() ==QEvent::DragMove || !m_dragTarget);
// Find a target widget under mouse that accepts drops (QTBUG-22987).
- QWidget *widget = m_widget->childAt(event->pos());
+ QWidget *widget = parent->childAt(pos);
if (!widget)
- widget = m_widget;
+ widget = parent;
for ( ; widget && !widget->isWindow() && !widget->acceptDrops(); widget = widget->parentWidget()) ;
if (widget && !widget->acceptDrops())
- widget = 0;
- // Target widget unchanged: DragMove
- if (widget && widget == m_dragTarget.data()) {
- Q_ASSERT(event->type() == QEvent::DragMove);
- const QPoint mapped = widget->mapFromGlobal(m_widget->mapToGlobal(event->pos()));
- QDragMoveEvent translated(mapped, event->possibleActions(), event->mimeData(), event->mouseButtons(), event->keyboardModifiers());
- translated.setDropAction(event->dropAction());
- if (event->isAccepted()) { // Handling 'DragEnter' should suffice for the application.
- translated.accept();
- translated.setDropAction(event->dropAction());
- }
- QGuiApplication::forwardEvent(widget, &translated, event);
- if (translated.isAccepted()) {
- event->accept();
- } else {
- event->ignore();
- }
- event->setDropAction(translated.dropAction());
- return;
- }
- // Target widget changed: Send DragLeave to previous, DragEnter to new if there is any
- if (m_dragTarget.data()) {
- QDragLeaveEvent le;
- QGuiApplication::forwardEvent(m_dragTarget.data(), &le, event);
- m_dragTarget = 0;
- }
+ widget = nullptr;
+ return widget;
+}
+
+void QWidgetWindow::handleDragEnterEvent(QDragEnterEvent *event, QWidget *widget)
+{
+ Q_ASSERT(m_dragTarget == nullptr);
+ if (!widget)
+ widget = findDnDTarget(m_widget, event->pos());
if (!widget) {
- event->ignore();
- return;
+ event->ignore();
+ return;
}
m_dragTarget = widget;
+
const QPoint mapped = widget->mapFromGlobal(m_widget->mapToGlobal(event->pos()));
- QDragEnterEvent translated(mapped, event->possibleActions(), event->mimeData(), event->mouseButtons(), event->keyboardModifiers());
- QGuiApplication::forwardEvent(widget, &translated, event);
- if (translated.isAccepted()) {
- event->accept();
- } else {
+ QDragEnterEvent translated(mapped, event->possibleActions(), event->mimeData(),
+ event->mouseButtons(), event->keyboardModifiers());
+ translated.setDropAction(event->dropAction());
+ translated.setAccepted(event->isAccepted());
+ QGuiApplication::forwardEvent(m_dragTarget, &translated, event);
+ event->setAccepted(translated.isAccepted());
+ event->setDropAction(translated.dropAction());
+}
+
+void QWidgetWindow::handleDragMoveEvent(QDragMoveEvent *event)
+{
+ auto *widget = findDnDTarget(m_widget, event->pos());
+ if (!widget) {
event->ignore();
+ if (m_dragTarget) { // Send DragLeave to previous
+ QDragLeaveEvent leaveEvent;
+ QGuiApplication::forwardEvent(m_dragTarget, &leaveEvent, event);
+ m_dragTarget = nullptr;
+ }
+ } else {
+ const QPoint mapped = widget->mapFromGlobal(m_widget->mapToGlobal(event->pos()));
+ QDragMoveEvent translated(mapped, event->possibleActions(), event->mimeData(),
+ event->mouseButtons(), event->keyboardModifiers());
+ translated.setDropAction(event->dropAction());
+ translated.setAccepted(event->isAccepted());
+
+ if (widget == m_dragTarget) { // Target widget unchanged: Send DragMove
+ QGuiApplication::forwardEvent(m_dragTarget, &translated, event);
+ } else {
+ if (m_dragTarget) { // Send DragLeave to previous
+ QDragLeaveEvent leaveEvent;
+ QGuiApplication::forwardEvent(m_dragTarget, &leaveEvent, event);
+ m_dragTarget = nullptr;
+ }
+ // Send DragEnter to new widget.
+ handleDragEnterEvent(static_cast<QDragEnterEvent*>(event), widget);
+ // The drag enter event is always immediately followed by a drag move event,
+ // see QDragEnterEvent documentation.
+ QGuiApplication::forwardEvent(m_dragTarget, &translated, event);
+ }
+ event->setAccepted(translated.isAccepted());
+ event->setDropAction(translated.dropAction());
}
- event->setDropAction(translated.dropAction());
}
void QWidgetWindow::handleDragLeaveEvent(QDragLeaveEvent *event)
{
if (m_dragTarget)
- QGuiApplication::forwardEvent(m_dragTarget.data(), event);
- m_dragTarget = 0;
+ QGuiApplication::forwardEvent(m_dragTarget, event);
+ m_dragTarget = nullptr;
}
void QWidgetWindow::handleDropEvent(QDropEvent *event)
@@ -913,13 +934,12 @@ void QWidgetWindow::handleDropEvent(QDropEvent *event)
event->ignore();
return;
}
- const QPoint mapped = m_dragTarget.data()->mapFromGlobal(m_widget->mapToGlobal(event->pos()));
+ const QPoint mapped = m_dragTarget->mapFromGlobal(m_widget->mapToGlobal(event->pos()));
QDropEvent translated(mapped, event->possibleActions(), event->mimeData(), event->mouseButtons(), event->keyboardModifiers());
- QGuiApplication::forwardEvent(m_dragTarget.data(), &translated, event);
- if (translated.isAccepted())
- event->accept();
+ QGuiApplication::forwardEvent(m_dragTarget, &translated, event);
+ event->setAccepted(translated.isAccepted());
event->setDropAction(translated.dropAction());
- m_dragTarget = 0;
+ m_dragTarget = nullptr;
}
#endif // QT_CONFIG(draganddrop)
diff --git a/src/widgets/kernel/qwidgetwindow_p.h b/src/widgets/kernel/qwidgetwindow_p.h
index ead099390e..0728135467 100644
--- a/src/widgets/kernel/qwidgetwindow_p.h
+++ b/src/widgets/kernel/qwidgetwindow_p.h
@@ -96,7 +96,8 @@ protected:
void handleWheelEvent(QWheelEvent *);
#endif
#if QT_CONFIG(draganddrop)
- void handleDragEnterMoveEvent(QDragMoveEvent *);
+ void handleDragEnterEvent(QDragEnterEvent *, QWidget *widget = nullptr);
+ void handleDragMoveEvent(QDragMoveEvent *);
void handleDragLeaveEvent(QDragLeaveEvent *);
void handleDropEvent(QDropEvent *);
#endif
diff --git a/src/widgets/qtwidgets.tracepoints b/src/widgets/qtwidgets.tracepoints
new file mode 100644
index 0000000000..01a1383670
--- /dev/null
+++ b/src/widgets/qtwidgets.tracepoints
@@ -0,0 +1,4 @@
+QApplication_notify_entry(QObject *receiver, QEvent *event, int type)
+QApplication_notify_event_filtered(QObject *receiver, QEvent *event, int type)
+QApplication_notify_before_delivery(QObject *receiver, QEvent *event, int type)
+QApplication_notify_after_delivery(QObject *receiver, QEvent *event, int type, bool consumed)
diff --git a/src/widgets/styles/images/titlebar-contexthelp-16.png b/src/widgets/styles/images/titlebar-contexthelp-16.png
new file mode 100644
index 0000000000..2cead19910
--- /dev/null
+++ b/src/widgets/styles/images/titlebar-contexthelp-16.png
Binary files differ
diff --git a/src/widgets/styles/images/titlebar-contexthelp-32.png b/src/widgets/styles/images/titlebar-contexthelp-32.png
new file mode 100644
index 0000000000..1cd4843d5e
--- /dev/null
+++ b/src/widgets/styles/images/titlebar-contexthelp-32.png
Binary files differ
diff --git a/src/widgets/styles/images/titlebar-contexthelp-48.png b/src/widgets/styles/images/titlebar-contexthelp-48.png
new file mode 100644
index 0000000000..9b170687be
--- /dev/null
+++ b/src/widgets/styles/images/titlebar-contexthelp-48.png
Binary files differ
diff --git a/src/widgets/styles/images/titlebar-max-16.png b/src/widgets/styles/images/titlebar-max-16.png
new file mode 100644
index 0000000000..101a7eac2b
--- /dev/null
+++ b/src/widgets/styles/images/titlebar-max-16.png
Binary files differ
diff --git a/src/widgets/styles/images/titlebar-max-32.png b/src/widgets/styles/images/titlebar-max-32.png
new file mode 100644
index 0000000000..529c54f61d
--- /dev/null
+++ b/src/widgets/styles/images/titlebar-max-32.png
Binary files differ
diff --git a/src/widgets/styles/images/titlebar-max-48.png b/src/widgets/styles/images/titlebar-max-48.png
new file mode 100644
index 0000000000..cfa0b67edf
--- /dev/null
+++ b/src/widgets/styles/images/titlebar-max-48.png
Binary files differ
diff --git a/src/widgets/styles/images/titlebar-min-16.png b/src/widgets/styles/images/titlebar-min-16.png
new file mode 100644
index 0000000000..95e714b522
--- /dev/null
+++ b/src/widgets/styles/images/titlebar-min-16.png
Binary files differ
diff --git a/src/widgets/styles/images/titlebar-min-32.png b/src/widgets/styles/images/titlebar-min-32.png
new file mode 100644
index 0000000000..0b9afedecf
--- /dev/null
+++ b/src/widgets/styles/images/titlebar-min-32.png
Binary files differ
diff --git a/src/widgets/styles/images/titlebar-min-48.png b/src/widgets/styles/images/titlebar-min-48.png
new file mode 100644
index 0000000000..b59a336d36
--- /dev/null
+++ b/src/widgets/styles/images/titlebar-min-48.png
Binary files differ
diff --git a/src/widgets/styles/images/titlebar-shade-16.png b/src/widgets/styles/images/titlebar-shade-16.png
new file mode 100644
index 0000000000..cc870a1e5c
--- /dev/null
+++ b/src/widgets/styles/images/titlebar-shade-16.png
Binary files differ
diff --git a/src/widgets/styles/images/titlebar-shade-32.png b/src/widgets/styles/images/titlebar-shade-32.png
new file mode 100644
index 0000000000..b785b8e216
--- /dev/null
+++ b/src/widgets/styles/images/titlebar-shade-32.png
Binary files differ
diff --git a/src/widgets/styles/images/titlebar-shade-48.png b/src/widgets/styles/images/titlebar-shade-48.png
new file mode 100644
index 0000000000..42b75b4a0c
--- /dev/null
+++ b/src/widgets/styles/images/titlebar-shade-48.png
Binary files differ
diff --git a/src/widgets/styles/images/titlebar-unshade-16.png b/src/widgets/styles/images/titlebar-unshade-16.png
new file mode 100644
index 0000000000..ef19de6c2f
--- /dev/null
+++ b/src/widgets/styles/images/titlebar-unshade-16.png
Binary files differ
diff --git a/src/widgets/styles/images/titlebar-unshade-32.png b/src/widgets/styles/images/titlebar-unshade-32.png
new file mode 100644
index 0000000000..9f74bb0ac7
--- /dev/null
+++ b/src/widgets/styles/images/titlebar-unshade-32.png
Binary files differ
diff --git a/src/widgets/styles/images/titlebar-unshade-48.png b/src/widgets/styles/images/titlebar-unshade-48.png
new file mode 100644
index 0000000000..bd17c3cf48
--- /dev/null
+++ b/src/widgets/styles/images/titlebar-unshade-48.png
Binary files differ
diff --git a/src/widgets/styles/images/toolbar-ext-h-16.png b/src/widgets/styles/images/toolbar-ext-h-16.png
new file mode 100644
index 0000000000..c6bd1b1784
--- /dev/null
+++ b/src/widgets/styles/images/toolbar-ext-h-16.png
Binary files differ
diff --git a/src/widgets/styles/images/toolbar-ext-h-32.png b/src/widgets/styles/images/toolbar-ext-h-32.png
new file mode 100644
index 0000000000..99c62698f2
--- /dev/null
+++ b/src/widgets/styles/images/toolbar-ext-h-32.png
Binary files differ
diff --git a/src/widgets/styles/images/toolbar-ext-h-8.png b/src/widgets/styles/images/toolbar-ext-h-8.png
new file mode 100644
index 0000000000..340a374bce
--- /dev/null
+++ b/src/widgets/styles/images/toolbar-ext-h-8.png
Binary files differ
diff --git a/src/widgets/styles/images/toolbar-ext-h-rtl-16.png b/src/widgets/styles/images/toolbar-ext-h-rtl-16.png
new file mode 100644
index 0000000000..31c72892b4
--- /dev/null
+++ b/src/widgets/styles/images/toolbar-ext-h-rtl-16.png
Binary files differ
diff --git a/src/widgets/styles/images/toolbar-ext-h-rtl-32.png b/src/widgets/styles/images/toolbar-ext-h-rtl-32.png
new file mode 100644
index 0000000000..bfc333daac
--- /dev/null
+++ b/src/widgets/styles/images/toolbar-ext-h-rtl-32.png
Binary files differ
diff --git a/src/widgets/styles/images/toolbar-ext-h-rtl-8.png b/src/widgets/styles/images/toolbar-ext-h-rtl-8.png
new file mode 100644
index 0000000000..538e408310
--- /dev/null
+++ b/src/widgets/styles/images/toolbar-ext-h-rtl-8.png
Binary files differ
diff --git a/src/widgets/styles/images/toolbar-ext.png b/src/widgets/styles/images/toolbar-ext-macstyle.png
index 37bd403ff8..37bd403ff8 100644
--- a/src/widgets/styles/images/toolbar-ext.png
+++ b/src/widgets/styles/images/toolbar-ext-macstyle.png
Binary files differ
diff --git a/src/widgets/styles/images/toolbar-ext@2x.png b/src/widgets/styles/images/toolbar-ext-macstyle@2x.png
index 6fc729efb0..6fc729efb0 100644
--- a/src/widgets/styles/images/toolbar-ext@2x.png
+++ b/src/widgets/styles/images/toolbar-ext-macstyle@2x.png
Binary files differ
diff --git a/src/widgets/styles/images/toolbar-ext-v-10.png b/src/widgets/styles/images/toolbar-ext-v-10.png
new file mode 100644
index 0000000000..2a6d0e4c70
--- /dev/null
+++ b/src/widgets/styles/images/toolbar-ext-v-10.png
Binary files differ
diff --git a/src/widgets/styles/images/toolbar-ext-v-20.png b/src/widgets/styles/images/toolbar-ext-v-20.png
new file mode 100644
index 0000000000..adc27f52b5
--- /dev/null
+++ b/src/widgets/styles/images/toolbar-ext-v-20.png
Binary files differ
diff --git a/src/widgets/styles/images/toolbar-ext-v-5.png b/src/widgets/styles/images/toolbar-ext-v-5.png
new file mode 100644
index 0000000000..21c670446c
--- /dev/null
+++ b/src/widgets/styles/images/toolbar-ext-v-5.png
Binary files differ
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index 7420bfb3f7..544cc5ef95 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -933,55 +933,53 @@ void QCommonStylePrivate::viewItemDrawText(QPainter *p, const QStyleOptionViewIt
viewItemTextLayout(textLayout, textRect.width());
- QString elidedText;
- qreal height = 0;
- qreal width = 0;
- int elidedIndex = -1;
- const int lineCount = textLayout.lineCount();
- for (int j = 0; j < lineCount; ++j) {
- const QTextLine line = textLayout.lineAt(j);
- if (j + 1 <= lineCount - 1) {
- const QTextLine nextLine = textLayout.lineAt(j + 1);
- if ((nextLine.y() + nextLine.height()) > textRect.height()) {
- int start = line.textStart();
- int length = line.textLength() + nextLine.textLength();
- const QStackTextEngine engine(textLayout.text().mid(start, length), option->font);
- elidedText = engine.elidedText(option->textElideMode, textRect.width());
- height += line.height();
- width = textRect.width();
- elidedIndex = j;
- break;
- }
- }
- if (line.naturalTextWidth() > textRect.width()) {
- int start = line.textStart();
- int length = line.textLength();
- const QStackTextEngine engine(textLayout.text().mid(start, length), option->font);
- elidedText = engine.elidedText(option->textElideMode, textRect.width());
- height += line.height();
- width = textRect.width();
- elidedIndex = j;
- break;
- }
- width = qMax<qreal>(width, line.width());
- height += line.height();
- }
-
+ const QRectF boundingRect = textLayout.boundingRect();
const QRect layoutRect = QStyle::alignedRect(option->direction, option->displayAlignment,
- QSize(int(width), int(height)), textRect);
+ boundingRect.size().toSize(), textRect);
const QPointF position = layoutRect.topLeft();
+ const int lineCount = textLayout.lineCount();
+
+ qreal height = 0;
for (int i = 0; i < lineCount; ++i) {
const QTextLine line = textLayout.lineAt(i);
- if (i == elidedIndex) {
- qreal x = position.x() + line.x();
- qreal y = position.y() + line.y() + line.ascent();
+ height += line.height();
+
+ // above visible rect
+ if (height + layoutRect.top() <= textRect.top())
+ continue;
+
+ const int start = line.textStart();
+ const int length = line.textLength();
+
+ const bool drawElided = line.naturalTextWidth() > textRect.width();
+ bool elideLastVisibleLine = false;
+ if (!drawElided && i + 1 < lineCount) {
+ const QTextLine nextLine = textLayout.lineAt(i + 1);
+ const int nextHeight = height + nextLine.height() / 2;
+ // elide when less than the next half line is visible
+ if (nextHeight + layoutRect.top() > textRect.height() + textRect.top())
+ elideLastVisibleLine = true;
+ }
+
+ if (drawElided || elideLastVisibleLine) {
+ QString text = textLayout.text().mid(start, length);
+ if (elideLastVisibleLine)
+ text += QChar(0x2026);
+ const QStackTextEngine engine(text, option->font);
+ const QString elidedText = engine.elidedText(option->textElideMode, textRect.width());
+ const QPointF pos(position.x() + line.x(),
+ position.y() + line.y() + line.ascent());
p->save();
p->setFont(option->font);
- p->drawText(QPointF(x, y), elidedText);
+ p->drawText(pos, elidedText);
p->restore();
- break;
+ } else {
+ line.draw(p, position);
}
- line.draw(p, position);
+
+ // below visible text, can stop
+ if (height + layoutRect.top() >= textRect.bottom())
+ break;
}
}
@@ -1670,8 +1668,9 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
alignment |= Qt::AlignLeft | Qt::AlignVCenter;
}
tr.translate(shiftX, shiftY);
+ const QString text = toolbutton->fontMetrics.elidedText(toolbutton->text, Qt::ElideMiddle, tr.width());
proxy()->drawItemText(p, QStyle::visualRect(opt->direction, rect, tr), alignment, toolbutton->palette,
- toolbutton->state & State_Enabled, toolbutton->text,
+ toolbutton->state & State_Enabled, text,
QPalette::ButtonText);
} else {
rect.translate(shiftX, shiftY);
@@ -2858,8 +2857,8 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
case SE_TabBarScrollLeftButton: {
const bool vertical = opt->rect.width() < opt->rect.height();
const Qt::LayoutDirection ld = widget->layoutDirection();
- const int buttonWidth = qMax(pixelMetric(QStyle::PM_TabBarScrollButtonWidth, 0, widget), QApplication::globalStrut().width());
- const int buttonOverlap = pixelMetric(QStyle::PM_TabBar_ScrollButtonOverlap, 0, widget);
+ const int buttonWidth = qMax(proxy()->pixelMetric(QStyle::PM_TabBarScrollButtonWidth, 0, widget), QApplication::globalStrut().width());
+ const int buttonOverlap = proxy()->pixelMetric(QStyle::PM_TabBar_ScrollButtonOverlap, 0, widget);
r = vertical ? QRect(0, opt->rect.height() - (buttonWidth * 2) + buttonOverlap, opt->rect.width(), buttonWidth)
: QStyle::visualRect(ld, opt->rect, QRect(opt->rect.width() - (buttonWidth * 2) + buttonOverlap, 0, buttonWidth, opt->rect.height()));
@@ -2867,7 +2866,7 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
case SE_TabBarScrollRightButton: {
const bool vertical = opt->rect.width() < opt->rect.height();
const Qt::LayoutDirection ld = widget->layoutDirection();
- const int buttonWidth = qMax(pixelMetric(QStyle::PM_TabBarScrollButtonWidth, 0, widget), QApplication::globalStrut().width());
+ const int buttonWidth = qMax(proxy()->pixelMetric(QStyle::PM_TabBarScrollButtonWidth, 0, widget), QApplication::globalStrut().width());
r = vertical ? QRect(0, opt->rect.height() - buttonWidth, opt->rect.width(), buttonWidth)
: QStyle::visualRect(ld, opt->rect, QRect(opt->rect.width() - buttonWidth, 0, buttonWidth, opt->rect.height()));
@@ -3082,7 +3081,7 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
//have all the information we need (ie. the layout's margin)
const QToolBar *tb = qobject_cast<const QToolBar*>(widget);
const int margin = tb && tb->layout() ? tb->layout()->margin() : 2;
- const int handleExtent = pixelMetric(QStyle::PM_ToolBarHandleExtent, opt, tb);
+ const int handleExtent = proxy()->pixelMetric(QStyle::PM_ToolBarHandleExtent, opt, tb);
if (tbopt->state & QStyle::State_Horizontal) {
r = QRect(margin, margin, handleExtent, tbopt->rect.height() - 2*margin);
r = QStyle::visualRect(tbopt->direction, tbopt->rect, r);
@@ -4937,8 +4936,8 @@ QSize QCommonStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
case CT_SpinBox:
if (const QStyleOptionSpinBox *vopt = qstyleoption_cast<const QStyleOptionSpinBox *>(opt)) {
// Add button + frame widths
- int buttonWidth = 20;
- int fw = vopt->frame ? proxy()->pixelMetric(PM_SpinBoxFrameWidth, vopt, widget) : 0;
+ const int buttonWidth = (vopt->subControls & (QStyle::SC_SpinBoxUp | QStyle::SC_SpinBoxDown)) != 0 ? 20 : 0;
+ const int fw = vopt->frame ? proxy()->pixelMetric(PM_SpinBoxFrameWidth, vopt, widget) : 0;
sz += QSize(buttonWidth + 2*fw, 2*fw);
}
break;
@@ -5307,6 +5306,9 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget
case SH_SpinBox_ButtonsInsideFrame:
ret = true;
break;
+ case SH_SpinBox_StepModifier:
+ ret = Qt::ControlModifier;
+ break;
default:
ret = 0;
break;
@@ -5719,14 +5721,14 @@ static inline QString iconPngSuffix() { return QStringLiteral(".png"); }
static void addIconFiles(const QString &prefix, const int sizes[], size_t count, QIcon &icon)
{
- for (size_t i = 0; i < count; ++i) {
- const int size = sizes[i];
- icon.addFile(prefix + QString::number(size) + iconPngSuffix(), QSize(size, size));
- }
+ for (size_t i = 0; i < count; ++i)
+ icon.addFile(prefix + QString::number(sizes[i]) + iconPngSuffix());
}
static const int dockTitleIconSizes[] = {10, 16, 20, 32, 48, 64};
-
+static const int titleBarSizes[] = {16, 32, 48};
+static const int toolBarExtHSizes[] = {8, 16, 32};
+static const int toolBarExtVSizes[] = {5, 10, 20};
#endif // imageformat_png
/*!
@@ -6041,6 +6043,27 @@ QIcon QCommonStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption
switch (standardIcon) {
#ifndef QT_NO_IMAGEFORMAT_PNG
+ case SP_TitleBarMinButton:
+ addIconFiles(iconResourcePrefix() + QStringLiteral("titlebar-min-"),
+ titleBarSizes, sizeof(titleBarSizes)/sizeof(titleBarSizes[0]), icon);
+ break;
+ case SP_TitleBarMaxButton:
+ addIconFiles(iconResourcePrefix() + QStringLiteral("titlebar-max-"),
+ titleBarSizes, sizeof(titleBarSizes)/sizeof(titleBarSizes[0]), icon);
+ break;
+ case SP_TitleBarShadeButton:
+ addIconFiles(iconResourcePrefix() + QStringLiteral("titlebar-shade-"),
+ titleBarSizes, sizeof(titleBarSizes)/sizeof(titleBarSizes[0]), icon);
+
+ break;
+ case SP_TitleBarUnshadeButton:
+ addIconFiles(iconResourcePrefix() + QStringLiteral("titlebar-unshade-"),
+ titleBarSizes, sizeof(titleBarSizes)/sizeof(titleBarSizes[0]), icon);
+ break;
+ case SP_TitleBarContextHelpButton:
+ addIconFiles(iconResourcePrefix() + QStringLiteral("titlebar-contexthelp-"),
+ titleBarSizes, sizeof(titleBarSizes)/sizeof(titleBarSizes[0]), icon);
+ break;
case SP_FileDialogNewFolder:
icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/newdirectory-16.png"), QSize(16, 16));
icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/newdirectory-32.png"), QSize(32, 32));
@@ -6249,6 +6272,17 @@ QIcon QCommonStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption
addIconFiles(iconResourcePrefix() + QStringLiteral("normalizedockup-"),
dockTitleIconSizes, sizeof(dockTitleIconSizes)/sizeof(dockTitleIconSizes[0]), icon);
break;
+ case SP_ToolBarHorizontalExtensionButton: {
+ QString prefix = iconResourcePrefix() + QStringLiteral("toolbar-ext-h-");
+ if (rtl)
+ prefix += QStringLiteral("rtl-");
+ addIconFiles(prefix, toolBarExtHSizes, sizeof(toolBarExtHSizes)/sizeof(toolBarExtHSizes[0]), icon);
+ }
+ break;
+ case SP_ToolBarVerticalExtensionButton:
+ addIconFiles(iconResourcePrefix() + QStringLiteral("toolbar-ext-v-"),
+ toolBarExtVSizes, sizeof(toolBarExtVSizes)/sizeof(toolBarExtVSizes[0]), icon);
+ break;
#endif // QT_NO_IMAGEFORMAT_PNG
default:
icon.addPixmap(proxy()->standardPixmap(standardIcon, option, widget));
diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp
index 73a6554f1a..8006be8c27 100644
--- a/src/widgets/styles/qstyle.cpp
+++ b/src/widgets/styles/qstyle.cpp
@@ -2001,6 +2001,13 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment,
Determnines if the spin box buttons are inside the line edit frame.
This enum value has been introduced in Qt 5.11.
+ \value SH_SpinBox_StepModifier
+ Determines which Qt::KeyboardModifier increases the step rate of
+ QAbstractSpinBox. Possible values are Qt::NoModifier,
+ Qt::ControlModifier (default) or Qt::ShiftModifier. Qt::NoModifier
+ disables this feature.
+ This enum value has been introduced in Qt 5.12.
+
\sa styleHint()
*/
diff --git a/src/widgets/styles/qstyle.h b/src/widgets/styles/qstyle.h
index cef569d514..9192dae864 100644
--- a/src/widgets/styles/qstyle.h
+++ b/src/widgets/styles/qstyle.h
@@ -741,6 +741,7 @@ public:
SH_Widget_Animation_Duration,
SH_ComboBox_AllowWheelScrolling,
SH_SpinBox_ButtonsInsideFrame,
+ SH_SpinBox_StepModifier,
// Add new style hint values here
SH_CustomBase = 0xf0000000
diff --git a/src/widgets/styles/qstyle.qrc b/src/widgets/styles/qstyle.qrc
index 2dc3207e6d..d3511ee754 100644
--- a/src/widgets/styles/qstyle.qrc
+++ b/src/widgets/styles/qstyle.qrc
@@ -140,13 +140,37 @@
<file>images/normalizedockup-32.png</file>
<file>images/normalizedockup-48.png</file>
<file>images/normalizedockup-64.png</file>
+ <file>images/toolbar-ext-h-8.png</file>
+ <file>images/toolbar-ext-h-16.png</file>
+ <file>images/toolbar-ext-h-32.png</file>
+ <file>images/toolbar-ext-h-rtl-8.png</file>
+ <file>images/toolbar-ext-h-rtl-16.png</file>
+ <file>images/toolbar-ext-h-rtl-32.png</file>
+ <file>images/toolbar-ext-v-5.png</file>
+ <file>images/toolbar-ext-v-10.png</file>
+ <file>images/toolbar-ext-v-20.png</file>
+ <file>images/titlebar-contexthelp-16.png</file>
+ <file>images/titlebar-contexthelp-32.png</file>
+ <file>images/titlebar-contexthelp-48.png</file>
+ <file>images/titlebar-max-16.png</file>
+ <file>images/titlebar-max-32.png</file>
+ <file>images/titlebar-max-48.png</file>
+ <file>images/titlebar-min-16.png</file>
+ <file>images/titlebar-min-32.png</file>
+ <file>images/titlebar-min-48.png</file>
+ <file>images/titlebar-shade-16.png</file>
+ <file>images/titlebar-shade-32.png</file>
+ <file>images/titlebar-shade-48.png</file>
+ <file>images/titlebar-unshade-16.png</file>
+ <file>images/titlebar-unshade-32.png</file>
+ <file>images/titlebar-unshade-48.png</file>
</qresource>
<qresource prefix="/qt-project.org/styles/macstyle">
<file alias="images/closedock-16.png">images/closedock-macstyle-16.png</file>
<file alias="images/closedock-down-16.png">images/closedock-down-macstyle-16.png</file>
<file alias="images/dockdock-16.png">images/dockdock-macstyle-16.png</file>
<file alias="images/dockdock-down-16.png">images/dockdock-down-macstyle-16.png</file>
- <file>images/toolbar-ext.png</file>
- <file>images/toolbar-ext@2x.png</file>
+ <file alias="images/toolbar-ext.png">images/toolbar-ext-macstyle.png</file>
+ <file alias="images/toolbar-ext@2x.png">images/toolbar-ext-macstyle@2x.png</file>
</qresource>
</RCC>
diff --git a/src/widgets/styles/qstyleoption.cpp b/src/widgets/styles/qstyleoption.cpp
index e7fa26e2d4..97631a5841 100644
--- a/src/widgets/styles/qstyleoption.cpp
+++ b/src/widgets/styles/qstyleoption.cpp
@@ -1842,10 +1842,12 @@ QStyleOptionMenuItem::QStyleOptionMenuItem(int version)
/*!
\variable QStyleOptionMenuItem::tabWidth
- \brief the tab width for the menu item
+ \brief the reserved width for the menu item's shortcut
- The tab width is the distance between the text of the menu item
- and the shortcut. The default value is 0.
+ QMenu sets it to the width occupied by the widest shortcut among
+ all visible items within the menu.
+
+ The default value is 0.
*/
diff --git a/src/widgets/styles/qstyleoption.h b/src/widgets/styles/qstyleoption.h
index 9fbaf34a86..8ae07efc81 100644
--- a/src/widgets/styles/qstyleoption.h
+++ b/src/widgets/styles/qstyleoption.h
@@ -366,7 +366,7 @@ public:
QString text;
QIcon icon;
int maxIconWidth;
- int tabWidth;
+ int tabWidth; // ### Qt 6: rename to reservedShortcutWidth
QFont font;
QStyleOptionMenuItem();
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index 94509f621e..3f0b6fbfda 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -530,6 +530,8 @@ public:
const QStyleSheetGeometryData *geometry() const { return geo; }
const QStyleSheetPositionData *position() const { return p; }
+ bool hasModification() const;
+
bool hasPalette() const { return pal != 0; }
bool hasBackground() const { return bg != 0 && (!bg->pixmap.isNull() || bg->brush.style() != Qt::NoBrush); }
bool hasGradientBackground() const { return bg && bg->brush.style() >= Qt::LinearGradientPattern
@@ -1041,7 +1043,7 @@ QRenderRule::QRenderRule(const QVector<Declaration> &declarations, const QObject
if (const QWidget *widget = qobject_cast<const QWidget *>(object)) {
QStyleSheetStyle *style = const_cast<QStyleSheetStyle *>(globalStyleSheetStyle);
if (!style)
- style = qobject_cast<QStyleSheetStyle *>(widget->style());
+ style = qt_styleSheet(widget->style());
if (style)
fixupBorder(style->nativeFrameWidth(widget));
}
@@ -1444,6 +1446,21 @@ void QRenderRule::configurePalette(QPalette *p, QPalette::ColorGroup cg, const Q
p->setBrush(cg, QPalette::AlternateBase, pal->alternateBackground);
}
+bool QRenderRule::hasModification() const
+{
+ return hasPalette() ||
+ hasBackground() ||
+ hasGradientBackground() ||
+ !hasNativeBorder() ||
+ !hasNativeOutline() ||
+ hasBox() ||
+ hasPosition() ||
+ hasGeometry() ||
+ hasImage() ||
+ hasFont ||
+ !styleHints.isEmpty();
+}
+
///////////////////////////////////////////////////////////////////////////////
// Style rules
#define OBJECT_PTR(x) (static_cast<QObject *>(x.ptr))
@@ -1502,7 +1519,7 @@ public:
return className;
} else if (name == QLatin1String("style")) {
QWidget *w = qobject_cast<QWidget *>(obj);
- QStyleSheetStyle *proxy = w ? qobject_cast<QStyleSheetStyle *>(w->style()) : 0;
+ QStyleSheetStyle *proxy = w ? qt_styleSheet(w->style()) : 0;
if (proxy) {
QString styleName = QString::fromLatin1(proxy->baseStyle()->metaObject()->className());
cache[name] = styleName;
@@ -2734,7 +2751,7 @@ QStyle *QStyleSheetStyle::baseStyle() const
{
if (base)
return base;
- if (QStyleSheetStyle *me = qobject_cast<QStyleSheetStyle *>(QApplication::style()))
+ if (QStyleSheetStyle *me = qt_styleSheet(QApplication::style()))
return me->base;
return QApplication::style();
}
@@ -2823,6 +2840,9 @@ void QStyleSheetStyle::polish(QWidget *w)
#endif
QRenderRule rule = renderRule(w, PseudoElement_None, PseudoClass_Any);
+
+ w->setAttribute(Qt::WA_StyleSheetTarget, rule.hasModification());
+
if (rule.hasDrawable() || rule.hasBox()) {
if (w->metaObject() == &QWidget::staticMetaObject
#if QT_CONFIG(itemviews)
@@ -2909,6 +2929,7 @@ void QStyleSheetStyle::unpolish(QWidget *w)
w->setProperty("_q_stylesheet_minh", QVariant());
w->setProperty("_q_stylesheet_maxw", QVariant());
w->setProperty("_q_stylesheet_maxh", QVariant());
+ w->setAttribute(Qt::WA_StyleSheetTarget, false);
w->setAttribute(Qt::WA_StyleSheet, false);
QObject::disconnect(w, 0, this, 0);
#if QT_CONFIG(scrollarea)
@@ -3673,6 +3694,17 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
bool dis = !(opt->state & QStyle::State_Enabled),
act = opt->state & QStyle::State_Selected;
+ int checkableOffset = 0;
+ if (checkable) {
+ QRenderRule subSubRule = renderRule(w, opt, PseudoElement_MenuCheckMark);
+ QStyleOptionMenuItem newMi = mi;
+ newMi.rect = positionRect(w, subRule, subSubRule, PseudoElement_MenuCheckMark, opt->rect, opt->direction);
+ checkableOffset = newMi.rect.width();
+ if (subSubRule.hasDrawable() || checked)
+ drawPrimitive(PE_IndicatorMenuCheckMark, &newMi, p, w);
+ }
+
+ int iconOffset = 0;
if (!mi.icon.isNull()) {
QIcon::Mode mode = dis ? QIcon::Disabled : QIcon::Normal;
if (act && !dis)
@@ -3692,20 +3724,22 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
iconRule.geo->height = pixh;
}
QRect iconRect = positionRect(w, subRule, iconRule, PseudoElement_MenuIcon, opt->rect, opt->direction);
+ if (opt->direction == Qt::LeftToRight)
+ iconRect.moveLeft(iconRect.left() + checkableOffset);
+ else
+ iconRect.moveRight(iconRect.right() - checkableOffset);
iconRule.drawRule(p, iconRect);
QRect pmr(0, 0, pixw, pixh);
pmr.moveCenter(iconRect.center());
p->drawPixmap(pmr.topLeft(), pixmap);
- } else if (checkable) {
- QRenderRule subSubRule = renderRule(w, opt, PseudoElement_MenuCheckMark);
- if (subSubRule.hasDrawable() || checked) {
- QStyleOptionMenuItem newMi = mi;
- newMi.rect = positionRect(w, subRule, subSubRule, PseudoElement_MenuCheckMark, opt->rect, opt->direction);
- drawPrimitive(PE_IndicatorMenuCheckMark, &newMi, p, w);
- }
+ iconOffset = iconRule.geo->width;
}
QRect textRect = subRule.contentsRect(opt->rect);
+ if (opt->direction == Qt::LeftToRight)
+ textRect.setLeft(textRect.left() + checkableOffset + iconOffset);
+ else
+ textRect.setRight(textRect.right() - checkableOffset - iconOffset);
textRect.setWidth(textRect.width() - mi.tabWidth);
QStringRef s(&mi.text);
p->setPen(mi.palette.buttonText().color());
@@ -5051,6 +5085,16 @@ QSize QStyleSheetStyle::sizeFromContents(ContentsType ct, const QStyleOption *op
int width = csz.width();
if (mi->text.contains(QLatin1Char('\t')))
width += 12; //as in QCommonStyle
+ bool checkable = mi->checkType != QStyleOptionMenuItem::NotCheckable;
+ if (checkable) {
+ QRenderRule subSubRule = renderRule(w, opt, PseudoElement_MenuCheckMark);
+ QRect checkmarkRect = positionRect(w, subRule, subSubRule, PseudoElement_MenuCheckMark, opt->rect, opt->direction);
+ width += checkmarkRect.width();
+ }
+ if (!mi->icon.isNull()) {
+ QPixmap pixmap = mi->icon.pixmap(pixelMetric(PM_SmallIconSize));
+ width += pixmap.width();
+ }
return subRule.boxSize(subRule.adjustSize(QSize(width, csz.height())));
}
}
@@ -5201,7 +5245,7 @@ static QLatin1String propertyNameForStandardPixmap(QStyle::StandardPixmap sp)
case QStyle::SP_DialogCloseButton: return QLatin1String("dialog-close-icon");
case QStyle::SP_DialogApplyButton: return QLatin1String("dialog-apply-icon");
case QStyle::SP_DialogResetButton: return QLatin1String("dialog-reset-icon");
- case QStyle::SP_DialogDiscardButton: return QLatin1String("discard-icon");
+ case QStyle::SP_DialogDiscardButton: return QLatin1String("dialog-discard-icon");
case QStyle::SP_DialogYesButton: return QLatin1String("dialog-yes-icon");
case QStyle::SP_DialogNoButton: return QLatin1String("dialog-no-icon");
case QStyle::SP_ArrowUp: return QLatin1String("uparrow-icon");
diff --git a/src/widgets/styles/qstylesheetstyle_p.h b/src/widgets/styles/qstylesheetstyle_p.h
index 042abf5c22..d1647fb107 100644
--- a/src/widgets/styles/qstylesheetstyle_p.h
+++ b/src/widgets/styles/qstylesheetstyle_p.h
@@ -215,6 +215,13 @@ template <typename T>
class QTypeInfo<QStyleSheetStyleCaches::Tampered<T>>
: QTypeInfoMerger<QStyleSheetStyleCaches::Tampered<T>, T> {};
+
+// Returns a QStyleSheet from the given style.
+inline QStyleSheetStyle* qt_styleSheet(QStyle *style)
+{
+ return qobject_cast<QStyleSheetStyle *>(style);
+}
+
QT_END_NAMESPACE
#endif // QT_NO_STYLE_STYLESHEET
#endif // QSTYLESHEETSTYLE_P_H
diff --git a/src/widgets/util/qcompleter.cpp b/src/widgets/util/qcompleter.cpp
index 599b983748..96dde64ccc 100644
--- a/src/widgets/util/qcompleter.cpp
+++ b/src/widgets/util/qcompleter.cpp
@@ -1000,7 +1000,7 @@ QCompleter::QCompleter(QAbstractItemModel *model, QObject *parent)
d->init(model);
}
-#ifndef QT_NO_STRINGLISTMODEL
+#if QT_CONFIG(stringlistmodel)
/*!
Constructs a QCompleter object with the given \a parent that uses the specified
\a list as a source of possible completions.
@@ -1011,7 +1011,7 @@ QCompleter::QCompleter(const QStringList& list, QObject *parent)
Q_D(QCompleter);
d->init(new QStringListModel(list, this));
}
-#endif // QT_NO_STRINGLISTMODEL
+#endif // QT_CONFIG(stringlistmodel)
/*!
Destroys the completer object.
diff --git a/src/widgets/util/qcompleter.h b/src/widgets/util/qcompleter.h
index de79302e15..fd1191d123 100644
--- a/src/widgets/util/qcompleter.h
+++ b/src/widgets/util/qcompleter.h
@@ -84,7 +84,7 @@ public:
QCompleter(QObject *parent = nullptr);
QCompleter(QAbstractItemModel *model, QObject *parent = nullptr);
-#ifndef QT_NO_STRINGLISTMODEL
+#if QT_CONFIG(stringlistmodel)
QCompleter(const QStringList& completions, QObject *parent = nullptr);
#endif
~QCompleter();
diff --git a/src/widgets/util/qscroller.cpp b/src/widgets/util/qscroller.cpp
index 903a141e49..28504f5631 100644
--- a/src/widgets/util/qscroller.cpp
+++ b/src/widgets/util/qscroller.cpp
@@ -1894,7 +1894,7 @@ qreal QScrollerPrivate::nextSnapPos(qreal p, int dir, Qt::Orientation orientatio
if (orientation == Qt::Horizontal) {
// the snap points in the list
- foreach (qreal snapPos, snapPositionsX) {
+ for (qreal snapPos : snapPositionsX) {
qreal snapPosDist = snapPos - p;
if ((dir > 0 && snapPosDist < 0) ||
(dir < 0 && snapPosDist > 0))
@@ -1941,7 +1941,7 @@ qreal QScrollerPrivate::nextSnapPos(qreal p, int dir, Qt::Orientation orientatio
} else { // (orientation == Qt::Vertical)
// the snap points in the list
- foreach (qreal snapPos, snapPositionsY) {
+ for (qreal snapPos : snapPositionsY) {
qreal snapPosDist = snapPos - p;
if ((dir > 0 && snapPosDist < 0) ||
(dir < 0 && snapPosDist > 0))
diff --git a/src/widgets/util/qsystemtrayicon.cpp b/src/widgets/util/qsystemtrayicon.cpp
index 86c824afdb..d15f5e5955 100644
--- a/src/widgets/util/qsystemtrayicon.cpp
+++ b/src/widgets/util/qsystemtrayicon.cpp
@@ -523,6 +523,8 @@ QBalloonTip::QBalloonTip(const QIcon &icon, const QString &title,
closeButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
closeButton->setFixedSize(closeButtonSize, closeButtonSize);
QObject::connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
+#else
+ Q_UNUSED(closeButtonSize);
#endif
#if QT_CONFIG(label)
diff --git a/src/widgets/util/qsystemtrayicon_x11.cpp b/src/widgets/util/qsystemtrayicon_x11.cpp
index df93e15f80..86532456c7 100644
--- a/src/widgets/util/qsystemtrayicon_x11.cpp
+++ b/src/widgets/util/qsystemtrayicon_x11.cpp
@@ -63,8 +63,6 @@
#include <private/qguiapplication_p.h>
#include <qdebug.h>
-#include <QtPlatformHeaders/qxcbwindowfunctions.h>
-#include <QtPlatformHeaders/qxcbintegrationfunctions.h>
#ifndef QT_NO_SYSTEMTRAYICON
QT_BEGIN_NAMESPACE
@@ -98,10 +96,7 @@ private slots:
void systemTrayWindowChanged(QScreen *screen);
private:
- bool addToTray();
-
QSystemTrayIcon *q;
- QPixmap background;
};
QSystemTrayIconSys::QSystemTrayIconSys(QSystemTrayIcon *qIn)
@@ -117,55 +112,13 @@ QSystemTrayIconSys::QSystemTrayIconSys(QSystemTrayIcon *qIn)
const QSize size(22, 22); // Gnome, standard size
setGeometry(QRect(QPoint(0, 0), size));
setMinimumSize(size);
-
- // We need two different behaviors depending on whether the X11 visual for the system tray
- // (a) exists and (b) supports an alpha channel, i.e. is 32 bits.
- // If we have a visual that has an alpha channel, we can paint this widget with a transparent
- // background and it will work.
- // However, if there's no alpha channel visual, in order for transparent tray icons to work,
- // we do not have a transparent background on the widget, but set the BackPixmap property of our
- // window to ParentRelative (so that it inherits the background of its X11 parent window), call
- // xcb_clear_region before painting (so that the inherited background is visible) and then grab
- // the just-drawn background from the X11 server.
- bool hasAlphaChannel = QXcbIntegrationFunctions::xEmbedSystemTrayVisualHasAlphaChannel();
- setAttribute(Qt::WA_TranslucentBackground, hasAlphaChannel);
- if (!hasAlphaChannel) {
- createWinId();
- QXcbWindowFunctions::setParentRelativeBackPixmap(windowHandle());
-
- // XXX: This is actually required, but breaks things ("QWidget::paintEngine: Should no
- // longer be called"). Why is this needed? When the widget is drawn, we use tricks to grab
- // the tray icon's background from the server. If the tray icon isn't visible (because
- // another window is on top of it), the trick fails and instead uses the content of that
- // other window as the background.
- // setAttribute(Qt::WA_PaintOnScreen);
- }
-
- addToTray();
-}
-
-bool QSystemTrayIconSys::addToTray()
-{
- if (!locateSystemTray())
- return false;
-
- createWinId();
+ setAttribute(Qt::WA_TranslucentBackground);
setMouseTracking(true);
-
- if (!QXcbWindowFunctions::requestSystemTrayWindowDock(windowHandle()))
- return false;
-
- if (!background.isNull())
- background = QPixmap();
- show();
- return true;
}
void QSystemTrayIconSys::systemTrayWindowChanged(QScreen *)
{
- if (locateSystemTray()) {
- addToTray();
- } else {
+ if (!locateSystemTray()) {
QBalloonTip::hideBalloon();
hide(); // still no luck
destroy();
@@ -174,7 +127,7 @@ void QSystemTrayIconSys::systemTrayWindowChanged(QScreen *)
QRect QSystemTrayIconSys::globalGeometry() const
{
- return QXcbWindowFunctions::systemTrayWindowGlobalGeometry(windowHandle());
+ return QRect(mapToGlobal(QPoint(0, 0)), size());
}
void QSystemTrayIconSys::mousePressEvent(QMouseEvent *ev)
@@ -227,22 +180,6 @@ void QSystemTrayIconSys::paintEvent(QPaintEvent *)
const QRect rect(QPoint(0, 0), geometry().size());
QPainter painter(this);
- // If we have Qt::WA_TranslucentBackground set, during widget creation
- // we detected the systray visual supported an alpha channel
- if (testAttribute(Qt::WA_TranslucentBackground)) {
- painter.setCompositionMode(QPainter::CompositionMode_Source);
- painter.fillRect(rect, Qt::transparent);
- } else {
- // clearRegion() was called on XEMBED_EMBEDDED_NOTIFY, so we hope that got done by now.
- // Grab the tray background pixmap, before rendering the icon for the first time.
- if (background.isNull()) {
- background = QGuiApplication::primaryScreen()->grabWindow(winId(),
- 0, 0, rect.size().width(), rect.size().height());
- }
- // Then paint over the icon area with the background before compositing the icon on top.
- painter.drawPixmap(QPoint(0, 0), background);
- }
- painter.setCompositionMode(QPainter::CompositionMode_SourceOver);
q->icon().paint(&painter, rect);
}
@@ -285,6 +222,7 @@ void QSystemTrayIconPrivate::install_sys()
sys = new QSystemTrayIconSys(q);
QObject::connect(QGuiApplication::platformNativeInterface(), SIGNAL(systemTrayWindowChanged(QScreen*)),
sys, SLOT(systemTrayWindowChanged(QScreen*)));
+ sys->show();
}
}
diff --git a/src/widgets/util/qundostack.cpp b/src/widgets/util/qundostack.cpp
index b371e903a6..e928b9fe37 100644
--- a/src/widgets/util/qundostack.cpp
+++ b/src/widgets/util/qundostack.cpp
@@ -742,6 +742,17 @@ void QUndoStack::resetClean()
}
/*!
+ \since 5.12
+ \property QUndoStack::clean
+ \brief the clean status of this stack.
+
+ This property indicates whether or not the stack is clean. For example, a
+ stack is clean when a document has been saved.
+
+ \sa isClean(), setClean(), resetClean(), cleanIndex()
+*/
+
+/*!
If the stack is in the clean state, returns \c true; otherwise returns \c false.
\sa setClean(), cleanIndex()
@@ -940,6 +951,17 @@ void QUndoStack::setIndex(int idx)
}
/*!
+ \since 5.12
+ \property QUndoStack::canUndo
+ \brief whether this stack can undo.
+
+ This property indicates whether or not there is a command that can be
+ undone.
+
+ \sa canUndo(), index(), canRedo()
+*/
+
+/*!
Returns \c true if there is a command available for undo; otherwise returns \c false.
This function returns \c false if the stack is empty, or if the bottom command
@@ -959,6 +981,17 @@ bool QUndoStack::canUndo() const
}
/*!
+ \since 5.12
+ \property QUndoStack::canRedo
+ \brief whether this stack can redo.
+
+ This property indicates whether or not there is a command that can be
+ redone.
+
+ \sa canRedo(), index(), canUndo()
+*/
+
+/*!
Returns \c true if there is a command available for redo; otherwise returns \c false.
This function returns \c false if the stack is empty or if the top command
@@ -978,6 +1011,17 @@ bool QUndoStack::canRedo() const
}
/*!
+ \since 5.12
+ \property QUndoStack::undoText
+ \brief the undo text of the next command that is undone.
+
+ This property holds the text of the command which will be undone in the
+ next call to undo().
+
+ \sa undoText(), QUndoCommand::actionText(), redoText()
+*/
+
+/*!
Returns the text of the command which will be undone in the next call to undo().
\sa QUndoCommand::actionText(), redoText()
@@ -994,6 +1038,17 @@ QString QUndoStack::undoText() const
}
/*!
+ \since 5.12
+ \property QUndoStack::redoText
+ \brief the redo text of the next command that is redone.
+
+ This property holds the text of the command which will be redone in the
+ next call to redo().
+
+ \sa redoText(), QUndoCommand::actionText(), undoText()
+*/
+
+/*!
Returns the text of the command which will be redone in the next call to redo().
\sa QUndoCommand::actionText(), undoText()
diff --git a/src/widgets/util/qundostack.h b/src/widgets/util/qundostack.h
index 4be24eadab..b5716b2e9b 100644
--- a/src/widgets/util/qundostack.h
+++ b/src/widgets/util/qundostack.h
@@ -90,6 +90,11 @@ class Q_WIDGETS_EXPORT QUndoStack : public QObject
Q_DECLARE_PRIVATE(QUndoStack)
Q_PROPERTY(bool active READ isActive WRITE setActive)
Q_PROPERTY(int undoLimit READ undoLimit WRITE setUndoLimit)
+ Q_PROPERTY(bool canUndo READ canUndo NOTIFY canUndoChanged)
+ Q_PROPERTY(bool canRedo READ canRedo NOTIFY canRedoChanged)
+ Q_PROPERTY(QString undoText READ undoText NOTIFY undoTextChanged)
+ Q_PROPERTY(QString redoText READ redoText NOTIFY redoTextChanged)
+ Q_PROPERTY(bool clean READ isClean NOTIFY cleanChanged)
public:
explicit QUndoStack(QObject *parent = nullptr);
diff --git a/src/widgets/widgets.pro b/src/widgets/widgets.pro
index e028a691c8..e556cb8b10 100644
--- a/src/widgets/widgets.pro
+++ b/src/widgets/widgets.pro
@@ -6,6 +6,9 @@ CONFIG += $$MODULE_CONFIG
DEFINES += QT_NO_USING_NAMESPACE
msvc:equals(QT_ARCH, i386): QMAKE_LFLAGS += /BASE:0x65000000
+TRACEPOINT_PROVIDER = $$PWD/qtwidgets.tracepoints
+CONFIG += qt_tracepoints
+
QMAKE_DOCS = $$PWD/doc/qtwidgets.qdocconf
#platforms
diff --git a/src/widgets/widgets/qabstractspinbox.cpp b/src/widgets/widgets/qabstractspinbox.cpp
index f059980c5c..822d896ee6 100644
--- a/src/widgets/widgets/qabstractspinbox.cpp
+++ b/src/widgets/widgets/qabstractspinbox.cpp
@@ -100,6 +100,16 @@ QT_BEGIN_NAMESPACE
integer value to signify how many steps were taken. E.g. Pressing
Qt::Key_Down will trigger a call to stepBy(-1).
+ When the user triggers a step whilst holding the Qt::ControlModifier,
+ QAbstractSpinBox steps by 10 instead of making a single step. This
+ step modifier affects wheel events, key events and interaction with
+ the spinbox buttons. Note that on macOS, Control corresponds to the
+ Command key.
+
+ Since Qt 5.12, QStyle::SH_SpinBox_StepModifier can be used to select
+ which Qt::KeyboardModifier increases the step rate. Qt::NoModifier
+ disables this feature.
+
QAbstractSpinBox also provide a virtual function stepEnabled() to
determine whether stepping up/down is allowed at any point. This
function returns a bitset of StepEnabled.
@@ -640,7 +650,15 @@ void QAbstractSpinBox::stepBy(int steps)
e = AlwaysEmit;
}
if (!dontstep) {
- d->setValue(d->bound(d->value + (d->singleStep * steps), old, steps), e);
+ QVariant singleStep;
+ switch (d->stepType) {
+ case QAbstractSpinBox::StepType::AdaptiveDecimalStepType:
+ singleStep = d->calculateAdaptiveDecimalStep(steps);
+ break;
+ default:
+ singleStep = d->singleStep;
+ }
+ d->setValue(d->bound(d->value + (singleStep * steps), old, steps), e);
} else if (e == AlwaysEmit) {
d->emitSignals(e, old);
}
@@ -826,9 +844,13 @@ void QAbstractSpinBox::changeEvent(QEvent *event)
style()->styleHint(QStyle::SH_SpinBox_ClickAutoRepeatThreshold, 0, this);
if (d->edit)
d->edit->setFrame(!style()->styleHint(QStyle::SH_SpinBox_ButtonsInsideFrame, nullptr, this));
+ d->stepModifier = static_cast<Qt::KeyboardModifier>(style()->styleHint(QStyle::SH_SpinBox_StepModifier, nullptr, this));
d->reset();
d->updateEditFieldGeometry();
break;
+ case QEvent::LocaleChange:
+ d->updateEdit();
+ break;
case QEvent::EnabledChange:
if (!isEnabled()) {
d->reset();
@@ -1008,6 +1030,8 @@ void QAbstractSpinBox::keyPressEvent(QKeyEvent *event)
const bool up = (event->key() == Qt::Key_PageUp || event->key() == Qt::Key_Up);
if (!(stepEnabled() & (up ? StepUpEnabled : StepDownEnabled)))
return;
+ if (!isPgUpOrDown && (event->modifiers() & d->stepModifier))
+ steps *= 10;
if (!up)
steps *= -1;
if (style()->styleHint(QStyle::SH_SpinBox_AnimateButton, 0, this)) {
@@ -1134,11 +1158,24 @@ void QAbstractSpinBox::keyReleaseEvent(QKeyEvent *event)
void QAbstractSpinBox::wheelEvent(QWheelEvent *event)
{
Q_D(QAbstractSpinBox);
+#ifdef Q_OS_MACOS
+ // If the event comes from a real mouse wheel, rather than a track pad
+ // (Qt::MouseEventSynthesizedBySystem), the shift modifier changes the
+ // scroll orientation to horizontal.
+ // Convert horizontal events back to vertical whilst shift is held.
+ if ((event->modifiers() & Qt::ShiftModifier)
+ && event->source() == Qt::MouseEventNotSynthesized) {
+ d->wheelDeltaRemainder += event->angleDelta().x();
+ } else {
+ d->wheelDeltaRemainder += event->angleDelta().y();
+ }
+#else
d->wheelDeltaRemainder += event->angleDelta().y();
+#endif
const int steps = d->wheelDeltaRemainder / 120;
d->wheelDeltaRemainder -= steps * 120;
if (stepEnabled() & (steps > 0 ? StepUpEnabled : StepDownEnabled))
- stepBy(event->modifiers() & Qt::ControlModifier ? steps * 10 : steps);
+ stepBy(event->modifiers() & d->stepModifier ? steps * 10 : steps);
event->accept();
}
#endif
@@ -1238,18 +1275,19 @@ void QAbstractSpinBox::timerEvent(QTimerEvent *event)
}
if (doStep) {
+ const bool increaseStepRate = QGuiApplication::keyboardModifiers() & d->stepModifier;
const StepEnabled st = stepEnabled();
if (d->buttonState & Up) {
if (!(st & StepUpEnabled)) {
d->reset();
} else {
- stepBy(1);
+ stepBy(increaseStepRate ? 10 : 1);
}
} else if (d->buttonState & Down) {
if (!(st & StepDownEnabled)) {
d->reset();
} else {
- stepBy(-1);
+ stepBy(increaseStepRate ? -10 : -1);
}
}
return;
@@ -1377,8 +1415,9 @@ QAbstractSpinBoxPrivate::QAbstractSpinBoxPrivate()
cachedState(QValidator::Invalid), pendingEmit(false), readOnly(false), wrapping(false),
ignoreCursorPositionChanged(false), frame(true), accelerate(false), keyboardTracking(true),
cleared(false), ignoreUpdateEdit(false), correctionMode(QAbstractSpinBox::CorrectToPreviousValue),
- acceleration(0), hoverControl(QStyle::SC_None), buttonSymbols(QAbstractSpinBox::UpDownArrows), validator(0),
- showGroupSeparator(0), wheelDeltaRemainder(0)
+ stepModifier(Qt::ControlModifier), acceleration(0), hoverControl(QStyle::SC_None),
+ buttonSymbols(QAbstractSpinBox::UpDownArrows), validator(0), showGroupSeparator(0),
+ wheelDeltaRemainder(0)
{
}
@@ -1629,7 +1668,10 @@ void QAbstractSpinBoxPrivate::updateState(bool up, bool fromKeyboard /* = false
: QAbstractSpinBox::StepDownEnabled))) {
spinClickThresholdTimerId = q->startTimer(spinClickThresholdTimerInterval);
buttonState = (up ? Up : Down) | (fromKeyboard ? Keyboard : Mouse);
- q->stepBy(up ? 1 : -1);
+ int steps = up ? 1 : -1;
+ if (QGuiApplication::keyboardModifiers() & stepModifier)
+ steps *= 10;
+ q->stepBy(steps);
#ifndef QT_NO_ACCESSIBILITY
QAccessibleValueChangeEvent event(q, value);
QAccessible::updateAccessibility(&event);
@@ -1898,6 +1940,11 @@ void QAbstractSpinBoxPrivate::clearCache() const
cachedState = QValidator::Acceptable;
}
+QVariant QAbstractSpinBoxPrivate::calculateAdaptiveDecimalStep(int steps) const
+{
+ Q_UNUSED(steps)
+ return singleStep;
+}
// --- QSpinBoxValidator ---
diff --git a/src/widgets/widgets/qabstractspinbox.h b/src/widgets/widgets/qabstractspinbox.h
index 83bf83d779..87d46c7326 100644
--- a/src/widgets/widgets/qabstractspinbox.h
+++ b/src/widgets/widgets/qabstractspinbox.h
@@ -127,6 +127,13 @@ public:
virtual void fixup(QString &input) const;
virtual void stepBy(int steps);
+
+ enum StepType {
+ DefaultStepType,
+ AdaptiveDecimalStepType
+ };
+ Q_ENUM(StepType)
+
public Q_SLOTS:
void stepUp();
void stepDown();
diff --git a/src/widgets/widgets/qabstractspinbox_p.h b/src/widgets/widgets/qabstractspinbox_p.h
index 8f312fa900..fce88e43f4 100644
--- a/src/widgets/widgets/qabstractspinbox_p.h
+++ b/src/widgets/widgets/qabstractspinbox_p.h
@@ -122,6 +122,8 @@ public:
static int variantCompare(const QVariant &arg1, const QVariant &arg2);
static QVariant variantBound(const QVariant &min, const QVariant &value, const QVariant &max);
+ virtual QVariant calculateAdaptiveDecimalStep(int steps) const;
+
QLineEdit *edit;
QString prefix, suffix, specialValueText;
QVariant value, minimum, maximum, singleStep;
@@ -143,6 +145,8 @@ public:
uint cleared : 1;
uint ignoreUpdateEdit : 1;
QAbstractSpinBox::CorrectionMode correctionMode;
+ QAbstractSpinBox::StepType stepType = QAbstractSpinBox::StepType::DefaultStepType;
+ Qt::KeyboardModifier stepModifier = Qt::ControlModifier;
int acceleration;
QStyle::SubControl hoverControl;
QRect hoverRect;
diff --git a/src/widgets/widgets/qdockarealayout.cpp b/src/widgets/widgets/qdockarealayout.cpp
index 75289e9d1f..3026a5b7d6 100644
--- a/src/widgets/widgets/qdockarealayout.cpp
+++ b/src/widgets/widgets/qdockarealayout.cpp
@@ -2629,8 +2629,9 @@ void QDockAreaLayout::removePlaceHolder(const QString &name)
QList<int> index = indexOfPlaceHolder(name);
if (!index.isEmpty())
remove(index);
- foreach (QDockWidgetGroupWindow *dwgw, mainWindow->findChildren<QDockWidgetGroupWindow *>(
- QString(), Qt::FindDirectChildrenOnly)) {
+ const auto groups =
+ mainWindow->findChildren<QDockWidgetGroupWindow *>(QString(), Qt::FindDirectChildrenOnly);
+ for (QDockWidgetGroupWindow *dwgw : groups) {
index = dwgw->layoutInfo()->indexOfPlaceHolder(name);
if (!index.isEmpty()) {
dwgw->layoutInfo()->remove(index);
@@ -3065,8 +3066,9 @@ QRect QDockAreaLayout::constrainedRect(QRect rect, QWidget* widget)
bool QDockAreaLayout::restoreDockWidget(QDockWidget *dockWidget)
{
QDockAreaLayoutItem *item = 0;
- foreach (QDockWidgetGroupWindow *dwgw, mainWindow->findChildren<QDockWidgetGroupWindow *>(
- QString(), Qt::FindDirectChildrenOnly)) {
+ const auto groups =
+ mainWindow->findChildren<QDockWidgetGroupWindow *>(QString(), Qt::FindDirectChildrenOnly);
+ for (QDockWidgetGroupWindow *dwgw : groups) {
QList<int> index = dwgw->layoutInfo()->indexOfPlaceHolder(dockWidget->objectName());
if (!index.isEmpty()) {
dockWidget->setParent(dwgw);
@@ -3175,7 +3177,7 @@ void QDockAreaLayout::resizeDocks(const QList<QDockWidget *> &docks,
if (!info->tabbed && info->o == o) {
info->item_list[path.constLast()].size = size;
int totalSize = 0;
- foreach (const QDockAreaLayoutItem &item, info->item_list) {
+ for (const QDockAreaLayoutItem &item : qAsConst(info->item_list)) {
if (!item.skip()) {
if (totalSize != 0)
totalSize += sep;
diff --git a/src/widgets/widgets/qlabel.cpp b/src/widgets/widgets/qlabel.cpp
index 947da273dd..c624187190 100644
--- a/src/widgets/widgets/qlabel.cpp
+++ b/src/widgets/widgets/qlabel.cpp
@@ -1021,9 +1021,8 @@ void QLabel::paintEvent(QPaintEvent *)
QStyleOption opt;
opt.initFrom(this);
#ifndef QT_NO_STYLE_STYLESHEET
- if (QStyleSheetStyle* cssStyle = qobject_cast<QStyleSheetStyle*>(style)) {
+ if (QStyleSheetStyle* cssStyle = qt_styleSheet(style))
cssStyle->styleSheetPalette(this, &opt, &opt.palette);
- }
#endif
if (d->control) {
#ifndef QT_NO_SHORTCUT
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp
index ca6aacc16c..190ff8d2c5 100644
--- a/src/widgets/widgets/qlineedit.cpp
+++ b/src/widgets/widgets/qlineedit.cpp
@@ -497,6 +497,8 @@ void QLineEdit::setClearButtonEnabled(bool enable)
d->removeAction(clearAction);
delete clearAction;
}
+#else
+ Q_UNUSED(enable);
#endif // QT_CONFIG(action)
}
@@ -1676,6 +1678,21 @@ void QLineEdit::mouseDoubleClickEvent(QMouseEvent* e)
*/
/*!
+ \fn void QLineEdit::inputRejected()
+
+ This signal is emitted when the user presses a key that is not
+ considered to be acceptable input. For example, if a key press
+ results in a validator's validate() call to return Invalid.
+ Another case is when trying to enter in more characters beyond the
+ maximum length of the line edit.
+
+ Note: This signal will still be emitted in a case where part of
+ the text is accepted but not all of it is. For example, if there
+ is a maximum length set and the clipboard text is longer than the
+ maximum length when it is pasted.
+*/
+
+/*!
Converts the given key press \a event into a line edit action.
If Return or Enter is pressed and the current text is valid (or
@@ -1946,8 +1963,7 @@ void QLineEdit::paintEvent(QPaintEvent *)
if (!d->placeholderText.isEmpty()) {
const Qt::LayoutDirection layoutDir = d->placeholderText.isRightToLeft() ? Qt::RightToLeft : Qt::LeftToRight;
const Qt::Alignment alignPhText = QStyle::visualAlignment(layoutDir, QFlag(d->alignment));
- QColor col = pal.text().color();
- col.setAlpha(128);
+ const QColor col = pal.placeholderText().color();
QPen oldpen = p.pen();
p.setPen(col);
Qt::LayoutDirection oldLayoutDir = p.layoutDirection();
@@ -2002,7 +2018,7 @@ void QLineEdit::paintEvent(QPaintEvent *)
// draw text, selections and cursors
#ifndef QT_NO_STYLE_STYLESHEET
- if (QStyleSheetStyle* cssStyle = qobject_cast<QStyleSheetStyle*>(style())) {
+ if (QStyleSheetStyle* cssStyle = qt_styleSheet(style())) {
cssStyle->styleSheetPalette(this, &panel, &pal);
}
#endif
diff --git a/src/widgets/widgets/qlineedit.h b/src/widgets/widgets/qlineedit.h
index 6c70a8f44a..de82927f74 100644
--- a/src/widgets/widgets/qlineedit.h
+++ b/src/widgets/widgets/qlineedit.h
@@ -207,6 +207,7 @@ Q_SIGNALS:
void returnPressed();
void editingFinished();
void selectionChanged();
+ void inputRejected();
protected:
void mousePressEvent(QMouseEvent *) override;
diff --git a/src/widgets/widgets/qlineedit_p.cpp b/src/widgets/widgets/qlineedit_p.cpp
index 0eeff196a8..33d542abc0 100644
--- a/src/widgets/widgets/qlineedit_p.cpp
+++ b/src/widgets/widgets/qlineedit_p.cpp
@@ -216,6 +216,7 @@ void QLineEditPrivate::init(const QString& txt)
QObject::connect(control, SIGNAL(updateNeeded(QRect)),
q, SLOT(_q_updateNeeded(QRect)));
+ QObject::connect(control, SIGNAL(inputRejected()), q, SIGNAL(inputRejected()));
QStyleOptionFrame opt;
q->initStyleOption(&opt);
@@ -348,11 +349,9 @@ void QLineEditIconButton::paintEvent(QPaintEvent *)
QWindow *window = nullptr;
if (const QWidget *nativeParent = nativeParentWidget())
window = nativeParent->windowHandle();
- // Note isDown should really use the active state but in most styles
- // this has no proper feedback
QIcon::Mode state = QIcon::Disabled;
if (isEnabled())
- state = isDown() ? QIcon::Selected : QIcon::Normal;
+ state = isDown() ? QIcon::Active : QIcon::Normal;
const QLineEditPrivate *lep = lineEditPrivate();
const int iconWidth = lep ? lep->sideWidgetParameters().iconSize : 16;
const QSize iconSize(iconWidth, iconWidth);
@@ -466,6 +465,8 @@ void QLineEditPrivate::setClearButtonEnabled(bool enabled)
break;
}
}
+#else
+ Q_UNUSED(enabled);
#endif
}
@@ -483,6 +484,8 @@ void QLineEditPrivate::positionSideWidgets()
#if QT_CONFIG(action)
if (e.action->isVisible())
widgetGeometry.moveLeft(widgetGeometry.left() + delta);
+#else
+ Q_UNUSED(delta);
#endif
}
widgetGeometry.moveLeft(contentRect.width() - p.widgetWidth - p.margin);
@@ -596,6 +599,8 @@ void QLineEditPrivate::removeAction(QAction *action)
if (!hasSideWidgets()) // Last widget, remove connection
QObject::disconnect(q, SIGNAL(textChanged(QString)), q, SLOT(_q_textChanged(QString)));
q->update();
+#else
+ Q_UNUSED(action);
#endif // QT_CONFIG(action)
}
diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp
index 2014bdabf3..aca38884a7 100644
--- a/src/widgets/widgets/qmainwindow.cpp
+++ b/src/widgets/widgets/qmainwindow.cpp
@@ -1312,8 +1312,12 @@ bool QMainWindow::restoreState(const QByteArray &state, int version)
bool QMainWindow::event(QEvent *event)
{
Q_D(QMainWindow);
+
+#if QT_CONFIG(dockwidget)
if (d->layout && d->layout->windowEvent(event))
return true;
+#endif
+
switch (event->type()) {
#if QT_CONFIG(toolbar)
diff --git a/src/widgets/widgets/qmainwindowlayout.cpp b/src/widgets/widgets/qmainwindowlayout.cpp
index 43c22910f9..053bfbf024 100644
--- a/src/widgets/widgets/qmainwindowlayout.cpp
+++ b/src/widgets/widgets/qmainwindowlayout.cpp
@@ -426,7 +426,8 @@ void QDockWidgetGroupWindow::destroyOrHideIfEmpty()
}
// Make sure to reparent the possibly floating or hidden QDockWidgets to the parent
- foreach (QDockWidget *dw, findChildren<QDockWidget *>(QString(), Qt::FindDirectChildrenOnly)) {
+ const auto dockWidgets = findChildren<QDockWidget *>(QString(), Qt::FindDirectChildrenOnly);
+ for (QDockWidget *dw : dockWidgets) {
bool wasFloating = dw->isFloating();
bool wasHidden = dw->isHidden();
dw->setParent(parentWidget());
@@ -445,7 +446,8 @@ void QDockWidgetGroupWindow::destroyOrHideIfEmpty()
dw->show();
}
#if QT_CONFIG(tabbar)
- foreach (QTabBar *tb, findChildren<QTabBar *>(QString(), Qt::FindDirectChildrenOnly))
+ const auto tabBars = findChildren<QTabBar *>(QString(), Qt::FindDirectChildrenOnly);
+ for (QTabBar *tb : tabBars)
tb->setParent(parentWidget());
#endif
deleteLater();
@@ -1037,10 +1039,10 @@ void QMainWindowLayoutState::saveState(QDataStream &stream) const
#if QT_CONFIG(dockwidget)
dockAreaLayout.saveState(stream);
#if QT_CONFIG(tabbar)
- QList<QDockWidgetGroupWindow *> floatingTabs =
+ const QList<QDockWidgetGroupWindow *> floatingTabs =
mainWindow->findChildren<QDockWidgetGroupWindow *>(QString(), Qt::FindDirectChildrenOnly);
- foreach (QDockWidgetGroupWindow *floating, floatingTabs) {
+ for (QDockWidgetGroupWindow *floating : floatingTabs) {
if (floating->layoutInfo()->isEmpty())
continue;
stream << uchar(QDockAreaLayout::FloatingDockWidgetTabMarker) << floating->geometry();
@@ -1528,9 +1530,9 @@ void QMainWindowLayout::setDocumentMode(bool enabled)
_documentMode = enabled;
// Update the document mode for all tab bars
- foreach (QTabBar *bar, usedTabBars)
+ for (QTabBar *bar : qAsConst(usedTabBars))
bar->setDocumentMode(_documentMode);
- foreach (QTabBar *bar, unusedTabBars)
+ for (QTabBar *bar : qAsConst(unusedTabBars))
bar->setDocumentMode(_documentMode);
}
#endif // QT_CONFIG(tabbar)
@@ -1809,8 +1811,9 @@ QDockAreaLayoutInfo *QMainWindowLayout::dockInfo(QWidget *widget)
QDockAreaLayoutInfo *info = layoutState.dockAreaLayout.info(widget);
if (info)
return info;
- foreach (QDockWidgetGroupWindow *dwgw,
- parent()->findChildren<QDockWidgetGroupWindow*>(QString(), Qt::FindDirectChildrenOnly)) {
+ const auto groups =
+ parent()->findChildren<QDockWidgetGroupWindow*>(QString(), Qt::FindDirectChildrenOnly);
+ for (QDockWidgetGroupWindow *dwgw : groups) {
info = dwgw->layoutInfo()->info(widget);
if (info)
return info;
@@ -2077,8 +2080,9 @@ bool QMainWindowLayout::plug(QLayoutItem *widgetItem)
layoutState.remove(previousPath);
previousPath = currentHoveredFloat->layoutInfo()->indexOf(widget);
// Let's remove the widget from any possible group window
- foreach (QDockWidgetGroupWindow *dwgw,
- parent()->findChildren<QDockWidgetGroupWindow*>(QString(), Qt::FindDirectChildrenOnly)) {
+ const auto groups =
+ parent()->findChildren<QDockWidgetGroupWindow*>(QString(), Qt::FindDirectChildrenOnly);
+ for (QDockWidgetGroupWindow *dwgw : groups) {
if (dwgw == currentHoveredFloat)
continue;
QList<int> path = dwgw->layoutInfo()->indexOf(widget);
@@ -2106,8 +2110,9 @@ bool QMainWindowLayout::plug(QLayoutItem *widgetItem)
#if QT_CONFIG(dockwidget)
// Let's remove the widget from any possible group window
- foreach (QDockWidgetGroupWindow *dwgw,
- parent()->findChildren<QDockWidgetGroupWindow*>(QString(), Qt::FindDirectChildrenOnly)) {
+ const auto groups =
+ parent()->findChildren<QDockWidgetGroupWindow*>(QString(), Qt::FindDirectChildrenOnly);
+ for (QDockWidgetGroupWindow *dwgw : groups) {
QList<int> path = dwgw->layoutInfo()->indexOf(widget);
if (!path.isEmpty())
dwgw->layoutInfo()->remove(path);
@@ -2249,7 +2254,8 @@ void QMainWindowLayout::animationFinished(QWidget *widget)
#if QT_CONFIG(dockwidget)
parentWidget()->update(layoutState.dockAreaLayout.separatorRegion());
#if QT_CONFIG(tabbar)
- foreach (QTabBar *tab_bar, usedTabBars)
+ const auto usedTabBarsCopy = usedTabBars; // list potentially modified by animations
+ for (QTabBar *tab_bar : usedTabBarsCopy)
tab_bar->show();
#endif // QT_CONFIG(tabbar)
#endif // QT_CONFIG(dockwidget)
@@ -2533,7 +2539,8 @@ void QMainWindowLayout::hover(QLayoutItem *widgetItem, const QPoint &mousePos)
// Check if we are over another floating dock widget
QVarLengthArray<QWidget *, 10> candidates;
- foreach (QObject *c, parentWidget()->children()) {
+ const auto siblings = parentWidget()->children();
+ for (QObject *c : siblings) {
QWidget *w = qobject_cast<QWidget*>(c);
if (!w)
continue;
@@ -2543,7 +2550,8 @@ void QMainWindowLayout::hover(QLayoutItem *widgetItem, const QPoint &mousePos)
candidates << w;
if (QDockWidgetGroupWindow *group = qobject_cast<QDockWidgetGroupWindow *>(w)) {
// Sometimes, there are floating QDockWidget that have a QDockWidgetGroupWindow as a parent.
- foreach (QObject *c, group->children()) {
+ const auto groupChildren = group->children();
+ for (QObject *c : groupChildren) {
if (QDockWidget *dw = qobject_cast<QDockWidget*>(c)) {
if (dw != widget && dw->isFloating() && dw->isVisible() && !dw->isMinimized())
candidates << dw;
@@ -2671,14 +2679,14 @@ void QMainWindowLayout::applyState(QMainWindowLayoutState &newState, bool animat
{
#if QT_CONFIG(dockwidget) && QT_CONFIG(tabwidget)
QSet<QTabBar*> used = newState.dockAreaLayout.usedTabBars();
- foreach (QDockWidgetGroupWindow *dwgw,
- parent()->findChildren<QDockWidgetGroupWindow*>(QString(), Qt::FindDirectChildrenOnly)) {
+ const auto groups =
+ parent()->findChildren<QDockWidgetGroupWindow*>(QString(), Qt::FindDirectChildrenOnly);
+ for (QDockWidgetGroupWindow *dwgw : groups)
used += dwgw->layoutInfo()->usedTabBars();
- }
- QSet<QTabBar*> retired = usedTabBars - used;
+ const QSet<QTabBar*> retired = usedTabBars - used;
usedTabBars = used;
- foreach (QTabBar *tab_bar, retired) {
+ for (QTabBar *tab_bar : retired) {
tab_bar->hide();
while (tab_bar->count() > 0)
tab_bar->removeTab(0);
@@ -2686,10 +2694,10 @@ void QMainWindowLayout::applyState(QMainWindowLayoutState &newState, bool animat
}
if (sep == 1) {
- QSet<QWidget*> usedSeps = newState.dockAreaLayout.usedSeparatorWidgets();
- QSet<QWidget*> retiredSeps = usedSeparatorWidgets - usedSeps;
+ const QSet<QWidget*> usedSeps = newState.dockAreaLayout.usedSeparatorWidgets();
+ const QSet<QWidget*> retiredSeps = usedSeparatorWidgets - usedSeps;
usedSeparatorWidgets = usedSeps;
- foreach (QWidget *sepWidget, retiredSeps) {
+ for (QWidget *sepWidget : retiredSeps) {
unusedSeparatorWidgets.append(sepWidget);
}
}
@@ -2731,7 +2739,7 @@ bool QMainWindowLayout::restoreState(QDataStream &stream)
#if QT_CONFIG(dockwidget)
if (parentWidget()->isVisible()) {
#if QT_CONFIG(tabbar)
- foreach (QTabBar *tab_bar, usedTabBars)
+ for (QTabBar *tab_bar : qAsConst(usedTabBars))
tab_bar->show();
#endif
diff --git a/src/widgets/widgets/qmainwindowlayout_p.h b/src/widgets/widgets/qmainwindowlayout_p.h
index 4ccfb1786e..72cbec2350 100644
--- a/src/widgets/widgets/qmainwindowlayout_p.h
+++ b/src/widgets/widgets/qmainwindowlayout_p.h
@@ -92,6 +92,7 @@ public:
QPoint hoverPos;
#if QT_CONFIG(dockwidget)
+
#if QT_CONFIG(cursor)
QCursor separatorCursor(const QList<int> &path);
void adjustCursor(const QPoint &pos);
@@ -108,13 +109,15 @@ public:
bool startSeparatorMove(const QPoint &pos);
bool separatorMove(const QPoint &pos);
bool endSeparatorMove(const QPoint &pos);
+ bool windowEvent(QEvent *e);
#endif // QT_CONFIG(dockwidget)
- bool windowEvent(QEvent *e);
};
-#if QT_CONFIG(dockwidget) && QT_CONFIG(cursor)
+#if QT_CONFIG(dockwidget)
+
+#if QT_CONFIG(cursor)
template <typename Layout>
QCursor QMainWindowLayoutSeparatorHelper<Layout>::separatorCursor(const QList<int> &path)
{
@@ -187,14 +190,13 @@ void QMainWindowLayoutSeparatorHelper<Layout>::adjustCursor(const QPoint &pos)
}
}
}
-#endif // QT_CONFIG(cursor) && QT_CONFIG(dockwidget)
+#endif // QT_CONFIG(cursor)
template <typename Layout>
bool QMainWindowLayoutSeparatorHelper<Layout>::windowEvent(QEvent *event)
{
QWidget *w = window();
switch (event->type()) {
-#if QT_CONFIG(dockwidget)
case QEvent::Paint: {
QPainter p(w);
QRegion r = static_cast<QPaintEvent *>(event)->region();
@@ -290,14 +292,12 @@ bool QMainWindowLayoutSeparatorHelper<Layout>::windowEvent(QEvent *event)
return true;
}
break;
-#endif // QT_CONFIG(dockwidget)
default:
break;
}
return false;
}
-#if QT_CONFIG(dockwidget)
template <typename Layout>
bool QMainWindowLayoutSeparatorHelper<Layout>::startSeparatorMove(const QPoint &pos)
{
diff --git a/src/widgets/widgets/qmdiarea.cpp b/src/widgets/widgets/qmdiarea.cpp
index 45c01dec80..8639f57ea1 100644
--- a/src/widgets/widgets/qmdiarea.cpp
+++ b/src/widgets/widgets/qmdiarea.cpp
@@ -471,8 +471,8 @@ QVector<QRect> MinOverlapPlacer::getCandidatePlacements(const QSize &size, const
ylist.erase(std::unique(ylist.begin(), ylist.end()), ylist.end());
result.reserve(ylist.size() * xlist.size());
- foreach (int y, ylist)
- foreach (int x, xlist)
+ for (int y : qAsConst(ylist))
+ for (int x : qAsConst(xlist))
result << QRect(QPoint(x, y), size);
return result;
}
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp
index 363647aee0..96635ae505 100644
--- a/src/widgets/widgets/qmenu.cpp
+++ b/src/widgets/widgets/qmenu.cpp
@@ -2433,7 +2433,7 @@ void QMenu::popup(const QPoint &p, QAction *atAction)
atAction = d->defaultAction;
// TODO: This works for first level menus, not yet sub menus
} else {
- foreach (QAction *action, d->actions)
+ for (QAction *action : qAsConst(d->actions))
if (action->isEnabled()) {
atAction = action;
break;
diff --git a/src/widgets/widgets/qplaintextedit.cpp b/src/widgets/widgets/qplaintextedit.cpp
index a4c463fb5b..252d5a79df 100644
--- a/src/widgets/widgets/qplaintextedit.cpp
+++ b/src/widgets/widgets/qplaintextedit.cpp
@@ -48,6 +48,7 @@
#include <qdrag.h>
#endif
#include <qclipboard.h>
+#include <qmath.h>
#if QT_CONFIG(menu)
#include <qmenu.h>
#endif
@@ -382,6 +383,8 @@ void QPlainTextDocumentLayout::layoutBlock(const QTextBlock &block)
line.setLineWidth(availableWidth);
line.setPosition(QPointF(margin, height));
height += line.height();
+ if (line.leading() < 0)
+ height += qCeil(line.leading());
blockMaximumWidth = qMax(blockMaximumWidth, line.naturalTextWidth() + 2*margin);
}
tl->endLayout();
@@ -1927,8 +1930,7 @@ void QPlainTextEdit::paintEvent(QPaintEvent *e)
painter.setClipRect(er);
if (d->placeholderVisible) {
- QColor col = d->control->palette().text().color();
- col.setAlpha(128);
+ const QColor col = d->control->palette().placeholderText().color();
painter.setPen(col);
painter.setClipRect(e->rect());
const int margin = int(document()->documentMargin());
diff --git a/src/widgets/widgets/qspinbox.cpp b/src/widgets/widgets/qspinbox.cpp
index 561215ec85..7f29c0c52c 100644
--- a/src/widgets/widgets/qspinbox.cpp
+++ b/src/widgets/widgets/qspinbox.cpp
@@ -45,6 +45,8 @@
#include <qvalidator.h>
#include <qdebug.h>
+#include <algorithm>
+#include <cmath>
#include <float.h>
QT_BEGIN_NAMESPACE
@@ -75,6 +77,8 @@ public:
}
int displayIntegerBase;
+
+ QVariant calculateAdaptiveDecimalStep(int steps) const override;
};
class QDoubleSpinBoxPrivate : public QAbstractSpinBoxPrivate
@@ -100,6 +104,8 @@ public:
// When fiddling with the decimals property, we may lose precision in these properties.
double actualMin;
double actualMax;
+
+ QVariant calculateAdaptiveDecimalStep(int steps) const override;
};
@@ -415,6 +421,41 @@ void QSpinBox::setRange(int minimum, int maximum)
}
/*!
+ Sets the step type for the spin box: single step or adaptive
+ decimal step.
+
+ Adaptive decimal step means that the step size will continuously be
+ adjusted to one power of ten below the current \l value. So when
+ the value is 1100, the step is set to 100, so stepping up once
+ increases it to 1200. For 1200 stepping up takes it to 1300. For
+ negative values, stepping down from -1100 goes to -1200.
+
+ Step direction is taken into account to handle edges cases, so
+ that stepping down from 100 takes the value to 99 instead of 90.
+ Thus a step up followed by a step down -- or vice versa -- always
+ lands on the starting value; 99 -> 100 -> 99.
+
+ Setting this will cause the spin box to disregard the value of
+ \l singleStep, although it is preserved so that \l singleStep
+ comes into effect if adaptive decimal step is later turned off.
+
+ \sa QAbstractSpinBox::groupSeparator()
+ \since 5.12
+*/
+
+void QSpinBox::setStepType(QAbstractSpinBox::StepType stepType)
+{
+ Q_D(QSpinBox);
+ d->stepType = stepType;
+}
+
+QAbstractSpinBox::StepType QSpinBox::stepType() const
+{
+ Q_D(const QSpinBox);
+ return d->stepType;
+}
+
+/*!
\property QSpinBox::displayIntegerBase
\brief the base used to display the value of the spin box
@@ -847,6 +888,44 @@ void QDoubleSpinBox::setRange(double minimum, double maximum)
}
/*!
+ Sets the step type for the spin box: single step or adaptive
+ decimal step.
+
+ Adaptive decimal step means that the step size will continuously be
+ adjusted to one power of ten below the current \l value. So when
+ the value is 1100, the step is set to 100, so stepping up once
+ increases it to 1200. For 1200 stepping up takes it to 1300. For
+ negative values, stepping down from -1100 goes to -1200.
+
+ It also works for any decimal values, 0.041 is increased to 0.042
+ by stepping once.
+
+ Step direction is taken into account to handle edges cases, so
+ that stepping down from 100 takes the value to 99 instead of 90.
+ Thus a step up followed by a step down -- or vice versa -- always
+ lands on the starting value; 99 -> 100 -> 99.
+
+ Setting this will cause the spin box to disregard the value of
+ \l singleStep, although it is preserved so that \l singleStep
+ comes into effect if adaptive decimal step is later turned off.
+
+ \sa QAbstractSpinBox::groupSeparator()
+ \since 5.12
+*/
+
+void QDoubleSpinBox::setStepType(StepType stepType)
+{
+ Q_D(QDoubleSpinBox);
+ d->stepType = stepType;
+}
+
+QAbstractSpinBox::StepType QDoubleSpinBox::stepType() const
+{
+ Q_D(const QDoubleSpinBox);
+ return d->stepType;
+}
+
+/*!
\property QDoubleSpinBox::decimals
\brief the precision of the spin box, in decimals
@@ -1078,6 +1157,22 @@ QVariant QSpinBoxPrivate::validateAndInterpret(QString &input, int &pos,
return cachedValue;
}
+QVariant QSpinBoxPrivate::calculateAdaptiveDecimalStep(int steps) const
+{
+ const int intValue = value.toInt();
+ const int absValue = qAbs(intValue);
+
+ if (absValue < 100)
+ return 1;
+
+ const bool valueNegative = intValue < 0;
+ const bool stepsNegative = steps < 0;
+ const int signCompensation = (valueNegative == stepsNegative) ? 0 : 1;
+
+ const int log = static_cast<int>(std::log10(absValue - signCompensation)) - 1;
+ return static_cast<int>(std::pow(10, log));
+}
+
// --- QDoubleSpinBoxPrivate ---
/*!
@@ -1303,6 +1398,27 @@ QString QDoubleSpinBoxPrivate::textFromValue(const QVariant &f) const
return q->textFromValue(f.toDouble());
}
+QVariant QDoubleSpinBoxPrivate::calculateAdaptiveDecimalStep(int steps) const
+{
+ const double doubleValue = value.toDouble();
+ const double minStep = std::pow(10, -decimals);
+ double absValue = qAbs(doubleValue);
+
+ if (absValue < minStep)
+ return minStep;
+
+ const bool valueNegative = doubleValue < 0;
+ const bool stepsNegative = steps < 0;
+ if (valueNegative != stepsNegative)
+ absValue /= 1.01;
+
+ const double shift = std::pow(10, 1 - std::floor(std::log10(absValue)));
+ const double absRounded = round(absValue * shift) / shift;
+ const double log = floorf(std::log10(absRounded)) - 1;
+
+ return std::max(minStep, std::pow(10, log));
+}
+
/*! \reimp */
bool QSpinBox::event(QEvent *event)
{
diff --git a/src/widgets/widgets/qspinbox.h b/src/widgets/widgets/qspinbox.h
index 73489c9a68..d2eac903fb 100644
--- a/src/widgets/widgets/qspinbox.h
+++ b/src/widgets/widgets/qspinbox.h
@@ -58,6 +58,7 @@ class Q_WIDGETS_EXPORT QSpinBox : public QAbstractSpinBox
Q_PROPERTY(int minimum READ minimum WRITE setMinimum)
Q_PROPERTY(int maximum READ maximum WRITE setMaximum)
Q_PROPERTY(int singleStep READ singleStep WRITE setSingleStep)
+ Q_PROPERTY(StepType stepType READ stepType WRITE setStepType)
Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged USER true)
Q_PROPERTY(int displayIntegerBase READ displayIntegerBase WRITE setDisplayIntegerBase)
@@ -86,6 +87,9 @@ public:
void setRange(int min, int max);
+ StepType stepType() const;
+ void setStepType(StepType stepType);
+
int displayIntegerBase() const;
void setDisplayIntegerBase(int base);
@@ -121,6 +125,7 @@ class Q_WIDGETS_EXPORT QDoubleSpinBox : public QAbstractSpinBox
Q_PROPERTY(double minimum READ minimum WRITE setMinimum)
Q_PROPERTY(double maximum READ maximum WRITE setMaximum)
Q_PROPERTY(double singleStep READ singleStep WRITE setSingleStep)
+ Q_PROPERTY(StepType stepType READ stepType WRITE setStepType)
Q_PROPERTY(double value READ value WRITE setValue NOTIFY valueChanged USER true)
public:
explicit QDoubleSpinBox(QWidget *parent = nullptr);
@@ -147,6 +152,9 @@ public:
void setRange(double min, double max);
+ StepType stepType() const;
+ void setStepType(StepType stepType);
+
int decimals() const;
void setDecimals(int prec);
diff --git a/src/widgets/widgets/qsplashscreen.cpp b/src/widgets/widgets/qsplashscreen.cpp
index 44b9f7d9a1..277d2fd99f 100644
--- a/src/widgets/widgets/qsplashscreen.cpp
+++ b/src/widgets/widgets/qsplashscreen.cpp
@@ -327,7 +327,13 @@ void QSplashScreen::drawContents(QPainter *painter)
cursor.select(QTextCursor::Document);
QTextBlockFormat fmt;
fmt.setAlignment(Qt::Alignment(d->currAlign));
+ fmt.setLayoutDirection(layoutDirection());
cursor.mergeBlockFormat(fmt);
+ const QSizeF txtSize = doc.size();
+ if (d->currAlign & Qt::AlignBottom)
+ r.setTop(r.height() - txtSize.height());
+ else if (d->currAlign & Qt::AlignVCenter)
+ r.setTop(r.height() / 2 - txtSize.height() / 2);
painter->save();
painter->translate(r.topLeft());
doc.drawContents(painter);
diff --git a/src/widgets/widgets/qsplitter.cpp b/src/widgets/widgets/qsplitter.cpp
index 6ee49aa9f0..9e38c8f18a 100644
--- a/src/widgets/widgets/qsplitter.cpp
+++ b/src/widgets/widgets/qsplitter.cpp
@@ -826,7 +826,7 @@ QSplitterLayoutStruct *QSplitterPrivate::findWidget(QWidget *w) const
if (list.at(i)->widget == w)
return list.at(i);
}
- return 0;
+ return nullptr;
}
@@ -855,7 +855,7 @@ void QSplitterPrivate::insertWidget_helper(int index, QWidget *widget, bool show
QSplitterLayoutStruct *QSplitterPrivate::insertWidget(int index, QWidget *w)
{
Q_Q(QSplitter);
- QSplitterLayoutStruct *sls = 0;
+ QSplitterLayoutStruct *sls = nullptr;
int i;
int last = list.count();
for (i = 0; i < list.size(); ++i) {
@@ -872,12 +872,9 @@ QSplitterLayoutStruct *QSplitterPrivate::insertWidget(int index, QWidget *w)
if (sls) {
list.move(i,index);
} else {
- QSplitterHandle *newHandle = 0;
sls = new QSplitterLayoutStruct;
- QString tmp = QLatin1String("qt_splithandle_");
- tmp += w->objectName();
- newHandle = q->createHandle();
- newHandle->setObjectName(tmp);
+ QSplitterHandle *newHandle = q->createHandle();
+ newHandle->setObjectName(QLatin1String("qt_splithandle_") + w->objectName());
sls->handle = newHandle;
sls->widget = w;
w->lower();
@@ -1248,7 +1245,7 @@ QSplitterHandle *QSplitter::handle(int index) const
{
Q_D(const QSplitter);
if (index < 0 || index >= d->list.size())
- return 0;
+ return nullptr;
return d->list.at(index)->handle;
}
@@ -1262,7 +1259,7 @@ QWidget *QSplitter::widget(int index) const
{
Q_D(const QSplitter);
if (index < 0 || index >= d->list.size())
- return 0;
+ return nullptr;
return d->list.at(index)->widget;
}
@@ -1463,7 +1460,7 @@ void QSplitter::moveSplitter(int pos, int index)
void QSplitter::getRange(int index, int *min, int *max) const
{
Q_D(const QSplitter);
- d->getRange(index, min, 0, 0, max);
+ d->getRange(index, min, nullptr, nullptr, max);
}
diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp
index 8af70d0f9c..c92e38f74a 100644
--- a/src/widgets/widgets/qtabbar.cpp
+++ b/src/widgets/widgets/qtabbar.cpp
@@ -2686,7 +2686,7 @@ void QTabBarPrivate::Tab::TabBarAnimation::updateCurrentValue(const QVariant &cu
priv->moveTab(priv->tabList.indexOf(*tab), current.toInt());
}
-void QTabBarPrivate::Tab::TabBarAnimation::updateState(QAbstractAnimation::State, QAbstractAnimation::State newState)
+void QTabBarPrivate::Tab::TabBarAnimation::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State)
{
if (newState == Stopped) priv->moveTabFinished(priv->tabList.indexOf(*tab));
}
diff --git a/src/widgets/widgets/qtabbar_p.h b/src/widgets/widgets/qtabbar_p.h
index 1092878f2c..f303ed54d1 100644
--- a/src/widgets/widgets/qtabbar_p.h
+++ b/src/widgets/widgets/qtabbar_p.h
@@ -144,7 +144,7 @@ public:
void updateCurrentValue(const QVariant &current) override;
- void updateState(State, State newState) override;
+ void updateState(State newState, State) override;
private:
//these are needed for the callbacks
Tab *tab;
diff --git a/src/widgets/widgets/qtextbrowser.cpp b/src/widgets/widgets/qtextbrowser.cpp
index fa4dd14c92..46b973bae7 100644
--- a/src/widgets/widgets/qtextbrowser.cpp
+++ b/src/widgets/widgets/qtextbrowser.cpp
@@ -163,10 +163,13 @@ QString QTextBrowserPrivate::findFile(const QUrl &name) const
fileName = name.toLocalFile();
}
+ if (fileName.isEmpty())
+ return fileName;
+
if (QFileInfo(fileName).isAbsolute())
return fileName;
- foreach (QString path, searchPaths) {
+ for (QString path : qAsConst(searchPaths)) {
if (!path.endsWith(QLatin1Char('/')))
path.append(QLatin1Char('/'));
path.append(fileName);
@@ -1089,6 +1092,8 @@ QVariant QTextBrowser::loadResource(int /*type*/, const QUrl &name)
QByteArray data;
QString fileName = d->findFile(d->resolveUrl(name));
+ if (fileName.isEmpty())
+ return QVariant();
QFile f(fileName);
if (f.open(QFile::ReadOnly)) {
data = f.readAll();
diff --git a/src/widgets/widgets/qtextedit.cpp b/src/widgets/widgets/qtextedit.cpp
index 5790b1e32e..3a368651de 100644
--- a/src/widgets/widgets/qtextedit.cpp
+++ b/src/widgets/widgets/qtextedit.cpp
@@ -1518,8 +1518,7 @@ void QTextEditPrivate::paint(QPainter *p, QPaintEvent *e)
layout->setViewport(QRect());
if (!placeholderText.isEmpty() && doc->isEmpty() && !control->isPreediting()) {
- QColor col = control->palette().text().color();
- col.setAlpha(128);
+ const QColor col = control->palette().placeholderText().color();
p->setPen(col);
const int margin = int(doc->documentMargin());
p->drawText(viewport->rect().adjusted(margin, margin, -margin, -margin), Qt::AlignTop | Qt::TextWordWrap, placeholderText);
diff --git a/src/widgets/widgets/qtoolbarlayout_p.h b/src/widgets/widgets/qtoolbarlayout_p.h
index b813cd5e2c..a788d30450 100644
--- a/src/widgets/widgets/qtoolbarlayout_p.h
+++ b/src/widgets/widgets/qtoolbarlayout_p.h
@@ -97,7 +97,7 @@ public:
void insertAction(int index, QAction *action);
int indexOf(QAction *action) const;
- int indexOf(QWidget *widget) const override { return QLayout::indexOf(widget); }
+ using QLayout::indexOf; // bring back the hidden members
bool layoutActions(const QSize &size);
QSize expandedSize(const QSize &size) const;
diff --git a/src/widgets/widgets/qwidgetlinecontrol.cpp b/src/widgets/widgets/qwidgetlinecontrol.cpp
index c4a928410b..cf2d885b52 100644
--- a/src/widgets/widgets/qwidgetlinecontrol.cpp
+++ b/src/widgets/widgets/qwidgetlinecontrol.cpp
@@ -711,10 +711,12 @@ bool QWidgetLineControl::finishChange(int validateFromState, bool update, bool e
m_validInput = (m_validator->validate(textCopy, cursorCopy) != QValidator::Invalid);
if (m_validInput) {
if (m_text != textCopy) {
- internalSetText(textCopy, cursorCopy, false);
+ internalSetText(textCopy, cursorCopy, edited);
return true;
}
m_cursor = cursorCopy;
+ } else {
+ emit inputRejected();
}
}
#endif
@@ -762,6 +764,8 @@ void QWidgetLineControl::internalSetText(const QString &txt, int pos, bool edite
if (m_maskData) {
m_text = maskString(0, txt, true);
m_text += clearString(m_text.length(), m_maxLength - m_text.length());
+ if (edited && oldText == m_text)
+ emit inputRejected();
} else {
m_text = txt.isEmpty() ? txt : txt.left(m_maxLength);
}
@@ -839,6 +843,8 @@ void QWidgetLineControl::internalInsert(const QString &s)
addCommand(Command(SetSelection, m_cursor, 0, m_selstart, m_selend));
if (m_maskData) {
QString ms = maskString(m_cursor, s);
+ if (ms.isEmpty() && !s.isEmpty())
+ emit inputRejected();
#ifndef QT_NO_ACCESSIBILITY
QAccessibleTextInsertEvent insertEvent(accessibleObject(), m_cursor, ms);
QAccessible::updateAccessibility(&insertEvent);
@@ -867,6 +873,8 @@ void QWidgetLineControl::internalInsert(const QString &s)
addCommand(Command(Insert, m_cursor++, s.at(i), -1, -1));
m_textDirty = true;
}
+ if (s.length() > remaining)
+ emit inputRejected();
}
}
diff --git a/src/widgets/widgets/qwidgetlinecontrol_p.h b/src/widgets/widgets/qwidgetlinecontrol_p.h
index ca70e2c02f..3e33bc0605 100644
--- a/src/widgets/widgets/qwidgetlinecontrol_p.h
+++ b/src/widgets/widgets/qwidgetlinecontrol_p.h
@@ -545,6 +545,7 @@ Q_SIGNALS:
void accepted();
void editingFinished();
void updateNeeded(const QRect &);
+ void inputRejected();
#ifdef QT_KEYPAD_NAVIGATION
void editFocusChange(bool);
diff --git a/src/winmain/qtmain_winrt.cpp b/src/winmain/qtmain_winrt.cpp
index 79ecf30b70..7cc57f4d46 100644
--- a/src/winmain/qtmain_winrt.cpp
+++ b/src/winmain/qtmain_winrt.cpp
@@ -69,6 +69,7 @@ extern "C" {
#include <qstandardpaths.h>
#include <qfunctions_winrt.h>
#include <qcoreapplication.h>
+#include <qmutex.h>
#include <wrl.h>
#include <Windows.ApplicationModel.core.h>
@@ -87,27 +88,68 @@ using namespace Microsoft::WRL::Wrappers;
#define CoreApplicationClass RuntimeClass_Windows_ApplicationModel_Core_CoreApplication
typedef ITypedEventHandler<CoreApplicationView *, Activation::IActivatedEventArgs *> ActivatedHandler;
+const quint32 resizeMessageType = QtInfoMsg + 1;
+
+const PCWSTR shmemName = L"qdebug-shmem";
+const PCWSTR eventName = L"qdebug-event";
+const PCWSTR ackEventName = L"qdebug-event-ack";
+
static QtMessageHandler defaultMessageHandler;
static void devMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &message)
{
static HANDLE shmem = 0;
static HANDLE event = 0;
+ static HANDLE ackEvent = 0;
+
+ static QMutex messageMutex;
+ QMutexLocker locker(&messageMutex);
+
+ static quint64 mappingSize = 4096;
+ const quint32 copiedMessageLength = message.length() + 1;
+ // Message format is message type + message. We need the message's length + 4 bytes for the type
+ const quint64 copiedMessageSize = copiedMessageLength * sizeof(wchar_t) + sizeof(quint32);
+ if (copiedMessageSize > mappingSize) {
+ if (!shmem)
+ shmem = CreateFileMappingFromApp(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, mappingSize, shmemName);
+ Q_ASSERT_X(shmem, Q_FUNC_INFO, "Could not create file mapping");
+
+ quint32 *data = reinterpret_cast<quint32 *>(MapViewOfFileFromApp(shmem, FILE_MAP_WRITE, 0, mappingSize));
+ Q_ASSERT_X(data, Q_FUNC_INFO, "Could not map size file");
+
+ mappingSize = copiedMessageSize;
+
+ memcpy(data, (void *)&resizeMessageType, sizeof(quint32));
+ memcpy(data + 1, (void *)&mappingSize, sizeof(quint64));
+ UnmapViewOfFile(data);
+ SetEvent(event);
+ WaitForSingleObjectEx(ackEvent, INFINITE, false);
+ if (shmem) {
+ if (!CloseHandle(shmem))
+ Q_ASSERT_X(false, Q_FUNC_INFO, "Could not close shared file handle");
+ shmem = 0;
+ }
+ }
+
if (!shmem)
- shmem = CreateFileMappingFromApp(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 4096, L"qdebug-shmem");
+ shmem = CreateFileMappingFromApp(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, mappingSize, shmemName);
if (!event)
- event = CreateEventEx(NULL, L"qdebug-event", 0, EVENT_ALL_ACCESS);
+ event = CreateEventEx(NULL, eventName, 0, EVENT_ALL_ACCESS);
+ if (!ackEvent)
+ ackEvent = CreateEventEx(NULL, ackEventName, 0, EVENT_ALL_ACCESS);
Q_ASSERT_X(shmem, Q_FUNC_INFO, "Could not create file mapping");
Q_ASSERT_X(event, Q_FUNC_INFO, "Could not create debug event");
- void *data = MapViewOfFileFromApp(shmem, FILE_MAP_WRITE, 0, 4096);
+ void *data = MapViewOfFileFromApp(shmem, FILE_MAP_WRITE, 0, mappingSize);
Q_ASSERT_X(data, Q_FUNC_INFO, "Could not map file");
memset(data, quint32(type), sizeof(quint32));
- memcpy_s(static_cast<quint32 *>(data) + 1, 4096 - sizeof(quint32),
- message.data(), (message.length() + 1) * sizeof(wchar_t));
+ memcpy_s(static_cast<quint32 *>(data) + 1, mappingSize - sizeof(quint32),
+ message.data(), copiedMessageLength * sizeof(wchar_t));
UnmapViewOfFile(data);
SetEvent(event);
+ WaitForSingleObjectEx(ackEvent, INFINITE, false);
+ locker.unlock();
defaultMessageHandler(type, context, message);
}
@@ -149,15 +191,11 @@ public:
{
}
- int exec(int argc, char **argv)
+ int exec()
{
- args.reserve(argc);
- for (int i = 0; i < argc; ++i)
- args.append(argv[i]);
-
mainThread = CreateThread(NULL, 0, [](void *param) -> DWORD {
AppContainer *app = reinterpret_cast<AppContainer *>(param);
- int argc = app->args.count();
+ int argc = app->args.count() - 1;
char **argv = app->args.data();
const int res = main(argc, argv);
if (app->pidFile != INVALID_HANDLE_VALUE) {
@@ -305,6 +343,8 @@ private:
args.remove(i);
}
}
+ args.append(nullptr);
+
if (develMode) {
// Write a PID file to help runner
const QString pidFileName = QDir(QStandardPaths::writableLocation(QStandardPaths::DataLocation))
@@ -379,18 +419,9 @@ private:
// Main entry point for Appx containers
int __stdcall WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
- int argc = 0;
- char **argv = 0, **env = 0;
- for (int i = 0; env && env[i]; ++i) {
- QByteArray var(env[i]);
- int split = var.indexOf('=');
- if (split > 0)
- qputenv(var.mid(0, split), var.mid(split + 1));
- }
-
if (FAILED(RoInitialize(RO_INIT_MULTITHREADED)))
return 1;
ComPtr<AppContainer> app = Make<AppContainer>();
- return app->exec(argc, argv);
+ return app->exec();
}